From 8f9be149cd5134a9e03d761f3e0e06361375bac4 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 1 Oct 2024 14:29:20 +0700 Subject: update switch account --- src/lib/auth/components/SwitchAccount.jsx | 96 ++++++++++++++++++++----------- 1 file changed, 61 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/lib/auth/components/SwitchAccount.jsx b/src/lib/auth/components/SwitchAccount.jsx index 9adcc726..640d29cc 100644 --- a/src/lib/auth/components/SwitchAccount.jsx +++ b/src/lib/auth/components/SwitchAccount.jsx @@ -131,12 +131,10 @@ const SwitchAccount = ({ company_type }) => { } }; const onSubmitHandler = async (values) => { - console.log('error', errors); - console.log('form', form); + updateForm('parent_id', `${auth.parentId}`); setChangeConfirmation(false); // let data = { ...form, id: `${auth.partnerId}` }; const data = form; - console.log('data', data); if (!isFormValid) { setNotValid(true); setButtonSubmitClick(!buttonSubmitClick); @@ -192,7 +190,7 @@ const SwitchAccount = ({ company_type }) => { -
+ {/*
{ *Perubahan akun tidak dapat diubah kembali
+
*/} +
+
-
-
-

- Bisnis Terdaftar di Indoteknik? -

- - - - Sudah Terdaftar - - - Belum Terdaftar - - - -
- {!isTerdaftar && ( -
-

Tipe Bisnis

- - - - PKP - - {!(company_type === 'nonpkp') && ( - - Non-PKP +
+ {auth?.company && !(company_type === 'nonpkp') && ( + <> +
+

+ Bisnis Terdaftar di Indoteknik? +

+ + + + Sudah Terdaftar - )} - - -
+ + Belum Terdaftar + + + +
+ {!isTerdaftar && ( +
+

Tipe Bisnis

+ + + + PKP + + {!(company_type === 'nonpkp') && ( + + Non-PKP + + )} + + +
+ )} + )}