summaryrefslogtreecommitdiff
path: root/src/lib/pengajuan-tempo/component/Konfirmasi.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-01 09:35:35 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-01 09:35:35 +0700
commit5e3b8914037fcd7b5153d94f289079ac4dd60235 (patch)
treebd6fc719a5f24616a871ff4f4ae52e0415c0b351 /src/lib/pengajuan-tempo/component/Konfirmasi.jsx
parent37ab7c5ac682e3a2ddb4153d4f7cb91593a77fe4 (diff)
<iman> update pengajuan tempo
Diffstat (limited to 'src/lib/pengajuan-tempo/component/Konfirmasi.jsx')
-rw-r--r--src/lib/pengajuan-tempo/component/Konfirmasi.jsx8
1 files changed, 2 insertions, 6 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();