diff options
Diffstat (limited to 'lib/tech-vendors/validations.ts')
| -rw-r--r-- | lib/tech-vendors/validations.ts | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/tech-vendors/validations.ts b/lib/tech-vendors/validations.ts index ee076945..fa0d9ae3 100644 --- a/lib/tech-vendors/validations.ts +++ b/lib/tech-vendors/validations.ts @@ -36,7 +36,7 @@ export const searchParamsCache = createSearchParamsCache({ // 기술영업 협력업체에 특화된 검색 필드 // ----------------------------------------------------------------- // 상태 (ACTIVE, INACTIVE, BLACKLISTED 등) 중에서 선택 - status: parseAsStringEnum(["ACTIVE", "INACTIVE", "BLACKLISTED", "PENDING_REVIEW", "IN_REVIEW", "REJECTED"]), + status: parseAsStringEnum(["ACTIVE", "INACTIVE", "BLACKLISTED", "PENDING_REVIEW"]), // 협력업체명 검색 vendorName: parseAsString.withDefault(""), @@ -46,8 +46,20 @@ export const searchParamsCache = createSearchParamsCache({ // 예) 코드 검색 vendorCode: parseAsString.withDefault(""), + // 벤더 타입 필터링 (다중 선택 가능) vendorType: parseAsStringEnum(["ship", "top", "hull"]), + + // workTypes 필터링 (다중 선택 가능) + workTypes: parseAsArrayOf(parseAsStringEnum([ + // 조선 workTypes + "기장", "전장", "선실", "배관", "철의", + // 해양TOP workTypes + "TM", "TS", "TE", "TP", + // 해양HULL workTypes + "HA", "HE", "HH", "HM", "NC" + ])).withDefault([]), + // 필요하다면 이메일 검색 / 웹사이트 검색 등 추가 가능 email: parseAsString.withDefault(""), website: parseAsString.withDefault(""), @@ -239,12 +251,12 @@ export const updateTechVendorContactSchema = z.object({ export const createTechVendorItemSchema = z.object({ vendorId: z.number(), itemCode: z.string().max(100, "Max length 100"), - itemName: z.string().min(1, "Item name is required").max(255, "Max length 255"), + itemList: z.string().min(1, "Item list is required").max(255, "Max length 255"), }); // 아이템 업데이트 스키마 export const updateTechVendorItemSchema = z.object({ - itemName: z.string().optional(), + itemList: z.string().optional(), itemCode: z.string().max(100, "Max length 100"), }); |
