leave user employee module setup
This commit is contained in:
@ -1,26 +1,48 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Add Branche') }}</h2>
|
||||
<?php createButton("btn-primary btn-cancel","","Cancel",route('branches.index')); ?>
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Add Branche') }}</h2>
|
||||
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('branches.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{$editable?route('branches.update',[$data->branch_id]):route('branches.store')}}" id="updateCustomForm" method="POST" >
|
||||
@csrf <input type=hidden name='branch_id' value='{{$editable?$data->branch_id:''}}'/>
|
||||
<div class="row"><div class="col-lg-6">{{createCustomSelect('tbl_companies', 'title', 'company_id', $editable?$data->companies_id:'', 'Companies Id','companies_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">{{createTextarea("description","description ckeditor-classic","Description",$editable?$data->description:'')}}
|
||||
</div><div class="col-lg-6">{{createText("email","email","Email",'',$editable?$data->email:'')}}
|
||||
</div><div class="col-lg-6">{{createText("telephone","telephone","Telephone",'',$editable?$data->telephone:'')}}
|
||||
</div><div class="col-lg-6">{{createText("phone1","phone1","Phone1",'',$editable?$data->phone1:'')}}
|
||||
</div><div class="col-lg-6">{{createText("phone2","phone2","Phone2",'',$editable?$data->phone2:'')}}
|
||||
</div><div class="col-lg-6">{{createText("address","address","Address",'',$editable?$data->address:'')}}
|
||||
</div><div class="col-lg-6">{{createText("company_reg","company_reg","Company Reg",'',$editable?$data->company_reg:'')}}
|
||||
</div><div class="col-lg-6">{{createText("company_pan","company_pan","Company Pan",'',$editable?$data->company_pan:'')}}
|
||||
</div><div class="col-lg-12 pb-2">{{createImageInput("logo","Logo",'',$editable?$data->logo:'')}}
|
||||
</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('branches.index')); ?>
|
||||
</div> </form></div></div>
|
||||
@endsection
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{ $editable ? route('branches.update', [$data->branch_id]) : route('branches.store') }}"
|
||||
id="updateCustomForm" method="POST">
|
||||
@csrf <input type=hidden name='branch_id' value='{{ $editable ? $data->branch_id : '' }}' />
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
{{ createCustomSelect('tbl_companies', 'title', 'company_id', $editable ? $data->companies_id : '', 'Companies Id', 'companies_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">
|
||||
{{ createTextarea('description', 'description ckeditor-classic', 'Description', $editable ? $data->description : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('email', 'email', 'Email', '', $editable ? $data->email : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('telephone', 'telephone', 'Telephone', '', $editable ? $data->telephone : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('phone1', 'phone1', 'Phone1', '', $editable ? $data->phone1 : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('phone2', 'phone2', 'Phone2', '', $editable ? $data->phone2 : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('address', 'address', 'Address', '', $editable ? $data->address : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{ createText('company_reg', 'company_reg', 'Company Reg', '', $editable ? $data->company_reg : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{ createText('company_pan', 'company_pan', 'Company Pan', '', $editable ? $data->company_pan : '') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createImageInput('logo', 'Logo', '', $editable ? $data->logo : '') }}
|
||||
</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('branches.index')); ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
@ -1,26 +1,48 @@
|
||||
@extends('backend.template')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Edit Branches') }}</h2>
|
||||
<?php createButton("btn-primary btn-cancel","","Cancel",route('branches.index')); ?>
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class='card'>
|
||||
<div class='card-header d-flex justify-content-between align-items-center'>
|
||||
<h2 class="">{{ label('Edit Branches') }}</h2>
|
||||
<?php createButton('btn-primary btn-cancel', '', 'Cancel', route('branches.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{$editable?route('branches.update',[$data->branch_id]):route('branches.store')}}" id="updateCustomForm" method="POST" >
|
||||
@csrf <input type=hidden name='branch_id' value='{{$editable?$data->branch_id:''}}'/>
|
||||
<div class="row"><div class="col-lg-6">{{createCustomSelect('tbl_companies', 'title', 'company_id', $editable?$data->companies_id:'', 'Companies Id','companies_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">{{createTextarea("description","description ckeditor-classic","Description",$editable?$data->description:'')}}
|
||||
</div><div class="col-lg-6">{{createText("email","email","Email",'',$editable?$data->email:'')}}
|
||||
</div><div class="col-lg-6">{{createText("telephone","telephone","Telephone",'',$editable?$data->telephone:'')}}
|
||||
</div><div class="col-lg-6">{{createText("phone1","phone1","Phone1",'',$editable?$data->phone1:'')}}
|
||||
</div><div class="col-lg-6">{{createText("phone2","phone2","Phone2",'',$editable?$data->phone2:'')}}
|
||||
</div><div class="col-lg-6">{{createText("address","address","Address",'',$editable?$data->address:'')}}
|
||||
</div><div class="col-lg-6">{{createText("company_reg","company_reg","Company Reg",'',$editable?$data->company_reg:'')}}
|
||||
</div><div class="col-lg-6">{{createText("company_pan","company_pan","Company Pan",'',$editable?$data->company_pan:'')}}
|
||||
</div><div class="col-lg-12 pb-2">{{createImageInput("logo","Logo",'',$editable?$data->logo:'')}}
|
||||
</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('branches.index')); ?>
|
||||
</div> </form></div></div>
|
||||
@endsection
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
<form action="{{ $editable ? route('branches.update', [$data->branch_id]) : route('branches.store') }}"
|
||||
id="updateCustomForm" method="POST">
|
||||
@csrf <input type=hidden name='branch_id' value='{{ $editable ? $data->branch_id : '' }}' />
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
{{ createCustomSelect('tbl_companies', 'title', 'company_id', $editable ? $data->companies_id : '', 'Companies Id', 'companies_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">
|
||||
{{ createTextarea('description', 'description ckeditor-classic', 'Description', $editable ? $data->description : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('email', 'email', 'Email', '', $editable ? $data->email : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('telephone', 'telephone', 'Telephone', '', $editable ? $data->telephone : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('phone1', 'phone1', 'Phone1', '', $editable ? $data->phone1 : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('phone2', 'phone2', 'Phone2', '', $editable ? $data->phone2 : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">{{ createText('address', 'address', 'Address', '', $editable ? $data->address : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{ createText('company_reg', 'company_reg', 'Company Reg', '', $editable ? $data->company_reg : '') }}
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
{{ createText('company_pan', 'company_pan', 'Company Pan', '', $editable ? $data->company_pan : '') }}
|
||||
</div>
|
||||
<div class="col-lg-12 pb-2">{{ createImageInput('logo', 'Logo', '', $editable ? $data->logo : '') }}
|
||||
</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('branches.index')); ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
@ -1,203 +1,211 @@
|
||||
@extends('backend.template')
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h2>{{ label("Branches List") }}</h2>
|
||||
<a href="{{ route('branches.create') }}" class="btn btn-primary"><span>{{label("Create New")}}</span></a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table dataTable" id="tbl_branches" data-url="{{ route('branches.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("companies") }}</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"><span class="overline-title">{{ label("email") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("telephone") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("phone1") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("phone2") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("address") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("company_reg") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("company_pan") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("logo") }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label("is_main") }}</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->branch_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">
|
||||
{!! getFieldData("tbl_companies", "title", "company_id", $item->companies_id) !!}
|
||||
</td><td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="alias-wrapper" data-id="{{$item->branch_id}}">
|
||||
<span class="alias">{{ $item->alias }}</span>
|
||||
<input type="text" class="alias-input d-none" value="{{ $item->alias }}" id="alias_{{$item->branch_id}}" />
|
||||
</div>
|
||||
<span class="badge badge-soft-primary change-alias-badge">change alias</span>
|
||||
</td>
|
||||
<td class="tb-col">{{ $item->email }}</td>
|
||||
<td class="tb-col">{{ $item->telephone }}</td>
|
||||
<td class="tb-col">{{ $item->phone1 }}</td>
|
||||
<td class="tb-col">{{ $item->phone2 }}</td>
|
||||
<td class="tb-col">{{ $item->address }}</td>
|
||||
<td class="tb-col">{{ $item->company_reg }}</td>
|
||||
<td class="tb-col">{{ $item->company_pan }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->logo) }}</td>
|
||||
<td class="tb-col">{{ $item->is_main }}</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('branches.show',[$item->branch_id])}}" class="dropdown-item"><i class="ri-eye-fill align-bottom me-2 text-muted"></i> {{label("View")}}</a></li>
|
||||
<li><a href="{{route('branches.edit',[$item->branch_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('branches.toggle',[$item->branch_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('branches.clone',[$item->branch_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('branches.destroy',[$item->branch_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>
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h2>{{ label('Branches List') }}</h2>
|
||||
<a href="{{ route('branches.create') }}" class="btn btn-primary"><span>{{ label('Create New') }}</span></a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="dataTable table" id="tbl_branches" data-url="{{ route('branches.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('companies') }}</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"><span class="overline-title">{{ label('email') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('telephone') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('phone1') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('phone2') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('address') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('company_reg') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('company_pan') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('logo') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('is_main') }}</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->branch_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">
|
||||
{!! getFieldData('tbl_companies', 'title', 'company_id', $item->companies_id) !!}
|
||||
</td>
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">
|
||||
<div class="alias-wrapper" data-id="{{ $item->branch_id }}">
|
||||
<span class="alias">{{ $item->alias }}</span>
|
||||
<input type="text" class="alias-input d-none" value="{{ $item->alias }}"
|
||||
id="alias_{{ $item->branch_id }}" />
|
||||
</div>
|
||||
<span class="badge badge-soft-primary change-alias-badge">change alias</span>
|
||||
</td>
|
||||
<td class="tb-col">{{ $item->email }}</td>
|
||||
<td class="tb-col">{{ $item->telephone }}</td>
|
||||
<td class="tb-col">{{ $item->phone1 }}</td>
|
||||
<td class="tb-col">{{ $item->phone2 }}</td>
|
||||
<td class="tb-col">{{ $item->address }}</td>
|
||||
<td class="tb-col">{{ $item->company_reg }}</td>
|
||||
<td class="tb-col">{{ $item->company_pan }}</td>
|
||||
<td class="tb-col">{{ showImageThumb($item->logo) }}</td>
|
||||
<td class="tb-col">{{ $item->is_main }}</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('branches.show', [$item->branch_id]) }}" class="dropdown-item"><i
|
||||
class="ri-eye-fill text-muted me-2 align-bottom"></i> {{ label('View') }}</a></li>
|
||||
<li><a href="{{ route('branches.edit', [$item->branch_id]) }}" class="dropdown-item edit-item-btn"><i
|
||||
class="ri-pencil-fill text-muted me-2 align-bottom"></i> {{ label('Edit') }}</a></li>
|
||||
<li>
|
||||
<a href="{{ route('branches.toggle', [$item->branch_id]) }}" class="dropdown-item toggle-item-btn"
|
||||
onclick="confirmToggle(this.href)">
|
||||
<i class="ri-article-fill text-muted me-2 align-bottom"></i>
|
||||
{{ $item->status == 1 ? label('Unpublish') : label('Publish') }}
|
||||
</a>
|
||||
|
||||
@endforeach
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('branches.clone', [$item->branch_id]) }}" class="dropdown-item toggle-item-btn"
|
||||
onclick="confirmClone(this.href)">
|
||||
<i class="ri-file-copy-line text-muted me-2 align-bottom"></i> {{ label('Clone') }}
|
||||
</a>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('branches.destroy', [$item->branch_id]) }}" class="dropdown-item remove-item-btn"
|
||||
onclick="confirmDelete(this.href)">
|
||||
<i class="ri-delete-bin-fill text-muted me-2 align-bottom"></i> {{ label('Delete') }}
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</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">
|
||||
|
||||
</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>
|
||||
@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() {
|
||||
<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('branches.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);
|
||||
}
|
||||
});
|
||||
// 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('branches.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');
|
||||
// Switch to editing state
|
||||
aliasSpan.hide();
|
||||
aliasInput.show().focus();
|
||||
$(this).addClass('editing').text('Save Alias');
|
||||
}
|
||||
});
|
||||
var mytable = $(".dataTable").DataTable({
|
||||
});
|
||||
var mytable = $(".dataTable").DataTable({
|
||||
ordering: true,
|
||||
rowReorder: {
|
||||
//selector: 'tr'
|
||||
//selector: 'tr'
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
var isRowReorderComplete = false;
|
||||
var isRowReorderComplete = false;
|
||||
|
||||
mytable.on('row-reorder', function(e, diff, edit) {
|
||||
mytable.on('row-reorder', function(e, diff, edit) {
|
||||
isRowReorderComplete = true;
|
||||
});
|
||||
});
|
||||
|
||||
mytable.on('draw', function() {
|
||||
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();
|
||||
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;
|
||||
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({
|
||||
|
||||
function confirmDelete(url) {
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'You will not be able to recover this item!',
|
||||
icon: 'warning',
|
||||
@ -205,28 +213,29 @@ function confirmDelete(url) {
|
||||
confirmButtonText: 'Delete',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
}).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');
|
||||
}
|
||||
});
|
||||
$.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({
|
||||
});
|
||||
}
|
||||
|
||||
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',
|
||||
@ -234,28 +243,29 @@ function confirmToggle(url) {
|
||||
confirmButtonText: 'Proceed',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
}).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');
|
||||
}
|
||||
});
|
||||
$.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({
|
||||
});
|
||||
}
|
||||
|
||||
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',
|
||||
@ -263,27 +273,24 @@ function confirmClone(url) {
|
||||
confirmButtonText: 'Proceed',
|
||||
cancelButtonText: 'Cancel',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
}).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');
|
||||
}
|
||||
});
|
||||
$.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>
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
@ -1,29 +1,47 @@
|
||||
@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('branches.index')); ?>
|
||||
@extends('layouts.app')
|
||||
@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('branches.index')); ?>
|
||||
|
||||
</div>
|
||||
<div class='card-body'>
|
||||
|
||||
|
||||
|
||||
<p><b>Companies Id : </b> <span>{{$data->companies_id}}</span></p><p><b>Title : </b> <span>{{$data->title}}</span></p><p><b>Alias : </b> <span>{{$data->alias}}</span></p><p><b>Description : </b> <span>{{$data->description}}</span></p><p><b>Email : </b> <span>{{$data->email}}</span></p><p><b>Telephone : </b> <span>{{$data->telephone}}</span></p><p><b>Phone1 : </b> <span>{{$data->phone1}}</span></p><p><b>Phone2 : </b> <span>{{$data->phone2}}</span></p><p><b>Address : </b> <span>{{$data->address}}</span></p><p><b>Company Reg : </b> <span>{{$data->company_reg}}</span></p><p><b>Company Pan : </b> <span>{{$data->company_pan}}</span></p><p><b>Logo : </b> <span>{{$data->logo}}</span></p><p><b>Is Main : </b> <span>{{$data->is_main}}</span></p><p><b>Display Order : </b> <span>{{$data->display_order}}</span></p><p><b>Status : </b> <span
|
||||
class="{{$data->status == 1 ? 'text-success' : 'text-danger'}}">{{$data->status == 1 ? 'Active' : 'Inactive'}}</span></p><p><b>Remarks : </b> <span>{{$data->remarks}}</span></p><p><b>Createdby : </b> <span>{{$data->createdby}}</span></p><p><b>Updatedby : </b> <span>{{$data->updatedby}}</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 class='card-body'>
|
||||
|
||||
|
||||
|
||||
<p><b>Companies Id : </b> <span>{{ $data->companies_id }}</span></p>
|
||||
<p><b>Title : </b> <span>{{ $data->title }}</span></p>
|
||||
<p><b>Alias : </b> <span>{{ $data->alias }}</span></p>
|
||||
<p><b>Description : </b> <span>{{ $data->description }}</span></p>
|
||||
<p><b>Email : </b> <span>{{ $data->email }}</span></p>
|
||||
<p><b>Telephone : </b> <span>{{ $data->telephone }}</span></p>
|
||||
<p><b>Phone1 : </b> <span>{{ $data->phone1 }}</span></p>
|
||||
<p><b>Phone2 : </b> <span>{{ $data->phone2 }}</span></p>
|
||||
<p><b>Address : </b> <span>{{ $data->address }}</span></p>
|
||||
<p><b>Company Reg : </b> <span>{{ $data->company_reg }}</span></p>
|
||||
<p><b>Company Pan : </b> <span>{{ $data->company_pan }}</span></p>
|
||||
<p><b>Logo : </b> <span>{{ $data->logo }}</span></p>
|
||||
<p><b>Is Main : </b> <span>{{ $data->is_main }}</span></p>
|
||||
<p><b>Display Order : </b> <span>{{ $data->display_order }}</span></p>
|
||||
<p><b>Status : </b> <span
|
||||
class="{{ $data->status == 1 ? 'text-success' : 'text-danger' }}">{{ $data->status == 1 ? 'Active' : 'Inactive' }}</span>
|
||||
</p>
|
||||
<p><b>Remarks : </b> <span>{{ $data->remarks }}</span></p>
|
||||
<p><b>Createdby : </b> <span>{{ $data->createdby }}</span></p>
|
||||
<p><b>Updatedby : </b> <span>{{ $data->updatedby }}</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>
|
||||
|
||||
@endSection
|
||||
<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