From 6ea86ff925228528d0323df1ca2fc157afca8fab Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 16 Oct 2024 17:06:27 +0700
Subject: <iman> update informasi perusahaan

---
 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
new file mode 100644
index 00000000..e69de29b
-- 
cgit v1.2.3


From ead46a6d760850530946926b390a8954ca64e1c2 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 17 Oct 2024 17:06:58 +0700
Subject: <iman> update pengajuan tempo

---
 .../pengajuan-tempo/component/KontakPerusahaan.jsx | 725 +++++++++++++++++++++
 1 file changed, 725 insertions(+)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index e69de29b..d292449b 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -0,0 +1,725 @@
+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 { usePengajuanTempoStore } from '../../../../src-migrate/modules/register/stores/usePengajuanTempoStore';
+const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
+  const { control, watch } = useForm();
+  const { form, errors, validate, updateForm } = usePengajuanTempoStore();
+  const [industries, setIndustries] = useState([]);
+  const [selectedCategory, setSelectedCategory] = useState('');
+  const [states, setState] = useState([]);
+  const [cities, setCities] = useState([]);
+  const [bersedia, setBersedia] = useState(null);
+  const category_produk = [
+    { id: 1, name: 'Pengaman, Kesehatan & Keamanan' },
+    { id: 2, name: 'Perkakas Tangan, Listrik & Pneumatic' },
+    { id: 3, name: 'Mesin Industrial' },
+    { id: 4, name: 'Mesin Pertanian & Perkebunan' },
+    { id: 5, name: 'Mesin Pembersih & Janitorial' },
+    { id: 6, name: 'Cairan Berbahan Kimia' },
+    { id: 7, name: 'Perlengkapan Pengukuran & Pengujian' },
+    { id: 8, name: 'Peralatan Listrik & Elektronik' },
+    { id: 9, name: 'Perlengkapan Logistik & Gudang' },
+    { id: 10, name: 'Peralatan Kantor & Stationery' },
+    { id: 11, name: 'Komponen & Aksesoris' },
+    { id: 12, name: 'Peralatan Horeca & Food Service' },
+  ];
+
+  useEffect(() => {
+    const loadState = async () => {
+      let dataState = await stateApi();
+      dataState = dataState.map((state) => ({
+        value: state.id,
+        label: state.name,
+      }));
+      setState(dataState);
+    };
+    loadState();
+  }, []);
+
+  const watchState = watch('state');
+  useEffect(() => {
+    updateForm('city', '');
+    if (watchState) {
+      updateForm('state', `${watchState}`);
+      validate();
+      const loadCities = async () => {
+        let dataCities = await cityApi({ stateId: watchState });
+        dataCities = dataCities.map((city) => ({
+          value: city.id,
+          label: city.name,
+        }));
+        setCities(dataCities);
+      };
+      loadCities();
+    }
+  }, [watchState]);
+
+  const watchCity = watch('city');
+  useEffect(() => {
+    if (watchCity) {
+      updateForm('city', `${watchCity}`);
+      validate();
+    }
+  }, [watchCity]);
+
+  useEffect(() => {
+    const loadIndustries = async () => {
+      const dataIndustries = await odooApi('GET', '/api/v1/partner/industry');
+      setIndustries(
+        dataIndustries?.map((o) => ({
+          value: o.id,
+          label: o.name,
+          category: o.category,
+        }))
+      );
+    };
+    loadIndustries();
+  }, []);
+
+  useEffect(() => {
+    const selectedIndustryType = industries.find(
+      (industry) => industry.value === watch('industry_id')
+    );
+    if (selectedIndustryType) {
+      updateForm('industry_id', `${selectedIndustryType?.value}`);
+      validate();
+      setSelectedCategory(selectedIndustryType.category);
+    }
+  }, [watch('industry_id'), industries]);
+
+  const estimasiValue = watch('estimasi');
+  const tempoLimitValue = watch('tempoLimit');
+
+  // Memformat angka menjadi format rupiah
+  const formatRupiah = (value) => {
+    if (!value) return '';
+    const numberString = value.replace(/[^0-9]/g, ''); // Menghapus karakter non-digit
+    return numberString
+      ? 'Rp ' + new Intl.NumberFormat('id-ID').format(numberString)
+      : '';
+  };
+
+  const handleChange = (e) => {
+    const value = e.target.value;
+    const formattedValue = formatRupiah(value);
+    console.log('formattedValue', formattedValue);
+    updateForm('estimasi', formattedValue.replace(/^Rp\s*/, ''));
+    validate();
+  };
+  const onChangeTempoDuration = (e) => {
+    updateForm('tempoDuration', `${e}`);
+    validate();
+  };
+
+  const onChangeTempoLimit = (e) => {
+    updateForm('tempoLimit', `${e}`);
+    validate();
+  };
+  const handleCheckboxBersediaChange = (value) => {
+    if (value === 'bersedia') {
+      setBersedia(true);
+    } else if (value === 'tidakBersedia') {
+      setBersedia(false);
+    }
+    updateForm('bersedia', `${value === 'bersedia'}`);
+    validate();
+  };
+  const [selectedIds, setSelectedIds] = useState([]);
+
+  const handleCheckboxChange = (id) => {
+    setSelectedIds((prevSelected) =>
+      prevSelected.includes(id)
+        ? prevSelected.filter((selectedId) => selectedId !== id)
+        : [...prevSelected, id]
+    );
+    updateForm('categoryProduk', `${selectedIds}`);
+    validate();
+  };
+
+  const handleInputChange = (event) => {
+    const { name, value } = event.target;
+    updateForm(name, value);
+    validate();
+  };
+
+  const midIndex = Math.ceil(category_produk.length / 2);
+  const firstColumn = category_produk.slice(0, midIndex);
+  const secondColumn = category_produk.slice(midIndex);
+  const isFormValid = useMemo(() => Object.keys(errors).length === 0, [errors]);
+
+  const nameRef = useRef(null);
+  const industry_idRef = useRef(null);
+  const streetRef = useRef(null);
+  const stateRef = useRef(null);
+  const cityRef = useRef(null);
+  const zipRef = useRef(null);
+  const mobileRef = useRef(null);
+  const bankNameRef = useRef(null);
+  const accountNameRef = useRef(null);
+  const accountNumberRef = useRef(null);
+  const estimasiRef = useRef(null);
+  const tempoDurationRef = useRef(null);
+  const bersediaRef = useRef(null);
+  const categoryProdukRef = useRef(null);
+  const tempoLimitRef = useRef(null);
+  useEffect(() => {
+    const loadIndustries = async () => {
+      if (!isFormValid) {
+        const options = {
+          behavior: 'smooth',
+          block: 'center',
+        };
+        if (errors.name && nameRef.current) {
+          nameRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.industry_id && industry_idRef.current) {
+          industry_idRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.street && streetRef.current) {
+          streetRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.state && stateRef.current) {
+          stateRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.city && cityRef.current) {
+          cityRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.zip && zipRef.current) {
+          zipRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.mobile && mobileRef.current) {
+          mobileRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.bankName && bankNameRef.current) {
+          bankNameRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.accountName && accountNameRef.current) {
+          accountNameRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.accountNumber && accountNumberRef.current) {
+          accountNumberRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.estimasi && estimasiRef.current) {
+          estimasiRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.tempoDuration && tempoDurationRef.current) {
+          tempoDurationRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.bersedia && bersediaRef.current) {
+          bersediaRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.categoryProduk && categoryProdukRef.current) {
+          categoryProdukRef.current.scrollIntoView(options);
+          return;
+        }
+        if (errors.tempoLimit && tempoLimitRef.current) {
+          tempoLimitRef.current.scrollIntoView(options);
+          return;
+        }
+      }
+    };
+    loadIndustries();
+  }, [buttonSubmitClick, chekValid]);
+  return (
+    <>
+      <div className='flex justify-start'>
+        <h1 className='font-bold'>Kontak Person</h1>
+      </div>
+      <form className='flex mt-4 flex-col w-full '>
+        <div className='w-full grid grid-row-2 gap-5'>
+          <div className='flex flex-row  justify-between items-start'>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>
+                Nama Lengkap Direktur
+              </label>
+            </div>
+            <div className='w-3/5'>
+              <input
+                id='name'
+                name='name'
+                placeholder='Masukkan nama perusahaan'
+                type='text'
+                className='form-input'
+                aria-invalid={errors.name}
+                ref={nameRef}
+                onChange={handleInputChange}
+              />
+              <span className='text-xs opacity-60'>
+                Format: PT. INDOTEKNIK DOTCOM GEMILANG
+              </span>
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errors.name}
+                </div>
+              )}
+            </div>
+          </div>
+          <div className='flex flex-row  justify-between items-start'>
+            <div ref={industry_idRef}>
+              <label className='form-label w-2/5 text-nowrap'>Industri</label>
+              <span className='text-xs opacity-60'>
+                isi detail perusahaan sesuai dengan nama yang terdaftar
+              </span>
+            </div>
+            <div className='w-3/5'>
+              <Controller
+                name='industry_id'
+                control={control}
+                render={(props) => (
+                  <HookFormSelect
+                    {...props}
+                    options={industries}
+                    placeholder={'Pilih industri bisnis anda'}
+                  />
+                )}
+              />
+              {selectedCategory && (
+                <span className='text-gray_r-11 text-xs opacity-60'>
+                  Kategori : {selectedCategory}
+                </span>
+              )}
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errors.industry_id}
+                </div>
+              )}
+            </div>
+          </div>
+
+          <div className='flex flex-row  justify-between items-start'>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>
+                Alamat Perusahaan
+              </label>
+              <span className='text-xs opacity-60'>
+                alamat sesuai dengan alamat kantor pusat
+              </span>
+            </div>
+            <div className='w-3/5 flex gap-3 flex-col'>
+              <div>
+                <input
+                  id='street'
+                  name='street'
+                  ref={streetRef}
+                  placeholder='Masukkan alamat lengkap perusahaan'
+                  type='text'
+                  className='form-input'
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errors.street}
+                  </div>
+                )}
+              </div>
+              <div className='sub-alamat flex flex-row w-full gap-3'>
+                <div className='w-2/5' ref={stateRef}>
+                  <Controller
+                    name='state'
+                    control={control}
+                    render={(props) => (
+                      <HookFormSelect
+                        {...props}
+                        options={states}
+                        placeholder='Provinsi'
+                      />
+                    )}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errors.state}
+                    </div>
+                  )}
+                </div>
+                <div className='w-1/3' ref={cityRef}>
+                  <Controller
+                    name='city'
+                    control={control}
+                    render={(props) => (
+                      <HookFormSelect
+                        {...props}
+                        options={cities}
+                        disabled={!watchState}
+                        placeholder='Kota'
+                      />
+                    )}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errors.city}
+                    </div>
+                  )}
+                </div>
+                <div className='w-1/3'>
+                  <input
+                    id='zip'
+                    name='zip'
+                    ref={zipRef}
+                    placeholder='Kode Pos'
+                    type='number'
+                    className='form-input'
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errors.zip}
+                    </div>
+                  )}
+                </div>
+              </div>
+            </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>
+              <span className='text-xs opacity-60'>
+                isi no telfon perusahaan yang sesuai
+              </span>
+            </div>
+            <div className='w-3/5'>
+              <input
+                id='mobile'
+                name='mobile'
+                ref={mobileRef}
+                placeholder='Masukkan nomor telfon perusahaan'
+                type='text'
+                className='form-input'
+                aria-invalid={errors.mobile}
+                onChange={handleInputChange}
+              />
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errors.mobile}
+                </div>
+              )}
+            </div>
+          </div>
+
+          <div className='flex flex-row  justify-between items-start'>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>Data Bank</label>
+              <span className='text-xs opacity-60'>
+                Isi detail data bank perusahaan anda
+              </span>
+            </div>
+            <div className='w-3/5 flex gap-3 flex-row'>
+              <div>
+                <input
+                  id='bankName'
+                  name='bankName'
+                  ref={bankNameRef}
+                  placeholder='Nama bank'
+                  type='text'
+                  className='form-input'
+                  onChange={handleInputChange}
+                />
+                <span className='text-xs opacity-60'>
+                  Format: BCA, Mandiri, CIMB, BNI dll
+                </span>
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errors.bankName}
+                  </div>
+                )}
+              </div>
+              <div>
+                <input
+                  id='accountName'
+                  name='accountName'
+                  ref={accountNameRef}
+                  placeholder='Nama Rekening'
+                  type='text'
+                  className='form-input'
+                  onChange={handleInputChange}
+                />
+                <span className='text-xs opacity-60'>Format: John Doe</span>
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errors.accountName}
+                  </div>
+                )}
+              </div>
+              <div>
+                <input
+                  id='accountNumber'
+                  name='accountNumber'
+                  ref={accountNumberRef}
+                  placeholder='Nomor Rekening Bank'
+                  type='text'
+                  className='form-input'
+                  onChange={handleInputChange}
+                />
+                <span className='text-xs opacity-60'>Format: 01234567896</span>
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errors.accountNumber}
+                  </div>
+                )}
+              </div>
+            </div>
+          </div>
+
+          <div className='flex flex-row  justify-between items-start'>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>
+                Website <span className=' opacity-60'>(Opsional)</span>
+              </label>
+            </div>
+            <div className='w-3/5'>
+              <input
+                id='website'
+                name='website'
+                placeholder='www.indoteknik.com'
+                type='text'
+                className='form-input'
+                onChange={handleInputChange}
+              />
+            </div>
+          </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>
+            <div className='w-3/5'>
+              <div className='relative'>
+                <input
+                  id='estimasi'
+                  name='estimasi'
+                  ref={estimasiRef}
+                  // {...register('estimasi', {
+                  //   setValueAs: (value) => value.replace(/^Rp\s*/, ''), // Menyimpan hanya angka
+                  // })}
+                  placeholder='Isi estimasi pembelian produk pertahun'
+                  type='text'
+                  className='form-input' // padding untuk memberi ruang untuk "RP"
+                  value={formatRupiah(form.estimasi)}
+                  onChange={handleChange} // Mengatur perubahan input
+                />
+              </div>
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errors.estimasi}
+                </div>
+              )}
+            </div>
+          </div>
+
+          <div className='flex flex-row  justify-between items-center'>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>
+                Durasi Tempo
+              </label>
+              <span className='text-xs opacity-60'>
+                Pilih durasi tempo yang anda inginkan
+              </span>
+            </div>
+            <div className='w-3/5 flex flex-row items-center'>
+              <div className='w-1/5' ref={tempoDurationRef}>
+                <RadioGroup
+                  onChange={onChangeTempoDuration}
+                  // value={selectedValue}
+                >
+                  <Stack direction='column' className=''>
+                    <Radio colorScheme='red' value='7'>
+                      7 Hari
+                    </Radio>
+                    <Radio colorScheme='red' value='14' className=''>
+                      14 Hari
+                    </Radio>
+                    <Radio colorScheme='red' value='30' className=''>
+                      30 Hari
+                    </Radio>
+                  </Stack>
+                </RadioGroup>
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errors.tempoDuration}
+                  </div>
+                )}
+              </div>
+              <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>
+                  <span className='text-xs opacity-60'>
+                    Ajukan nilai limit yang anda mau
+                  </span>
+                </div>
+                <div
+                  className='flex flex-col justify-start items-start'
+                  ref={tempoLimitRef}
+                >
+                  <RadioGroup
+                    onChange={onChangeTempoLimit}
+                    className='flex items-center justify-between '
+                  >
+                    <Stack direction='row' className=''>
+                      {/* Kolom 1 */}
+                      <Stack direction='column' spacing={2} className='mr-4'>
+                        <Radio colorScheme='red' value='5.000.000'>
+                          5.000.000
+                        </Radio>
+                        <Radio colorScheme='red' value='10.000.000'>
+                          10.000.000
+                        </Radio>
+                        <Radio colorScheme='red' value='15.000.000'>
+                          15.000.000
+                        </Radio>
+                        <Radio colorScheme='red' value='20.000.000'>
+                          20.000.000
+                        </Radio>
+                      </Stack>
+
+                      {/* Kolom 2 */}
+                      <Stack direction='column' className='ml-8' spacing={2}>
+                        <Radio colorScheme='red' value='25.000.000'>
+                          25.000.000
+                        </Radio>
+                        <Radio colorScheme='red' value='30.000.000'>
+                          30.000.000
+                        </Radio>
+                        <Radio colorScheme='red' value='35.000.000'>
+                          35.000.000
+                        </Radio>
+                        <div className='flex flex-row'>
+                          <Radio colorScheme='red' value='custom'></Radio>
+                          <input
+                            placeholder='Isi limit yang anda inginkan'
+                            type='text'
+                            className='border ml-2 p-1' // padding untuk memberi ruang untuk "RP"
+                            value={formatRupiah(tempoLimitValue)} // Menampilkan nilai terformat
+                            onChange={(e) => {
+                              const value = e.target.value;
+                              const formattedValue = formatRupiah(value);
+                              updateForm('tempoLimit', formattedValue); // Mengupdate nilai di react-hook-form
+                            }}
+                          />
+                        </div>
+                      </Stack>
+                    </Stack>
+                  </RadioGroup>
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errors.tempoLimit}
+                    </div>
+                  )}
+                </div>
+              </div>
+            </div>
+          </div>
+
+          <div className='text-red-500'>
+            *Durasi dan limit dapat berbeda sesuaui dengan verifikasi oleh tim
+            Indoteknik.com
+          </div>
+
+          <div className='flex flex-row  justify-between items-start'>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>
+                Apakah bersedia transaksi via website?
+              </label>
+              <span className='text-xs opacity-60'>
+                Pilih produk bisa lebih dari 1
+              </span>
+            </div>
+            <div className='w-3/5 flex flex-col justify-start'>
+              <div className='flex gap-x-4' ref={bersediaRef}>
+                <Checkbox
+                  borderColor='gray.600'
+                  colorScheme='red'
+                  isChecked={bersedia === true} // Checked when bersedia is true
+                  onChange={() => handleCheckboxBersediaChange('bersedia')}
+                  value={true}
+                  size='md'
+                >
+                  Saya bersedia
+                </Checkbox>
+                <Checkbox
+                  borderColor='gray.600'
+                  colorScheme='red'
+                  isChecked={bersedia === false} // Checked when bersedia is false
+                  onChange={() => handleCheckboxBersediaChange('tidakBersedia')}
+                  value={false}
+                  size='md'
+                >
+                  Tidak bersedia
+                </Checkbox>
+              </div>
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errors.estimasi}
+                </div>
+              )}
+            </div>
+          </div>
+
+          <div className='flex flex-row  justify-between items-start'>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>
+                Kategori Produk yang Digunakan
+              </label>
+              <span className='text-xs opacity-60'>
+                Pilih produk bisa lebih dari 1
+              </span>
+            </div>
+            <div className='w-3/5 flex flex-col'>
+              <div className='flex flex-row justify-between'>
+                <div className='flex flex-col gap-2' ref={categoryProdukRef}>
+                  {firstColumn.map((item) => (
+                    <Checkbox
+                      key={item.id}
+                      onChange={() => handleCheckboxChange(item.id)}
+                    >
+                      {item.name}
+                    </Checkbox>
+                  ))}
+                </div>
+                <div className='flex flex-col gap-2'>
+                  {secondColumn.map((item) => (
+                    <Checkbox
+                      key={item.id}
+                      onChange={() => handleCheckboxChange(item.id)}
+                    >
+                      {item.name}
+                    </Checkbox>
+                  ))}
+                </div>
+              </div>
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errors.categoryProduk}
+                </div>
+              )}
+            </div>
+          </div>
+        </div>
+      </form>
+    </>
+  );
+};
+
+export default KontakPerusahaan;
-- 
cgit v1.2.3


