Commit e36f1266 by Lee Munkyeong

カテゴリーオプション化

parent 0dcc98c4
......@@ -10250,7 +10250,8 @@ input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-
.navbar {
position: relative;
padding: .5rem 1rem
padding: .5rem 1rem;
height: 50px;
}
.navbar,.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl {
......
......@@ -20,7 +20,7 @@
<body onload="CHK_L.init();" style="position: relative; margin-top: 53px;">
<header style="position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;">
<nav class="navbar navbar-dark bg-primary">
<a class="navbar-brand category-btn lht-0" href="javascript:CHK.setCategoryHeight();">
<a class="navbar-brand category-btn lht-0 d-none" id="operationGroupMasterButton" href="javascript:CHK.setCategoryHeight();">
<i class="fa fa-folder fs-12 p-1" id="category-toggle-button"></i>
<span class="d-none d-md-inline fs-10">カテゴリー</span>
</a>
......
......@@ -288,6 +288,7 @@ CHK.initCommon = function() {
CHK.isAndroid = urlParam.app && urlParam.app == "android";
CHK.isIOS = urlParam.app && urlParam.app == "ios";
CHK.isRFIDBarcodeScan = urlParam.isRFIDBarcodeScan && urlParam.isRFIDBarcodeScan == "1";
CHK.isOperationGroupMaster = urlParam.isOperationGroupMaster && urlParam.isOperationGroupMaster == "1";
CHK.sortIndex = urlParam.sortIndex;
// ウェブの場合、作業一覧の表示広さを変更
if (CHK.isWeb) {
......@@ -302,6 +303,9 @@ CHK.initCommon = function() {
if (CHK.isIOS && CHK.isRFIDBarcodeScan) {
$("#rfidScanButton").removeClass("d-none");
}
if (CHK.isOperationGroupMaster) {
$("#operationGroupMasterButton").removeClass("d-none");
}
CHK.debug = urlParam.debug;
CHK.isMobile = urlParam.mobile_flg && urlParam.mobile_flg == "1";
......@@ -2860,10 +2864,41 @@ CHK.changeSortType = function(sortType) {
* 作業一覧描画
*/
CHK.createOperationList = function(operationList, isSearched = false) {
var searchKeyword = $("#searchTaskName").val();
var searchStartDate = $("#searchStartDate").val();
var searchEndDate = $("#searchEndDate").val();
var operationGroupMasterId = CHK.operationGroupMasterId;
$('#operationTable').empty();
if (isSearched) {
operationList = CHK.operation.searchOperationList;
}
operationList = operationList.filter(function(operation) {
var result = true;
if (searchKeyword.length) {
result = result * operation.operationName.includes(searchKeyword);
}
if (searchStartDate.length && !searchEndDate.length) {
result = result * (operation.operationStartDate >= searchStartDate);
}
if (searchEndDate.length && !searchStartDate.length) {
result = result * (operation.operationEndDate <= searchEndDate);
}
if (searchStartDate.length && searchEndDate.length) {
result = result * ((operation.operationStartDate <= searchEndDate) && (operation.operationEndDate >= searchStartDate));
}
if (operationGroupMasterId != 0) {
var operationGroupMasterIdList = CHK.operationGroupMasterRelation.operationGroupMasterRelationList.filter(function(operationGroupMasterRelation) {
return operationGroupMasterRelation.operationId == operation.operationId;
})
result = result * operationGroupMasterIdList.filter(function(operationGroupMaster){
return operationGroupMaster.operationGroupMasterId == operationGroupMasterId;
}).length;
}
return result;
})
if (operationList.length > 1) {
var sortType = $(".sort-type.active").data("sort");
if (isSearched) {
......
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