master crud setup
This commit is contained in:
129
resources/views/crud/generated/employees/edit.blade.php
Normal file
129
resources/views/crud/generated/employees/edit.blade.php
Normal file
@ -0,0 +1,129 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Add Employees') }}</h2>
|
||||
<?php createButton("btn-primary btn-cancel","","Cancel",route('employees.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{$editable?route('employees.update',[$data->employee_id]):route('employees.store')}}"
|
||||
id="updateCustomForm" method="POST">
|
||||
@csrf <input type=hidden name='employee_id' value='{{$editable?$data->employee_id:''}}' />
|
||||
<div class="row">
|
||||
<div class="col-lg-6">{{createText("first_name","first_name","First
|
||||
Name",'',$editable?$data->first_name:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createText("middle_name","middle_name","Middle
|
||||
Name",'',$editable?$data->middle_name:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createText("last_name","last_name","Last
|
||||
Name",'',$editable?$data->last_name:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{createText("email","email","Email",'',$editable?$data->email:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createCustomSelect('tbl_genders', 'title', 'gender_id',
|
||||
$editable?$data->genders_id:'', 'Genders Id','genders_id', 'form-control
|
||||
select2','status<>-1')}}</div>
|
||||
<div class="col-lg-6">{{createText("nepali_dob","nepali_dob","Nepali
|
||||
Dob",'',$editable?$data->nepali_dob:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6 pb-2">{{createDate("dob","Dob",'',$editable?$data->dob:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createCustomSelect('tbl_nationalities', 'title',
|
||||
'nationality_id', $editable?$data->nationalities_id:'', 'Nationalities
|
||||
Id','nationalities_id', 'form-control select2','status<>-1')}}</div>
|
||||
<div class="col-lg-6">{{createText("about_me","about_me","About
|
||||
Me",'',$editable?$data->about_me:'')}}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{createImageInput("signature","Signature",'',$editable?$data->signature:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createText("father_name","father_name","Father
|
||||
Name",'',$editable?$data->father_name:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createText("mother_name","mother_name","Mother
|
||||
Name",'',$editable?$data->mother_name:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createText("grand_father_name","grand_father_name","Grand Father
|
||||
Name",'',$editable?$data->grand_father_name:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createText("grand_mother_name","grand_mother_name","Grand Mother
|
||||
Name",'',$editable?$data->grand_mother_name:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{createText("spouse","spouse","Spouse",'',$editable?$data->spouse:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{createText("contact","contact","Contact",'',$editable?$data->contact:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createText("alt_contact","alt_contact","Alt
|
||||
Contact",'',$editable?$data->alt_contact:'')}}
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 pb-2">{{createImageInput("profile_picture","Profile
|
||||
Picture",'',$editable?$data->profile_picture:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createCustomSelect('tbl_users', 'name', 'id',
|
||||
$editable?$data->users_id:'', 'Users Id','users_id', 'form-control
|
||||
select2','status<>-1')}}</div>
|
||||
<div class="col-lg-6">{{createText("is_login_required","is_login_required","Is Login
|
||||
Required",'',$editable?$data->is_login_required:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{createText("skills","skills","Skills",'',$editable?$data->skills:'')}}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{createTextarea("experience","experience
|
||||
ckeditor-classic","Experience",$editable?$data->experience:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createText("permanent_address","permanent_address","Permanent
|
||||
Address",'',$editable?$data->permanent_address:'')}}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">{{createCustomSelect('tbl_cities', 'title', 'city_id',
|
||||
$editable?$data->permanent_city:'', 'Permanent
|
||||
City','permanent_city', 'form-control
|
||||
select2','status<>-1')}}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">{{createText("temporary_address","temporary_address","Temporary
|
||||
Address",'',$editable?$data->temporary_address:'')}}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-6">{{createCustomSelect('tbl_cities', 'title', 'city_id',
|
||||
$editable?$data->temporary_city:'', 'Temporary
|
||||
City','temporary_city', 'form-control
|
||||
select2','status<>-1')}}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">{{createText("old_system_address","old_system_address","Old System
|
||||
Address",'',$editable?$data->old_system_address:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{createText("education","education","Education",'',$editable?$data->education:'')}}
|
||||
</div>
|
||||
<div class="col-lg-6">{{createCustomSelect('tbl_castes', 'title', 'caste_id',
|
||||
$editable?$data->castes_id:'', 'Castes Id','castes_id', 'form-control
|
||||
select2','status<>-1')}}</div>
|
||||
<div class="col-lg-6">{{createCustomSelect('tbl_ethnicities', 'title', 'ethnicity_id',
|
||||
$editable?$data->ethnicities_id:'', 'Ethnicities Id','ethnicities_id',
|
||||
'form-control select2','status<>-1')}}</div>
|
||||
<div class="col-lg-6">{{createCustomSelect('tbl_dags', 'title', 'dag_id',
|
||||
$editable?$data->dags_id:'', 'Dags Id','dags_id', 'form-control select2','status
|
||||
<>-1')}}</div>
|
||||
<div class="col-lg-6">
|
||||
{{createText("title","title","Title",'',$editable?$data->title:'')}}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">
|
||||
{{createPlainTextArea("remarks",'',"Remarks",$editable?$data->remarks:'')}}
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<?php createButton("btn-primary btn-update","","Submit"); ?>
|
||||
<?php createButton("btn-primary btn-cancel","","Cancel",route('employees.index')); ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
336
resources/views/crud/generated/employees/index.blade.php
Normal file
336
resources/views/crud/generated/employees/index.blade.php
Normal file
@ -0,0 +1,336 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h2>{{ label("Employees List") }}</h2>
|
||||
<a href="{{ route('employees.create') }}" class="btn btn-primary"><span>{{label("Create New")}}</span></a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table dataTable" id="tbl_employees" data-url="{{ route('employees.sort') }}">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">{{label("Sn.")}}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("first_name") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("middle_name") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("last_name") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("email") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("genders") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("nepali_dob") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("dob") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("nationalities") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("about_me") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("signature") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("father_name") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("mother_name") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("grand_father_name") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("grand_mother_name") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("spouse") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("contact") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("alt_contact") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("profile_picture") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("users") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("is_login_required") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("skills") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("experience") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("permanent_address") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("permanent_city") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("temporary_address") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("temporary_city") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("old_system_address") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("education") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("castes") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("ethnicities") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("dags") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("title") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("alias") }}</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span
|
||||
class="overline-title">{{ label("Action") }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data as $item)
|
||||
|
||||
<tr data-id="{{$item->employee_id}}" data-display_order="{{$item->display_order}}" class="draggable-row <?php echo ($item->status==0)?"bg-light bg-danger":""; ?>">
|
||||
<td class="tb-col">{{ $i++ }}</td><td class="tb-col">{{ $item->first_name }}</td>
|
||||
<td class="tb-col">{{ $item->middle_name }}</td>
|
||||
<td class="tb-col">{{ $item->last_name }}</td>
|
||||
<td class="tb-col">{{ $item->email }}</td>
|
||||
<td class="tb-col">
|
||||
{!! getFieldData("tbl_genders", "title", "gender_id", $item->genders_id) !!}
|
||||
</td><td class="tb-col">{{ $item->nepali_dob }}</td>
|
||||
<td class="tb-col">{{ myDate($item->dob) }}</td>
|
||||
<td class="tb-col">
|
||||
{!! getFieldData("tbl_nationalities", "title", "nationality_id", $item->nationalities_id) !!}
|
||||
</td><td class="tb-col">{{ $item->about_me }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->signature) }}</td>
|
||||
<td class="tb-col">{{ $item->father_name }}</td>
|
||||
<td class="tb-col">{{ $item->mother_name }}</td>
|
||||
<td class="tb-col">{{ $item->grand_father_name }}</td>
|
||||
<td class="tb-col">{{ $item->grand_mother_name }}</td>
|
||||
<td class="tb-col">{{ $item->spouse }}</td>
|
||||
<td class="tb-col">{{ $item->contact }}</td>
|
||||
<td class="tb-col">{{ $item->alt_contact }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->profile_picture) }}</td>
|
||||
<td class="tb-col">
|
||||
{!! getFieldData("tbl_users", "name", "id", $item->users_id) !!}
|
||||
</td><td class="tb-col">{{ $item->is_login_required }}</td>
|
||||
<td class="tb-col">{{ $item->skills }}</td>
|
||||
<td class="tb-col">{{ $item->experience }}</td>
|
||||
<td class="tb-col">{{ $item->permanent_address }}</td>
|
||||
<td class="tb-col">{{ $item->permanent_city }}</td>
|
||||
<td class="tb-col">{{ $item->temporary_address }}</td>
|
||||
<td class="tb-col">{{ $item->temporary_city }}</td>
|
||||
<td class="tb-col">{{ $item->old_system_address }}</td>
|
||||
<td class="tb-col">{{ $item->education }}</td>
|
||||
<td class="tb-col">
|
||||
{!! getFieldData("tbl_castes", "title", "caste_id", $item->castes_id) !!}
|
||||
</td><td class="tb-col">
|
||||
{!! getFieldData("tbl_ethnicities", "title", "ethnicity_id", $item->ethnicities_id) !!}
|
||||
</td><td class="tb-col">
|
||||
{!! getFieldData("tbl_dags", "title", "dag_id", $item->dags_id) !!}
|
||||
</td><td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="alias-wrapper" data-id="{{$item->employee_id}}">
|
||||
<span class="alias">{{ $item->alias }}</span>
|
||||
<input type="text" class="alias-input d-none" value="{{ $item->alias }}" id="alias_{{$item->employee_id}}" />
|
||||
</div>
|
||||
<span class="badge badge-soft-primary change-alias-badge">change alias</span>
|
||||
</td>
|
||||
<td class="tb-col">
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-soft-secondary btn-sm dropdown" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="ri-more-fill align-middle"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{route('employees.show',[$item->employee_id])}}" class="dropdown-item"><i class="ri-eye-fill align-bottom me-2 text-muted"></i> {{label("View")}}</a></li>
|
||||
<li><a href="{{route('employees.edit',[$item->employee_id])}}" class="dropdown-item edit-item-btn"><i class="ri-pencil-fill align-bottom me-2 text-muted"></i> {{label("Edit")}}</a></li>
|
||||
<li>
|
||||
<a href="{{route('employees.toggle',[$item->employee_id])}}" class="dropdown-item toggle-item-btn" onclick="confirmToggle(this.href)">
|
||||
<i class="ri-article-fill align-bottom me-2 text-muted"></i> {{ ($item->status==1)?label('Unpublish'):label('Publish') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{route('employees.clone',[$item->employee_id])}}" class="dropdown-item toggle-item-btn" onclick="confirmClone(this.href)">
|
||||
<i class="ri-file-copy-line align-bottom me-2 text-muted"></i> {{ label('Clone') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{route('employees.destroy',[$item->employee_id])}}" class="dropdown-item remove-item-btn" onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill align-bottom me-2 text-muted"></i> {{ label('Delete') }}
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@push("css")
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.5/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/rowreorder/1.4.0/css/rowReorder.dataTables.min.css">
|
||||
@endpush
|
||||
@push("js")
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.68/vfs_fonts.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.13.5/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.4.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/rowreorder/1.4.0/js/dataTables.rowReorder.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
$('.change-alias-badge').on('click', function() {
|
||||
var aliasWrapper = $(this).prev('.alias-wrapper');
|
||||
var aliasSpan = aliasWrapper.find('.alias');
|
||||
var aliasInput = aliasWrapper.find('.alias-input');
|
||||
var isEditing = $(this).hasClass('editing');
|
||||
aliasInput.toggleClass("d-none");
|
||||
if (isEditing) {
|
||||
// Update alias text and switch to non-editing state
|
||||
var newAlias = aliasInput.val();
|
||||
aliasSpan.text(newAlias);
|
||||
aliasSpan.show();
|
||||
aliasInput.hide();
|
||||
$(this).removeClass('editing').text('Change Alias');
|
||||
var articleId = $(aliasWrapper).data('id');
|
||||
var ajaxUrl = "{{ route('employees.updatealias') }}";
|
||||
var data = {
|
||||
articleId: articleId,
|
||||
newAlias: newAlias
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: ajaxUrl,
|
||||
type: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: data,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Switch to editing state
|
||||
aliasSpan.hide();
|
||||
aliasInput.show().focus();
|
||||
$(this).addClass('editing').text('Save Alias');
|
||||
}
|
||||
});
|
||||
var mytable = $(".dataTable").DataTable({
|
||||
ordering: true,
|
||||
rowReorder: {
|
||||
//selector: 'tr'
|
||||
},
|
||||
});
|
||||
|
||||
var isRowReorderComplete = false;
|
||||
|
||||
mytable.on('row-reorder', function(e, diff, edit) {
|
||||
isRowReorderComplete = true;
|
||||
});
|
||||
|
||||
mytable.on('draw', function() {
|
||||
if (isRowReorderComplete) {
|
||||
var url = mytable.table().node().getAttribute('data-url');
|
||||
var ids = mytable.rows().nodes().map(function(node) {
|
||||
return $(node).data('id');
|
||||
}).toArray();
|
||||
|
||||
console.log(ids);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
id_order: ids
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
isRowReorderComplete=false;
|
||||
}
|
||||
});
|
||||
});
|
||||
function confirmDelete(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'You will not be able to recover this item!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Delete',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Deleted!', 'The item has been deleted.', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred while deleting the item.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function confirmToggle(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'Publish Status of Item will be changed!! if Unpublished, links will be dead!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Proceed',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Updated!', 'Publishing Status has been updated.', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function confirmClone(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'Clonning will create replica of current row. No any linked data will be updated!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Proceed',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire('Updated!', 'Clonning Completed', 'success');
|
||||
location.reload();
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
Swal.fire('Error!', 'An error occurred.', 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@endpush
|
||||
|
29
resources/views/crud/generated/employees/show.blade.php
Normal file
29
resources/views/crud/generated/employees/show.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2><?php echo label('View Details'); ?></h2>
|
||||
<?php createButton("btn-primary btn-cancel","","Back to List",route('employees.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
|
||||
|
||||
|
||||
<p><b>First Name : </b> <span>{{$data->first_name}}</span></p><p><b>Middle Name : </b> <span>{{$data->middle_name}}</span></p><p><b>Last Name : </b> <span>{{$data->last_name}}</span></p><p><b>Email : </b> <span>{{$data->email}}</span></p><p><b>Genders Id : </b> <span>{{$data->genders_id}}</span></p><p><b>Nepali Dob : </b> <span>{{$data->nepali_dob}}</span></p><p><b>Dob : </b> <span>{{$data->dob}}</span></p><p><b>Nationalities Id : </b> <span>{{$data->nationalities_id}}</span></p><p><b>About Me : </b> <span>{{$data->about_me}}</span></p><p><b>Signature : </b> <span>{{$data->signature}}</span></p><p><b>Father Name : </b> <span>{{$data->father_name}}</span></p><p><b>Mother Name : </b> <span>{{$data->mother_name}}</span></p><p><b>Grand Father Name : </b> <span>{{$data->grand_father_name}}</span></p><p><b>Grand Mother Name : </b> <span>{{$data->grand_mother_name}}</span></p><p><b>Spouse : </b> <span>{{$data->spouse}}</span></p><p><b>Contact : </b> <span>{{$data->contact}}</span></p><p><b>Alt Contact : </b> <span>{{$data->alt_contact}}</span></p><p><b>Profile Picture : </b> <span>{{$data->profile_picture}}</span></p><p><b>Users Id : </b> <span>{{$data->users_id}}</span></p><p><b>Is Login Required : </b> <span>{{$data->is_login_required}}</span></p><p><b>Skills : </b> <span>{{$data->skills}}</span></p><p><b>Experience : </b> <span>{{$data->experience}}</span></p><p><b>Permanent Address : </b> <span>{{$data->permanent_address}}</span></p><p><b>Permanent City : </b> <span>{{$data->permanent_city}}</span></p><p><b>Temporary Address : </b> <span>{{$data->temporary_address}}</span></p><p><b>Temporary City : </b> <span>{{$data->temporary_city}}</span></p><p><b>Old System Address : </b> <span>{{$data->old_system_address}}</span></p><p><b>Education : </b> <span>{{$data->education}}</span></p><p><b>Castes Id : </b> <span>{{$data->castes_id}}</span></p><p><b>Ethnicities Id : </b> <span>{{$data->ethnicities_id}}</span></p><p><b>Dags Id : </b> <span>{{$data->dags_id}}</span></p><p><b>Title : </b> <span>{{$data->title}}</span></p><p><b>Alias : </b> <span>{{$data->alias}}</span></p><p><b>Status : </b> <span
|
||||
class="{{$data->status == 1 ? 'text-success' : 'text-danger'}}">{{$data->status == 1 ? 'Active' : 'Inactive'}}</span></p><p><b>Display Order : </b> <span>{{$data->display_order}}</span></p><p><b>Createdby : </b> <span>{{$data->createdby}}</span></p><p><b>Updatedby : </b> <span>{{$data->updatedby}}</span></p><p><b>Remarks : </b> <span>{{$data->remarks}}</span></p><div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<p><b>Created On :</b> <span>{{$data->created_at}}</span></p>
|
||||
<p><b>Created By :</b> <span>{{$data->createdBy}}</span></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Updated On :</b> <span>{{$data->updated_at}}</span></p>
|
||||
<p><b>Updated By :</b> <span>{{$data->updatedBy}}</span></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endSection
|
Reference in New Issue
Block a user