chore: 팝업 작동 요청사항 반영
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
@@ -27,12 +28,10 @@ type ManagementAuthorityDialogProps = {
|
||||
menuCd?: number;
|
||||
} & React.ComponentProps<typeof Dialog>;
|
||||
|
||||
function ManagementAuthorityDialog({
|
||||
menuCd,
|
||||
...props
|
||||
}: ManagementAuthorityDialogProps) {
|
||||
function ManagementAuthorityDialog({ menuCd }: ManagementAuthorityDialogProps) {
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.MENU_AUTHRTS, menuCd],
|
||||
@@ -44,7 +43,7 @@ function ManagementAuthorityDialog({
|
||||
mutationFn: (data: MenuAuthorityPayload[]) =>
|
||||
MenuAuthorityApi.saveMenuAuthority(data),
|
||||
onSuccess: () => {
|
||||
alert("저장되었습니다.");
|
||||
alert("저장되었습니다.", () => setOpen(false));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -72,7 +71,7 @@ function ManagementAuthorityDialog({
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog {...props}>
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>
|
||||
<Button className="gap-3" disabled={!menuCd}>
|
||||
<i className="diveicon di-personal-information" />
|
||||
|
||||
@@ -52,6 +52,7 @@ type PostingTarget = {
|
||||
type PostingDialogProps = {
|
||||
postingType: PostingType;
|
||||
postingTargets: PostingTarget[];
|
||||
resetSelectedPost: () => void;
|
||||
};
|
||||
|
||||
const POSTING_TYPE_LABEL = {
|
||||
@@ -61,7 +62,11 @@ const POSTING_TYPE_LABEL = {
|
||||
SURVEY: "설문",
|
||||
} as const;
|
||||
|
||||
function PostingDialog({ postingType, postingTargets }: PostingDialogProps) {
|
||||
function PostingDialog({
|
||||
postingType,
|
||||
postingTargets,
|
||||
resetSelectedPost,
|
||||
}: PostingDialogProps) {
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const [selectedRows, setSelectedRows] = useState<number[]>([]);
|
||||
@@ -71,6 +76,7 @@ function PostingDialog({ postingType, postingTargets }: PostingDialogProps) {
|
||||
const [rememberPeriodDate, setRememberPeriodDate] = useState<
|
||||
Record<string, DateRange | undefined>
|
||||
>({});
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
const { data: siteList } = useQuery<PageableList<Site>>({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SITES],
|
||||
@@ -80,7 +86,10 @@ function PostingDialog({ postingType, postingTargets }: PostingDialogProps) {
|
||||
const { mutateAsync: savePosting } = useMutationWrapper({
|
||||
mutationFn: (data: PostPayload[]) => PostingApi.savePosting(data),
|
||||
onSuccess: () => {
|
||||
alert("저장되었습니다.");
|
||||
alert("저장되었습니다.", () => {
|
||||
setOpen(false);
|
||||
resetSelectedPost();
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -218,14 +227,19 @@ function PostingDialog({ postingType, postingTargets }: PostingDialogProps) {
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog onOpenChange={handleOpenChange}>
|
||||
<Dialog
|
||||
open={open}
|
||||
onOpenChange={(open) => {
|
||||
setOpen(open);
|
||||
handleOpenChange(open);
|
||||
}}
|
||||
>
|
||||
<DialogTrigger asChild>
|
||||
<AuthorityButton
|
||||
authority="mngAuthrtYn"
|
||||
color="emerald"
|
||||
disabled={!postingTargets.length}
|
||||
>
|
||||
<i className="diveicon di-layer" />
|
||||
사이트반영
|
||||
</AuthorityButton>
|
||||
</DialogTrigger>
|
||||
|
||||
@@ -131,6 +131,7 @@ function BannerPage() {
|
||||
<PostingDialog
|
||||
postingType={POSTING_TYPE.BANNER}
|
||||
postingTargets={postingTargets}
|
||||
resetSelectedPost={() => table.setRowSelection({})}
|
||||
/>
|
||||
<Button onClick={() => router.push("/banner/register")}>
|
||||
등록
|
||||
|
||||
@@ -42,7 +42,7 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
mutationFn: (data: BannerFormData) =>
|
||||
BannerApi.updateBanner(sequential, data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.");
|
||||
alert("수정되었습니다.", router.back);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
@@ -13,6 +14,7 @@ import {
|
||||
import { BbsForm } from "./bbs-form";
|
||||
|
||||
function ModifyPage({ bbsId }: { bbsId: string }) {
|
||||
const router = useRouter();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const { data: boardInfo } = useQuery({
|
||||
@@ -23,7 +25,7 @@ function ModifyPage({ bbsId }: { bbsId: string }) {
|
||||
const { mutateAsync: updateBoard } = useMutationWrapper({
|
||||
mutationFn: (data: BoardFormData) => BoardApi.updateBoard(bbsId, data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.");
|
||||
alert("수정되었습니다.", router.back);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
type PaginationState,
|
||||
type RowSelectionState,
|
||||
} from "@tanstack/react-table";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { Button } from "@common/components";
|
||||
import { GroupUsersApi } from "@/entities/group-user";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
@@ -24,6 +25,7 @@ type GroupUsersSectionProps = {
|
||||
|
||||
function GroupUsersSection({ groupId }: GroupUsersSectionProps) {
|
||||
const queryClient = useQueryClient();
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const [pagination, setPagination] = useState<PaginationState>({
|
||||
@@ -65,6 +67,7 @@ function GroupUsersSection({ groupId }: GroupUsersSectionProps) {
|
||||
const handleDeleteSelected = async () => {
|
||||
const selectedRows = Object.keys(rowSelection);
|
||||
if (selectedRows.length === 0 || !groupId) return;
|
||||
if (!(await confirm("사용자를 삭제하시겠습니까?"))) return;
|
||||
|
||||
try {
|
||||
const usersToDelete = selectedRows.map((userUnqId) => ({
|
||||
|
||||
@@ -43,7 +43,7 @@ function MenuAuthorityDialog({ groupId }: MenuAuthorityDialogProps) {
|
||||
mutationFn: (data: MenuAuthorityPayload[]) =>
|
||||
MenuAuthorityApi.saveMenuAuthority(data),
|
||||
onSuccess: () => {
|
||||
alert("저장되었습니다.");
|
||||
alert("저장되었습니다.", () => setOpen(false));
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ function ImagePage() {
|
||||
<PostingDialog
|
||||
postingType={POSTING_TYPE.IMAGE}
|
||||
postingTargets={postingTargets}
|
||||
resetSelectedPost={() => table.setRowSelection({})}
|
||||
/>
|
||||
<Button onClick={() => router.push("/image/register")}>
|
||||
등록
|
||||
|
||||
@@ -38,7 +38,7 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
const { mutateAsync: updateImage } = useMutationWrapper({
|
||||
mutationFn: (data: ImageFormData) => ImageApi.updateImage(sequential, data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.");
|
||||
alert("수정되었습니다.", router.back);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -37,25 +37,25 @@ type ManagementAuthorityDialogProps = {
|
||||
} & React.ComponentProps<typeof Dialog>;
|
||||
|
||||
const ManagementAuthorityDialog = memo(
|
||||
({ authorizationNo, rowData, ...props }: ManagementAuthorityDialogProps) => {
|
||||
({ authorizationNo, rowData }: ManagementAuthorityDialogProps) => {
|
||||
const { confirm } = useConfirm();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const [isOpened, setIsOpened] = useState(false);
|
||||
const [open, setOpen] = useState(false);
|
||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.ROLE_AUTHORIZATIONS, authorizationNo],
|
||||
queryFn: () =>
|
||||
RoleAuthorizationsApi.getRoleAuthorizationsList({ authorizationNo }),
|
||||
enabled: !!authorizationNo && isOpened,
|
||||
enabled: !!authorizationNo && open,
|
||||
});
|
||||
|
||||
const { mutateAsync: saveRoleAuthorization } = useMutationWrapper({
|
||||
mutationFn: (data: RoleAuthorizationsData) =>
|
||||
RoleAuthorizationsApi.createRoleAuthorizations(data),
|
||||
onSuccess: () => {
|
||||
alert("저장되었습니다.");
|
||||
alert("저장되었습니다.", () => setOpen(false));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -91,11 +91,9 @@ const ManagementAuthorityDialog = memo(
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog {...props}>
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>
|
||||
<Button size="sm" onClick={() => setIsOpened(true)}>
|
||||
관리
|
||||
</Button>
|
||||
<Button size="sm">관리</Button>
|
||||
</DialogTrigger>
|
||||
<DialogContent className="max-w-[60rem]" aria-describedby={undefined}>
|
||||
<DialogHeader>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
@@ -13,6 +14,7 @@ import {
|
||||
import { ModuleForm } from "./module-form";
|
||||
|
||||
function ModifyPage({ sequential }: { sequential: string }) {
|
||||
const router = useRouter();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const { data: authorizationInfo } = useQuery({
|
||||
@@ -24,7 +26,7 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
mutationFn: (data: AuthorizationFormData) =>
|
||||
AuthorizationsApi.updateAuthorization(sequential, data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.");
|
||||
alert("수정되었습니다.", router.back);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ function PopupPage() {
|
||||
<PostingDialog
|
||||
postingType={POSTING_TYPE.POPUP}
|
||||
postingTargets={postingTargets}
|
||||
resetSelectedPost={() => table.setRowSelection({})}
|
||||
/>
|
||||
<AuthorityButton
|
||||
authority="regAuthrtYn"
|
||||
|
||||
@@ -43,7 +43,7 @@ function ViewPopup({ popupSn }: { popupSn: string }) {
|
||||
}, [popupSn]);
|
||||
|
||||
return (
|
||||
<div className="h-svh bg-container p-4">
|
||||
<div className="bg-container p-4">
|
||||
<div className="card card-border !m-0">
|
||||
<div className="card-header">
|
||||
<h1 className="text-3xl font-bold text-foreground">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { useRef } from "react";
|
||||
import React, { useRef, useState } from "react";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
@@ -11,22 +12,41 @@ import {
|
||||
SelectValue,
|
||||
} from "@common/components";
|
||||
import type { Board } from "@/entities/board";
|
||||
import type { MovePost } from "@/entities/post";
|
||||
import { PostApi, type MovePost } from "@/entities/post";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import { useAlertStore, useMutationWrapper } from "@/shared/lib";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
type MovePostDialogProps = {
|
||||
selectedPosts: MovePost[];
|
||||
boardList: Board[];
|
||||
onMovePost: (data: MovePost[]) => void;
|
||||
resetSelectedPost: () => void;
|
||||
};
|
||||
|
||||
function MovePostDialog({
|
||||
selectedPosts,
|
||||
boardList,
|
||||
onMovePost,
|
||||
resetSelectedPost,
|
||||
}: MovePostDialogProps) {
|
||||
const queryClient = useQueryClient();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const selectedPostsRef = useRef<MovePost[]>(selectedPosts);
|
||||
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
const { mutate: movePost } = useMutationWrapper({
|
||||
mutationFn: (data: MovePost[]) => PostApi.movePost(data),
|
||||
onSuccess: () => {
|
||||
alert("이동이 완료되었습니다.", () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.BOARD_SERVICE.POSTS],
|
||||
});
|
||||
resetSelectedPost();
|
||||
setOpen(false);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const onSelectValueChange = (toBbsId: string) => {
|
||||
selectedPostsRef.current = selectedPosts.map((post) => ({
|
||||
...post,
|
||||
@@ -35,7 +55,7 @@ function MovePostDialog({
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog>
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>
|
||||
<AuthorityButton
|
||||
authority="mngAuthrtYn"
|
||||
@@ -61,9 +81,7 @@ function MovePostDialog({
|
||||
</SelectContent>
|
||||
</Select>
|
||||
|
||||
<Button onClick={() => onMovePost(selectedPostsRef.current)}>
|
||||
이동
|
||||
</Button>
|
||||
<Button onClick={() => movePost(selectedPostsRef.current)}>이동</Button>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
|
||||
@@ -24,18 +24,12 @@ import {
|
||||
import {
|
||||
PostApi,
|
||||
type DeletePost,
|
||||
type MovePost,
|
||||
type RecentPost,
|
||||
type RecentPostParams,
|
||||
} from "@/entities/post";
|
||||
import { BoardApi } from "@/entities/board";
|
||||
import { AuthorityButton } from "@/entities/menu-authority";
|
||||
import {
|
||||
useAlertStore,
|
||||
useMutationWrapper,
|
||||
usePrompt,
|
||||
useDataTable,
|
||||
} from "@/shared/lib";
|
||||
import { useAlertStore, usePrompt, useDataTable } from "@/shared/lib";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { columns } from "../model/table-columns";
|
||||
import { MovePostDialog } from "./move-post-dialog";
|
||||
@@ -82,13 +76,6 @@ function RecentPage() {
|
||||
queryFn: () => BoardApi.getBoardList(),
|
||||
});
|
||||
|
||||
const { mutate: movePost } = useMutationWrapper({
|
||||
mutationFn: (data: MovePost[]) => PostApi.movePost(data),
|
||||
onSuccess: () => {
|
||||
alert("이동이 완료되었습니다.", query.refetch);
|
||||
},
|
||||
});
|
||||
|
||||
const handleRowClick = (row: RecentPost) => {
|
||||
router.push(
|
||||
`/bbs/${row.bbsTypeCd.toLowerCase()}/${row.bbsId}/${row.pstNo}`,
|
||||
@@ -320,7 +307,7 @@ function RecentPage() {
|
||||
pstNo: row.original.pstNo,
|
||||
}))}
|
||||
boardList={boardList?.content ?? []}
|
||||
onMovePost={movePost}
|
||||
resetSelectedPost={() => table.setRowSelection({})}
|
||||
/>
|
||||
<AuthorityButton
|
||||
authority="delAuthrtYn"
|
||||
|
||||
@@ -89,7 +89,7 @@ function DomainManagementDialog({
|
||||
if (await confirm("저장하시겠습니까?")) {
|
||||
await mutateAsync(data.domains);
|
||||
handleSaveDomain?.(data.domains);
|
||||
alert("저장되었습니다.");
|
||||
alert("저장되었습니다.", () => props.onOpenChange?.(false));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ function IPManagementDialog({
|
||||
const onSubmit = async (data: IPFormData) => {
|
||||
if (await confirm("저장하시겠습니까?")) {
|
||||
await mutateAsync(data.ips);
|
||||
alert("저장되었습니다.");
|
||||
alert("저장되었습니다.", () => props.onOpenChange?.(false));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { SiteApi, siteFormSchema, type SiteFormData } from "@/entities/site";
|
||||
import { useAlertStore, useMutationWrapper } from "@/shared/lib";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
@@ -11,7 +11,6 @@ import { SiteForm } from "./site-form";
|
||||
|
||||
function ModifyPage({ siteId }: { siteId: string }) {
|
||||
const router = useRouter();
|
||||
const queryClient = useQueryClient();
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
|
||||
const { data: siteDetail } = useQuery({
|
||||
@@ -34,11 +33,7 @@ function ModifyPage({ siteId }: { siteId: string }) {
|
||||
const { mutateAsync: updateSite } = useMutationWrapper({
|
||||
mutationFn: (data: SiteFormData) => SiteApi.updateSite(siteId, data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.", () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SITES],
|
||||
});
|
||||
});
|
||||
alert("수정되었습니다.", router.back);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -60,13 +60,13 @@ function ArticleManagementDialog({
|
||||
enabled: !!srvyQitemNo && !!open,
|
||||
});
|
||||
|
||||
const { mutateAsync } = useMutationWrapper({
|
||||
const { mutate } = useMutationWrapper({
|
||||
mutationFn: (body: Article[]) => SurveyApi.saveArticleList(body),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SURVEY_ARTICLE, srvyQitemNo],
|
||||
});
|
||||
alert("저장되었습니다.");
|
||||
alert("저장되었습니다.", () => setOpen(false));
|
||||
},
|
||||
});
|
||||
|
||||
@@ -95,8 +95,7 @@ function ArticleManagementDialog({
|
||||
|
||||
const onSubmit = async (data: ArticleFormData) => {
|
||||
if (await confirm("저장하시겠습니까?")) {
|
||||
await mutateAsync(data.articles);
|
||||
alert("저장되었습니다.");
|
||||
mutate(data.articles);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -43,8 +43,7 @@ function QuestionAddDialog({
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SURVEY_QUESTION, srvySn.toString()],
|
||||
});
|
||||
alert("문항이 추가되었습니다.");
|
||||
onOpenChange?.(false);
|
||||
alert("문항이 추가되었습니다.", () => onOpenChange?.(false));
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -50,8 +50,7 @@ function QuestionEditDialog({
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.SURVEY_QUESTION, srvySn.toString()],
|
||||
});
|
||||
alert("문항이 수정되었습니다.");
|
||||
setOpen(false);
|
||||
alert("문항이 수정되었습니다.", () => setOpen(false));
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ function SurveyPage() {
|
||||
<PostingDialog
|
||||
postingType={POSTING_TYPE.SURVEY}
|
||||
postingTargets={postingTargets}
|
||||
resetSelectedPost={() => table.setRowSelection({})}
|
||||
/>
|
||||
<AuthorityButton
|
||||
authority="regAuthrtYn"
|
||||
|
||||
@@ -26,7 +26,7 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
mutationFn: (data: TemplateFormData) =>
|
||||
TemplateApi.updateTemplate(sequential, data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.");
|
||||
alert("수정되었습니다.", router.back);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
const { mutateAsync: updateTerms } = useMutationWrapper({
|
||||
mutationFn: (data: TermsFormData) => TermsApi.updateTerms(sequential, data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.");
|
||||
alert("수정되었습니다.", router.back);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@ function CreatePage() {
|
||||
const { mutateAsync: saveUser } = useMutationWrapper({
|
||||
mutationFn: (data: UserSaveData) => UserApi.saveUser(data),
|
||||
onSuccess: () => {
|
||||
alert("회원이 등록되었습니다.");
|
||||
router.push("/users");
|
||||
alert("회원이 등록되었습니다.", router.back);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -51,9 +51,10 @@ export function PasswordResetDialog({ userUnqId }: PasswordResetDialogProps) {
|
||||
mutationFn: (data: UserPasswordUpdateData) =>
|
||||
UserApi.initializePassword(userUnqId, data),
|
||||
onSuccess: () => {
|
||||
alert("비밀번호가 초기화되었습니다.");
|
||||
setOpen(false);
|
||||
form.reset();
|
||||
alert("비밀번호가 초기화되었습니다.", () => {
|
||||
setOpen(false);
|
||||
form.reset();
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user