From feddce8a0c31cafd644d843b5331f1faa2dc6075 Mon Sep 17 00:00:00 2001 From: Nathnael Date: Mon, 22 Jun 2026 08:11:11 +0000 Subject: [PATCH] style: use the proper primary color --- .../components/bookings/ApprovalStepsCard.tsx | 8 ++-- .../bookings/BookingActionsMenu.tsx | 4 +- .../bookings/BookingConfirmDialog.tsx | 2 +- .../bookings/BookingPricingSummary.tsx | 2 +- .../bookings/BookingRequestsHeader.tsx | 2 +- .../bookings/BookingStatusBadge.tsx | 4 +- .../components/bookings/BookingStatusTabs.tsx | 4 +- .../bookings/BookingWorkflowStepper.tsx | 2 +- .../bookings/OperationsBookingQueue.tsx | 2 +- .../bookings/detail/BookingApprovalCard.tsx | 6 +-- .../bookings/detail/BookingDetailToolbar.tsx | 2 +- .../detail/BookingLifecycleStepper.tsx | 2 +- .../bookings/detail/BookingPaymentCard.tsx | 2 +- .../bookings/detail/BookingRequestHero.tsx | 18 +++----- .../detail/BookingReviewNotesCard.tsx | 2 +- .../bookings/detail/SectionCard.tsx | 17 ++------ .../src/components/fleet/FleetCardGrid.tsx | 4 +- .../src/components/fleet/FleetFormDialog.tsx | 2 +- .../components/fleet/FleetRecordActions.tsx | 4 +- .../src/components/fleet/FleetToolbar.tsx | 2 +- .../overview/OverviewQuickLinks.tsx | 2 +- .../ManageRuleEngineOrderDialog.tsx | 2 +- .../ruleEngine/RuleEngineFormDialog.tsx | 4 +- .../ruleEngine/RuleEngineToolbar.tsx | 4 +- .../ruleEngine/ruleEngineFormat.tsx | 4 +- .../trainScheduling/AllocateBookingWizard.tsx | 40 ++++++++--------- .../ContainerPlacementGrid.tsx | 6 +-- .../trainScheduling/EligibleBookingsPanel.tsx | 8 ++-- .../FleetAvailabilitySummary.tsx | 6 +-- .../trainScheduling/RouteCorridorTrack.tsx | 4 +- .../trainScheduling/ScheduleBatchPanel.tsx | 10 ++--- .../trainScheduling/ScheduleBookingsStep.tsx | 12 +++--- .../trainScheduling/ScheduleWarningsAlert.tsx | 2 +- .../SchedulingWorkflowHeader.tsx | 6 +-- .../TrainCompositionDiagram.tsx | 10 ++--- .../trainScheduling/WagonPlanGrid.tsx | 2 +- .../trainScheduling/WorkflowStep.tsx | 10 ++--- .../trainScheduling/batchVisuals.tsx | 4 +- .../AssignedBookingsPanel.tsx | 4 +- .../compositionEditor/BookingDetailModal.tsx | 4 +- .../CompositionBookingTabs.tsx | 6 +-- .../RemoveBookingConfirmModal.tsx | 2 +- .../compositionEditor/TrainConsistView.tsx | 2 +- .../UnassignedBookingsPanel.tsx | 16 +++---- .../compositionEditor/WagonCard.tsx | 6 +-- .../schedulingWorkflow.styles.ts | 8 ++-- .../components/wagons/AssignWagonDialog.tsx | 4 +- .../components/warehouses/FeePreviewModal.tsx | 4 +- .../warehouses/InspectionReportModal.tsx | 2 +- .../warehouses/WarehouseInventoryTable.tsx | 2 +- .../src/components/warehouses/badges.tsx | 4 +- .../pages/bookings/BookingRequestsPage.tsx | 43 +++++++++---------- .../src/pages/bookings/NewBookingPage.tsx | 6 +-- .../src/pages/fleet/FleetCrudPages.tsx | 2 +- .../src/pages/payments/PaymentsPage.tsx | 4 +- .../pages/trainScheduling/BatchBoardPage.tsx | 8 ++-- .../TrainScheduleV2ListPage.tsx | 12 +++--- .../src/pages/warehouses/ArrivalQueuePage.tsx | 6 +-- .../pages/warehouses/LoadedInventoryPage.tsx | 2 +- .../src/pages/warehouses/LoadingQueuePage.tsx | 2 +- .../warehouses/WarehouseInvoicesPage.tsx | 2 +- .../pages/warehouses/WarehouseRulesPage.tsx | 4 +- 62 files changed, 182 insertions(+), 200 deletions(-) diff --git a/apps/edr-freight-web/backoffice/src/components/bookings/ApprovalStepsCard.tsx b/apps/edr-freight-web/backoffice/src/components/bookings/ApprovalStepsCard.tsx index 25b3816b7..a38e2f0e5 100644 --- a/apps/edr-freight-web/backoffice/src/components/bookings/ApprovalStepsCard.tsx +++ b/apps/edr-freight-web/backoffice/src/components/bookings/ApprovalStepsCard.tsx @@ -68,7 +68,7 @@ export function ApprovalStepsCard({ booking, mutations }: ApprovalStepsCardProps icon={ShieldCheck} title="Approval chain" extra={ - + {steps.filter((s) => s.status === "APPROVED").length}/{steps.length} } @@ -144,11 +144,11 @@ function StepRow({ const canApprove = canActOnApprovalStep(user, step, steps); const statusColor = step.status === "APPROVED" - ? "green" + ? "edr-green" : step.status === "REJECTED" ? "red" : isNext - ? "green" + ? "edr-green" : "gray"; return ( @@ -200,7 +200,7 @@ function StepRow({ {canApprove && ( - diff --git a/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingLifecycleStepper.tsx b/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingLifecycleStepper.tsx index eb00b8b71..5caa10fd8 100644 --- a/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingLifecycleStepper.tsx +++ b/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingLifecycleStepper.tsx @@ -68,7 +68,7 @@ export function BookingLifecycleStepper({ status }: BookingLifecycleStepperProps diff --git a/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingPaymentCard.tsx b/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingPaymentCard.tsx index 7d0535bd4..6f102e5c6 100644 --- a/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingPaymentCard.tsx +++ b/apps/edr-freight-web/backoffice/src/components/bookings/detail/BookingPaymentCard.tsx @@ -29,7 +29,7 @@ export function BookingPaymentCard({ @@ -70,7 +64,7 @@ export function BookingRequestHero({ - diff --git a/apps/edr-freight-web/backoffice/src/components/fleet/FleetRecordActions.tsx b/apps/edr-freight-web/backoffice/src/components/fleet/FleetRecordActions.tsx index 2a594a645..1922cb92b 100644 --- a/apps/edr-freight-web/backoffice/src/components/fleet/FleetRecordActions.tsx +++ b/apps/edr-freight-web/backoffice/src/components/fleet/FleetRecordActions.tsx @@ -35,7 +35,7 @@ const FleetRecordActions = ({ {showDetail ? ( - diff --git a/apps/edr-freight-web/backoffice/src/components/warehouses/FeePreviewModal.tsx b/apps/edr-freight-web/backoffice/src/components/warehouses/FeePreviewModal.tsx index 1d7a8316d..ce4b81c05 100644 --- a/apps/edr-freight-web/backoffice/src/components/warehouses/FeePreviewModal.tsx +++ b/apps/edr-freight-web/backoffice/src/components/warehouses/FeePreviewModal.tsx @@ -15,7 +15,7 @@ const INVOICE_STATUS_COLOR: Record = { DRAFT: 'gray', ISSUED: 'orange', PARTIALLY_PAID: 'yellow', - PAID: 'green', + PAID: 'edr-green', CANCELLED: 'gray', }; @@ -175,7 +175,7 @@ export function FeePreviewModal({ opened, onClose, inventoryId }: FeePreviewModa - diff --git a/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInventoryTable.tsx b/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInventoryTable.tsx index 0fc8669bf..6cae67b74 100644 --- a/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInventoryTable.tsx +++ b/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInventoryTable.tsx @@ -30,7 +30,7 @@ const actionColor: Record = { reserve: 'grape', 'ready-for-loading': 'cyan', load: 'teal', - dispatch: 'green', + dispatch: 'edr-green', }; export function WarehouseInventoryTable({ diff --git a/apps/edr-freight-web/backoffice/src/components/warehouses/badges.tsx b/apps/edr-freight-web/backoffice/src/components/warehouses/badges.tsx index c95e566bb..27fb1a261 100644 --- a/apps/edr-freight-web/backoffice/src/components/warehouses/badges.tsx +++ b/apps/edr-freight-web/backoffice/src/components/warehouses/badges.tsx @@ -25,7 +25,7 @@ export function WarehouseTypeBadge({ type }: { type: WarehouseType }) { } export function WarehouseStatusBadge({ status }: { status: WarehouseStatus }) { - const color = status === 'ACTIVE' ? 'green' : 'gray'; + const color = status === 'ACTIVE' ? 'edr-green' : 'gray'; return ( {status} @@ -39,7 +39,7 @@ const inventoryStatusColor: Record = { RESERVED: 'grape', READY_FOR_LOADING: 'cyan', LOADED: 'teal', - DISPATCHED: 'green', + DISPATCHED: 'edr-green', }; export function InventoryStatusBadge({ status }: { status: InventoryStatus }) { diff --git a/apps/edr-freight-web/backoffice/src/pages/bookings/BookingRequestsPage.tsx b/apps/edr-freight-web/backoffice/src/pages/bookings/BookingRequestsPage.tsx index 348ed2085..6cbef4b33 100644 --- a/apps/edr-freight-web/backoffice/src/pages/bookings/BookingRequestsPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/bookings/BookingRequestsPage.tsx @@ -1,32 +1,31 @@ +import { + ActionIcon, + Card, + Group, + Stack, + Tabs, + Text, + TextInput, +} from "@mantine/core"; +import { ArrowRight, Calendar, Package, Search, User, X } from "lucide-react"; import { useCallback, useMemo, useRef, useState } from "react"; import { useNavigate } from "react-router-dom"; -import { ArrowRight, Calendar, Package, Search, User, X } from "lucide-react"; -import { - Stack, - Group, - Text, - Card, - TextInput, - ActionIcon, - Tabs, -} from "@mantine/core"; -import { PageContainer } from "@/components/page"; -import Breadcrumbs from "@/components/ui/Breadcrumbs"; +import { BookingActionsMenu } from "@/components/bookings/BookingActionsMenu"; +import { BookingApprovalProgressCell } from "@/components/bookings/BookingApprovalProgressCell"; import { BookingPriorityBadge } from "@/components/bookings/BookingPriorityBadge"; +import { BookingRequestsHeader } from "@/components/bookings/BookingRequestsHeader"; +import { BookingStatusBadge } from "@/components/bookings/BookingStatusBadge"; import { BookingStatusTabs, type BookingStatusTabKey, } from "@/components/bookings/BookingStatusTabs"; -import { BookingRequestsHeader } from "@/components/bookings/BookingRequestsHeader"; -import { BookingStatusBadge } from "@/components/bookings/BookingStatusBadge"; -import { BookingApprovalProgressCell } from "@/components/bookings/BookingApprovalProgressCell"; -import { AllocateBookingWizard } from "@/components/trainScheduling/AllocateBookingWizard"; -import { BookingActionsMenu } from "@/components/bookings/BookingActionsMenu"; +import { BookingTableEmpty } from "@/components/bookings/BookingTableEmpty"; import { OperationsBookingQueue } from "@/components/bookings/OperationsBookingQueue"; import { OperationsScheduledBookings } from "@/components/bookings/OperationsScheduledBookings"; -import { BookingTableEmpty } from "@/components/bookings/BookingTableEmpty"; import { bookingTable } from "@/components/bookings/booking-ui.styles"; +import { PageContainer } from "@/components/page"; +import { AllocateBookingWizard } from "@/components/trainScheduling/AllocateBookingWizard"; import { BOOKING_LIST_TABS } from "@/features/bookings/booking-status.config"; import { toBookingListRow } from "@/features/bookings/mapBookingListRow"; import { @@ -34,15 +33,15 @@ import { useBookingList, useBookingListSummary, } from "@/hooks/bookings/useBookings"; +import { cn } from "@/lib/utils"; import type { BookingListFilter } from "@/services/bookings.service"; import type { BookingListRow } from "@/types/booking"; -import { cn } from "@/lib/utils"; import { + Badge, DataTable, DataTableFooter, - type ColumnDef, usePagination, - Badge, + type ColumnDef, } from "@edr/ui-common"; function getStatusesForTab(tab: BookingStatusTabKey): string | undefined { @@ -298,8 +297,6 @@ export default function BookingRequestsPage() { return ( - - - + - + Summary diff --git a/apps/edr-freight-web/backoffice/src/pages/fleet/FleetCrudPages.tsx b/apps/edr-freight-web/backoffice/src/pages/fleet/FleetCrudPages.tsx index 48ab5e429..9206372e4 100644 --- a/apps/edr-freight-web/backoffice/src/pages/fleet/FleetCrudPages.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/fleet/FleetCrudPages.tsx @@ -751,7 +751,7 @@ export function WagonTypesCrudPage() { {type.lengthMeters} {type.supportedLoadTypes?.join(', ') || '-'} - + {type.isActive === false ? 'Inactive' : 'Active'} diff --git a/apps/edr-freight-web/backoffice/src/pages/payments/PaymentsPage.tsx b/apps/edr-freight-web/backoffice/src/pages/payments/PaymentsPage.tsx index 798077020..0c6c4b284 100644 --- a/apps/edr-freight-web/backoffice/src/pages/payments/PaymentsPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/payments/PaymentsPage.tsx @@ -58,7 +58,7 @@ const METHOD_OPTIONS: { value: PaymentMethod; label: string }[] = [ ]; const STATUS_COLORS: Record = { - success: "green", + success: "edr-green", processing: "yellow", "action-required": "yellow", failed: "red", @@ -205,7 +205,7 @@ export default function PaymentsPage() { label: "Successful", value: summary?.success ?? 0, icon: CheckCircle2, - color: "green", + color: "edr-green", }, { label: "Processing", diff --git a/apps/edr-freight-web/backoffice/src/pages/trainScheduling/BatchBoardPage.tsx b/apps/edr-freight-web/backoffice/src/pages/trainScheduling/BatchBoardPage.tsx index 32ef990d9..bc6e5bb15 100644 --- a/apps/edr-freight-web/backoffice/src/pages/trainScheduling/BatchBoardPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/trainScheduling/BatchBoardPage.tsx @@ -516,12 +516,12 @@ export default function BatchBoardPage() { style={{ padding: "2px 8px", borderRadius: 8, - background: "var(--mantine-color-green-0)", - border: "1px solid var(--mantine-color-green-1)", + background: "var(--mantine-color-edr-green-0)", + border: "1px solid var(--mantine-color-edr-green-1)", }} > - - + + {row.original.capacity.allocatedWagons} diff --git a/apps/edr-freight-web/backoffice/src/pages/trainScheduling/TrainScheduleV2ListPage.tsx b/apps/edr-freight-web/backoffice/src/pages/trainScheduling/TrainScheduleV2ListPage.tsx index 7d5c49270..5586357c1 100644 --- a/apps/edr-freight-web/backoffice/src/pages/trainScheduling/TrainScheduleV2ListPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/trainScheduling/TrainScheduleV2ListPage.tsx @@ -180,8 +180,8 @@ export default function TrainScheduleV2ListPage() { width: 34, height: 34, borderRadius: 9, - background: "var(--mantine-color-green-0)", - color: "var(--mantine-color-green-7)", + background: "var(--mantine-color-edr-green-0)", + color: "var(--mantine-color-edr-green-7)", flexShrink: 0, }} > @@ -576,13 +576,13 @@ function MetricChip({ borderRadius: 8, background: subtle ? "var(--mantine-color-gray-1)" - : "var(--mantine-color-green-0)", + : "var(--mantine-color-edr-green-0)", border: `1px solid ${ - subtle ? "var(--mantine-color-gray-2)" : "var(--mantine-color-green-1)" + subtle ? "var(--mantine-color-gray-2)" : "var(--mantine-color-edr-green-1)" }`, }} > - + {value} {label ? ( @@ -653,7 +653,7 @@ function ScheduleCard({