m
This commit is contained in:
@@ -78,13 +78,12 @@ class UserController extends Controller
|
||||
// Send ChatOps notification from backend to avoid CORS issues
|
||||
$chatOpsUrl = config('constants.CHATOPS_API_URL');
|
||||
$chatOpsToken = config('constants.CHATOPS_API_TOKEN');
|
||||
$email = 'antv@runsystem.net';
|
||||
|
||||
if ($chatOpsUrl && $chatOpsToken) {
|
||||
if ($chatOpsUrl && $chatOpsToken && $receiverUser) {
|
||||
try {
|
||||
\Illuminate\Support\Facades\Http::timeout(5)->post($chatOpsUrl, [
|
||||
'message' => "💌 Bạn nhận được một Thank Card mới!\nNhanh chân đến khu vực nhận thư để nhận ngay nhé!",
|
||||
'userEmail' => $email,
|
||||
'userEmail' => $receiverUser->mail,
|
||||
'token' => $chatOpsToken,
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
Lịch sử nhận / gửi
|
||||
@endif
|
||||
</h3>
|
||||
|
||||
<x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" />
|
||||
@if(!in_array($mode, ['edit']))
|
||||
<x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" />
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="p-0 overflow-y-auto max-h-[600px]">
|
||||
|
||||
@@ -63,19 +63,24 @@
|
||||
<!-- 3. HISTORY SECTION -->
|
||||
@if($administrations)
|
||||
<div class="mb-6">
|
||||
<h4 class="text-lg font-black text-[#1a2b49] mb-4 flex items-center gap-2">
|
||||
<span class="w-1.5 h-6 bg-[#3462f7] rounded-full inline-block"></span>
|
||||
Lịch sử hoạt động
|
||||
</h4>
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h4 class="text-lg font-black text-[#1a2b49] flex items-center gap-2">
|
||||
<span class="w-1.5 h-6 bg-[#3462f7] rounded-full inline-block"></span>
|
||||
Lịch sử hoạt động
|
||||
</h4>
|
||||
<x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" />
|
||||
</div>
|
||||
<div id="history-lists-container" class="grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch">
|
||||
<!-- Card Allocation History: Lịch sử cấp phát thẻ -->
|
||||
@if(isset($addCards))
|
||||
<div class="bg-white rounded-[24px] shadow-[0_10px_30px_rgba(15,23,42,0.05)] border border-white overflow-hidden flex flex-col h-full">
|
||||
<div class="px-6 py-5 border-b border-gray-100 bg-white flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
||||
<h3 class="text-[17px] font-extrabold text-[#1a2b49] leading-tight">
|
||||
Lịch sử cấp phát thẻ
|
||||
</h3>
|
||||
<x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" />
|
||||
<div>
|
||||
<h3 class="text-[17px] font-extrabold text-[#1a2b49] leading-tight">
|
||||
Lịch sử cấp phát thẻ
|
||||
</h3>
|
||||
<p class="text-sm text-gray-500 mt-1 font-medium">Thẻ hiện có (Tháng {{ \Carbon\Carbon::now()->format('m/Y') }}): <span class="font-bold text-[#3462f7]">{{ $user->card }}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 overflow-y-auto max-h-[600px]">
|
||||
@@ -167,9 +172,12 @@
|
||||
@if($mode === 'edit' && isset($addCards))
|
||||
<div class="bg-white rounded-[24px] shadow-[0_10px_30px_rgba(15,23,42,0.05)] border border-white overflow-hidden flex flex-col">
|
||||
<div class="px-6 py-5 border-b border-gray-100 bg-white flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
||||
<h3 class="text-[17px] font-extrabold text-[#1a2b49] leading-tight">
|
||||
Lịch sử cấp phát thẻ
|
||||
</h3>
|
||||
<div>
|
||||
<h3 class="text-[17px] font-extrabold text-[#1a2b49] leading-tight">
|
||||
Lịch sử cấp phát thẻ
|
||||
</h3>
|
||||
<p class="text-sm text-gray-500 mt-1 font-medium">Thẻ hiện có (Tháng {{ \Carbon\Carbon::now()->format('m/Y') }}): <span class="font-bold text-[#3462f7]">{{ $user->card }}</span></p>
|
||||
</div>
|
||||
<x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ $tpls = [
|
||||
<div class="w-14 h-14 rounded-2xl bg-white/80 shadow-sm flex items-center justify-center text-3xl shrink-0">💌</div>
|
||||
<div>
|
||||
<h1 class="text-[26px] md:text-[30px] font-extrabold text-[#1a2b49] tracking-tight leading-tight">Gửi Thank Card</h1>
|
||||
<p class="text-[14px] text-gray-500 font-medium mt-1 max-w-[380px] leading-relaxed">Gửi lời cảm ơn chân thành đến đồng nghiệp và lan tỏa văn hóa ghi nhận trong tổ chức.</p>
|
||||
<p class="text-[12px] text-gray-500 font-medium mt-1 w-full md:whitespace-nowrap leading-relaxed">Gửi lời cảm ơn chân thành đến đồng nghiệp và lan tỏa văn hóa ghi nhận trong tổ chức.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -458,7 +458,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
const amount = document.getElementById('amount').value;
|
||||
|
||||
showModal('Xác nhận gửi Thank Card',
|
||||
'Đừng quên hoàn thành Thank Card của bạn nhé! Chúng mình sẽ gửi thông báo đến người nhận để họ đến khu vực nhận thư.',
|
||||
'Đừng quên hoàn thành Thank Card của bạn nhé!\n Chúng mình sẽ gửi thông báo đến người nhận\nđể họ đến khu vực nhận thư.',
|
||||
true, () => {
|
||||
window.closeModal('customModal');
|
||||
setButtonLoading(true);
|
||||
|
||||
Reference in New Issue
Block a user