summaryrefslogtreecommitdiff
path: root/lib/items-tech/validations.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/items-tech/validations.ts')
-rw-r--r--lib/items-tech/validations.ts18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/items-tech/validations.ts b/lib/items-tech/validations.ts
index 653f0af8..95a34b58 100644
--- a/lib/items-tech/validations.ts
+++ b/lib/items-tech/validations.ts
@@ -24,6 +24,8 @@ export const shipbuildingSearchParamsCache = createSearchParamsCache({
itemList: parseAsString.withDefault(""),
filters: getFiltersStateParser().withDefault([]),
joinOperator: parseAsStringEnum(["and", "or"]).withDefault("and"),
+ shipFilters: getFiltersStateParser().withDefault([]),
+ shipJoinOperator: parseAsStringEnum(["and", "or"]).withDefault("and"),
search: parseAsString.withDefault(""),
})
@@ -42,6 +44,8 @@ export const offshoreTopSearchParamsCache = createSearchParamsCache({
subItemList: parseAsString.withDefault(""),
filters: getFiltersStateParser().withDefault([]),
joinOperator: parseAsStringEnum(["and", "or"]).withDefault("and"),
+ topFilters: getFiltersStateParser().withDefault([]),
+ topJoinOperator: parseAsStringEnum(["and", "or"]).withDefault("and"),
search: parseAsString.withDefault(""),
})
@@ -59,6 +63,8 @@ export const offshoreHullSearchParamsCache = createSearchParamsCache({
subItemList: parseAsString.withDefault(""),
filters: getFiltersStateParser().withDefault([]),
joinOperator: parseAsStringEnum(["and", "or"]).withDefault("and"),
+ hullFilters: getFiltersStateParser().withDefault([]),
+ hullJoinOperator: parseAsStringEnum(["and", "or"]).withDefault("and"),
search: parseAsString.withDefault(""),
})
@@ -66,7 +72,7 @@ export const offshoreHullSearchParamsCache = createSearchParamsCache({
// 조선 아이템 업데이트 스키마
export const updateShipbuildingItemSchema = z.object({
itemCode: z.string(),
- workType: z.string().optional(),
+ workType: z.enum(["기장", "전장", "선실", "배관", "철의", "선체"]).optional(),
shipTypes: z.string().optional(),
itemList: z.string().optional(),
})
@@ -80,7 +86,7 @@ export type UpdateShipbuildingItemSchema = z.infer<typeof updateShipbuildingItem
// 조선 아이템 스키마
export const createShipbuildingItemSchema = z.object({
itemCode: z.string(),
- workType: z.string(),
+ workType: z.enum(["기장", "전장", "선실", "배관", "철의", "선체"]),
shipTypes: z.string(),
itemList: z.string().optional(),
})
@@ -90,7 +96,7 @@ export type CreateShipbuildingItemSchema = z.infer<typeof createShipbuildingItem
// 조선 아이템 생성 데이터 타입
export interface ShipbuildingItemCreateData {
itemCode: string
- workType: string | null
+ workType: "기장" | "전장" | "선실" | "배관" | "철의" | "선체" | null
shipTypes: string | null
itemList?: string | null
}
@@ -109,7 +115,7 @@ export const createOffshoreTopItemSchema = z.object({
// 해양 HULL 아이템 스키마
export const createOffshoreHullItemSchema = z.object({
itemCode: z.string(),
- workType: z.enum(["HA", "HE", "HH", "HM", "NC"]),
+ workType: z.enum(["HA", "HE", "HH", "HM", "HO", "HP", "NC"]),
itemList: z.string().optional(),
subItemList: z.string().optional(),
})
@@ -128,7 +134,7 @@ export const updateOffshoreTopItemSchema = z.object({
// 해양 HULL 아이템 업데이트 스키마
export const updateOffshoreHullItemSchema = z.object({
itemCode: z.string(),
- workType: z.enum(["HA", "HE", "HH", "HM", "NC"]).optional(),
+ workType: z.enum(["HA", "HE", "HH", "HM", "HO", "HP", "NC"]).optional(),
itemList: z.string().optional(),
subItemList: z.string().optional(),
})
@@ -147,7 +153,7 @@ export interface OffshoreTopItemCreateData {
// 해양 HULL 아이템 생성 데이터 타입
export interface OffshoreHullItemCreateData {
itemCode: string
- workType: "HA" | "HE" | "HH" | "HM" | "NC"
+ workType: "HA" | "HE" | "HH" | "HM" | "HO" | "HP" | "NC"
itemList?: string | null
subItemList?: string | null
}