mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 22:35:45 +00:00
chore: prettier format
This commit is contained in:
+3
-1
@@ -15,4 +15,6 @@ export const ProductCategoryFormSchema: Yup.ObjectSchema<ProductCategoryFormSche
|
||||
|
||||
export const UpdateProductCategoryFormSchema = ProductCategoryFormSchema;
|
||||
|
||||
export type ProductCategoryFormValues = Yup.InferType<typeof ProductCategoryFormSchema>;
|
||||
export type ProductCategoryFormValues = Yup.InferType<
|
||||
typeof ProductCategoryFormSchema
|
||||
>;
|
||||
|
||||
@@ -31,7 +31,9 @@ export const ProductFormSchema: Yup.ObjectSchema<ProductFormSchemaType> =
|
||||
uom: Yup.object({
|
||||
value: Yup.number().min(1).required(),
|
||||
label: Yup.string().required(),
|
||||
}).nullable().required('Satuan wajib diisi!'),
|
||||
})
|
||||
.nullable()
|
||||
.required('Satuan wajib diisi!'),
|
||||
|
||||
uom_id: Yup.number()
|
||||
.required('Satuan wajib diisi!')
|
||||
@@ -40,7 +42,9 @@ export const ProductFormSchema: Yup.ObjectSchema<ProductFormSchemaType> =
|
||||
product_category: Yup.object({
|
||||
value: Yup.number().min(1).required(),
|
||||
label: Yup.string().required(),
|
||||
}).nullable().required('Kategori produk wajib diisi!'),
|
||||
})
|
||||
.nullable()
|
||||
.required('Kategori produk wajib diisi!'),
|
||||
|
||||
product_category_id: Yup.number()
|
||||
.required('Kategori produk wajib diisi!')
|
||||
|
||||
@@ -121,9 +121,7 @@ const ProductForm = ({ type = 'add', initialValues }: ProductFormProps) => {
|
||||
supplier_ids: values.supplier_ids.filter(
|
||||
(id): id is number => typeof id === 'number'
|
||||
),
|
||||
flags: values.flags.filter(
|
||||
(f): f is string => typeof f === 'string'
|
||||
),
|
||||
flags: values.flags.filter((f): f is string => typeof f === 'string'),
|
||||
};
|
||||
switch (type) {
|
||||
case 'add':
|
||||
|
||||
Reference in New Issue
Block a user