From a0f61e4d938a1bd05bcd09a9a949257bb4e862e5 Mon Sep 17 00:00:00 2001 From: "sosuke.iwabuchi" Date: Mon, 31 Jul 2023 09:16:11 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A5=91=E7=B4=84=E4=B8=80=E8=A6=A7=E3=80=80?= =?UTF-8?q?=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6=E3=83=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/contract.ts | 1 + src/pages/dashboard/contract/list.tsx | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/api/contract.ts b/src/api/contract.ts index 76cfb81..d24d656 100644 --- a/src/api/contract.ts +++ b/src/api/contract.ts @@ -4,6 +4,7 @@ import { getUrl } from "./url"; export type Contract = { id: string; name: string; + custom?: string; updated_at: string; }; diff --git a/src/pages/dashboard/contract/list.tsx b/src/pages/dashboard/contract/list.tsx index ee96538..21edad4 100644 --- a/src/pages/dashboard/contract/list.tsx +++ b/src/pages/dashboard/contract/list.tsx @@ -11,7 +11,6 @@ import { Typography, } from "@mui/material"; import { Dictionary } from "@types"; -import { changeContract } from "api/auth"; import { Contract, getContracts } from "api/contract"; import { PageID, TabID } from "codes/page"; import { FormProvider, RHFTextField } from "components/hook-form"; @@ -157,8 +156,8 @@ function SearchBox({ table }: CommonProps) { function TableBox({ table }: CommonProps) { const TABLE_HEAD: HeadLabelProps[] = [ - { id: "id", label: "ID", align: "left" }, { id: "name", label: "名前", align: "left" }, + { id: "custom", label: "カスタム", align: "left" }, ]; const { order, @@ -228,10 +227,6 @@ function Row({ data }: RowProps) { const { changeContractId } = useAuth(); const { info } = useSnackbarCustom(); const handleClick = () => { - // navigateWhenChanged(getPath(PageID.DASHBOARD_CONTRACT_DETAIL), { - // id: data.id, - // }); - changeContractId(data.id).then((res) => { info("成り代わりました"); navigateWhenChanged(getPath(PageID.DASHBOARD_OVERVIEW)); @@ -240,8 +235,8 @@ function Row({ data }: RowProps) { return ( - {data.id} {data.name} + {data.custom ?? "-"} ); }