From 661d742193b62aeb3d2a2350433bdd3714667625 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 18 Oct 2024 10:39:40 +0700
Subject: <iman> add kontak perusahaan

---
 .../pengajuan-tempo/component/KontakPerusahaan.jsx | 598 ++++++---------------
 1 file changed, 160 insertions(+), 438 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index d292449b..a595ff13 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -5,10 +5,15 @@ 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 { usePengajuanTempoStore } from '../../../../src-migrate/modules/register/stores/usePengajuanTempoStore';
+import { usePengajuanTempoStoreKontakPerson } from '../../../../src-migrate/modules/register/stores/usePengajuanTempoStore';
 const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
   const { control, watch } = useForm();
-  const { form, errors, validate, updateForm } = usePengajuanTempoStore();
+  const {
+    formKontakPerson,
+    errorsKontakPerson,
+    validateKontakPerson,
+    updateFormKontakPerson,
+  } = usePengajuanTempoStoreKontakPerson();
   const [industries, setIndustries] = useState([]);
   const [selectedCategory, setSelectedCategory] = useState('');
   const [states, setState] = useState([]);
@@ -43,10 +48,10 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
 
   const watchState = watch('state');
   useEffect(() => {
-    updateForm('city', '');
+    updateFormKontakPerson('city', '');
     if (watchState) {
-      updateForm('state', `${watchState}`);
-      validate();
+      updateFormKontakPerson('state', `${watchState}`);
+      validateKontakPerson();
       const loadCities = async () => {
         let dataCities = await cityApi({ stateId: watchState });
         dataCities = dataCities.map((city) => ({
@@ -62,8 +67,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
   const watchCity = watch('city');
   useEffect(() => {
     if (watchCity) {
-      updateForm('city', `${watchCity}`);
-      validate();
+      updateFormKontakPerson('city', `${watchCity}`);
+      validateKontakPerson();
     }
   }, [watchCity]);
 
@@ -86,8 +91,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
       (industry) => industry.value === watch('industry_id')
     );
     if (selectedIndustryType) {
-      updateForm('industry_id', `${selectedIndustryType?.value}`);
-      validate();
+      updateFormKontakPerson('industry_id', `${selectedIndustryType?.value}`);
+      validateKontakPerson();
       setSelectedCategory(selectedIndustryType.category);
     }
   }, [watch('industry_id'), industries]);
@@ -108,17 +113,17 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
     const value = e.target.value;
     const formattedValue = formatRupiah(value);
     console.log('formattedValue', formattedValue);
-    updateForm('estimasi', formattedValue.replace(/^Rp\s*/, ''));
-    validate();
+    updateFormKontakPerson('estimasi', formattedValue.replace(/^Rp\s*/, ''));
+    validateKontakPerson();
   };
   const onChangeTempoDuration = (e) => {
-    updateForm('tempoDuration', `${e}`);
-    validate();
+    updateFormKontakPerson('tempoDuration', `${e}`);
+    validateKontakPerson();
   };
 
   const onChangeTempoLimit = (e) => {
-    updateForm('tempoLimit', `${e}`);
-    validate();
+    updateFormKontakPerson('tempoLimit', `${e}`);
+    validateKontakPerson();
   };
   const handleCheckboxBersediaChange = (value) => {
     if (value === 'bersedia') {
@@ -126,8 +131,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
     } else if (value === 'tidakBersedia') {
       setBersedia(false);
     }
-    updateForm('bersedia', `${value === 'bersedia'}`);
-    validate();
+    updateFormKontakPerson('bersedia', `${value === 'bersedia'}`);
+    validateKontakPerson();
   };
   const [selectedIds, setSelectedIds] = useState([]);
 
@@ -137,36 +142,33 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
         ? prevSelected.filter((selectedId) => selectedId !== id)
         : [...prevSelected, id]
     );
-    updateForm('categoryProduk', `${selectedIds}`);
-    validate();
+    updateFormKontakPerson('categoryProduk', `${selectedIds}`);
+    validateKontakPerson();
   };
 
   const handleInputChange = (event) => {
     const { name, value } = event.target;
-    updateForm(name, value);
-    validate();
+    updateFormKontakPerson(name, value);
+    validateKontakPerson();
   };
 
   const midIndex = Math.ceil(category_produk.length / 2);
   const firstColumn = category_produk.slice(0, midIndex);
   const secondColumn = category_produk.slice(midIndex);
-  const isFormValid = useMemo(() => Object.keys(errors).length === 0, [errors]);
+  const isFormValid = useMemo(
+    () => Object.keys(errorsKontakPerson).length === 0,
+    [errorsKontakPerson]
+  );
+
+  const direkturNameRef = useRef(null);
+  const direkturMobileRef = useRef(null);
+  const direkturEmailRef = useRef(null);
+  const purchasingNameRef = useRef(null);
+  const purchasingEmailRef = useRef(null);
+  const financeNameRef = useRef(null);
+  const financeMobileRef = useRef(null);
+  const financeEmailRef = useRef(null);
 
-  const nameRef = useRef(null);
-  const industry_idRef = useRef(null);
-  const streetRef = useRef(null);
-  const stateRef = useRef(null);
-  const cityRef = useRef(null);
-  const zipRef = useRef(null);
-  const mobileRef = useRef(null);
-  const bankNameRef = useRef(null);
-  const accountNameRef = useRef(null);
-  const accountNumberRef = useRef(null);
-  const estimasiRef = useRef(null);
-  const tempoDurationRef = useRef(null);
-  const bersediaRef = useRef(null);
-  const categoryProdukRef = useRef(null);
-  const tempoLimitRef = useRef(null);
   useEffect(() => {
     const loadIndustries = async () => {
       if (!isFormValid) {
@@ -174,64 +176,36 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           behavior: 'smooth',
           block: 'center',
         };
-        if (errors.name && nameRef.current) {
-          nameRef.current.scrollIntoView(options);
-          return;
-        }
-        if (errors.industry_id && industry_idRef.current) {
-          industry_idRef.current.scrollIntoView(options);
-          return;
-        }
-        if (errors.street && streetRef.current) {
-          streetRef.current.scrollIntoView(options);
+        if (errorsKontakPerson.direkturName && direkturNameRef.current) {
+          direkturNameRef.current.scrollIntoView(options);
           return;
         }
-        if (errors.state && stateRef.current) {
-          stateRef.current.scrollIntoView(options);
+        if (errorsKontakPerson.direkturMobile && direkturMobileRef.current) {
+          direkturMobileRef.current.scrollIntoView(options);
           return;
         }
-        if (errors.city && cityRef.current) {
-          cityRef.current.scrollIntoView(options);
+        if (errorsKontakPerson.direkturEmail && direkturEmailRef.current) {
+          direkturEmailRef.current.scrollIntoView(options);
           return;
         }
-        if (errors.zip && zipRef.current) {
-          zipRef.current.scrollIntoView(options);
+        if (errorsKontakPerson.purchasingName && purchasingNameRef.current) {
+          purchasingNameRef.current.scrollIntoView(options);
           return;
         }
-        if (errors.mobile && mobileRef.current) {
-          mobileRef.current.scrollIntoView(options);
+        if (errorsKontakPerson.purchasingEmail && purchasingEmailRef.current) {
+          purchasingEmailRef.current.scrollIntoView(options);
           return;
         }
-        if (errors.bankName && bankNameRef.current) {
-          bankNameRef.current.scrollIntoView(options);
+        if (errorsKontakPerson.financeName && financeNameRef.current) {
+          financeNameRef.current.scrollIntoView(options);
           return;
         }
-        if (errors.accountName && accountNameRef.current) {
-          accountNameRef.current.scrollIntoView(options);
+        if (errorsKontakPerson.financeMobile && financeMobileRef.current) {
+          financeMobileRef.current.scrollIntoView(options);
           return;
         }
-        if (errors.accountNumber && accountNumberRef.current) {
-          accountNumberRef.current.scrollIntoView(options);
-          return;
-        }
-        if (errors.estimasi && estimasiRef.current) {
-          estimasiRef.current.scrollIntoView(options);
-          return;
-        }
-        if (errors.tempoDuration && tempoDurationRef.current) {
-          tempoDurationRef.current.scrollIntoView(options);
-          return;
-        }
-        if (errors.bersedia && bersediaRef.current) {
-          bersediaRef.current.scrollIntoView(options);
-          return;
-        }
-        if (errors.categoryProduk && categoryProdukRef.current) {
-          categoryProdukRef.current.scrollIntoView(options);
-          return;
-        }
-        if (errors.tempoLimit && tempoLimitRef.current) {
-          tempoLimitRef.current.scrollIntoView(options);
+        if (errorsKontakPerson.financeEmail && financeEmailRef.current) {
+          financeEmailRef.current.scrollIntoView(options);
           return;
         }
       }
@@ -253,52 +227,46 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
             </div>
             <div className='w-3/5'>
               <input
-                id='name'
-                name='name'
-                placeholder='Masukkan nama perusahaan'
+                id='direkturName'
+                name='direkturName'
+                placeholder='Masukkan nama direktur anda'
                 type='text'
                 className='form-input'
-                aria-invalid={errors.name}
-                ref={nameRef}
+                aria-invalid={errorsKontakPerson.direkturName}
+                ref={direkturNameRef}
                 onChange={handleInputChange}
               />
-              <span className='text-xs opacity-60'>
-                Format: PT. INDOTEKNIK DOTCOM GEMILANG
-              </span>
               {chekValid && (
                 <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errors.name}
+                  {errorsKontakPerson.direkturName}
                 </div>
               )}
             </div>
           </div>
+
           <div className='flex flex-row  justify-between items-start'>
-            <div ref={industry_idRef}>
-              <label className='form-label w-2/5 text-nowrap'>Industri</label>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>
+                No. Telpon Direktur
+              </label>
               <span className='text-xs opacity-60'>
-                isi detail perusahaan sesuai dengan nama yang terdaftar
+                isi nomor telpon direktur di perusahaan kamu
               </span>
             </div>
             <div className='w-3/5'>
-              <Controller
-                name='industry_id'
-                control={control}
-                render={(props) => (
-                  <HookFormSelect
-                    {...props}
-                    options={industries}
-                    placeholder={'Pilih industri bisnis anda'}
-                  />
-                )}
+              <input
+                id='direkturMobile'
+                name='direkturMobile'
+                ref={direkturMobileRef}
+                placeholder='Masukkan nomor direktur anda'
+                type='tel'
+                className='form-input'
+                aria-invalid={errorsKontakPerson.direkturMobile}
+                onChange={handleInputChange}
               />
-              {selectedCategory && (
-                <span className='text-gray_r-11 text-xs opacity-60'>
-                  Kategori : {selectedCategory}
-                </span>
-              )}
               {chekValid && (
                 <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errors.industry_id}
+                  {errorsKontakPerson.direkturMobile}
                 </div>
               )}
             </div>
@@ -307,371 +275,137 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           <div className='flex flex-row  justify-between items-start'>
             <div>
               <label className='form-label w-2/5 text-nowrap'>
-                Alamat Perusahaan
+                Email Direktur
               </label>
               <span className='text-xs opacity-60'>
-                alamat sesuai dengan alamat kantor pusat
+                isi email Direktur yang sesuai
               </span>
             </div>
-            <div className='w-3/5 flex gap-3 flex-col'>
-              <div>
-                <input
-                  id='street'
-                  name='street'
-                  ref={streetRef}
-                  placeholder='Masukkan alamat lengkap perusahaan'
-                  type='text'
-                  className='form-input'
-                  onChange={handleInputChange}
-                />
-                {chekValid && (
-                  <div className='text-caption-2 text-danger-500 mt-1'>
-                    {errors.street}
-                  </div>
-                )}
-              </div>
-              <div className='sub-alamat flex flex-row w-full gap-3'>
-                <div className='w-2/5' ref={stateRef}>
-                  <Controller
-                    name='state'
-                    control={control}
-                    render={(props) => (
-                      <HookFormSelect
-                        {...props}
-                        options={states}
-                        placeholder='Provinsi'
-                      />
-                    )}
-                  />
-                  {chekValid && (
-                    <div className='text-caption-2 text-danger-500 mt-1'>
-                      {errors.state}
-                    </div>
-                  )}
-                </div>
-                <div className='w-1/3' ref={cityRef}>
-                  <Controller
-                    name='city'
-                    control={control}
-                    render={(props) => (
-                      <HookFormSelect
-                        {...props}
-                        options={cities}
-                        disabled={!watchState}
-                        placeholder='Kota'
-                      />
-                    )}
-                  />
-                  {chekValid && (
-                    <div className='text-caption-2 text-danger-500 mt-1'>
-                      {errors.city}
-                    </div>
-                  )}
-                </div>
-                <div className='w-1/3'>
-                  <input
-                    id='zip'
-                    name='zip'
-                    ref={zipRef}
-                    placeholder='Kode Pos'
-                    type='number'
-                    className='form-input'
-                    onChange={handleInputChange}
-                  />
-                  {chekValid && (
-                    <div className='text-caption-2 text-danger-500 mt-1'>
-                      {errors.zip}
-                    </div>
-                  )}
+            <div className='w-3/5'>
+              <input
+                id='direkturEmail'
+                name='direkturEmail'
+                ref={direkturEmailRef}
+                placeholder='contoh@email.com'
+                type='email'
+                className='form-input'
+                aria-invalid={errorsKontakPerson.direkturEmail}
+                onChange={handleInputChange}
+              />
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errorsKontakPerson.direkturEmail}
                 </div>
-              </div>
+              )}
             </div>
           </div>
+
           <div className='flex flex-row  justify-between items-start'>
             <div>
               <label className='form-label w-2/5 text-nowrap'>
-                No. Telfon Perusahaan
+                Nama Purchasing
               </label>
               <span className='text-xs opacity-60'>
-                isi no telfon perusahaan yang sesuai
+                isi nama purchasing yang bertanggung jawab di perusahaan anda
               </span>
             </div>
             <div className='w-3/5'>
               <input
-                id='mobile'
-                name='mobile'
-                ref={mobileRef}
-                placeholder='Masukkan nomor telfon perusahaan'
+                id='purchasingName'
+                name='purchasingName'
+                ref={purchasingNameRef}
+                placeholder='Masukkan nama purchasing anda'
                 type='text'
                 className='form-input'
-                aria-invalid={errors.mobile}
+                aria-invalid={errorsKontakPerson.purchasingName}
                 onChange={handleInputChange}
               />
               {chekValid && (
                 <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errors.mobile}
+                  {errorsKontakPerson.purchasingName}
                 </div>
               )}
             </div>
           </div>
 
-          <div className='flex flex-row  justify-between items-start'>
-            <div>
-              <label className='form-label w-2/5 text-nowrap'>Data Bank</label>
-              <span className='text-xs opacity-60'>
-                Isi detail data bank perusahaan anda
-              </span>
-            </div>
-            <div className='w-3/5 flex gap-3 flex-row'>
-              <div>
-                <input
-                  id='bankName'
-                  name='bankName'
-                  ref={bankNameRef}
-                  placeholder='Nama bank'
-                  type='text'
-                  className='form-input'
-                  onChange={handleInputChange}
-                />
-                <span className='text-xs opacity-60'>
-                  Format: BCA, Mandiri, CIMB, BNI dll
-                </span>
-                {chekValid && (
-                  <div className='text-caption-2 text-danger-500 mt-1'>
-                    {errors.bankName}
-                  </div>
-                )}
-              </div>
-              <div>
-                <input
-                  id='accountName'
-                  name='accountName'
-                  ref={accountNameRef}
-                  placeholder='Nama Rekening'
-                  type='text'
-                  className='form-input'
-                  onChange={handleInputChange}
-                />
-                <span className='text-xs opacity-60'>Format: John Doe</span>
-                {chekValid && (
-                  <div className='text-caption-2 text-danger-500 mt-1'>
-                    {errors.accountName}
-                  </div>
-                )}
-              </div>
-              <div>
-                <input
-                  id='accountNumber'
-                  name='accountNumber'
-                  ref={accountNumberRef}
-                  placeholder='Nomor Rekening Bank'
-                  type='text'
-                  className='form-input'
-                  onChange={handleInputChange}
-                />
-                <span className='text-xs opacity-60'>Format: 01234567896</span>
-                {chekValid && (
-                  <div className='text-caption-2 text-danger-500 mt-1'>
-                    {errors.accountNumber}
-                  </div>
-                )}
-              </div>
-            </div>
-          </div>
-
           <div className='flex flex-row  justify-between items-start'>
             <div>
               <label className='form-label w-2/5 text-nowrap'>
-                Website <span className=' opacity-60'>(Opsional)</span>
+                Email Purchasing
               </label>
+              <span className='text-xs opacity-60'>
+                isi email purchasing benar
+              </span>
             </div>
             <div className='w-3/5'>
               <input
-                id='website'
-                name='website'
-                placeholder='www.indoteknik.com'
-                type='text'
+                id='purchasingEmail'
+                name='purchasingEmail'
+                ref={purchasingEmailRef}
+                placeholder='contoh@email.com'
+                type='email'
                 className='form-input'
+                aria-invalid={errorsKontakPerson.purchasingEmail}
                 onChange={handleInputChange}
               />
-            </div>
-          </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>
-            <div className='w-3/5'>
-              <div className='relative'>
-                <input
-                  id='estimasi'
-                  name='estimasi'
-                  ref={estimasiRef}
-                  // {...register('estimasi', {
-                  //   setValueAs: (value) => value.replace(/^Rp\s*/, ''), // Menyimpan hanya angka
-                  // })}
-                  placeholder='Isi estimasi pembelian produk pertahun'
-                  type='text'
-                  className='form-input' // padding untuk memberi ruang untuk "RP"
-                  value={formatRupiah(form.estimasi)}
-                  onChange={handleChange} // Mengatur perubahan input
-                />
-              </div>
               {chekValid && (
                 <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errors.estimasi}
+                  {errorsKontakPerson.purchasingEmail}
                 </div>
               )}
             </div>
           </div>
 
-          <div className='flex flex-row  justify-between items-center'>
+          <div className='flex flex-row  justify-between items-start'>
             <div>
               <label className='form-label w-2/5 text-nowrap'>
-                Durasi Tempo
+                Nama Finance
               </label>
               <span className='text-xs opacity-60'>
-                Pilih durasi tempo yang anda inginkan
+                isi nama finance yang bertanggung jawab di perusahaan anda
               </span>
             </div>
-            <div className='w-3/5 flex flex-row items-center'>
-              <div className='w-1/5' ref={tempoDurationRef}>
-                <RadioGroup
-                  onChange={onChangeTempoDuration}
-                  // value={selectedValue}
-                >
-                  <Stack direction='column' className=''>
-                    <Radio colorScheme='red' value='7'>
-                      7 Hari
-                    </Radio>
-                    <Radio colorScheme='red' value='14' className=''>
-                      14 Hari
-                    </Radio>
-                    <Radio colorScheme='red' value='30' className=''>
-                      30 Hari
-                    </Radio>
-                  </Stack>
-                </RadioGroup>
-                {chekValid && (
-                  <div className='text-caption-2 text-danger-500 mt-1'>
-                    {errors.tempoDuration}
-                  </div>
-                )}
-              </div>
-              <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>
-                  <span className='text-xs opacity-60'>
-                    Ajukan nilai limit yang anda mau
-                  </span>
-                </div>
-                <div
-                  className='flex flex-col justify-start items-start'
-                  ref={tempoLimitRef}
-                >
-                  <RadioGroup
-                    onChange={onChangeTempoLimit}
-                    className='flex items-center justify-between '
-                  >
-                    <Stack direction='row' className=''>
-                      {/* Kolom 1 */}
-                      <Stack direction='column' spacing={2} className='mr-4'>
-                        <Radio colorScheme='red' value='5.000.000'>
-                          5.000.000
-                        </Radio>
-                        <Radio colorScheme='red' value='10.000.000'>
-                          10.000.000
-                        </Radio>
-                        <Radio colorScheme='red' value='15.000.000'>
-                          15.000.000
-                        </Radio>
-                        <Radio colorScheme='red' value='20.000.000'>
-                          20.000.000
-                        </Radio>
-                      </Stack>
-
-                      {/* Kolom 2 */}
-                      <Stack direction='column' className='ml-8' spacing={2}>
-                        <Radio colorScheme='red' value='25.000.000'>
-                          25.000.000
-                        </Radio>
-                        <Radio colorScheme='red' value='30.000.000'>
-                          30.000.000
-                        </Radio>
-                        <Radio colorScheme='red' value='35.000.000'>
-                          35.000.000
-                        </Radio>
-                        <div className='flex flex-row'>
-                          <Radio colorScheme='red' value='custom'></Radio>
-                          <input
-                            placeholder='Isi limit yang anda inginkan'
-                            type='text'
-                            className='border ml-2 p-1' // padding untuk memberi ruang untuk "RP"
-                            value={formatRupiah(tempoLimitValue)} // Menampilkan nilai terformat
-                            onChange={(e) => {
-                              const value = e.target.value;
-                              const formattedValue = formatRupiah(value);
-                              updateForm('tempoLimit', formattedValue); // Mengupdate nilai di react-hook-form
-                            }}
-                          />
-                        </div>
-                      </Stack>
-                    </Stack>
-                  </RadioGroup>
-                  {chekValid && (
-                    <div className='text-caption-2 text-danger-500 mt-1'>
-                      {errors.tempoLimit}
-                    </div>
-                  )}
+            <div className='w-3/5'>
+              <input
+                id='financeName'
+                name='financeName'
+                ref={financeNameRef}
+                placeholder='Masukkan nama finance'
+                type='text'
+                className='form-input'
+                aria-invalid={errorsKontakPerson.financeName}
+                onChange={handleInputChange}
+              />
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errorsKontakPerson.financeName}
                 </div>
-              </div>
+              )}
             </div>
           </div>
-
-          <div className='text-red-500'>
-            *Durasi dan limit dapat berbeda sesuaui dengan verifikasi oleh tim
-            Indoteknik.com
-          </div>
-
           <div className='flex flex-row  justify-between items-start'>
             <div>
               <label className='form-label w-2/5 text-nowrap'>
-                Apakah bersedia transaksi via website?
+                No. Telpon Finance
               </label>
               <span className='text-xs opacity-60'>
-                Pilih produk bisa lebih dari 1
+                isi nomor finance yang bertanggung jawab di perusahaan anda
               </span>
             </div>
-            <div className='w-3/5 flex flex-col justify-start'>
-              <div className='flex gap-x-4' ref={bersediaRef}>
-                <Checkbox
-                  borderColor='gray.600'
-                  colorScheme='red'
-                  isChecked={bersedia === true} // Checked when bersedia is true
-                  onChange={() => handleCheckboxBersediaChange('bersedia')}
-                  value={true}
-                  size='md'
-                >
-                  Saya bersedia
-                </Checkbox>
-                <Checkbox
-                  borderColor='gray.600'
-                  colorScheme='red'
-                  isChecked={bersedia === false} // Checked when bersedia is false
-                  onChange={() => handleCheckboxBersediaChange('tidakBersedia')}
-                  value={false}
-                  size='md'
-                >
-                  Tidak bersedia
-                </Checkbox>
-              </div>
+            <div className='w-3/5'>
+              <input
+                id='financeMobile'
+                name='financeMobile'
+                ref={financeMobileRef}
+                placeholder='Masukkan nomor finance'
+                type='tel'
+                className='form-input'
+                aria-invalid={errorsKontakPerson.financeMobile}
+                onChange={handleInputChange}
+              />
               {chekValid && (
                 <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errors.estimasi}
+                  {errorsKontakPerson.financeMobile}
                 </div>
               )}
             </div>
