mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 20:40:55 +00:00
style: inter module integration
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
import { CountdownTimer } from "@edr/ui-common";
|
||||
|
||||
import { BookingStatusBadge } from "@/components/bookings/BookingStatusBadge";
|
||||
import { EntityLink } from "@/components/detail";
|
||||
import { api } from "@/services/api";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import type {
|
||||
@@ -601,6 +602,7 @@ export function ScheduleWorkspacePanel({
|
||||
{pool.map((b) => (
|
||||
<BookingCard
|
||||
key={b.id}
|
||||
bookingId={b.id}
|
||||
reference={b.reference}
|
||||
customer={b.customer}
|
||||
weightTons={b.weightTons}
|
||||
@@ -711,6 +713,7 @@ export function ScheduleWorkspacePanel({
|
||||
return (
|
||||
<BookingCard
|
||||
key={b.id}
|
||||
bookingId={b.id}
|
||||
reference={ref}
|
||||
customer={b.customer}
|
||||
weightTons={b.weightTons}
|
||||
@@ -985,6 +988,7 @@ function PanelColumn({
|
||||
}
|
||||
|
||||
function BookingCard({
|
||||
bookingId,
|
||||
reference,
|
||||
customer,
|
||||
weightTons,
|
||||
@@ -996,6 +1000,8 @@ function BookingCard({
|
||||
leg,
|
||||
right,
|
||||
}: {
|
||||
/** When set, the reference links to the booking's detail page. */
|
||||
bookingId?: string;
|
||||
reference: string;
|
||||
customer?: string | null;
|
||||
weightTons?: number | null;
|
||||
@@ -1030,9 +1036,18 @@ function BookingCard({
|
||||
<Group justify="space-between" align="center" wrap="nowrap" gap="sm">
|
||||
<Stack gap={3} style={{ minWidth: 0 }}>
|
||||
<Group gap={8} align="center" wrap="nowrap">
|
||||
<Text size="sm" fw={700} truncate>
|
||||
{reference}
|
||||
</Text>
|
||||
{bookingId ? (
|
||||
<EntityLink
|
||||
to={`/dashboard/booking-requests/${bookingId}`}
|
||||
label={reference}
|
||||
size="sm"
|
||||
fw={700}
|
||||
/>
|
||||
) : (
|
||||
<Text size="sm" fw={700} truncate>
|
||||
{reference}
|
||||
</Text>
|
||||
)}
|
||||
{status ? <BookingStatusBadge status={status} /> : null}
|
||||
{intercity ? (
|
||||
<Tooltip
|
||||
|
||||
Reference in New Issue
Block a user