summaryrefslogtreecommitdiff
path: root/src/lib/pengajuan-tempo/component/Referensi.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-13 14:18:03 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-13 14:18:03 +0700
commit915dc67e1ce31eab1f2415cc8df95cebb75a137d (patch)
tree2029da924aae618240e8edd9629855f46ab4e404 /src/lib/pengajuan-tempo/component/Referensi.jsx
parent0f84963214ee6dc5b5a44d945540826a66bec9e0 (diff)
<iman>update pengajuan tempo request
Diffstat (limited to 'src/lib/pengajuan-tempo/component/Referensi.jsx')
-rw-r--r--src/lib/pengajuan-tempo/component/Referensi.jsx64
1 files changed, 37 insertions, 27 deletions
diff --git a/src/lib/pengajuan-tempo/component/Referensi.jsx b/src/lib/pengajuan-tempo/component/Referensi.jsx
index 1b7b0f4c..9e154166 100644
--- a/src/lib/pengajuan-tempo/component/Referensi.jsx
+++ b/src/lib/pengajuan-tempo/component/Referensi.jsx
@@ -111,6 +111,7 @@ const Referensi = ({ chekValid, buttonSubmitClick, data }) => {
);
setSupplierData(updatedSuppliers);
setChangeConfirmation(false);
+ updateHasSave(false);
}
};
@@ -207,7 +208,7 @@ const Referensi = ({ chekValid, buttonSubmitClick, data }) => {
<BottomPopup
active={changeConfirmation}
close={() => setChangeConfirmation(false)}
- title='Ubah profil Bisnis'
+ title='Konfirmasi Hapus Data'
>
<div className='leading-7 text-gray_r-12/80'>
Apakah anda yakin menghapus data?
@@ -297,7 +298,7 @@ const Referensi = ({ chekValid, buttonSubmitClick, data }) => {
placeholder='Type Durasi Tempo'
/>
</td>
- <td className='flex flex-row gap-2'>
+ <td className='flex flex-row gap-2 justify-center items-center'>
<input
name='creditLimit'
type='text'
@@ -374,24 +375,26 @@ const Referensi = ({ chekValid, buttonSubmitClick, data }) => {
</table>
</form>
<div className='flex items-center gap-4 mt-8'>
- <button
+ {/* <button
onClick={handleAddNewSupplier}
className='bg-gray-200 border border-gray-500 rounded-md text-sm text-gray-500 p-2 h-11 mb-1 content-center flex flex-row justify-center items-center'
>
{<PlusCircleIcon className='w-5 mr-2' />}
{''} Tambah Data Baru
- </button>
- <button
- onClick={simpanData}
- className={`bg-red-500 border border-red-500 rounded-md text-sm text-white p-2 h-11 mb-1 content-center flex flex-row justify-center items-center ${
- hasSavedata ? 'hidden' : ''
- }`}
- >
- Simpan Data
- </button>
- <span className='text-sm opacity-60 text-red-500'>
- *Klik simpan sebelum lanjut ke tahap selanjutnya
- </span>
+ </button> */}
+ {!hasSavedata && (
+ <>
+ <button
+ onClick={simpanData}
+ className={`bg-red-500 border border-red-500 rounded-md text-sm text-white p-2 h-11 mb-1 content-center flex flex-row justify-center items-center `}
+ >
+ Simpan Data
+ </button>
+ <span className='text-sm opacity-60 text-red-500'>
+ *Klik simpan sebelum lanjut ke tahap selanjutnya
+ </span>
+ </>
+ )}
</div>
</div>
)}
@@ -424,7 +427,12 @@ const Referensi = ({ chekValid, buttonSubmitClick, data }) => {
{supplier.supplier}
</p>
<div className='w-1/5 flex justify-end items-center gap-2'>
- <Trash2Icon size={16} color='red' />
+ <Trash2Icon
+ size={16}
+ color='red'
+ onClick={() => handleOpenConfirmation(index)}
+ className='cursor-pointer'
+ />
{openIndexes.includes(index) ? (
<ChevronUpIcon className='w-4' />
) : (
@@ -590,17 +598,19 @@ const Referensi = ({ chekValid, buttonSubmitClick, data }) => {
</form>
</div>
<div className='flex flex-col justify-start items-start gap-4 mt-8'>
- <span className='text-xs opacity-60 text-red-500'>
- *Klik simpan sebelum lanjut ke tahap selanjutnya
- </span>
- <button
- onClick={simpanData}
- className={`bg-gray-200 border border-gray-500 rounded-md w-full text-sm text-gray-500 p-2 h-11 mb-1 content-center flex flex-row justify-center items-center ${
- hasSavedata ? 'hidden' : ''
- }`}
- >
- Simpan Data
- </button>
+ {!hasSavedata && (
+ <>
+ <span className='text-xs opacity-60 text-red-500'>
+ *Klik simpan sebelum lanjut ke tahap selanjutnya
+ </span>
+ <button
+ onClick={simpanData}
+ className={`bg-red-500 border border-red-500 rounded-md w-full text-sm text-white p-2 h-11 mb-1 content-center flex flex-row justify-center items-center`}
+ >
+ Simpan Data
+ </button>
+ </>
+ )}
</div>
</div>
)}