This commit is contained in:
2026-08-01 22:54:56 +07:00
parent 36eec0a664
commit 4255d187c9
5 changed files with 16 additions and 9 deletions
+3 -3
View File
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
use App\Services\Admin\Contracts\AdminServiceInterface;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
class ResetCardsCommand extends Command
{
@@ -21,10 +22,9 @@ class ResetCardsCommand extends Command
{
try {
$this->adminService->resetAllCards();
$this->info('Successfully reset all cards for active members to 0!');
Log::info('Successfully reset all cards for active members to 0!');
} catch (\Throwable $e) {
\Illuminate\Support\Facades\Log::error('Lỗi xảy ra khi chạy command reset thẻ hàng tháng (cards:reset): ' . $e->getMessage());
$this->error('Reset cards failed: ' . $e->getMessage());
Log::error('Error occurred while executing monthly card reset command (cards:reset): ' . $e->getMessage());
return Command::FAILURE;
}
+2 -1
View File
@@ -11,6 +11,7 @@ use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Log;
use App\DTOs\UserFilterDto;
@@ -205,7 +206,7 @@ class AdminService implements AdminServiceInterface
'flag_send' => config('constants.FLAG_SEND_DISABLED'),
]);
\Illuminate\Support\Facades\Log::info("Thực hiện reset thẻ hàng tháng thành công cho {$activeUserCount} tài khoản active.");
Log::info("Monthly card reset executed successfully for {$activeUserCount} active accounts.");
}
public function updateAddCard(int $id, array $data): void
+1 -1
View File
@@ -70,7 +70,7 @@ return [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'days' => env('LOG_DAILY_DAYS', 60),
'replace_placeholders' => true,
'permission' => 0666,
],
-2
View File
@@ -35,8 +35,6 @@
<div class="bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded relative">
<span class="block sm:inline">{{ session('error') }}</span>
</div>
@endif
@if($errors->any())
<div class="bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded relative">
<ul class="list-disc pl-5">
+10 -2
View File
@@ -23,8 +23,17 @@
</svg>
<span>Đây lần đầu tiên bạn đăng nhập. Vui lòng đổi mật khẩu để tiếp tục sử dụng hệ thống.</span>
</div>
@if($errors->any())
<div class="p-3.5 bg-red-50 border border-red-200 text-red-700 rounded-xl text-xs font-medium space-y-1">
@foreach($errors->all() as $error)
<div class="flex items-center gap-1.5">
<svg class="w-4 h-4 text-red-500 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<span>{{ $error }}</span>
</div>
@endforeach
</div>
@endif
<div class="flex flex-col">
<label class="text-[13px] font-bold text-gray-700 mb-1.5" for="password">Mật khẩu mới <span class="text-red-500">*</span></label>
<div class="relative">
@@ -41,7 +50,6 @@
<svg class="w-5 h-5 eye-icon-open hidden" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
</button>
</div>
@error('password')<span class="text-red-500 text-[12px] font-semibold mt-1.5 block">{{ $message }}</span>@enderror
</div>
<div class="flex flex-col">