update addon HRM
Some checks failed
Some checks failed
This commit is contained in:
68
Modules/HrmAddon/resources/views/shifts/create.blade.php
Normal file
68
Modules/HrmAddon/resources/views/shifts/create.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<div class="modal fade common-validation-modal" id="shifts-create-modal">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5">{{ __('Create Shift') }}</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="personal-info">
|
||||
<form action="{{ route('hrm.shifts.store') }}" method="post" enctype="multipart/form-data"
|
||||
class="ajaxform_instant_reload">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Select Name') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="name" required class="form-control table-select w-100 role">
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
<option value="Morning">{{ __('Morning') }}</option>
|
||||
<option value="Day">{{ __('Day') }}</option>
|
||||
<option value="Evening">{{ __('Evening') }}</option>
|
||||
<option value="Night">{{ __('Night') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Break Status') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="break_status" class="form-control table-select w-100 role break-status">
|
||||
<option value=""> {{ __('Select a one') }}</option>
|
||||
<option selected value="yes">{{ __('Yes') }}</option>
|
||||
<option value="no">{{ __('No') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Start Time') }}</label>
|
||||
<input type="time" value="{{ date('H:i') }}" required class="form-control" name="start_time">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('End Time') }}</label>
|
||||
<input type="time" value="{{ date('H:i') }}" required class="form-control" name="end_time">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2 start-break-time">
|
||||
<label>{{ __('Start Break Time') }}</label>
|
||||
<input type="time" value="{{ date('H:i') }}" class="form-control" name="start_break_time">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2 start-break-time">
|
||||
<label>{{ __('End Break Time') }}</label>
|
||||
<input type="time" value="{{ date('H:i') }}" class="form-control" name="end_break_time">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="button-group text-center mt-5">
|
||||
<button type="reset" class="theme-btn border-btn m-2">{{ __('Reset') }}</button>
|
||||
@usercan('shifts.create')
|
||||
<button class="theme-btn m-2 submit-btn">{{ __('Save') }}</button>
|
||||
@endusercan
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
85
Modules/HrmAddon/resources/views/shifts/datas.blade.php
Normal file
85
Modules/HrmAddon/resources/views/shifts/datas.blade.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
@usercan('shifts.delete')
|
||||
<th class="w-60">
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<input type="checkbox" class="select-all-delete multi-delete">
|
||||
</div>
|
||||
</th>
|
||||
@endusercan
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Name') }}</th>
|
||||
<th class="text-start">{{ __('Start Time') }}</th>
|
||||
<th class="text-start">{{ __('End Time') }}</th>
|
||||
<th class="text-start">{{ __('Break Time') }}</th>
|
||||
<th class="text-start">{{ __('Break Duration') }}</th>
|
||||
<th>{{ __('Status') }}</th>
|
||||
<th>{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($shifts as $shift)
|
||||
<tr>
|
||||
@usercan('shifts.delete')
|
||||
<td class="w-60 checkbox">
|
||||
<input type="checkbox" name="ids[]" class="delete-checkbox-item multi-delete"
|
||||
value="{{ $shift->id }}">
|
||||
</td>
|
||||
@endusercan
|
||||
<td>{{ ($shifts->currentPage() - 1) * $shifts->perPage() + $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $shift->name }}</td>
|
||||
<td class="text-start">{{ formatted_time($shift->start_time) }}</td>
|
||||
<td class="text-start">{{ formatted_time($shift->end_time) }}</td>
|
||||
<td class="text-start">{{ formatted_time($shift->start_break_time ?? '') }} -
|
||||
{{ formatted_time($shift->end_break_time ?? '') }} </td>
|
||||
<td class="text-start">{{ formatTimeToWords($shift->break_time) }}</td>
|
||||
<td>
|
||||
<label class="switch">
|
||||
<input type="checkbox" {{ $shift->status == 1 ? 'checked' : '' }} class="status"
|
||||
data-url="{{ route('hrm.shifts.status', $shift->id) }}">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td class="print-d-none">
|
||||
<div class="dropdown table-action">
|
||||
<button type="button" data-bs-toggle="dropdown">
|
||||
<i class="far fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
@usercan('shifts.update')
|
||||
<li>
|
||||
<a href="#shifts-edit-modal" data-bs-toggle="modal" class="shifts-edit-btn"
|
||||
data-url="{{ route('hrm.shifts.update', $shift->id) }}"
|
||||
data-shifts-name="{{ $shift->name }}"
|
||||
data-shifts-break-status="{{ $shift->break_status }}"
|
||||
data-shifts-start="{{ $shift->start_time }}"
|
||||
data-shifts-end="{{ $shift->end_time }}"
|
||||
data-start-break-time="{{ $shift->start_break_time }}"
|
||||
data-end-break-time="{{ $shift->end_break_time }}">
|
||||
<i class="fal fa-pencil-alt"></i>{{ __('Edit') }}</a>
|
||||
</li>
|
||||
@endusercan
|
||||
|
||||
@usercan('shifts.delete')
|
||||
<li>
|
||||
<a href="{{ route('hrm.shifts.destroy', $shift->id) }}" class="confirm-action"
|
||||
data-method="DELETE">
|
||||
<i class="fal fa-trash-alt"></i>
|
||||
{{ __('Delete') }}
|
||||
</a>
|
||||
</li>
|
||||
@endusercan
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
{{ $shifts->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
69
Modules/HrmAddon/resources/views/shifts/edit.blade.php
Normal file
69
Modules/HrmAddon/resources/views/shifts/edit.blade.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<div class="modal fade common-validation-modal editShiftModal" id="shifts-edit-modal">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5">{{ __('Edit Shift') }}</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="personal-info">
|
||||
<form action="" method="post" enctype="multipart/form-data"
|
||||
class="ajaxform_instant_reload editShiftForm">
|
||||
@csrf
|
||||
@method('put')
|
||||
<div class="row">
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Select Name') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="name" id="shift_eidt_name" required class="form-control table-select w-100 role">
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
<option value="Morning">{{ __('Morning') }}</option>
|
||||
<option value="Day">{{ __('Day') }}</option>
|
||||
<option value="Evening">{{ __('Evening') }}</option>
|
||||
<option value="Night">{{ __('Night') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Break Status') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="break_status" id="break_status" class="form-control table-select w-100 role break-status">
|
||||
<option value=""> {{ __('Select a one') }}</option>
|
||||
<option value="yes">{{ __('Yes') }}</option>
|
||||
<option value="no">{{ __('No') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Start Time') }}</label>
|
||||
<input type="time" value="{{ date('H:i') }}" required id="shift_start_time" class="form-control" name="start_time">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('End Time') }}</label>
|
||||
<input type="time" value="{{ date('H:i') }}" required id="shift_end_time" class="form-control" name="end_time">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2 start-break-time">
|
||||
<label>{{ __('Start Break Time') }}</label>
|
||||
<input type="time" value="{{ date('H:i') }}" id="edit_start_break_time" class="form-control" name="start_break_time">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2 end-break-time">
|
||||
<label>{{ __('End Break Time') }}</label>
|
||||
<input type="time" value="{{ date('H:i') }}" id="edit_end_break_time" class="form-control" name="end_break_time">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="button-group text-center mt-5">
|
||||
<button type="reset" class="theme-btn border-btn m-2">{{ __('Reset') }}</button>
|
||||
@usercan('shifts.update')
|
||||
<button class="theme-btn m-2 submit-btn">{{ __('Save') }}</button>
|
||||
@endusercan
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
64
Modules/HrmAddon/resources/views/shifts/index.blade.php
Normal file
64
Modules/HrmAddon/resources/views/shifts/index.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Shift List') }}
|
||||
@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">
|
||||
<h4>{{ __('Shift List') }}</h4>
|
||||
@usercan('shifts.read')
|
||||
<a type="button" href="#shifts-create-modal" data-bs-toggle="modal" class="add-order-btn rounded-2"><i class="fas fa-plus-circle me-1"></i>{{ __('Add new Shift') }}</a>
|
||||
@endusercan
|
||||
</div>
|
||||
<div class="table-top-form p-16-0">
|
||||
<form action="{{ route('hrm.shifts.index') }}" method="GET" class="filter-form" table="#shifts-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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete-item delete-show d-none">
|
||||
<div class="delete-item-show">
|
||||
<p class="fw-bold"><span class="selected-count"></span> {{ __('items show') }}</p>
|
||||
<button data-bs-toggle="modal" class="trigger-modal" data-bs-target="#multi-delete-modal" data-url="{{ route('hrm.shifts.delete-all') }}">{{ __('Delete') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="shifts-data">
|
||||
@include('hrmaddon::shifts.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('modal')
|
||||
@include('hrmaddon::component.delete-modal')
|
||||
@include('hrmaddon::shifts.create')
|
||||
@include('hrmaddon::shifts.edit')
|
||||
@endpush
|
||||
Reference in New Issue
Block a user