Compare commits
No commits in common. "52cee2b1f89bc44481f74defda29e11afd2f247f" and "55eeca5a299fc20ca5e0ef82a8dd97875d61f105" have entirely different histories.
52cee2b1f8
...
55eeca5a29
@ -181,6 +181,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setExpenseType(ExpenseTypes?.find((type) => type.id === ExpenseTypeId));
|
setExpenseType(ExpenseTypes?.find((type) => type.id === ExpenseTypeId));
|
||||||
|
return () => reset(defaultExpense);
|
||||||
}, [ExpenseTypeId]);
|
}, [ExpenseTypeId]);
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
@ -188,6 +189,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
closeModal();
|
closeModal();
|
||||||
};
|
};
|
||||||
if (
|
if (
|
||||||
|
EmpLoading ||
|
||||||
StatusLoadding ||
|
StatusLoadding ||
|
||||||
projectLoading ||
|
projectLoading ||
|
||||||
ExpenseLoading ||
|
ExpenseLoading ||
|
||||||
@ -534,7 +536,7 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
className="btn btn-primary btn-sm mt-3"
|
className="btn btn-primary btn-sm mt-3"
|
||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
>
|
>
|
||||||
{isPending || createPending ? "Please Wait..." : expenseToEdit ? "Update" : "Submit"}
|
{isPending ? "Please Wait..." : expenseToEdit ? "Update" : "Submit"}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="reset"
|
type="reset"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user