|
|
|
@@ -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 ( |
|
|
|
<TableRow hover sx={{ cursor: "pointer" }} onClick={handleClick}> |
|
|
|
<TableCell>{data.id}</TableCell> |
|
|
|
<TableCell>{data.name}</TableCell> |
|
|
|
<TableCell>{data.custom ?? "-"}</TableCell> |
|
|
|
</TableRow> |
|
|
|
); |
|
|
|
} |