This commit is contained in:
Raja Oktafrianto
2025-03-17 11:58:43 +07:00
parent ed7671a856
commit 19eb059354
27 changed files with 826 additions and 236 deletions

View File

@ -192,4 +192,5 @@ export const initialMember = {
suco: "",
aldeia: "",
profession: "",
description: ""
}

View File

@ -90,6 +90,7 @@ const Kyc = () => {
const userLogin: any = await getUser();
const updateData: any = member;
const customerId = member.id;
const description = member.description;
updateData.updated_by = userLogin.data ? userLogin.data.id : ''
let today = new Date();
updateData.updated_at = today.toString();
@ -102,6 +103,7 @@ const Kyc = () => {
delete updateData.no;
delete updateData.destinationGroup;
delete updateData.statusApproval;
delete updateData.description;
delete updateData.group_id;
delete updateData.group_name;
delete updateData.group_description;
@ -118,7 +120,10 @@ const Kyc = () => {
}
if (dialogType === 'update') {
await axios.put(`${BASE_URL}/customer/update/${customerId}`, updateData)
if (updateData.isneedapproval == 1) await axios.post(`${BASE_URL}/customer/approve`, {customerid: customerId})
if (updateData.isneedapproval == 1) await axios.post(`${BASE_URL}/customer/approve`, {
customerid: customerId,
description: description
})
}
await fetchGroups();
setDialogOpen(false)