NASER fix update attendace duration and horizontal scroll for months
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user