[apps/cs] fix: 콘텐츠 등록 폼 버그 수정 (CS_UT03020102)
This commit is contained in:
@@ -67,11 +67,22 @@ export const contentsDetailSchema = z.object({
|
||||
useYn: z.string(),
|
||||
});
|
||||
|
||||
export const contentsFormSchema = contentsDetailSchema.omit({
|
||||
contsVer: true,
|
||||
aprvDt: true,
|
||||
autzr: true,
|
||||
});
|
||||
export const contentsFormSchema = contentsDetailSchema
|
||||
.omit({
|
||||
contsVer: true,
|
||||
aprvDt: true,
|
||||
autzr: true,
|
||||
})
|
||||
.extend({
|
||||
contsSn: z.number().optional(),
|
||||
aprvCd: z
|
||||
.enum([
|
||||
CONTENTS_APPROVE_STATUS.DRAFT,
|
||||
CONTENTS_APPROVE_STATUS.REQUESTED,
|
||||
CONTENTS_APPROVE_STATUS.APPROVED,
|
||||
])
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export type Contents = z.infer<typeof contentsSchema>;
|
||||
export type ContentsDetail = z.infer<typeof contentsDetailSchema>;
|
||||
|
||||
@@ -34,7 +34,7 @@ function CreatePage() {
|
||||
<div className="card-header">
|
||||
<h3 className="text-2xl font-medium text-label">콘텐츠 등록</h3>
|
||||
</div>
|
||||
<ContentsForm form={form} handleSave={createContents} />
|
||||
<ContentsForm isEditable form={form} handleSave={createContents} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user