@@ -680,38 +414,26 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           <div className='flex flex-row  justify-between items-start'>
             <div>
               <label className='form-label w-2/5 text-nowrap'>
-                Kategori Produk yang Digunakan
+                Email Finance
               </label>
               <span className='text-xs opacity-60'>
-                Pilih produk bisa lebih dari 1
+                isi email finance dengan benar
               </span>
             </div>
-            <div className='w-3/5 flex flex-col'>
-              <div className='flex flex-row justify-between'>
-                <div className='flex flex-col gap-2' ref={categoryProdukRef}>
-                  {firstColumn.map((item) => (
-                    <Checkbox
-                      key={item.id}
-                      onChange={() => handleCheckboxChange(item.id)}
-                    >
-                      {item.name}
-                    </Checkbox>
-                  ))}
-                </div>
-                <div className='flex flex-col gap-2'>
-                  {secondColumn.map((item) => (
-                    <Checkbox
-                      key={item.id}
-                      onChange={() => handleCheckboxChange(item.id)}
-                    >
-                      {item.name}
-                    </Checkbox>
-                  ))}
-                </div>
-              </div>
+            <div className='w-3/5'>
+              <input
+                id='financeEmail'
+                name='financeEmail'
+                ref={financeEmailRef}
+                placeholder='contoh@email.com'
+                type='email'
+                className='form-input'
+                aria-invalid={errorsKontakPerson.financeEmail}
+                onChange={handleInputChange}
+              />
               {chekValid && (
                 <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errors.categoryProduk}
+                  {errorsKontakPerson.financeEmail}
                 </div>
               )}
             </div>
