fix(qma,pg): filterable inputs for unit transfer & timesheet, fix unit edit division, and auto guard rejection
This commit is contained in:
@@ -160,19 +160,23 @@ class GateInspectionController extends Controller
|
|||||||
public function approve(Request $request, int $id): RedirectResponse
|
public function approve(Request $request, int $id): RedirectResponse
|
||||||
{
|
{
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
$currentGuard = $user ? $user->securityGuard : null;
|
$guard = $user ? ($user->securityGuard ?: SecurityGuard::where('user_id', $user->id)->first() ?: SecurityGuard::where('name', $user->name)->first() ?: SecurityGuard::where('badge_id', $user->username)->first()) : null;
|
||||||
$guardId = $request->input('security_guard_id') ?? ($currentGuard ? $currentGuard->id : null);
|
|
||||||
|
|
||||||
if (!$guardId) {
|
if (!$guard && $user) {
|
||||||
$request->validate([
|
$guard = SecurityGuard::firstOrCreate(
|
||||||
'security_guard_id' => ['required', 'exists:security_guards,id'],
|
['user_id' => $user->id],
|
||||||
], [
|
[
|
||||||
'security_guard_id.required' => 'Silakan pilih nama petugas Satpam yang melakukan pemeriksaan fisik.',
|
'badge_id' => $user->username ?: ('PG-' . str_pad($user->id, 3, '0', STR_PAD_LEFT)),
|
||||||
'security_guard_id.exists' => 'Petugas Satpam yang dipilih tidak valid dalam sistem.',
|
'name' => $user->name,
|
||||||
]);
|
'team' => 1,
|
||||||
$guardId = $request->input('security_guard_id');
|
'gate_id' => session('active_gate_id') ?: Gate::first()?->id,
|
||||||
|
'is_active' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$guardId = $guard?->id ?: ($request->input('security_guard_id') ?: SecurityGuard::value('id'));
|
||||||
|
|
||||||
$activity = VehicleActivity::with(['vehicle', 'gate'])->findOrFail($id);
|
$activity = VehicleActivity::with(['vehicle', 'gate'])->findOrFail($id);
|
||||||
|
|
||||||
if ($activity->validation_status !== 'pending') {
|
if ($activity->validation_status !== 'pending') {
|
||||||
@@ -238,18 +242,23 @@ class GateInspectionController extends Controller
|
|||||||
public function reject(Request $request, int $id): RedirectResponse
|
public function reject(Request $request, int $id): RedirectResponse
|
||||||
{
|
{
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
$currentGuard = $user ? $user->securityGuard : null;
|
$guard = $user ? ($user->securityGuard ?: SecurityGuard::where('user_id', $user->id)->first() ?: SecurityGuard::where('name', $user->name)->first() ?: SecurityGuard::where('badge_id', $user->username)->first()) : null;
|
||||||
$guardId = $request->input('security_guard_id') ?? ($currentGuard ? $currentGuard->id : null);
|
|
||||||
|
|
||||||
if (!$guardId) {
|
if (!$guard && $user) {
|
||||||
$request->validate([
|
$guard = SecurityGuard::firstOrCreate(
|
||||||
'security_guard_id' => ['required', 'exists:security_guards,id'],
|
['user_id' => $user->id],
|
||||||
], [
|
[
|
||||||
'security_guard_id.required' => 'Silakan pilih nama petugas Satpam.',
|
'badge_id' => $user->username ?: ('PG-' . str_pad($user->id, 3, '0', STR_PAD_LEFT)),
|
||||||
]);
|
'name' => $user->name,
|
||||||
$guardId = $request->input('security_guard_id');
|
'team' => 1,
|
||||||
|
'gate_id' => session('active_gate_id') ?: Gate::first()?->id,
|
||||||
|
'is_active' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$guardId = $guard?->id ?: ($request->input('security_guard_id') ?: SecurityGuard::value('id'));
|
||||||
|
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'rejection_note' => ['required', 'string', 'max:500'],
|
'rejection_note' => ['required', 'string', 'max:500'],
|
||||||
], [
|
], [
|
||||||
|
|||||||
@@ -1471,18 +1471,30 @@ class VehicleController extends Controller
|
|||||||
{
|
{
|
||||||
$vehicle = Vehicle::findOrFail($id);
|
$vehicle = Vehicle::findOrFail($id);
|
||||||
$oldCode = $vehicle->code;
|
$oldCode = $vehicle->code;
|
||||||
$newCode = strtoupper(trim($request->input('code')));
|
$newCode = strtoupper(trim($request->input('code', $vehicle->code)));
|
||||||
|
|
||||||
|
// Pra-proses untuk unit support: auto-sintesis brand_type dan default current_km
|
||||||
|
if ($vehicle->isUnitSupport() || $request->input('category') === 'unit_support') {
|
||||||
|
if (!$request->filled('brand_type')) {
|
||||||
|
$brandPart = trim(($request->input('brand') ?? '') . ' ' . ($request->input('model_number') ?? ''));
|
||||||
|
$synthesizedBrand = $brandPart ?: ($vehicle->brand_type ?: ($request->input('unit_type') ?: $vehicle->code));
|
||||||
|
$request->merge(['brand_type' => $synthesizedBrand]);
|
||||||
|
}
|
||||||
|
if (!$request->filled('current_km')) {
|
||||||
|
$request->merge(['current_km' => $vehicle->current_km ?? 0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$rules = [
|
$rules = [
|
||||||
'code' => ['required', 'string', 'max:50', Rule::unique('vehicles', 'code')->ignore($vehicle->id)],
|
'code' => ['required', 'string', 'max:50', Rule::unique('vehicles', 'code')->ignore($vehicle->id)],
|
||||||
'category' => ['required', 'in:light_vehicle,unit_support'],
|
'category' => ['required', 'in:light_vehicle,unit_support'],
|
||||||
'brand_type' => [$vehicle->isSupportCategory() ? 'nullable' : 'required', 'string', 'max:150'],
|
'brand_type' => ['nullable', 'string', 'max:150'],
|
||||||
'license_plate' => ['nullable', 'string', 'max:30'],
|
'license_plate' => ['nullable', 'string', 'max:30'],
|
||||||
'serial_number' => ['nullable', 'string', 'max:100'],
|
'serial_number' => ['nullable', 'string', 'max:100'],
|
||||||
'ownership' => ['nullable', 'string', 'max:150'],
|
'ownership' => ['nullable', 'string', 'max:150'],
|
||||||
'division' => ['nullable', 'string', 'max:100'],
|
'division' => ['nullable', 'string', 'max:100'],
|
||||||
'status' => ['required', 'string', 'in:Operation,Standby,Breakdown,Maintenance'],
|
'status' => ['required', 'string', 'in:Operation,Standby,Breakdown,Maintenance'],
|
||||||
'current_km' => [$vehicle->isSupportCategory() ? 'nullable' : 'required', 'numeric', 'min:0'],
|
'current_km' => ['nullable', 'numeric', 'min:0'],
|
||||||
'operational_group' => ['nullable', 'string', 'max:50'],
|
'operational_group' => ['nullable', 'string', 'max:50'],
|
||||||
'unit_category' => ['nullable', 'string', 'max:100'],
|
'unit_category' => ['nullable', 'string', 'max:100'],
|
||||||
'unit_type' => ['nullable', 'string', 'max:100'],
|
'unit_type' => ['nullable', 'string', 'max:100'],
|
||||||
@@ -1504,11 +1516,9 @@ class VehicleController extends Controller
|
|||||||
$validated = $request->validate($rules, [
|
$validated = $request->validate($rules, [
|
||||||
'code.required' => 'Kode kendaraan wajib diisi.',
|
'code.required' => 'Kode kendaraan wajib diisi.',
|
||||||
'code.unique' => 'Kode sudah ada, silakan gunakan kode lain.',
|
'code.unique' => 'Kode sudah ada, silakan gunakan kode lain.',
|
||||||
'brand_type.required' => 'Merek dan tipe wajib diisi.',
|
|
||||||
'current_km.required' => 'Nilai KM / HM wajib diisi.',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($vehicle->isSupportCategory()) {
|
if ($vehicle->isUnitSupport() || ($validated['category'] ?? '') === 'unit_support') {
|
||||||
$validated['code'] = strtoupper(trim($validated['code']));
|
$validated['code'] = strtoupper(trim($validated['code']));
|
||||||
if (!empty($validated['operational_group'])) {
|
if (!empty($validated['operational_group'])) {
|
||||||
$validated['operational_group'] = strtoupper(trim($validated['operational_group']));
|
$validated['operational_group'] = strtoupper(trim($validated['operational_group']));
|
||||||
|
|||||||
@@ -657,20 +657,14 @@
|
|||||||
<!-- Form Penolakan -->
|
<!-- Form Penolakan -->
|
||||||
<form id="rejectForm" method="POST" action="" class="space-y-4">
|
<form id="rejectForm" method="POST" action="" class="space-y-4">
|
||||||
@csrf
|
@csrf
|
||||||
@if($currentGuard)
|
<!-- Petugas yang Menolak (Otomatis Akun Login) -->
|
||||||
<input type="hidden" name="security_guard_id" value="{{ $currentGuard->id }}">
|
<div class="p-3 bg-slate-50 border border-slate-200/80 rounded-2xl flex items-center justify-between text-xs">
|
||||||
@elseif($guards->isNotEmpty())
|
<span class="text-slate-500 font-medium">Petugas Pemeriksa:</span>
|
||||||
<div>
|
<span class="font-bold text-slate-800 flex items-center space-x-1.5">
|
||||||
<label class="block text-xs font-bold text-slate-700 mb-1">
|
<i class="fa-solid fa-user-shield text-[#1b5e20]"></i>
|
||||||
Petugas Satpam Pemeriksa <span class="text-rose-500">*</span>
|
<span>{{ auth()->user()?->name ?? 'Petugas Pos Gerbang' }}</span>
|
||||||
</label>
|
</span>
|
||||||
<select name="security_guard_id" required class="w-full text-xs px-3.5 py-2.5 rounded-xl border border-slate-200 bg-white text-slate-800 font-semibold focus:outline-none focus:border-rose-600">
|
|
||||||
@foreach($guards as $g)
|
|
||||||
<option value="{{ $g->id }}">{{ $g->name }} (Reg: {{ $g->badge_id }})</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
|
|
||||||
<!-- Quick Reason Chips -->
|
<!-- Quick Reason Chips -->
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -529,6 +529,19 @@
|
|||||||
<span>Heavy Equipment <span class="text-rose-500">*</span></span>
|
<span>Heavy Equipment <span class="text-rose-500">*</span></span>
|
||||||
<span id="addUnitCounterBadge" class="text-[10px] font-semibold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded border border-emerald-200 hidden"></span>
|
<span id="addUnitCounterBadge" class="text-[10px] font-semibold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded border border-emerald-200 hidden"></span>
|
||||||
</label>
|
</label>
|
||||||
|
<div class="space-y-1.5">
|
||||||
|
<div class="relative">
|
||||||
|
<i class="fa-solid fa-magnifying-glass absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 text-xs"></i>
|
||||||
|
<input type="text"
|
||||||
|
id="addVehicleSearch"
|
||||||
|
placeholder="Ketik untuk filter unit (kode / merek)..."
|
||||||
|
oninput="filterTimesheetVehicleOptions(this.value, 'add')"
|
||||||
|
autocomplete="off"
|
||||||
|
class="w-full pl-8 pr-7 py-2 text-xs rounded-xl border border-slate-200 bg-slate-50 focus:bg-white focus:outline-none focus:border-[#1b5e20] focus:ring-1 focus:ring-[#1b5e20] transition font-medium">
|
||||||
|
<button type="button" onclick="clearTimesheetVehicleFilter('add')" id="clearAddVehicleSearchBtn" class="hidden absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 cursor-pointer">
|
||||||
|
<i class="fa-solid fa-xmark text-xs"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<select name="vehicle_id"
|
<select name="vehicle_id"
|
||||||
id="addVehicleSelect"
|
id="addVehicleSelect"
|
||||||
required
|
required
|
||||||
@@ -536,6 +549,7 @@
|
|||||||
class="w-full text-xs px-3.5 py-2.5 rounded-xl border border-slate-200 bg-white text-slate-800 font-semibold focus:outline-none focus:border-[#1b5e20] focus:ring-1 focus:ring-[#1b5e20] transition">
|
class="w-full text-xs px-3.5 py-2.5 rounded-xl border border-slate-200 bg-white text-slate-800 font-semibold focus:outline-none focus:border-[#1b5e20] focus:ring-1 focus:ring-[#1b5e20] transition">
|
||||||
<option value="" disabled selected>-- Pilih Lokasi Kerja Terlebih Dahulu --</option>
|
<option value="" disabled selected>-- Pilih Lokasi Kerja Terlebih Dahulu --</option>
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
<div id="addVehiclePreview" class="hidden mt-1.5 px-3 py-1.5 rounded-lg bg-emerald-50 border border-emerald-200/80 text-[11px] text-emerald-900 flex items-center justify-between">
|
<div id="addVehiclePreview" class="hidden mt-1.5 px-3 py-1.5 rounded-lg bg-emerald-50 border border-emerald-200/80 text-[11px] text-emerald-900 flex items-center justify-between">
|
||||||
<span id="addVehiclePreviewText" class="font-bold"></span>
|
<span id="addVehiclePreviewText" class="font-bold"></span>
|
||||||
<span id="addVehicleLastKmText" class="text-emerald-700 font-mono text-[10px]"></span>
|
<span id="addVehicleLastKmText" class="text-emerald-700 font-mono text-[10px]"></span>
|
||||||
@@ -883,6 +897,19 @@
|
|||||||
<span>Heavy Equipment <span class="text-rose-500">*</span></span>
|
<span>Heavy Equipment <span class="text-rose-500">*</span></span>
|
||||||
<span id="editUnitCounterBadge" class="text-[10px] font-semibold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded border border-emerald-200 hidden"></span>
|
<span id="editUnitCounterBadge" class="text-[10px] font-semibold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded border border-emerald-200 hidden"></span>
|
||||||
</label>
|
</label>
|
||||||
|
<div class="space-y-1.5">
|
||||||
|
<div class="relative">
|
||||||
|
<i class="fa-solid fa-magnifying-glass absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 text-xs"></i>
|
||||||
|
<input type="text"
|
||||||
|
id="editVehicleSearch"
|
||||||
|
placeholder="Ketik untuk filter unit (kode / merek)..."
|
||||||
|
oninput="filterTimesheetVehicleOptions(this.value, 'edit')"
|
||||||
|
autocomplete="off"
|
||||||
|
class="w-full pl-8 pr-7 py-2 text-xs rounded-xl border border-slate-200 bg-slate-50 focus:bg-white focus:outline-none focus:border-[#1b5e20] focus:ring-1 focus:ring-[#1b5e20] transition font-medium">
|
||||||
|
<button type="button" onclick="clearTimesheetVehicleFilter('edit')" id="clearEditVehicleSearchBtn" class="hidden absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 cursor-pointer">
|
||||||
|
<i class="fa-solid fa-xmark text-xs"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<select name="vehicle_id"
|
<select name="vehicle_id"
|
||||||
id="editVehicleSelect"
|
id="editVehicleSelect"
|
||||||
required
|
required
|
||||||
@@ -890,6 +917,7 @@
|
|||||||
class="w-full text-xs px-3.5 py-2.5 rounded-xl border border-slate-200 bg-white text-slate-800 font-semibold focus:outline-none focus:border-[#1b5e20] focus:ring-1 focus:ring-[#1b5e20] transition">
|
class="w-full text-xs px-3.5 py-2.5 rounded-xl border border-slate-200 bg-white text-slate-800 font-semibold focus:outline-none focus:border-[#1b5e20] focus:ring-1 focus:ring-[#1b5e20] transition">
|
||||||
<option value="" disabled selected>-- Pilih Lokasi Kerja Terlebih Dahulu --</option>
|
<option value="" disabled selected>-- Pilih Lokasi Kerja Terlebih Dahulu --</option>
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
<div id="editVehiclePreview" class="hidden mt-1.5 px-3 py-1.5 rounded-lg bg-emerald-50 border border-emerald-200/80 text-[11px] text-emerald-900 flex items-center justify-between">
|
<div id="editVehiclePreview" class="hidden mt-1.5 px-3 py-1.5 rounded-lg bg-emerald-50 border border-emerald-200/80 text-[11px] text-emerald-900 flex items-center justify-between">
|
||||||
<span id="editVehiclePreviewText" class="font-bold"></span>
|
<span id="editVehiclePreviewText" class="font-bold"></span>
|
||||||
<span id="editVehicleLastKmText" class="text-emerald-700 font-mono text-[10px]"></span>
|
<span id="editVehicleLastKmText" class="text-emerald-700 font-mono text-[10px]"></span>
|
||||||
@@ -1604,6 +1632,12 @@
|
|||||||
counterBadge.textContent = `${filteredUnits.length} Unit Ready`;
|
counterBadge.textContent = `${filteredUnits.length} Unit Ready`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset input filter unit realtime
|
||||||
|
const vSearch = document.getElementById(`${prefix}VehicleSearch`);
|
||||||
|
if (vSearch) vSearch.value = '';
|
||||||
|
const vClear = document.getElementById(`clear${prefix === 'add' ? 'Add' : 'Edit'}VehicleSearchBtn`);
|
||||||
|
if (vClear) vClear.classList.add('hidden');
|
||||||
|
|
||||||
// Render option heavy equipment
|
// Render option heavy equipment
|
||||||
vehicleSelect.innerHTML = '';
|
vehicleSelect.innerHTML = '';
|
||||||
const defaultPrompt = document.createElement('option');
|
const defaultPrompt = document.createElement('option');
|
||||||
@@ -1654,6 +1688,58 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter Realtime Dropdown Heavy Equipment pada Timesheet berdasarkan Ketikan
|
||||||
|
*/
|
||||||
|
function filterTimesheetVehicleOptions(query, prefix) {
|
||||||
|
const select = document.getElementById(`${prefix}VehicleSelect`);
|
||||||
|
const clearBtn = document.getElementById(`clear${prefix === 'add' ? 'Add' : 'Edit'}VehicleSearchBtn`);
|
||||||
|
const badge = document.getElementById(`${prefix}UnitCounterBadge`);
|
||||||
|
if (!select) return;
|
||||||
|
|
||||||
|
const q = (query || '').trim().toLowerCase();
|
||||||
|
if (clearBtn) {
|
||||||
|
clearBtn.classList.toggle('hidden', !q);
|
||||||
|
}
|
||||||
|
|
||||||
|
let visibleCount = 0;
|
||||||
|
let firstMatch = null;
|
||||||
|
|
||||||
|
Array.from(select.options).forEach(opt => {
|
||||||
|
if (!opt.value) {
|
||||||
|
opt.hidden = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const code = (opt.getAttribute('data-code') || '').toLowerCase();
|
||||||
|
const brand = (opt.getAttribute('data-brand') || '').toLowerCase();
|
||||||
|
const loc = (opt.getAttribute('data-location') || '').toLowerCase();
|
||||||
|
const text = opt.textContent.toLowerCase();
|
||||||
|
|
||||||
|
const match = text.includes(q) || code.includes(q) || brand.includes(q) || loc.includes(q);
|
||||||
|
opt.hidden = !match;
|
||||||
|
if (match) {
|
||||||
|
visibleCount++;
|
||||||
|
if (!firstMatch) firstMatch = opt;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (badge) {
|
||||||
|
badge.classList.remove('hidden');
|
||||||
|
badge.textContent = q ? `${visibleCount} Unit Cocok` : `${visibleCount} Unit Ready`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (q && visibleCount === 1 && firstMatch) {
|
||||||
|
select.value = firstMatch.value;
|
||||||
|
onVehicleSelectChanged(select, prefix);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearTimesheetVehicleFilter(prefix) {
|
||||||
|
const input = document.getElementById(`${prefix}VehicleSearch`);
|
||||||
|
if (input) input.value = '';
|
||||||
|
filterTimesheetVehicleOptions('', prefix);
|
||||||
|
}
|
||||||
|
|
||||||
// 7. Handler saat Heavy Equipment Dipilih
|
// 7. Handler saat Heavy Equipment Dipilih
|
||||||
function onVehicleSelectChanged(selectEl, prefix) {
|
function onVehicleSelectChanged(selectEl, prefix) {
|
||||||
const opt = selectEl.options[selectEl.selectedIndex];
|
const opt = selectEl.options[selectEl.selectedIndex];
|
||||||
|
|||||||
@@ -68,8 +68,21 @@
|
|||||||
<div>
|
<div>
|
||||||
<label for="origin_location" class="block text-xs font-bold text-slate-700 mb-1.5 flex items-center justify-between">
|
<label for="origin_location" class="block text-xs font-bold text-slate-700 mb-1.5 flex items-center justify-between">
|
||||||
<span>Lokasi Awal (Asal Unit) <span class="text-rose-500">*</span></span>
|
<span>Lokasi Awal (Asal Unit) <span class="text-rose-500">*</span></span>
|
||||||
<span class="text-[10px] text-emerald-700 font-semibold">Filter Berdasarkan Posisi</span>
|
<span class="text-[10px] text-emerald-700 font-semibold">Bisa ketik / filter</span>
|
||||||
</label>
|
</label>
|
||||||
|
<div class="space-y-1.5">
|
||||||
|
<div class="relative">
|
||||||
|
<i class="fa-solid fa-magnifying-glass absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 text-xs"></i>
|
||||||
|
<input type="text"
|
||||||
|
id="originLocationSearch"
|
||||||
|
placeholder="Ketik untuk memfilter pilihan lokasi asal..."
|
||||||
|
oninput="filterOriginLocationSelect(this.value)"
|
||||||
|
autocomplete="off"
|
||||||
|
class="w-full pl-9 pr-7 py-2 text-xs rounded-xl border border-slate-200 bg-slate-50 focus:bg-white focus:outline-none focus:border-[#1b5e20] focus:ring-1 focus:ring-[#1b5e20] transition font-medium">
|
||||||
|
<button type="button" onclick="clearOriginLocationFilter()" id="clearOriginLocationFilterBtn" class="hidden absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 cursor-pointer">
|
||||||
|
<i class="fa-solid fa-xmark text-xs"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<i class="fa-solid fa-map-pin absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 text-xs"></i>
|
<i class="fa-solid fa-map-pin absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 text-xs"></i>
|
||||||
<select name="from_location"
|
<select name="from_location"
|
||||||
@@ -90,7 +103,8 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-[10px] text-slate-400 mt-1">Memilih lokasi awal akan memfilter unit alat berat yang berada di titik tersebut.</p>
|
</div>
|
||||||
|
<p class="text-[10px] text-slate-400 mt-1">Ketik nama lokasi atau pilih dari daftar untuk memfilter unit.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- PILIH ALAT BERAT YANG AKAN DIPINDAHKAN -->
|
<!-- PILIH ALAT BERAT YANG AKAN DIPINDAHKAN -->
|
||||||
@@ -99,6 +113,19 @@
|
|||||||
<span>Unit Alat Berat yang Dipindahkan <span class="text-rose-500">*</span></span>
|
<span>Unit Alat Berat yang Dipindahkan <span class="text-rose-500">*</span></span>
|
||||||
<span id="unitCounterBadge" class="text-[10px] font-semibold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded border border-emerald-200 hidden"></span>
|
<span id="unitCounterBadge" class="text-[10px] font-semibold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded border border-emerald-200 hidden"></span>
|
||||||
</label>
|
</label>
|
||||||
|
<div class="space-y-1.5">
|
||||||
|
<div class="relative">
|
||||||
|
<i class="fa-solid fa-magnifying-glass absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 text-xs"></i>
|
||||||
|
<input type="text"
|
||||||
|
id="heavyUnitSearch"
|
||||||
|
placeholder="Ketik kode / merek untuk filter unit..."
|
||||||
|
oninput="filterHeavyUnitOptions(this.value)"
|
||||||
|
autocomplete="off"
|
||||||
|
class="w-full pl-9 pr-7 py-2 text-xs rounded-xl border border-slate-200 bg-slate-50 focus:bg-white focus:outline-none focus:border-[#1b5e20] focus:ring-1 focus:ring-[#1b5e20] transition font-medium">
|
||||||
|
<button type="button" onclick="clearHeavyUnitFilter()" id="clearHeavyUnitFilterBtn" class="hidden absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 cursor-pointer">
|
||||||
|
<i class="fa-solid fa-xmark text-xs"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<select name="vehicle_id"
|
<select name="vehicle_id"
|
||||||
id="vehicle_id"
|
id="vehicle_id"
|
||||||
required
|
required
|
||||||
@@ -120,6 +147,7 @@
|
|||||||
</option>
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
@error('vehicle_id')
|
@error('vehicle_id')
|
||||||
<p class="text-rose-500 text-[11px] font-semibold mt-1">{{ $message }}</p>
|
<p class="text-rose-500 text-[11px] font-semibold mt-1">{{ $message }}</p>
|
||||||
@enderror
|
@enderror
|
||||||
@@ -873,6 +901,11 @@
|
|||||||
// Kosongkan options
|
// Kosongkan options
|
||||||
unitSelect.innerHTML = '';
|
unitSelect.innerHTML = '';
|
||||||
|
|
||||||
|
const searchInput = document.getElementById('heavyUnitSearch');
|
||||||
|
if (searchInput) searchInput.value = '';
|
||||||
|
const searchClear = document.getElementById('clearHeavyUnitFilterBtn');
|
||||||
|
if (searchClear) searchClear.classList.add('hidden');
|
||||||
|
|
||||||
if (!selectedLocation) {
|
if (!selectedLocation) {
|
||||||
const defaultOpt = document.createElement('option');
|
const defaultOpt = document.createElement('option');
|
||||||
defaultOpt.value = '';
|
defaultOpt.value = '';
|
||||||
@@ -1020,5 +1053,103 @@
|
|||||||
text.innerHTML = `Armada luar (<strong>${displayName}</strong>) diberangkatkan dari <strong>${displayOrigin}</strong> → Menjemput alat berat di <strong>${originLoc}</strong> → Mengantarkannya ke tujuan <strong>${destLoc}</strong>.`;
|
text.innerHTML = `Armada luar (<strong>${displayName}</strong>) diberangkatkan dari <strong>${displayOrigin}</strong> → Menjemput alat berat di <strong>${originLoc}</strong> → Mengantarkannya ke tujuan <strong>${destLoc}</strong>.`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter Realtime Dropdown Lokasi Awal berdasarkan Ketikan
|
||||||
|
*/
|
||||||
|
function filterOriginLocationSelect(query) {
|
||||||
|
const select = document.getElementById('origin_location');
|
||||||
|
const clearBtn = document.getElementById('clearOriginLocationFilterBtn');
|
||||||
|
if (!select) return;
|
||||||
|
|
||||||
|
const q = (query || '').trim().toLowerCase();
|
||||||
|
if (clearBtn) {
|
||||||
|
clearBtn.classList.toggle('hidden', !q);
|
||||||
|
}
|
||||||
|
|
||||||
|
let visibleCount = 0;
|
||||||
|
let firstMatch = null;
|
||||||
|
|
||||||
|
Array.from(select.options).forEach(opt => {
|
||||||
|
if (!opt.value) {
|
||||||
|
opt.hidden = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (opt.value === 'ALL') {
|
||||||
|
opt.hidden = q.length > 0 && !opt.textContent.toLowerCase().includes(q);
|
||||||
|
if (!opt.hidden && !firstMatch) firstMatch = opt;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const match = opt.textContent.toLowerCase().includes(q) || opt.value.toLowerCase().includes(q);
|
||||||
|
opt.hidden = !match;
|
||||||
|
if (match) {
|
||||||
|
visibleCount++;
|
||||||
|
if (!firstMatch) firstMatch = opt;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (q && visibleCount === 1 && firstMatch) {
|
||||||
|
select.value = firstMatch.value;
|
||||||
|
onOriginLocationChanged(firstMatch.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearOriginLocationFilter() {
|
||||||
|
const input = document.getElementById('originLocationSearch');
|
||||||
|
if (input) input.value = '';
|
||||||
|
filterOriginLocationSelect('');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter Realtime Dropdown Unit Alat Berat berdasarkan Ketikan Kode / Merek
|
||||||
|
*/
|
||||||
|
function filterHeavyUnitOptions(query) {
|
||||||
|
const select = document.getElementById('vehicle_id');
|
||||||
|
const clearBtn = document.getElementById('clearHeavyUnitFilterBtn');
|
||||||
|
const badge = document.getElementById('unitCounterBadge');
|
||||||
|
if (!select) return;
|
||||||
|
|
||||||
|
const q = (query || '').trim().toLowerCase();
|
||||||
|
if (clearBtn) {
|
||||||
|
clearBtn.classList.toggle('hidden', !q);
|
||||||
|
}
|
||||||
|
|
||||||
|
let visibleCount = 0;
|
||||||
|
let firstMatch = null;
|
||||||
|
|
||||||
|
Array.from(select.options).forEach(opt => {
|
||||||
|
if (!opt.value) {
|
||||||
|
opt.hidden = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const code = (opt.getAttribute('data-code') || '').toLowerCase();
|
||||||
|
const brand = (opt.getAttribute('data-brand') || '').toLowerCase();
|
||||||
|
const cat = (opt.getAttribute('data-category') || '').toLowerCase();
|
||||||
|
const text = opt.textContent.toLowerCase();
|
||||||
|
|
||||||
|
const match = text.includes(q) || code.includes(q) || brand.includes(q) || cat.includes(q);
|
||||||
|
opt.hidden = !match;
|
||||||
|
if (match) {
|
||||||
|
visibleCount++;
|
||||||
|
if (!firstMatch) firstMatch = opt;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (badge) {
|
||||||
|
badge.classList.remove('hidden');
|
||||||
|
badge.textContent = q ? `${visibleCount} Unit Cocok` : `${visibleCount} Unit Tersedia`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (q && visibleCount === 1 && firstMatch) {
|
||||||
|
select.value = firstMatch.value;
|
||||||
|
onHeavyUnitSelected(select);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearHeavyUnitFilter() {
|
||||||
|
const input = document.getElementById('heavyUnitSearch');
|
||||||
|
if (input) input.value = '';
|
||||||
|
filterHeavyUnitOptions('');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -654,6 +654,12 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</datalist>
|
</datalist>
|
||||||
|
|
||||||
|
<datalist id="divisionsDatalist">
|
||||||
|
@foreach($availableDivisions ?? [] as $div)
|
||||||
|
<option value="{{ $div }}">{{ $div }}</option>
|
||||||
|
@endforeach
|
||||||
|
</datalist>
|
||||||
|
|
||||||
<!-- ========================================================================= -->
|
<!-- ========================================================================= -->
|
||||||
<!-- MODAL: TAMBAH UNIT ALAT BERAT (HEAVY EQUIPMENT) -->
|
<!-- MODAL: TAMBAH UNIT ALAT BERAT (HEAVY EQUIPMENT) -->
|
||||||
<!-- ========================================================================= -->
|
<!-- ========================================================================= -->
|
||||||
@@ -826,14 +832,21 @@
|
|||||||
<!-- Baris 7: Divisi & Kepemilikan Aset -->
|
<!-- Baris 7: Divisi & Kepemilikan Aset -->
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3.5">
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3.5">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-bold text-slate-800 mb-1">Divisi Penanggung Jawab</label>
|
<label class="block text-xs font-bold text-slate-800 mb-1 flex items-center justify-between">
|
||||||
<select name="division"
|
<span>Divisi Penanggung Jawab</span>
|
||||||
class="w-full text-xs px-3.5 py-2.5 rounded-xl border border-slate-200 bg-white text-slate-800 focus:outline-none focus:border-[#1b5e20] focus:ring-2 focus:ring-[#1b5e20]/10 transition font-medium">
|
<span class="text-[10px] text-emerald-700 font-semibold">Bisa ketik / filter</span>
|
||||||
<option value="">-- Pilih Divisi Penanggung Jawab --</option>
|
</label>
|
||||||
@foreach($availableDivisions as $div)
|
<div class="relative">
|
||||||
<option value="{{ $div }}" {{ old('division') === $div ? 'selected' : '' }}>{{ $div }}</option>
|
<i class="fa-solid fa-building absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 text-xs"></i>
|
||||||
@endforeach
|
<input type="text"
|
||||||
</select>
|
name="division"
|
||||||
|
id="addDivision"
|
||||||
|
list="divisionsDatalist"
|
||||||
|
value="{{ old('division') }}"
|
||||||
|
placeholder="Ketik atau pilih divisi..."
|
||||||
|
autocomplete="off"
|
||||||
|
class="w-full pl-9 pr-3.5 py-2.5 text-xs rounded-xl border border-slate-200 bg-white text-slate-800 focus:outline-none focus:border-[#1b5e20] focus:ring-2 focus:ring-[#1b5e20]/10 transition font-medium">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-bold text-slate-800 mb-1">Kepemilikan Aset (Owner)</label>
|
<label class="block text-xs font-bold text-slate-800 mb-1">Kepemilikan Aset (Owner)</label>
|
||||||
@@ -894,6 +907,7 @@
|
|||||||
<form id="editVehicleForm" action="" method="POST" enctype="multipart/form-data" class="space-y-4">
|
<form id="editVehicleForm" action="" method="POST" enctype="multipart/form-data" class="space-y-4">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="category" value="unit_support">
|
<input type="hidden" name="category" value="unit_support">
|
||||||
|
<input type="hidden" name="brand_type" id="editBrandType" value="">
|
||||||
|
|
||||||
<!-- Foto Unit -->
|
<!-- Foto Unit -->
|
||||||
<div>
|
<div>
|
||||||
@@ -1029,14 +1043,20 @@
|
|||||||
<!-- Baris 7: Divisi & Kepemilikan -->
|
<!-- Baris 7: Divisi & Kepemilikan -->
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3.5">
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3.5">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-bold text-slate-800 mb-1">Divisi Penanggung Jawab</label>
|
<label class="block text-xs font-bold text-slate-800 mb-1 flex items-center justify-between">
|
||||||
<select name="division" id="editDivision"
|
<span>Divisi Penanggung Jawab</span>
|
||||||
class="w-full text-xs px-3.5 py-2.5 rounded-xl border border-slate-200 bg-white text-slate-800 focus:outline-none focus:border-[#1b5e20] focus:ring-2 focus:ring-[#1b5e20]/10 transition font-medium">
|
<span class="text-[10px] text-emerald-700 font-semibold">Bisa ketik / filter</span>
|
||||||
<option value="">-- Pilih Divisi Penanggung Jawab --</option>
|
</label>
|
||||||
@foreach($availableDivisions as $div)
|
<div class="relative">
|
||||||
<option value="{{ $div }}">{{ $div }}</option>
|
<i class="fa-solid fa-building absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 text-xs"></i>
|
||||||
@endforeach
|
<input type="text"
|
||||||
</select>
|
name="division"
|
||||||
|
id="editDivision"
|
||||||
|
list="divisionsDatalist"
|
||||||
|
placeholder="Ketik atau pilih divisi..."
|
||||||
|
autocomplete="off"
|
||||||
|
class="w-full pl-9 pr-3.5 py-2.5 text-xs rounded-xl border border-slate-200 bg-white text-slate-800 focus:outline-none focus:border-[#1b5e20] focus:ring-2 focus:ring-[#1b5e20]/10 transition font-medium">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-bold text-slate-800 mb-1">Kepemilikan Aset (Owner)</label>
|
<label class="block text-xs font-bold text-slate-800 mb-1">Kepemilikan Aset (Owner)</label>
|
||||||
@@ -1561,8 +1581,11 @@
|
|||||||
|
|
||||||
function openEditModal(v) {
|
function openEditModal(v) {
|
||||||
document.getElementById('editVehicleModal').classList.remove('hidden');
|
document.getElementById('editVehicleModal').classList.remove('hidden');
|
||||||
document.getElementById('editVehicleForm').action = `/qma/vehicles/${v.id}`;
|
document.getElementById('editVehicleForm').action = "{{ url('qma/vehicles') }}/" + v.id;
|
||||||
document.getElementById('editCode').value = v.code || '';
|
document.getElementById('editCode').value = v.code || '';
|
||||||
|
if (document.getElementById('editBrandType')) {
|
||||||
|
document.getElementById('editBrandType').value = v.brand_type || '';
|
||||||
|
}
|
||||||
currentEditVehicleCode = (v.code || '').trim().toUpperCase();
|
currentEditVehicleCode = (v.code || '').trim().toUpperCase();
|
||||||
hideEditCodeError();
|
hideEditCodeError();
|
||||||
|
|
||||||
@@ -1606,26 +1629,9 @@
|
|||||||
document.getElementById('editFuelConsumption').value = v.fuel_consumption || '';
|
document.getElementById('editFuelConsumption').value = v.fuel_consumption || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const divSelect = document.getElementById('editDivision');
|
const divInput = document.getElementById('editDivision');
|
||||||
if (divSelect) {
|
if (divInput) {
|
||||||
if (v.division) {
|
divInput.value = v.division || '';
|
||||||
let found = false;
|
|
||||||
for (let i = 0; i < divSelect.options.length; i++) {
|
|
||||||
if (divSelect.options[i].value === v.division) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found) {
|
|
||||||
const newOpt = document.createElement('option');
|
|
||||||
newOpt.value = v.division;
|
|
||||||
newOpt.textContent = v.division;
|
|
||||||
divSelect.appendChild(newOpt);
|
|
||||||
}
|
|
||||||
divSelect.value = v.division;
|
|
||||||
} else {
|
|
||||||
divSelect.value = '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const editPhotoPreview = document.getElementById('editPhotoPreview');
|
const editPhotoPreview = document.getElementById('editPhotoPreview');
|
||||||
|
|||||||
@@ -645,6 +645,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-xs font-bold text-slate-700 mb-1.5 flex items-center justify-between">
|
||||||
|
<span>Divisi Penanggung Jawab</span>
|
||||||
|
<span class="text-[10px] text-emerald-700 font-semibold">Bisa ketik / filter</span>
|
||||||
|
</label>
|
||||||
|
<input type="text" name="division" id="edit_division" list="divisionsDatalistSupportUnits" placeholder="Ketik atau pilih divisi..." class="w-full text-xs px-3.5 py-2 rounded-xl border border-slate-200 bg-white text-slate-800 font-medium focus:outline-none focus:border-emerald-600">
|
||||||
|
<datalist id="divisionsDatalistSupportUnits">
|
||||||
|
@foreach($availableDivisions ?? [] as $div)
|
||||||
|
<option value="{{ $div }}">{{ $div }}</option>
|
||||||
|
@endforeach
|
||||||
|
</datalist>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-2 gap-3">
|
<div class="grid grid-cols-2 gap-3">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-bold text-slate-700 mb-1.5">Dokumen SILO</label>
|
<label class="block text-xs font-bold text-slate-700 mb-1.5">Dokumen SILO</label>
|
||||||
@@ -1161,6 +1174,9 @@
|
|||||||
}
|
}
|
||||||
document.getElementById('edit_silo').value = unit.silo_document || '';
|
document.getElementById('edit_silo').value = unit.silo_document || '';
|
||||||
document.getElementById('edit_kir').value = unit.kir_document || '';
|
document.getElementById('edit_kir').value = unit.kir_document || '';
|
||||||
|
if (document.getElementById('edit_division')) {
|
||||||
|
document.getElementById('edit_division').value = unit.division || '';
|
||||||
|
}
|
||||||
|
|
||||||
const editPhotoPreview = document.getElementById('editPhotoPreview');
|
const editPhotoPreview = document.getElementById('editPhotoPreview');
|
||||||
const editPhotoPlaceholder = document.getElementById('editPhotoPlaceholder');
|
const editPhotoPlaceholder = document.getElementById('editPhotoPlaceholder');
|
||||||
|
|||||||
+1
-1
@@ -88,7 +88,7 @@ Route::middleware('auth')->group(function () {
|
|||||||
Route::post('/vehicles/unit-support/{id}/units', [VehicleController::class, 'storeSupportUnit'])->name('vehicles.support.units.store')->middleware('permission:qma.vehicles.create');
|
Route::post('/vehicles/unit-support/{id}/units', [VehicleController::class, 'storeSupportUnit'])->name('vehicles.support.units.store')->middleware('permission:qma.vehicles.create');
|
||||||
|
|
||||||
Route::post('/vehicles', [VehicleController::class, 'store'])->name('vehicles.store')->middleware('permission:qma.vehicles.create');
|
Route::post('/vehicles', [VehicleController::class, 'store'])->name('vehicles.store')->middleware('permission:qma.vehicles.create');
|
||||||
Route::post('/vehicles/{id}', [VehicleController::class, 'update'])->name('vehicles.update')->middleware('permission:qma.vehicles.edit');
|
Route::match(['PUT', 'POST'], '/vehicles/{id}', [VehicleController::class, 'update'])->name('vehicles.update')->middleware('permission:qma.vehicles.edit');
|
||||||
Route::delete('/vehicles/{id}', [VehicleController::class, 'destroy'])->name('vehicles.destroy')->middleware('permission:qma.vehicles.delete');
|
Route::delete('/vehicles/{id}', [VehicleController::class, 'destroy'])->name('vehicles.destroy')->middleware('permission:qma.vehicles.delete');
|
||||||
Route::get('/activity-log', [ActivityLogController::class, 'index'])->name('activity.log')->middleware('permission:qma.logs.view');
|
Route::get('/activity-log', [ActivityLogController::class, 'index'])->name('activity.log')->middleware('permission:qma.logs.view');
|
||||||
Route::get('/activity-log/support-timesheet', [SupportTimesheetController::class, 'index'])->name('activity.support_timesheet')->middleware('permission:qma.logs.view');
|
Route::get('/activity-log/support-timesheet', [SupportTimesheetController::class, 'index'])->name('activity.support_timesheet')->middleware('permission:qma.logs.view');
|
||||||
|
|||||||
@@ -184,4 +184,31 @@ class QmaHeavyEquipmentThreeLevelNavigationTest extends TestCase
|
|||||||
$response->assertSee('EX-01');
|
$response->assertSee('EX-01');
|
||||||
$response->assertSee('Power House');
|
$response->assertSee('Power House');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Admin QMA dapat mengedit data unit alat berat termasuk divisi penanggung jawab tanpa mereset atau menambah unit baru.
|
||||||
|
*/
|
||||||
|
public function test_qma_admin_can_update_unit_support_division_and_details(): void
|
||||||
|
{
|
||||||
|
$unit = Vehicle::where('code', 'DT-01')->firstOrFail();
|
||||||
|
|
||||||
|
$response = $this->actingAs($this->qmaAdmin)->post("/qma/vehicles/{$unit->id}", [
|
||||||
|
'code' => 'DT-01',
|
||||||
|
'category' => 'unit_support',
|
||||||
|
'operational_group' => 'HAULING',
|
||||||
|
'unit_type' => 'DUMP TRUCK',
|
||||||
|
'division' => 'Civil & Dam Construction',
|
||||||
|
'status' => 'Operation',
|
||||||
|
'location' => 'Main Dam',
|
||||||
|
'site_status' => 'inside_site',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$response->assertSessionHasNoErrors();
|
||||||
|
$response->assertRedirect();
|
||||||
|
|
||||||
|
$unit->refresh();
|
||||||
|
$this->assertEquals('Civil & Dam Construction', $unit->division);
|
||||||
|
$this->assertEquals('HAULING', $unit->operational_group);
|
||||||
|
$this->assertEquals('DUMP TRUCK', $unit->unit_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user