From 770aeca32c5339c1ba1e573bfc2865c7c0b733c1 Mon Sep 17 00:00:00 2001 From: huytran2005 Date: Mon, 2 Nov 2026 18:01:33 +0700 Subject: [PATCH 1/2] [KAN-675] fix(ui/voyage): align Voyage Lifecycle Control Center UI with Luxury Maritime design system Refactor VoyagePhaseControlCenter and MaritimeTimezoneSchedulerModal to adhere to the Luxury Maritime design system tokens: - Replace generic slate/indigo palette with Ocean Navy (#102A43) and Gold (#C5A572) - Apply soft ivory (#F7F4ED) and crisp white cards with refined borders (#E5E0D7) - Use serif headings and mono typography for vessel offsets and timers - Modernize phase stepper and master clock preview card Refs: KAN-675 --- .../voyage/MaritimeTimezoneSchedulerModal.tsx | 100 +++++--- .../voyage/VoyagePhaseControlCenter.tsx | 238 ++++++++++-------- 2 files changed, 191 insertions(+), 147 deletions(-) diff --git a/src/components/voyage/MaritimeTimezoneSchedulerModal.tsx b/src/components/voyage/MaritimeTimezoneSchedulerModal.tsx index 7b76ee3..5340f36 100644 --- a/src/components/voyage/MaritimeTimezoneSchedulerModal.tsx +++ b/src/components/voyage/MaritimeTimezoneSchedulerModal.tsx @@ -69,7 +69,13 @@ export const MaritimeTimezoneSchedulerModal: React.FC -
+
+
{/* Header */} -
-
-
+
+
+
-

- Maritime Port Timezone Coordinator & Master Clock +

+ Maritime Port Timezone Coordinator & Master Clock

-

- Voyage: {voyage.voyageNumber} ({voyage.shipId}) +

+ Voyage: {voyage.voyageNumber} ({voyage.shipId})

-
@@ -126,32 +136,32 @@ export const MaritimeTimezoneSchedulerModal: React.FC - {successMsg} + {successMsg}
)} {error && (
- {error} + {error}
)} {scheduleError && (
- {scheduleError} + {scheduleError}
)} - {/* Master Clock Preview Card */} -
+ {/* Master Clock Preview Card - Luxury Bridge Instrument Style */} +
- + Vessel Master Operating Clock -
- +
+ {loadingSchedule ? 'Synchronizing Clock...' : schedule @@ -160,37 +170,41 @@ export const MaritimeTimezoneSchedulerModal: React.FC
- Active Timezone -
{voyage.currentTimezone}
-
Offset: {formatOffset(voyage.vesselClockOffsetMinutes)} mins
+ Active Timezone +
{voyage.currentTimezone}
+
Offset: {formatOffset(voyage.vesselClockOffsetMinutes)} mins
{/* Form: Shift Master Timezone */} -
-
- Coordinated Port Timezone Override + +
+ Coordinated Port Timezone Override
- + setPortName(e.target.value)} - className="w-full p-2 border border-slate-300 rounded-xl" + className="w-full p-2 border border-[#D8D2C7] bg-white rounded-xl text-[#102A43] focus:border-[#397C80] focus:ring-2 focus:ring-[#397C80]/15 outline-none transition" />
- + setClockOffsetMinutes(Number(e.target.value))} - className="w-full p-2 border border-slate-300 rounded-xl" + className="w-full p-2 border border-[#D8D2C7] bg-white rounded-xl text-[#102A43] focus:border-[#397C80] focus:ring-2 focus:ring-[#397C80]/15 outline-none font-mono transition" />
- + setAdjustmentReason(e.target.value)} - className="w-full p-2 border border-slate-300 rounded-xl" + className="w-full p-2 border border-[#D8D2C7] bg-white rounded-xl text-[#102A43] focus:border-[#397C80] focus:ring-2 focus:ring-[#397C80]/15 outline-none transition" />
@@ -240,7 +258,7 @@ export const MaritimeTimezoneSchedulerModal: React.FC {loading ? 'Coordinating Ship Clock...' : 'Broadcast Master Clock Timezone Shift'} @@ -248,21 +266,21 @@ export const MaritimeTimezoneSchedulerModal: React.FC - - Planned Itinerary Timezone Shifts +
+ + Planned Itinerary Timezone Shifts
{schedule.plannedPortShifts.map((shift, idx) => (
- {shift.portName} - ({shift.timezone}) + {shift.portName} + ({shift.timezone})
- + {formatOffset(shift.clockOffsetMinutes)}m offset
diff --git a/src/components/voyage/VoyagePhaseControlCenter.tsx b/src/components/voyage/VoyagePhaseControlCenter.tsx index 75603e3..61f796b 100644 --- a/src/components/voyage/VoyagePhaseControlCenter.tsx +++ b/src/components/voyage/VoyagePhaseControlCenter.tsx @@ -138,59 +138,69 @@ export const VoyagePhaseControlCenter: React.FC = () => { return (
- {/* Top Banner */} -
-
-
- + {/* Top Banner - Luxury Maritime Style */} +
+
+
+
+ +
+
+

+ Bridge & Maritime Operations +

+

+ Voyage Global Lifecycle State Machine & Bridge Control +

+

+ Control global voyage operational status and coordinate port timezones & shipboard policies +

+
-
-

- Voyage Global Lifecycle State Machine & Bridge Control -

-

- Control global voyage operational status and coordinate port timezones & shipboard policies -

+ +
+ +
- -
- - -
-
+
{error && ( -
- {error} +
+ + {error}
)} {/* Voyage Cards List */}
{loading && !hasLoaded ? ( -
- - Loading voyage lifecycle states... +
+ +

Loading voyage lifecycle states...

) : voyages.length === 0 ? ( -
- - No voyage lifecycle states active. Click 'Initialize New Voyage State' to register one. +
+
+ +
+

+ No voyage lifecycle states active. Click 'Initialize New Voyage State' to register one. +

) : ( voyages.map((v) => { @@ -198,30 +208,30 @@ export const VoyagePhaseControlCenter: React.FC = () => { return (
{/* Header Info */} -
+
-
- +
+ {v.voyageNumber} - + {v.shipId} {v.taxExemptionActive && ( - - Duty/Tax-Free Waters + + Duty/Tax-Free Waters )} {v.casinoOpen && ( - - Casino Open + + Casino Open )}
-

{v.itineraryName}

+

{v.itineraryName}

@@ -230,14 +240,14 @@ export const VoyagePhaseControlCenter: React.FC = () => { setSelectedVoyageForTz(v); setIsTzModalOpen(true); }} - className="px-3 py-1.5 bg-slate-100 hover:bg-slate-200 text-slate-700 font-semibold text-xs rounded-xl transition flex items-center gap-1.5" + className="px-3 py-1.5 bg-white hover:bg-[#F7F4ED] border border-[#E5E0D7] text-[#102A43] font-semibold text-xs rounded-lg transition flex items-center gap-1.5 cursor-pointer" > - Timezone Coordinator + Timezone Coordinator @@ -245,11 +255,11 @@ export const VoyagePhaseControlCenter: React.FC = () => {
{/* Global Lifecycle Phase Stepper */} -
- +
+ Global Phase Operational Stepper -
+
{phases.map((phase, idx) => { const isPast = idx < currentPhaseIdx; const isCurrent = idx === currentPhaseIdx; @@ -258,18 +268,18 @@ export const VoyagePhaseControlCenter: React.FC = () => { key={phase} className={`p-3 rounded-xl border text-center transition ${ isCurrent - ? 'bg-indigo-600 border-indigo-600 text-white shadow-md font-bold' + ? 'bg-[#102A43] border-[#102A43] text-white shadow-xs font-bold' : isPast - ? 'bg-emerald-50/70 border-emerald-200 text-emerald-800 font-medium' - : 'bg-slate-50 border-slate-200 text-slate-400' + ? 'bg-emerald-50/70 border-emerald-200 text-emerald-800 font-semibold' + : 'bg-[#F7F4ED]/60 border-[#E5E0D7] text-[#687787]' }`} > -
+
Step {idx + 1}
- {isPast && } - {phase} + {isPast && } + {phase}
); @@ -278,28 +288,28 @@ export const VoyagePhaseControlCenter: React.FC = () => {
{/* Metadata & Operating Rules Grid */} -
+
- Current Location / Port: - + Current Location / Port: + {v.currentPortName || 'International Waters'}
- Ship Timezone: - + Ship Timezone: + {v.currentTimezone} ({formatOffset(v.vesselClockOffsetMinutes)} mins)
- Last Transitioned: - + Last Transitioned: + {new Date(v.phaseTransitionedAt).toLocaleString()} by {v.transitionedBy}
- Reason: - + Reason: + {v.transitionReason || 'Scheduled transition'}
@@ -326,75 +336,83 @@ export const VoyagePhaseControlCenter: React.FC = () => { {/* Transition Modal */} {isTransitionOpen && transitionVoyage && ( -
-
-

- Advance Voyage Operational Phase -

-

- Voyage: {transitionVoyage.voyageNumber} (Current Phase:{' '} - {transitionVoyage.currentPhase}) -

+
+
+
+

+ Advance Voyage Operational Phase +

+

+ Voyage: {transitionVoyage.voyageNumber} (Current Phase:{' '} + {transitionVoyage.currentPhase}) +

+
{transitionError && ( -
+
{transitionError}
)}
- +
- + setCurrentPortName(e.target.value)} - className="w-full p-2.5 border border-slate-300 rounded-xl focus:border-indigo-500 focus:outline-none" + className="w-full p-2.5 border border-[#D8D2C7] bg-white rounded-xl text-[#102A43] placeholder-[#9AA3AC] focus:border-[#397C80] focus:ring-2 focus:ring-[#397C80]/15 outline-none" />
- +