summaryrefslogtreecommitdiff
path: root/lib/general-contracts/main/general-contract-update-sheet.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/general-contracts/main/general-contract-update-sheet.tsx')
-rw-r--r--lib/general-contracts/main/general-contract-update-sheet.tsx20
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/general-contracts/main/general-contract-update-sheet.tsx b/lib/general-contracts/main/general-contract-update-sheet.tsx
index 18095516..074558ec 100644
--- a/lib/general-contracts/main/general-contract-update-sheet.tsx
+++ b/lib/general-contracts/main/general-contract-update-sheet.tsx
@@ -46,8 +46,8 @@ const updateContractSchema = z.object({
name: z.string().min(1, "계약명을 입력해주세요"),
startDate: z.string().optional(), // AD, LO, OF 계약인 경우 선택사항
endDate: z.string().optional(), // AD, LO, OF 계약인 경우 선택사항
- validityEndDate: z.string().optional(), // LO 계약인 경우에만 필수값으로 처리
- contractScope: z.string().min(1, "계약확정범위를 선택해주세요"),
+ validityEndDate: z.string().optional(),
+ contractScope: z.string().optional(),
notes: z.string().optional(),
linkedRfqOrItb: z.string().optional(),
linkedPoNumber: z.string().optional(),
@@ -70,15 +70,6 @@ const updateContractSchema = z.object({
})
}
}
-
- // LO 계약인 경우 계약체결유효기간 필수값 체크
- if (data.type === 'LO' && !data.validityEndDate) {
- ctx.addIssue({
- code: z.ZodIssueCode.custom,
- message: "LO 계약의 경우 계약체결유효기간은 필수 항목입니다",
- path: ["validityEndDate"],
- })
- }
})
type UpdateContractFormData = z.infer<typeof updateContractSchema>
@@ -355,10 +346,7 @@ export function GeneralContractUpdateSheet({
name="validityEndDate"
render={({ field }) => (
<FormItem>
- <FormLabel>
- 유효기간종료일
- {form.watch('type') === 'LO' && <span className="text-red-600 ml-1">*</span>}
- </FormLabel>
+ <FormLabel>유효기간종료일</FormLabel>
<FormControl>
<Input type="date" {...field} />
</FormControl>
@@ -373,7 +361,7 @@ export function GeneralContractUpdateSheet({
name="contractScope"
render={({ field }) => (
<FormItem>
- <FormLabel>계약확정범위 *</FormLabel>
+ <FormLabel>계약확정범위</FormLabel>
<Select onValueChange={field.onChange} value={field.value}>
<FormControl>
<SelectTrigger>