Commit 21093928 by Yujin Seo

Merge branch 'feature/1.4.0' of gitlab.agentec.jp:abookCheck/design into feature/1.4.0

parents c32ca408 29f21530
......@@ -2848,19 +2848,39 @@ CHK.createOperationList = function(operationList, isSearched = false) {
}
switch(sortType) {
case CHK_CONSTANT.SORT_TYPE.NAME:
operationList.sort((a, b) => (a.operationName > b.operationName) ? 1 : -1);
operationList.sort(function(a,b) {
if (a.operationName > b.operationName) return 1;
if (a.operationName < b.operationName) return -1;
return 0;
});
break;
case CHK_CONSTANT.SORT_TYPE.START_DATE_DESC:
operationList.sort((a, b) => (setOperationDate(a.operationStartDate) < setOperationDate(b.operationStartDate)) ? 1 : -1);
operationList.sort(function(a,b) {
if (setOperationDate(a.operationStartDate) < setOperationDate(b.operationStartDate)) return 1;
if (setOperationDate(a.operationStartDate) > setOperationDate(b.operationStartDate)) return -1;
return 0;
});
break;
case CHK_CONSTANT.SORT_TYPE.START_DATE_ASC:
operationList.sort((a, b) => (setOperationDate(a.operationStartDate) > setOperationDate(b.operationStartDate)) ? 1 : -1);
operationList.sort(function(a,b) {
if (setOperationDate(a.operationStartDate) > setOperationDate(b.operationStartDate)) return 1;
if (setOperationDate(a.operationStartDate) < setOperationDate(b.operationStartDate)) return -1;
return 0;
});
break;
case CHK_CONSTANT.SORT_TYPE.TYPE:
operationList.sort((a, b) => (a.operationType < b.operationType) ? 1 : -1);
operationList.sort(function(a,b) {
if (a.operationType < b.operationType) return 1;
if (a.operationType > b.operationType) return -1;
return 0;
});
break;
case CHK_CONSTANT.SORT_TYPE.LAST_EDIT_DATE:
operationList.sort((a, b) => (a.lastEditDate < b.lastEditDate) ? 1 : -1);
operationList.sort(function(a,b) {
if (a.lastEditDate < b.lastEditDate) return 1;
if (a.lastEditDate > b.lastEditDate) return -1;
return 0;
});
break;
}
}
......@@ -2922,10 +2942,10 @@ CHK.search = function() {
result = result * operation.operationName.includes(searchKeyword);
}
if (searchStartDate.length) {
result = result * (operation.operationEndDate >= searchStartDate);
result = result * (operation.operationStartDate >= searchStartDate);
}
if (searchEndDate.length) {
result = result * (operation.operationStartDate <= searchEndDate);
result = result * (operation.operationEndDate <= searchEndDate);
}
if (operationGroupMasterId != 0) {
var operationGroupMasterIdList = CHK.operationGroupMasterRelation.operationGroupMasterRelationList.filter(function(operationGroupMasterRelation) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment