NASER fix delete redis record

This commit is contained in:
mobin
2026-04-08 09:30:38 +00:00
parent fcc50d8ec8
commit 107fe6f4d3
2 changed files with 30 additions and 30 deletions
+3 -3
View File
@@ -244,10 +244,10 @@ class AdminController extends Controller
$st->delete();
if ($st) {
tel_notif($st->user_identity, "تایید");
$create_requests_key = "att-tempreq:creates:{$data->userid}";
Redis::connection()->lrem($create_requests_key, 1, json_encode($data));
// $create_requests_key = "att-tempreq:creates:{$data->userid}";
// Redis::connection()->lrem($create_requests_key, 1, json_encode($data));
// Redis::connection()->del("att-tempreq:{$data->userid}:{$data->id}");
Redis::connection()->del("att-tempreq:{$data->userid}:{$data->id}");
return redirect()->back()->with('message', [
'color' => '#6aff00ff',
'text' => 'رکورد با موفقیت حذف شد✔️'
+27 -27
View File
@@ -93,9 +93,9 @@ $usersChunked = $users->chunk(3);
<th class="px-2 py-2 border w-1/6">تاریخ</th>
<th class="px-2 py-2 border w-1/6">ورود</th>
<th class="px-2 py-2 border w-1/6">خروج</th>
@if($userType == 'admin')
<th class="px-2 py-2 border w-1/6">تعیین وضعیت</th>
@endif
{{-- @if($userType == 'admin')--}}
<th class="px-2 py-2 border w-1/6">تعیین وضعیت</th>
{{-- @endif--}}
</tr>
</thead>
@@ -131,30 +131,30 @@ $usersChunked = $users->chunk(3);
<td class="px-4 py-2 border">{{ $oldExit || $newExit ? ($rec->id=='new' || $oldExit==($newExit ?? '') ? $oldExit : $oldExit.'👇🏻'.$newExit) : '-' }}</td>
@endif
@if($userType == 'admin')
<td class="px-4 py-2 border">
<form method="post" action="{{route('admin.update')}}">
@csrf
<input type="hidden" name="update" id="update" value="approve">
<input type="hidden" name="data" id="data"
value="{{json_encode($rec)}}">
<button class="bg-white rounded w-full"
style="background-color: #81ff65; margin-bottom: 5px">
تایید
</button>
</form>
<form method="post" action="{{route('admin.update')}}">
@csrf
<input type="hidden" name="update" id="update" value="reject">
<input type="hidden" name="data" id="data"
value="{{json_encode($rec)}}">
<button class="bg-white rounded w-full"
style="background-color: #ff6565">
رد
</button>
</form>
</td>
@endif
{{-- @if($userType == 'admin')--}}
<td class="px-4 py-2 border">
<form method="post" action="{{route('admin.update')}}">
@csrf
<input type="hidden" name="update" id="update" value="approve">
<input type="hidden" name="data" id="data"
value="{{json_encode($rec)}}">
<button class="bg-white rounded w-full"
style="background-color: #81ff65; margin-bottom: 5px">
تایید
</button>
</form>
<form method="post" action="{{route('admin.update')}}">
@csrf
<input type="hidden" name="update" id="update" value="reject">
<input type="hidden" name="data" id="data"
value="{{json_encode($rec)}}">
<button class="bg-white rounded w-full"
style="background-color: #ff6565">
رد
</button>
</form>
</td>
{{-- @endif--}}
</tr>
@empty
<tr>