|
|
|
@ -106,6 +106,8 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
text = '검토대기'; |
|
|
|
|
} else if (type === 'Q') { |
|
|
|
|
text = '검토요청'; |
|
|
|
|
} else if (type === 'A') { |
|
|
|
|
text = '검토재요청'; |
|
|
|
|
} else if (type === 'C') { |
|
|
|
|
text = '검토취소'; |
|
|
|
|
} |
|
|
|
@ -504,12 +506,21 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
counts.request += 1; |
|
|
|
|
} else if (item.reviewedType === 'W') { |
|
|
|
|
counts.wait += 1; |
|
|
|
|
} else if (item.reviewedType === 'A') { |
|
|
|
|
counts.rerequest += 1; |
|
|
|
|
} else if (item.reviewedType === 'C') { |
|
|
|
|
counts.cancel += 1; |
|
|
|
|
} |
|
|
|
|
return counts; |
|
|
|
|
}, |
|
|
|
|
{ reviewed: 0, wait: 0, cancel: 0, unapproved: 0, request: 0 } |
|
|
|
|
{ |
|
|
|
|
reviewed: 0, |
|
|
|
|
wait: 0, |
|
|
|
|
cancel: 0, |
|
|
|
|
unapproved: 0, |
|
|
|
|
request: 0, |
|
|
|
|
rerequest: 0 |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
@ -521,6 +532,9 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
검토요청: |
|
|
|
|
{approvalCounts.request}건 |
|
|
|
|
<br /> |
|
|
|
|
검토재요청: |
|
|
|
|
{approvalCounts.rerequest}건 |
|
|
|
|
<br /> |
|
|
|
|
검토요청취소: |
|
|
|
|
{approvalCounts.cancel}건 |
|
|
|
|
<br /> |
|
|
|
@ -687,6 +701,8 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
dataIndex: 'reqElev', |
|
|
|
|
align: 'center', |
|
|
|
|
width: '80px', |
|
|
|
|
editable: true, |
|
|
|
|
|
|
|
|
|
render: text => { |
|
|
|
|
return text ? text : <>-</>; |
|
|
|
|
} |
|
|
|
@ -775,6 +791,8 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
? '검토요청취소' |
|
|
|
|
: text === 'Q' |
|
|
|
|
? '검토요청' |
|
|
|
|
: text === 'A' |
|
|
|
|
? '검토재요청' |
|
|
|
|
: '검토대기'; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -954,6 +972,7 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
era: record.era, |
|
|
|
|
rm: record.rm, |
|
|
|
|
reqRadius: record.reqRadius, |
|
|
|
|
reqElev: record.reqElev, |
|
|
|
|
...record |
|
|
|
|
}); |
|
|
|
|
setEditingKey(record.key); |
|
|
|
@ -979,7 +998,8 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
dtl: row.dtl || '', |
|
|
|
|
era: row.era || '', |
|
|
|
|
rm: row.rm || '', |
|
|
|
|
reqRadius: row.reqRadius || '' |
|
|
|
|
reqRadius: row.reqRadius || '', |
|
|
|
|
reqElev: row.reqElev || '' |
|
|
|
|
} |
|
|
|
|
]) |
|
|
|
|
); |
|
|
|
@ -1125,7 +1145,11 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
const rowSelection = { |
|
|
|
|
selectedRowKeys: checkList, |
|
|
|
|
getCheckboxProps: record => { |
|
|
|
|
const allChildrenReviewed = record.areaList.every( |
|
|
|
|
child => child.reviewedType === 'R' |
|
|
|
|
); |
|
|
|
|
return { |
|
|
|
|
disabled: allChildrenReviewed, |
|
|
|
|
name: record.key |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -1134,9 +1158,9 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
const key = record.key; |
|
|
|
|
|
|
|
|
|
if (key.startsWith('parent_')) { |
|
|
|
|
const childKeys = record.areaList.map( |
|
|
|
|
child => `child_${record.planSno}_${child.planAreaSno}` |
|
|
|
|
); |
|
|
|
|
const childKeys = record.areaList |
|
|
|
|
.filter(child => child.reviewedType !== 'R') |
|
|
|
|
.map(child => `child_${record.planSno}_${child.planAreaSno}`); |
|
|
|
|
|
|
|
|
|
if (selected) { |
|
|
|
|
newCheckList.push(key, ...childKeys); |
|
|
|
@ -1173,8 +1197,11 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
// 부모 키 업데이트
|
|
|
|
|
laancAprvList.forEach(parent => { |
|
|
|
|
const parentKey = `parent_${parent.planSno}`; |
|
|
|
|
const selectableChildren = parent.areaList.filter( |
|
|
|
|
child => child.reviewedType !== 'R' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
const childKeys = parent.areaList.map( |
|
|
|
|
const childKeys = selectableChildren.map( |
|
|
|
|
child => `child_${parent.planSno}_${child.planAreaSno}` |
|
|
|
|
); |
|
|
|
|
const allSelectableChildrenChecked = childKeys.every(key => |
|
|
|
@ -1184,7 +1211,7 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
newList.includes(key) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (allSelectableChildrenChecked && parent.areaList.length > 0) { |
|
|
|
|
if (allSelectableChildrenChecked && selectableChildren.length > 0) { |
|
|
|
|
if (!newList.includes(parentKey)) { |
|
|
|
|
newList.push(parentKey); |
|
|
|
|
} |
|
|
|
@ -1203,6 +1230,7 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
const childRowSelection = { |
|
|
|
|
selectedRowKeys: checkList.filter(key => key.startsWith('child_')), |
|
|
|
|
getCheckboxProps: record => ({ |
|
|
|
|
disabled: record.reviewedType === 'R', |
|
|
|
|
name: record.key |
|
|
|
|
}), |
|
|
|
|
|
|
|
|
@ -1241,7 +1269,7 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
|
|
|
|
|
// 검토 요청, 재 요청 조건
|
|
|
|
|
const checkCondition = { |
|
|
|
|
A: item => item.reviewedType !== 'R', |
|
|
|
|
A: item => item.reviewedType !== 'R' && item.reviewedType !== 'C', |
|
|
|
|
Q: item => item.reviewedType !== 'W' |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -1249,7 +1277,7 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
const errorMessages = { |
|
|
|
|
A: [ |
|
|
|
|
'재 요청 요청 실패', |
|
|
|
|
'검토결과 완료인 신청건만 재 요청이 가능합니다.' |
|
|
|
|
'검토결과 완료, 검토취소인 신청건만 재 요청이 가능합니다.' |
|
|
|
|
], |
|
|
|
|
Q: ['검토 요청 실패', '검토결과 대기인 신청건만 요청이 가능합니다.'] |
|
|
|
|
}; |
|
|
|
|