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 { ProjectFlockKandang } from '@/types/api/production/project-flock-kandang';
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import Alert from '@/components/Alert';
|
import Alert from '@/components/Alert';
|
||||||
|
import { formatNumber } from '@/lib/helper';
|
||||||
|
|
||||||
const ChickinFormView = ({
|
const ChickinFormView = ({
|
||||||
formType = 'add',
|
formType = 'add',
|
||||||
@@ -141,6 +142,10 @@ const ChickinFormView = ({
|
|||||||
cell(props) {
|
cell(props) {
|
||||||
return (
|
return (
|
||||||
<DateInput
|
<DateInput
|
||||||
|
className={{
|
||||||
|
wrapper: 'w-fit',
|
||||||
|
inputWrapper: 'bg-white',
|
||||||
|
}}
|
||||||
name={`chickin_requests[${props.row.index}].chick_in_date`}
|
name={`chickin_requests[${props.row.index}].chick_in_date`}
|
||||||
value={
|
value={
|
||||||
formik.values.chickin_requests[props.row.index]
|
formik.values.chickin_requests[props.row.index]
|
||||||
@@ -161,16 +166,7 @@ const ChickinFormView = ({
|
|||||||
props.row.original.product_warehouse_id
|
props.row.original.product_warehouse_id
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<SelectInput
|
<div>{availableQty?.product_warehouse?.product?.name}</div>
|
||||||
value={
|
|
||||||
{
|
|
||||||
label: availableQty?.product_warehouse?.product?.name,
|
|
||||||
value: availableQty?.product_warehouse?.product?.id,
|
|
||||||
} as OptionType
|
|
||||||
}
|
|
||||||
options={[]}
|
|
||||||
isDisabled
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -184,10 +180,11 @@ const ChickinFormView = ({
|
|||||||
props.row.original.product_warehouse_id
|
props.row.original.product_warehouse_id
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<NumberInput
|
<div>
|
||||||
name='qty[]'
|
{availableQty?.available_qty
|
||||||
value={availableQty?.available_qty}
|
? formatNumber(availableQty?.available_qty)
|
||||||
/>
|
: '-'}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -157,11 +157,6 @@ const ProjectFlockForm = ({
|
|||||||
moduleUrl: `/production/project-flocks/${initialValues?.id}`,
|
moduleUrl: `/production/project-flocks/${initialValues?.id}`,
|
||||||
moduleName: 'PROJECT_FLOCKS',
|
moduleName: 'PROJECT_FLOCKS',
|
||||||
moduleId: initialValues?.id.toString() ?? '',
|
moduleId: initialValues?.id.toString() ?? '',
|
||||||
params: {
|
|
||||||
page: 1,
|
|
||||||
limit: 10,
|
|
||||||
group_step_number: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user