add archive endpoint to user , driver , car ,order ,trip and update trip fails also update saidecar
This commit is contained in:
@@ -4,9 +4,12 @@ import { Spinner } from "../../UI";
|
||||
import { ORDER_STATUS_MAP } from "../OrderDetailBanel";
|
||||
import type { ArchivedOrder } from "@/src/types/order";
|
||||
|
||||
function fmtAmount(n?: number | null): string {
|
||||
|
||||
function fmtAmount(n?: string | number | null): string {
|
||||
if (n == null) return "—";
|
||||
return `${n.toFixed(2)} ر.س`;
|
||||
const num = typeof n === "string" ? parseFloat(n) : n;
|
||||
if (Number.isNaN(num)) return "—";
|
||||
return `${num.toFixed(2)} ر.س`;
|
||||
}
|
||||
|
||||
const cardStyle: React.CSSProperties = {
|
||||
|
||||
Reference in New Issue
Block a user