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)
|
||||
|
||||
@ -242,6 +242,13 @@ const CustomerDialog = ({ open, handleClose, handleSubmit, initialData, viewStat
|
||||
<TextField disabled={viewOnly} fullWidth margin="dense" label="Bank Name" name="bank_name" value={formData.bank_name} onChange={handleChange} />
|
||||
<TextField disabled={viewOnly} fullWidth margin="dense" label="Bank Account" name="bank_account" value={formData.bank_account} onChange={handleChange} />
|
||||
<TextField disabled={viewOnly} fullWidth margin="dense" label="iBank Number" name="ibank_number" value={formData.ibank_number} onChange={handleChange} />
|
||||
<Divider className="pt-7"/>
|
||||
<Typography sx={{color:'grey'}}>Approval</Typography>
|
||||
{
|
||||
page === 'kyc' ? (
|
||||
<TextField fullWidth margin="dense" label="Approval Description" name="description" value={formData.description} onChange={handleChange} />
|
||||
) : ('')
|
||||
}
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={() => viewOnly ? setViewOnly(false) : setViewOnly(true)} color="secondary">{ viewOnly ? (`Open Edit`) : (`Close Edit`) }</Button>
|
||||
|
||||
@ -82,6 +82,7 @@ const ManageMembers = () => {
|
||||
delete updateData.no;
|
||||
delete updateData.destinationGroup;
|
||||
delete updateData.statusApproval;
|
||||
delete updateData.description;
|
||||
delete updateData.group_id;
|
||||
delete updateData.group_name;
|
||||
delete updateData.group_description;
|
||||
|
||||
Reference in New Issue
Block a user