chore: access correct UOM id

This commit is contained in:
ValdiANS
2026-01-15 16:11:12 +07:00
parent 081048f0c5
commit 7114470c13
@@ -83,7 +83,7 @@ const NonstockForm = ({ type = 'add', initialValues }: NonstockFormProps) => {
const formikInitialValues = useMemo<NonstockFormValues>(() => {
return {
name: initialValues?.name ?? '',
uomId: initialValues?.uom_id ?? 0,
uomId: initialValues?.uom?.id ?? 0,
uom: initialValues?.uom
? {
value: initialValues?.uom?.id,
@@ -199,6 +199,10 @@ const NonstockForm = ({ type = 'add', initialValues }: NonstockFormProps) => {
// ===== Formik Error List =====
const { formErrorList, close, handleFormSubmit } = useFormikErrorList(formik);
console.log({
values: formik.values,
});
return (
<>
<section className='w-full max-w-xl'>