rename: 콘텐츠 및 담당자 조회 다이얼로그 리네이밍

This commit is contained in:
2025-03-28 16:44:32 +09:00
parent f59320d2ff
commit 701d042d4f
3 changed files with 19 additions and 10 deletions
@@ -20,11 +20,14 @@ import { ContentApi } from "../api/content-service";
import type { Content } from "../model/content-interface";
import { columns } from "../model/table-colums";
type ContentDialogProps = {
type ContentSearchDialogProps = {
handleContentSelect: (content: Content) => void;
} & React.ComponentProps<typeof Dialog>;
function ContentDialog({ handleContentSelect, ...props }: ContentDialogProps) {
function ContentSearchDialog({
handleContentSelect,
...props
}: ContentSearchDialogProps) {
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
const [contsTtl, setContsTtl] = useState("");
@@ -91,4 +94,4 @@ function ContentDialog({ handleContentSelect, ...props }: ContentDialogProps) {
);
}
export { ContentDialog };
export { ContentSearchDialog };
@@ -29,11 +29,13 @@ import {
type TreeModel = Organization | User;
interface OrganizationDialogProps {
interface OrganizationSearchDialogProps {
handleUserSelect: (user: User) => void;
}
function OrganizationDialog({ handleUserSelect }: OrganizationDialogProps) {
function OrganizationSearchDialog({
handleUserSelect,
}: OrganizationSearchDialogProps) {
const [keyword, setKeyword] = useState("");
const [tree, setTree] = useState<NodeModel<TreeModel>[]>([]);
const [selectedNode, setSelectedNode] = useState<NodeModel<TreeModel> | null>(
@@ -179,4 +181,4 @@ function TreeNode({
);
}
export { OrganizationDialog };
export { OrganizationSearchDialog };
+8 -4
View File
@@ -22,8 +22,8 @@ import {
import type { Content } from "../model/content-interface";
import type { User } from "../model/organization-interface";
import type { MenuFormData, MenuType } from "../model/menu-interface";
import { OrganizationDialog } from "./organization-dialog";
import { ContentDialog } from "./content-dialog";
import { OrganizationSearchDialog } from "./organization-search-dialog";
import { ContentSearchDialog } from "./content-search-dialog";
type TypeMenuFormProps = {
form: UseFormReturn<MenuFormData>;
@@ -65,7 +65,9 @@ function TypeMenuForm({ form, menuType }: TypeMenuFormProps) {
<div className="h-[3.2rem] w-1/2 cursor-not-allowed overflow-hidden whitespace-nowrap break-keep rounded-md border border-input bg-form px-3 py-2 text-[1.3rem] opacity-50">
{form.watch("menuLnkgSnNm")}
</div>
<ContentDialog handleContentSelect={handleContentSelect} />
<ContentSearchDialog
handleContentSelect={handleContentSelect}
/>
</div>
</TableCell>
</TableRow>
@@ -291,7 +293,9 @@ function TypeMenuForm({ form, menuType }: TypeMenuFormProps) {
<div className="h-[3.2rem] w-[21.5rem] cursor-not-allowed rounded-md border border-input bg-form px-3 py-2 text-[1.3rem] opacity-50">
{form.watch("menuPicUserUnqIdNm")}
</div>
<OrganizationDialog handleUserSelect={handleUserSelect} />
<OrganizationSearchDialog
handleUserSelect={handleUserSelect}
/>
</div>
<div className="flex items-center gap-2">
<b>지정일:</b>