Browse Source

feat/검토 불필요 Flag 추가

master
sanguu516 2 months ago
parent
commit
a378494a7b
  1. 41
      src/components/flight/ControlApprovalsTable.js
  2. 23
      src/components/flight/OperationApprovalsTable.js

41
src/components/flight/ControlApprovalsTable.js

@ -255,7 +255,8 @@ export default function ControlApprovalsTable(props) {
{ {
title: ( title: (
<> <>
중심 좌표<br /> 중심 좌표
<br />
(위도, 경도) (위도, 경도)
</> </>
), ),
@ -352,11 +353,7 @@ export default function ControlApprovalsTable(props) {
} }
}, },
{ {
title: ( title: <>세부 사항</>,
<>
세부 사항
</>
),
dataIndex: 'dtl', dataIndex: 'dtl',
align: 'center', align: 'center',
editable: true, editable: true,
@ -366,11 +363,7 @@ export default function ControlApprovalsTable(props) {
} }
}, },
{ {
title: ( title: <>비행 목적</>,
<>
비행 목적
</>
),
dataIndex: 'areaList', dataIndex: 'areaList',
align: 'center', align: 'center',
width: '110px', width: '110px',
@ -407,11 +400,7 @@ export default function ControlApprovalsTable(props) {
} }
}, },
{ {
title: ( title: <>검토 결과</>,
<>
검토 결과
</>
),
dataIndex: 'areaList', dataIndex: 'areaList',
align: 'center', align: 'center',
width: '140px', width: '140px',
@ -533,12 +522,14 @@ export default function ControlApprovalsTable(props) {
width: '130px', width: '130px',
render: (areaList, record) => render: (areaList, record) =>
areaList.length <= 1 ? ( areaList.length <= 1 ? (
areaList[0].reviewedType === 'R' ? ( areaList[0].reviewedType === 'U' ? (
'검토불필요'
) : areaList[0].reviewedType === 'R' ? (
'검토완료' '검토완료'
) : areaList[0].reviewedType === 'W' ? ( ) : areaList[0].reviewedType === 'C' ? (
'검토대기'
) : (
'검토취소' '검토취소'
) : (
'검토대기'
) )
) : ( ) : (
<>-</> <>-</>
@ -776,11 +767,13 @@ export default function ControlApprovalsTable(props) {
align: 'center', align: 'center',
width: '130px', width: '130px',
render: text => { render: text => {
return text === 'R' return text === 'U'
? '검토불필요'
: text === 'R'
? '검토완료' ? '검토완료'
: text === 'W' : text === 'C'
? '검토대기' ? '검토취소'
: '검토취소'; : '검토대기';
} }
} }
]; ];

23
src/components/flight/OperationApprovalsTable.js

@ -83,7 +83,9 @@ export default function OperationApprovalsTable(props) {
const handlerReviewed = type => { const handlerReviewed = type => {
let text = '검토대기'; let text = '검토대기';
if (!type) { if (type === 'U') {
text = '검토불필요';
} else if (!type) {
text = '검토대기'; text = '검토대기';
} else { } else {
if (type === 'R') { if (type === 'R') {
@ -464,7 +466,9 @@ 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.reviewedType === 'U') {
counts.unapproved += 1;
} else if (item.reviewedType === 'R') {
counts.reviewed += 1; counts.reviewed += 1;
} else if (item.reviewedType === 'W') { } else if (item.reviewedType === 'W') {
counts.wait += 1; counts.wait += 1;
@ -473,7 +477,7 @@ export default function OperationApprovalsTable(props) {
} }
return counts; return counts;
}, },
{ reviewed: 0, wait: 0, cancel: 0 } { reviewed: 0, wait: 0, cancel: 0, unapproved: 0 }
); );
return ( return (
@ -484,6 +488,9 @@ export default function OperationApprovalsTable(props) {
검토대기:{approvalCounts.wait} <br /> 검토대기:{approvalCounts.wait} <br />
검토취소: 검토취소:
{approvalCounts.cancel} {approvalCounts.cancel}
<br />
검토불필요:
{approvalCounts.unapproved}
</> </>
) : ( ) : (
<>{handlerReviewed(areaList[0].reviewedType)}</> <>{handlerReviewed(areaList[0].reviewedType)}</>
@ -704,11 +711,13 @@ export default function OperationApprovalsTable(props) {
align: 'center', align: 'center',
width: '130px', width: '130px',
render: text => { render: text => {
return text === 'R' return text === 'U'
? '검토불필요'
: text === 'R'
? '검토완료' ? '검토완료'
: text === 'W' : text === 'C'
? '검토대기' ? '검토취소'
: '검토취소'; : '검토대기';
} }
}, },
{ {

Loading…
Cancel
Save