refactor(FE-316): Polish Uniformity template and upload UI

This commit is contained in:
rstubryan
2025-12-29 20:50:53 +07:00
parent 34ec650a01
commit 9ef232bac5
2 changed files with 14 additions and 9 deletions
@@ -27,18 +27,18 @@ export const generateUniformityTemplate = (
['Jumlah Sampel (2%)', formatNumber(sampleSize)],
[''],
['CARA PENGISIAN:'],
['1. Pindah ke sheet ke-2 untuk mengisi data BW (Body Weight)'],
['1. Pindah ke sheet ke-2 untuk mengisi data BW (Body Weight).'],
[
'2. Kolom NO sudah terisi otomatis dari 1 sampai ' +
formatNumber(sampleSize),
],
['3. Isi kolom BW dengan berat badan ayam dalam gram'],
['4. Pastikan baris terisi dengan data yang valid'],
['5. Simpan file dan upload kembali ke sistem'],
['3. Isi kolom BW dengan berat badan ayam dalam gram.'],
['4. Pastikan baris terisi dengan data yang valid.'],
['5. Simpan file dan upload kembali ke sistem.'],
[''],
['FORMAT DATA:'],
['• NO: Nomor urut ayam (1, 2, 3, ...)'],
['• BW: Berat badan dalam gram (contoh: 1500, 1650, 1800)'],
['• NO: Nomor urut ayam (1, 2, 3, ...).'],
['• BW: Berat badan dalam gram (contoh: 1500, 1650, 1800).'],
[''],
['CATATAN:'],
[
@@ -565,7 +565,9 @@ const UniformityForm = ({
</div>
) : (
<>
<div className='flex flex-col items-center justify-center text-center gap-2 my-10 mb-0!'>
<div
className={`flex flex-col items-center justify-center text-center gap-2 ${projectFlockKandangLookup?.available_quantity ? 'my-10 mb-0' : 'my-10'}`}
>
<div className='border border-[#18181B]/25 rounded-2xl p-1 flex items-center justify-center'>
<Button
type='button'
@@ -584,7 +586,7 @@ const UniformityForm = ({
</Button>
</div>
<span className='text-md font-semibold text-[#18181B80]'>
Drag file to this area to upload
Choose file to upload
</span>
<span className='text-xs font-light text-[#18181B80] text-center max-w-xs px-4'>
{projectFlockKandangLookup?.available_quantity
@@ -608,7 +610,10 @@ const UniformityForm = ({
type='button'
variant='outline'
className='btn-sm rounded-2xl shadow-md border border-base-300'
onClick={handleDownloadTemplate}
onClick={(e) => {
e.stopPropagation();
handleDownloadTemplate();
}}
>
<Icon
icon='heroicons:arrow-down-tray'