first change
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">Attendance Detail</h5>
|
||||
<div class="flex-shrink-0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="display table-sm table-bordered buttons-datatables table">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">Name</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Date</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Clock In</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Clock Out</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Working Hours(hrs)</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Status</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($attends as $attend)
|
||||
<tr style=" vertical-align: middle;">
|
||||
<td class="p-1">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="me-2 flex-shrink-0">
|
||||
<img src="
|
||||
{{ $employee->profile_pic }}
|
||||
"
|
||||
alt="" class="avatar-sm p-2">
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="fs-14 fw-medium my-1">
|
||||
<a href="#" class="text-reset text-hover-success small">
|
||||
{{ $employee->full_name }}
|
||||
</a>
|
||||
</h5>
|
||||
<span class="text-muted">
|
||||
{{ $employee->email }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ $attend->date }}</td>
|
||||
<td class="text-success">{{ $attend->clock_in_time ?? 'N/A'}}</td>
|
||||
<td class="text-danger">{{ $attend->clock_out_time ?? 'N/A'}}</td>
|
||||
<td class="text-center text-muted">{{ $attend->total_hours ?? 'N/A'}}</td>
|
||||
<td>
|
||||
@if ($attend->status == 10)
|
||||
<span class="badge bg-danger">Absent</span>
|
||||
@elseif ($attend->status == 11)
|
||||
<span class="badge bg-success">Present</span>
|
||||
@else
|
||||
<span class="badge bg-secondary">N/A</span>
|
||||
@endif
|
||||
</td>
|
||||
{{-- <td> <span class="badge bg-{{ $attend->status_name['color'] }}">{!! $attend->status_name['status'] !!}</td> --}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,96 @@
|
||||
<div class="py-2 text-center">
|
||||
{{ $employees->links() }}
|
||||
</div>
|
||||
|
||||
@forelse ($employees as $employee)
|
||||
<div class="col">
|
||||
<div class="card team-box ribbon-box mb-lg-0 material-shadow border shadow-none">
|
||||
<div class="team-cover">
|
||||
<img src="{{ asset('assets/images/small/img-9.jpg') }}" class="img-fluid">
|
||||
</div>
|
||||
<div class="card-body p-4">
|
||||
<div class="ribbon-two ribbon-two-success">
|
||||
{!! $employee?->user?->getRoles() !!}
|
||||
</div>
|
||||
<div class="row align-items-center team-row">
|
||||
<div class="col team-settings">
|
||||
<div class="row">
|
||||
<div class="col"></div>
|
||||
<div class="col dropdown text-end">
|
||||
<a href="javascript:void(0);" data-bs-toggle="dropdown" aria-expanded="false"
|
||||
class="">
|
||||
<i class="ri-more-fill fs-17"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
@can('employee.destroy')
|
||||
<li>
|
||||
<a class="dropdown-item remove-item-btn" href="javascript:void(0);"
|
||||
data-link="{{ route('employee.destroy', $employee->id) }}"
|
||||
data-id="{{ $employee->id }}">
|
||||
<i class="ri-delete-bin-5-line text-muted me-2 align-bottom"></i>
|
||||
Delete
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col">
|
||||
<div class="team-profile-img">
|
||||
<div class="img-thumbnail rounded-circle flex-shrink-0">
|
||||
<img style="height: 90px; width:90px; object-fit:contain"
|
||||
src="{{ $employee->getRawOriginal('photo') ? $employee->photo : asset('assets/images/avatar.png') }}"
|
||||
alt="{{ $employee->full_name }}" class="img-fluid rounded-circle">
|
||||
</div>
|
||||
<div class="team-content">
|
||||
<a class="member-name" href="{{ route('employee.show', $employee->id) }}">
|
||||
<h5 class="fs-16 text-primary mb-1">{{ $employee->full_name }}</h5>
|
||||
</a>
|
||||
<p class="text-muted member-designation mb-0">
|
||||
{{ $employee?->designation?->title }}
|
||||
<span @class(['d-none' => !$employee->department || !$employee->branch])>
|
||||
({{ $employee->branch?->title ?? $employee->department?->title }})
|
||||
</span>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col">
|
||||
<ul class="list-inline mb-0 text-center">
|
||||
@can('employee.edit')
|
||||
<li class="list-inline-item avatar-xs">
|
||||
<a href="{{ route('employee.edit', $employee->id) }}" data-bs-toggle="tooltip"
|
||||
data-bs-placement="top" data-bs-title="Edit"
|
||||
class="avatar-title bg-info-subtle text-info fs-15 rounded">
|
||||
<i class="ri-edit-line"></i>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
@if (auth()->user()->hasRole('admin'))
|
||||
@can('user.assignRole' && $employee->user)
|
||||
<li class="list-inline-item avatar-xs">
|
||||
<a href="javascript:void(0);" data-link="{{ route('user.assignRole', $employee->user?->id) }}" data-bs-toggle="tooltip"
|
||||
data-bs-placement="top" data-bs-title="Assign Role" class="avatar-title bg-dark-subtle text-dark fs-15 rounded assign-role-btn">
|
||||
<i class="ri-admin-line"></i>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="py-4 mt-4 text-center" id="noresult">
|
||||
<lord-icon src="https://cdn.lordicon.com/msoeawqm.json" trigger="loop"
|
||||
colors="primary:#405189,secondary:#0ab39c" style="width:72px;height:72px"></lord-icon>
|
||||
<h5 class="mt-4">Sorry! No Result Found</h5>
|
||||
</div>
|
||||
@endforelse
|
@@ -0,0 +1,22 @@
|
||||
{{ html()->form('GET')->route('employee.index')->class(['filter-form'])->attributes(['id' => 'filter-form'])->open() }}
|
||||
<div class="row g-3">
|
||||
<div class="col-sm-3">
|
||||
{{ html()->label('Search')->class('form-label') }}
|
||||
<div class="search-box">
|
||||
{{ html()->text('search', request('search'))->class('form-control form-control-sm')->placeholder('Search...') }}
|
||||
<i class="ri-search-line search-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
{{ html()->label('Branch')->class('form-label') }}
|
||||
{{ html()->select('branch_id', $branch, request('branch_id'))->placeholder('-Select-')->class('form-select form-select-sm') }}
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
|
||||
<div class="d-flex justify-content-center list-grid-nav hstack mt-2 gap-1">
|
||||
<button type="submit" class="btn btn-warning btn-sm">Filter</button>
|
||||
<a href="{{ route('employee.index') }}" class="btn btn-danger btn-sm reset-filter">Reset</a>
|
||||
</div>
|
||||
{{ html()->form()->close() }}
|
@@ -0,0 +1,136 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-xl-9">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title text-primary mb-4">Personal Details</h6>
|
||||
<div class="row g-3">
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('First Name')->class('form-label')->for('first_name') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->text('first_name')->class('form-control')->placeholder('Enter First Name')->required() }}
|
||||
{{ html()->div('Please enter first name')->class('invalid-feedback') }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Middle Name')->class('form-label')->for('middle_name') }}
|
||||
{{ html()->text('middle_name')->class('form-control')->placeholder('Enter Middle Name') }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Last Name')->class('form-label')->for('last_name') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->text('last_name')->class('form-control')->placeholder('Enter Last Name')->required() }}
|
||||
{{ html()->div('Please enter last name')->class('invalid-feedback') }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Gender')->class('form-label')->for('gender_id') }}
|
||||
{{ html()->select('gender_id', @$genderOptions)->class('form-select choices-select')->placeholder('Select') }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Date of Birth')->class('form-label')->for('dob') }}
|
||||
<x-flatpickr-input name="dob" id="dob" placeholder="Enter Date of Birth"
|
||||
data-default-date="{{ @$employee->dob }}" />
|
||||
{{ html()->div('Please choose dob')->class('invalid-feedback') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border border-1 border-dashed my-3"></div>
|
||||
|
||||
<h6 class="card-title text-primary mb-4">Contact Information</h6>
|
||||
<div class="row g-3">
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Email')->class('form-label')->for('email') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->email('email')->class('form-control')->placeholder('Enter Email')->required() }}
|
||||
{{ html()->div('Please enter email')->class('invalid-feedback') }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Mobile')->class('form-label')->for('mobile') }}
|
||||
{{ html()->span('*')->class('text-danger') }}
|
||||
{{ html()->text('mobile')->class('form-control')->placeholder('Enter Mobile Number')->required() }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Phone Number')->class('form-label')->for('contact') }}
|
||||
{{ html()->text('contact')->class('form-control')->placeholder('Enter Phone Number') }}
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Permanent Address')->class('form-label')->for('permanent_address') }}
|
||||
{{ html()->text('permanent_address')->class('form-control')->placeholder('Enter Permanent Address') }}
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Temporary Address')->class('form-label')->for('temporary_address') }}
|
||||
{{ html()->text('temporary_address')->class('form-control')->placeholder('Enter Temporary Address') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border border-1 border-dashed my-3"></div>
|
||||
|
||||
<h6 class="card-title text-primary mb-4">Job Details</h6>
|
||||
<div class="row g-3">
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Branch')->class('form-label')->for('branch_id') }}
|
||||
{{ html()->select('branch_id', @$branchOptions)->class('form-select choices-select')->placeholder('Select') }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Department')->class('form-label')->for('department_id') }}
|
||||
{{ html()->select('department_id', @$departmentOptions)->class('form-select choices-select')->placeholder('Select') }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Designation')->class('form-label')->for('designation_id') }}
|
||||
{{ html()->select('designation_id', @$designationOptions)->class('form-select choices-select')->placeholder('Select') }}
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Join Date')->class('form-label')->for('join_date') }}
|
||||
<x-flatpickr-input name="join_date" id="join_date" placeholder="Enter Join Date"
|
||||
data-default-date="{{ @$employee->join_date }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border border-1 border-dashed my-3"></div>
|
||||
|
||||
<h6 class="card-title text-primary mb-4">Additional Information</h6>
|
||||
<div class="row g-3">
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Guardian Name')->class('form-label')->for('guardian_name') }}
|
||||
{{ html()->text('guardian_name')->class('form-control')->placeholder('Enter Guardian Name') }}
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6">
|
||||
{{ html()->label('Guardian Contact')->class('form-label')->for('guardian_contact') }}
|
||||
{{ html()->text('guardian_contact')->class('form-control')->placeholder('Enter Guardian Contact') }}
|
||||
</div>
|
||||
<div class="col-12">
|
||||
{{ html()->label('About')->class('form-label')->for('about') }}
|
||||
{{ html()->textarea('remarks')->class('form-control ckeditor-classic')->placeholder('Enter Description...') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h6 class="card-title mb-0 fs-14">
|
||||
Status
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ html()->label('Status')->class('form-label visually-hidden')->for('status') }}
|
||||
{{ html()->select('status', @$statusOptions, @$employee->status)->class('form-select choices-select')->placeholder('Select')->required() }}
|
||||
</div>
|
||||
|
||||
<x-form-buttons :href="route('employee.index')" :label="isset($employee) ? 'Update' : 'Create'" />
|
||||
|
||||
</div>
|
||||
<div class="card featured-image-section">
|
||||
<div class="card-header">
|
||||
<h6 class="card-title mb-0 fs-14">
|
||||
Profile Picture
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
{{ html()->label('Featured')->class('form-label visually-hidden')->for('photo') }}
|
||||
<x-image-input :data="$editable ? $employee->getRawOriginal('photo') : null" id="photo" name="photo" :editable="$editable" :multiple=false />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,76 @@
|
||||
<div class="modal fade" id="leaveModal" tabindex="-1" aria-labelledby="leaveLabel"
|
||||
aria-modal="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header model-primary">
|
||||
<h5 class="modal-title" id="leaveModalgridLabel">Apply Leave</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('leave.store') }}" class="needs-validation" novalidate method="post">
|
||||
@csrf
|
||||
<div class="row gy-2">
|
||||
<input type="hidden" id="employee_id" name="employee_id" value="{{ $employee->id }}">
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Employee')->class('form-label') }}
|
||||
{{html()->span('*')->class('text-danger')}}
|
||||
{{ html()->select('employee_id', $employeeList)->class('form-select select2')->placeholder('Select Employee')->required() }}
|
||||
{{ html()->div('Please Select Employee')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Leave Type')->class('form-label') }}
|
||||
{{html()->span('*')->class('text-danger')}}
|
||||
{{ html()->select('leave_type_id', $leaveTypeList)->class('form-select select2')->attributes(['id' => 'leave_type_id'])->placeholder('Select Leave Type')->required() }}
|
||||
{{ html()->div('Please Select Leave Type')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Selet Duration')->class('form-label') }}
|
||||
{{html()->span('*')->class('text-danger')}}
|
||||
<div>
|
||||
|
||||
@php
|
||||
$leaveDuration = isset($leave) && is_object($leave) ? $leave->duration : null;
|
||||
@endphp
|
||||
|
||||
@foreach ($duration as $durationKey => $durationItem)
|
||||
<div class="form-check form-check-inline">
|
||||
{{ html()->radio('duration')->class('form-check-input duration')
|
||||
->checked(old('duration', $leaveDuration === $durationKey))
|
||||
->attributes(['id' => $durationKey])
|
||||
->value($durationKey)
|
||||
->required() }}
|
||||
{{ html()->label($durationItem)->class('form-check-label')->for($durationKey) }}
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Choose Date')->class('form-label') }}
|
||||
{{ html()->text('start_date')->class('form-control start-date')->placeholder('Select Start Date')->attributes([])->required() }}
|
||||
{{ html()->div('Please Select Start Date')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 leave-note">
|
||||
<ul class="list-group">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('description')->class('form-control')->placeholder('Write Reason for Leave') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 text-end">
|
||||
<button type="submit" class="btn btn-success w-sm">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,59 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between mb-3">
|
||||
<h5 class="card-title">Leave</h5>
|
||||
<div class="">
|
||||
{{-- <a href="javascript:void(0);" class="btn btn-sm btn-success float-end1" data-bs-toggle="modal" data-bs-target="#leaveModal"><i
|
||||
class="ri-edit-box-line align-bottom"></i> Apply Leave</a> --}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Small Tables -->
|
||||
<table class="display table-sm table-bordered align-center buttons-datatables1 table" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Leave Type</th>
|
||||
<th>Dates</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($leaves as $key => $leave)
|
||||
<tr>
|
||||
<td>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="">
|
||||
<h5 class="fs-12 fw-medium my-1">
|
||||
{{ optional($leave->leaveType)->name }} <span class="text-danger">({{ $leave->total_days }}
|
||||
days)</span>
|
||||
</h5>
|
||||
<span class="fs-10 text-danger text-bold">{{ $leave->getDuration() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@foreach ($leave->start_date as $dates)
|
||||
@foreach ($dates as $date)
|
||||
<li class="fs-12">{{ $date }}</li>
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge bg-{{ $leave->status_name['color'] }}">
|
||||
{!! $leave->status_name['status'] !!} </span>
|
||||
<p class="text-info fs-10 mb-0">{{ optional($leave->approveBy)->name }}</p>
|
||||
<p class="text-muted fs-10">{!! $leave->description !!}</p>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="text-center"> No Leave Found</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--end card-body-->
|
||||
</div>
|
||||
@include('employee::partials.leave-modal')
|
||||
{{-- @include('lead::lead.section.followup.form') --}}
|
Reference in New Issue
Block a user