diff --git a/src/modules/parcel-sync/components/epay-tab.tsx b/src/modules/parcel-sync/components/epay-tab.tsx index 8063402..468614f 100644 --- a/src/modules/parcel-sync/components/epay-tab.tsx +++ b/src/modules/parcel-sync/components/epay-tab.tsx @@ -74,7 +74,22 @@ function isActiveStatus(status: string): boolean { type StatusStyle = { label: string; className: string; pulse?: boolean }; -function statusBadge(status: string, expiresAt: string | null): StatusStyle { +function statusBadge( + status: string, + expiresAt: string | null, + type?: "epay" | "intern", +): StatusStyle { + // Intern (copycf) extracts have NO validity term — never label them "Valid" + // or "Expirat" (which imply an ePay-style 30-day validity). Show a neutral + // "Intern" pill instead. + if (type === "intern" && status === "completed") { + return { + label: "Intern", + className: + "bg-sky-100 text-sky-700 border-sky-200 dark:bg-sky-950/40 dark:text-sky-400 dark:border-sky-800", + }; + } + if (status === "completed" && isExpired(expiresAt)) { return { label: "Expirat", @@ -641,7 +656,7 @@ export function EpayTab() { {filteredOrders.map((order, idx) => { - const badge = statusBadge(order.status, order.expiresAt); + const badge = statusBadge(order.status, order.expiresAt, order.type); const expired = order.status === "completed" && isExpired(order.expiresAt);