소스 검색

チャージ取消追加

develop
sosuke.iwabuchi 1 년 전
부모
커밋
bd3feeb78f
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. +7
    -3
      src/pages/dashboard/shop/店舗詳細/詳細/デポジットチャージ.tsx

+ 7
- 3
src/pages/dashboard/shop/店舗詳細/詳細/デポジットチャージ.tsx 파일 보기

@@ -3,12 +3,12 @@ import { Box, Button, Card, Grid, Stack, Typography } from "@mui/material";
import { デポジットチャージ } from "api/shop";
import { FormProvider, RHFTextField } from "components/hook-form";
import StackRow from "components/stack/StackRow";
import { 店舗詳細Context } from "contexts/page/dashboard/shop/店舗詳細Context";
import useAPICall from "hooks/useAPICall";
import useSnackbarCustom from "hooks/useSnackbarCustom";
import { useContext } from "react";
import { useForm } from "react-hook-form";
import { number, object } from "yup";
import { 店舗詳細Context } from "contexts/page/dashboard/shop/店舗詳細Context";

type FormProps = {
amount: string;
@@ -26,8 +26,12 @@ export default function デポジットチャージ_() {
object().shape({
amount: number()
.typeError("数値を入力してください")
.min(1, "1円-10万円まで入力できます")
.max(100000, "1円-10万円まで入力できます"),
.integer("整数で入力してください")
.min(-100000, "-10万円から10万円まで入力できます")
.max(100000, "-10万円から10万円まで入力できます")
.test("0除外", "0は入力できません", function (value) {
return value !== 0;
}),
})
),
});


Loading…
취소
저장