mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
refactor(FE): Reorder fields in RecordingForm
This commit is contained in:
@@ -1468,6 +1468,105 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className='grid grid-cols-3 gap-4'>
|
<div className='grid grid-cols-3 gap-4'>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Lokasi</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{projectFlockKandangLookup?.project_flock?.location
|
||||||
|
?.name ||
|
||||||
|
projectFlockKandangDetail?.project_flock?.location
|
||||||
|
?.name ||
|
||||||
|
'-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Project Flock</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{projectFlockKandangLookup?.project_flock?.flock_name ||
|
||||||
|
projectFlockKandangDetail?.project_flock?.flock_name ||
|
||||||
|
'-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Kandang</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{projectFlockKandangLookup?.kandang?.name ||
|
||||||
|
projectFlockKandangDetail?.kandang?.name ||
|
||||||
|
'-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Kategori</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
<Badge
|
||||||
|
variant='soft'
|
||||||
|
color={
|
||||||
|
initialValues.project_flock
|
||||||
|
?.project_flock_category === 'LAYING'
|
||||||
|
? 'info'
|
||||||
|
: 'warning'
|
||||||
|
}
|
||||||
|
size='sm'
|
||||||
|
>
|
||||||
|
{initialValues.project_flock?.project_flock_category}
|
||||||
|
</Badge>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Gudang</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{initialValues.warehouse?.name || '-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>
|
||||||
|
Jumlah Ayam Saat Ini
|
||||||
|
</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{initialValues.project_flock?.total_chick_qty
|
||||||
|
? formatNumber(
|
||||||
|
initialValues.project_flock.total_chick_qty
|
||||||
|
)
|
||||||
|
: '-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Periode</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
<Badge
|
||||||
|
variant='soft'
|
||||||
|
color='neutral'
|
||||||
|
size='sm'
|
||||||
|
className={{
|
||||||
|
badge: 'whitespace-nowrap font-semibold text-xs px-2',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Periode{' '}
|
||||||
|
{projectFlockKandangLookup?.project_flock?.period ||
|
||||||
|
projectFlockKandangDetail?.project_flock?.period ||
|
||||||
|
'-'}
|
||||||
|
</Badge>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>
|
||||||
|
Tanggal Recording
|
||||||
|
</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{formatDate(
|
||||||
|
initialValues.record_datetime || '',
|
||||||
|
'DD MMMM YYYY'
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Hari</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
Hari ke-{initialValues.day} (Minggu ke-
|
||||||
|
{initialValues.project_flock?.production_standart?.week ||
|
||||||
|
'-'}
|
||||||
|
)
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
{initialValues.approval && (
|
{initialValues.approval && (
|
||||||
<div>
|
<div>
|
||||||
<span className='text-sm text-gray-600'>
|
<span className='text-sm text-gray-600'>
|
||||||
@@ -1518,105 +1617,6 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>Lokasi</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
{projectFlockKandangLookup?.project_flock?.location
|
|
||||||
?.name ||
|
|
||||||
projectFlockKandangDetail?.project_flock?.location
|
|
||||||
?.name ||
|
|
||||||
'-'}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>Project Flock</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
{projectFlockKandangLookup?.project_flock?.flock_name ||
|
|
||||||
projectFlockKandangDetail?.project_flock?.flock_name ||
|
|
||||||
'-'}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>Kandang</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
{projectFlockKandangLookup?.kandang?.name ||
|
|
||||||
projectFlockKandangDetail?.kandang?.name ||
|
|
||||||
'-'}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>
|
|
||||||
Tanggal Recording
|
|
||||||
</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
{formatDate(
|
|
||||||
initialValues.record_datetime || '',
|
|
||||||
'DD MMMM YYYY'
|
|
||||||
)}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>
|
|
||||||
Jumlah Ayam Saat Ini
|
|
||||||
</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
{initialValues.project_flock?.total_chick_qty
|
|
||||||
? formatNumber(
|
|
||||||
initialValues.project_flock.total_chick_qty
|
|
||||||
)
|
|
||||||
: '-'}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>Gudang</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
{initialValues.warehouse?.name || '-'}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>Hari</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
Hari ke-{initialValues.day} (Minggu ke-
|
|
||||||
{initialValues.project_flock?.production_standart?.week ||
|
|
||||||
'-'}
|
|
||||||
)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>Kategori</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
<Badge
|
|
||||||
variant='soft'
|
|
||||||
color={
|
|
||||||
initialValues.project_flock
|
|
||||||
?.project_flock_category === 'LAYING'
|
|
||||||
? 'info'
|
|
||||||
: 'warning'
|
|
||||||
}
|
|
||||||
size='sm'
|
|
||||||
>
|
|
||||||
{initialValues.project_flock?.project_flock_category}
|
|
||||||
</Badge>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span className='text-sm text-gray-600'>Periode</span>
|
|
||||||
<p className='font-semibold'>
|
|
||||||
<Badge
|
|
||||||
variant='soft'
|
|
||||||
color='neutral'
|
|
||||||
size='sm'
|
|
||||||
className={{
|
|
||||||
badge: 'whitespace-nowrap font-semibold text-xs px-2',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Periode{' '}
|
|
||||||
{projectFlockKandangLookup?.project_flock?.period ||
|
|
||||||
projectFlockKandangDetail?.project_flock?.period ||
|
|
||||||
'-'}
|
|
||||||
</Badge>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<span className='text-sm text-gray-600'>Standard FCR</span>
|
<span className='text-sm text-gray-600'>Standard FCR</span>
|
||||||
<div className='mt-1'>
|
<div className='mt-1'>
|
||||||
|
|||||||
Reference in New Issue
Block a user