change group

This commit is contained in:
unknown
2025-04-09 14:20:01 +07:00
parent 490044a364
commit 01a77f0067

View File

@ -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,