메뉴 도움말 추가

This commit is contained in:
2025-08-02 20:03:20 +09:00
parent 1704136214
commit 2f097e2998
3 changed files with 33 additions and 0 deletions
@@ -29,6 +29,7 @@ export interface MenuItem {
otptYn: string;
newWndwYn: string;
requiredUrlPath: boolean;
menuHlpCn: string;
}
export interface MenuTemporarilyStoredData {
@@ -70,6 +71,7 @@ export const menuFormSchema = z.object({
menuPicUserUnqId: z.string().nullish(),
menuPicUserUnqIdNm: z.string().nullish(),
menuPicDsgnYmd: z.string().nullish(),
menuHlpCn: z.string().nullish(),
});
export const siteMapPayloadSchema = z.object({
@@ -1,3 +1,4 @@
import dynamic from "next/dynamic";
import dayjs from "dayjs";
import type { UseFormReturn } from "react-hook-form";
import {
@@ -24,6 +25,11 @@ import { ContentSearchDialog } from "./content-search-dialog";
import { BoardSearchDialog } from "./board-search-dialog";
import { QRCodeDialog } from "./qrcode-dialog";
const Editor = dynamic(
() => import("@/entities/editor").then((module) => module.Editor),
{ ssr: false },
);
type TypeMenuFormProps = {
form: UseFormReturn<MenuFormData>;
menuType: MenuType;
@@ -417,6 +423,30 @@ function TypeMenuForm({ form, menuType }: TypeMenuFormProps) {
</TableRow>
</>
)}
{menuType === "INSIDE" && (
<TableRow>
<TableHead>
도움말
<InfoTooltip text="메뉴 도움말을 입력하십시오. 메뉴 클릭시 네비게이션바에 도움말이 아이콘이 표시됩니다." />
</TableHead>
<TableCell className="border">
<FormField
control={form.control}
name="menuHlpCn"
render={({ field }) => (
<FormItem>
<FormControl>
<Editor
value={(field.value ?? "") as string}
onEditorChange={field.onChange}
/>
</FormControl>
</FormItem>
)}
/>
</TableCell>
</TableRow>
)}
</TableBody>
</Table>
);
@@ -20,6 +20,7 @@ export interface MenuItem {
otptYn: string;
newWndwYn: string;
requiredUrlPath: boolean;
menuHlpCn: string;
}
export interface TreeMenu extends MenuItem {