update
This commit is contained in:
@ -192,4 +192,5 @@ export const initialMember = {
|
||||
suco: "",
|
||||
aldeia: "",
|
||||
profession: "",
|
||||
description: ""
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user