@php /** @var \App\Models\VesselBerthing $vesselBerthing */ // Helper to format date into YYYY-MM-DD for native HTML5 date input $toDateInput = function($val) { if (!$val) return ''; if (preg_match('/^\d{4}-\d{2}-\d{2}$/', $val)) return $val; if (preg_match('/^(\d{1,2})[-\/.](\d{1,2})[-\/.](\d{4})$/', $val, $m)) { return sprintf('%04d-%02d-%02d', (int)$m[3], (int)$m[2], (int)$m[1]); } $ts = strtotime($val); return $ts ? date('Y-m-d', $ts) : ''; }; // Helper to format time into HH:MM for native HTML5 time input $toTimeInput = function($val) { if (!$val) return ''; if (preg_match('/(\d{1,2})[:.](\d{2})/', $val, $m)) { return sprintf('%02d:%02d', (int)$m[1], (int)$m[2]); } return $val; }; @endphp @if($errors->any())
Terdapat beberapa kesalahan pengisian form:
@endif
@csrf @if($vesselBerthing->exists) @method('PUT') @endif {{-- Status Bar Card --}}
Master Vessel & Berthing Information

Data kapal & jadwal tambat ini dapat ditarik secara otomatis ke Time Sheet, Statement Of Fact, Tally Sheet, Outturn Report, dsb.

{{-- Section 1: Vessel Identification --}}
1

Identitas Kapal & Dermaga

Vessel Name, Voyage, Berth, Flag, and Vessel Specs

{{-- NAME OF VESSEL --}}

Contoh: MV. ASIAN GLORY, MV. GLOVIS CHORUS

{{-- VOY --}}
{{-- BERTH --}}
{{-- FLAG --}}
{{-- LOA / G.R.T. --}}
{{-- Section 2: Operators & Agents --}}
2

Perusahaan Pelayaran & Keagenan

Shipping Line, Ship Agent, and Stevedoring Operator

{{-- SHIPPING LINE --}}
{{-- SHIP AGENT --}}
{{-- STEVEDORING --}}
{{-- Section 3: Ports & Berthing Time Milestones --}}
3

Pelabuhan & Waktu Tambat (Berthing Milestones)

Loading Port, Discharging Port, Berthed, Commenced, Completed, Departure, Sailed

{{-- Ports --}}

Milestone Jadwal & Waktu

Isi tanggal dan jam (format manual 00:00) untuk setiap milestone tahapan pergerakan & operasi kapal.

@php $milestonesList = [ 'vessel_arrived' => ['label' => 'Vessel arrived'], 'pilot_attended_on_board' => ['label' => 'Pilot attended on board'], 'first_line' => ['label' => 'First line'], 'berthed_terminal' => ['label' => 'Berthed at ikt car terminal 2 port'], 'open_ramp' => ['label' => 'Open ramp'], 'commenced_discharging' => ['label' => 'Commenced of discharging'], 'completed_discharging' => ['label' => 'Completed of discharging'], 'commenced_loading' => ['label' => 'Commenced of loading'], 'completed_loading' => ['label' => 'Completed of loading'], 'close_ramp' => ['label' => 'Close ramp'], 'pilot_on_board_sailing' => ['label' => 'Pilot on board for sailing'], 'vessel_sailed' => ['label' => 'Vessel sailed from wharf'], ]; @endphp
@foreach([0 => array_slice($milestonesList, 0, 6, true), 6 => array_slice($milestonesList, 6, null, true)] as $offset => $colMilestones)
@foreach($colMilestones as $key => $meta) @php $milestoneIdx = $offset + $loop->index; $milestoneNum = $offset + $loop->iteration; $rawDate = $vesselBerthing->getMilestoneValue($key, 'date'); $rawTime = $vesselBerthing->getMilestoneValue($key, 'time'); $dateVal = old("milestones.{$key}.date", $toDateInput($rawDate)); $timeVal = old("milestones.{$key}.time", $toTimeInput($rawTime)); @endphp
{{ $milestoneNum }} {{ $meta['label'] }}
{{-- Date Input --}}
{{-- Time Input with Dual Mode: Keyboard Typing + Visual Clock Picker --}}
{{-- Visual Clock Picker Trigger --}}
@endforeach
@endforeach
{{-- Section 4: Operational Notes --}}
{{-- Form Action Buttons --}}
Batal