feat(tender-details): add documents section and enhance document handling

- Introduced a new documents section in the tender details page for better organization of related documents.
- Updated the API service to support downloading individual and bulk documents.
- Enhanced the TenderDetailsContent component to manage document data and loading states effectively.
- Refactored tender navigation items to include the new documents section.
- Improved type definitions for better clarity and type safety in document handling.
This commit is contained in:
AmirReza Jamali
2026-05-11 17:41:38 +03:30
parent 88bc939956
commit 2477215fce
9 changed files with 282 additions and 4 deletions
+5 -1
View File
@@ -51,7 +51,8 @@ const TenderDetails = ({ params }: IProps) => {
[tenderNavItems],
);
const activeSectionId = useTenderSectionScrollSpy(sectionIds);
const { data: documents } = useGetTenderDocumentsQuery(details);
const { data: documentsResponse, isPending: isDocumentsLoading } =
useGetTenderDocumentsQuery(details);
const handleLanguageChange = useCallback(
(event: React.ChangeEvent<HTMLSelectElement>) => {
const nextParams = new URLSearchParams(searchParams.toString());
@@ -106,6 +107,9 @@ const TenderDetails = ({ params }: IProps) => {
tender={tender}
tenderNavItems={tenderNavItems}
activeSectionId={activeSectionId}
tenderId={details}
documents={documentsResponse?.data ?? []}
documentsLoading={isDocumentsLoading}
/>
</ShowcaseSection>
</>