feat(tender-details): enhance document handling and navigation in tender details

- Added a new documents section to the tender details page, improving organization and visibility of related documents.
- Updated the tender navigation items to conditionally include the documents section based on the loading state and document availability.
- Refactored the TenderDetailsContent component to manage document loading states and conditionally render the documents section.
- Enhanced the getTenderNavItems utility to accept options for showing the documents section, improving flexibility in navigation rendering.
This commit is contained in:
AmirReza Jamali
2026-05-13 08:55:40 +03:30
parent d65f8cdf48
commit 2178f25af5
6 changed files with 49 additions and 17 deletions
@@ -58,7 +58,10 @@ export const useAdminsPresenter = () => {
setParams(newParams);
filterFormReset(newParams);
}, [searchParams, filterFormReset]);
const { data, isPending } = useGetAdminListQuery({ ...params, ...apiDefaultParams });
const { data, isPending } = useGetAdminListQuery({
...apiDefaultParams,
...params,
});
const shouldShowPagination =
!isPending && (data?.meta?.pages ?? 1) * (data?.meta?.limit ?? 10) > 10;
const { mutate: deleteAdmin } = useDeleteAdmin(() => {
@@ -1,6 +1,9 @@
import { GlobeIcon } from "@/assets/icons";
import DatePicker from "@/components/FormElements/DatePicker/DatePicker";
import InputGroup from "@/components/FormElements/InputGroup";
import { Select } from "@/components/FormElements/select";
import { Button } from "@/components/ui-elements/button";
import { Countries } from "@/constants/countries";
import {
Control,
FieldValues,
@@ -55,11 +58,16 @@ const TenderListFilters = ({
type="text"
/>
<InputGroup
<Select<FieldValues>
{...filterRegister("country")}
name="country"
label="country"
type="text"
items={Countries}
placeholder="Country"
clearable
prefixIcon={<GlobeIcon />}
value={watch("country")}
onClear={() => setValue("country", "")}
/>
<InputGroup