chore: prettier format

This commit is contained in:
rstubryan
2025-11-13 14:08:35 +07:00
parent 57ca050100
commit c2479ad248
10 changed files with 127 additions and 111 deletions
@@ -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':