update addon HRM
Some checks failed
Some checks failed
This commit is contained in:
@@ -0,0 +1,152 @@
|
||||
<div class="modal fade" id="employees-import-modal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl">
|
||||
<div class="modal-content">
|
||||
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">{{__('Bulk Upload')}}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<!-- Modal Body -->
|
||||
<div class="modal-body">
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="border-0">
|
||||
<div class="card-bodys">
|
||||
<form action="{{ route('hrm.employees.bulk-store') }}" method="post" enctype="multipart/form-data" class="ajaxform">
|
||||
@csrf
|
||||
|
||||
<div class="bulk-upload-container w-100">
|
||||
<div class="d-flex justify-content-between align-items-center w-100">
|
||||
<div class="bulk-input w-100">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-12">
|
||||
<div class="custom-upload-wrapper">
|
||||
<div class="custom-file-box">
|
||||
<div class="custom-file-content">
|
||||
<svg width="30" height="30" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 5V19M5 12H19" stroke="#4B5563" stroke-width="2.0" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span class="custom-upload-text">{{ __('Add File') }}</span>
|
||||
</div>
|
||||
|
||||
<p class="preview-file d-none"></p>
|
||||
<input type="file" name="file" class="preview-file-input" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-center gap-2 flex-wrap">
|
||||
<button type="submit" class="add-order-btn process-csv-btn rounded-2 border-0 submit-btn mt-3">{{__('Submit')}}</button>
|
||||
<a href="{{ asset('assets/employee-bulk-upload.xlsx') }}" download="employee-bulk-upload.xlsx" class="download-file-btn mt-3"><i class="fas fa-download"></i> {{__('Download Sample File')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bulk-upload-container mt-3">
|
||||
<div class="instruction-header">
|
||||
<h5>{{__('Instructions')}}</h5>
|
||||
<div class="mt-3">
|
||||
<h6><strong>{{__('Note')}}: </strong> {{__('Please follow the instructions below to upload your file.')}}</h6>
|
||||
<ul>
|
||||
<li><b>{{__('1.')}}</b> {{__('Download the sample file first and add all your purchases data to it.')}}</li>
|
||||
<li><b>{{__('2.')}}</b> <span class="text-danger">*</span> {{__('Indicates a required field. If you do not provide the required fields, the system will ignore except party information.')}}</li>
|
||||
<li><b>{{__('3.')}}</b> {{__('After adding all your data, please save the file and then upload the updated version.')}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Fields Documentation Table --}}
|
||||
<div class="responsive-table mt-4">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Field Name') }}</th>
|
||||
<th class="text-start">{{ __('Description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="business-category-data">
|
||||
<tr>
|
||||
<td>{{__('1.')}}</td>
|
||||
<td class="text-start">{{__('Employee Name')}} <span class="text-danger fw-bold">*</span></td>
|
||||
<td class="text-start">{{__('Enter the full name of the employee')}} ({{__('e.g.,')}} <b>{{__('James')}}</b>).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{__('2.')}}</td>
|
||||
<td class="text-start">{{__('Gender')}}<span class="text-danger fw-bold">*</span></td>
|
||||
<td class="text-start">
|
||||
{{__('Enter the gender of the employee')}} ({{__('e.g.,')}} <b>{{__('male, female, or other')}}</b>).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{__('3.')}}</td>
|
||||
<td class="text-start">{{__('Phone Number')}} <span class="text-danger fw-bold">*</span></td>
|
||||
<td class="text-start">
|
||||
{{__('Enter the employee’s valid phone number')}} ({{__('e.g.,')}} <b>{{__('01*******')}}</b>).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{__('4.')}}</td>
|
||||
<td class="text-start">{{__('Designation')}}</td>
|
||||
<td class="text-start">
|
||||
{{__('Enter the employee’s job title or position within the organization.')}} ({{__('e.g.,')}} <b>{{__('Ceo')}}</b>)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{__('5.')}}</td>
|
||||
<td class="text-start">{{__('Department')}}</td>
|
||||
<td class="text-start">
|
||||
{{__('Enter the department where the employee works.')}} ({{__('e.g.,')}} <b>{{__('It')}}</b>)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>{{__('6.')}}</td>
|
||||
<td class="text-start">{{__('Email')}}</td>
|
||||
<td class="text-start">
|
||||
{{__('Enter a valid and unique email address for the employee.')}} ({{__('e.g.,')}} <b>{{__('demo@gmail.com')}}</b>).
|
||||
<br><small>{{__('Duplicate email addresses will be ignored during upload.')}}</small>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{__('7.')}}</td>
|
||||
<td class="text-start">{{__('Birth Date')}}</td>
|
||||
<td class="text-start">
|
||||
{{__('Enter the employee’s date of birth.')}} ({{__('e.g.,')}} <b>{{__('01/01/2026')}}</b>)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{__('8.')}}</td>
|
||||
<td class="text-start">{{__('Joining Date')}}</td>
|
||||
<td class="text-start">
|
||||
{{__('Enter the employee’s joining date.')}} ({{__('e.g.,')}} <b>{{__('01/01/2026')}}</b>)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{__('9.')}}</td>
|
||||
<td class="text-start">{{__('Salary')}}</td>
|
||||
<td class="text-start">{{__('Enter the employee’s salary amount.')}} ({{__('e.g.,')}} <b>{{__('500')}}</b>)</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
160
Modules/HrmAddon/resources/views/employees/create.blade.php
Normal file
160
Modules/HrmAddon/resources/views/employees/create.blade.php
Normal file
@@ -0,0 +1,160 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Create Employee') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card border-0">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16">
|
||||
<h4>{{ __('Add new Employee') }}</h4>
|
||||
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<a data-bs-toggle="modal" data-bs-target="#employees-import-modal" class="save-publish-btn" href="#">
|
||||
{{__('Bulk Upload')}}
|
||||
</a>
|
||||
|
||||
@usercan('employees.read')
|
||||
<a href="{{ route('hrm.employees.index') }}" class="add-order-btn rounded-2"><i class="far fa-list" aria-hidden="true"></i> {{ __('Employee List') }}</a>
|
||||
@endusercan
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-form-section p-16">
|
||||
<form action="{{ route('hrm.employees.store') }}" method="POST"
|
||||
class="ajaxform_instant_reload">
|
||||
@csrf
|
||||
<div class="add-suplier-modal-wrapper d-block">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Name') }}</label>
|
||||
<input type="text" name="name" required class="form-control"
|
||||
placeholder="{{ __('Enter employee name') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Designation') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="designation_id" class="form-control table-select w-100 role" required>
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($designations as $designation)
|
||||
<option value="{{ $designation->id }}"> {{ ucfirst($designation->name) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Department') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="department_id" class="form-control table-select w-100 role" required>
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($departments as $department)
|
||||
<option value="{{ $department->id }}"> {{ ucfirst($department->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Shift') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="shift_id" class="form-control table-select w-100 role" required>
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($shifts as $shift)
|
||||
<option value="{{ $shift->id }}"> {{ ucfirst($shift->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Gender') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="gender" class="form-control table-select w-100 role" required>
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
<option value="male">{{ __('Male')}}</option>
|
||||
<option value="female">{{ __('Female')}}</option>
|
||||
<option value="others">{{ __('Others')}}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Birth Date') }}</label>
|
||||
<input type="date" name="birth_date" value="{{ date('Y-m-d') }}" class="form-control">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Email') }}</label>
|
||||
<input type="email" name="email" class="form-control" placeholder="{{ __('Enter email address') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Country') }}</label>
|
||||
<input type="text" name="country" class="form-control" placeholder="{{ __('Enter country') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Phone') }}</label>
|
||||
<input type="number" name="phone" required class="form-control" placeholder="{{ __('Enter phone number') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Salary') }}</label>
|
||||
<input type="number" name="amount" required class="form-control" placeholder="{{ __('Enter salary amount') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Join Date') }}</label>
|
||||
<input type="date" name="join_date" value="{{ date('Y-m-d') }}" class="form-control">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Status') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="status" class="form-control table-select w-100 role" required>
|
||||
<option value="">{{ __('Select one') }}</option>
|
||||
<option value="active">{{ __('Active')}}</option>
|
||||
<option value="terminated">{{ __('Terminate')}}</option>
|
||||
<option value="suspended">{{ __('Suspended')}}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<label class="img-label">{{ __('Image') }}</label>
|
||||
<div class="custom-upload-wrapper">
|
||||
<div class="custom-image-box">
|
||||
<div class="custom-image-content">
|
||||
<svg width="30" height="30" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.3327 7.5026V12.5026C18.3327 14.8596 18.3327 16.0381 17.6004 16.7704C16.8682 17.5026 15.6897 17.5026 13.3327 17.5026H6.66602C4.309 17.5026 3.13048 17.5026 2.39825 16.7704C1.66602 16.0381 1.66602 14.8596 1.66602 12.5026V9.21404C1.66602 8.39729 1.66602 7.98892 1.76053 7.65502C1.99698 6.81974 2.64982 6.1669 3.48509 5.93046C3.819 5.83594 4.22736 5.83594 5.04409 5.83594C5.34907 5.83594 5.50157 5.83594 5.64361 5.81118C5.99556 5.74983 6.31847 5.577 6.56476 5.3182C6.66415 5.21375 6.91352 4.8397 7.08268 4.58594C7.413 4.09048 7.57815 3.84275 7.80393 3.67233C7.94181 3.56826 8.09502 3.48627 8.25809 3.42927C8.52512 3.33594 8.82287 3.33594 9.41837 3.33594H10.8327" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M13.3327 11.2474C13.3327 13.0883 11.8403 14.5807 9.99937 14.5807C8.1584 14.5807 6.66602 13.0883 6.66602 11.2474C6.66602 9.40641 8.1584 7.91406 9.99937 7.91406C11.8403 7.91406 13.3327 9.40641 13.3327 11.2474Z" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M13.334 4.58333H17.5007M15.4173 6.66667V2.5" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span class="custom-upload-text">{{ __('Add Image') }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Preview image -->
|
||||
<img class="preview-image d-none" id="image" src="" alt="Preview">
|
||||
<input type="file" name="image" class="preview-image-input" data-id="#image" accept="image/*">
|
||||
</div>
|
||||
</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('employees.create')
|
||||
<button class="theme-btn m-2 submit-btn">{{ __('Save') }}</button>
|
||||
@endusercan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('modal')
|
||||
@include('hrmaddon::employees.bulk-upload.employees-import')
|
||||
@endpush
|
||||
110
Modules/HrmAddon/resources/views/employees/datas.blade.php
Normal file
110
Modules/HrmAddon/resources/views/employees/datas.blade.php
Normal file
@@ -0,0 +1,110 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
@usercan('employees.delete')
|
||||
<th class="w-60 d-print-none">
|
||||
<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> {{ __('Image') }}. </th>
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<th>{{ __('Branch') }}</th>
|
||||
@endif
|
||||
<th> {{ __('Name') }} </th>
|
||||
<th> {{ __('Department') }} </th>
|
||||
<th> {{ __('Designation') }} </th>
|
||||
<th> {{ __('shift') }} </th>
|
||||
<th> {{ __('Phone') }} </th>
|
||||
<th> {{ __('Salary') }} </th>
|
||||
<th> {{ __('Action') }} </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($employees as $employee)
|
||||
<tr>
|
||||
@usercan('employees.delete')
|
||||
<td class="w-60 checkbox d-print-none">
|
||||
<input type="checkbox" name="ids[]" class="delete-checkbox-item multi-delete"
|
||||
value="{{ $employee->id }}">
|
||||
</td>
|
||||
@endusercan
|
||||
<td>{{ ($employees->currentPage() - 1) * $employees->perPage() + $loop->iteration }}</td>
|
||||
|
||||
<td>
|
||||
<img src="{{ asset($employee->image ?? 'assets/images/logo/upload2.jpg') }}" alt="Img"
|
||||
class="table-product-img">
|
||||
</td>
|
||||
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<td>{{ $employee->branch->name ?? '' }}</td>
|
||||
@endif
|
||||
|
||||
<td>{{ $employee->name }}</td>
|
||||
<td>{{ $employee->department->name ?? '' }}</td>
|
||||
<td>{{ $employee->designation->name ?? '' }}</td>
|
||||
<td>{{ $employee->shift->name ?? '' }}</td>
|
||||
<td>{{ $employee->phone }}</td>
|
||||
<td>{{ currency_format($employee->amount, 'icon', 2, business_currency()) }}</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('employees.read')
|
||||
<li>
|
||||
<a href="#employees-view" class="employees-view" data-bs-toggle="modal"
|
||||
data-employees-name="{{ $employee->name }}"
|
||||
data-employees-gender="{{ $employee->gender }}"
|
||||
data-employees-phone="{{ $employee->phone }}"
|
||||
data-employees-amount="{{ currency_format($employee->amount, 'icon', 2, business_currency()) }}"
|
||||
data-employees-email="{{ $employee->email }}"
|
||||
data-employees-country="{{ $employee->country }}"
|
||||
data-employees-birth-date="{{ $employee->birth_date }}"
|
||||
data-employees-join-date="{{ $employee->join_date }}"
|
||||
data-employees-designation="{{ $employee->designation->name ?? '' }}"
|
||||
data-employees-department="{{ $employee->department->name ?? '' }}"
|
||||
data-employees-shift="{{ $employee->shift->name ?? '' }}"
|
||||
data-employees-status="{{ $employee->status }}"
|
||||
data-employees-image="{{ asset($employee->image ?? 'assets/images/logo/upload2.jpg') }}">
|
||||
<i class="fal fa-eye"></i>
|
||||
{{ __('View') }}
|
||||
</a>
|
||||
</li>
|
||||
@endusercan
|
||||
|
||||
@usercan('employees.update')
|
||||
<li>
|
||||
<a href="{{ route('hrm.employees.edit', $employee->id) }}">
|
||||
<i class="fal fa-edit"></i>
|
||||
{{ __('Edit') }}
|
||||
</a>
|
||||
</li>
|
||||
@endusercan
|
||||
|
||||
@usercan('employees.delete')
|
||||
<li>
|
||||
<a href="{{ route('hrm.employees.destroy', $employee->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">
|
||||
{{ $employees->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
150
Modules/HrmAddon/resources/views/employees/edit.blade.php
Normal file
150
Modules/HrmAddon/resources/views/employees/edit.blade.php
Normal file
@@ -0,0 +1,150 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Edit Employee') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card border-0">
|
||||
<div class="card-bodys ">
|
||||
<div class="table-header p-16">
|
||||
<h4>{{ __('Edit Employee') }}</h4>
|
||||
@usercan('employees.read')
|
||||
<a href="{{ route('hrm.employees.index') }}" class="add-order-btn rounded-2"><i class="far fa-list" aria-hidden="true"></i> {{ __('Employee List') }}</a>
|
||||
@endusercan
|
||||
</div>
|
||||
<div class="order-form-section p-16">
|
||||
<form action="{{ route('hrm.employees.update', $employee->id) }}" method="POST"
|
||||
class="ajaxform_instant_reload">
|
||||
@csrf
|
||||
@method('put')
|
||||
<div class="add-suplier-modal-wrapper d-block">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Name') }}</label>
|
||||
<input type="text" name="name" value="{{ $employee->name }}" required class="form-control"
|
||||
placeholder="{{ __('Enter employee name') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Designation') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="designation_id" class="form-control table-select w-100 role" required>
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($designations as $designation)
|
||||
<option @selected($employee->designation_id) value="{{ $designation->id }}"> {{ ucfirst($designation->name) }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Department') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="department_id" class="form-control table-select w-100 role" required>
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($departments as $department)
|
||||
<option @selected($employee->department_id) value="{{ $department->id }}"> {{ ucfirst($department->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Shift') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="shift_id" class="form-control table-select w-100 role" required>
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
@foreach ($shifts as $shift)
|
||||
<option @selected($employee->shift_id) value="{{ $shift->id }}"> {{ ucfirst($shift->name) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Gender') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="gender" class="form-control table-select w-100 role" required>
|
||||
<option value=""> {{ __('Select one') }}</option>
|
||||
<option @selected($employee->gender == 'male') value="male">{{ __('Male')}}</option>
|
||||
<option @selected($employee->gender == 'female') value="female">{{ __('Female')}}</option>
|
||||
<option @selected($employee->gender == 'others') value="others">{{ __('Others')}}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Birth Date') }}</label>
|
||||
<input type="date" name="birth_date" value="{{ $employee->birth_date ?? date('Y-m-d') }}" class="form-control">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Email') }}</label>
|
||||
<input type="email" name="email" value="{{ $employee->email }}" class="form-control" placeholder="{{ __('Enter email address') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Country') }}</label>
|
||||
<input type="text" name="country" value="{{ $employee->country }}" class="form-control" placeholder="{{ __('Enter country') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Phone') }}</label>
|
||||
<input type="number" name="phone" value="{{ $employee->phone }}" required class="form-control" placeholder="{{ __('Enter phone number') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Salary') }}</label>
|
||||
<input type="number" name="amount" required value="{{ $employee->amount }}" class="form-control" placeholder="{{ __('Enter salary amount') }}">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Join Date') }}</label>
|
||||
<input type="date" name="join_date" value="{{ $employee->join_date ?? date('Y-m-d') }}" class="form-control">
|
||||
</div>
|
||||
<div class="col-lg-6 mb-2">
|
||||
<label>{{ __('Status') }}</label>
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="status" class="form-control table-select w-100 role" required>
|
||||
<option value="">{{ __('Select one') }}</option>
|
||||
<option @selected($employee->status == 'active') value="active">{{ __('Active')}}</option>
|
||||
<option @selected($employee->status == 'terminated') value="terminated">{{ __('Terminate')}}</option>
|
||||
<option @selected($employee->status == 'suspended') value="suspended">{{ __('Suspended')}}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<label class="img-label">{{ __('Image') }}</label>
|
||||
<div class="custom-upload-wrapper">
|
||||
<div class="custom-image-box">
|
||||
<div class="custom-image-content">
|
||||
<svg width="30" height="30" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18.3327 7.5026V12.5026C18.3327 14.8596 18.3327 16.0381 17.6004 16.7704C16.8682 17.5026 15.6897 17.5026 13.3327 17.5026H6.66602C4.309 17.5026 3.13048 17.5026 2.39825 16.7704C1.66602 16.0381 1.66602 14.8596 1.66602 12.5026V9.21404C1.66602 8.39729 1.66602 7.98892 1.76053 7.65502C1.99698 6.81974 2.64982 6.1669 3.48509 5.93046C3.819 5.83594 4.22736 5.83594 5.04409 5.83594C5.34907 5.83594 5.50157 5.83594 5.64361 5.81118C5.99556 5.74983 6.31847 5.577 6.56476 5.3182C6.66415 5.21375 6.91352 4.8397 7.08268 4.58594C7.413 4.09048 7.57815 3.84275 7.80393 3.67233C7.94181 3.56826 8.09502 3.48627 8.25809 3.42927C8.52512 3.33594 8.82287 3.33594 9.41837 3.33594H10.8327" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M13.3327 11.2474C13.3327 13.0883 11.8403 14.5807 9.99937 14.5807C8.1584 14.5807 6.66602 13.0883 6.66602 11.2474C6.66602 9.40641 8.1584 7.91406 9.99937 7.91406C11.8403 7.91406 13.3327 9.40641 13.3327 11.2474Z" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M13.334 4.58333H17.5007M15.4173 6.66667V2.5" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span class="custom-upload-text">{{ __('Add Image') }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Preview image -->
|
||||
<img class="preview-image d-none" id="image" src="{{ asset( $employee->image) }}" alt="Preview">
|
||||
<input type="file" name="image" class="preview-image-input" data-id="#image" accept="image/*">
|
||||
</div>
|
||||
</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('employees.update')
|
||||
<button class="theme-btn m-2 submit-btn">{{ __('Save') }}</button>
|
||||
@endusercan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
84
Modules/HrmAddon/resources/views/employees/index.blade.php
Normal file
84
Modules/HrmAddon/resources/views/employees/index.blade.php
Normal file
@@ -0,0 +1,84 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Employee 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 d-print-none">
|
||||
<h4>{{ __('Employee List') }}</h4>
|
||||
@usercan('employees.create')
|
||||
<a type="button" href="{{ route('hrm.employees.create') }}" class="add-order-btn rounded-2" class="btn btn-primary"><i class="fas fa-plus-circle me-1"></i>{{ __('Add new Employee') }}</a>
|
||||
@endusercan
|
||||
</div>
|
||||
<div class="table-header justify-content-center border-0 text-center d-none d-block d-print-block">
|
||||
@include('business::print.header')
|
||||
<h4 class="mt-2">{{ __('Employee List') }}</h4>
|
||||
</div>
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('hrm.employees.index') }}" method="GET" class="filter-form" table="#employees-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3">
|
||||
|
||||
<div class="gpt-up-down-arrow position-relative d-print-none">
|
||||
<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>
|
||||
|
||||
@if(auth()->user()->accessToMultiBranch())
|
||||
<div class="table-search position-relative">
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="branch_id" class="form-control">
|
||||
<option value="">{{ __('Select Branch') }}</option>
|
||||
@foreach ($branches as $branch)
|
||||
<option value="{{ $branch->id }}" @selected(request('branch_id') == $branch->id) >{{ $branch->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="table-search position-relative d-print-none">
|
||||
<input class="form-control searchInput" type="text" name="search" 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.employees.delete-all') }}">{{ __('Delete') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="employees-data">
|
||||
@include('hrmaddon::employees.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('modal')
|
||||
@include('hrmaddon::component.delete-modal')
|
||||
@include('hrmaddon::employees.view')
|
||||
@endpush
|
||||
|
||||
81
Modules/HrmAddon/resources/views/employees/view.blade.php
Normal file
81
Modules/HrmAddon/resources/views/employees/view.blade.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<div class="modal fade p-0" id="employees-view">
|
||||
<div class="modal-dialog modal-dialog-centered modal-md">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5">{{ __('View') }}</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body order-form-section">
|
||||
<table class="info-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ __('Image') }}</td>
|
||||
<td>:</td>
|
||||
<td><img class="table-img" src="" alt="" id="employees_image"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Name') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_name"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Gender') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_gender"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Phone') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_phone"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Salary') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_amount"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Email') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Country') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_country"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Birth Date') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_birth_date"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Join Date') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_join_date"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Designation') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_designation"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Department') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_department"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Shift') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_shift"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ __('Status') }}</td>
|
||||
<td>:</td>
|
||||
<td id="employees_status"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user