-- 
cgit v1.2.3


From 87ffd2fa7edc240693ddd81401ef23c5cd1bbb3e Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 18 Oct 2024 16:11:17 +0700
Subject: <iman> update fix kontak person

---
 .../pengajuan-tempo/component/KontakPerusahaan.jsx | 179 ++++++---------------
 1 file changed, 45 insertions(+), 134 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index a595ff13..861a75ba 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -14,137 +14,6 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
     validateKontakPerson,
     updateFormKontakPerson,
   } = usePengajuanTempoStoreKontakPerson();
-  const [industries, setIndustries] = useState([]);
-  const [selectedCategory, setSelectedCategory] = useState('');
-  const [states, setState] = useState([]);
-  const [cities, setCities] = useState([]);
-  const [bersedia, setBersedia] = useState(null);
-  const category_produk = [
-    { id: 1, name: 'Pengaman, Kesehatan & Keamanan' },
-    { id: 2, name: 'Perkakas Tangan, Listrik & Pneumatic' },
-    { id: 3, name: 'Mesin Industrial' },
-    { id: 4, name: 'Mesin Pertanian & Perkebunan' },
-    { id: 5, name: 'Mesin Pembersih & Janitorial' },
-    { id: 6, name: 'Cairan Berbahan Kimia' },
-    { id: 7, name: 'Perlengkapan Pengukuran & Pengujian' },
-    { id: 8, name: 'Peralatan Listrik & Elektronik' },
-    { id: 9, name: 'Perlengkapan Logistik & Gudang' },
-    { id: 10, name: 'Peralatan Kantor & Stationery' },
-    { id: 11, name: 'Komponen & Aksesoris' },
-    { id: 12, name: 'Peralatan Horeca & Food Service' },
-  ];
-
-  useEffect(() => {
-    const loadState = async () => {
-      let dataState = await stateApi();
-      dataState = dataState.map((state) => ({
-        value: state.id,
-        label: state.name,
-      }));
-      setState(dataState);
-    };
-    loadState();
-  }, []);
-
-  const watchState = watch('state');
-  useEffect(() => {
-    updateFormKontakPerson('city', '');
-    if (watchState) {
-      updateFormKontakPerson('state', `${watchState}`);
-      validateKontakPerson();
-      const loadCities = async () => {
-        let dataCities = await cityApi({ stateId: watchState });
-        dataCities = dataCities.map((city) => ({
-          value: city.id,
-          label: city.name,
-        }));
-        setCities(dataCities);
-      };
-      loadCities();
-    }
-  }, [watchState]);
-
-  const watchCity = watch('city');
-  useEffect(() => {
-    if (watchCity) {
-      updateFormKontakPerson('city', `${watchCity}`);
-      validateKontakPerson();
-    }
-  }, [watchCity]);
-
-  useEffect(() => {
-    const loadIndustries = async () => {
-      const dataIndustries = await odooApi('GET', '/api/v1/partner/industry');
-      setIndustries(
-        dataIndustries?.map((o) => ({
-          value: o.id,
-          label: o.name,
-          category: o.category,
-        }))
-      );
-    };
-    loadIndustries();
-  }, []);
-
-  useEffect(() => {
-    const selectedIndustryType = industries.find(
-      (industry) => industry.value === watch('industry_id')
-    );
-    if (selectedIndustryType) {
-      updateFormKontakPerson('industry_id', `${selectedIndustryType?.value}`);
-      validateKontakPerson();
-      setSelectedCategory(selectedIndustryType.category);
-    }
-  }, [watch('industry_id'), industries]);
-
-  const estimasiValue = watch('estimasi');
-  const tempoLimitValue = watch('tempoLimit');
-
-  // Memformat angka menjadi format rupiah
-  const formatRupiah = (value) => {
-    if (!value) return '';
-    const numberString = value.replace(/[^0-9]/g, ''); // Menghapus karakter non-digit
-    return numberString
-      ? 'Rp ' + new Intl.NumberFormat('id-ID').format(numberString)
-      : '';
-  };
-
-  const handleChange = (e) => {
-    const value = e.target.value;
-    const formattedValue = formatRupiah(value);
-    console.log('formattedValue', formattedValue);
-    updateFormKontakPerson('estimasi', formattedValue.replace(/^Rp\s*/, ''));
-    validateKontakPerson();
-  };
-  const onChangeTempoDuration = (e) => {
-    updateFormKontakPerson('tempoDuration', `${e}`);
-    validateKontakPerson();
-  };
-
-  const onChangeTempoLimit = (e) => {
-    updateFormKontakPerson('tempoLimit', `${e}`);
-    validateKontakPerson();
-  };
-  const handleCheckboxBersediaChange = (value) => {
-    if (value === 'bersedia') {
-      setBersedia(true);
-    } else if (value === 'tidakBersedia') {
-      setBersedia(false);
-    }
-    updateFormKontakPerson('bersedia', `${value === 'bersedia'}`);
-    validateKontakPerson();
-  };
-  const [selectedIds, setSelectedIds] = useState([]);
-
-  const handleCheckboxChange = (id) => {
-    setSelectedIds((prevSelected) =>
-      prevSelected.includes(id)
-        ? prevSelected.filter((selectedId) => selectedId !== id)
-        : [...prevSelected, id]
-    );
-    updateFormKontakPerson('categoryProduk', `${selectedIds}`);
-    validateKontakPerson();
-  };
 
   const handleInputChange = (event) => {
     const { name, value } = event.target;
@@ -152,9 +21,6 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
     validateKontakPerson();
   };
 
