|
|
|
@ -81,6 +81,23 @@ 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 = [ |
|
|
|
|
{ |
|
|
|
@ -461,11 +478,11 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
render: areaList => { |
|
|
|
|
const approvalCounts = areaList.reduce( |
|
|
|
|
(counts, item) => { |
|
|
|
|
if (item.approvalCd === 'R') { |
|
|
|
|
if (item.reviewedType === 'R') { |
|
|
|
|
counts.reviewed += 1; |
|
|
|
|
} else if (item.approvalCd === 'W') { |
|
|
|
|
} else if (item.reviewedType === 'W') { |
|
|
|
|
counts.wait += 1; |
|
|
|
|
} else if (item.approvalCd === 'C') { |
|
|
|
|
} else if (item.reviewedType === 'C') { |
|
|
|
|
counts.cancel += 1; |
|
|
|
|
} |
|
|
|
|
return counts; |
|
|
|
@ -483,15 +500,7 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
{approvalCounts.cancel}건 |
|
|
|
|
</> |
|
|
|
|
) : ( |
|
|
|
|
<> |
|
|
|
|
{areaList[0].reviewed === 'R' |
|
|
|
|
? '검토완료' |
|
|
|
|
: areaList[0].wait === 'W' |
|
|
|
|
? '검토대기' |
|
|
|
|
: areaList[0].cancel === 'C' |
|
|
|
|
? '검토취소' |
|
|
|
|
: '검토취소'} |
|
|
|
|
</> |
|
|
|
|
<>{handlerReviewed(areaList[0].reviewedType)}</> |
|
|
|
|
)} |
|
|
|
|
</> |
|
|
|
|
); |
|
|
|
|