refactor(FE-318): Add egg weight column and separate inputs

This commit is contained in:
rstubryan
2025-12-08 20:08:35 +07:00
parent b464432581
commit 5deca5739f
@@ -2599,6 +2599,15 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
<span className='text-error'>*</span>
</span>
</th>
<th>
Berat (gram)
<span
className='tooltip tooltip-error tooltip-bottom '
data-tip='required'
>
<span className='text-error'>*</span>
</span>
</th>
{(type as 'add' | 'edit' | 'detail') !== 'detail' && (
<th>Action</th>
)}
@@ -2674,7 +2683,6 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
/>
</td>
<td>
<div className='flex flex-col gap-1'>
<NumberInput
required
name={`eggs.${idx}.qty`}
@@ -2686,8 +2694,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
thousandSeparator=','
decimalSeparator='.'
isError={
isRepeaterInputError('eggs', 'qty', idx)
.isError
isRepeaterInputError('eggs', 'qty', idx).isError
}
errorMessage={
isRepeaterInputError('eggs', 'qty', idx)
@@ -2699,8 +2706,8 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
}}
placeholder='Masukkan jumlah telur'
/>
</div>
<div className='flex flex-col gap-1'>
</td>
<td>
<NumberInput
required
name={`eggs.${idx}.weight`}
@@ -2725,7 +2732,6 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
}}
placeholder='Masukkan berat telur (gram)...'
/>
</div>
</td>
{(type as 'add' | 'edit' | 'detail') !== 'detail' && (
<td>
@@ -2908,7 +2914,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
>
Submit
</Button>
{isLayingCategory && (
{/*{isLayingCategory && (
<Tooltip
content={
hasConsumableEggs
@@ -2979,7 +2985,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
Next Step: Grading
</Button>
</Tooltip>
)}
)}*/}
</div>
)}
</div>