diff --git a/app/components/assets/import-content.tsx b/app/components/assets/import-content.tsx index f6311a69e..4bb6964c9 100644 --- a/app/components/assets/import-content.tsx +++ b/app/components/assets/import-content.tsx @@ -1,6 +1,7 @@ import type { ChangeEvent } from "react"; import { useRef, useState } from "react"; import { useFetcher } from "@remix-run/react"; +import type { QRCodePerImportedAsset } from "~/modules/qr/service.server"; import type { action } from "~/routes/_layout+/assets.import"; import { isFormProcessing } from "~/utils/form"; import { tw } from "~/utils/tw"; @@ -18,6 +19,7 @@ import { AlertDialogTrigger, } from "../shared/modal"; import { WarningBox } from "../shared/warning-box"; +import { Table, Td, Th, Tr } from "../table"; export const ImportBackup = () => ( <> @@ -110,6 +112,35 @@ export const ImportContent = () => ( "cf:purchase date, type:date" +
{data.error.message}
+ {data?.error?.additionalData?.duplicateCodes ? ( +Please fix your CSV file and try again. If the issue persists, don't hesitate to get in touch with us. @@ -261,3 +329,33 @@ export const FileForm = ({ intent, url }: { intent: string; url?: string }) => { ); }; + +function BrokenQrCodesTable({ + title, + data, +}: { + title: string; + data: QRCodePerImportedAsset[]; +}) { + return ( +
Asset title | +QR ID | +
---|---|
{code.title} | +{code.qrId} | +