fix(FE-238): mengubah ui form chick in

This commit is contained in:
randy-ar
2025-11-13 09:54:51 +07:00
parent fa3ba46810
commit 4485ea8181
2 changed files with 11 additions and 19 deletions
@@ -21,6 +21,7 @@ import toast from 'react-hot-toast';
import { ProjectFlockKandang } from '@/types/api/production/project-flock-kandang';
import { useRouter } from 'next/navigation';
import Alert from '@/components/Alert';
import { formatNumber } from '@/lib/helper';
const ChickinFormView = ({
formType = 'add',
@@ -141,6 +142,10 @@ const ChickinFormView = ({
cell(props) {
return (
<DateInput
className={{
wrapper: 'w-fit',
inputWrapper: 'bg-white',
}}
name={`chickin_requests[${props.row.index}].chick_in_date`}
value={
formik.values.chickin_requests[props.row.index]
@@ -161,16 +166,7 @@ const ChickinFormView = ({
props.row.original.product_warehouse_id
);
return (
<SelectInput
value={
{
label: availableQty?.product_warehouse?.product?.name,
value: availableQty?.product_warehouse?.product?.id,
} as OptionType
}
options={[]}
isDisabled
/>
<div>{availableQty?.product_warehouse?.product?.name}</div>
);
},
},
@@ -184,10 +180,11 @@ const ChickinFormView = ({
props.row.original.product_warehouse_id
);
return (
<NumberInput
name='qty[]'
value={availableQty?.available_qty}
/>
<div>
{availableQty?.available_qty
? formatNumber(availableQty?.available_qty)
: '-'}
</div>
);
},
},
@@ -157,11 +157,6 @@ const ProjectFlockForm = ({
moduleUrl: `/production/project-flocks/${initialValues?.id}`,
moduleName: 'PROJECT_FLOCKS',
moduleId: initialValues?.id.toString() ?? '',
params: {
page: 1,
limit: 10,
group_step_number: false,
},
});
useEffect(() => {