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)

View File

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

View File

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