mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 10:40:58 +00:00
30 lines
855 B
TypeScript
30 lines
855 B
TypeScript
import { formatApprovalProgress } from "@/features/bookings/approval-progress";
|
|
import type { BookingListRow } from "@/types/booking";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
interface BookingApprovalProgressCellProps {
|
|
row: BookingListRow;
|
|
}
|
|
|
|
export function BookingApprovalProgressCell({ row }: BookingApprovalProgressCellProps) {
|
|
const summary = formatApprovalProgress(row.status, row.approvalSteps);
|
|
|
|
return (
|
|
<div className="min-w-[8.5rem] py-1">
|
|
<p
|
|
className={cn(
|
|
"text-sm font-semibold",
|
|
summary.complete ? "text-[color:var(--freight-brand)]" : "text-foreground",
|
|
)}
|
|
>
|
|
{summary.label}
|
|
</p>
|
|
{summary.detail ? (
|
|
<p className="mt-0.5 line-clamp-2 text-[11px] leading-snug text-muted-foreground">
|
|
{summary.detail}
|
|
</p>
|
|
) : null}
|
|
</div>
|
|
);
|
|
}
|