fixing auth, switching corporate, table member

This commit is contained in:
Muhammad Fajar
2022-12-12 08:41:53 +07:00
parent f164317b58
commit a3760b8757
17 changed files with 347 additions and 207 deletions

View File

@@ -76,9 +76,9 @@ const DialogTopUpLimit = ({ title, openDialog, setOpenDialog, data }: MuiDialogP
const TopUpSchema = Yup.object().shape({
topup: Yup.number(),
// /*
// // @ts-ignore */
// .test('limit', 'Maximum Top Up Rp. 5.000.000', (val) => (val > 5000000 ? false : true)),
/*
// @ts-ignore */
// .test('limit', 'Maximum Top Up Rp. 5.000.000', (val) => (val > 5000000 ? false : true)),
});
const defaultValues = {
@@ -87,6 +87,7 @@ const DialogTopUpLimit = ({ title, openDialog, setOpenDialog, data }: MuiDialogP
const methods = useForm<FormValuesProps>({
resolver: yupResolver(TopUpSchema),
// @ts-ignore
defaultValues,
});
@@ -110,6 +111,7 @@ const DialogTopUpLimit = ({ title, openDialog, setOpenDialog, data }: MuiDialogP
const onCheckHandler = (data: FormValuesProps) => {
setIsDisabledCheckbox(!isDisabledCheckbox);
setIsDisabledButton(false);
// @ts-ignore
setValue('topup', testData.totalLimit - testData.myLimit);
};