mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +00:00
fix(FE-33): fix conflict git
This commit is contained in:
@@ -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'}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user