This commit is contained in:
antv
2026-07-15 22:23:49 +07:00
parent d16db9c73d
commit 7f059dce86
4 changed files with 26 additions and 18 deletions
+2 -3
View File
@@ -78,13 +78,12 @@ class UserController extends Controller
// Send ChatOps notification from backend to avoid CORS issues // Send ChatOps notification from backend to avoid CORS issues
$chatOpsUrl = config('constants.CHATOPS_API_URL'); $chatOpsUrl = config('constants.CHATOPS_API_URL');
$chatOpsToken = config('constants.CHATOPS_API_TOKEN'); $chatOpsToken = config('constants.CHATOPS_API_TOKEN');
$email = 'antv@runsystem.net';
if ($chatOpsUrl && $chatOpsToken) { if ($chatOpsUrl && $chatOpsToken && $receiverUser) {
try { try {
\Illuminate\Support\Facades\Http::timeout(5)->post($chatOpsUrl, [ \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é!", '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, 'token' => $chatOpsToken,
]); ]);
} catch (\Exception $e) { } catch (\Exception $e) {
@@ -9,8 +9,9 @@
Lịch sử nhận / gửi Lịch sử nhận / gửi
@endif @endif
</h3> </h3>
@if(!in_array($mode, ['edit']))
<x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" /> <x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" />
@endif
</div> </div>
<div class="p-0 overflow-y-auto max-h-[600px]"> <div class="p-0 overflow-y-auto max-h-[600px]">
+10 -2
View File
@@ -63,19 +63,24 @@
<!-- 3. HISTORY SECTION --> <!-- 3. HISTORY SECTION -->
@if($administrations) @if($administrations)
<div class="mb-6"> <div class="mb-6">
<h4 class="text-lg font-black text-[#1a2b49] mb-4 flex items-center gap-2"> <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> <span class="w-1.5 h-6 bg-[#3462f7] rounded-full inline-block"></span>
Lịch sử hoạt động Lịch sử hoạt động
</h4> </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"> <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ẻ --> <!-- Card Allocation History: Lịch sử cấp phát thẻ -->
@if(isset($addCards)) @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="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"> <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">
<div>
<h3 class="text-[17px] font-extrabold text-[#1a2b49] leading-tight"> <h3 class="text-[17px] font-extrabold text-[#1a2b49] leading-tight">
Lịch sử cấp phát thẻ Lịch sử cấp phát thẻ
</h3> </h3>
<x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" /> <p class="text-sm text-gray-500 mt-1 font-medium">Thẻ hiện (Tháng {{ \Carbon\Carbon::now()->format('m/Y') }}): <span class="font-bold text-[#3462f7]">{{ $user->card }}</span></p>
</div>
</div> </div>
<div class="flex-1 overflow-y-auto max-h-[600px]"> <div class="flex-1 overflow-y-auto max-h-[600px]">
@@ -167,9 +172,12 @@
@if($mode === 'edit' && isset($addCards)) @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="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"> <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">
<div>
<h3 class="text-[17px] font-extrabold text-[#1a2b49] leading-tight"> <h3 class="text-[17px] font-extrabold text-[#1a2b49] leading-tight">
Lịch sử cấp phát thẻ Lịch sử cấp phát thẻ
</h3> </h3>
<p class="text-sm text-gray-500 mt-1 font-medium">Thẻ hiện (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" /> <x-month-filter :mode="$mode" :user="$user" :selectedMonth="$selectedMonth" />
</div> </div>
+2 -2
View File
@@ -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 class="w-14 h-14 rounded-2xl bg-white/80 shadow-sm flex items-center justify-center text-3xl shrink-0">💌</div>
<div> <div>
<h1 class="text-[26px] md:text-[30px] font-extrabold text-[#1a2b49] tracking-tight leading-tight">Gửi Thank Card</h1> <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 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 lan tỏa văn hóa ghi nhận trong tổ chức.</p>
</div> </div>
</div> </div>
</div> </div>
@@ -458,7 +458,7 @@ document.addEventListener('DOMContentLoaded', function() {
const amount = document.getElementById('amount').value; const amount = document.getElementById('amount').value;
showModal('Xác nhận gửi Thank Card', 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, () => { true, () => {
window.closeModal('customModal'); window.closeModal('customModal');
setButtonLoading(true); setButtonLoading(true);