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:
@@ -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>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user