minor fixes

This commit is contained in:
Jagad R R
2025-01-02 18:21:03 +07:00
parent 8255a530af
commit 0c052f379a
8 changed files with 935 additions and 913 deletions
@@ -12,7 +12,6 @@ use App\Models\Region;
use App\Models\Cabang;
use App\Models\UserHasCabang;
use App\Models\Kategori;
use App\Helpers\NextCloudHelper;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Mail;
use App\Mail\ExpenseApproved;
@@ -20,6 +19,7 @@ use App\Mail\ExpenseRejected;
use App\Mail\FinalApprove;
use App\Helpers\WhatsappHelper;
use App\Helpers\AuditTrailHelper;
use App\Helpers\NextCloudHelper;
use App\Rules\FileType;
class FormUpCountryController extends Controller
@@ -70,9 +70,9 @@ class FormUpCountryController extends Controller
$this->checkAuthorization(auth()->user(), ['forms.country.view']);
$form = FormUpCountry::with(['rayon', 'user'])->findOrFail($id);
$form->bukti1 = NextCloudHelper::getFileUrl($form->bukti1);
$form->bukti2 = NextCloudHelper::getFileUrl($form->bukti2);
$form->bukti3 = NextCloudHelper::getFileUrl($form->bukti3);
$form->bukti1 = $form->bukti1 ? NextCloudHelper::getFileUrl($form->bukti1) : null;
$form->bukti2 = $form->bukti2 ? NextCloudHelper::getFileUrl($form->bukti2) : null;
$form->bukti3 = $form->bukti3 ? NextCloudHelper::getFileUrl($form->bukti3) : null;
return response()->json($form);
}
@@ -35,6 +35,7 @@
<h4 class="header-title">Form Up Country</h4>
<div class="data-tables">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable-form_up_country">
<thead class="bg-light text-capitalize">
<tr>
@@ -183,6 +184,7 @@
</div>
</div>
</div>
</div>
</div>
<!-- Form Vehicle Running Cost Table -->
@@ -192,6 +194,7 @@
<div class="card-body">
<h4 class="header-title">Form Vehicle Running Cost</h4>
<div class="data-tables">
<div class="table-responsive">
<table id="dataTable-form_vehicle_running_cost">
<thead class="bg-light text-capitalize">
<tr>
@@ -343,6 +346,7 @@
</div>
</div>
</div>
</div>
<!-- Form Entertainment Presentation Table -->
<div class="row">
@@ -351,6 +355,7 @@
<div class="card-body">
<h4 class="header-title">Form Entertainment Presentation</h4>
<div class="data-tables">
<div class="table-responsive">
<table id="dataTable-form_entertainment_presentation">
<thead class="bg-light text-capitalize">
<tr>
@@ -500,6 +505,7 @@
</div>
</div>
</div>
</div>
<!-- Form Meeting Seminar Table -->
<div class="row">
@@ -508,6 +514,7 @@
<div class="card-body">
<h4 class="header-title">Form Meeting Seminar</h4>
<div class="data-tables">
<div class="table-responsive">
<table id="dataTable-form_meeting_seminar">
<thead class="bg-light text-capitalize">
<tr>
@@ -656,6 +663,7 @@
</div>
</div>
</div>
</div>
</div>
<!-- Form Others Table -->
@@ -665,6 +673,7 @@
<div class="card-body">
<h4 class="header-title">Form Others</h4>
<div class="data-tables">
<div class="table-responsive">
<table id="dataTable-form_others">
<thead class="bg-light text-capitalize">
<tr>
@@ -813,6 +822,7 @@
</div>
</div>
</div>
</div>
</section>
@endsection
@@ -820,19 +830,19 @@
<script>
// Initialize DataTables for each table
if ($('#dataTable-form_up_country').length) {
$('#dataTable-form_up_country').DataTable({ responsive: true });
$('#dataTable-form_up_country').DataTable({ responsive: false });
}
if ($('#dataTable-form_vehicle_running_cost').length) {
$('#dataTable-form_vehicle_running_cost').DataTable({ responsive: true });
$('#dataTable-form_vehicle_running_cost').DataTable({ responsive: false });
}
if ($('#dataTable-form_entertainment_presentation').length) {
$('#dataTable-form_entertainment_presentation').DataTable({ responsive: true });
$('#dataTable-form_entertainment_presentation').DataTable({ responsive: false });
}
if ($('#dataTable-form_meeting_seminar').length) {
$('#dataTable-form_meeting_seminar').DataTable({ responsive: true });
$('#dataTable-form_meeting_seminar').DataTable({ responsive: false });
}
if ($('#dataTable-form_others').length) {
$('#dataTable-form_others').DataTable({ responsive: true });
$('#dataTable-form_others').DataTable({ responsive: false });
}
</script>
@endsection
@@ -40,6 +40,7 @@
<div class="clearfix"></div>
<div class="data-tables">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable" class="text-center">
<thead class="bg-light text-capitalize">
<tr>
@@ -98,6 +99,7 @@
</div>
</div>
</div>
</div>
</section>
@endsection
@@ -106,7 +108,7 @@
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: true,
responsive: false,
dom: 'Bfrtip',
buttons: [
'excel', 'pdf', 'print'
@@ -33,6 +33,7 @@
<div class="clearfix"></div>
<div class="data-tables">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable" class="text-center">
<thead class="bg-light text-capitalize">
<tr>
@@ -83,6 +84,7 @@
</div>
</div>
</div>
</div>
</section>
@endsection
@@ -91,7 +93,7 @@
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: true,
responsive: false,
dom: 'Bfrtip',
buttons: [
'excel', 'pdf', 'print'
@@ -35,6 +35,7 @@
<div class="clearfix"></div>
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable"
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
style="width:100%">
@@ -78,6 +79,7 @@
</div>
</div>
</div>
</div>
</section>
@endsection
@@ -86,7 +88,7 @@
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: true,
responsive: false,
dom: 'Bfrtip',
buttons: [
'excel', 'pdf', 'print'
@@ -35,6 +35,7 @@
<div class="clearfix"></div>
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable"
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
style="width:100%">
@@ -78,6 +79,7 @@
</div>
</div>
</div>
</div>
</section>
@endsection
@@ -86,7 +88,7 @@
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: true,
responsive: false,
dom: 'Bfrtip',
buttons: [
'excel', 'pdf', 'print'
@@ -35,6 +35,7 @@
<div class="clearfix"></div>
<div class="dataTables_wrapper dt-bootstrap4 mt-2">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable"
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
style="width:100%">
@@ -78,6 +79,7 @@
</div>
</div>
</div>
</div>
</section>
@endsection
@@ -38,6 +38,7 @@
<div class="clearfix"></div>
<div class="dataTables_wrapper dt-bootstrap4">
@include('backend.layouts.partials.messages')
<div class="table-responsive">
<table id="dataTable"
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
style="width:100%">
@@ -93,6 +94,7 @@
</div>
</div>
</div>
</div>
</div>
</section>
@@ -103,7 +105,7 @@
$(document).ready(function () {
if ($('#dataTable').length) {
$('#dataTable').DataTable({
responsive: true,
responsive: false,
dom: 'Bfrtip',
buttons: [
'excel', 'pdf', 'print'