fix styling opnames and mutations same with stock audit

This commit is contained in:
2025-06-20 15:29:34 +07:00
parent 0de5bec84a
commit 334b9acd87
25 changed files with 491 additions and 14120 deletions

View File

@@ -24,38 +24,39 @@
<div class="kt-portlet__body">
<!-- Filter Section -->
<div class="kt-form kt-form--label-right kt-margin-b-20">
<div class="row align-items-end">
<div class="col-xl-2 col-lg-3 col-md-6">
<div class="form-group mb-3 mb-lg-0">
<label class="form-label">Tanggal Awal</label>
<input type="text" class="form-control datepicker" id="date_from" name="date_from" placeholder="Tanggal awal" readonly>
</div>
<div class="row mb-3">
<div class="col-md-3">
<div class="form-group">
<label class="form-label">Tanggal Awal</label>
<input type="text" class="form-control datepicker" id="date_from" name="date_from" placeholder="Tanggal awal" readonly>
</div>
<div class="col-xl-2 col-lg-3 col-md-6">
<div class="form-group mb-3 mb-lg-0">
<label class="form-label">Tanggal Akhir</label>
<input type="text" class="form-control datepicker" id="date_to" name="date_to" placeholder="Tanggal akhir" readonly>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="form-label">Tanggal Akhir</label>
<input type="text" class="form-control datepicker" id="date_to" name="date_to" placeholder="Tanggal akhir" readonly>
</div>
<div class="col-xl-3 col-lg-4 col-md-12">
<div class="form-group mb-3 mb-lg-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-3">
<div class="form-group">
<label class="form-label">Filter Dealer</label>
<select class="form-control select2" id="dealer_filter" name="dealer_filter">
<option value="">Semua Dealer</option>
@foreach($dealers as $dealer)
<option value="{{ $dealer->id }}">{{ $dealer->name }}</option>
@endforeach
</select>
</div>
<div class="col-xl-5 col-lg-2 col-md-12">
<div class="form-group mb-0 d-flex align-items-end">
<button type="button" class="btn btn-brand btn-bold mr-2" id="kt_search">
<span>Filter</span>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="form-label">&nbsp;</label>
<div class="filter-buttons">
<button type="button" class="btn btn-primary btn-sm" id="kt_search">
Filter
</button>
<button type="button" class="btn btn-secondary btn-bold" id="kt_reset">
<span>Reset</span>
<button type="button" class="btn btn-secondary btn-sm" id="kt_reset">
Reset
</button>
</div>
</div>
@@ -83,482 +84,44 @@
@section('styles')
<style>
/* Filter section styling */
.kt-form--label-right {
background: #f8f9fa;
padding: 20px;
border-radius: 6px;
margin-bottom: 20px;
border: 1px solid #e2e5ec;
.filter-buttons {
display: flex;
gap: 10px;
}
.filter-buttons .btn {
white-space: nowrap;
}
.datepicker {
width: 100% !important;
max-width: 100%;
}
.datepicker-dropdown {
width: auto !important;
min-width: 250px;
max-width: 300px;
}
/* Ensure input field follows parent width */
input.datepicker {
width: 100% !important;
box-sizing: border-box;
}
.form-label {
font-weight: 600;
color: #595d6e;
margin-bottom: 8px;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
display: block;
}
.form-group.mb-0 {
margin-bottom: 0 !important;
}
.form-group.mb-3 {
margin-bottom: 1rem !important;
}
/* Responsive spacing */
@media (min-width: 992px) {
.form-group.mb-lg-0 {
margin-bottom: 0 !important;
}
.kt-form--label-right [class*="col-"] {
margin-bottom: 0;
}
/* Ensure buttons stay horizontal and aligned on desktop */
.kt-form--label-right [class*="col-"]:last-child .form-group {
display: flex;
align-items: flex-end;
min-height: 38px;
}
.kt-form--label-right [class*="col-"]:last-child .btn {
display: inline-flex;
align-items: center;
justify-content: center;
height: 38px;
width: auto;
margin-right: 10px;
margin-bottom: 0;
}
.kt-form--label-right [class*="col-"]:last-child .btn:last-child {
margin-right: 0;
}
}
/* Add spacing between columns */
.row [class*="col-"] {
padding-left: 12px;
padding-right: 12px;
margin-bottom: 15px;
}
/* First and last column adjustments */
.row [class*="col-"]:first-child {
padding-left: 15px;
}
/* Additional spacing for form elements */
.form-control {
margin-bottom: 0;
width: 100%;
box-sizing: border-box;
}
.form-group {
margin-bottom: 20px !important;
width: 100%;
}
/* Override for filter section to ensure proper spacing */
.kt-form--label-right .form-group {
margin-bottom: 0 !important;
width: 100%;
}
.kt-form--label-right [class*="col-"] {
margin-bottom: 20px;
box-sizing: border-box;
}
/* Ensure form controls take full width of their container */
.kt-form--label-right .form-control,
.kt-form--label-right .select2-container {
width: 100% !important;
max-width: 100%;
}
/* Button alignment and styling */
.kt-form--label-right .form-group.d-flex {
min-height: 38px;
align-items: flex-end !important;
}
.kt-form--label-right .btn {
height: 38px;
display: inline-flex;
align-items: center;
justify-content: center;
white-space: nowrap;
padding: 0 16px;
}
/* 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;
}
/* Select2 styling */
.select2-container {
z-index: 9999;
width: 100% !important;
max-width: 100% !important;
display: block !important;
}
.select2-container--default .select2-selection--single {
height: 38px;
border: 1px solid #e2e5ec;
border-radius: 4px;
display: flex;
align-items: center;
padding: 0;
width: 100% !important;
box-sizing: border-box;
}
.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;
max-width: calc(100% - 30px); /* Ensure text doesn't overlap with arrow */
}
.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);
width: auto !important;
min-width: 200px;
max-width: 400px;
}
/* Ensure dropdown container has proper positioning */
.select2-container--open {
z-index: 9999 !important;
}
.select2-container--open .select2-dropdown {
z-index: 9999 !important;
width: auto !important;
min-width: 200px;
max-width: 400px;
}
/* Prevent dropdown from taking full page width */
.select2-dropdown--below {
width: auto !important;
min-width: 200px;
max-width: 400px;
}
.select2-dropdown--above {
width: auto !important;
min-width: 200px;
max-width: 400px;
}
/* Specific styling for dealer filter dropdown */
#dealer_filter + .select2-container .select2-dropdown {
width: auto !important;
min-width: 250px;
max-width: 350px;
}
/* Override any parent width constraints for select2 dropdowns */
.select2-container .select2-dropdown {
left: 0 !important;
right: auto !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 {
text-transform: none;
letter-spacing: normal;
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;
/* Select2 styling - same as stock audit (minimal) */
.select2-container {
width: 100% !important;
}
.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: 991px) {
.kt-form--label-right {
padding: 15px;
}
.row.align-items-end {
align-items: stretch !important;
}
.form-group.mb-3 {
margin-bottom: 1.5rem !important;
}
.form-label {
margin-bottom: 8px;
}
.ui-datepicker {
font-size: 14px;
}
/* Ensure spacing between columns on tablet */
.kt-form--label-right [class*="col-"] {
margin-bottom: 25px;
padding-left: 15px;
padding-right: 15px;
}
/* Button alignment on tablet */
.kt-form--label-right [class*="col-"]:last-child .form-group {
display: flex;
align-items: flex-end;
min-height: 38px;
}
.kt-form--label-right [class*="col-"]:last-child .btn {
height: 38px;
display: inline-flex;
align-items: center;
justify-content: center;
margin-right: 10px;
margin-bottom: 0;
}
.kt-form--label-right [class*="col-"]:last-child .btn:last-child {
margin-right: 0;
}
}
@media (max-width: 767px) {
.kt-form--label-right {
padding: 12px;
}
/* Keep buttons horizontal and aligned */
.kt-form--label-right [class*="col-"]:last-child .form-group {
display: flex;
align-items: flex-end;
min-height: 38px;
margin-top: 15px;
}
.kt-form--label-right [class*="col-"]:last-child .btn {
height: 38px;
display: inline-flex;
align-items: center;
justify-content: center;
width: auto;
margin-right: 10px;
margin-bottom: 0;
}
.kt-form--label-right [class*="col-"]:last-child .btn:last-child {
margin-right: 0;
}
}
@media (max-width: 576px) {
.kt-form--label-right {
padding: 15px;
}
.kt-form--label-right [class*="col-"] {
padding-left: 15px;
padding-right: 15px;
margin-bottom: 25px;
}
/* Ensure proper form control widths on mobile */
.kt-form--label-right .form-control,
.kt-form--label-right .select2-container {
width: 100% !important;
max-width: 100% !important;
}
.form-label {
margin-bottom: 8px;
display: block;
width: 100%;
}
/* Keep buttons horizontal and aligned on mobile */
.kt-form--label-right [class*="col-"]:last-child .form-group {
display: flex;
align-items: flex-end;
min-height: 38px;
}
.kt-form--label-right [class*="col-"]:last-child .btn {
height: 38px;
display: inline-flex;
align-items: center;
justify-content: center;
width: auto;
min-width: 80px;
margin-right: 8px;
margin-bottom: 0;
flex-shrink: 0;
}
.kt-form--label-right [class*="col-"]:last-child .btn:last-child {
margin-right: 0;
}
}
</style>
@endsection