Browse Source

feat/검색 조건 문구 변경

master
sanguu516 1 month ago
parent
commit
7c1e054e64
  1. 14
      src/components/flight/ControlApprovalsTable.js
  2. 46
      src/components/flight/OperationApprovalsTable.js
  3. 10
      src/configs/constants.ts
  4. 10
      src/containers/flight/ControlApprovalsContainer.js
  5. 6
      src/containers/flight/OperationApprovalsContainer.js

14
src/components/flight/ControlApprovalsTable.js

@ -89,6 +89,7 @@ export default function ControlApprovalsTable(props) {
era: record.era,
rm: record.rm,
reqRadius: record.reqRadius,
reqElev: record.reqElev,
...record
});
setEditingKey(record.key);
@ -114,7 +115,8 @@ export default function ControlApprovalsTable(props) {
dtl: row.dtl || '',
era: row.era || '',
rm: row.rm || '',
reqRadius: row.reqRadius || ''
reqRadius: row.reqRadius || '',
reqElev: row.reqElev || ''
}
])
);
@ -549,7 +551,7 @@ export default function ControlApprovalsTable(props) {
areaList[0].reviewedType === 'R' ? (
'검토완료'
) : areaList[0].reviewedType === 'C' ? (
'검토요청취소'
'요청반려'
) : areaList[0].reviewedType === 'Q' ? (
'검토요청'
) : areaList[0].reviewedType === 'A' ? (
@ -702,6 +704,7 @@ export default function ControlApprovalsTable(props) {
dataIndex: 'reqElev',
align: 'center',
width: '80px',
editable: true,
render: text => {
return text ? text : <>-</>;
}
@ -819,7 +822,7 @@ export default function ControlApprovalsTable(props) {
return text === 'R' ? (
'검토완료'
) : text === 'C' ? (
'검토요청취소'
'요청반려'
) : text === 'Q' ? (
'검토요청'
) : text === 'A' ? (
@ -852,6 +855,7 @@ export default function ControlApprovalsTable(props) {
fltElev: item.fltElev,
rm: item.rm,
era: item.era,
reqElev: item.reqElev,
reqRadius: item.reqRadius,
allowRadius: item.allowRadius,
fltElevMax: item.fltElevMax,
@ -1242,7 +1246,7 @@ export default function ControlApprovalsTable(props) {
const checkCondition =
type === 'R'
? item => item.reviewedType !== 'Q'
: item => item.reviewedType !== 'R';
: item => item.reviewedType !== 'Q';
// 에러 메시지
const errorMessages = {
@ -1297,6 +1301,7 @@ export default function ControlApprovalsTable(props) {
</span>
</div>
<div className='download'>
<Button color='primary' size='sm' onClick={() => handleCheckbox('R')}>
검토 완료
@ -1320,6 +1325,7 @@ export default function ControlApprovalsTable(props) {
</Button>
</div>
</div>
<div className='search-case-list'>
<div>
<ul>

46
src/components/flight/OperationApprovalsTable.js

@ -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: ['검토 요청 실패', '검토결과 대기인 신청건만 요청이 가능합니다.']
};

10
src/configs/constants.ts

@ -239,15 +239,17 @@ export const FlightCategory = {
Control: {
: '전체',
: '검토완료',
: '검토대기',
: '재검토'
: '검토요청',
: '검토재요청',
: '요청반려'
},
Operation: {
: '전체',
: '검토완료',
: '검토대기',
: '재검토',
: '검토불필요'
: '검토재요청',
: '검토불필요',
: '검토요청취소'
}
};

10
src/containers/flight/ControlApprovalsContainer.js

@ -238,12 +238,12 @@ export default function ControlApprovalsContainer({ mode }) {
return 'C';
case '검토완료':
return 'R';
case '검토':
case '검토재요청':
return 'A';
case '검토대기':
return 'W';
case '검토불필요':
return 'U';
case '검토요청':
return 'Q';
case '요청반려':
return 'C';
}
};

6
src/containers/flight/OperationApprovalsContainer.js

@ -280,12 +280,16 @@ export default function OperationApprovalsContainer({ mode }) {
return 'C';
case '검토완료':
return 'R';
case '검토':
case '검토재요청':
return 'A';
case '검토대기':
return 'W';
case '검토불필요':
return 'U';
case '검토요청':
return 'Q';
case '검토요청취소':
return 'C';
}
};
const handlerSearch = (search, searchDate, filterArea) => {

Loading…
Cancel
Save