|
|
|
@@ -36,6 +36,7 @@ function AreaBox({ title, children }: AreaBoxProps) { |
|
|
|
type FormProps = { |
|
|
|
name: string; |
|
|
|
custom: string; |
|
|
|
contract_code: string; |
|
|
|
}; |
|
|
|
|
|
|
|
export default function ContractCreate() { |
|
|
|
@@ -59,18 +60,21 @@ export default function ContractCreate() { |
|
|
|
defaultValues: { |
|
|
|
name: "", |
|
|
|
custom: "", |
|
|
|
contract_code: "", |
|
|
|
}, |
|
|
|
}); |
|
|
|
|
|
|
|
const { callAPI } = useAPICall({ |
|
|
|
apiMethod: createContract, |
|
|
|
backDrop: true, |
|
|
|
form, |
|
|
|
onSuccess: () => { |
|
|
|
success("登録しました"); |
|
|
|
setMode("done"); |
|
|
|
}, |
|
|
|
onFailed: () => { |
|
|
|
error("失敗しました"); |
|
|
|
setMode("input"); |
|
|
|
}, |
|
|
|
}); |
|
|
|
|
|
|
|
@@ -109,6 +113,9 @@ export default function ContractCreate() { |
|
|
|
<AreaBox title="契約者名"> |
|
|
|
<RHFTextField name="name" size="small" /> |
|
|
|
</AreaBox> |
|
|
|
<AreaBox title="契約識別子"> |
|
|
|
<RHFTextField name="contract_code" size="small" /> |
|
|
|
</AreaBox> |
|
|
|
<AreaBox title="カスタム識別子"> |
|
|
|
<RHFTextField name="custom" size="small" /> |
|
|
|
</AreaBox> |
|
|
|
@@ -131,6 +138,10 @@ export default function ContractCreate() { |
|
|
|
<TableCell>契約者名</TableCell> |
|
|
|
<TableCell>{form.getValues("name")}</TableCell> |
|
|
|
</TableRow> |
|
|
|
<TableRow> |
|
|
|
<TableCell>契約識別子</TableCell> |
|
|
|
<TableCell>{form.getValues("contract_code")}</TableCell> |
|
|
|
</TableRow> |
|
|
|
<TableRow> |
|
|
|
<TableCell>カスタム識別子</TableCell> |
|
|
|
<TableCell>{form.getValues("custom")}</TableCell> |
|
|
|
|