chore: 콘텐츠 테이블 컬럼 데이터 수정
This commit is contained in:
@@ -20,6 +20,8 @@ export const columns = [
|
||||
columns: [
|
||||
columnHelper.accessor("workContsVer", {
|
||||
header: "작성버전",
|
||||
cell: ({ row }) =>
|
||||
row.original.workContsVer ? `rev. ${row.original.workContsVer}` : "",
|
||||
}),
|
||||
columnHelper.accessor("workAprvNm", {
|
||||
header: "작성상태",
|
||||
@@ -32,13 +34,18 @@ export const columns = [
|
||||
columns: [
|
||||
columnHelper.accessor("aprvContsVer", {
|
||||
header: "승인버전",
|
||||
cell: ({ row }) =>
|
||||
row.original.aprvContsVer ? `rev. ${row.original.aprvContsVer}` : "",
|
||||
}),
|
||||
columnHelper.accessor("autzrNm", {
|
||||
header: "승인자",
|
||||
}),
|
||||
columnHelper.accessor("aprvDt", {
|
||||
header: "승인일자",
|
||||
cell: ({ row }) => dayjs(row.original.aprvDt).format("YYYY-MM-DD"),
|
||||
cell: ({ row }) =>
|
||||
row.original.aprvDt
|
||||
? dayjs(row.original.aprvDt).format("YYYY-MM-DD")
|
||||
: "",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
@@ -53,6 +60,9 @@ export const columns = [
|
||||
columnHelper.accessor("mdfcnDt", {
|
||||
id: "mdfcnDt",
|
||||
header: "최종수정일",
|
||||
cell: ({ row }) => dayjs(row.original.mdfcnDt).format("YYYY-MM-DD"),
|
||||
cell: ({ row }) =>
|
||||
row.original.mdfcnDt
|
||||
? dayjs(row.original.mdfcnDt).format("YYYY-MM-DD")
|
||||
: "",
|
||||
}),
|
||||
];
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore } from "@/shared/lib/use-alert-store";
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
} from "@common/components/ui";
|
||||
|
||||
function ModifyPage({ sequential }: { sequential: string }) {
|
||||
const queryClient = useQueryClient();
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
|
||||
const [contentsVersion, setContentsVersion] = useState(0);
|
||||
@@ -50,6 +51,9 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
mutationFn: (data: ContentsFormData) => ContentsApi.createContents(data),
|
||||
onSuccess: () => {
|
||||
alert("수정되었습니다.");
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CONTENTS_DETAILS, sequential],
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user