-  const midIndex = Math.ceil(category_produk.length / 2);
-  const firstColumn = category_produk.slice(0, midIndex);
-  const secondColumn = category_produk.slice(midIndex);
   const isFormValid = useMemo(
     () => Object.keys(errorsKontakPerson).length === 0,
     [errorsKontakPerson]
@@ -165,6 +31,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
   const direkturEmailRef = useRef(null);
   const purchasingNameRef = useRef(null);
   const purchasingEmailRef = useRef(null);
+  const purchasingMobileRef = useRef(null);
   const financeNameRef = useRef(null);
   const financeMobileRef = useRef(null);
   const financeEmailRef = useRef(null);
@@ -192,6 +59,13 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           purchasingNameRef.current.scrollIntoView(options);
           return;
         }
+        if (
+          errorsKontakPerson.purchasingMobile &&
+          purchasingMobileRef.current
+        ) {
+          purchasingMobileRef.current.scrollIntoView(options);
+          return;
+        }
         if (errorsKontakPerson.purchasingEmail && purchasingEmailRef.current) {
           purchasingEmailRef.current.scrollIntoView(options);
           return;
@@ -227,6 +101,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
             </div>
             <div className='w-3/5'>
               <input
+                value={formKontakPerson.direkturName}
                 id='direkturName'
                 name='direkturName'
                 placeholder='Masukkan nama direktur anda'
@@ -260,6 +135,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
                 ref={direkturMobileRef}
                 placeholder='Masukkan nomor direktur anda'
                 type='tel'
+                value={formKontakPerson.direkturMobile}
                 className='form-input'
                 aria-invalid={errorsKontakPerson.direkturMobile}
                 onChange={handleInputChange}
@@ -288,6 +164,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
                 ref={direkturEmailRef}
                 placeholder='contoh@email.com'
                 type='email'
+                value={formKontakPerson.direkturEmail}
                 className='form-input'
                 aria-invalid={errorsKontakPerson.direkturEmail}
                 onChange={handleInputChange}
@@ -315,6 +192,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
                 name='purchasingName'
                 ref={purchasingNameRef}
                 placeholder='Masukkan nama purchasing anda'
+                value={formKontakPerson.purchasingName}
                 type='text'
                 className='form-input'
                 aria-invalid={errorsKontakPerson.purchasingName}
@@ -328,6 +206,35 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
             </div>
           </div>
 
+          <div className='flex flex-row  justify-between items-start'>
+            <div>
+              <label className='form-label w-2/5 text-nowrap'>
+                No. Telpon Purchasing
+              </label>
+              <span className='text-xs opacity-60'>
+                isi nomor purchasing yang bertanggung jawab di perusahaan anda
+              </span>
+            </div>
+            <div className='w-3/5'>
+              <input
+                id='purchasingMobile'
+                name='purchasingMobile'
+                ref={financeMobileRef}
+                placeholder='Masukkan nomor purchasing anda'
+                value={formKontakPerson.purchasingMobile}
+                type='tel'
+                className='form-input'
+                aria-invalid={errorsKontakPerson.purchasingMobile}
+                onChange={handleInputChange}
+              />
+              {chekValid && (
+                <div className='text-caption-2 text-danger-500 mt-1'>
+                  {errorsKontakPerson.purchasingMobile}
+                </div>
+              )}
+            </div>
+          </div>
+
           <div className='flex flex-row  justify-between items-start'>
             <div>
               <label className='form-label w-2/5 text-nowrap'>
@@ -343,6 +250,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
                 name='purchasingEmail'
                 ref={purchasingEmailRef}
                 placeholder='contoh@email.com'
+                value={formKontakPerson.purchasingEmail}
                 type='email'
                 className='form-input'
                 aria-invalid={errorsKontakPerson.purchasingEmail}
@@ -371,6 +279,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
                 name='financeName'
                 ref={financeNameRef}
                 placeholder='Masukkan nama finance'
+                value={formKontakPerson.financeName}
                 type='text'
                 className='form-input'
                 aria-invalid={errorsKontakPerson.financeName}
@@ -398,6 +307,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
                 name='financeMobile'
                 ref={financeMobileRef}
                 placeholder='Masukkan nomor finance'
+                value={formKontakPerson.financeMobile}
                 type='tel'
                 className='form-input'
                 aria-invalid={errorsKontakPerson.financeMobile}
@@ -427,6 +337,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
                 ref={financeEmailRef}
                 placeholder='contoh@email.com'
                 type='email'
+                value={formKontakPerson.financeEmail}
                 className='form-input'
                 aria-invalid={errorsKontakPerson.financeEmail}
                 onChange={handleInputChange}
-- 
cgit v1.2.3


From 548e2b48b1c2f6521037765f96083a8d79f611d6 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 18 Oct 2024 17:08:55 +0700
Subject: <iman> add pengiriman section

---
 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index 861a75ba..c09aaf57 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -86,6 +86,10 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
     };
     loadIndustries();
   }, [buttonSubmitClick, chekValid]);
+
+  useEffect(() => {
+    validateKontakPerson();
+  }, [buttonSubmitClick]);
   return (
     <>
       <div className='flex justify-start'>
-- 
cgit v1.2.3


From c19c7eee924b70d25cb47d40fd7c8e00d5efa867 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 23 Oct 2024 17:07:37 +0700
Subject: <iman> update pengajuan tempo section konfirmasi

---
 .../pengajuan-tempo/component/KontakPerusahaan.jsx | 122 +++++++++++----------
 1 file changed, 65 insertions(+), 57 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index c09aaf57..a2c17471 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -6,7 +6,7 @@ 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 { usePengajuanTempoStoreKontakPerson } from '../../../../src-migrate/modules/register/stores/usePengajuanTempoStore';
-const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
+const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
   const { control, watch } = useForm();
   const {
     formKontakPerson,
@@ -91,15 +91,15 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
     validateKontakPerson();
   }, [buttonSubmitClick]);
   return (
-    <>
-      <div className='flex justify-start'>
-        <h1 className='font-bold'>Kontak Person</h1>
-      </div>
-      <form className='flex mt-4 flex-col w-full '>
+    <div className=''>
+      <h1 className={`font-bold ${isKonfirmasi ? 'text-xl' : ''}`}>
+        Kontak Person
+      </h1>
+      <form className='flex flex-col w-full '>
         <div className='w-full grid grid-row-2 gap-5'>
           <div className='flex flex-row  justify-between items-start'>
-            <div>
-              <label className='form-label w-2/5 text-nowrap'>
+            <div className='w-2/5'>
+              <label className='form-label  text-nowrap'>
                 Nama Lengkap Direktur
               </label>
             </div>
@@ -124,13 +124,15 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           </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'>
+              <label className='form-label text-nowrap'>
                 No. Telpon Direktur
               </label>
-              <span className='text-xs opacity-60'>
-                isi nomor telpon direktur di perusahaan kamu
-              </span>
+              {!isKonfirmasi && (
+                <span className='text-xs opacity-60'>
+                  isi nomor telpon direktur di perusahaan kamu
+                </span>
+              )}
             </div>
             <div className='w-3/5'>
               <input
@@ -153,13 +155,13 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           </div>
 
           <div className='flex flex-row  justify-between items-start'>
-            <div>
-              <label className='form-label w-2/5 text-nowrap'>
-                Email Direktur
-              </label>
-              <span className='text-xs opacity-60'>
-                isi email Direktur yang sesuai
-              </span>
+            <div className='w-2/5'>
+              <label className='form-label  text-nowrap'>Email Direktur</label>
+              {!isKonfirmasi && (
+                <span className='text-xs opacity-60'>
+                  isi email Direktur yang sesuai
+                </span>
+              )}
             </div>
             <div className='w-3/5'>
               <input
@@ -182,13 +184,13 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           </div>
 
           <div className='flex flex-row  justify-between items-start'>
-            <div>
-              <label className='form-label w-2/5 text-nowrap'>
-                Nama Purchasing
-              </label>
-              <span className='text-xs opacity-60'>
-                isi nama purchasing yang bertanggung jawab di perusahaan anda
-              </span>
+            <div className='w-2/5'>
+              <label className='form-label text-nowrap'>Nama Purchasing</label>
+              {!isKonfirmasi && (
+                <span className='text-xs opacity-60'>
+                  isi nama purchasing yang bertanggung jawab di perusahaan anda
+                </span>
+              )}
             </div>
             <div className='w-3/5'>
               <input
@@ -211,13 +213,15 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           </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'>
+              <label className='form-label  text-nowrap'>
                 No. Telpon Purchasing
               </label>
-              <span className='text-xs opacity-60'>
-                isi nomor purchasing yang bertanggung jawab di perusahaan anda
-              </span>
+              {!isKonfirmasi && (
+                <span className='text-xs opacity-60'>
+                  isi nomor purchasing yang bertanggung jawab di perusahaan anda
+                </span>
+              )}
             </div>
             <div className='w-3/5'>
               <input
@@ -240,13 +244,15 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           </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'>
+              <label className='form-label  text-nowrap'>
                 Email Purchasing
               </label>
-              <span className='text-xs opacity-60'>
-                isi email purchasing benar
-              </span>
+              {!isKonfirmasi && (
+                <span className='text-xs opacity-60'>
+                  isi email purchasing dengan benar
+                </span>
+              )}
             </div>
             <div className='w-3/5'>
               <input
@@ -269,13 +275,13 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           </div>
 
           <div className='flex flex-row  justify-between items-start'>
-            <div>
-              <label className='form-label w-2/5 text-nowrap'>
-                Nama Finance
-              </label>
-              <span className='text-xs opacity-60'>
-                isi nama finance yang bertanggung jawab di perusahaan anda
-              </span>
+            <div className='w-2/5'>
+              <label className='form-label  text-nowrap'>Nama Finance</label>
+              {!isKonfirmasi && (
+                <span className='text-xs opacity-60'>
+                  isi nama finance yang bertanggung jawab di perusahaan anda
+                </span>
+              )}
             </div>
             <div className='w-3/5'>
               <input
@@ -297,13 +303,15 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
             </div>
           </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'>
+              <label className='form-label   text-nowrap'>
                 No. Telpon Finance
               </label>
-              <span className='text-xs opacity-60'>
-                isi nomor finance yang bertanggung jawab di perusahaan anda
-              </span>
+              {!isKonfirmasi && (
+                <span className='text-xs opacity-60'>
+                  isi nomor finance yang bertanggung jawab di perusahaan anda
+                </span>
+              )}
             </div>
             <div className='w-3/5'>
               <input
@@ -326,13 +334,13 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           </div>
 
           <div className='flex flex-row  justify-between items-start'>
-            <div>
-              <label className='form-label w-2/5 text-nowrap'>
-                Email Finance
-              </label>
-              <span className='text-xs opacity-60'>
-                isi email finance dengan benar
-              </span>
+            <div className='w-2/5'>
+              <label className='form-label text-nowrap'>Email Finance</label>
+              {!isKonfirmasi && (
+                <span className='text-xs opacity-60'>
+                  isi email finance dengan benar
+                </span>
+              )}
             </div>
             <div className='w-3/5'>
               <input
@@ -355,7 +363,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick }) => {
           </div>
         </div>
       </form>
-    </>
+    </div>
   );
 };
 
-- 
cgit v1.2.3


From 5e3b8914037fcd7b5153d94f289079ac4dd60235 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 1 Nov 2024 09:35:35 +0700
Subject: <iman> update pengajuan tempo

---
 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

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,
-- 
cgit v1.2.3


From 3550c262e5eeb1b861ae100cd26ae853c7f153fe Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 4 Nov 2024 14:25:02 +0700
Subject: <iman> update pengajuan tempo mobile 80%

---
 .../pengajuan-tempo/component/KontakPerusahaan.jsx | 735 ++++++++++++++-------
 1 file changed, 479 insertions(+), 256 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index 1281e387..091873a7 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -1,5 +1,6 @@
 import React, { useEffect, useMemo, useRef } from 'react';
 import { usePengajuanTempoStoreKontakPerson } from '../../../../src-migrate/modules/register/stores/usePengajuanTempoStore';
