feat(FE): Add filter schemas and types for master data components

This commit is contained in:
rstubryan
2026-03-03 14:02:06 +07:00
parent 4e278c5687
commit 741884ac29
6 changed files with 60 additions and 0 deletions
@@ -0,0 +1,11 @@
import { string, object } from 'yup';
export const KandangFilterSchema = object().shape({
location_id: string().nullable(),
pic_id: string().nullable(),
});
export type KandangFilterType = {
location_id: string | null;
pic_id: string | null;
};
@@ -0,0 +1,9 @@
import { string, object } from 'yup';
export const LocationFilterSchema = object().shape({
area_id: string().nullable(),
});
export type LocationFilterType = {
area_id: string | null;
};
@@ -0,0 +1,9 @@
import { string, object } from 'yup';
export const ProductFilterSchema = object().shape({
product_category_id: string().nullable(),
});
export type ProductFilterType = {
product_category_id: string | null;
};
@@ -0,0 +1,9 @@
import { string, object } from 'yup';
export const ProductionStandardFilterSchema = object().shape({
project_category: string().nullable(),
});
export type ProductionStandardFilterType = {
project_category: string | null;
};
@@ -0,0 +1,11 @@
import { string, boolean, object } from 'yup';
export const SupplierFilterSchema = object().shape({
category_id: string().nullable(),
flag: boolean().nullable(),
});
export type SupplierFilterType = {
category_id: string | null;
flag: boolean | null;
};
@@ -0,0 +1,11 @@
import { string, boolean, object } from 'yup';
export const WarehouseFilterSchema = object().shape({
area_id: string().nullable(),
active_project_flock: boolean().nullable(),
});
export type WarehouseFilterType = {
area_id: string | null;
active_project_flock: boolean | null;
};