summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-23 13:39:47 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-23 13:39:47 +0700
commitdaa0b872601789815513508d48a14cbd8e1f6518 (patch)
tree6b26200286ff664c7d80d2623f7dcfc96a492cac /src/lib
parentdd8a56ad12d054e121965c41bcb077158690b208 (diff)
<iman> update pengajuan tempo
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/address/components/EditAddress.jsx7
-rw-r--r--src/lib/pengajuan-tempo/component/PengajuanTempo.jsx1
-rw-r--r--src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx8
-rw-r--r--src/lib/tempo/components/Tempo.jsx16
4 files changed, 17 insertions, 15 deletions
diff --git a/src/lib/address/components/EditAddress.jsx b/src/lib/address/components/EditAddress.jsx
index e12aba13..62858465 100644
--- a/src/lib/address/components/EditAddress.jsx
+++ b/src/lib/address/components/EditAddress.jsx
@@ -39,7 +39,6 @@ const EditAddress = ({ id, defaultValues }) => {
useEffect(() => {
const loadProfile = async () => {
const dataProfile = await addressApi({ id: auth.parentId });
- console.log('dataProfile', dataProfile);
setValue('industry', dataProfile.industryId);
setValue('companyType', dataProfile.companyTypeId);
setValue('taxName', dataProfile.taxName);
@@ -47,9 +46,9 @@ const EditAddress = ({ id, defaultValues }) => {
setValue('alamat_wajib_pajak', dataProfile.alamatWajibPajak);
setValue('alamat_bisnis', dataProfile.alamatBisnis);
setValue('business_name', dataProfile.name);
- setValue('city', dataProfile.city.id);
- setValue('district', dataProfile.district.id);
- setValue('subDistrict', dataProfile.subDistrict.id);
+ setValue('city', dataProfile.city?.id);
+ setValue('district', dataProfile.district?.id);
+ setValue('subDistrict', dataProfile.subDistrict?.id);
};
if (auth) loadProfile();
}, [auth?.parentId]);
diff --git a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
index 22227624..dbf2c606 100644
--- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
+++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
@@ -550,7 +550,6 @@ const PengajuanTempo = () => {
// if (isLoading && !bigData) {
// return;
// }
- console.log('bigData', bigData);
return (
<>
<div className='container flex flex-col items-center '>
diff --git a/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx b/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx
index 4bc04a3f..fc0f1c28 100644
--- a/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx
@@ -95,8 +95,6 @@ const InformasiPerusahaan = ({
useEffect(() => {
if (watchCity) {
- updateForm('city', `${watchCity}`);
- validate();
const loadDistricts = async () => {
let dataDistricts = await districtApi({ cityId: watchCity });
dataDistricts = dataDistricts.map((district) => ({
@@ -105,9 +103,13 @@ const InformasiPerusahaan = ({
}));
setDistricts(dataDistricts);
};
+ if (form.city !== `${watchCity}`) {
+ updateForm('city', `${watchCity}`);
+ }
+ validate();
loadDistricts();
}
- }, [watchCity, setValue]);
+ }, [watchCity]);
const watchDistrict = watch('district');
useEffect(() => {
diff --git a/src/lib/tempo/components/Tempo.jsx b/src/lib/tempo/components/Tempo.jsx
index 97b21454..6f0a2a8c 100644
--- a/src/lib/tempo/components/Tempo.jsx
+++ b/src/lib/tempo/components/Tempo.jsx
@@ -323,7 +323,7 @@ const Tempo = () => {
</Skeleton>
</p>
</div>
- <div className='flex justify-around text-sm '>
+ <div className='flex items-start justify-around text-sm '>
<div className='w-[40%] flex flex-col gap-2'>
<p>Kredit Limit Terpakai</p>
<Skeleton
@@ -406,12 +406,14 @@ const Tempo = () => {
// <Alert type='info' className='text-center'>
// Tidak ada invoice
// </Alert>
- <Image
- src='/images/ICON-DOKUMEN-VERIFIKASI.png'
- alt='Registrasi Tempo'
- width={isMobile ? 300 : 600}
- height={isMobile ? 300 : 550}
- />
+ <div className='flex items-center justify-center'>
+ <Image
+ src='/images/ICON-DOKUMEN-VERIFIKASI.png'
+ alt='Registrasi Tempo'
+ width={isMobile ? 300 : 600}
+ height={isMobile ? 300 : 550}
+ />
+ </div>
) : (
invoices.data?.invoices?.map((invoice, index) => (
<div