diff --git a/src/components/Admin/DetailsRow.svelte b/src/components/Admin/DetailsRow.svelte index 36efd048..c1051aa6 100644 --- a/src/components/Admin/DetailsRow.svelte +++ b/src/components/Admin/DetailsRow.svelte @@ -3,10 +3,14 @@ import ActionsBtn from "./ActionsBtn.svelte"; import ContentFooter from "./ContentFooter.svelte"; - const { id, trackingCode, time, platformLink } = $props<{ + const { id, trackingCode, dataTime, platformLink } = $props<{ id: string; trackingCode: string; - time: string; + dataTime: { + date: string; + time: string; + fulltime: string; + }; platformLink: string; }>(); @@ -17,7 +21,7 @@ >
{$t("contributions.grid.details.operationTime")}
-{time}
+ {dataTime.time}{$t("contributions.grid.details.trackingCode")}
diff --git a/src/components/Admin/Table.svelte b/src/components/Admin/Table.svelte index 29d7a69c..82a83a77 100644 --- a/src/components/Admin/Table.svelte +++ b/src/components/Admin/Table.svelte @@ -257,18 +257,21 @@ return "—"; } - function getDate(chargeDate: string | null | undefined): { date: string; time: string } { + function getDate(chargeDate: string | null | undefined): { + date: string; + time: string; + fulltime: string; + } { if (!chargeDate) { - return { date: "—", time: "—" }; + return { date: "—", time: "—", fulltime: "—" }; } const d = new Date(chargeDate); - if (isNaN(d.getTime())) { - return { date: "1970-01-01", time: "00:00h" }; + return { date: "—", time: "—", fulltime: "—" }; } - const year = String(d.getFullYear()).slice(2); + const year = d.getFullYear(); const month = String(d.getMonth() + 1).padStart(2, "0"); const day = String(d.getDate()).padStart(2, "0"); const hour = String(d.getHours()).padStart(2, "0"); @@ -277,6 +280,7 @@ return { date: `${year}-${month}-${day}`, time: `${hour}:${minute}h`, + fulltime: `${year}-${month}-${day} ${hour}:${minute}`, }; } @@ -391,7 +395,7 @@