+import useDevice from '@/core/hooks/useDevice';
 const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
   const {
     formKontakPerson,
@@ -7,7 +8,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
     validateKontakPerson,
     updateFormKontakPerson,
   } = usePengajuanTempoStoreKontakPerson();
-
+  const { isDesktop, isMobile } = useDevice();
   const handleInputChange = (event) => {
     const { name, value } = event.target;
     updateFormKontakPerson(name, value);
@@ -84,279 +85,501 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
     validateKontakPerson();
   }, [buttonSubmitClick]);
   return (
-    <div className=''>
-      <h1 className={`font-bold ${isKonfirmasi ? 'text-xl' : ''}`}>
-        Kontak Person
-      </h1>
-      <form className='flex flex-col w-full '>
-        <div className='w-full grid grid-row-2 gap-5'>
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label  text-nowrap'>
-                Nama Lengkap Direktur
-              </label>
-            </div>
-            <div className='w-3/5'>
-              <input
-                value={formKontakPerson.direkturName}
-                id='direkturName'
-                name='direkturName'
-                placeholder='Masukkan nama direktur anda'
-                type='text'
-                className='form-input'
-                aria-invalid={errorsKontakPerson.direkturName}
-                ref={direkturNameRef}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.direkturName}
+    <>
+      {isDesktop && (
+        <div className=''>
+          <h1 className={`font-bold ${isKonfirmasi ? 'text-xl' : ''}`}>
+            Kontak Person
+          </h1>
+          <form className='flex flex-col w-full '>
+            <div className='w-full grid grid-row-2 gap-5'>
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label  text-nowrap'>
+                    Nama Lengkap Direktur
+                  </label>
                 </div>
-              )}
-            </div>
-          </div>
+                <div className='w-3/5'>
+                  <input
+                    value={formKontakPerson.direkturName}
+                    id='direkturName'
+                    name='direkturName'
+                    placeholder='Masukkan nama direktur anda'
+                    type='text'
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.direkturName}
+                    ref={direkturNameRef}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.direkturName}
+                    </div>
+                  )}
+                </div>
+              </div>
 
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label text-nowrap'>
-                No. Telpon Direktur
-              </label>
-              {!isKonfirmasi && (
-                <span className='text-xs opacity-60'>
-                  isi nomor telpon direktur di perusahaan kamu
-                </span>
-              )}
-            </div>
-            <div className='w-3/5'>
-              <input
-                id='direkturMobile'
-                name='direkturMobile'
-                ref={direkturMobileRef}
-                placeholder='Masukkan nomor direktur anda'
-                type='tel'
-                value={formKontakPerson.direkturMobile}
-                className='form-input'
-                aria-invalid={errorsKontakPerson.direkturMobile}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.direkturMobile}
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label text-nowrap'>
+                    No. Telpon Direktur
+                  </label>
+                  {!isKonfirmasi && (
+                    <span className='text-xs opacity-60'>
+                      isi nomor telpon direktur di perusahaan kamu
+                    </span>
+                  )}
                 </div>
-              )}
-            </div>
-          </div>
+                <div className='w-3/5'>
+                  <input
+                    id='direkturMobile'
+                    name='direkturMobile'
+                    ref={direkturMobileRef}
+                    placeholder='Masukkan nomor direktur anda'
+                    type='tel'
+                    value={formKontakPerson.direkturMobile}
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.direkturMobile}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.direkturMobile}
+                    </div>
+                  )}
+                </div>
+              </div>
 
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label  text-nowrap'>Email Direktur</label>
-              {!isKonfirmasi && (
-                <span className='text-xs opacity-60'>
-                  isi email Direktur yang sesuai
-                </span>
-              )}
-            </div>
-            <div className='w-3/5'>
-              <input
-                id='direkturEmail'
-                name='direkturEmail'
-                ref={direkturEmailRef}
-                placeholder='contoh@email.com'
-                type='email'
-                value={formKontakPerson.direkturEmail}
-                className='form-input'
-                aria-invalid={errorsKontakPerson.direkturEmail}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.direkturEmail}
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label  text-nowrap'>
+                    Email Direktur
+                  </label>
+                  {!isKonfirmasi && (
+                    <span className='text-xs opacity-60'>
+                      isi email Direktur yang sesuai
+                    </span>
+                  )}
                 </div>
-              )}
-            </div>
-          </div>
+                <div className='w-3/5'>
+                  <input
+                    id='direkturEmail'
+                    name='direkturEmail'
+                    ref={direkturEmailRef}
+                    placeholder='contoh@email.com'
+                    type='email'
+                    value={formKontakPerson.direkturEmail}
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.direkturEmail}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.direkturEmail}
+                    </div>
+                  )}
+                </div>
+              </div>
 
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label text-nowrap'>Nama Purchasing</label>
-              {!isKonfirmasi && (
-                <span className='text-xs opacity-60'>
-                  isi nama purchasing yang bertanggung jawab di perusahaan anda
-                </span>
-              )}
-            </div>
-            <div className='w-3/5'>
-              <input
-                id='purchasingName'
-                name='purchasingName'
-                ref={purchasingNameRef}
-                placeholder='Masukkan nama purchasing anda'
-                value={formKontakPerson.purchasingName}
-                type='text'
-                className='form-input'
-                aria-invalid={errorsKontakPerson.purchasingName}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.purchasingName}
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label text-nowrap'>
+                    Nama Purchasing
+                  </label>
+                  {!isKonfirmasi && (
+                    <span className='text-xs opacity-60'>
+                      isi nama purchasing yang bertanggung jawab di perusahaan
+                      anda
+                    </span>
+                  )}
                 </div>
-              )}
-            </div>
-          </div>
+                <div className='w-3/5'>
+                  <input
+                    id='purchasingName'
+                    name='purchasingName'
+                    ref={purchasingNameRef}
+                    placeholder='Masukkan nama purchasing anda'
+                    value={formKontakPerson.purchasingName}
+                    type='text'
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.purchasingName}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.purchasingName}
+                    </div>
+                  )}
+                </div>
+              </div>
 
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label  text-nowrap'>
-                No. Telpon Purchasing
-              </label>
-              {!isKonfirmasi && (
-                <span className='text-xs opacity-60'>
-                  isi nomor purchasing yang bertanggung jawab di perusahaan anda
-                </span>
-              )}
-            </div>
-            <div className='w-3/5'>
-              <input
-                id='purchasingMobile'
-                name='purchasingMobile'
-                ref={financeMobileRef}
-                placeholder='Masukkan nomor purchasing anda'
-                value={formKontakPerson.purchasingMobile}
-                type='tel'
-                className='form-input'
-                aria-invalid={errorsKontakPerson.purchasingMobile}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.purchasingMobile}
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label  text-nowrap'>
+                    No. Telpon Purchasing
+                  </label>
+                  {!isKonfirmasi && (
+                    <span className='text-xs opacity-60'>
+                      isi nomor purchasing yang bertanggung jawab di perusahaan
+                      anda
+                    </span>
+                  )}
                 </div>
-              )}
-            </div>
-          </div>
+                <div className='w-3/5'>
+                  <input
+                    id='purchasingMobile'
+                    name='purchasingMobile'
+                    ref={financeMobileRef}
+                    placeholder='Masukkan nomor purchasing anda'
+                    value={formKontakPerson.purchasingMobile}
+                    type='tel'
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.purchasingMobile}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.purchasingMobile}
+                    </div>
+                  )}
+                </div>
+              </div>
 
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label  text-nowrap'>
-                Email Purchasing
-              </label>
-              {!isKonfirmasi && (
-                <span className='text-xs opacity-60'>
-                  isi email purchasing dengan benar
-                </span>
-              )}
-            </div>
-            <div className='w-3/5'>
-              <input
-                id='purchasingEmail'
-                name='purchasingEmail'
-                ref={purchasingEmailRef}
-                placeholder='contoh@email.com'
-                value={formKontakPerson.purchasingEmail}
-                type='email'
-                className='form-input'
-                aria-invalid={errorsKontakPerson.purchasingEmail}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.purchasingEmail}
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label  text-nowrap'>
+                    Email Purchasing
+                  </label>
+                  {!isKonfirmasi && (
+                    <span className='text-xs opacity-60'>
+                      isi email purchasing dengan benar
+                    </span>
+                  )}
                 </div>
-              )}
-            </div>
-          </div>
+                <div className='w-3/5'>
+                  <input
+                    id='purchasingEmail'
+                    name='purchasingEmail'
+                    ref={purchasingEmailRef}
+                    placeholder='contoh@email.com'
+                    value={formKontakPerson.purchasingEmail}
+                    type='email'
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.purchasingEmail}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.purchasingEmail}
+                    </div>
+                  )}
+                </div>
+              </div>
 
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label  text-nowrap'>Nama Finance</label>
-              {!isKonfirmasi && (
-                <span className='text-xs opacity-60'>
-                  isi nama finance yang bertanggung jawab di perusahaan anda
-                </span>
-              )}
-            </div>
-            <div className='w-3/5'>
-              <input
-                id='financeName'
-                name='financeName'
-                ref={financeNameRef}
-                placeholder='Masukkan nama finance'
-                value={formKontakPerson.financeName}
-                type='text'
-                className='form-input'
-                aria-invalid={errorsKontakPerson.financeName}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.financeName}
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label  text-nowrap'>
+                    Nama Finance
+                  </label>
+                  {!isKonfirmasi && (
+                    <span className='text-xs opacity-60'>
+                      isi nama finance yang bertanggung jawab di perusahaan anda
+                    </span>
+                  )}
                 </div>
-              )}
-            </div>
-          </div>
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label   text-nowrap'>
-                No. Telpon Finance
-              </label>
-              {!isKonfirmasi && (
-                <span className='text-xs opacity-60'>
-                  isi nomor finance yang bertanggung jawab di perusahaan anda
-                </span>
-              )}
-            </div>
-            <div className='w-3/5'>
-              <input
-                id='financeMobile'
-                name='financeMobile'
-                ref={financeMobileRef}
-                placeholder='Masukkan nomor finance'
-                value={formKontakPerson.financeMobile}
-                type='tel'
-                className='form-input'
-                aria-invalid={errorsKontakPerson.financeMobile}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.financeMobile}
+                <div className='w-3/5'>
+                  <input
+                    id='financeName'
+                    name='financeName'
+                    ref={financeNameRef}
+                    placeholder='Masukkan nama finance'
+                    value={formKontakPerson.financeName}
+                    type='text'
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.financeName}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.financeName}
+                    </div>
+                  )}
                 </div>
-              )}
-            </div>
-          </div>
+              </div>
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label   text-nowrap'>
+                    No. Telpon Finance
+                  </label>
+                  {!isKonfirmasi && (
+                    <span className='text-xs opacity-60'>
+                      isi nomor finance yang bertanggung jawab di perusahaan
+                      anda
+                    </span>
+                  )}
+                </div>
+                <div className='w-3/5'>
+                  <input
+                    id='financeMobile'
+                    name='financeMobile'
+                    ref={financeMobileRef}
+                    placeholder='Masukkan nomor finance'
+                    value={formKontakPerson.financeMobile}
+                    type='tel'
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.financeMobile}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.financeMobile}
+                    </div>
+                  )}
+                </div>
+              </div>
 
