재이용실적 등록, 지도점검 등록 권한 설정 추가
This commit is contained in:
@@ -8,7 +8,7 @@ import { Button } from "@common/components/ui";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import type { z } from "zod";
|
||||
|
||||
export default function ChkgdModal({ type, obj, setIsModal }: { type: string; obj: any, setIsModal: (open: boolean) => void }) {
|
||||
export default function ChkgdModal({ type, obj, setIsModal, readonly }: { type: string; obj: any, setIsModal: (open: boolean) => void, readonly: boolean }) {
|
||||
const {
|
||||
rainChkgdn,
|
||||
rswtChkgdn,
|
||||
@@ -247,7 +247,7 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
|
||||
}
|
||||
></Title>
|
||||
{!rainChkSttn.isSttn ? (
|
||||
<Button className="mt-8 mr-7" onClick={allDataUpdate}>
|
||||
<Button className="mt-8 mr-7" onClick={allDataUpdate} disabled={!readonly}>
|
||||
저장
|
||||
</Button>
|
||||
) : (
|
||||
@@ -274,6 +274,7 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
|
||||
setChGuidData={(data) => {
|
||||
setChGuidData(data);
|
||||
}}
|
||||
readonly={readonly}
|
||||
/>
|
||||
<div className="card-header">
|
||||
<h3 className="text-2xl font-medium text-label">
|
||||
@@ -288,6 +289,7 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
|
||||
setChGuidData={(data) => {
|
||||
setChGuidData(data);
|
||||
}}
|
||||
readonly={readonly}
|
||||
/>
|
||||
|
||||
{type !== "RNB" && polutionData !== undefined ? (
|
||||
@@ -310,6 +312,7 @@ export default function ChkgdModal({ type, obj, setIsModal }: { type: string; ob
|
||||
setChGuidData={(data) => {
|
||||
getPolutionData(data);
|
||||
}}
|
||||
readonly={readonly}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
@@ -17,12 +17,14 @@ export function GuideDetailsTable({
|
||||
headList,
|
||||
upheadList,
|
||||
setChGuidData,
|
||||
readonly
|
||||
}: {
|
||||
chgRes: any[];
|
||||
headList: TableUpperProps[];
|
||||
upheadList: chHeadType[];
|
||||
type: string;
|
||||
setChGuidData: (chgRes: any[]) => void;
|
||||
readonly?: boolean;
|
||||
}) {
|
||||
const [inputData, setInputData] = useState<any[]>();
|
||||
|
||||
@@ -30,7 +32,6 @@ export function GuideDetailsTable({
|
||||
setInputData(chgRes);
|
||||
}, [chgRes]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setChGuidData(inputData ?? []);
|
||||
|
||||
@@ -43,7 +44,7 @@ export function GuideDetailsTable({
|
||||
<Table variant="secondary">
|
||||
<TableHeader className="font-bold">{headMakeprfmnc(headList, upheadList)}</TableHeader>
|
||||
<TableBody >
|
||||
{InputTableBody(inputData ?? [], headList, setInputData)}
|
||||
{InputTableBody(inputData ?? [], headList, setInputData, readonly)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,7 @@ export default function RainChkgdTable({
|
||||
pageNation,
|
||||
onPageChange,
|
||||
pageCount,
|
||||
readonly,
|
||||
}: {
|
||||
detailUp: (data: rainChkZodType[]) => void;
|
||||
handleClick?: (data: any) => void;
|
||||
@@ -33,6 +34,7 @@ export default function RainChkgdTable({
|
||||
pageNation: number;
|
||||
onPageChange: (page: number) => void;
|
||||
pageCount: number;
|
||||
readonly: boolean;
|
||||
}) {
|
||||
const { code, rainChkgdn, rainChkSttn, getRainSttnExcel } = useWrStore((state) => state);
|
||||
const [makeTableData, setMakeTableData] = useState<any[]>([]);
|
||||
@@ -191,7 +193,8 @@ export default function RainChkgdTable({
|
||||
handleChange,
|
||||
toggleSelection,
|
||||
selectedIds,
|
||||
handleCellClick
|
||||
handleCellClick,
|
||||
readonly
|
||||
)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
|
||||
Reference in New Issue
Block a user