diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c157b6a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,20 @@ +.git +.github +.idea +.vscode +node_modules +npm-debug.log +yarn-error.log +storage/logs/*.log +storage/framework/cache/* +storage/framework/sessions/* +storage/framework/views/* +bootstrap/cache/* +.env +.env.backup +.env.production +.phpunit.result.cache +tests +Homestead.json +Homestead.yaml +Thumbs.db diff --git a/.env.docker.example b/.env.docker.example new file mode 100644 index 0000000..0e1129b --- /dev/null +++ b/.env.docker.example @@ -0,0 +1,61 @@ +# ============================================================================= +# ENVIRONMENT CONFIGURATION FOR DOCKER DEPLOYMENT +# SISTEM RKM - PT KERINCI MERANGIN HIDRO (PLTA MERANGIN 350 MW) +# ============================================================================= + +APP_NAME="Sistem RKM - PT Kerinci Merangin Hidro" +APP_ENV=production +APP_KEY= +APP_DEBUG=false +APP_URL=http://localhost +APP_PORT=80 + +APP_LOCALE=id +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=id_ID + +LOG_CHANNEL=stack +LOG_STACK=single +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=warning + +# ----------------------------------------------------------------------------- +# DATABASE CONFIGURATION (DOCKER MYSQL 8.0) +# ----------------------------------------------------------------------------- +DB_CONNECTION=mysql +DB_HOST=db +DB_PORT=3306 +DB_DATABASE=rkm_kmh +DB_USERNAME=rkm_user +DB_PASSWORD=rkm_secret_password +DB_ROOT_PASSWORD=root_secret_password +FORWARD_DB_PORT=3306 + +# Flag to seed master data on first launch (set to true on initial deploy) +RUN_SEEDER=false + +# ----------------------------------------------------------------------------- +# SESSION & CACHE CONFIGURATION +# ----------------------------------------------------------------------------- +SESSION_DRIVER=database +SESSION_LIFETIME=120 +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null +SESSION_SECURE_COOKIE=false + +BROADCAST_CONNECTION=log +FILESYSTEM_DISK=local +QUEUE_CONNECTION=database + +# ----------------------------------------------------------------------------- +# MAIL CONFIGURATION +# ----------------------------------------------------------------------------- +MAIL_MAILER=log +MAIL_SCHEME=null +MAIL_HOST=127.0.0.1 +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_FROM_ADDRESS="no-reply@meranginhidro.com" +MAIL_FROM_NAME="${APP_NAME}" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b426544 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,85 @@ +# ========================================================================= +# STAGE 1: Frontend Asset Compilation via Vite & Node.js +# ========================================================================= +FROM node:22-alpine AS frontend-builder + +WORKDIR /app + +# Copy dependency manifests +COPY package.json package-lock.json* ./ + +# Install dependencies +RUN npm ci || npm install + +# Copy source assets needed for compilation +COPY vite.config.js ./ +COPY resources/ ./resources/ + +# Compile production assets into /app/public/build +RUN npm run build + +# ========================================================================= +# STAGE 2: PHP 8.2-FPM Alpine Production Runtime +# ========================================================================= +FROM php:8.2-fpm-alpine AS app + +# Set working directory +WORKDIR /var/www + +# Install system dependencies & build tools +RUN apk add --no-cache \ + curl \ + netcat-openbsd \ + libpng-dev \ + libjpeg-turbo-dev \ + freetype-dev \ + libzip-dev \ + oniguruma-dev \ + icu-dev \ + mysql-client + +# Configure and install PHP extensions +RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) \ + pdo_mysql \ + mbstring \ + exif \ + pcntl \ + bcmath \ + gd \ + zip \ + intl \ + opcache + +# Install Composer +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer + +# Copy PHP & OPcache custom configs +COPY docker/php/local.ini /usr/local/etc/php/conf.d/local.ini +COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini + +# Copy entrypoint script +COPY docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh +RUN chmod +x /usr/local/bin/docker-entrypoint.sh + +# Copy application source code +COPY . /var/www + +# Copy compiled frontend assets from Stage 1 (Overrides public/build) +COPY --from=frontend-builder /app/public/build /var/www/public/build + +# Install Composer production dependencies +RUN composer install --no-dev --optimize-autoloader --no-interaction + +# Set correct permissions for Laravel directories +RUN chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache \ + && chmod -R 775 /var/www/storage /var/www/bootstrap/cache + +# Expose FastCGI port +EXPOSE 9000 + +# Set entrypoint +ENTRYPOINT ["docker-entrypoint.sh"] + +# Start PHP-FPM +CMD ["php-fpm"] diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index dba6077..500d7ef 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -72,11 +72,13 @@ class LoginController extends Controller private function redirectBasedOnRole($user): RedirectResponse { return match ($user->role) { + 'super_admin', 'superadmin', 'admin' => redirect()->route('superadmin.dashboard'), 'hse_admin' => redirect()->route('hse.dashboard'), 'qma_admin' => redirect()->route('qma.dashboard'), 'pg_admin' => redirect()->route('pg.dashboard'), 'gate_officer' => redirect()->route('pg.gate.inspection'), - default => redirect()->route('qma.dashboard'), + 'employee' => redirect()->route('employee.dashboard'), + default => redirect()->route('superadmin.dashboard'), }; } } diff --git a/app/Http/Controllers/Employee/DashboardController.php b/app/Http/Controllers/Employee/DashboardController.php new file mode 100644 index 0000000..a0a83e8 --- /dev/null +++ b/app/Http/Controllers/Employee/DashboardController.php @@ -0,0 +1,23 @@ +user()->employee; + $totalSupport = Vehicle::unitSupports()->count(); + $totalLv = Vehicle::lightVehicles()->count(); + + return view('employee.dashboard', compact('employee', 'totalSupport', 'totalLv')); + } +} diff --git a/app/Http/Controllers/Hse/EmployeeController.php b/app/Http/Controllers/Hse/EmployeeController.php index 4ade488..ac047c4 100644 --- a/app/Http/Controllers/Hse/EmployeeController.php +++ b/app/Http/Controllers/Hse/EmployeeController.php @@ -4,8 +4,10 @@ namespace App\Http\Controllers\Hse; use App\Http\Controllers\Controller; use App\Models\Employee; +use App\Models\User; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Hash; use Illuminate\View\View; class EmployeeController extends Controller @@ -36,9 +38,9 @@ class EmployeeController extends Controller $simperLogs = Employee::where('is_operator', true) ->orderByRaw("CASE WHEN simper_expired_at IS NULL THEN 1 - WHEN simper_expired_at < '{$today}' THEN 0 + WHEN simper_expired_at < ? THEN 0 ELSE 2 - END ASC, simper_expired_at ASC") + END ASC, simper_expired_at ASC", [$today]) ->take(5) ->get(); @@ -112,80 +114,38 @@ class EmployeeController extends Controller } } - $employees = $query->orderBy('name')->get(); + $employees = $query->orderBy('name')->paginate(20)->withQueryString(); return view('hse.employees_index', compact('employees')); } /** - * Simpan data karyawan baru beserta izin SIMPER (Form modal gambar 3). + * Pendaftaran master karyawan baru dialihkan ke Super Admin. */ public function store(Request $request): RedirectResponse { - $validated = $request->validate([ - 'nik' => ['required', 'string', 'max:50', 'unique:employees,nik'], - 'name' => ['required', 'string', 'max:100'], - 'unit_kerja' => ['required', 'string'], - 'division' => ['required', 'string'], - 'position' => ['required', 'string'], - 'is_operator' => ['required', 'in:1,0'], - 'simper_expired_at' => ['nullable', 'date'], - ], [ - 'nik.required' => 'NIK wajib diisi.', - 'nik.unique' => 'NIK sudah terdaftar dalam sistem.', - 'name.required' => 'Nama karyawan wajib diisi.', - 'unit_kerja.required' => 'Unit kerja wajib dipilih.', - 'division.required' => 'Divisi wajib dipilih.', - 'position.required' => 'Posisi / Jabatan wajib diisi.', - 'is_operator.required' => 'Pilih apakah karyawan berstatus Operator / Driver.', - ]); - - $isOperator = (bool) $validated['is_operator']; - $simperExpiredAt = $isOperator ? ($validated['simper_expired_at'] ?? null) : null; - - Employee::create([ - 'nik' => $validated['nik'], - 'name' => $validated['name'], - 'unit_kerja' => $validated['unit_kerja'], - 'division' => $validated['division'], - 'position' => $validated['position'], - 'is_operator' => $isOperator, - 'simper_expired_at' => $simperExpiredAt, - ]); - - return back()->with('success', "Data karyawan {$validated['name']} berhasil ditambahkan."); + return back()->with('error', 'Pendaftaran master data karyawan baru hanya dapat dilakukan oleh Super Admin melalui menu Manajemen Akun.'); } /** - * Perpanjang atau perbarui data karyawan & SIMPER. + * Perpanjang atau perbarui status driver & masa berlaku SIMPER karyawan. + * Master data profil karyawan dikelola terpusat oleh Super Admin. */ public function update(Request $request, int $id): RedirectResponse { $employee = Employee::findOrFail($id); $validated = $request->validate([ - 'nik' => ['sometimes', 'required', 'string', 'max:50', 'unique:employees,nik,' . $employee->id], - 'name' => ['sometimes', 'required', 'string', 'max:100'], - 'unit_kerja' => ['sometimes', 'required', 'string'], - 'division' => ['sometimes', 'required', 'string'], - 'position' => ['sometimes', 'required', 'string'], 'is_operator' => ['required', 'in:1,0'], 'simper_expired_at' => ['nullable', 'date'], ], [ - 'nik.unique' => 'NIK sudah digunakan oleh karyawan lain.', - 'name.required' => 'Nama lengkap wajib diisi.', 'is_operator.required' => 'Status driver wajib dipilih.', ]); $isOperator = (bool) $validated['is_operator']; - $simperExpiredAt = $isOperator ? ($validated['simper_expired_at'] ?? $employee->simper_expired_at) : null; + $simperExpiredAt = $isOperator ? ($validated['simper_expired_at'] ?? null) : null; $employee->update([ - 'nik' => $validated['nik'] ?? $employee->nik, - 'name' => $validated['name'] ?? $employee->name, - 'unit_kerja' => $validated['unit_kerja'] ?? $employee->unit_kerja, - 'division' => $validated['division'] ?? $employee->division, - 'position' => $validated['position'] ?? $employee->position, 'is_operator' => $isOperator, 'simper_expired_at' => $simperExpiredAt, ]); diff --git a/app/Http/Controllers/P2h/P2hFormController.php b/app/Http/Controllers/P2h/P2hFormController.php new file mode 100644 index 0000000..d3cda40 --- /dev/null +++ b/app/Http/Controllers/P2h/P2hFormController.php @@ -0,0 +1,232 @@ +where(function ($q) { + $q->whereNotNull('parent_id') + ->orWhere(function ($sub) { + $sub->whereNull('parent_id')->whereDoesntHave('units'); + }); + }); + + if ($request->filled('search')) { + $search = trim($request->input('search')); + $query->where(function ($q) use ($search) { + $q->where('code', 'like', "%{$search}%") + ->orWhere('brand_type', 'like', "%{$search}%") + ->orWhere('unit_category', 'like', "%{$search}%") + ->orWhere('location', 'like', "%{$search}%"); + }); + } + + if ($request->filled('unit_category')) { + $query->where('unit_category', $request->input('unit_category')); + } + + $vehicles = $query->with('p2hTemplate')->orderBy('code')->paginate(32)->withQueryString(); + $categories = P2hTemplate::orderBy('name')->pluck('name'); + + $user = Auth::user(); + $employee = $user ? $user->employee : null; + + return view('p2h.index', compact('vehicles', 'categories', 'employee')); + } + + /** + * Tampilkan formulir pengisian P2H untuk unit support tertentu. + */ + public function show(Request $request, string $code): View|RedirectResponse + { + $vehicle = Vehicle::where('code', $code) + ->where('category', 'unit_support') + ->firstOrFail(); + + $user = Auth::user(); + $employee = $user->employee; + + // Validasi identitas operator di sistem HSE + $simperError = null; + if ($user->isQmaAdmin() || $user->isSuperAdmin()) { + $simperError = "Anda saat ini login sebagai Admin QMA. Formulir P2H lapangan dikhususkan untuk diisi langsung oleh Operator pemegang lisensi SIMPER aktif saat pra-operasi unit. Sebagai Admin QMA, wewenang Anda adalah memeriksa, memverifikasi, dan menyetujui checksheet yang telah disubmit operator melalui Menu QMA."; + } elseif (!$employee) { + $simperError = "Akun login Anda ({$user->name}) belum ditautkan dengan data Karyawan di database HSE. Silakan hubungi Divisi HSE."; + } elseif (!$employee->is_operator) { + $simperError = "Karyawan atas nama {$employee->name} (NIK: {$employee->nik} - {$employee->division}) terdaftar sebagai BUKAN OPERATOR/DRIVER dan tidak memiliki izin mengoperasikan alat berat. Silakan hubungi Divisi HSE."; + } elseif (!$employee->hasValidSimper()) { + $expDate = $employee->simper_expired_at ? $employee->simper_expired_at->format('d/m/Y') : 'Belum Terdaftar'; + $simperError = "SIMPER atas nama {$employee->name} (NIK: {$employee->nik}) telah KEDALUWARSA pada {$expDate}. Anda tidak diizinkan mengoperasikan alat berat. Silakan hubungi Divisi HSE."; + } + + // Tentukan template P2H yang digunakan + $template = $vehicle->p2hTemplate; + if (!$template && $vehicle->unit_category) { + $template = P2hTemplate::where('name', 'like', "%{$vehicle->unit_category}%") + ->orWhere('code', 'like', "%{$vehicle->unit_category}%") + ->first(); + } + + if (!$template) { + // Ambil template default pertama jika belum terpetakan spesifik + $template = P2hTemplate::first(); + } + + $items = $template ? $template->items : collect(); + $groupedItems = []; + foreach ($items as $item) { + $groupedItems[$item->section][] = $item; + } + + return view('p2h.form', compact( + 'vehicle', + 'employee', + 'simperError', + 'template', + 'groupedItems' + )); + } + + /** + * Simpan hasil pengisian formulir P2H ke database. + */ + public function store(Request $request, string $code): RedirectResponse + { + $vehicle = Vehicle::where('code', $code) + ->where('category', 'unit_support') + ->firstOrFail(); + + $user = Auth::user(); + $employee = $user->employee; + + if ($user->isQmaAdmin() || $user->isSuperAdmin()) { + return back()->with('error', 'Admin QMA tidak memiliki wewenang untuk mengisi formulir P2H operator. Formulir wajib diisi langsung oleh Operator alat berlisensi SIMPER aktif.'); + } + + if (!$employee || !$employee->is_operator || !$employee->hasValidSimper()) { + return back()->with('error', 'Validasi SIMPER gagal. Anda tidak memiliki wewenang untuk menyimpan P2H.'); + } + + $validated = $request->validate([ + 'template_id' => ['required', 'exists:p2h_templates,id'], + 'shift' => ['nullable', 'string'], + 'start_hm' => ['required', 'numeric', 'min:0'], + 'general_notes' => ['nullable', 'string', 'max:2000'], + 'items' => ['required', 'array'], + 'items.*.condition' => ['nullable', 'string', 'in:baik,rusak'], + 'items.*.answer' => ['nullable', 'string'], + 'items.*.notes' => ['nullable', 'string', 'max:500'], + ], [ + 'start_hm.required' => 'Nilai Hour Meter (HM) wajib diisi.', + 'start_hm.numeric' => 'Nilai Hour Meter (HM) harus berupa angka valid.', + 'items.required' => 'Daftar butir pemeriksaan P2H tidak boleh kosong.', + ]); + + $template = P2hTemplate::with('items')->findOrFail($validated['template_id']); + $submittedItems = $validated['items']; + + $trxNo = 'P2H-' . Carbon::now()->format('Ymd') . '-' . strtoupper(Str::random(5)); + $now = Carbon::now(); + + DB::transaction(function () use ($trxNo, $vehicle, $employee, $template, $validated, $submittedItems, $now) { + $defectCount = 0; + $itemsToInsert = []; + + foreach ($template->items as $tItem) { + $itemId = $tItem->id; + $userAns = $submittedItems[$itemId] ?? null; + + $condition = null; + $answerVal = null; + $notes = null; + + if (in_array($tItem->question_type, ['choice', 'condition', 'Multiple choice: only one answer', 'Matrix'])) { + // Pilihan Baik atau Rusak (default 'baik' jika belum terisi) + $condition = isset($userAns['condition']) && $userAns['condition'] === 'rusak' ? 'rusak' : 'baik'; + if ($condition === 'rusak') { + $defectCount++; + } + } elseif (in_array($tItem->question_type, ['number', 'Numerical Value'])) { + $answerVal = $userAns['answer'] ?? $validated['start_hm']; + } elseif (in_array($tItem->question_type, ['datetime', 'Datetime'])) { + $answerVal = $userAns['answer'] ?? $now->format('Y-m-d H:i'); + } elseif (in_array($tItem->question_type, ['date', 'Date'])) { + $answerVal = $userAns['answer'] ?? $now->format('Y-m-d'); + } else { + $answerVal = $userAns['answer'] ?? null; + } + + if (!empty($userAns['notes'])) { + $notes = trim($userAns['notes']); + } + + $itemsToInsert[] = [ + 'template_item_id' => $tItem->id, + 'section' => $tItem->section, + 'title' => $tItem->title, + 'question_type' => $tItem->question_type, + 'condition_status' => $condition, + 'answer_value' => $answerVal, + 'notes' => $notes, + 'created_at' => $now, + 'updated_at' => $now, + ]; + } + + $summaryCondition = ($defectCount > 0) ? 'has_defect' : 'good'; + + $record = P2hRecord::create([ + 'transaction_no' => $trxNo, + 'vehicle_id' => $vehicle->id, + 'employee_id' => $employee->id, + 'template_id' => $template->id, + 'shift' => !empty($validated['shift']) ? $validated['shift'] : 'Shift 1 (Siang)', + 'start_hm' => $validated['start_hm'], + 'start_time' => $now, + 'summary_condition' => $summaryCondition, + 'defect_count' => $defectCount, + 'general_notes' => $validated['general_notes'] ?? null, + 'validation_status' => 'pending', // Menunggu approval Admin QMA + 'inspected_at' => $now, + ]); + + foreach ($itemsToInsert as $ins) { + $ins['p2h_record_id'] = $record->id; + P2hRecordItem::create($ins); + } + + // Perbarui HM unit di master data kendaraan jika lebih besar + if ((float)$validated['start_hm'] > (float)$vehicle->current_km) { + $vehicle->update(['current_km' => $validated['start_hm']]); + } + + // Jika ada kerusakan kritis, tandai status kendaraan + if ($defectCount > 0 && $vehicle->status === 'Operation') { + $vehicle->update(['status' => 'Breakdown']); + } + }); + + return redirect() + ->route('p2h.form', ['code' => $code]) + ->with('success', "Inspeksi P2H unit [{$vehicle->code}] berhasil dikirim dengan Nomor Transaksi {$trxNo}. Laporan saat ini berstatus 'Menunggu Approval' dari Admin QMA."); + } +} diff --git a/app/Http/Controllers/Pg/SecurityGuardController.php b/app/Http/Controllers/Pg/SecurityGuardController.php index c149378..05bfe07 100644 --- a/app/Http/Controllers/Pg/SecurityGuardController.php +++ b/app/Http/Controllers/Pg/SecurityGuardController.php @@ -45,7 +45,8 @@ class SecurityGuardController extends Controller $guards = $query->orderBy('team') ->orderBy('name') - ->get(); + ->paginate(20) + ->withQueryString(); $gates = Gate::where('is_active', true)->orderBy('name')->get(); diff --git a/app/Http/Controllers/Public/VehicleActivityFormController.php b/app/Http/Controllers/Public/VehicleActivityFormController.php index 6fe4b78..a793e93 100644 --- a/app/Http/Controllers/Public/VehicleActivityFormController.php +++ b/app/Http/Controllers/Public/VehicleActivityFormController.php @@ -19,6 +19,33 @@ use Illuminate\View\View; class VehicleActivityFormController extends Controller { + /** + * Tampilkan katalog / daftar kendaraan ringan (LV) untuk keperluan mobilisasi karyawan. + */ + public function index(Request $request): View + { + $query = Vehicle::lightVehicles(); + + if ($request->filled('search')) { + $search = trim($request->input('search')); + $query->where(function ($q) use ($search) { + $q->where('code', 'like', "%{$search}%") + ->orWhere('brand_type', 'like', "%{$search}%") + ->orWhere('license_plate', 'like', "%{$search}%") + ->orWhere('ownership', 'like', "%{$search}%"); + }); + } + + $vehicles = $query->orderBy('code')->paginate(24)->withQueryString(); + + $employee = null; + if (auth()->check()) { + $employee = auth()->user()->employee; + } + + return view('mobilisasi.index', compact('vehicles', 'employee')); + } + /** * Tampilkan form pencatatan aktivitas kendaraan saat scan QR code. */ @@ -71,6 +98,20 @@ class VehicleActivityFormController extends Controller } else { $verifiedDriver = $emp; } + } elseif (auth()->check() && auth()->user()->isEmployee()) { + $emp = auth()->user()->employee; + if ($emp) { + if (!$emp->is_operator) { + $nikErrorTitle = 'Bukan Driver Terdaftar'; + $nikError = "Karyawan atas nama {$emp->name} (NIK: {$emp->nik} - {$emp->division}) terdaftar sebagai BUKAN DRIVER dan tidak memiliki izin mengemudi (SIMPER). Anda tidak diizinkan mengoperasikan kendaraan unit. Silakan hubungi Divisi HSE."; + } elseif (!$emp->hasValidSimper()) { + $nikErrorTitle = 'Peringatan: SIMPER Kedaluwarsa'; + $nikError = "SIMPER atas nama {$emp->name} (NIK: {$emp->nik} - {$emp->division}) telah KEDALUWARSA. Anda tidak diizinkan mengoperasikan kendaraan. Silakan hubungi Divisi HSE untuk perpanjangan masa berlaku SIMPER."; + } else { + $verifiedDriver = $emp; + $inputNik = $emp->nik; + } + } } return view('public.vehicle_activity_form', compact( diff --git a/app/Http/Controllers/Qma/ActivityLogController.php b/app/Http/Controllers/Qma/ActivityLogController.php index e053168..25734f3 100644 --- a/app/Http/Controllers/Qma/ActivityLogController.php +++ b/app/Http/Controllers/Qma/ActivityLogController.php @@ -108,13 +108,23 @@ class ActivityLogController extends Controller }); } - $totalActivities = (clone $query)->count(); - $totalDistance = (clone $query)->sum('distance'); - $inCount = (clone $query)->where('direction', 'in')->count(); - $outCount = (clone $query)->where('direction', 'out')->count(); - $approvedCount = (clone $query)->where('validation_status', 'approved')->count(); - $pendingCount = (clone $query)->where('validation_status', 'pending')->count(); - $rejectedCount = (clone $query)->where('validation_status', 'rejected')->count(); + $stats = (clone $query)->selectRaw(" + COUNT(*) as total_activities, + COALESCE(SUM(distance), 0) as total_distance, + COUNT(CASE WHEN direction = 'in' THEN 1 END) as in_count, + COUNT(CASE WHEN direction = 'out' THEN 1 END) as out_count, + COUNT(CASE WHEN validation_status = 'approved' THEN 1 END) as approved_count, + COUNT(CASE WHEN validation_status = 'pending' THEN 1 END) as pending_count, + COUNT(CASE WHEN validation_status = 'rejected' THEN 1 END) as rejected_count + ")->first(); + + $totalActivities = (int) ($stats->total_activities ?? 0); + $totalDistance = (float) ($stats->total_distance ?? 0); + $inCount = (int) ($stats->in_count ?? 0); + $outCount = (int) ($stats->out_count ?? 0); + $approvedCount = (int) ($stats->approved_count ?? 0); + $pendingCount = (int) ($stats->pending_count ?? 0); + $rejectedCount = (int) ($stats->rejected_count ?? 0); // Rekapitulasi per Kendaraan $vehicleSummaries = (clone $query) diff --git a/app/Http/Controllers/Qma/P2hInspectionController.php b/app/Http/Controllers/Qma/P2hInspectionController.php new file mode 100644 index 0000000..ad26439 --- /dev/null +++ b/app/Http/Controllers/Qma/P2hInspectionController.php @@ -0,0 +1,220 @@ +filled('validation_status')) { + $query->where('validation_status', $request->input('validation_status')); + } + + // Filter Status Kelayakan (Kondisi) + if ($request->filled('summary_condition')) { + $query->where('summary_condition', $request->input('summary_condition')); + } + + // Filter Tanggal + if ($request->filled('date')) { + $query->whereDate('inspected_at', $request->input('date')); + } + + // Filter Pencarian Keyword (Nomor Transaksi, Kode Unit, Nama Operator, NIK) + if ($request->filled('search')) { + $search = trim($request->input('search')); + $query->where(function ($q) use ($search) { + $q->where('transaction_no', 'like', "%{$search}%") + ->orWhereHas('vehicle', fn($v) => $v->where('code', 'like', "%{$search}%")->orWhere('brand_type', 'like', "%{$search}%")) + ->orWhereHas('employee', fn($e) => $e->where('name', 'like', "%{$search}%")->orWhere('nik', 'like', "%{$search}%")); + }); + } + + $records = $query->orderByDesc('inspected_at')->paginate(15)->withQueryString(); + + // Statistik Ringkasan P2H + $totalP2h = P2hRecord::count(); + $totalPending = P2hRecord::where('validation_status', 'pending')->count(); + $totalApproved = P2hRecord::where('validation_status', 'approved')->count(); + $totalRejected = P2hRecord::where('validation_status', 'rejected')->count(); + $totalDefects = P2hRecord::where('summary_condition', 'has_defect')->count(); + + return view('qma.p2h_index', compact( + 'records', + 'totalP2h', + 'totalPending', + 'totalApproved', + 'totalRejected', + 'totalDefects' + )); + } + + /** + * Tampilkan Summary Pemeriksaan P2H Unit Support (Analitik, Rekapitulasi Alat Berat & Status). + */ + public function summary(Request $request): View + { + $today = Carbon::today()->toDateString(); + $startDate = $request->input('start_date', Carbon::now()->startOfMonth()->toDateString()); + $endDate = $request->input('end_date', $today); + $vehicleId = $request->input('vehicle_id'); + $validationStatus = $request->input('validation_status'); + $shift = $request->input('shift'); + $search = trim($request->input('search', '')); + + $query = P2hRecord::with(['vehicle', 'employee', 'template']); + + if ($startDate && $endDate) { + $start = Carbon::parse($startDate)->startOfDay(); + $end = Carbon::parse($endDate)->endOfDay(); + $query->whereBetween('inspected_at', [$start, $end]); + } elseif ($startDate) { + $query->where('inspected_at', '>=', Carbon::parse($startDate)->startOfDay()); + } elseif ($endDate) { + $query->where('inspected_at', '<=', Carbon::parse($endDate)->endOfDay()); + } + + if ($request->filled('vehicle_id')) { + $query->where('vehicle_id', $vehicleId); + } + + if ($request->filled('validation_status')) { + $query->where('validation_status', $validationStatus); + } + + if ($request->filled('shift')) { + $query->where('shift', $shift); + } + + if ($search !== '') { + $query->where(function ($q) use ($search) { + $q->where('transaction_no', 'like', "%{$search}%") + ->orWhereHas('vehicle', fn($v) => $v->where('code', 'like', "%{$search}%")->orWhere('brand_type', 'like', "%{$search}%")) + ->orWhereHas('employee', fn($e) => $e->where('name', 'like', "%{$search}%")->orWhere('nik', 'like', "%{$search}%")); + }); + } + + $records = $query->orderByDesc('inspected_at')->get(); + + // 4 KPI Metrik Utama + $totalInspections = $records->count(); + $totalApproved = $records->where('validation_status', 'approved')->count(); + $totalPending = $records->where('validation_status', 'pending')->count(); + $totalRejected = $records->where('validation_status', 'rejected')->count(); + $totalDefects = $records->where('summary_condition', 'has_defect')->count(); + $totalNormal = $records->where('summary_condition', 'good')->count(); + $totalHm = $records->sum('start_hm'); + + // Rekapitulasi per Unit Support + $unitSummary = $records->groupBy('vehicle_id')->map(function ($group) { + $vehicle = $group->first()->vehicle; + return [ + 'vehicle' => $vehicle, + 'total' => $group->count(), + 'approved' => $group->where('validation_status', 'approved')->count(), + 'pending' => $group->where('validation_status', 'pending')->count(), + 'rejected' => $group->where('validation_status', 'rejected')->count(), + 'has_defect' => $group->where('summary_condition', 'has_defect')->count(), + 'good' => $group->where('summary_condition', 'good')->count(), + 'latest_hm' => $group->max('start_hm'), + 'latest_inspection' => $group->max('inspected_at'), + ]; + })->sortByDesc('total'); + + // Daftar Unit Support untuk opsi filter + $supportVehicles = Vehicle::where('category', 'unit_support')->orderBy('code')->get(); + + return view('qma.p2h_summary', compact( + 'records', + 'totalInspections', + 'totalApproved', + 'totalPending', + 'totalRejected', + 'totalDefects', + 'totalNormal', + 'totalHm', + 'unitSummary', + 'supportVehicles', + 'startDate', + 'endDate' + )); + } + + /** + * Tampilkan detail lembar pemeriksaan P2H (seluruh section & butir jawaban). + */ + public function show(int $id): View + { + $record = P2hRecord::with(['vehicle', 'employee', 'template', 'validator', 'items'])->findOrFail($id); + + $groupedItems = []; + foreach ($record->items as $item) { + $groupedItems[$item->section][] = $item; + } + + return view('qma.p2h_show', compact('record', 'groupedItems')); + } + + /** + * Approval / Persetujuan lembar P2H oleh Admin QMA. + */ + public function approve(Request $request, int $id): RedirectResponse + { + $record = P2hRecord::with('vehicle')->findOrFail($id); + + $record->update([ + 'validation_status' => 'approved', + 'validated_by' => Auth::id(), + 'validated_at' => Carbon::now(), + 'validation_notes' => $request->input('validation_notes', 'Pemeriksaan P2H disetujui oleh QMA.'), + ]); + + // Jika unit dinyatakan aman dan sebelumnya breakdown karena review, status unit disetujui operasi + if (!$record->hasDefects() && $record->vehicle->status === 'Breakdown') { + $record->vehicle->update(['status' => 'Operation']); + } + + return back()->with('success', "Inspeksi P2H [{$record->transaction_no}] untuk unit {$record->vehicle->code} berhasil DISETUJUI."); + } + + /** + * Penolakan lembar P2H oleh Admin QMA (misal data tidak valid atau unit dilarang beroperasi). + */ + public function reject(Request $request, int $id): RedirectResponse + { + $request->validate([ + 'validation_notes' => ['required', 'string', 'max:1000'], + ], [ + 'validation_notes.required' => 'Alasan penolakan / instruksi perbaikan wajib diisi.', + ]); + + $record = P2hRecord::with('vehicle')->findOrFail($id); + + $record->update([ + 'validation_status' => 'rejected', + 'validated_by' => Auth::id(), + 'validated_at' => Carbon::now(), + 'validation_notes' => $request->input('validation_notes'), + ]); + + // Kunci status kendaraan ke Breakdown atau Standby jika P2H ditolak + $record->vehicle->update(['status' => 'Breakdown']); + + return back()->with('success', "Inspeksi P2H [{$record->transaction_no}] untuk unit {$record->vehicle->code} DITOLAK. Status unit diubah ke Breakdown."); + } +} diff --git a/app/Http/Controllers/Qma/P2hTemplateController.php b/app/Http/Controllers/Qma/P2hTemplateController.php new file mode 100644 index 0000000..1d1cc4f --- /dev/null +++ b/app/Http/Controllers/Qma/P2hTemplateController.php @@ -0,0 +1,351 @@ +filled('search')) { + $search = trim($request->input('search')); + $query->where('name', 'like', "%{$search}%") + ->orWhere('code', 'like', "%{$search}%"); + } + + $templates = $query->orderBy('name')->get(); + + return view('qma.p2h_templates', compact('templates')); + } + + /** + * Tampilkan detail butir pertanyaan dalam template tertentu. + */ + public function show(int $id): View + { + $template = P2hTemplate::findOrFail($id); + + // Pastikan seluruh nomor urut pertanyaan berurutan otomatis tanpa celah (1, 2, 3... N) + $this->resequenceTemplate($template); + + $template->load(['items' => fn($q) => $q->orderBy('sequence')]); + + $groupedItems = []; + foreach ($template->items as $item) { + $groupedItems[$item->section][] = $item; + } + + // Ambil daftar unik nama section yang sudah ada untuk saran/opsi dropdown + $availableSections = P2hTemplateItem::where('template_id', $template->id) + ->distinct() + ->pluck('section') + ->values() + ->all(); + + return view('qma.p2h_template_detail', compact('template', 'groupedItems', 'availableSections')); + } + + /** + * Perbarui butir pertanyaan checksheet P2H yang sudah ada. + */ + public function updateItem(Request $request, int $templateId, int $itemId): RedirectResponse + { + $template = P2hTemplate::findOrFail($templateId); + $item = P2hTemplateItem::where('template_id', $template->id)->findOrFail($itemId); + + $allowedTypes = [ + 'Multiple Lines Text Box', + 'Single Line Text Box', + 'Numerical Value', + 'Date', + 'Datetime', + 'Multiple choice: only one answer', + 'Multiple choice: multiple answers allowed', + 'Matrix', + 'choice', + 'condition', + 'number', + 'text', + 'datetime', + 'date', + 'textarea', + ]; + + $validated = $request->validate([ + 'title' => 'required|string|max:255', + 'section' => 'required|string|max:100', + 'question_type' => ['required', 'string', 'max:50', \Illuminate\Validation\Rule::in($allowedTypes)], + 'sequence' => 'nullable|integer|min:1', + ]); + + $oldSection = $item->section; + $newSection = trim($validated['section']); + + $item->update([ + 'title' => trim($validated['title']), + 'section' => $newSection, + 'question_type' => $validated['question_type'], + ]); + + if ($oldSection !== $newSection) { + $targetMaxSeq = P2hTemplateItem::where('template_id', $template->id) + ->where('section', $newSection) + ->where('id', '!=', $item->id) + ->max('sequence'); + + if ($targetMaxSeq) { + P2hTemplateItem::where('template_id', $template->id) + ->where('id', '!=', $item->id) + ->where('sequence', '>', $targetMaxSeq) + ->increment('sequence', 10); + $item->update(['sequence' => $targetMaxSeq + 1]); + } + } + + $this->resequenceTemplate($template); + + return redirect() + ->route('qma.p2h.templates.show', $template->id) + ->with('success', "Butir pertanyaan '{$item->title}' berhasil diperbarui."); + } + + /** + * Tambah butir pertanyaan baru ke dalam template checksheet. + */ + public function storeItem(Request $request, int $templateId): RedirectResponse + { + $template = P2hTemplate::findOrFail($templateId); + + $allowedTypes = [ + 'Multiple Lines Text Box', + 'Single Line Text Box', + 'Numerical Value', + 'Date', + 'Datetime', + 'Multiple choice: only one answer', + 'Multiple choice: multiple answers allowed', + 'Matrix', + 'choice', + 'condition', + 'number', + 'text', + 'datetime', + 'date', + 'textarea', + ]; + + // 1. Jika form mengirimkan daftar pertanyaan sekaligus (Tambah Section dengan List Pertanyaan) + if ($request->has('questions') && is_array($request->input('questions'))) { + $validated = $request->validate([ + 'section' => 'required|string|max:100', + 'position_type' => 'nullable|string|in:end,start,after,before', + 'target_section' => 'nullable|string|max:100', + 'questions' => 'required|array|min:1', + 'questions.*.title' => 'required|string|max:255', + 'questions.*.question_type' => ['required', 'string', 'max:50', \Illuminate\Validation\Rule::in($allowedTypes)], + 'questions.*.sequence' => 'nullable|integer|min:1', + ]); + + $section = trim($validated['section']); + $positionType = $validated['position_type'] ?? 'end'; + $targetSection = !empty($validated['target_section']) ? trim($validated['target_section']) : null; + + $validQuestions = array_values(array_filter($validated['questions'], fn($q) => !empty(trim($q['title'] ?? '')))); + $n = count($validQuestions); + + if ($n === 0) { + return redirect()->back()->withErrors(['questions' => 'Minimal harus ada 1 pertanyaan yang terisi.']); + } + + \Illuminate\Support\Facades\DB::transaction(function () use ($template, $section, $positionType, $targetSection, $validQuestions, $n) { + // Tentukan base sequence awal berdasarkan posisi penempatan + if ($positionType === 'start') { + // Geser semua item yang sudah ada + P2hTemplateItem::where('template_id', $template->id)->increment('sequence', $n + 100); + $startSeq = 1; + } elseif ($positionType === 'after' && $targetSection) { + $targetMaxSeq = P2hTemplateItem::where('template_id', $template->id) + ->where('section', $targetSection) + ->max('sequence'); + + if ($targetMaxSeq) { + P2hTemplateItem::where('template_id', $template->id) + ->where('sequence', '>', $targetMaxSeq) + ->increment('sequence', $n + 100); + $startSeq = $targetMaxSeq + 1; + } else { + $startSeq = (P2hTemplateItem::where('template_id', $template->id)->max('sequence') ?? 0) + 1; + } + } elseif ($positionType === 'before' && $targetSection) { + $targetMinSeq = P2hTemplateItem::where('template_id', $template->id) + ->where('section', $targetSection) + ->min('sequence'); + + if ($targetMinSeq) { + P2hTemplateItem::where('template_id', $template->id) + ->where('sequence', '>=', $targetMinSeq) + ->increment('sequence', $n + 100); + $startSeq = $targetMinSeq; + } else { + $startSeq = (P2hTemplateItem::where('template_id', $template->id)->max('sequence') ?? 0) + 1; + } + } else { + // Default 'end' + $startSeq = (P2hTemplateItem::where('template_id', $template->id)->max('sequence') ?? 0) + 1; + } + + foreach ($validQuestions as $idx => $qData) { + P2hTemplateItem::create([ + 'template_id' => $template->id, + 'section' => $section, + 'title' => trim($qData['title']), + 'question_type' => $qData['question_type'], + 'sequence' => $startSeq + $idx, + ]); + } + + // Normalisasi ulang sequence otomatis berurutan dari section pertama hingga akhir + $this->resequenceTemplate($template); + }); + + return redirect() + ->route('qma.p2h.templates.show', $template->id) + ->with('success', "Bagian '{$section}' dengan {$n} butir pertanyaan berhasil ditambahkan."); + } + + // 2. Format single question (form butir tunggal via modal tambah pertanyaan) + $validated = $request->validate([ + 'title' => 'required|string|max:255', + 'section' => 'required|string|max:100', + 'question_type' => ['required', 'string', 'max:50', \Illuminate\Validation\Rule::in($allowedTypes)], + 'sequence' => 'nullable|integer|min:1', + ]); + + $section = trim($validated['section']); + + \Illuminate\Support\Facades\DB::transaction(function () use ($template, $section, $validated) { + $targetSectionMaxSeq = P2hTemplateItem::where('template_id', $template->id) + ->where('section', $section) + ->max('sequence'); + + if ($targetSectionMaxSeq) { + // Geser butir di section setelahnya agar pertanyaan ini diletakkan di akhir section terkait + P2hTemplateItem::where('template_id', $template->id) + ->where('sequence', '>', $targetSectionMaxSeq) + ->increment('sequence', 10); + $seq = $targetSectionMaxSeq + 1; + } else { + $seq = (P2hTemplateItem::where('template_id', $template->id)->max('sequence') ?? 0) + 1; + } + + P2hTemplateItem::create([ + 'template_id' => $template->id, + 'section' => $section, + 'title' => trim($validated['title']), + 'question_type' => $validated['question_type'], + 'sequence' => $seq, + ]); + + $this->resequenceTemplate($template); + }); + + return redirect() + ->route('qma.p2h.templates.show', $template->id) + ->with('success', "Butir pertanyaan berhasil ditambahkan ke bagian '{$section}'."); + } + + /** + * Atur ulang urutan seluruh section dalam template checksheet. + */ + public function reorderSections(Request $request, int $templateId): RedirectResponse + { + $template = P2hTemplate::findOrFail($templateId); + + $validated = $request->validate([ + 'sections' => 'required|array|min:1', + 'sections.*' => 'required|string|max:100', + ]); + + \Illuminate\Support\Facades\DB::transaction(function () use ($template, $validated) { + $currentSequence = 1; + + foreach ($validated['sections'] as $sectionName) { + $items = P2hTemplateItem::where('template_id', $template->id) + ->where('section', $sectionName) + ->orderBy('sequence') + ->orderBy('id') + ->get(); + + foreach ($items as $item) { + $item->update(['sequence' => $currentSequence]); + $currentSequence++; + } + } + }); + + return redirect() + ->route('qma.p2h.templates.show', $template->id) + ->with('success', 'Urutan section berhasil diperbarui.'); + } + + /** + * Hapus butir pertanyaan dari template checksheet. + */ + public function destroyItem(int $templateId, int $itemId): RedirectResponse + { + $template = P2hTemplate::findOrFail($templateId); + $item = P2hTemplateItem::where('template_id', $template->id)->findOrFail($itemId); + + $itemTitle = $item->title; + $item->delete(); + + // Normalisasi ulang sequence otomatis agar tidak ada celah/lompatan nomor + $this->resequenceTemplate($template); + + return redirect() + ->route('qma.p2h.templates.show', $template->id) + ->with('success', "Butir pertanyaan '{$itemTitle}' berhasil dihapus."); + } + + /** + * Urutkan ulang sequence seluruh butir pertanyaan dalam template + * agar berurutan secara konsisten dari section pertama hingga akhir (1, 2, 3... N). + */ + private function resequenceTemplate(P2hTemplate $template): void + { + $sections = P2hTemplateItem::where('template_id', $template->id) + ->select('section', \Illuminate\Support\Facades\DB::raw('MIN(sequence) as min_seq')) + ->groupBy('section') + ->orderBy('min_seq') + ->pluck('section'); + + $currentSeq = 1; + foreach ($sections as $sectionName) { + $items = P2hTemplateItem::where('template_id', $template->id) + ->where('section', $sectionName) + ->orderBy('sequence') + ->orderBy('id') + ->get(); + + foreach ($items as $item) { + if ($item->sequence !== $currentSeq) { + $item->update(['sequence' => $currentSeq]); + } + $currentSeq++; + } + } + } +} + diff --git a/app/Http/Controllers/Qma/VehicleController.php b/app/Http/Controllers/Qma/VehicleController.php index 7a14755..aaf258c 100644 --- a/app/Http/Controllers/Qma/VehicleController.php +++ b/app/Http/Controllers/Qma/VehicleController.php @@ -3,9 +3,13 @@ namespace App\Http\Controllers\Qma; use App\Http\Controllers\Controller; +use App\Models\Employee; +use App\Models\Gate; +use App\Models\P2hTemplate; use App\Models\Vehicle; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; use Illuminate\Validation\Rule; use Illuminate\View\View; @@ -77,11 +81,11 @@ class VehicleController extends Controller } /** - * Halaman khusus pengelolaan armada Kendaraan Berat (Unit Support / Alat Berat). + * Halaman khusus pengelolaan Kategori Kendaraan Berat (Unit Support / Alat Berat). */ public function indexSupport(Request $request): View { - $query = Vehicle::unitSupports(); + $query = Vehicle::unitSupportCategories()->withCount('units'); // Filter Status Operasional if ($request->filled('status')) { @@ -112,33 +116,202 @@ class VehicleController extends Controller $vehicles = $query->orderBy('code')->paginate(15)->withQueryString(); // Statistik Ringkasan Khusus Unit Support - $totalSupport = Vehicle::unitSupports()->count(); - $totalOperation = Vehicle::unitSupports()->where('status', 'Operation')->count(); - $totalStandby = Vehicle::unitSupports()->where('status', 'Standby')->count(); - $totalBreakdown = Vehicle::unitSupports()->where('status', 'Breakdown')->count(); + $totalSupport = Vehicle::unitSupportCategories()->count(); + $totalUnits = Vehicle::unitSupportPhysical()->count(); + $totalOperation = Vehicle::unitSupportCategories()->where('status', 'Operation')->count(); + $totalStandby = Vehicle::unitSupportCategories()->where('status', 'Standby')->count(); + $totalBreakdown = Vehicle::unitSupportCategories()->where('status', 'Breakdown')->count(); // Daftar kategori alat berat yang terdaftar untuk opsi filter - $availableCategories = Vehicle::unitSupports() + $availableCategories = Vehicle::unitSupportCategories() ->whereNotNull('unit_category') ->distinct() ->pluck('unit_category'); + // Master data daftar divisi perusahaan (gabungan standar + data existing di Employee & Vehicle) + $standardDivisions = collect([ + 'Civil & Inviro', + 'GA', + 'HR', + 'INFORMATION & TECHNOLOGY', + 'K3', + 'Keuangan', + 'Logistik', + 'Mechanical', + 'Operasional', + 'PG', + 'Quality Management Asset (QMA)', + ]); + + $availableDivisions = $standardDivisions + ->merge(Employee::whereNotNull('division')->where('division', '!=', '')->pluck('division')) + ->merge(Vehicle::whereNotNull('division')->where('division', '!=', '')->pluck('division')) + ->map(fn($d) => trim($d)) + ->filter() + ->unique() + ->sort() + ->values() + ->all(); + // Daftar semua kode unit support untuk validasi unik langsung di form $existingCodes = Vehicle::unitSupports()->pluck('code')->map(fn($c) => strtoupper(trim($c)))->values()->all(); return view('qma.vehicles_support', compact( 'vehicles', 'totalSupport', + 'totalUnits', 'totalOperation', 'totalStandby', 'totalBreakdown', 'availableCategories', + 'availableDivisions', 'existingCodes' )); } /** - * Simpan data aset kendaraan baru (Kendaraan Ringan atau Kendaraan Berat). + * Halaman daftar unit fisik berdasarkan kategori Unit Support yang dipilih. + */ + public function indexSupportUnits(Request $request, int $id): View + { + $category = Vehicle::unitSupportCategories()->withCount('units')->findOrFail($id); + + $query = $category->units(); + + if ($request->filled('status')) { + $query->where('status', $request->input('status')); + } + + if ($request->filled('search')) { + $search = trim($request->input('search')); + $query->where(function ($q) use ($search) { + $q->where('code', 'like', "%{$search}%") + ->orWhere('serial_number', 'like', "%{$search}%") + ->orWhere('license_plate', 'like', "%{$search}%") + ->orWhere('production_year', 'like', "%{$search}%") + ->orWhere('location', 'like', "%{$search}%") + ->orWhere('silo_document', 'like', "%{$search}%") + ->orWhere('kir_document', 'like', "%{$search}%") + ->orWhere('brand_type', 'like', "%{$search}%"); + }); + } + + $units = $query->paginate(15)->withQueryString(); + + $totalUnits = $category->units()->count(); + $totalOperation = $category->units()->where('status', 'Operation')->count(); + $totalStandby = $category->units()->where('status', 'Standby')->count(); + $totalBreakdown = $category->units()->where('status', 'Breakdown')->count(); + $totalMaintenance = $category->units()->where('status', 'Maintenance')->count(); + + $nextUnitNumber = $category->getNextUnitNumber(); + $nextUnitCode = $category->getNextUnitCode(); + + $existingCodes = Vehicle::pluck('code')->map(fn($c) => strtoupper(trim($c)))->values()->all(); + + // Master data lokasi penempatan (gabungan pos gerbang aktif & lokasi operasional proyek) + $masterLocations = Gate::where('is_active', true) + ->orderBy('name') + ->pluck('name') + ->merge( + Vehicle::whereNotNull('location') + ->where('location', '!=', '') + ->pluck('location') + ) + ->map(fn($loc) => trim($loc)) + ->filter() + ->unique() + ->sort() + ->values() + ->all(); + + return view('qma.vehicles_support_units', compact( + 'category', + 'units', + 'totalUnits', + 'totalOperation', + 'totalStandby', + 'totalBreakdown', + 'totalMaintenance', + 'nextUnitNumber', + 'nextUnitCode', + 'existingCodes', + 'masterLocations' + )); + } + + /** + * Simpan penambahan unit fisik baru di bawah kategori Unit Support tertentu. + */ + public function storeSupportUnit(Request $request, int $id): RedirectResponse + { + $category = Vehicle::unitSupportCategories()->findOrFail($id); + + $request->validate([ + 'unit_number' => ['nullable', 'string', 'max:20'], + 'code' => ['nullable', 'string', 'max:50'], + 'serial_number' => ['nullable', 'string', 'max:100'], + 'license_plate' => ['nullable', 'string', 'max:30'], + 'production_year' => ['nullable', 'integer', 'min:1980', 'max:' . (date('Y') + 1)], + 'status' => ['required', 'string', 'in:Operation,Standby,Breakdown,Maintenance'], + 'current_km' => ['nullable', 'numeric', 'min:0'], + 'location' => ['nullable', 'string', 'max:150'], + 'silo_document' => ['nullable', 'string', 'max:150'], + 'kir_document' => ['nullable', 'string', 'max:150'], + 'ownership' => ['nullable', 'string', 'max:150'], + 'division' => ['nullable', 'string', 'max:100'], + ]); + + return DB::transaction(function () use ($request, $category) { + // Tentukan nomor unit dan kode unit + $rawUnitNumber = trim((string)$request->input('unit_number')); + if ($rawUnitNumber !== '') { + if (ctype_digit($rawUnitNumber)) { + $unitNumber = str_pad($rawUnitNumber, 3, '0', STR_PAD_LEFT); + } else { + $unitNumber = $rawUnitNumber; + } + $code = strtoupper(trim($category->code . '-' . $unitNumber)); + } elseif ($request->filled('code')) { + $code = strtoupper(trim($request->input('code'))); + } else { + $code = $category->getNextUnitCode(); + } + + // Validasi unik dengan lock for update + if (Vehicle::where('code', $code)->lockForUpdate()->exists()) { + return back()->withInput()->with('error', "Kode unit [{$code}] sudah terdaftar di sistem. Silakan gunakan nomor urut lain."); + } + + $unit = Vehicle::create([ + 'code' => $code, + 'category' => 'unit_support', + 'parent_id' => $category->id, + 'p2h_template_id' => $category->p2h_template_id, + 'brand_type' => $category->brand_type, + 'unit_category' => $category->unit_category, + 'unit_type' => $category->unit_type, + 'brand' => $category->brand, + 'model_number' => $category->model_number, + 'license_plate' => $request->input('license_plate'), + 'serial_number' => $request->input('serial_number'), + 'production_year' => $request->input('production_year'), + 'status' => $request->input('status', 'Operation'), + 'current_km' => $request->input('current_km', 0), + 'location' => $request->input('location', $category->location), + 'ownership' => $request->input('ownership', $category->ownership), + 'division' => $request->input('division', $category->division), + 'fuel_consumption' => $category->fuel_consumption, + 'silo_document' => $request->input('silo_document'), + 'kir_document' => $request->input('kir_document'), + ]); + + return back()->with('success', "Unit fisik [{$unit->code}] berhasil ditambahkan ke kategori {$category->unit_category}."); + }); + } + + /** + * Simpan data aset kendaraan baru (Kendaraan Ringan atau Kategori Kendaraan Berat). */ public function store(Request $request): RedirectResponse { @@ -149,10 +322,11 @@ class VehicleController extends Controller 'category' => ['required', 'in:light_vehicle,unit_support'], 'brand_type' => ['required', 'string', 'max:150'], 'license_plate' => ['nullable', 'string', 'max:30'], + 'serial_number' => ['nullable', 'string', 'max:100'], 'ownership' => ['nullable', 'string', 'max:150'], 'division' => ['nullable', 'string', 'max:100'], - 'status' => ['required', 'string', 'in:Operation,Standby,Breakdown,Maintenance'], - 'current_km' => ['required', 'numeric', 'min:0'], + 'status' => [$category === 'unit_support' ? 'nullable' : 'required', 'string', 'in:Operation,Standby,Breakdown,Maintenance'], + 'current_km' => [$category === 'unit_support' ? 'nullable' : 'required', 'numeric', 'min:0'], ]; // Atribut opsional spesifik Unit Support (Kendaraan Berat) @@ -180,29 +354,51 @@ class VehicleController extends Controller 'status.required' => 'Status operasional wajib dipilih.', ]); + if ($category === 'unit_support') { + $validated['status'] = $validated['status'] ?? 'Operation'; + $validated['current_km'] = $validated['current_km'] ?? 0; + } + $vehicle = Vehicle::create($validated); - $categoryLabel = $vehicle->isLightVehicle() ? 'Light Vehicle (LV)' : 'Unit Support'; + if ($vehicle->isSupportCategory()) { + // Otomatis buatkan Master Template P2H baru (default kosong tanpa butir pertanyaan) + $template = P2hTemplate::firstOrCreate( + ['code' => $vehicle->code], + [ + 'name' => $vehicle->unit_category ?: $vehicle->brand_type, + 'description' => "Template form inspeksi P2H resmi untuk kategori {$vehicle->brand_type} (Kode: {$vehicle->code}).", + 'is_active' => true, + ] + ); + $vehicle->update(['p2h_template_id' => $template->id]); + } + + $categoryLabel = $vehicle->isLightVehicle() ? 'Light Vehicle (LV)' : 'Kategori Unit Support'; return back()->with('success', "Data {$categoryLabel} [{$vehicle->code}] berhasil ditambahkan ke sistem."); } /** * Perbarui data aset kendaraan (LV atau Unit Support). + * Jika kode Kategori Unit Support diubah, otomatis sinkronisasikan kode seluruh unit fisik di bawahnya serta Master Template P2H. */ public function update(Request $request, int $id): RedirectResponse { $vehicle = Vehicle::findOrFail($id); + $oldCode = $vehicle->code; + $newCode = strtoupper(trim($request->input('code'))); $rules = [ 'code' => ['required', 'string', 'max:50', Rule::unique('vehicles', 'code')->ignore($vehicle->id)], 'category' => ['required', 'in:light_vehicle,unit_support'], 'brand_type' => ['required', 'string', 'max:150'], 'license_plate' => ['nullable', 'string', 'max:30'], + 'serial_number' => ['nullable', 'string', 'max:100'], 'ownership' => ['nullable', 'string', 'max:150'], 'division' => ['nullable', 'string', 'max:100'], - 'status' => ['required', 'string', 'in:Operation,Standby,Breakdown,Maintenance'], - 'current_km' => ['required', 'numeric', 'min:0'], + 'status' => [$vehicle->isSupportCategory() ? 'nullable' : 'required', 'string', 'in:Operation,Standby,Breakdown,Maintenance'], + 'current_km' => [$vehicle->isSupportCategory() ? 'nullable' : 'required', 'numeric', 'min:0'], 'unit_category' => ['nullable', 'string', 'max:100'], 'unit_type' => ['nullable', 'string', 'max:100'], 'brand' => ['nullable', 'string', 'max:100'], @@ -223,7 +419,48 @@ class VehicleController extends Controller 'current_km.required' => 'Nilai KM / HM wajib diisi.', ]); - $vehicle->update($validated); + DB::transaction(function () use ($vehicle, $validated, $oldCode, $newCode) { + $vehicle->update($validated); + + // Jika ini kategori Unit Support, sinkronkan Master Template P2H dan unit-unit fisik di bawahnya + if ($vehicle->isSupportCategory()) { + $template = $vehicle->p2hTemplate ?: P2hTemplate::where('code', $oldCode)->first(); + if ($template) { + $template->update([ + 'code' => $newCode, + 'name' => $vehicle->unit_category ?: $vehicle->brand_type, + 'description' => "Template form inspeksi P2H resmi untuk kategori {$vehicle->brand_type} (Kode: {$newCode}).", + ]); + if ($vehicle->p2h_template_id !== $template->id) { + $vehicle->update(['p2h_template_id' => $template->id]); + } + } else { + $template = P2hTemplate::firstOrCreate( + ['code' => $newCode], + [ + 'name' => $vehicle->unit_category ?: $vehicle->brand_type, + 'description' => "Template form inspeksi P2H resmi untuk kategori {$vehicle->brand_type} (Kode: {$newCode}).", + 'is_active' => true, + ] + ); + $vehicle->update(['p2h_template_id' => $template->id]); + } + + if ($oldCode !== $newCode) { + $childUnits = $vehicle->units()->lockForUpdate()->get(); + foreach ($childUnits as $child) { + if (str_starts_with($child->code, $oldCode . '-')) { + $suffix = substr($child->code, strlen($oldCode . '-')); + $child->code = $newCode . '-' . $suffix; + } else { + $child->code = $newCode . '-' . $child->code; + } + $child->p2h_template_id = $template->id; + $child->save(); + } + } + } + }); return back()->with('success', "Data unit kendaraan [{$vehicle->code}] berhasil diperbarui."); } @@ -240,9 +477,30 @@ class VehicleController extends Controller return back()->with('error', "Unit {$vehicle->code} tidak dapat dihapus karena telah memiliki catatan riwayat pergerakan di pos gerbang."); } + // Cegah jika memiliki catatan P2H + if ($vehicle->p2hRecords()->exists()) { + return back()->with('error', "Aset {$vehicle->code} tidak dapat dihapus karena telah memiliki riwayat inspeksi P2H."); + } + + // Jika kategori memiliki unit fisik yang punya P2H atau riwayat aktivitas + if ($vehicle->isSupportCategory()) { + foreach ($vehicle->units as $u) { + if ($u->activities()->exists() || $u->p2hRecords()->exists()) { + return back()->with('error', "Kategori {$vehicle->code} tidak dapat dihapus karena unit fisik [{$u->code}] di bawahnya telah memiliki riwayat data operasional."); + } + } + + // Hapus juga master template jika belum ada riwayat inspeksi + $template = $vehicle->p2hTemplate ?: P2hTemplate::where('code', $vehicle->code)->first(); + if ($template && !$template->records()->exists()) { + $template->items()->delete(); + $template->delete(); + } + } + $code = $vehicle->code; $vehicle->delete(); - return back()->with('success', "Unit kendaraan {$code} berhasil dihapus dari sistem."); + return back()->with('success', "Unit/Kategori kendaraan {$code} berhasil dihapus dari sistem."); } } diff --git a/app/Http/Controllers/SuperAdmin/DashboardController.php b/app/Http/Controllers/SuperAdmin/DashboardController.php new file mode 100644 index 0000000..5fce118 --- /dev/null +++ b/app/Http/Controllers/SuperAdmin/DashboardController.php @@ -0,0 +1,17 @@ +query('role'); + $search = trim((string) $request->query('search', '')); + + $query = User::with(['gate', 'securityGuard.gate', 'employee'])->latest(); + + if ($roleFilter && $roleFilter !== 'all') { + if ($roleFilter === 'admin_group') { + $query->whereIn('role', ['super_admin', 'superadmin', 'admin', 'hse_admin', 'qma_admin', 'pg_admin']); + } elseif ($roleFilter === 'super_admin') { + $query->whereIn('role', ['super_admin', 'superadmin', 'admin']); + } else { + $query->where('role', $roleFilter); + } + } + + if ($search !== '') { + $query->where(function ($q) use ($search) { + $q->where('name', 'like', "%{$search}%") + ->orWhere('username', 'like', "%{$search}%") + ->orWhere('email', 'like', "%{$search}%"); + }); + } + + $users = $query->paginate(15)->withQueryString(); + + // Ringkasan Statistik Pengguna + $stats = [ + 'total' => User::count(), + 'super_admin' => User::whereIn('role', ['super_admin', 'superadmin', 'admin'])->count(), + 'hse_admin' => User::where('role', 'hse_admin')->count(), + 'qma_admin' => User::where('role', 'qma_admin')->count(), + 'pg_admin' => User::where('role', 'pg_admin')->count(), + 'gate_officer' => User::where('role', 'gate_officer')->count(), + 'employee' => User::where('role', 'employee')->count(), + ]; + + // Daftar Gerbang Aktif untuk Pilihan Pos Satpam + $gates = Gate::where('is_active', true)->orderBy('name')->get(); + + return view('superadmin.roles_index', compact('users', 'stats', 'gates', 'roleFilter', 'search')); + } + + /** + * Simpan akun admin / pengguna baru. + */ + public function store(Request $request): RedirectResponse + { + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'username' => ['required', 'string', 'max:50', 'regex:/^[a-zA-Z0-9._-]+$/', 'unique:users,username'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email'], + 'password' => ['nullable', 'string', 'min:6'], + 'role' => ['required', 'string', Rule::in(['super_admin', 'hse_admin', 'qma_admin', 'pg_admin', 'gate_officer', 'employee'])], + 'gate_id' => ['nullable', 'exists:gates,id'], + ], [ + 'username.unique' => 'Username tersebut sudah digunakan oleh akun lain.', + 'username.regex' => 'Username hanya boleh berupa huruf, angka, titik (.), tanda hubung (-) dan garis bawah (_).', + 'email.unique' => 'Email tersebut sudah terdaftar di sistem.', + 'password.min' => 'Password minimal terdiri dari 6 karakter.', + 'role.in' => 'Pilihan role tidak valid.', + ]); + + // Jika bukan gate_officer, kosongkan gate_id + if ($validated['role'] !== 'gate_officer') { + $validated['gate_id'] = null; + } + + // Default password ke 'password' jika kosong atau tidak diisi + $rawPassword = !empty($validated['password']) ? $validated['password'] : 'password'; + $validated['password'] = Hash::make($rawPassword); + + $user = User::create($validated); + + // Jika role adalah 'employee', buat juga record master Employee (Unit Kerja, Divisi, Jabatan Wajib Diisi) + if ($validated['role'] === 'employee') { + $empData = $request->validate([ + 'unit_kerja' => ['required', 'string', 'max:100'], + 'division' => ['required', 'string', 'max:100'], + 'position' => ['required', 'string', 'max:100'], + ], [ + 'unit_kerja.required' => 'Unit kerja wajib dipilih untuk karyawan.', + 'division.required' => 'Divisi wajib dipilih untuk karyawan.', + 'position.required' => 'Jabatan wajib diisi untuk karyawan.', + ]); + + $nik = $validated['username']; + + \App\Models\Employee::create([ + 'user_id' => $user->id, + 'nik' => $nik, + 'name' => $validated['name'], + 'unit_kerja' => $empData['unit_kerja'], + 'division' => $empData['division'], + 'position' => $empData['position'], + 'is_operator' => false, // Default bukan driver, akan diatur oleh Admin HSE + 'simper_expired_at' => null, + ]); + } + + return redirect()->route('superadmin.roles.index') + ->with('success', "Akun '{$validated['name']}' dengan role '{$validated['role']}' berhasil dibuat."); + } + + /** + * Perbarui data akun pengguna. + */ + public function update(Request $request, int $id): RedirectResponse + { + $user = User::findOrFail($id); + + $validated = $request->validate([ + 'name' => ['required', 'string', 'max:255'], + 'username' => ['required', 'string', 'max:50', 'regex:/^[a-zA-Z0-9._-]+$/', Rule::unique('users', 'username')->ignore($user->id)], + 'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users', 'email')->ignore($user->id)], + 'password' => ['nullable', 'string', 'min:6'], + 'role' => ['required', 'string', Rule::in(['super_admin', 'hse_admin', 'qma_admin', 'pg_admin', 'gate_officer', 'employee'])], + 'gate_id' => ['nullable', 'exists:gates,id'], + ], [ + 'username.unique' => 'Username tersebut sudah digunakan oleh akun lain.', + 'username.regex' => 'Username hanya boleh berupa huruf, angka, titik (.), tanda hubung (-) dan garis bawah (_).', + 'email.unique' => 'Email tersebut sudah terdaftar di sistem.', + 'password.min' => 'Password baru minimal terdiri dari 6 karakter.', + ]); + + // Keamanan: Cegah super admin terakhir mengubah rolenya sendiri menjadi role biasa + if ($user->id === Auth::id() && $validated['role'] !== 'super_admin') { + $superAdminCount = User::whereIn('role', ['super_admin', 'superadmin', 'admin'])->count(); + if ($superAdminCount <= 1) { + return back()->with('error', 'Gagal: Anda adalah satu-satunya Super Admin aktif di sistem.'); + } + } + + if ($validated['role'] !== 'gate_officer') { + $validated['gate_id'] = null; + } + + if (!empty($validated['password'])) { + $validated['password'] = Hash::make($validated['password']); + } else { + unset($validated['password']); + } + + $user->update($validated); + + // Jika user ini adalah karyawan, sinkronkan nama, NIK (dari username), dan data kerjanya (wajib diisi) + if ($user->role === 'employee' || $user->employee) { + $unitKerja = $request->input('employee_unit_kerja') ?? $request->input('unit_kerja'); + $division = $request->input('employee_division') ?? $request->input('division'); + $position = $request->input('employee_position') ?? $request->input('position'); + + if ($user->role === 'employee' && (empty($unitKerja) || empty($division) || empty($position))) { + return back()->withErrors([ + 'employee_unit_kerja' => 'Unit kerja, divisi, dan jabatan wajib diisi untuk akun karyawan.', + ])->withInput(); + } + + $empFields = [ + 'name' => $user->name, + 'nik' => $user->username, + ]; + if (!empty($unitKerja)) { + $empFields['unit_kerja'] = $unitKerja; + } + if (!empty($division)) { + $empFields['division'] = $division; + } + if (!empty($position)) { + $empFields['position'] = $position; + } + + if ($user->employee) { + $user->employee->update($empFields); + } else { + $empFields['user_id'] = $user->id; + $empFields['is_operator'] = false; + $empFields['simper_expired_at'] = null; + \App\Models\Employee::create($empFields); + } + } + + return redirect()->route('superadmin.roles.index') + ->with('success', "Data akun '{$user->name}' berhasil diperbarui."); + } + + /** + * Hapus akun pengguna. + */ + public function destroy(int $id): RedirectResponse + { + $user = User::findOrFail($id); + + // Keamanan 1: Cegah Super Admin menghapus akunnya sendiri + if ($user->id === Auth::id()) { + return back()->with('error', 'Operasi ditolak: Anda tidak dapat menghapus akun Anda sendiri.'); + } + + // Keamanan 2: Cegah menghapus jika merupakan super admin terakhir + if ($user->isSuperAdmin()) { + $superAdminCount = User::whereIn('role', ['super_admin', 'superadmin', 'admin'])->count(); + if ($superAdminCount <= 1) { + return back()->with('error', 'Operasi ditolak: Akun Super Admin terakhir tidak boleh dihapus.'); + } + } + + // Keamanan 3: Cegah penghapusan jika Karyawan memiliki riwayat aktivitas atau P2H + if ($user->employee) { + if ($user->employee->activities()->exists()) { + return back()->with('error', "Operasi ditolak: Akun '{$user->name}' tidak dapat dihapus karena memiliki riwayat log pergerakan kendaraan di pos gerbang."); + } + if ($user->employee->p2hRecords()->exists()) { + return back()->with('error', "Operasi ditolak: Akun '{$user->name}' tidak dapat dihapus karena memiliki riwayat checksheet inspeksi keselamatan P2H."); + } + } + + // Keamanan 4: Cegah penghapusan jika Petugas Satpam memiliki riwayat validasi pos gerbang + if ($user->securityGuard) { + if ($user->securityGuard->activities()->exists()) { + return back()->with('error', "Operasi ditolak: Petugas Satpam '{$user->name}' tidak dapat dihapus karena telah memvalidasi aktivitas kendaraan di pos gerbang."); + } + } + + $userName = $user->name; + DB::transaction(function () use ($user) { + if ($user->employee) { + $user->employee->delete(); + } + if ($user->securityGuard) { + $user->securityGuard->delete(); + } + $user->delete(); + }); + + return redirect()->route('superadmin.roles.index') + ->with('success', "Akun '{$userName}' telah berhasil dihapus dari sistem."); + } + + /** + * Reset password akun pengguna menjadi default "password". + */ + public function resetPassword(int $id): RedirectResponse + { + $user = User::findOrFail($id); + $user->update([ + 'password' => Hash::make('password'), + ]); + + return redirect()->route('superadmin.roles.index') + ->with('success', "Password akun '{$user->name}' berhasil direset ke default ('password')."); + } +} diff --git a/app/Http/Middleware/CheckRole.php b/app/Http/Middleware/CheckRole.php index df3bee4..a65c132 100644 --- a/app/Http/Middleware/CheckRole.php +++ b/app/Http/Middleware/CheckRole.php @@ -21,8 +21,8 @@ class CheckRole $userRole = $request->user()->role; - // Role 'admin' selalu memiliki hak akses penuh - if ($userRole === 'admin' || in_array($userRole, $roles)) { + // Role 'super_admin' dan 'admin' selalu memiliki hak akses penuh ke seluruh modul + if (in_array($userRole, ['super_admin', 'superadmin', 'admin']) || in_array($userRole, $roles)) { return $next($request); } diff --git a/app/Models/Employee.php b/app/Models/Employee.php index f589c0b..cadf280 100644 --- a/app/Models/Employee.php +++ b/app/Models/Employee.php @@ -6,6 +6,7 @@ use Carbon\Carbon; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; class Employee extends Model @@ -13,6 +14,7 @@ class Employee extends Model use HasFactory; protected $fillable = [ + 'user_id', 'nik', 'name', 'unit_kerja', @@ -52,4 +54,14 @@ class Employee extends Model { return $this->hasMany(VehicleActivity::class, 'driver_id'); } + + public function p2hRecords(): HasMany + { + return $this->hasMany(P2hRecord::class, 'employee_id')->orderByDesc('inspected_at'); + } + + public function user(): BelongsTo + { + return $this->belongsTo(User::class); + } } diff --git a/app/Models/P2hRecord.php b/app/Models/P2hRecord.php new file mode 100644 index 0000000..73ab7bf --- /dev/null +++ b/app/Models/P2hRecord.php @@ -0,0 +1,88 @@ + 'decimal:2', + 'start_km' => 'decimal:2', + 'defect_count' => 'integer', + 'start_time' => 'datetime', + 'stop_time' => 'datetime', + 'validated_at' => 'datetime', + 'inspected_at' => 'datetime', + ]; + + public function vehicle(): BelongsTo + { + return $this->belongsTo(Vehicle::class); + } + + public function employee(): BelongsTo + { + return $this->belongsTo(Employee::class); + } + + public function template(): BelongsTo + { + return $this->belongsTo(P2hTemplate::class, 'template_id'); + } + + public function validator(): BelongsTo + { + return $this->belongsTo(User::class, 'validated_by'); + } + + public function items(): HasMany + { + return $this->hasMany(P2hRecordItem::class, 'p2h_record_id'); + } + + public function isPending(): bool + { + return $this->validation_status === 'pending'; + } + + public function isApproved(): bool + { + return $this->validation_status === 'approved'; + } + + public function isRejected(): bool + { + return $this->validation_status === 'rejected'; + } + + public function hasDefects(): bool + { + return $this->summary_condition === 'has_defect' || $this->defect_count > 0; + } +} diff --git a/app/Models/P2hRecordItem.php b/app/Models/P2hRecordItem.php new file mode 100644 index 0000000..8686668 --- /dev/null +++ b/app/Models/P2hRecordItem.php @@ -0,0 +1,43 @@ +belongsTo(P2hRecord::class, 'p2h_record_id'); + } + + public function templateItem(): BelongsTo + { + return $this->belongsTo(P2hTemplateItem::class, 'template_item_id'); + } + + public function isBaik(): bool + { + return strtolower((string)$this->condition_status) === 'baik'; + } + + public function isRusak(): bool + { + return strtolower((string)$this->condition_status) === 'rusak'; + } +} diff --git a/app/Models/P2hTemplate.php b/app/Models/P2hTemplate.php new file mode 100644 index 0000000..96fb246 --- /dev/null +++ b/app/Models/P2hTemplate.php @@ -0,0 +1,51 @@ + 'boolean', + ]; + + public function items(): HasMany + { + return $this->hasMany(P2hTemplateItem::class, 'template_id')->orderBy('sequence'); + } + + public function vehicles(): HasMany + { + return $this->hasMany(Vehicle::class, 'p2h_template_id'); + } + + public function records(): HasMany + { + return $this->hasMany(P2hRecord::class, 'template_id'); + } + + /** + * Ambil item yang dikelompokkan berdasarkan section. + */ + public function getGroupedItemsAttribute(): array + { + $grouped = []; + foreach ($this->items as $item) { + $grouped[$item->section][] = $item; + } + return $grouped; + } +} diff --git a/app/Models/P2hTemplateItem.php b/app/Models/P2hTemplateItem.php new file mode 100644 index 0000000..3c7a031 --- /dev/null +++ b/app/Models/P2hTemplateItem.php @@ -0,0 +1,47 @@ + 'integer', + ]; + + public function template(): BelongsTo + { + return $this->belongsTo(P2hTemplate::class, 'template_id'); + } + + /** + * Konversi question_type (termasuk nilai legacy) ke label standar resmi. + */ + public function getQuestionTypeLabelAttribute(): string + { + return match(strtolower(trim($this->question_type))) { + 'multiple lines text box', 'textarea' => 'Multiple Lines Text Box', + 'single line text box', 'text' => 'Single Line Text Box', + 'numerical value', 'number' => 'Numerical Value', + 'date' => 'Date', + 'datetime' => 'Datetime', + 'multiple choice: only one answer', 'choice', 'condition' => 'Multiple choice: only one answer', + 'multiple choice: multiple answers allowed', 'multiple_choice' => 'Multiple choice: multiple answers allowed', + 'matrix' => 'Matrix', + default => $this->question_type, + }; + } +} diff --git a/app/Models/User.php b/app/Models/User.php index 130f570..c4ea9a2 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -52,6 +52,24 @@ class User extends Authenticatable ]; } + protected static function booted(): void + { + static::deleting(function (User $user) { + if ($user->employee) { + if ($user->employee->activities()->exists() || $user->employee->p2hRecords()->exists()) { + throw new \Exception("Tidak dapat menghapus user: Karyawan '{$user->name}' memiliki data audit riwayat operasional kendaraan atau inspeksi P2H."); + } + $user->employee->delete(); + } + if ($user->securityGuard) { + if ($user->securityGuard->activities()->exists()) { + throw new \Exception("Tidak dapat menghapus user: Petugas Satpam '{$user->name}' memiliki riwayat data validasi pos gerbang."); + } + $user->securityGuard->delete(); + } + }); + } + public function gate(): BelongsTo { return $this->belongsTo(Gate::class); @@ -62,6 +80,16 @@ class User extends Authenticatable return $this->hasOne(SecurityGuard::class); } + public function employee(): HasOne + { + return $this->hasOne(Employee::class); + } + + public function isEmployee(): bool + { + return $this->role === 'employee'; + } + public function isGateOfficer(): bool { return $this->role === 'gate_officer'; @@ -82,8 +110,13 @@ class User extends Authenticatable return $this->role === 'pg_admin'; } + public function isSuperAdmin(): bool + { + return in_array($this->role, ['super_admin', 'superadmin']); + } + public function isAdmin(): bool { - return $this->role === 'admin'; + return in_array($this->role, ['admin', 'super_admin', 'superadmin']); } } diff --git a/app/Models/Vehicle.php b/app/Models/Vehicle.php index 6c2477d..7d5b9b8 100644 --- a/app/Models/Vehicle.php +++ b/app/Models/Vehicle.php @@ -5,6 +5,7 @@ namespace App\Models; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; @@ -15,8 +16,11 @@ class Vehicle extends Model protected $fillable = [ 'code', 'category', + 'parent_id', + 'p2h_template_id', 'brand_type', 'license_plate', + 'serial_number', 'ownership', 'division', 'status', @@ -39,6 +43,7 @@ class Vehicle extends Model 'current_km' => 'decimal:2', 'fuel_consumption' => 'decimal:2', 'production_year' => 'integer', + 'parent_id' => 'integer', ]; public function isLightVehicle(): bool @@ -51,6 +56,16 @@ class Vehicle extends Model return $this->category === 'unit_support'; } + public function isSupportCategory(): bool + { + return $this->isUnitSupport() && is_null($this->parent_id); + } + + public function isSupportUnit(): bool + { + return $this->isUnitSupport() && !is_null($this->parent_id); + } + public function scopeLightVehicles(Builder $query): Builder { return $query->where('category', 'light_vehicle'); @@ -61,11 +76,72 @@ class Vehicle extends Model return $query->where('category', 'unit_support'); } + public function scopeUnitSupportCategories(Builder $query): Builder + { + return $query->where('category', 'unit_support')->whereNull('parent_id'); + } + + public function scopeUnitSupportPhysical(Builder $query): Builder + { + return $query->where('category', 'unit_support')->whereNotNull('parent_id'); + } + + public function parent(): BelongsTo + { + return $this->belongsTo(Vehicle::class, 'parent_id'); + } + + public function units(): HasMany + { + return $this->hasMany(Vehicle::class, 'parent_id')->orderBy('code'); + } + + /** + * Hitung nomor urut 3 digit berikutnya untuk unit fisik kategori ini. + */ + public function getNextUnitNumber(): string + { + $existingCodes = $this->units()->pluck('code')->all(); + $maxNum = 0; + foreach ($existingCodes as $c) { + if (preg_match('/' . preg_quote($this->code, '/') . '-(\d+)$/i', $c, $matches)) { + $num = (int)$matches[1]; + if ($num > $maxNum) { + $maxNum = $num; + } + } + } + return str_pad((string)($maxNum + 1), 3, '0', STR_PAD_LEFT); + } + + /** + * Hasilkan saran kode unit unik berikutnya (misal: BL01-001). + */ + public function getNextUnitCode(): string + { + return $this->code . '-' . $this->getNextUnitNumber(); + } + public function activities(): HasMany { return $this->hasMany(VehicleActivity::class); } + public function p2hTemplate(): BelongsTo + { + return $this->belongsTo(P2hTemplate::class, 'p2h_template_id'); + } + + public function p2hRecords(): HasMany + { + return $this->hasMany(P2hRecord::class, 'vehicle_id')->orderByDesc('inspected_at'); + } + + public function latestP2h(): HasOne + { + return $this->hasOne(P2hRecord::class, 'vehicle_id')->latestOfMany('inspected_at'); + } + /** * Aktivitas gerbang terakhir dari kendaraan ini. */ diff --git a/database/migrations/2026_10_12_000006_create_vehicle_activities_table.php b/database/migrations/2026_10_12_000006_create_vehicle_activities_table.php index 3739e75..5227438 100644 --- a/database/migrations/2026_10_12_000006_create_vehicle_activities_table.php +++ b/database/migrations/2026_10_12_000006_create_vehicle_activities_table.php @@ -14,9 +14,9 @@ return new class extends Migration Schema::create('vehicle_activities', function (Blueprint $table) { $table->id(); $table->string('transaction_no', 60)->unique(); - $table->foreignId('vehicle_id')->constrained('vehicles')->cascadeOnDelete(); - $table->foreignId('driver_id')->constrained('employees')->cascadeOnDelete(); - $table->foreignId('gate_id')->constrained('gates')->cascadeOnDelete(); + $table->foreignId('vehicle_id')->constrained('vehicles')->restrictOnDelete(); + $table->foreignId('driver_id')->constrained('employees')->restrictOnDelete(); + $table->foreignId('gate_id')->constrained('gates')->restrictOnDelete(); $table->string('direction', 10); // 'in', 'out' $table->decimal('previous_km', 12, 2); $table->decimal('current_km', 12, 2); diff --git a/database/migrations/2026_10_14_000001_add_user_id_to_employees_table.php b/database/migrations/2026_10_14_000001_add_user_id_to_employees_table.php new file mode 100644 index 0000000..7f6c031 --- /dev/null +++ b/database/migrations/2026_10_14_000001_add_user_id_to_employees_table.php @@ -0,0 +1,49 @@ +foreignId('user_id')->nullable()->after('id')->constrained('users')->nullOnDelete(); + }); + + // Buat akun user login otomatis untuk karyawan yang sudah ada di sistem + $employees = Employee::whereNull('user_id')->get(); + foreach ($employees as $emp) { + $cleanNik = strtolower(str_replace(['-', ' '], '', $emp->nik)); + $user = User::firstOrCreate( + ['username' => $emp->nik], + [ + 'name' => $emp->name, + 'email' => $cleanNik . '@kmh.co.id', + 'password' => Hash::make('password'), + 'role' => 'employee', + ] + ); + + $emp->update(['user_id' => $user->id]); + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('employees', function (Blueprint $table) { + $table->dropForeign(['user_id']); + $table->dropColumn('user_id'); + }); + } +}; diff --git a/database/migrations/2026_10_15_000001_create_p2h_tables.php b/database/migrations/2026_10_15_000001_create_p2h_tables.php new file mode 100644 index 0000000..0f1451e --- /dev/null +++ b/database/migrations/2026_10_15_000001_create_p2h_tables.php @@ -0,0 +1,105 @@ +id(); + $table->string('code', 50)->unique(); // Checksheet Code, misal: EXD4RP + $table->string('name', 100); // Kategori, misal: Excavator + $table->string('file_name', 150)->nullable(); + $table->text('description')->nullable(); + $table->boolean('is_active')->default(true); + $table->timestamps(); + }); + + // 2. Tabel Butir Pertanyaan / Item Cek per Template + Schema::create('p2h_template_items', function (Blueprint $table) { + $table->id(); + $table->foreignId('template_id')->constrained('p2h_templates')->cascadeOnDelete(); + $table->string('section', 100); // Start, Sebelum Mesin Hidup, Setelah Mesin Menyala, dll + $table->string('title', 255); // Pertanyaan / Butir Pemeriksaan + $table->string('question_type', 50); // choice, datetime, number, text + $table->integer('sequence')->default(0); + $table->timestamps(); + + $table->index(['template_id', 'sequence']); + }); + + // 3. Tambahkan Foreign Key p2h_template_id pada tabel vehicles + Schema::table('vehicles', function (Blueprint $table) { + $table->foreignId('p2h_template_id')->nullable()->after('category')->constrained('p2h_templates')->nullOnDelete(); + }); + + // 4. Tabel Transaksi / Riwayat P2H + Schema::create('p2h_records', function (Blueprint $table) { + $table->id(); + $table->string('transaction_no', 60)->unique(); + $table->foreignId('vehicle_id')->constrained('vehicles')->restrictOnDelete(); + $table->foreignId('employee_id')->constrained('employees')->restrictOnDelete(); + $table->foreignId('template_id')->constrained('p2h_templates')->restrictOnDelete(); + $table->string('shift', 30); // Shift 1, Shift 2 + $table->decimal('start_hm', 12, 2); + $table->decimal('start_km', 12, 2)->nullable(); + $table->dateTime('start_time')->nullable(); + $table->dateTime('stop_time')->nullable(); + $table->string('summary_condition', 30)->default('good'); // good, has_defect + $table->integer('defect_count')->default(0); + $table->text('general_notes')->nullable(); + $table->string('validation_status', 20)->default('pending'); // pending, approved, rejected + $table->foreignId('validated_by')->nullable()->constrained('users')->nullOnDelete(); + $table->dateTime('validated_at')->nullable(); + $table->text('validation_notes')->nullable(); + $table->dateTime('inspected_at'); + $table->timestamps(); + + $table->index(['vehicle_id', 'inspected_at']); + $table->index(['employee_id', 'inspected_at']); + $table->index(['validation_status']); + }); + + // 5. Tabel Hasil Pengecekan Butir Item P2H + Schema::create('p2h_record_items', function (Blueprint $table) { + $table->id(); + $table->foreignId('p2h_record_id')->constrained('p2h_records')->cascadeOnDelete(); + $table->foreignId('template_item_id')->nullable()->constrained('p2h_template_items')->nullOnDelete(); + $table->string('section', 100); + $table->string('title', 255); + $table->string('question_type', 50); + $table->string('condition_status', 20)->nullable(); // 'baik', 'rusak' + $table->text('answer_value')->nullable(); + $table->text('notes')->nullable(); + $table->timestamps(); + + $table->index(['p2h_record_id', 'condition_status']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('p2h_record_items'); + Schema::dropIfExists('p2h_records'); + + if (Schema::hasColumn('vehicles', 'p2h_template_id')) { + Schema::table('vehicles', function (Blueprint $table) { + $table->dropForeign(['p2h_template_id']); + $table->dropColumn('p2h_template_id'); + }); + } + + Schema::dropIfExists('p2h_template_items'); + Schema::dropIfExists('p2h_templates'); + } +}; diff --git a/database/migrations/2026_10_15_084650_add_parent_id_to_vehicles_table.php b/database/migrations/2026_10_15_084650_add_parent_id_to_vehicles_table.php new file mode 100644 index 0000000..7d8a763 --- /dev/null +++ b/database/migrations/2026_10_15_084650_add_parent_id_to_vehicles_table.php @@ -0,0 +1,33 @@ +foreignId('parent_id') + ->nullable() + ->after('category') + ->constrained('vehicles') + ->cascadeOnDelete(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('vehicles', function (Blueprint $table) { + $table->dropForeign(['parent_id']); + $table->dropColumn('parent_id'); + }); + } +}; diff --git a/database/migrations/2026_10_15_092500_add_serial_number_to_vehicles_table.php b/database/migrations/2026_10_15_092500_add_serial_number_to_vehicles_table.php new file mode 100644 index 0000000..034182f --- /dev/null +++ b/database/migrations/2026_10_15_092500_add_serial_number_to_vehicles_table.php @@ -0,0 +1,30 @@ +string('serial_number', 100) + ->nullable() + ->after('license_plate'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('vehicles', function (Blueprint $table) { + $table->dropColumn('serial_number'); + }); + } +}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index af776a0..4553479 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -76,7 +76,16 @@ class DatabaseSeeder extends Seeder ]); } - // 3. Seed Users (Admin & Shared Gate Accounts) + // 3. Seed Users (Super Admin, Dept Admins & Shared Gate Accounts) + // Super Admin [Nama : Super Administrator, Username : superadmin, Password : password] + User::create([ + 'name' => 'Super Administrator', + 'username' => 'superadmin', + 'email' => 'superadmin@kmh.co.id', + 'password' => Hash::make('password'), + 'role' => 'super_admin', + ]); + // Admin HSE [Nama : Mima, Username : 1185, Password : password] User::create([ 'name' => 'Mima', @@ -104,74 +113,58 @@ class DatabaseSeeder extends Seeder 'role' => 'pg_admin', ]); - // Shared Gate Accounts (Akun Pos Gerbang) - User::create([ - 'name' => 'Pos Gerbang Beringin Tunggal', - 'username' => 'pos.beringin', - 'email' => 'pos.beringin@kmh.co.id', - 'password' => Hash::make('password'), - 'role' => 'gate_officer', - 'gate_id' => $createdGates['BTUNGGAL']->id, - ]); + // 4. Seed Employees (Master Data HSE & Akun Login Karyawan dengan Role 'employee') + $employeesData = [ + [ + 'nik' => 'KMH-2022-001', + 'name' => 'Eka Sufiatna', + 'unit_kerja' => 'Teknik', + 'division' => 'INFORMATION & TECHNOLOGY', + 'position' => 'IT Division Coordinator', + 'is_operator' => true, + 'simper_expired_at' => Carbon::now()->addMonths(8), // SIMPER AKTIF + ], + [ + 'nik' => 'KMH-2022-045', + 'name' => 'Wanturi', + 'unit_kerja' => 'Umum', + 'division' => 'GA', + 'position' => 'Driver Operasional', + 'is_operator' => true, + 'simper_expired_at' => Carbon::now()->addMonths(4), // SIMPER AKTIF + ], + [ + 'nik' => 'KMH-2023-012', + 'name' => 'Randi Kurniawan', + 'unit_kerja' => 'Pembangkit', + 'division' => 'Mechanical', + 'position' => 'Operator Lapangan', + 'is_operator' => true, + 'simper_expired_at' => Carbon::now()->subDays(14), // SIMPER KEDALUWARSA (Untuk Test Validasi) + ], + [ + 'nik' => 'KMH-2021-088', + 'name' => 'Siti Rahma', + 'unit_kerja' => 'Umum', + 'division' => 'Keuangan', + 'position' => 'Staff Finance', + 'is_operator' => false, // BUKAN DRIVER + 'simper_expired_at' => null, + ], + ]; - User::create([ - 'name' => 'Pos Gerbang Adit 1', - 'username' => 'pos.adit1', - 'email' => 'pos.adit1@kmh.co.id', - 'password' => Hash::make('password'), - 'role' => 'gate_officer', - 'gate_id' => $createdGates['ADIT1']->id, - ]); + foreach ($employeesData as $emp) { + $empUser = User::create([ + 'name' => $emp['name'], + 'username' => $emp['nik'], + 'email' => strtolower(str_replace(['-', ' '], '', $emp['nik'])) . '@kmh.co.id', + 'password' => Hash::make('password'), + 'role' => 'employee', + ]); - User::create([ - 'name' => 'Pos Gerbang Regulating Weir', - 'username' => 'pos.regweir', - 'email' => 'pos.regweir@kmh.co.id', - 'password' => Hash::make('password'), - 'role' => 'gate_officer', - 'gate_id' => $createdGates['REGWEIR']->id, - ]); - - // 4. Seed Employees (Master Data HSE: Driver dengan SIMPER Valid dan Expired) - Employee::create([ - 'nik' => 'KMH-2022-001', - 'name' => 'Eka Sufiatna', - 'unit_kerja' => 'Teknik', - 'division' => 'INFORMATION & TECHNOLOGY', - 'position' => 'IT Division Coordinator', - 'is_operator' => true, - 'simper_expired_at' => Carbon::now()->addMonths(8), // SIMPER AKTIF - ]); - - Employee::create([ - 'nik' => 'KMH-2022-045', - 'name' => 'Wanturi', - 'unit_kerja' => 'Umum', - 'division' => 'GA', - 'position' => 'Driver Operasional', - 'is_operator' => true, - 'simper_expired_at' => Carbon::now()->addMonths(4), // SIMPER AKTIF - ]); - - Employee::create([ - 'nik' => 'KMH-2023-012', - 'name' => 'Randi Kurniawan', - 'unit_kerja' => 'Pembangkit', - 'division' => 'Mechanical', - 'position' => 'Operator Lapangan', - 'is_operator' => true, - 'simper_expired_at' => Carbon::now()->subDays(14), // SIMPER KEDALUWARSA (Untuk Test Validasi) - ]); - - Employee::create([ - 'nik' => 'KMH-2021-088', - 'name' => 'Siti Rahma', - 'unit_kerja' => 'Umum', - 'division' => 'Keuangan', - 'position' => 'Staff Finance', - 'is_operator' => false, // BUKAN DRIVER - 'simper_expired_at' => null, - ]); + $emp['user_id'] = $empUser->id; + Employee::create($emp); + } // 5. Seed Vehicles (Master Data QMA: Kendaraan Ringan / LV) Vehicle::create([ @@ -267,5 +260,8 @@ class DatabaseSeeder extends Seeder 'stnk_document' => 'STNK-BH-8412-AA', 'kir_document' => 'KIR-2026/11', ]); + + // 7. Seed 28 Master Template P2H Unit Support + $this->call(P2hTemplateSeeder::class); } } diff --git a/database/seeders/P2hTemplateSeeder.php b/database/seeders/P2hTemplateSeeder.php new file mode 100644 index 0000000..60044e7 --- /dev/null +++ b/database/seeders/P2hTemplateSeeder.php @@ -0,0 +1,185 @@ +command->error("Direktori {$dir} tidak ditemukan."); + return; + } + + $files = glob("{$dir}/*.md"); + $this->command->info("Ditemukan " . count($files) . " file template P2H."); + + DB::transaction(function () use ($files) { + foreach ($files as $file) { + $content = file_get_contents($file); + $fileName = basename($file); + + // 1. Ekstrak Judul Kategori + // Pola: # [P2H Excavator](url) atau # P2H Excavator + $categoryName = ''; + if (preg_match('/#\s*\[?P2H\s+([^\]\(\r\n]+)/i', $content, $mTitle)) { + $categoryName = trim($mTitle[1]); + } + + // 2. Ekstrak Checksheet Code + // Pola: * **Checksheet Code:** `EXD4RP` + $checksheetCode = ''; + if (preg_match('/Checksheet Code:\**\s*`?([A-Za-z0-9]+)`?/i', $content, $mCode)) { + $checksheetCode = trim($mCode[1]); + } + + if (!$checksheetCode) { + // Fallback kode dari nama file jika tidak ditemukan regex + $checksheetCode = strtoupper(Str::slug($categoryName, '_')); + } + + $template = P2hTemplate::updateOrCreate( + ['code' => $checksheetCode], + [ + 'name' => $categoryName ?: pathinfo($fileName, PATHINFO_FILENAME), + 'file_name' => $fileName, + 'description' => "Template form inspeksi P2H resmi untuk kategori {$categoryName} (Kode: {$checksheetCode}).", + 'is_active' => true, + ] + ); + + // Bersihkan item lama jika seeder dijalankan ulang + $template->items()->delete(); + + // 3. Parse Baris Tabel Markdown + $lines = explode("\n", $content); + $currentSection = 'General'; + $sequence = 1; + + foreach ($lines as $line) { + $line = trim($line); + if (str_starts_with($line, '|')) { + $cols = array_map('trim', explode('|', $line)); + // cols format: [0]=>'', [1]=>No, [2]=>Section, [3]=>Title, [4]=>Question Type, [5]=>Sequence, [6]=>'' + if (count($cols) >= 6 && is_numeric($cols[1])) { + $rawSection = trim(str_replace('**', '', $cols[2])); + $title = trim($cols[3]); + $rawType = trim($cols[4]); + + // Jika baris adalah penanda Header Section + if (stripos($title, 'Header Section') !== false || $rawType === '-') { + if (!empty($rawSection)) { + $currentSection = $rawSection; + } + continue; + } + + // Abaikan baris penutup jika berupa baris survey kosong + if (stripos($title, 'Penutup') !== false || stripos($rawSection, 'Penutup') !== false) { + continue; + } + + if (!empty($rawSection) && $rawSection !== $currentSection) { + $currentSection = $rawSection; + } + + // Map question type + $qType = match(true) { + stripos($rawType, 'Datetime') !== false => 'datetime', + stripos($rawType, 'Numerical') !== false => 'number', + stripos($rawType, 'Multiple Lines') !== false => 'text', + stripos($rawType, 'Single Line') !== false => 'text', + default => 'choice', + }; + + P2hTemplateItem::create([ + 'template_id' => $template->id, + 'section' => $currentSection, + 'title' => $title, + 'question_type' => $qType, + 'sequence' => $sequence++, + ]); + } + } + } + } + + // 4. Data Unit Kendaraan Support untuk Seluruh 28 Kategori P2H + $defaultUnits = [ + 'VGRM7Z' => ['code' => 'BL01', 'brand_type' => 'GENIE Z-45/25J DC BOOMLIFT', 'unit_type' => 'Articulating Boomlift', 'brand' => 'Genie', 'km' => 850.0, 'loc' => 'Powerhouse Area'], + 'VGRM7X' => ['code' => 'BP01', 'brand_type' => 'BAUER BG 28 H ROTARY DRILL', 'unit_type' => 'Bore Pile Rig', 'brand' => 'Bauer', 'km' => 1240.0, 'loc' => 'Inlet Dam'], + 'CDRM7C' => ['code' => 'CD01', 'brand_type' => 'BRODERSON IC-200-3J CARRY CRANE', 'unit_type' => 'Carry Deck Crane 15T', 'brand' => 'Broderson', 'km' => 980.0, 'loc' => 'Workshop Utama'], + 'YMWL9T' => ['code' => 'CE01', 'brand_type' => 'ATLAS COPCO GA 75 VSD ELECTRIC', 'unit_type' => 'Electric Compressor', 'brand' => 'Atlas Copco', 'km' => 2100.0, 'loc' => 'Tunnel Adit 1'], + 'YKWL9C' => ['code' => 'CG01', 'brand_type' => 'SULLAIR 375H DIESEL ENGINE', 'unit_type' => 'Engine Compressor', 'brand' => 'Sullair', 'km' => 1650.0, 'loc' => 'Regulating Weir'], + 'CPWL9P' => ['code' => 'CPE01', 'brand_type' => 'PUTZMEISTER BSA 1407 D PORTABLE', 'unit_type' => 'Trailer Concrete Pump Electric', 'brand' => 'Putzmeister', 'km' => 740.0, 'loc' => 'Spillway Area'], + 'CPWL9E' => ['code' => 'CPG01', 'brand_type' => 'SCHWING SP 500 DIESEL PUMP', 'unit_type' => 'Portable Concrete Pump Engine', 'brand' => 'Schwing', 'km' => 890.0, 'loc' => 'Surge Tank'], + '29NVFP' => ['code' => 'CPT01', 'brand_type' => 'SANY SY36 RZ5-130 PUMP TRUCK', 'unit_type' => 'Concrete Pump Truck 36M', 'brand' => 'Sany', 'km' => 3120.0, 'loc' => 'CCR DAM'], + 'CT723D' => ['code' => 'CT01', 'brand_type' => 'ISUZU GIGA FVR 34P TADANO 5T', 'unit_type' => 'Crane Truck Cargo', 'brand' => 'Isuzu', 'km' => 4500.0, 'loc' => 'Gudang Induk'], + 'EH713B' => ['code' => 'CC01', 'brand_type' => 'KOBELCO 7055-2 55T CRAWLER', 'unit_type' => 'Crawler Crane Lattice', 'brand' => 'Kobelco', 'km' => 2800.0, 'loc' => 'Bendungan Utama'], + 'CR77BD' => ['code' => 'CRD01', 'brand_type' => 'SANDVIK DX700 SURFACE DRILL', 'unit_type' => 'Crawler Rig Drill', 'brand' => 'Sandvik', 'km' => 1950.0, 'loc' => 'Quarry Area'], + 'DZ76BR' => ['code' => 'DZ01', 'brand_type' => 'KOMATSU D85ESS-2 DOZER', 'unit_type' => 'Crawler Bulldozer', 'brand' => 'Komatsu', 'km' => 4200.0, 'loc' => 'Disposal Area'], + 'R8D3SY' => ['code' => 'DT02', 'brand_type' => 'MITSUBISHI FUSO FIGHTER FN62F', 'unit_type' => 'Dump Truck 20 Ton', 'brand' => 'Mitsubishi', 'km' => 14800.0, 'loc' => 'Quarry & Disposal'], + 'EXD4RP' => ['code' => 'EX01', 'brand_type' => 'KOMATSU PC200-8 EXCAVATOR', 'unit_type' => 'Hydraulic Excavator', 'brand' => 'Komatsu', 'km' => 3450.0, 'loc' => 'Beringin Tunggal / Tunnel #2'], + 'FKD4LY' => ['code' => 'FL01', 'brand_type' => 'TOYOTA 8FD30 DIESEL 3.0T', 'unit_type' => 'Industrial Forklift', 'brand' => 'Toyota', 'km' => 1100.0, 'loc' => 'Gudang Logistik'], + 'R5D3FT' => ['code' => 'FT01', 'brand_type' => 'HINO RANGER FM 260 JD FUEL 10KL', 'unit_type' => 'Fuel Dispenser Truck', 'brand' => 'Hino', 'km' => 8200.0, 'loc' => 'Stasiun Pengisian BBM'], + 'JD7553D' => ['code' => 'JD01', 'brand_type' => 'EPIROC BOOMER 282 JUMBO DRILL', 'unit_type' => 'Underground Jumbo Drill', 'brand' => 'Epiroc', 'km' => 1450.0, 'loc' => 'Tunnel Adit 2'], + 'RF89BB' => ['code' => 'MN01', 'brand_type' => 'MANITOU MT-X 1840 TELEHANDLER', 'unit_type' => 'Telescopic Handler', 'brand' => 'Manitou', 'km' => 1350.0, 'loc' => 'Powerhouse Yard'], + 'MG79KB' => ['code' => 'MG01', 'brand_type' => 'CATERPILLAR 140K MOTOR GRADER', 'unit_type' => 'Motor Grader 14ft', 'brand' => 'Caterpillar', 'km' => 2900.0, 'loc' => 'Jalan Akses Utama'], + 'ML71KB' => ['code' => 'ML01', 'brand_type' => 'ITC 312 H6 TUNNEL LOADER', 'unit_type' => 'Tunnel Mucking Loader', 'brand' => 'ITC', 'km' => 920.0, 'loc' => 'Tunnel Adit 3'], + 'EH713C' => ['code' => 'CR01', 'brand_type' => 'KATO SR-250R 25T ROUGH CRANE', 'unit_type' => 'Rough Terrain Crane', 'brand' => 'Kato', 'km' => 1820.0, 'loc' => 'CCR DAM / Spillway'], + 'SSLS5W' => ['code' => 'SL01', 'brand_type' => 'JLG 1930ES ELECTRIC SCISSOR', 'unit_type' => 'Electric Scissorlift', 'brand' => 'JLG', 'km' => 620.0, 'loc' => 'Powerhouse Interior'], + 'MS31AC' => ['code' => 'SC01', 'brand_type' => 'NORMET SPRAYMEC 8100 VC', 'unit_type' => 'Tunnel Shotcrete Sprayer', 'brand' => 'Normet', 'km' => 1180.0, 'loc' => 'Tunnel Main Header'], + 'R8D3SW' => ['code' => 'TM01', 'brand_type' => 'HINO DUTRO 130 HD TRUK MIXER', 'unit_type' => 'Transit Mixer 3m3', 'brand' => 'Hino', 'km' => 5400.0, 'loc' => 'Batching Plant'], + 'MV54AH' => ['code' => 'VB01', 'brand_type' => 'BOMAG BW 211 D-4 VIBRO ROLLER', 'unit_type' => 'Single Drum Roller', 'brand' => 'Bomag', 'km' => 2600.0, 'loc' => 'Dam Embankment'], + 'CWPK3N' => ['code' => 'WP01', 'brand_type' => 'SELWOOD S150 WATER PUMP 6 INCH', 'unit_type' => 'Dewatering Water Pump', 'brand' => 'Selwood', 'km' => 1550.0, 'loc' => 'Cofferdam Sump'], + 'WT51DB' => ['code' => 'WT01', 'brand_type' => 'ISUZU GIGA FVR WATER TRUCK 8KL', 'unit_type' => 'Water Sprayer Truck', 'brand' => 'Isuzu', 'km' => 6700.0, 'loc' => 'Hauling Road'], + 'R8D3ST' => ['code' => 'WL01', 'brand_type' => 'CATERPILLAR 950H WHEEL LOADER', 'unit_type' => 'Wheel Loader 3.5m3', 'brand' => 'Caterpillar', 'km' => 3800.0, 'loc' => 'Crusher Plant'], + ]; + + foreach ($defaultUnits as $tmplCode => $uData) { + $tmpl = P2hTemplate::where('code', $tmplCode)->first(); + if (!$tmpl) continue; + + $existing = Vehicle::where('code', $uData['code'])->first(); + if ($existing) { + $existing->update([ + 'p2h_template_id' => $tmpl->id, + 'unit_category' => $tmpl->name, + ]); + } else { + Vehicle::create([ + 'code' => $uData['code'], + 'category' => 'unit_support', + 'p2h_template_id' => $tmpl->id, + 'brand_type' => $uData['brand_type'], + 'unit_category' => $tmpl->name, + 'unit_type' => $uData['unit_type'], + 'brand' => $uData['brand'], + 'ownership' => 'PT Kerinci Merangin Hidro', + 'division' => 'Operasional', + 'location' => $uData['loc'], + 'status' => 'Operation', + 'current_km' => $uData['km'], + ]); + } + } + }); + + $this->command->info("Seeder P2H berhasil! Seluruh 28 template kategori telah diimpor."); + } +} diff --git a/database/seeders/SuperAdminSeeder.php b/database/seeders/SuperAdminSeeder.php new file mode 100644 index 0000000..1610ab6 --- /dev/null +++ b/database/seeders/SuperAdminSeeder.php @@ -0,0 +1,26 @@ + 'superadmin'], + [ + 'name' => 'Super Administrator', + 'email' => 'superadmin@kmh.co.id', + 'password' => Hash::make('password'), + 'role' => 'super_admin', + ] + ); + } +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..562a664 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,88 @@ +services: + # --------------------------------------------------------------------------- + # 1. Aplikasi Laravel (PHP 8.2-FPM Alpine) + # --------------------------------------------------------------------------- + app: + container_name: rkm_app + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + environment: + APP_ENV: ${APP_ENV:-production} + APP_DEBUG: ${APP_DEBUG:-false} + DB_CONNECTION: mysql + DB_HOST: db + DB_PORT: 3306 + DB_DATABASE: ${DB_DATABASE:-rkm_kmh} + DB_USERNAME: ${DB_USERNAME:-rkm_user} + DB_PASSWORD: ${DB_PASSWORD:-rkm_secret_password} + RUN_SEEDER: ${RUN_SEEDER:-false} + volumes: + - rkm_storage:/var/www/storage + - rkm_bootstrap_cache:/var/www/bootstrap/cache + depends_on: + db: + condition: service_healthy + networks: + - rkm_network + + # --------------------------------------------------------------------------- + # 2. Web Server Nginx (Reverse Proxy & Static Asset Handler) + # --------------------------------------------------------------------------- + web: + container_name: rkm_web + image: nginx:alpine + restart: unless-stopped + ports: + - "${APP_PORT:-80}:80" + volumes: + - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro + - .:/var/www:ro + - rkm_storage:/var/www/storage:ro + depends_on: + - app + networks: + - rkm_network + + # --------------------------------------------------------------------------- + # 3. Database Server MySQL 8.0 (Enterprise Relational Database) + # --------------------------------------------------------------------------- + db: + container_name: rkm_db + image: mysql:8.0 + restart: unless-stopped + command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + environment: + MYSQL_DATABASE: ${DB_DATABASE:-rkm_kmh} + MYSQL_USER: ${DB_USERNAME:-rkm_user} + MYSQL_PASSWORD: ${DB_PASSWORD:-rkm_secret_password} + MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-root_secret_password} + ports: + - "${FORWARD_DB_PORT:-3306}:3306" + volumes: + - rkm_mysql_data:/var/lib/mysql + healthcheck: + test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -p$${MYSQL_ROOT_PASSWORD} || exit 1"] + interval: 5s + timeout: 5s + retries: 10 + start_period: 15s + networks: + - rkm_network + +# ----------------------------------------------------------------------------- +# Persistent Volumes & Network Configurations +# ----------------------------------------------------------------------------- +volumes: + rkm_mysql_data: + name: rkm_mysql_data + rkm_storage: + name: rkm_storage + rkm_bootstrap_cache: + name: rkm_bootstrap_cache + +networks: + rkm_network: + name: rkm_network + driver: bridge diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 0000000..85989d4 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,52 @@ +#!/bin/sh +set -e + +echo "Starting RKM Laravel Application Container..." + +# Wait for MySQL to be ready if DB_CONNECTION is mysql +if [ "$DB_CONNECTION" = "mysql" ]; then + echo "Waiting for MySQL database at $DB_HOST:$DB_PORT..." + while ! nc -z "$DB_HOST" "$DB_PORT"; do + sleep 1 + done + echo "MySQL database is reachable!" +fi + +# Ensure storage directories exist and have proper permissions +mkdir -p /var/www/storage/framework/cache/data \ + /var/www/storage/framework/sessions \ + /var/www/storage/framework/views \ + /var/www/storage/logs \ + /var/www/bootstrap/cache + +chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache +chmod -R 775 /var/www/storage /var/www/bootstrap/cache + +# Run database migrations +echo "Executing database migrations..." +php artisan migrate --force + +# Seed database if explicitly requested +if [ "$RUN_SEEDER" = "true" ]; then + echo "Seeding database..." + php artisan db:seed --force +fi + +# Ensure symbolic link for storage +php artisan storage:link || true + +# Production optimization caches +if [ "$APP_ENV" = "production" ]; then + echo "Caching configuration, routes, and views for production..." + php artisan config:cache + php artisan route:cache + php artisan view:cache +else + echo "Clearing caches for non-production environment..." + php artisan config:clear + php artisan route:clear + php artisan view:clear +fi + +echo "RKM Laravel is ready! Starting PHP-FPM..." +exec "$@" diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf new file mode 100644 index 0000000..8565aec --- /dev/null +++ b/docker/nginx/default.conf @@ -0,0 +1,53 @@ +server { + listen 80; + server_name localhost; + root /var/www/public; + index index.php index.html; + + client_max_body_size 40M; + + # Security Headers + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-XSS-Protection "1; mode=block" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always; + + charset utf-8; + + # Gzip Compression + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml; + + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + # Static Assets Caching + location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv|svgz?|ttf|ttc|otf|eot|woff2?)$ { + expires 1y; + access_log off; + add_header Cache-Control "public, no-transform, immutable"; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + error_page 404 /index.php; + + location ~ \.php$ { + fastcgi_pass app:9000; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + include fastcgi_params; + fastcgi_hide_header X-Powered-By; + fastcgi_buffers 16 16k; + fastcgi_buffer_size 32k; + fastcgi_read_timeout 300; + } + + location ~ /\.(?!well-known).* { + deny all; + } +} diff --git a/docker/php/local.ini b/docker/php/local.ini new file mode 100644 index 0000000..39e161b --- /dev/null +++ b/docker/php/local.ini @@ -0,0 +1,7 @@ +upload_max_filesize = 40M +post_max_size = 40M +memory_limit = 512M +max_execution_time = 300 +max_input_time = 300 +date.timezone = Asia/Jakarta +expose_php = Off diff --git a/docker/php/opcache.ini b/docker/php/opcache.ini new file mode 100644 index 0000000..f3750dc --- /dev/null +++ b/docker/php/opcache.ini @@ -0,0 +1,10 @@ +[opcache] +opcache.enable = 1 +opcache.enable_cli = 1 +opcache.memory_consumption = 128 +opcache.interned_strings_buffer = 16 +opcache.max_accelerated_files = 10000 +opcache.revalidate_freq = 0 +opcache.validate_timestamps = 0 +opcache.save_comments = 1 +opcache.fast_shutdown = 1 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a5e8e54 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2495 @@ +{ + "name": "rkm-laravel", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "@tailwindcss/vite": "^4.0.0", + "axios": "^1.11.0", + "concurrently": "^9.0.1", + "laravel-vite-plugin": "^2.0.0", + "tailwindcss": "^4.0.0", + "vite": "^7.0.7" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.64.7.tgz", + "integrity": "sha512-GFF2tHk0NqYVObrK0+/ps/LEXsV/v2q6Lyiy7mZr+Ej24fpQScvqK2ziz9NHeEQYnKWKym38Ml7dZbPtC9tuAw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.64.7.tgz", + "integrity": "sha512-BOymcXJFYYXqluDidj6sLelNjXruC3u1BqVxLn2OPCXH9xaPSOTH+MS4uychsGI1NU7tJoiv9KvqijDHFe+hhQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.64.7.tgz", + "integrity": "sha512-jgVpGweIbls2H5jfBB70tnX52abMd5pJr3xmtoDILx6JdmGl+Un+tMb9R+MbHPVB46tTBpY8emtn7M71SnQhEQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.64.7.tgz", + "integrity": "sha512-AVMpt94mrXH7WjyWKmd9nT4RC5yM0AN3Lt6A89xVIsuLDi3dDX6dxMytLbW36FlppY9JsoqUoS3LUUpUrYxiMQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.64.7.tgz", + "integrity": "sha512-Nje29c/MyajxRNFGU05oyeTDS6SWdMg/wWMSlZSBTBju5BKz2NVc0kFiFSQGzRELNiB+CBk/ZvAVsWsENgjGag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.64.7.tgz", + "integrity": "sha512-xxgN5/kMzCNz/NYJ4t49B0/WS6InNlWv6xvgwUQqNnWM9WJMMwMUGWrAxdNEgYWdHL0sMnuh8I87StGrIMTA+w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.64.7.tgz", + "integrity": "sha512-5U/9gVn/X657I8+NHoHO9Wnfyd0lEXwqbslobRoB9TC8SwYzOitcIr6TLE7531Q/NWs3L4mb+YOGzlf3vHIeYw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.64.7.tgz", + "integrity": "sha512-hcDS0a/Y8ggM3dcOfzH7UpSaogCViWTtNDSl0EXpWIj8g8/r86ITqptjil2hayTXS0Umzb+Yt3mjgpQVFVf2+A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.64.7.tgz", + "integrity": "sha512-awbAr4N7Qd/yjZAQBEEPzgcPveYG2Gi5L6gq1/Bp+3SMRjn5F68Wv1zKsntzvvoioBR6yKvhLtWqu11am1TsxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.64.7.tgz", + "integrity": "sha512-Ut7xQJfeLhzu2yN3rHzVvL9ccyPJvN4aCdP1V7hJ5lGxX/eCzgB9SiMk/Md3J+rWWZgvoYsDW4BUFggJr32pBA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.64.7.tgz", + "integrity": "sha512-trqoni/vHkuM5oo5iQhoKPh6fjjD7E80pMgCXWgGxU8vSRPUlwvG8GeYvEEcB6eJAxNa99WH9iVHPHelgtKiHA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.64.7.tgz", + "integrity": "sha512-gvlUy0XFIwtUWiQmhc+4GT2Knm3KosinpUVhr7CtTFA78gFDnE5NWwMPzHrJsYpKkh2LlY7yvBIboN1FAV6Xeg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.64.7.tgz", + "integrity": "sha512-8yS/kSXTJ/47Z62JW+C2AJ3vd/8zZw016vFjtNpZwmZlwJumLua4s1i78dkYuSSqQ+0aIMxJcBp/4uIwp2ehjA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.64.7.tgz", + "integrity": "sha512-mxVSKvvty0hOP1AFo/l4Kpv3i3HK0zx4rYUrirZDToYlWhS3xzmIkq3vUJ7rtrM2cPyXveDyDT6M1FfXZ9hTRA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.64.7.tgz", + "integrity": "sha512-lEse1zra1CagM+uHH2bl28GInDsZZ45NJzHei2OMaXQFzZWKBO1hFo07rS0xB6ayV4WU360UrSmPDSyCMpYsUQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.64.7.tgz", + "integrity": "sha512-d/cqCoiG9WMZ5VuJZ5Qdlv9g97QyoGwnmvHccvGhKSacTy7xFrAS+jMcJSBdMNOw1oacSkl6p7K6O/DRYTKL3g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.64.7.tgz", + "integrity": "sha512-kVEA//CeDOZZP1XCH2JBgqXb9+ALlwuA/4civaazMVdgzaSQC9WM38w65zG/LLk0lA7F9Od19CSBZW7J9mCbNg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.64.7.tgz", + "integrity": "sha512-14oLfDsOSr0TSntT/34jRg/V8B2XW/Jomh9zX9CjIM9gwwNlI1OCymS/GVn0DV32h67eRf7U0GGem0rvfXgNwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.64.7.tgz", + "integrity": "sha512-dFVtPfjZqAnUPpPY4Bfg+87yo1IBW9HiY8iCFtg49Pn46MfZTebSHZh8PL6SOsgyt9LQP8Nj/sE6jm3aWpySmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.64.7.tgz", + "integrity": "sha512-Dm9CZ2SM3u2NgvBj4awW/gGqkOwzH8f6MSYIJE6+bKcKLI+T0+LhpD6vtetTfrIIx+rLXDf5RJqBP6v7V5O+wg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.64.7.tgz", + "integrity": "sha512-oaxsvS2mL6+78741CT2HCORBvy1USg3Wqpt5qvZwy3aMXRMl4zxyDo8maeFRWJkF3dp0Wbi71fKH5Gr9YI3vYA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.64.7.tgz", + "integrity": "sha512-UKZz1Y4mxUqkWh60uH7B1aZn6UcAimPk4ipRktpb3wfZq7JrzZYyAXTwiafkb3T+kd5P3Sf+vzcRdsDks4WtjQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.64.7.tgz", + "integrity": "sha512-WWkSuC1J+mZJnsDh0mRaCAFSWfQdl6y3fDjZeWElI6zHo8CcOSG5lY3yurKJjEq+FrX0WD60sFrVVpbHqzMmrw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.64.7.tgz", + "integrity": "sha512-u9bp2yXCI3/BUjUxY6uWknAY32pfvvDCPysyUTySotx0dj3ydlFHrRQYfn/b/kZgnfjyEwySMtI7Ga054uiysQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.64.7.tgz", + "integrity": "sha512-EhX6N3XPMEnVU5cRfNgzPOKcSucsbu3nNNWuoAaEuKIqmddBKHN5b9d4rPe65T1I+FaOT176JKiZNsUBp3rqbA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", + "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.1", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", + "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-x64": "4.3.3", + "@tailwindcss/oxide-freebsd-x64": "4.3.3", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-x64-musl": "4.3.3", + "@tailwindcss/oxide-wasm32-wasi": "4.3.3", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", + "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", + "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", + "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", + "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", + "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", + "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", + "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", + "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", + "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", + "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", + "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", + "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", + "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.3", + "@tailwindcss/oxide": "4.3.3", + "tailwindcss": "4.3.3" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", + "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concurrently": { + "version": "9.2.5", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.5.tgz", + "integrity": "sha512-YMZlvWrTPQEhjKp60XSmMGt60+pffbv6DyRnOMvVO98+J7aF8w8Ui9FhdcOwvSixc/kyR6SoVvmejcn/2lZBqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.12.0", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz", + "integrity": "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/follow-redirects": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", + "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/laravel-vite-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-2.1.0.tgz", + "integrity": "sha512-z+ck2BSV6KWtYcoIzk9Y5+p4NEjqM+Y4i8/H+VZRLq0OgNjW2DqyADquwYu5j8qRvaXwzNmfCWl1KrMlV1zpsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "vite-plugin-full-reload": "^1.1.0" + }, + "bin": { + "clean-orphaned-assets": "bin/clean.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^7.0.0" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.30.tgz", + "integrity": "sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.64.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.64.7.tgz", + "integrity": "sha512-aCiJONoZp0lNGJ6sYqspLkh6UXaWEey/7Ko2TZyXQ4kgzAhDUxAgbt/oulXKmD+zFHXw1k+RF6ZZWOrjp7DZnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.64.7", + "@rollup/rollup-android-arm64": "4.64.7", + "@rollup/rollup-darwin-arm64": "4.64.7", + "@rollup/rollup-darwin-x64": "4.64.7", + "@rollup/rollup-freebsd-arm64": "4.64.7", + "@rollup/rollup-freebsd-x64": "4.64.7", + "@rollup/rollup-linux-arm-gnueabihf": "4.64.7", + "@rollup/rollup-linux-arm-musleabihf": "4.64.7", + "@rollup/rollup-linux-arm64-gnu": "4.64.7", + "@rollup/rollup-linux-arm64-musl": "4.64.7", + "@rollup/rollup-linux-loong64-gnu": "4.64.7", + "@rollup/rollup-linux-loong64-musl": "4.64.7", + "@rollup/rollup-linux-ppc64-gnu": "4.64.7", + "@rollup/rollup-linux-ppc64-musl": "4.64.7", + "@rollup/rollup-linux-riscv64-gnu": "4.64.7", + "@rollup/rollup-linux-riscv64-musl": "4.64.7", + "@rollup/rollup-linux-s390x-gnu": "4.64.7", + "@rollup/rollup-linux-x64-gnu": "4.64.7", + "@rollup/rollup-linux-x64-musl": "4.64.7", + "@rollup/rollup-openbsd-x64": "4.64.7", + "@rollup/rollup-openharmony-arm64": "4.64.7", + "@rollup/rollup-win32-arm64-msvc": "4.64.7", + "@rollup/rollup-win32-ia32-msvc": "4.64.7", + "@rollup/rollup-win32-x64-gnu": "4.64.7", + "@rollup/rollup-win32-x64-msvc": "4.64.7", + "fsevents": "~2.3.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/shell-quote": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.12.0.tgz", + "integrity": "sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", + "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/vite": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.7.tgz", + "integrity": "sha512-AHEzTORMbi7/7aXp7w7KZ5+DCUdSeLsJz0grY8xHpc9DHdYb0vQu6DqJfm2tOw3gDExNgPgnJTXxM6syYFHaCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.27.0 || ^0.28.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-full-reload": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.2.0.tgz", + "integrity": "sha512-kz18NW79x0IHbxRSHm0jttP4zoO9P9gXh+n6UTwlNKnviTTEpOlum6oS9SmecrTtSr+muHEn5TUuC75UovQzcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + }, + "node_modules/vite-plugin-full-reload/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index c43f28b..ccf42cc 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -4,7 +4,7 @@ Masuk ke Sistem RKM - PT Kerinci Merangin Hidro - + @vite(['resources/css/app.css', 'resources/js/app.js']) diff --git a/resources/views/employee/dashboard.blade.php b/resources/views/employee/dashboard.blade.php new file mode 100644 index 0000000..ecb4fab --- /dev/null +++ b/resources/views/employee/dashboard.blade.php @@ -0,0 +1,103 @@ +@extends('layouts.app') + +@section('title', 'Dashboard Karyawan - Sistem RKM | PT Kerinci Merangin Hidro') + +@section('content') +
+ + +
+
+
+

+ Dashboard Karyawan +

+ @if($employee && $employee->hasValidSimper()) + + SIMPER Aktif + + @elseif($employee) + + SIMPER Exp + + @endif +
+
+ Karyawan: {{ $employee ? $employee->name : auth()->user()->name }} + @if($employee && $employee->nik) + ({{ $employee->nik }}) + @endif + @if($employee && $employee->division) + • + {{ $employee->division }} + @endif +
+
+ + @if($employee && $employee->simper_expired_at) +
+ Masa Berlaku SIMPER: {{ $employee->simper_expired_at->format('d/m/Y') }} +
+ @endif +
+ + +
+ +
+
+
+ + Unit Support / Alat Berat + +
+

+ Pemeriksaan Pra-Harian (P2H) +

+

+ Pengisian formulir checklist kelaikan operasi harian sebelum mengoperasikan alat berat support unit (Excavator, Crane, Bulldozer, dan unit support lainnya). +

+
+ Total Unit Terdaftar: + {{ $totalSupport }} Unit Support +
+
+ + +
+ + +
+
+
+ + Kendaraan Ringan (LV) + +
+

+ Timesheet Kendaraan Ringan +

+

+ Pencatatan aktivitas mobilisasi harian light vehicle (LV), odometer kilometer (KM), tujuan penugasan operasional, dan verifikasi pos gerbang. +

+
+ Armada Tersedia: + {{ $totalLv }} Unit Kendaraan Ringan +
+
+ + +
+
+
+@endsection diff --git a/resources/views/hse/employees_index.blade.php b/resources/views/hse/employees_index.blade.php index a48b7da..89681ea 100644 --- a/resources/views/hse/employees_index.blade.php +++ b/resources/views/hse/employees_index.blade.php @@ -25,8 +25,8 @@ - -
+ +
- - -
@@ -190,7 +182,7 @@ @empty - + @if(request('search')) @@ -216,99 +208,16 @@ + + @if($employees->hasPages()) +
+ {{ $employees->links() }} +
+ @endif - -