-          <div className='flex flex-row  justify-between items-start'>
-            <div className='w-2/5'>
-              <label className='form-label text-nowrap'>Email Finance</label>
-              {!isKonfirmasi && (
-                <span className='text-xs opacity-60'>
-                  isi email finance dengan benar
-                </span>
-              )}
-            </div>
-            <div className='w-3/5'>
-              <input
-                id='financeEmail'
-                name='financeEmail'
-                ref={financeEmailRef}
-                placeholder='contoh@email.com'
-                type='email'
-                value={formKontakPerson.financeEmail}
-                className='form-input'
-                aria-invalid={errorsKontakPerson.financeEmail}
-                onChange={handleInputChange}
-              />
-              {chekValid && (
-                <div className='text-caption-2 text-danger-500 mt-1'>
-                  {errorsKontakPerson.financeEmail}
+              <div className='flex flex-row  justify-between items-start'>
+                <div className='w-2/5'>
+                  <label className='form-label text-nowrap'>
+                    Email Finance
+                  </label>
+                  {!isKonfirmasi && (
+                    <span className='text-xs opacity-60'>
+                      isi email finance dengan benar
+                    </span>
+                  )}
+                </div>
+                <div className='w-3/5'>
+                  <input
+                    id='financeEmail'
+                    name='financeEmail'
+                    ref={financeEmailRef}
+                    placeholder='contoh@email.com'
+                    type='email'
+                    value={formKontakPerson.financeEmail}
+                    className='form-input'
+                    aria-invalid={errorsKontakPerson.financeEmail}
+                    onChange={handleInputChange}
+                  />
+                  {chekValid && (
+                    <div className='text-caption-2 text-danger-500 mt-1'>
+                      {errorsKontakPerson.financeEmail}
+                    </div>
+                  )}
                 </div>
-              )}
+              </div>
+            </div>
+          </form>
+        </div>
+      )}
+      {isMobile && (
+        <div className='text-sm'>
+          <h1
+            className={`font-bold py-4 mt-8 ${
+              isKonfirmasi ? 'text-xl' : 'text-xl'
+            }`}
+          >
+            Kontak Person
+          </h1>
+          <form className='flex flex-col w-full '>
+            <div className='w-full grid grid-row-2 gap-4'>
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label  text-nowrap'>
+                  Nama Lengkap Direktur
+                </label>
+                <input
+                  value={formKontakPerson.direkturName}
+                  id='direkturName'
+                  name='direkturName'
+                  placeholder='Masukkan nama direktur anda'
+                  type='text'
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.direkturName}
+                  ref={direkturNameRef}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.direkturName}
+                  </div>
+                )}
+              </div>
+
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label text-nowrap'>
+                  No. Telpon Direktur
+                </label>
+                <input
+                  id='direkturMobile'
+                  name='direkturMobile'
+                  ref={direkturMobileRef}
+                  placeholder='Masukkan nomor direktur anda'
+                  type='tel'
+                  value={formKontakPerson.direkturMobile}
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.direkturMobile}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.direkturMobile}
+                  </div>
+                )}
+              </div>
+
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label  text-nowrap'>
+                  Email Direktur
+                </label>
+                <input
+                  id='direkturEmail'
+                  name='direkturEmail'
+                  ref={direkturEmailRef}
+                  placeholder='contoh@email.com'
+                  type='email'
+                  value={formKontakPerson.direkturEmail}
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.direkturEmail}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.direkturEmail}
+                  </div>
+                )}
+              </div>
+
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label text-nowrap'>
+                  Nama Purchasing
+                </label>
+                <input
+                  id='purchasingName'
+                  name='purchasingName'
+                  ref={purchasingNameRef}
+                  placeholder='Masukkan nama purchasing anda'
+                  value={formKontakPerson.purchasingName}
+                  type='text'
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.purchasingName}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.purchasingName}
+                  </div>
+                )}
+              </div>
+
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label  text-nowrap'>
+                  No. Telpon Purchasing
+                </label>
+                <input
+                  id='purchasingMobile'
+                  name='purchasingMobile'
+                  ref={financeMobileRef}
+                  placeholder='Masukkan nomor purchasing anda'
+                  value={formKontakPerson.purchasingMobile}
+                  type='tel'
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.purchasingMobile}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.purchasingMobile}
+                  </div>
+                )}
+              </div>
+
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label  text-nowrap'>
+                  Email Purchasing
+                </label>
+                <input
+                  id='purchasingEmail'
+                  name='purchasingEmail'
+                  ref={purchasingEmailRef}
+                  placeholder='contoh@email.com'
+                  value={formKontakPerson.purchasingEmail}
+                  type='email'
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.purchasingEmail}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.purchasingEmail}
+                  </div>
+                )}
+              </div>
+
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label  text-nowrap'>Nama Finance</label>
+                <input
+                  id='financeName'
+                  name='financeName'
+                  ref={financeNameRef}
+                  placeholder='Masukkan nama finance'
+                  value={formKontakPerson.financeName}
+                  type='text'
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.financeName}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.financeName}
+                  </div>
+                )}
+              </div>
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label   text-nowrap'>
+                  No. Telpon Finance
+                </label>
+                <input
+                  id='financeMobile'
+                  name='financeMobile'
+                  ref={financeMobileRef}
+                  placeholder='Masukkan nomor finance'
+                  value={formKontakPerson.financeMobile}
+                  type='tel'
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.financeMobile}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.financeMobile}
+                  </div>
+                )}
+              </div>
+
+              <div className='flex flex-col gap-2  justify-between items-start'>
+                <label className='form-label text-nowrap'>Email Finance</label>
+                <input
+                  id='financeEmail'
+                  name='financeEmail'
+                  ref={financeEmailRef}
+                  placeholder='contoh@email.com'
+                  type='email'
+                  value={formKontakPerson.financeEmail}
+                  className='form-input'
+                  aria-invalid={errorsKontakPerson.financeEmail}
+                  onChange={handleInputChange}
+                />
+                {chekValid && (
+                  <div className='text-caption-2 text-danger-500 mt-1'>
+                    {errorsKontakPerson.financeEmail}
+                  </div>
+                )}
+              </div>
             </div>
-          </div>
+          </form>
         </div>
-      </form>
-    </div>
+      )}
+    </>
   );
 };
 
-- 
cgit v1.2.3


From f751fa6d398a8aab96380c832da927c60c6ccbe4 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 4 Nov 2024 16:10:09 +0700
Subject: <iman> update pengajuan tempo mobile view fix

---
 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index 091873a7..e7bfdbbe 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -376,7 +376,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
         <div className='text-sm'>
           <h1
             className={`font-bold py-4 mt-8 ${
-              isKonfirmasi ? 'text-xl' : 'text-xl'
+              isKonfirmasi ? 'hidden' : 'text-xl'
             }`}
           >
             Kontak Person
-- 
cgit v1.2.3


From e9cd13307f0095dc4edc5048752675d80c551564 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 6 Dec 2024 17:06:26 +0700
Subject: <iman> pengajuan tempo

---
 .../pengajuan-tempo/component/KontakPerusahaan.jsx | 245 ++++++++++++++-------
 1 file changed, 171 insertions(+), 74 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index e7bfdbbe..d5bb69fb 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -11,6 +11,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
   const { isDesktop, isMobile } = useDevice();
   const handleInputChange = (event) => {
     const { name, value } = event.target;
+    console.log('name', name, value);
     updateFormKontakPerson(name, value);
     validateKontakPerson();
   };
@@ -84,6 +85,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
   useEffect(() => {
     validateKontakPerson();
   }, [buttonSubmitClick]);
