summaryrefslogtreecommitdiff
path: root/src/lib/pengajuan-tempo/component/Referensi.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-10-31 13:58:23 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-10-31 13:58:23 +0700
commitb5701645ce23deed5e32afc4a0f98bd523c6c92c (patch)
tree4dbaa7c968246a0ebfd1777f5b8d2575461b7544 /src/lib/pengajuan-tempo/component/Referensi.jsx
parentdaaf32f9dd3af860013b70d04c89f4cca84724b1 (diff)
<iman> update pengajuan tempo
Diffstat (limited to 'src/lib/pengajuan-tempo/component/Referensi.jsx')
-rw-r--r--src/lib/pengajuan-tempo/component/Referensi.jsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/pengajuan-tempo/component/Referensi.jsx b/src/lib/pengajuan-tempo/component/Referensi.jsx
index b7c112a6..8732c60f 100644
--- a/src/lib/pengajuan-tempo/component/Referensi.jsx
+++ b/src/lib/pengajuan-tempo/component/Referensi.jsx
@@ -18,7 +18,8 @@ const Referensi = ({ chekValid, buttonSubmitClick }) => {
resolver: yupResolver(validationSchema),
defaultValues,
});
- const { formSupplier, updateFormSupplier } = usePengajuanTempoStoreSupplier();
+ const { formSupplier, updateFormSupplier, updateHasSave } =
+ usePengajuanTempoStoreSupplier();
const [formData, setFormData] = useState([
{
supplier: '',
@@ -54,6 +55,7 @@ const Referensi = ({ chekValid, buttonSubmitClick }) => {
);
setSupplierData(editData);
+ updateHasSave(false);
};
const handleNewSupplierChange = (e) => {
@@ -84,6 +86,7 @@ const Referensi = ({ chekValid, buttonSubmitClick }) => {
// creditLimit: '',
// });
// }
+ updateHasSave(false);
};
const handleAddNewSupplier = () => {
@@ -103,6 +106,7 @@ const Referensi = ({ chekValid, buttonSubmitClick }) => {
creditLimit: '',
});
}
+ updateHasSave(false);
};
useEffect(() => {
@@ -127,6 +131,7 @@ const Referensi = ({ chekValid, buttonSubmitClick }) => {
creditLimit: '',
});
}
+ updateHasSave(true);
};
const formatRupiah = (value) => {
if (!value) return '';