NASER fix update attendace duration and horizontal scroll for months

This commit is contained in:
moTech
2026-04-21 05:56:01 +00:00
parent 4b2e1e296a
commit f7537a8b0d
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -290,9 +290,10 @@ class AdminController extends Controller
$breakSec = strtotime("1970-01-01 " . $break) - strtotime("1970-01-01 00:00:00");
$durationSec = strtotime("1970-01-01 " . $duration) - strtotime("1970-01-01 00:00:00");
$durationSec -= $breakSec;
$record->duration = gmdate("H:i:s", $durationSec);
$duration = gmdate("H:i:s", $durationSec);
}
$record->duration = $duration ?? $record->duration;
//dd($record->duration, $duration, $break);
$record->requested = '';
$record->save();
+3 -3
View File
@@ -298,10 +298,10 @@ if (count($user->attendanceBreaks) > 0){
</div>
@else
{{-- دکمه‌های تب (نام ماه‌ها) --}}
<div class="tab rounded-t-2xl max-w-[350px] mx-auto flex"
<div class="tab rounded-t-2xl max-w-[350px] mx-auto flex overflow-x-auto"
style="margin-top: 0px; max-width: 350px">
{{-- یا کلا style="max-width: 350px" باشد --}} @foreach($groupedData->keys() as $month)
<button class="tablinks rounded-t-2xl cursor-pointer px-4 py-2 hover:bg-gray-200 transition"
@foreach($groupedData->keys() as $month)
<button class="tablinks rounded-t-2xl cursor-pointer px-4 py-2 hover:bg-gray-200 transition flex-shrink-0"
onclick="openCity(event, '{{$month}}')">
{{$month}}
</button>