From e5b8bf2685056ee8ac01650890a495fe5411db71 Mon Sep 17 00:00:00 2001 From: bicochan Date: Thu, 10 Jul 2025 17:08:19 +0900 Subject: [PATCH] =?UTF-8?q?[apps/cs]=20fix:=20=ED=95=98=EC=9C=84=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EB=93=B1=EB=A1=9D=20=ED=8F=BC=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0=20(CS=5FUT08010104)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/cs/src/pages/code/ui/lwpocode-dialog.tsx | 10 ++++++++-- apps/cs/src/pages/code/ui/lwpocode-section.tsx | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/cs/src/pages/code/ui/lwpocode-dialog.tsx b/apps/cs/src/pages/code/ui/lwpocode-dialog.tsx index c11c57332..d6c6bb685 100644 --- a/apps/cs/src/pages/code/ui/lwpocode-dialog.tsx +++ b/apps/cs/src/pages/code/ui/lwpocode-dialog.tsx @@ -1,7 +1,7 @@ import { memo } from "react"; import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; -import { useQuery } from "@tanstack/react-query"; +import { useQuery, useQueryClient } from "@tanstack/react-query"; import { useConfirm } from "@frontend-opensource/use-react-hooks"; import { Button, @@ -50,8 +50,8 @@ const LwpoCodeManagementDialog = memo( ...props }: ManagementLwpoCodeDialogProps) => { const isRegistration = !lwpoCd; - const { confirm } = useConfirm(); + const queryClient = useQueryClient(); const alert = useAlertStore((state) => state.setMessage); const { data: detailData } = useQuery({ @@ -70,6 +70,9 @@ const LwpoCodeManagementDialog = memo( mutationFn: (data: LwpoCodeFormData) => LwpoCodeApi.createLwpoCode(data), onSuccess: () => { alert("등록되었습니다.", () => onOpenChange?.(false)); + queryClient.invalidateQueries({ + queryKey: [ENDPOINT.CMS_SERVICE.LWPO_CODE, upCd], + }); }, }); @@ -251,6 +254,9 @@ const LwpoCodeManagementDialog = memo( {...field} type="number" value={field.value ?? 0} + onChange={(e) => { + field.onChange(parseInt(e.target.value)); + }} className="!text-[1.3rem]" placeholder="정렬순서를 입력해주세요" /> diff --git a/apps/cs/src/pages/code/ui/lwpocode-section.tsx b/apps/cs/src/pages/code/ui/lwpocode-section.tsx index c6025b338..15773c5f4 100644 --- a/apps/cs/src/pages/code/ui/lwpocode-section.tsx +++ b/apps/cs/src/pages/code/ui/lwpocode-section.tsx @@ -116,6 +116,7 @@ function LwpoCodeSection({ upCd }: LwpoCodeSectionProps) { 코드갱신