wr: message alert
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user