update addon HRM
Some checks failed
Build, Push and Deploy / build-and-push (push) Failing after 3m30s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15s
Build, Push and Deploy / deploy-staging (push) Has been skipped
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-04 23:04:09 +07:00
parent 7be161f4e4
commit 3e1b64e008
131 changed files with 8281 additions and 290 deletions

View File

@@ -0,0 +1,34 @@
<div class="responsive-table m-0">
<table class="table" id="datatable">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th class="text-start">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Date') }}</th>
<th class="text-start d-print-none">{{ __('Month') }}</th>
<th class="text-start">{{ __('Shift') }}</th>
<th class="text-start">{{ __('Time In') }}</th>
<th class="text-start">{{ __('Time Out') }}</th>
<th class="text-start">{{ __('Duration') }}</th>
</tr>
</thead>
<tbody>
@foreach ($attendances as $attendance)
<tr>
<td>{{ ($attendances->currentPage() - 1) * $attendances->perPage() + $loop->iteration }}</td>
<td class="text-start">{{ $attendance->employee->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($attendance->date) }}</td>
<td class="text-start d-print-none">{{ ucfirst($attendance->month) }}</td>
<td class="text-start">{{ $attendance->shift->name ?? '' }}</td>
<td class="text-start">{{ formatted_time($attendance->time_in) }}</td>
<td class="text-start">{{ formatted_time($attendance->time_out) }}</td>
<td class="text-start">{{ formatTimeToWords($attendance->duration) }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="mt-3">
{{ $attendances->links('vendor.pagination.bootstrap-5') }}
</div>

View File

@@ -0,0 +1,28 @@
<table class="table" id="datatable">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th class="text-start">{{ __('Employee') }}</th>
<th class="text-start">{{ __('Date') }}</th>
<th class="text-start">{{ __('Month') }}</th>
<th class="text-start">{{ __('Shift') }}</th>
<th class="text-start">{{ __('Time In') }}</th>
<th class="text-start">{{ __('Time Out') }}</th>
<th class="text-start">{{ __('Duration') }}</th>
</tr>
</thead>
<tbody>
@foreach ($attendances as $attendance)
<tr>
<td>{{ $loop->iteration }}</td>
<td class="text-start">{{ $attendance->employee->name ?? '' }}</td>
<td class="text-start">{{ formatted_date($attendance->date) }}</td>
<td class="text-start">{{ ucfirst($attendance->month) }}</td>
<td class="text-start">{{ $attendance->shift->name ?? '' }}</td>
<td class="text-start">{{ formatted_time($attendance->time_in) }}</td>
<td class="text-start">{{ formatted_time($attendance->time_out) }}</td>
<td class="text-start">{{ formatTimeToWords($attendance->duration) }}</td>
</tr>
@endforeach
</tbody>
</table>

View File

@@ -0,0 +1,106 @@
@extends('layouts.business.master')
@section('title')
{{ __('Attendance Report') }}
@endsection
@section('main_content')
<div class="erp-table-section">
<div class="container-fluid">
<div class="card">
<div class="card-bodys">
<div class="table-header p-16 d-print-none">
<h4>{{ __('Attendance Report') }}</h4>
</div>
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
@include('business::print.header')
<h4 class="mt-2">{{ __('Attendance Report List') }}</h4>
</div>
<div class="table-top-form p-16-0">
<div class="d-flex align-items-center gap-1 flex-wrap">
<form action="{{ route('hrm.attendance-reports.index') }}" method="GET" class="filter-form d-print-none" table="#attendances-data">
<div class="table-top-left d-flex gap-3 margin-l-16">
<div class="gpt-up-down-arrow position-relative">
<select name="per_page" class="form-control">
<option @selected(request('per_page') == 20) value="20">{{ __('Show 20') }}</option>
<option @selected(request('per_page') == 50) value="50">{{ __('Show 50') }}</option>
<option @selected(request('per_page') == 100) value="100">{{ __('Show 100') }}</option>
<option @selected(request('per_page') == 500) value="500">{{ __('Show 500') }}</option>
</select>
<span></span>
</div>
<div class="table-search position-relative">
<input type="text" name="search" class="form-control" placeholder="{{ __('Search...') }}" value="{{ request('search') }}">
<span class="position-absolute">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M14.582 14.582L18.332 18.332" stroke="#4D4D4D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" />
<path d="M16.668 9.16797C16.668 5.02584 13.3101 1.66797 9.16797 1.66797C5.02584 1.66797 1.66797 5.02584 1.66797 9.16797C1.66797 13.3101 5.02584 16.668 9.16797 16.668C13.3101 16.668 16.668 13.3101 16.668 9.16797Z" stroke="#4D4D4D" stroke-width="1.25" stroke-linejoin="round" />
</svg>
</span>
</div>
<div class="gpt-up-down-arrow position-relative d-print-none employee-select">
<select name="employee" class="form-control">
<option value="">{{ __('Select employee') }}</option>
@foreach ($employees as $employee)
<option value="{{ $employee->id }}" @selected(request('employee') == $employee->id) >{{ $employee->name }}</option>
@endforeach
</select>
<span></span>
</div>
<div class="gpt-up-down-arrow position-relative d-print-none">
<select name="month" class="form-control">
<option value="">{{ __('All month') }}</option>
@for ($month = 1; $month <= 12; $month++)
@php
$monthSlug = strtolower(date('F', mktime(0, 0, 0, $month, 1)));
@endphp
<option value="{{ $monthSlug }}">
{{ date('F', mktime(0, 0, 0, $month, 1)) }}
</option>
@endfor
</select>
<span></span>
</div>
</div>
</form>
</div>
<div class="table-top-btn-group d-print-none">
<ul>
<li>
<a href="{{ route('hrm.attendance-reports.csv') }}">
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
</a>
</li>
<li>
<a href="{{ route('hrm.attendance-reports.excel') }}">
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
</a>
</li>
<li>
<a target="blank" href="{{ route('hrm.attendance-reports.pdf') }}">
<img src="{{ asset('assets/images/logo/pdf.svg') }}" alt="">
</a>
</li>
<li>
<a onclick="window.print()" class="print-window">
<img src="{{ asset('assets/images/logo/printer.svg') }}" alt="">
</a>
</li>
</ul>
</div>
</div>
</div>
<div id="attendances-data">
@include('hrmaddon::reports.attendances.datas')
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,50 @@
@extends('layouts.business.pdf.pdf_layout')
@section('pdf_title')
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
@include('business::print.header')
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;" class="">{{ __('Attendance Report List') }}</h4>
</div>
@endsection
@section('pdf_content')
<table width="100%" cellpadding="6" cellspacing="0"
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;"
id="datatable">
<thead>
<tr style="background-color: #C52127; color: white;">
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Employee') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Date') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Shift') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Time In') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Time Out') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Duration') }}</th>
</tr>
</thead>
<tbody>
@foreach ($attendances as $attendance)
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
<td style="border:1px solid gainsboro; text-align:center;">
{{ $attendance->employee->name ?? '' }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_date($attendance->date) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $attendance->shift->name ?? '' }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_time($attendance->time_in) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatted_time($attendance->time_out) }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ formatTimeToWords($attendance->duration) }}
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection