Changes in filter panel.
This commit is contained in:
parent
798ea24088
commit
2a0f7794b5
@ -78,14 +78,14 @@ const DocumentFilterPanel = forwardRef(
|
|||||||
? moment.utc(values.endDate, "DD-MM-YYYY").toISOString()
|
? moment.utc(values.endDate, "DD-MM-YYYY").toISOString()
|
||||||
: null,
|
: null,
|
||||||
});
|
});
|
||||||
closePanel();
|
// closePanel();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClear = () => {
|
const onClear = () => {
|
||||||
reset(DocumentFilterDefaultValues);
|
reset(DocumentFilterDefaultValues);
|
||||||
setResetKey((prev) => prev + 1);
|
setResetKey((prev) => prev + 1);
|
||||||
onApply(DocumentFilterDefaultValues);
|
onApply(DocumentFilterDefaultValues);
|
||||||
closePanel();
|
// closePanel();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isLoading) return <div>Loading...</div>;
|
if (isLoading) return <div>Loading...</div>;
|
||||||
|
@ -141,8 +141,6 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
|||||||
getValue: (e) =>
|
getValue: (e) =>
|
||||||
`${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? ""
|
`${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? ""
|
||||||
}`.trim() || "N/A",
|
}`.trim() || "N/A",
|
||||||
`${e.createdBy?.firstName ?? ""} ${e.createdBy?.lastName ?? ""
|
|
||||||
}`.trim() || "N/A",
|
|
||||||
customRender: (e) => (
|
customRender: (e) => (
|
||||||
<div className="d-flex align-items-center cursor-pointer"
|
<div className="d-flex align-items-center cursor-pointer"
|
||||||
onClick={() => navigate(`/employee/${e.createdBy?.id}`)}>
|
onClick={() => navigate(`/employee/${e.createdBy?.id}`)}>
|
||||||
@ -380,8 +378,6 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
|||||||
)}
|
)}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{data?.data?.length > 0 && (
|
{data?.data?.length > 0 && (
|
||||||
<Pagination
|
<Pagination
|
||||||
currentPage={currentPage}
|
currentPage={currentPage}
|
||||||
@ -389,6 +385,8 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
|||||||
onPageChange={paginate}
|
onPageChange={paginate}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -37,13 +37,13 @@ const GalleryFilterPanel = ({ onApply }) => {
|
|||||||
startDate: localToUtc(formData.startDate),
|
startDate: localToUtc(formData.startDate),
|
||||||
endDate: localToUtc(formData.endDate),
|
endDate: localToUtc(formData.endDate),
|
||||||
});
|
});
|
||||||
closePanel()
|
// closePanel()
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClear=()=>{
|
const onClear=()=>{
|
||||||
reset(defaultGalleryFilterValue);
|
reset(defaultGalleryFilterValue);
|
||||||
setResetKey((prev) => prev + 1);
|
setResetKey((prev) => prev + 1);
|
||||||
closePanel()
|
// closePanel()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLoading) return <div>Loading....</div>;
|
if (isLoading) return <div>Loading....</div>;
|
||||||
|
@ -67,13 +67,13 @@ const ContactFilterPanel = forwardRef(
|
|||||||
|
|
||||||
const onSubmit = (formData) => {
|
const onSubmit = (formData) => {
|
||||||
onApply(formData);
|
onApply(formData);
|
||||||
closePanel();
|
// closePanel();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
reset(defaultContactFilter);
|
reset(defaultContactFilter);
|
||||||
onApply(defaultContactFilter);
|
onApply(defaultContactFilter);
|
||||||
closePanel();
|
// closePanel();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isLoading || isFetching) return <ExpenseFilterSkeleton />;
|
if (isLoading || isFetching) return <ExpenseFilterSkeleton />;
|
||||||
@ -99,16 +99,16 @@ const ContactFilterPanel = forwardRef(
|
|||||||
valueKey="id"
|
valueKey="id"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="d-flex justify-content-end py-3 gap-2">
|
<div className="d-flex justify-content-end py-3 gap-2">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn btn-label-secondary btn-xs"
|
className="btn btn-label-secondary btn-sm"
|
||||||
onClick={handleClose}
|
onClick={handleClose}
|
||||||
|
|
||||||
>
|
>
|
||||||
Clear
|
Clear
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" className="btn btn-primary btn-xs">
|
<button type="submit" className="btn btn-primary btn-sm" >
|
||||||
Apply
|
Apply
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,13 +39,13 @@ const NoteFilterPanel = forwardRef(({ onApply, clearFilter, setFilterdata }, ref
|
|||||||
|
|
||||||
const onSubmit = (formData) => {
|
const onSubmit = (formData) => {
|
||||||
onApply(formData);
|
onApply(formData);
|
||||||
closePanel();
|
// closePanel();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
reset(defaultNotesFilter);
|
reset(defaultNotesFilter);
|
||||||
onApply(defaultNotesFilter);
|
onApply(defaultNotesFilter);
|
||||||
closePanel();
|
// closePanel();
|
||||||
};
|
};
|
||||||
|
|
||||||
//Add this for Filter chip remover
|
//Add this for Filter chip remover
|
||||||
@ -94,16 +94,16 @@ const NoteFilterPanel = forwardRef(({ onApply, clearFilter, setFilterdata }, ref
|
|||||||
valueKey="id"
|
valueKey="id"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="d-flex justify-content-end py-3 gap-2">
|
<div className="d-flex justify-content-end py-3 gap-2">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn btn-label-secondary btn-sm"
|
className="btn btn-label-secondary btn-sm"
|
||||||
onClick={handleClose}
|
onClick={handleClose}
|
||||||
|
|
||||||
>
|
>
|
||||||
Clear
|
Clear
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" className="btn btn-primary btn-sm">
|
<button type="submit" className="btn btn-primary btn-sm" >
|
||||||
Apply
|
Apply
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user