Files
CKB/resources/views/warehouse_management/mutations/index.blade.php

420 lines
10 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@extends('layouts.backapp')
@section('content')
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
<div class="kt-portlet__head kt-portlet__head--lg">
<div class="kt-portlet__head-label">
<span class="kt-portlet__head-icon">
<i class="kt-font-brand flaticon2-list-1"></i>
</span>
<h3 class="kt-portlet__head-title">
Tabel Mutasi
</h3>
</div>
@can('create', $menus['mutations.index'])
<div class="kt-portlet__head-toolbar">
<div class="kt-portlet__head-wrapper">
<div class="kt-portlet__head-actions">
<a href="{{ route('mutations.create') }}" class="btn btn-bold btn-label-brand btn--sm">
Tambah
</a>
</div>
</div>
</div>
@endcan
</div>
<div class="kt-portlet__body">
<!-- Filter Section -->
<div class="kt-form kt-form--label-right kt-margin-b-10">
<div class="row align-items-end">
<div class="col-md-2">
<div class="form-group mb-0">
<label class="form-label">Tanggal Awal</label>
<input type="text" class="form-control" id="date_from" name="date_from" placeholder="Tanggal awal" readonly>
</div>
</div>
<div class="col-md-2">
<div class="form-group mb-0">
<label class="form-label">Tanggal Akhir</label>
<input type="text" class="form-control" id="date_to" name="date_to" placeholder="Tanggal akhir" readonly>
</div>
</div>
<div class="col-md-4">
<div class="form-group mb-0">
<label class="form-label">Dealer</label>
<select class="form-control select2" id="dealer_filter" name="dealer_filter">
<option value="">Pilih Dealer</option>
@foreach($dealers as $dealer)
<option value="{{ $dealer->id }}">{{ $dealer->name }}</option>
@endforeach
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group mb-0">
<button type="button" class="btn btn-brand btn-bold mr-2" id="kt_search">
<span>Filter</span>
</button>
<button type="button" class="btn btn-secondary btn-bold" id="kt_reset">
<span>Reset</span>
</button>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<!--begin: Datatable -->
<table class="table table-striped table-bordered table-hover" id="mutations-table" data-url="{{ route('mutations.index') }}">
<thead>
<tr>
<th>No.</th>
<th>No. Mutasi</th>
<th>Tanggal</th>
<th>Dari Dealer</th>
<th>Ke Dealer</th>
<th>Dibuat Oleh</th>
<th>Total Item</th>
<th>Status</th>
<th>Aksi</th>
</tr>
</thead>
</table>
<!--end: Datatable -->
</div>
</div>
</div>
@endsection
@section('styles')
<style>
/* Override any conflicting styles */
#mutations-table thead th {
position: relative !important;
cursor: pointer !important;
user-select: none !important;
}
#mutations-table thead th:not(.sorting_disabled) {
cursor: pointer !important;
}
/* Ensure DataTables classes are applied */
#mutations-table.dataTable thead th.sorting,
#mutations-table.dataTable thead th.sorting_asc,
#mutations-table.dataTable thead th.sorting_desc {
cursor: pointer !important;
background-image: none !important;
}
/* DataTables Sorting Icons */
table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
opacity: 0.5;
}
table.dataTable thead .sorting:before {
content: "\f0dc";
}
table.dataTable thead .sorting_asc:before {
content: "\f0de";
opacity: 1;
}
table.dataTable thead .sorting_desc:before {
content: "\f0dd";
opacity: 1;
}
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
display: none;
}
/* Ensure column headers are clickable */
table.dataTable thead th {
cursor: pointer;
position: relative;
user-select: none;
}
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
cursor: pointer !important;
pointer-events: auto !important;
}
/* Force clickable area */
table.dataTable thead th.sorting:hover,
table.dataTable thead th.sorting_asc:hover,
table.dataTable thead th.sorting_desc:hover {
background-color: #f8f9fa;
}
/* Ensure sorting icons are visible */
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
}
/* Filter section styling */
.form-label {
font-weight: 600;
color: #595d6e;
margin-bottom: 5px;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.form-group.mb-0 {
margin-bottom: 0 !important;
}
/* Date input container styling */
.form-group {
position: relative;
}
/* Input styling for date fields */
#date_from, #date_to {
padding-right: 40px; /* Make space for icon */
}
/* Date picker icon styling */
.input-icon {
position: absolute;
right: 12px;
bottom: 9px; /* Position from bottom to align with input field */
cursor: pointer;
color: #74788d;
z-index: 5;
font-size: 14px;
pointer-events: auto;
display: flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
}
.input-icon:hover {
color: #5d78ff;
}
/* Disabled input styling */
input[disabled] {
background-color: #f8f9fa !important;
color: #6c757d !important;
cursor: not-allowed !important;
opacity: 0.65;
}
input[disabled] + .input-icon {
color: #ccc !important;
cursor: not-allowed !important;
opacity: 0.5;
}
/* Ensure Select2 container doesn't have conflicting padding */
.select2-container .select2-selection--single .form-control {
padding-right: 12px !important;
}
/* Select2 styling */
.select2-container {
z-index: 9999;
}
.select2-container--default .select2-selection--single {
height: 38px;
border: 1px solid #e2e5ec;
border-radius: 4px;
display: flex;
align-items: center;
padding: 0;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height: 36px;
padding-left: 12px;
padding-right: 30px; /* Make space for dropdown arrow */
color: #74788d;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
color: #74788d;
line-height: 36px;
}
/* Dropdown arrow styling */
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 36px;
right: 8px;
top: 1px;
width: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
border-color: #74788d transparent transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
height: 0;
left: 50%;
margin-left: -4px;
margin-top: -2px;
position: absolute;
top: 50%;
width: 0;
}
/* Hide clear button (×) completely */
.select2-container--default .select2-selection--single .select2-selection__clear {
display: none !important;
}
/* Dropdown styling */
.select2-dropdown {
border: 1px solid #e2e5ec;
border-radius: 4px;
z-index: 9999 !important;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* Ensure dropdown container has proper positioning */
.select2-container--open {
z-index: 9999 !important;
}
.select2-container--open .select2-dropdown {
z-index: 9999 !important;
}
.select2-results__option {
padding: 8px 12px;
line-height: 1.4;
}
.select2-results__option--highlighted {
background-color: #5d78ff;
color: white;
}
/* Focus states */
.select2-container--default.select2-container--focus .select2-selection--single {
border-color: #5d78ff;
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(93, 120, 255, 0.25);
}
/* Custom datepicker styles */
.ui-datepicker {
background: #fff;
border: 1px solid #ddd;
border-radius: 4px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
font-size: 13px;
z-index: 9999 !important;
}
.ui-datepicker-header {
background: #f8f9fa;
border-bottom: 1px solid #dee2e6;
padding: 10px;
border-radius: 4px 4px 0 0;
}
.ui-datepicker-title {
font-weight: 600;
color: #495057;
}
.ui-datepicker-calendar {
border-collapse: collapse;
width: 100%;
}
.ui-datepicker-calendar td {
padding: 5px;
text-align: center;
border: 1px solid #f8f9fa;
}
.ui-datepicker-calendar td a {
display: block;
padding: 8px;
text-decoration: none;
color: #495057;
border-radius: 3px;
transition: all 0.2s;
}
.ui-datepicker-calendar td a:hover {
background: #e9ecef;
color: #212529;
}
.ui-datepicker-calendar .ui-datepicker-today a {
background: #007bff;
color: white;
}
.ui-datepicker-calendar .ui-datepicker-current-day a {
background: #28a745;
color: white;
}
@media (max-width: 768px) {
.row.align-items-end {
align-items: stretch !important;
}
.col-md-2, .col-md-4 {
margin-bottom: 15px;
}
.form-label {
margin-bottom: 8px;
}
.ui-datepicker {
font-size: 14px;
}
}
@media (max-width: 576px) {
.col-md-4:last-child .form-group {
text-align: center;
}
.col-md-4:last-child .btn {
width: 45%;
margin: 0 2.5%;
}
}
</style>
@endsection
@section('javascripts')
<script src="{{ mix('js/warehouse_management/mutations/index.js') }}"></script>
@endsection