Compare commits

...

2 Commits

  1. 2
      src/assets/css/custom.css
  2. 82
      src/components/flight/OperationApprovalsTable.js

2
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} .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)*/ /*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 th,
.invoice-list-dataTable.flight-approval .ant-table .innerTable .ant-table tr td{border-bottom:1px dotted #f0f0f0;line-height:1.3} .invoice-list-dataTable.flight-approval .ant-table .innerTable .ant-table tr td{border-bottom:1px dotted #f0f0f0;line-height:1.3}

82
src/components/flight/OperationApprovalsTable.js

@ -81,23 +81,6 @@ export default function OperationApprovalsTable(props) {
} }
}, [laancAprvList]); }, [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 = [ const columns = [
{ {
@ -207,22 +190,14 @@ export default function OperationApprovalsTable(props) {
title: ( title: (
<> <>
장애물 <br /> 장애물 <br />
제한 제한 표면
<br />
표면
<br />
</> </>
), ),
dataIndex: 'areaList', dataIndex: 'areaList',
width: '100px', width: '100px',
align: 'center', align: 'center',
render: areaList => { render: areaList => {
return areaList.length <= 1 return areaList.length <= 1 ? areaList[0].limitZoneNm : '-';
? areaList[0]?.limitZoneNm
? areaList[0]?.limitZoneNm
: '-'
: '-';
// return areaList.length <= 1 ? areaList[0].limitZoneNm : '-';
} }
}, },
{ {
@ -250,8 +225,7 @@ export default function OperationApprovalsTable(props) {
{ {
title: ( title: (
<> <>
비행 <br /> 비행 반경
반경
<br /> <br />
(m이내) (m이내)
</> </>
@ -266,8 +240,7 @@ export default function OperationApprovalsTable(props) {
{ {
title: ( title: (
<> <>
요청 <br /> 요청 반경
반경
<br /> <br />
(m이내) (m이내)
</> </>
@ -283,8 +256,7 @@ export default function OperationApprovalsTable(props) {
{ {
title: ( title: (
<> <>
허용 <br /> 허용 반경
반경
<br /> <br />
(m이내) (m이내)
</> </>
@ -299,8 +271,7 @@ export default function OperationApprovalsTable(props) {
{ {
title: ( title: (
<> <>
신청 <br /> 신청 고도
고도
<br /> <br />
(m이하) (m이하)
</> </>
@ -316,9 +287,7 @@ export default function OperationApprovalsTable(props) {
{ {
title: ( title: (
<> <>
허용 허용 고도
<br />
고도
<br /> <br />
(m이하) (m이하)
</> </>
@ -334,8 +303,7 @@ export default function OperationApprovalsTable(props) {
{ {
title: ( title: (
<> <>
비행 <br /> 비행 목적
목적
</> </>
), ),
dataIndex: 'areaList', dataIndex: 'areaList',
@ -352,8 +320,7 @@ export default function OperationApprovalsTable(props) {
<> <>
LAANC LAANC
<br /> <br />
검토 <br /> 검토 결과
결과
</> </>
), ),
dataIndex: 'areaList', dataIndex: 'areaList',
@ -467,9 +434,7 @@ export default function OperationApprovalsTable(props) {
<> <>
관제과 관제과
<br /> <br />
검토 검토결과
<br />
결과
</> </>
), ),
dataIndex: 'areaList', dataIndex: 'areaList',
@ -478,11 +443,11 @@ export default function OperationApprovalsTable(props) {
render: areaList => { render: areaList => {
const approvalCounts = areaList.reduce( const approvalCounts = areaList.reduce(
(counts, item) => { (counts, item) => {
if (item.reviewedType === 'R') { if (item.approvalCd === 'R') {
counts.reviewed += 1; counts.reviewed += 1;
} else if (item.reviewedType === 'W') { } else if (item.approvalCd === 'W') {
counts.wait += 1; counts.wait += 1;
} else if (item.reviewedType === 'C') { } else if (item.approvalCd === 'C') {
counts.cancel += 1; counts.cancel += 1;
} }
return counts; return counts;
@ -500,7 +465,15 @@ export default function OperationApprovalsTable(props) {
{approvalCounts.cancel} {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 ? ( areaList.length <= 1 ? (
<Button color='flat-dark' onClick={() => handleIsModal(record)}> <Button color='flat-dark' onClick={() => handleIsModal(record)}>
<> <>
상세 상세보기
<br />
보기
</> </>
</Button> </Button>
) : ( ) : (
@ -737,9 +708,7 @@ export default function OperationApprovalsTable(props) {
render: (_, record) => ( render: (_, record) => (
<Button color='flat-dark' onClick={() => handleIsModal(record)}> <Button color='flat-dark' onClick={() => handleIsModal(record)}>
<> <>
상세 상세보기
<br />
보기
</> </>
</Button> </Button>
) )
@ -773,8 +742,7 @@ export default function OperationApprovalsTable(props) {
planSno: item.planSno, planSno: item.planSno,
addr1: item.addr1, addr1: item.addr1,
addr2: item.addr2, addr2: item.addr2,
addr3: item.addr3, addr3: item.addr3
limitZoneNm: item?.limitZoneNm ? item.limitZoneNm : '-'
}); });
}); });

Loading…
Cancel
Save