fix(FE-33): fix conflict git

This commit is contained in:
randy-ar
2025-10-09 13:35:30 +07:00
59 changed files with 4048 additions and 327 deletions
@@ -11,7 +11,11 @@ import {
import { useRouter } from 'next/navigation';
import { useCallback, useEffect, useMemo, useState } from 'react';
import toast from 'react-hot-toast';
import { SupplierFormSchema, SupplierFormValues, UpdateSupplierFormSchema } from './SupplierForm.schema';
import {
SupplierFormSchema,
SupplierFormValues,
UpdateSupplierFormSchema,
} from './SupplierForm.schema';
import { useFormik } from 'formik';
import SelectInput, { OptionType } from '@/components/input/SelectInput';
import { Icon } from '@iconify/react';
@@ -127,7 +131,8 @@ const SupplierForm = ({
const formik = useFormik<SupplierFormValues>({
initialValues: formikInitialValues,
enableReinitialize: true,
validationSchema: formType === 'edit' ? UpdateSupplierFormSchema : SupplierFormSchema,
validationSchema:
formType === 'edit' ? UpdateSupplierFormSchema : SupplierFormSchema,
onSubmit: async (values) => {
// reset error message
setSupplierFormErrorMessage('');
@@ -274,7 +279,9 @@ const SupplierForm = ({
onChange={categoryChangeHandler}
options={categoryOptions}
onInputChange={setCategorySelectInputValue}
isError={formik.touched.category && Boolean(formik.errors.category)}
isError={
formik.touched.category && Boolean(formik.errors.category)
}
errorMessage={formik.errors.category as string}
isDisabled={formType === 'detail'}
isClearable
@@ -285,7 +292,9 @@ const SupplierForm = ({
label='Hatchery'
value={hatcheryTagInputValue}
onChange={(value) => formik.setFieldValue('hatchery', value)}
isError={formik.touched.hatchery && Boolean(formik.errors.hatchery)}
isError={
formik.touched.hatchery && Boolean(formik.errors.hatchery)
}
errorMessage={formik.errors.hatchery}
readOnly={formType === 'detail'}
/>