+  console.log('formKontakPerson', formKontakPerson);
   return (
     <>
       {isDesktop && (
@@ -93,24 +95,42 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
           </h1>
           <form className='flex flex-col w-full '>
             <div className='w-full grid grid-row-2 gap-5'>
-              <div className='flex flex-row  justify-between items-start'>
+              <div className='flex flex-row justify-between items-start'>
                 <div className='w-2/5'>
-                  <label className='form-label  text-nowrap'>
+                  <label className='form-label text-nowrap'>
                     Nama Lengkap Direktur
                   </label>
                 </div>
                 <div className='w-3/5'>
-                  <input
-                    value={formKontakPerson.direkturName}
-                    id='direkturName'
-                    name='direkturName'
-                    placeholder='Masukkan nama direktur anda'
-                    type='text'
-                    className='form-input'
-                    aria-invalid={errorsKontakPerson.direkturName}
-                    ref={direkturNameRef}
-                    onChange={handleInputChange}
-                  />
+                  <div className='flex items-center border border-gray-300 rounded-md'>
+                    {/* Dropdown untuk memilih "Bpk" atau "Ibu" */}
+                    <select
+                      value={formKontakPerson.direkturTittle || ''}
+                      id='direkturTittle'
+                      name='direkturTittle'
+                      className=' p-2   rounded-l-md'
+                      onChange={handleInputChange}
+                    >
+                      <option value='' disabled>
+                        Pilih
+                      </option>
+                      <option value='Bpk'>Bpk</option>
+                      <option value='Ibu'>Ibu</option>
+                    </select>
+
+                    {/* Input untuk nama */}
+                    <input
+                      value={formKontakPerson.direkturName}
+                      id='direkturName'
+                      name='direkturName'
+                      placeholder='Masukkan nama direktur anda'
+                      type='text'
+                      className='form-input border-l  border-r-0 border-t-0 border-b-0 border-gray-300 p-2 ml-2 flex-grow rounded-none'
+                      aria-invalid={errorsKontakPerson.direkturName}
+                      ref={direkturNameRef}
+                      onChange={handleInputChange}
+                    />
+                  </div>
                   {chekValid && (
                     <div className='text-caption-2 text-danger-500 mt-1'>
                       {errorsKontakPerson.direkturName}
@@ -122,7 +142,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
               <div className='flex flex-row  justify-between items-start'>
                 <div className='w-2/5'>
                   <label className='form-label text-nowrap'>
-                    No. Telpon Direktur
+                    No. HP Direktur{' '}
+                    <span className=' opacity-60'>(Opsional)</span>
                   </label>
                   {!isKonfirmasi && (
                     <span className='text-xs opacity-60'>
@@ -194,17 +215,32 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                   )}
                 </div>
                 <div className='w-3/5'>
-                  <input
-                    id='purchasingName'
-                    name='purchasingName'
-                    ref={purchasingNameRef}
-                    placeholder='Masukkan nama purchasing anda'
-                    value={formKontakPerson.purchasingName}
-                    type='text'
-                    className='form-input'
-                    aria-invalid={errorsKontakPerson.purchasingName}
-                    onChange={handleInputChange}
-                  />
+                  <div className='flex items-center border border-gray-300 rounded-md'>
+                    <select
+                      value={formKontakPerson.purchasingTittle || ''}
+                      id='purchasingTittle'
+                      name='purchasingTittle'
+                      className=' p-2   rounded-l-md'
+                      onChange={handleInputChange}
+                    >
+                      <option value='' disabled>
+                        Pilih
+                      </option>
+                      <option value='Bpk'>Bpk</option>
+                      <option value='Ibu'>Ibu</option>
+                    </select>
+                    <input
+                      id='purchasingName'
+                      name='purchasingName'
+                      ref={purchasingNameRef}
+                      placeholder='Masukkan nama purchasing anda'
+                      value={formKontakPerson.purchasingName}
+                      type='text'
+                      className='form-input border-l border-r-0 border-t-0 border-b-0 border-gray-300 p-2 ml-2 flex-grow rounded-none'
+                      aria-invalid={errorsKontakPerson.purchasingName}
+                      onChange={handleInputChange}
+                    />
+                  </div>
                   {chekValid && (
                     <div className='text-caption-2 text-danger-500 mt-1'>
                       {errorsKontakPerson.purchasingName}
@@ -216,7 +252,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
               <div className='flex flex-row  justify-between items-start'>
                 <div className='w-2/5'>
                   <label className='form-label  text-nowrap'>
-                    No. Telpon Purchasing
+                    No. HP Purchasing
                   </label>
                   {!isKonfirmasi && (
                     <span className='text-xs opacity-60'>
@@ -288,17 +324,32 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                   )}
                 </div>
                 <div className='w-3/5'>
-                  <input
-                    id='financeName'
-                    name='financeName'
-                    ref={financeNameRef}
-                    placeholder='Masukkan nama finance'
-                    value={formKontakPerson.financeName}
-                    type='text'
-                    className='form-input'
-                    aria-invalid={errorsKontakPerson.financeName}
-                    onChange={handleInputChange}
-                  />
+                  <div className='flex items-center border border-gray-300 rounded-md'>
+                    <select
+                      value={formKontakPerson.financeTittle || ''}
+                      id='financeTittle'
+                      name='financeTittle'
+                      className=' p-2   rounded-l-md'
+                      onChange={handleInputChange}
+                    >
+                      <option value='' disabled>
+                        Pilih
+                      </option>
+                      <option value='Bpk'>Bpk</option>
+                      <option value='Ibu'>Ibu</option>
+                    </select>
+                    <input
+                      id='financeName'
+                      name='financeName'
+                      ref={financeNameRef}
+                      placeholder='Masukkan nama finance'
+                      value={formKontakPerson.financeName}
+                      type='text'
+                      className='form-input border-l border-r-0 border-t-0 border-b-0 border-gray-300 p-2 ml-2 flex-grow rounded-none'
+                      aria-invalid={errorsKontakPerson.financeName}
+                      onChange={handleInputChange}
+                    />
+                  </div>
                   {chekValid && (
                     <div className='text-caption-2 text-danger-500 mt-1'>
                       {errorsKontakPerson.financeName}
@@ -309,7 +360,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
               <div className='flex flex-row  justify-between items-start'>
                 <div className='w-2/5'>
                   <label className='form-label   text-nowrap'>
-                    No. Telpon Finance
+                    No. HP Finance
                   </label>
                   {!isKonfirmasi && (
                     <span className='text-xs opacity-60'>
@@ -387,17 +438,32 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                 <label className='form-label  text-nowrap'>
                   Nama Lengkap Direktur
                 </label>
-                <input
-                  value={formKontakPerson.direkturName}
-                  id='direkturName'
-                  name='direkturName'
-                  placeholder='Masukkan nama direktur anda'
-                  type='text'
-                  className='form-input'
-                  aria-invalid={errorsKontakPerson.direkturName}
-                  ref={direkturNameRef}
-                  onChange={handleInputChange}
-                />
+                <div className='flex items-center border border-gray-300 rounded-md w-full'>
+                  <select
+                    value={formKontakPerson.direkturTittle || ''}
+                    id='direkturTittle'
+                    name='direkturTittle'
+                    className=' p-2   rounded-l-md'
+                    onChange={handleInputChange}
+                  >
+                    <option value='' disabled>
+                      Pilih
+                    </option>
+                    <option value='Bpk'>Bpk</option>
+                    <option value='Ibu'>Ibu</option>
+                  </select>
+                  <input
+                    value={formKontakPerson.direkturName}
+                    id='direkturName'
+                    name='direkturName'
+                    placeholder='Masukkan nama direktur anda'
+                    type='text'
+                    className='form-input border-l border-r-0 border-t-0 border-b-0 border-gray-300 p-2 ml-2 flex-grow rounded-none'
+                    aria-invalid={errorsKontakPerson.direkturName}
+                    ref={direkturNameRef}
+                    onChange={handleInputChange}
+                  />
+                </div>
                 {chekValid && (
                   <div className='text-caption-2 text-danger-500 mt-1'>
                     {errorsKontakPerson.direkturName}
@@ -407,7 +473,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
 
               <div className='flex flex-col gap-2  justify-between items-start'>
                 <label className='form-label text-nowrap'>
-                  No. Telpon Direktur
+                  No. HP Direktur{' '}
+                  <span className=' opacity-60'>(Opsional)</span>
                 </label>
                 <input
                   id='direkturMobile'
@@ -453,17 +520,32 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                 <label className='form-label text-nowrap'>
                   Nama Purchasing
                 </label>
-                <input
-                  id='purchasingName'
-                  name='purchasingName'
-                  ref={purchasingNameRef}
-                  placeholder='Masukkan nama purchasing anda'
-                  value={formKontakPerson.purchasingName}
-                  type='text'
-                  className='form-input'
-                  aria-invalid={errorsKontakPerson.purchasingName}
-                  onChange={handleInputChange}
-                />
+                <div className='flex items-center border border-gray-300 rounded-md w-full'>
+                  <select
+                    value={formKontakPerson.purchasingTittle || ''}
+                    id='purchasingTittle'
+                    name='purchasingTittle'
+                    className=' p-2   rounded-l-md'
+                    onChange={handleInputChange}
+                  >
+                    <option value='' disabled>
+                      Pilih
+                    </option>
+                    <option value='Bpk'>Bpk</option>
+                    <option value='Ibu'>Ibu</option>
+                  </select>
+                  <input
+                    id='purchasingName'
+                    name='purchasingName'
+                    ref={purchasingNameRef}
+                    placeholder='Masukkan nama purchasing anda'
+                    value={formKontakPerson.purchasingName}
+                    type='text'
+                    className='form-input border-l border-r-0 border-t-0 border-b-0 border-gray-300 p-2 ml-2 flex-grow rounded-none'
+                    aria-invalid={errorsKontakPerson.purchasingName}
+                    onChange={handleInputChange}
+                  />
+                </div>
                 {chekValid && (
                   <div className='text-caption-2 text-danger-500 mt-1'>
                     {errorsKontakPerson.purchasingName}
@@ -473,7 +555,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
 
               <div className='flex flex-col gap-2  justify-between items-start'>
                 <label className='form-label  text-nowrap'>
-                  No. Telpon Purchasing
+                  No. HP Purchasing
                 </label>
                 <input
                   id='purchasingMobile'
@@ -517,17 +599,32 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
 
               <div className='flex flex-col gap-2  justify-between items-start'>
                 <label className='form-label  text-nowrap'>Nama Finance</label>
-                <input
-                  id='financeName'
-                  name='financeName'
-                  ref={financeNameRef}
-                  placeholder='Masukkan nama finance'
-                  value={formKontakPerson.financeName}
-                  type='text'
-                  className='form-input'
-                  aria-invalid={errorsKontakPerson.financeName}
-                  onChange={handleInputChange}
-                />
+                <div className='flex items-center border border-gray-300 rounded-md w-full'>
+                  <select
+                    value={formKontakPerson.financeTittle || ''}
+                    id='financeTittle'
+                    name='financeTittle'
+                    className=' p-2   rounded-l-md'
+                    onChange={handleInputChange}
+                  >
+                    <option value='' disabled>
+                      Pilih
+                    </option>
+                    <option value='Bpk'>Bpk</option>
+                    <option value='Ibu'>Ibu</option>
+                  </select>
+                  <input
+                    id='financeName'
+                    name='financeName'
+                    ref={financeNameRef}
+                    placeholder='Masukkan nama finance'
+                    value={formKontakPerson.financeName}
+                    type='text'
+                    className='form-input border-l border-r-0 border-t-0 border-b-0 border-gray-300 p-2 ml-2 flex-grow rounded-none'
+                    aria-invalid={errorsKontakPerson.financeName}
+                    onChange={handleInputChange}
+                  />
+                </div>
                 {chekValid && (
                   <div className='text-caption-2 text-danger-500 mt-1'>
                     {errorsKontakPerson.financeName}
@@ -536,7 +633,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
               </div>
               <div className='flex flex-col gap-2  justify-between items-start'>
                 <label className='form-label   text-nowrap'>
-                  No. Telpon Finance
+                  No. HP Finance
                 </label>
                 <input
                   id='financeMobile'
-- 
cgit v1.2.3


From f2451beed670dc697aa2026b2df6ad1ad1e90da2 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 9 Dec 2024 15:00:45 +0700
Subject: <iman> update pengajuan tempo

---
 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx | 2 --
 1 file changed, 2 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index d5bb69fb..77bf4316 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -11,7 +11,6 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
   const { isDesktop, isMobile } = useDevice();
   const handleInputChange = (event) => {
     const { name, value } = event.target;
-    console.log('name', name, value);
     updateFormKontakPerson(name, value);
     validateKontakPerson();
   };
@@ -85,7 +84,6 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
   useEffect(() => {
     validateKontakPerson();
   }, [buttonSubmitClick]);
-  console.log('formKontakPerson', formKontakPerson);
   return (
     <>
       {isDesktop && (
-- 
cgit v1.2.3


From 915dc67e1ce31eab1f2415cc8df95cebb75a137d Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 13 Dec 2024 14:18:03 +0700
Subject: <iman>update pengajuan tempo request

---
 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index 77bf4316..1ea2223e 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -139,7 +139,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
 
               <div className='flex flex-row  justify-between items-start'>
                 <div className='w-2/5'>
-                  <label className='form-label text-nowrap'>
+                  <label className='form-label text-wrap'>
                     No. HP Direktur{' '}
                     <span className=' opacity-60'>(Opsional)</span>
                   </label>
-- 
cgit v1.2.3


From 0178a1f88d7d34824562e1413be073c0795a47cf Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 16 Dec 2024 17:42:31 +0700
Subject: <iman> update code

---
 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index 1ea2223e..b3d5bce7 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -143,11 +143,6 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                     No. HP Direktur{' '}
                     <span className=' opacity-60'>(Opsional)</span>
                   </label>
-                  {!isKonfirmasi && (
-                    <span className='text-xs opacity-60'>
-                      isi nomor telpon direktur di perusahaan kamu
-                    </span>
-                  )}
                 </div>
                 <div className='w-3/5'>
                   <input
@@ -174,11 +169,6 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                   <label className='form-label  text-nowrap'>
                     Email Direktur
                   </label>
-                  {!isKonfirmasi && (
-                    <span className='text-xs opacity-60'>
-                      isi email Direktur yang sesuai
-                    </span>
-                  )}
                 </div>
                 <div className='w-3/5'>
                   <input
@@ -254,7 +244,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                   </label>
                   {!isKonfirmasi && (
                     <span className='text-xs opacity-60'>
-                      isi nomor purchasing yang bertanggung jawab di perusahaan
+                      isi email purchasing yang bertanggung jawab diperusahaan
                       anda
                     </span>
                   )}
@@ -394,7 +384,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                   </label>
                   {!isKonfirmasi && (
                     <span className='text-xs opacity-60'>
-                      isi email finance dengan benar
+                      isi email finance yang bertanggung jawab diperusahaan anda
                     </span>
                   )}
                 </div>
-- 
cgit v1.2.3


From dd8a56ad12d054e121965c41bcb077158690b208 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 17 Dec 2024 17:07:44 +0700
Subject: <iman> update code

---
 .../pengajuan-tempo/component/KontakPerusahaan.jsx | 36 ++++++++++++++--------
 1 file changed, 24 insertions(+), 12 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index b3d5bce7..e937baec 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -130,9 +130,12 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                     />
                   </div>
                   {chekValid && (
-                    <div className='text-caption-2 text-danger-500 mt-1'>
-                      {errorsKontakPerson.direkturName}
-                    </div>
+                    <>
+                      <div className='text-caption-2 text-danger-500 mt-1'>
+                        {errorsKontakPerson.direkturName}{' '}
+                        {errorsKontakPerson.direkturTittle}
+                      </div>
+                    </>
                   )}
                 </div>
               </div>
@@ -230,9 +233,12 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                     />
                   </div>
                   {chekValid && (
-                    <div className='text-caption-2 text-danger-500 mt-1'>
-                      {errorsKontakPerson.purchasingName}
-                    </div>
+                    <>
+                      <div className='text-caption-2 text-danger-500 mt-1'>
+                        {errorsKontakPerson.purchasingName}{' '}
+                        {errorsKontakPerson.purchasingTittle}
+                      </div>
+                    </>
                   )}
                 </div>
               </div>
@@ -339,9 +345,12 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                     />
                   </div>
                   {chekValid && (
-                    <div className='text-caption-2 text-danger-500 mt-1'>
-                      {errorsKontakPerson.financeName}
-                    </div>
+                    <>
+                      <div className='text-caption-2 text-danger-500 mt-1'>
+                        {errorsKontakPerson.financeName}{' '}
+                        {errorsKontakPerson.financeTittle}
+                      </div>
+                    </>
                   )}
                 </div>
               </div>
@@ -454,7 +463,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                 </div>
                 {chekValid && (
                   <div className='text-caption-2 text-danger-500 mt-1'>
-                    {errorsKontakPerson.direkturName}
+                    {errorsKontakPerson.direkturName}{' '}
+                    {errorsKontakPerson.direkturTittle}
                   </div>
                 )}
               </div>
@@ -536,7 +546,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                 </div>
                 {chekValid && (
                   <div className='text-caption-2 text-danger-500 mt-1'>
-                    {errorsKontakPerson.purchasingName}
+                    {errorsKontakPerson.purchasingName}{' '}
+                    {errorsKontakPerson.purchasingTittle}
                   </div>
                 )}
               </div>
@@ -615,7 +626,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                 </div>
                 {chekValid && (
                   <div className='text-caption-2 text-danger-500 mt-1'>
-                    {errorsKontakPerson.financeName}
+                    {errorsKontakPerson.financeName}{' '}
+                    {errorsKontakPerson.financeTittle}
                   </div>
                 )}
               </div>
-- 
cgit v1.2.3


From 72a2c17094eca3d08c1a42c528f869befdb6131e Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 7 Jan 2025 11:10:19 +0700
Subject: <iman> update perbaiki kata kata

---
 src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx')

diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
index e937baec..b8ca3202 100644
--- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
+++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx
@@ -250,7 +250,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                   </label>
                   {!isKonfirmasi && (
                     <span className='text-xs opacity-60'>
-                      isi email purchasing yang bertanggung jawab diperusahaan
+                      isi nomor purchasing yang bertanggung jawab diperusahaan
                       anda
                     </span>
                   )}
@@ -282,7 +282,8 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
                   </label>
                   {!isKonfirmasi && (
                     <span className='text-xs opacity-60'>
-                      isi email purchasing dengan benar
+                      isi email purchasing yang bertanggung jawab perusahaan
+                      anda
                     </span>
                   )}
                 </div>
-- 
cgit v1.2.3

