Compare commits
3 Commits
55eeca5a29
...
52cee2b1f8
| Author | SHA1 | Date | |
|---|---|---|---|
| 52cee2b1f8 | |||
| 4e44b1d967 | |||
| 8a237eb4bf |
@ -181,7 +181,6 @@ 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 = () => {
|
||||||
@ -189,7 +188,6 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
|
|||||||
closeModal();
|
closeModal();
|
||||||
};
|
};
|
||||||
if (
|
if (
|
||||||
EmpLoading ||
|
|
||||||
StatusLoadding ||
|
StatusLoadding ||
|
||||||
projectLoading ||
|
projectLoading ||
|
||||||
ExpenseLoading ||
|
ExpenseLoading ||
|
||||||
@ -536,7 +534,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 ? "Please Wait..." : expenseToEdit ? "Update" : "Submit"}
|
{isPending || createPending ? "Please Wait..." : expenseToEdit ? "Update" : "Submit"}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="reset"
|
type="reset"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user