summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/pengajuan-tempo/component/Konfirmasi.jsx8
-rw-r--r--src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx5
-rw-r--r--src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx9
-rw-r--r--src/lib/pengajuan-tempo/component/PengajuanTempo.jsx2
-rw-r--r--src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx36
5 files changed, 18 insertions, 42 deletions
diff --git a/src/lib/pengajuan-tempo/component/Konfirmasi.jsx b/src/lib/pengajuan-tempo/component/Konfirmasi.jsx
index 14e787a0..04e00b53 100644
--- a/src/lib/pengajuan-tempo/component/Konfirmasi.jsx
+++ b/src/lib/pengajuan-tempo/component/Konfirmasi.jsx
@@ -12,7 +12,7 @@ import odooApi from '~/libs/odooApi';
import { toast } from 'react-hot-toast';
import getFileBase64 from '@/core/utils/getFileBase64';
import { CheckCircleIcon } from '@heroicons/react/24/outline';
-import InformasiPerusahaan from './InformasiPerusahaan';
+import InformasiPerusahaan from './informasiPerusahaan';
import Pengiriman from './Pengiriman';
import KonfirmasiDokumen from './KonfirmasiDokumen';
const Konfirmasi = ({ chekValid, buttonSubmitClick }) => {
@@ -34,9 +34,8 @@ const Konfirmasi = ({ chekValid, buttonSubmitClick }) => {
const allowedExtensions = ['pdf', 'png', 'jpg', 'jpeg'];
let fileExtension = '';
if (file) {
- fileExtension = file.name.split('.').pop()?.toLowerCase(); // Extract file extension
+ fileExtension = file.name.split('.').pop()?.toLowerCase();
- // Check if the file extension is allowed
if (!fileExtension || !allowedExtensions.includes(fileExtension)) {
toast.error(
'Format file yang diijinkan adalah .pdf, .png, .jpg, atau .jpeg',
@@ -46,8 +45,6 @@ const Konfirmasi = ({ chekValid, buttonSubmitClick }) => {
event.target.value = '';
return;
}
-
- // Check for file size
if (file.size > 2000000) {
toast.error('Maksimal ukuran file adalah 2MB', { duration: 4000 });
@@ -55,7 +52,6 @@ const Konfirmasi = ({ chekValid, buttonSubmitClick }) => {
return;
}
- // Convert file to Base64
fileBase64 = await getFileBase64(file);
updateFormDokumen(name, file.name, fileExtension, fileBase64);
validateDokumen();
diff --git a/src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx b/src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx
index 753af29e..3b3bba0f 100644
--- a/src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx
+++ b/src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx
@@ -25,11 +25,6 @@ const KonfirmasiDokumen = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
getJumlahDokumenDiisi,
} = usePengajuanTempoStoreDokumen();
- // const handleInputChange = (event) => {
- // const { name, value } = event.target;
- // updateFormDokumen(name, value);
- // validateDokumen();
- // };
const handleConfirmSubmit = (format, base64) => {
if (format == 'pdf') {
setFormat(`application/${format}`);
diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index a2c17471..1281e387 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -1,13 +1,6 @@
-import React, { useState, useEffect, useMemo, useRef } from 'react';
-import { Controller, set, useForm } from 'react-hook-form';
-import HookFormSelect from '@/core/components/elements/Select/HookFormSelect';
-import odooApi from '~/libs/odooApi';
-import stateApi from '@/lib/address/api/stateApi.js';
-import cityApi from '@/lib/address/api/cityApi';
-import { Radio, RadioGroup, Stack, Checkbox } from '@chakra-ui/react';
+import React, { useEffect, useMemo, useRef } from 'react';
import { usePengajuanTempoStoreKontakPerson } from '../../../../src-migrate/modules/register/stores/usePengajuanTempoStore';
const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
- const { control, watch } = useForm();
const {
formKontakPerson,
errorsKontakPerson,
diff --git a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
index 74dbedf3..a3c0236c 100644
--- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
+++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
@@ -1,7 +1,7 @@
import React from 'react';
import { useMemo, useState, useEffect, useRef } from 'react';
import Stepper from './Stepper';
-import InformasiPerusahaan from './InformasiPerusahaan';
+import InformasiPerusahaan from './informasiPerusahaan';
import KontakPerusahaan from './KontakPerusahaan';
import Pengiriman from './Pengiriman';
import Referensi from './Referensi';
diff --git a/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx b/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx
index 5c58a789..87e48d4d 100644
--- a/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx
@@ -370,10 +370,8 @@ const InformasiPerusahaan = ({
</div>
<div className='flex flex-row justify-between items-start'>
- <div>
- <label className='form-label w-2/5 text-nowrap'>
- Alamat Perusahaan
- </label>
+ <div className='w-2/5 text-nowrap'>
+ <label className='form-label '>Alamat Perusahaan</label>
{!isKonfirmasi && (
<span className='text-xs opacity-60'>
alamat sesuai dengan alamat kantor pusat
@@ -457,10 +455,8 @@ const InformasiPerusahaan = ({
</div>
</div>
<div className='flex flex-row justify-between items-start'>
- <div>
- <label className='form-label w-2/5 text-nowrap'>
- No. Telfon Perusahaan
- </label>
+ <div className='w-2/5 text-nowrap'>
+ <label className='form-label '>No. Telfon Perusahaan</label>
{!isKonfirmasi && (
<span className='text-xs opacity-60'>
isi no telfon perusahaan yang sesuai
@@ -488,8 +484,8 @@ const InformasiPerusahaan = ({
</div>
<div className='flex flex-row justify-between items-start'>
- <div>
- <label className='form-label w-2/5 text-nowrap'>Data Bank</label>
+ <div className=' w-2/5 text-nowrap'>
+ <label className='form-label'>Data Bank</label>
{!isKonfirmasi && (
<span className='text-xs opacity-60'>
Isi detail data bank perusahaan anda
@@ -565,8 +561,8 @@ const InformasiPerusahaan = ({
</div>
<div className='flex flex-row justify-between items-start'>
- <div>
- <label className='form-label w-2/5 text-nowrap'>
+ <div className='w-2/5 text-nowrap'>
+ <label className='form-label '>
Website <span className=' opacity-60'>(Opsional)</span>
</label>
</div>
@@ -584,10 +580,8 @@ const InformasiPerusahaan = ({
</div>
<div className='flex flex-row justify-between items-start'>
- <div>
- <label className='form-label w-2/5 text-nowrap'>
- Estimasi Pembelian pertahun
- </label>
+ <div className='w-2/5 text-nowrap'>
+ <label className='form-label '>Estimasi Pembelian pertahun</label>
</div>
<div className='w-3/5'>
<div className='relative'>
@@ -646,10 +640,8 @@ const InformasiPerusahaan = ({
</div>
{!isKonfirmasi && (
<div className='w-4/5 flex flex-row justify-between items-center'>
- <div>
- <label className='form-label w-2/5 text-nowrap'>
- Limit Tempo
- </label>
+ <div className='w-2/5 text-nowrap'>
+ <label className='form-label '>Limit Tempo</label>
<span className='text-xs opacity-60'>
Ajukan nilai limit yang anda mau
</span>
@@ -878,8 +870,8 @@ const InformasiPerusahaan = ({
isKonfirmasi ? 'items-center' : 'items-start'
}`}
>
- <div>
- <label className='form-label w-2/5 text-nowrap'>
+ <div className='w-2/5 text-nowrap'>
+ <label className='form-label '>
Kategori Produk yang Digunakan
</label>
{!isKonfirmasi && (