change group
This commit is contained in:
@ -119,11 +119,15 @@ const Kyc = () => {
|
|||||||
delete updateData.group_deleted_at;
|
delete updateData.group_deleted_at;
|
||||||
delete updateData.updated_at;
|
delete updateData.updated_at;
|
||||||
try {
|
try {
|
||||||
|
const form = new FormData();
|
||||||
|
for (const property in updateData) {
|
||||||
|
if (updateData[property]) form.append(property, updateData[property]);
|
||||||
|
}
|
||||||
if (dialogType === 'reject') {
|
if (dialogType === 'reject') {
|
||||||
await axios.post(`${BASE_URL}/customer/reject`, { customerid: customerId });
|
await axios.post(`${BASE_URL}/customer/reject`, { customerid: customerId });
|
||||||
}
|
}
|
||||||
if (dialogType === 'update') {
|
if (dialogType === 'update') {
|
||||||
await axios.put(`${BASE_URL}/customer/update/${customerId}`, updateData);
|
await axios.put(`${BASE_URL}/customer/update/${customerId}`, form);
|
||||||
if (updateData.isneedapproval == 1)
|
if (updateData.isneedapproval == 1)
|
||||||
await axios.post(`${BASE_URL}/customer/approve`, {
|
await axios.post(`${BASE_URL}/customer/approve`, {
|
||||||
customerid: customerId,
|
customerid: customerId,
|
||||||
|
|||||||
Reference in New Issue
Block a user