wr: message alert

This commit is contained in:
2026-03-18 13:20:32 +09:00
parent c57c7ce1f7
commit 3d11a8be21
7 changed files with 51 additions and 38 deletions
@@ -39,8 +39,9 @@ import type { DemandCompType } from "@common/business_components/ui/sdmInsertFor
import RuseMngTableForm from "@/components/ui/table/pbnstReg/ruseMngTableForm/ruseMngTableForm";
import type { SelectDataType } from "@common/business_components";
import { BuseWaterQulity } from "./buseWaterQulity/buseWaterQulity";
import toast from "react-hot-toast";
// import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { useAlertStore } from "@/src/shared/lib";
//import { useTranslation } from "react-i18next";
@@ -74,6 +75,7 @@ export function PbnstBuseForm({
readonly?: boolean;
}) {
const { t } = useTranslation("base");
const alert = useAlertStore((state) => state.setMessage);
const {
code,
@@ -193,7 +195,7 @@ export function PbnstBuseForm({
fcDemands: [],
});
await appendBiz(newItem);
toast.success(t('insertRuseBiz',{cycle: pbnstBizCycle + 1}))
alert(t('insertRuseBiz',{cycle: pbnstBizCycle + 1}))
setIndexBiz(pbnstBizCycle);
}, [form, indexMng, indexBiz, appendBiz, setIndexBiz]);
@@ -779,8 +781,9 @@ export function PbnstBuseForm({
rtnValue={(searchText: string, pageCnt: number) => {
getDemandCompList(searchText, pageCnt);
}}
rtnInputData={(data) => {
regDemandCompany(data as DemandCompType);
rtnInputData={async (data) => {
const message = await regDemandCompany(data as DemandCompType);
alert(message);
setIsDmdModal({
isMoal: false,
data: data as DemandCompType,