add archive endpoint to user , driver , car ,order ,trip and update trip fails also update saidecar

This commit is contained in:
m7amedez5511
2026-07-02 19:04:51 +03:00
parent c33778012a
commit d225291b70
29 changed files with 2096 additions and 432 deletions

View File

@@ -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 = {