결함대장 수정중
This commit is contained in:
@@ -4,6 +4,7 @@ import { useWrStore } from "@/app/store";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import type {
|
||||
} from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
|
||||
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
|
||||
import { InputTableBody } from "@/components/lib/func/TableData";
|
||||
import {
|
||||
Input,
|
||||
@@ -18,11 +19,13 @@ import { useEffect, useState, type Dispatch, type SetStateAction } from "react"
|
||||
export function GuideDetailsTable({
|
||||
chgRes,
|
||||
headList,
|
||||
upheadList,
|
||||
type,
|
||||
setChGuidData,
|
||||
}: {
|
||||
chgRes: any[];
|
||||
headList: TableUpperProps[];
|
||||
upheadList:chHeadType[]
|
||||
type: string;
|
||||
setChGuidData: (chgRes: any[]) => void;
|
||||
}) {
|
||||
@@ -44,7 +47,7 @@ export function GuideDetailsTable({
|
||||
<>
|
||||
<div className={`card !m-[1.2rem] !p-0r `}>
|
||||
<Table variant="secondary">
|
||||
<TableHeader className="font-bold">{headMakeprfmnc(headList, rainChkgdn?.rainHeadNm)}</TableHeader>
|
||||
<TableHeader className="font-bold">{headMakeprfmnc(headList, upheadList)}</TableHeader>
|
||||
<TableBody >
|
||||
{InputTableBody(inputData ?? [],headList, setInputData) }
|
||||
</TableBody>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/TableHead";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import type { rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
|
||||
import { rainPageSize, type rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
|
||||
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import { tableData } from "@/components/lib/func/commom";
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
} from "@common/components/ui";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import UiPageNations from "@common/business_components/ui/table/uiPageNations";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
export default function RainChkgdTable({
|
||||
detailUp,
|
||||
handleClick = () => { },
|
||||
@@ -70,16 +71,12 @@ export default function RainChkgdTable({
|
||||
}, [makeTableData, handleClick]);
|
||||
|
||||
|
||||
useEffect(() =>{
|
||||
|
||||
|
||||
},[rainChkgdn.rainChk])
|
||||
|
||||
useEffect(() => {
|
||||
setSelectedIds([])// 셀렉트 초기화를 위한 작업
|
||||
if (rainChkData) {
|
||||
if (rainChkData&&rainChkData.length>0) {
|
||||
|
||||
const rainChg = rainChkData.map((item: any) => {
|
||||
const rainChg = rainChkData?.map((item: any) => {
|
||||
const bud = tableData([item.building], { code });
|
||||
return {
|
||||
...item,
|
||||
@@ -89,6 +86,8 @@ export default function RainChkgdTable({
|
||||
});
|
||||
|
||||
setMakeTableData(rainChkTableData(rainChg));
|
||||
}else{
|
||||
setMakeTableData([]);
|
||||
}
|
||||
}, [rainChkData, code]);
|
||||
|
||||
@@ -167,7 +166,7 @@ export default function RainChkgdTable({
|
||||
} else {
|
||||
setHeadList({
|
||||
headList: rainChkgdn.rainChkgdnHeadList,
|
||||
upHeadList: rainChkgdn.rainHeadNm
|
||||
upHeadList: rainChkgdn.rainMainHeadNm
|
||||
})
|
||||
|
||||
}
|
||||
@@ -175,9 +174,15 @@ export default function RainChkgdTable({
|
||||
}, [rainChkSttn.isSttn, rainChkgdn.rainChkgdnHeadList, rainChkSttn.rainChkgdnHeadList]);
|
||||
|
||||
|
||||
useEffect(() =>{
|
||||
console.log('rainChkgdn.count ', rainChkgdn.rainChkCount)
|
||||
},[rainChkgdn.rainChkCount])
|
||||
|
||||
return (
|
||||
<>
|
||||
<LoadingOverlay isLoading={rainChkgdn.isLoading}></LoadingOverlay>
|
||||
<Table variant="secondary">
|
||||
|
||||
<TableHeader className="font-bold">
|
||||
{headMakeprfmnc(
|
||||
headList?.headList,
|
||||
@@ -197,9 +202,9 @@ export default function RainChkgdTable({
|
||||
</TableBody>
|
||||
</Table>
|
||||
<UiPageNations
|
||||
total={rainChkData?.length ?? 0}
|
||||
total={rainChkgdn.rainChkCount||20}
|
||||
cur={pageNation}
|
||||
pageSize={20}
|
||||
pageSize={rainPageSize}
|
||||
onPageChange={onPageChange}
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/TableHead";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
|
||||
import type {
|
||||
rswtChkZodType,
|
||||
rswtrChkDetailsZodType,
|
||||
import {
|
||||
rswtPageSize,
|
||||
type rswtChkZodType,
|
||||
type rswtrChkDetailsZodType,
|
||||
} from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import { tableData } from "@/components/lib/func/commom";
|
||||
@@ -15,6 +16,7 @@ import {
|
||||
import { Table, TableBody, TableHeader } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import UiPageNations from "@common/business_components/ui/table/uiPageNations";
|
||||
import LoadingOverlay from "@common/business_components/ui/loadingBar";
|
||||
|
||||
export default function RswtChkgdTable({
|
||||
detaiRswtlUpdate,
|
||||
@@ -72,7 +74,6 @@ export default function RswtChkgdTable({
|
||||
}, [rswtChkgdn.rswtChkPolGuide]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("makeTableData ", makeTableData)
|
||||
getRswtSttnExcel(makeTableData)
|
||||
const selectedData = makeTableData
|
||||
.map((item) => {
|
||||
@@ -133,6 +134,7 @@ export default function RswtChkgdTable({
|
||||
|
||||
return (
|
||||
<>
|
||||
<LoadingOverlay isLoading={rswtChkgdn.isLoading}></LoadingOverlay>
|
||||
<Table variant="secondary">
|
||||
<TableHeader className="font-bold">
|
||||
{headMakeprfmnc(headList?.headList, headList?.upHeadList)}
|
||||
@@ -150,9 +152,9 @@ export default function RswtChkgdTable({
|
||||
</TableBody>
|
||||
</Table>
|
||||
<UiPageNations
|
||||
total={rswtChkData?.length ?? 0}
|
||||
total={rswtChkgdn.rswtChkCount}
|
||||
cur={pageNation}
|
||||
pageSize={20}
|
||||
pageSize={rswtPageSize}
|
||||
onPageChange={onPageChange}
|
||||
/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user