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