From 2370dbb4f706d8cb1b4e09e4097041d939364aa2 Mon Sep 17 00:00:00 2001
From: geun <1416geun@naver.com>
Date: Thu, 25 Jul 2024 15:18:59 +0900
Subject: [PATCH] =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=ED=97=A4=EB=8D=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/css/custom.css | 2 +-
.../flight/OperationApprovalsTable.js | 82 ++++++-------------
2 files changed, 26 insertions(+), 58 deletions(-)
diff --git a/src/assets/css/custom.css b/src/assets/css/custom.css
index e5ed6989..1162d5eb 100644
--- a/src/assets/css/custom.css
+++ b/src/assets/css/custom.css
@@ -1236,7 +1236,7 @@ caption {overflow: hidden; line-height: 0;text-indent: -2000px;}
.invoice-list-dataTable.flight-approval .ant-table-tbody tr td{padding:4px 4px;vertical-align:middle;line-height:1.3;font-size:0.825rem}
/*new approval table(inner)*/
-.invoice-list-dataTable.flight-approval .ant-table .innerTable .ant-table{background:#f4f4f4;border:3px solid #ddd;margin:-4px -4px;}
+.invoice-list-dataTable.flight-approval .ant-table .innerTable .ant-table{background:#f4f4f4;border:3px solid #ddd;margin:-3px -3px;}
.invoice-list-dataTable.flight-approval .ant-table .innerTable .ant-table tr th,
.invoice-list-dataTable.flight-approval .ant-table .innerTable .ant-table tr td{border-bottom:1px dotted #f0f0f0;line-height:1.3}
diff --git a/src/components/flight/OperationApprovalsTable.js b/src/components/flight/OperationApprovalsTable.js
index 54e15477..bf9dbc02 100644
--- a/src/components/flight/OperationApprovalsTable.js
+++ b/src/components/flight/OperationApprovalsTable.js
@@ -81,23 +81,6 @@ export default function OperationApprovalsTable(props) {
}
}, [laancAprvList]);
- const handlerReviewed = type => {
- let text = '검토대기';
- if (!type) {
- text = '검토대기';
- } else {
- if (type === 'R') {
- text = '검토완료';
- } else if (type === 'W') {
- text = '검토대기';
- } else if (type === 'C') {
- text = '검토취소';
- }
- }
-
- return text;
- };
-
// 데이터
const columns = [
{
@@ -207,22 +190,14 @@ export default function OperationApprovalsTable(props) {
title: (
<>
장애물
- 제한
-
- 표면
-
+ 제한 표면
>
),
dataIndex: 'areaList',
width: '100px',
align: 'center',
render: areaList => {
- return areaList.length <= 1
- ? areaList[0]?.limitZoneNm
- ? areaList[0]?.limitZoneNm
- : '-'
- : '-';
- // return areaList.length <= 1 ? areaList[0].limitZoneNm : '-';
+ return areaList.length <= 1 ? areaList[0].limitZoneNm : '-';
}
},
{
@@ -250,8 +225,7 @@ export default function OperationApprovalsTable(props) {
{
title: (
<>
- 비행
- 반경
+ 비행 반경
(m이내)
>
@@ -266,8 +240,7 @@ export default function OperationApprovalsTable(props) {
{
title: (
<>
- 요청
- 반경
+ 요청 반경
(m이내)
>
@@ -283,8 +256,7 @@ export default function OperationApprovalsTable(props) {
{
title: (
<>
- 허용
- 반경
+ 허용 반경
(m이내)
>
@@ -299,8 +271,7 @@ export default function OperationApprovalsTable(props) {
{
title: (
<>
- 신청
- 고도
+ 신청 고도
(m이하)
>
@@ -316,9 +287,7 @@ export default function OperationApprovalsTable(props) {
{
title: (
<>
- 허용
-
- 고도
+ 허용 고도
(m이하)
>
@@ -334,8 +303,7 @@ export default function OperationApprovalsTable(props) {
{
title: (
<>
- 비행
- 목적
+ 비행 목적
>
),
dataIndex: 'areaList',
@@ -352,8 +320,7 @@ export default function OperationApprovalsTable(props) {
<>
LAANC
- 검토
- 결과
+ 검토 결과
>
),
dataIndex: 'areaList',
@@ -467,9 +434,7 @@ export default function OperationApprovalsTable(props) {
<>
관제과
- 검토
-
- 결과
+ 검토결과
>
),
dataIndex: 'areaList',
@@ -478,11 +443,11 @@ export default function OperationApprovalsTable(props) {
render: areaList => {
const approvalCounts = areaList.reduce(
(counts, item) => {
- if (item.reviewedType === 'R') {
+ if (item.approvalCd === 'R') {
counts.reviewed += 1;
- } else if (item.reviewedType === 'W') {
+ } else if (item.approvalCd === 'W') {
counts.wait += 1;
- } else if (item.reviewedType === 'C') {
+ } else if (item.approvalCd === 'C') {
counts.cancel += 1;
}
return counts;
@@ -500,7 +465,15 @@ export default function OperationApprovalsTable(props) {
{approvalCounts.cancel}건
>
) : (
- <>{handlerReviewed(areaList[0].reviewedType)}>
+ <>
+ {areaList[0].reviewed === 'R'
+ ? '검토완료'
+ : areaList[0].wait === 'W'
+ ? '검토대기'
+ : areaList[0].cancel === 'C'
+ ? '검토취소'
+ : '검토취소'}
+ >
)}
>
);
@@ -515,9 +488,7 @@ export default function OperationApprovalsTable(props) {
areaList.length <= 1 ? (
) : (
@@ -737,9 +708,7 @@ export default function OperationApprovalsTable(props) {
render: (_, record) => (
)
@@ -773,8 +742,7 @@ export default function OperationApprovalsTable(props) {
planSno: item.planSno,
addr1: item.addr1,
addr2: item.addr2,
- addr3: item.addr3,
- limitZoneNm: item?.limitZoneNm ? item.limitZoneNm : '-'
+ addr3: item.addr3
});
});