wr: alert 시험
This commit is contained in:
@@ -31,6 +31,7 @@ import moment from "moment";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import toast, { Toaster } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useAlertStore } from "@/src/shared/lib";
|
||||
|
||||
export default function CoSttn() {
|
||||
const {
|
||||
@@ -48,7 +49,7 @@ export default function CoSttn() {
|
||||
getMyUUID
|
||||
} = useWrStore((state) => state);
|
||||
const { regAuthrtYn, mdfcnAuthrtYn } = auth;
|
||||
|
||||
const alert = useAlertStore((state) => state.setMessage);
|
||||
const [bdstTable, setBdstTable] = useState<DemandCompType[]>();
|
||||
const [pageNation, setPageNation] = useState(1);
|
||||
const { coSttnRes, coSttnResCount } = coSttn;
|
||||
@@ -98,7 +99,7 @@ export default function CoSttn() {
|
||||
|
||||
useEffect(() => {
|
||||
if (!coSttn.isInit) {
|
||||
coSttnInit("1", "13", "0");
|
||||
coSttnInit("1", "13", "0"); // 수요처 목록 조회
|
||||
}
|
||||
}, [coSttn.isInit, coSttnInit]);
|
||||
|
||||
@@ -274,8 +275,8 @@ export default function CoSttn() {
|
||||
headName={[]}
|
||||
tableData={bdstTable || []}
|
||||
headlist={coSttn.coSttHeadList}
|
||||
pageSize={20}
|
||||
total={coSttnResCount + 10 || 0}
|
||||
pageSize={13}
|
||||
total={coSttnResCount || 0}
|
||||
cellClick={ async(index: number | undefined) => {
|
||||
const uuid = await getMyUUID();
|
||||
const updateData = coSttnRes[index as number];
|
||||
@@ -332,7 +333,7 @@ export default function CoSttn() {
|
||||
`/reuseFc/request/${data.dmdInfoId}`
|
||||
);
|
||||
if (dmd) {
|
||||
toast.error(
|
||||
alert(
|
||||
`사업자번호 ${dmd.dmdInfoId}는 이미 등록되었습니다. 다시등록해주세요`
|
||||
);
|
||||
return;
|
||||
|
||||
@@ -46,6 +46,7 @@ export const coSttnActionsExport: (set: any) => coSttnActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
// 수요처 목록 조회
|
||||
coSttnInit: async (pageNo: string, pageCnt: string, con: string) => {
|
||||
try {
|
||||
|
||||
|
||||
@@ -21,10 +21,12 @@ function AlertDialog() {
|
||||
{message}
|
||||
</p>
|
||||
</div>
|
||||
<DialogFooter className="!justify-center">
|
||||
<DialogClose asChild>
|
||||
<Button>확인</Button>
|
||||
</DialogClose>
|
||||
<DialogFooter>
|
||||
<div className="flex w-full justify-center">
|
||||
<DialogClose asChild>
|
||||
<Button>확인</Button>
|
||||
</DialogClose>
|
||||
</div>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
@@ -28,13 +28,9 @@
|
||||
"@/*": ["./*"],
|
||||
"@common/components/*": ["../../packages/common/components/src/*"],
|
||||
"@common/components": ["../../packages/common/components/src/index"],
|
||||
"@common/business_components/*": [
|
||||
"../../packages/common/business_components/src/*"
|
||||
],
|
||||
"@common/business_components": [
|
||||
"../../packages/common/business_components/src/index"
|
||||
],
|
||||
"@common/network": ["../../packages/common/network"]
|
||||
"@common/business_components/*": ["../../packages/common/business_components/src/*"],
|
||||
"@common/business_components": ["../../packages/common/business_components/src/index"],
|
||||
"@common/network": ["../../packages/common/network"],
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
|
||||
Reference in New Issue
Block a user