mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
fix(FE-238): mengubah ui form chick in
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user