summaryrefslogtreecommitdiff
path: root/lib/general-contracts/main
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-11-11 09:22:58 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-11-11 09:22:58 +0000
commit535de26b9cf3242c04543d6891d78352b9593a60 (patch)
treecfb2a76a3442ad0ec1d2b2b75293658d93a45808 /lib/general-contracts/main
parent88b737a71372353e47c466553273d88f5bf36834 (diff)
(최겸) 구매 수정사항 개발
Diffstat (limited to 'lib/general-contracts/main')
-rw-r--r--lib/general-contracts/main/create-general-contract-dialog.tsx5
-rw-r--r--lib/general-contracts/main/general-contract-update-sheet.tsx20
2 files changed, 9 insertions, 16 deletions
diff --git a/lib/general-contracts/main/create-general-contract-dialog.tsx b/lib/general-contracts/main/create-general-contract-dialog.tsx
index 168b8cbc..04f70834 100644
--- a/lib/general-contracts/main/create-general-contract-dialog.tsx
+++ b/lib/general-contracts/main/create-general-contract-dialog.tsx
@@ -205,6 +205,11 @@ export function CreateGeneralContractDialog() {
onChange={(e) => setForm(prev => ({ ...prev, name: e.target.value }))}
placeholder="계약명을 입력하세요"
/>
+ {form.type === 'SC' && (
+ <p className="text-sm text-blue-600 mt-1">
+ 납품예정 품목 및 수량을 명기하세요. 납품 품목 또는 작업 내용은 구체적으로 작성하되, 수량(물량)이 정확하지 않을 경우, 상호협의하에 변경 가능하며, 수량(물량) 등은 개별계약(PO)시 명기하세요
+ </p>
+ )}
</div>
</div>
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>