diff --git a/apps/web/app/ius/[slug]/page.tsx b/apps/web/app/ius/[slug]/page.tsx index 8115a1a..4ffc4ea 100644 --- a/apps/web/app/ius/[slug]/page.tsx +++ b/apps/web/app/ius/[slug]/page.tsx @@ -29,10 +29,9 @@ export default async function Page(pageProps: PageProps) { apiIUS.getData({ pageUrlParams }), apiIUS.getMetaData({ pageUrlParams }), apiIUS.getConfig({ pageUrlParams }), - apiIUS.getDocumentTypes({ pageUrlParams }), apiIUS.getDocuments({ pageUrlParams }), - ]).then(([data, metaData, { title }, documentTypes, documents]) => { - const props = { data, documentTypes, documents, metaData, pageUrlParams, title }; + ]).then(([data, metaData, { title }, documents]) => { + const props = { data, documents, metaData, pageUrlParams, title }; return
; }); diff --git a/apps/web/components/Form/Files.tsx b/apps/web/components/Form/Files.tsx index add884e..b71f20c 100644 --- a/apps/web/components/Form/Files.tsx +++ b/apps/web/components/Form/Files.tsx @@ -27,14 +27,14 @@ function DownloadDocument({ document }: DownloadDocumentProps) { } type FileProps = { - readonly document: IUS.Document | undefined; - readonly documentType: IUS.DocumentType; + readonly document: IUS.Document; }; -function File({ document, documentType }: FileProps) { - const { documentTypeId, name } = documentType; +function File({ document }: FileProps) { const { formFiles, setFormFiles } = useContext(FormContext); + const { documentTypeId, name } = document; + const handleFileChange = (event: React.ChangeEvent) => { if (event.target.files !== null) { const file = event.target.files.item(0); @@ -55,17 +55,13 @@ function File({ document, documentType }: FileProps) { ); } -export function Files({ documentTypes, documents }: Props) { +export function Files({ documents }: Props) { return (
Документы -
- {documentTypes.map((documentType) => ( - x.documentTypeId === documentType.documentTypeId)} - /> +
+ {documents.map((document) => ( + ))}
diff --git a/apps/web/components/Form/types.ts b/apps/web/components/Form/types.ts index e4fcd24..d9162df 100644 --- a/apps/web/components/Form/types.ts +++ b/apps/web/components/Form/types.ts @@ -3,7 +3,6 @@ import type { PageUrlParams } from '@/utils/url'; export type Props = { readonly data: IUS.ResponseGetData; - readonly documentTypes: IUS.ResponseDocumentTypes; readonly documents: IUS.ResponseDocuments; readonly metaData: IUS.ResponseMetaData; readonly pageUrlParams: PageUrlParams;