Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
a4f21958
Commit
a4f21958
authored
Oct 25, 2022
by
NGO THI HONG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement pickup js
parent
2488c6d9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
234 additions
and
102 deletions
+234
-102
abvw/common/json/lang/lang-en.json
+5
-1
abvw/common/json/lang/lang-ja.json
+5
-1
abvw/common/json/lang/lang-ko.json
+5
-1
abvw/html/pickup.html
+33
-32
abvw/js/pickup/pickup.js
+144
-67
abvw/js/template/template.js
+42
-0
No files found.
abvw/common/json/lang/lang-en.json
View file @
a4f21958
...
...
@@ -53,6 +53,9 @@
"distanceSupportTitle"
:
"DistanceSupport"
,
"chatTitle"
:
"Chat"
,
"makeDashboardAsHome"
:
"Make dashboard your home screen"
,
"btnKeep"
:
"Keep"
"btnKeep"
:
"Keep"
,
"addNew"
:
"Add New"
,
"display"
:
" display"
,
"displayPattern"
:
"Display Pattern"
}
\ No newline at end of file
abvw/common/json/lang/lang-ja.json
View file @
a4f21958
...
...
@@ -53,5 +53,8 @@
"distanceSupportTitle"
:
"遠隔支援"
,
"chatTitle"
:
"チャット"
,
"makeDashboardAsHome"
:
"ダッシュボードをホーム画面にする"
,
"btnKeep"
:
"保存"
"btnKeep"
:
"保存"
,
"addNew"
:
"新規追加"
,
"display"
:
" 件表示"
,
"displayPattern"
:
"件表示パターン"
}
\ No newline at end of file
abvw/common/json/lang/lang-ko.json
View file @
a4f21958
...
...
@@ -53,5 +53,8 @@
"distanceSupportTitle"
:
"DistanceSupport"
,
"chatTitle"
:
"Chat"
,
"makeDashboardAsHome"
:
"Make dashboard your home screen"
,
"btnKeep"
:
"Keep"
"btnKeep"
:
"Keep"
,
"addNew"
:
"Add New"
,
"display"
:
" display"
,
"displayPattern"
:
"Display Pattern"
}
\ No newline at end of file
abvw/html/pickup.html
View file @
a4f21958
...
...
@@ -15,60 +15,68 @@
<!-- vender css -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/newdash/fontawesome_relative_path.css"
>
<script
type=
"text/javascript"
src=
"/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"/abvw/common/js/web/i18n.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/newdash/app.js"
></script>
<script
type=
"text/javascript"
src=
"../common/js/newdash/common.js"
></script>
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<!-- main js -->
<script
type=
"text/javascript"
src=
"../js/dashboardSetting/dashboard-setting.js"
></script>
<script
type=
"text/javascript"
src=
"../js/dashboard/dashboard.js"
></script>
<script
type=
"text/javascript"
src=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/pickup/pickup.js"
></script>
</head>
<body
onload=
"PICKUP.init();"
>
<!-- header -->
<
?php include('common/header.html');?
>
<
!-- <?php include('common/header.html');?> --
>
<div
id=
"includedHeader"
></div>
<!-- pickup -->
<main>
<div
class=
"container"
>
<!-- breadcrumb -->
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb px-0 mb-0"
>
<li
class=
"breadcrumb-item"
><a
href=
"dashboard.html"
class=
"text-decoration-none text-underline
"
>
ダッシュボード
</a></li>
<li
class=
"breadcrumb-item active
"
aria-current=
"page"
><span>
ピックアップ
</span></li>
<li
class=
"breadcrumb-item"
><a
href=
"dashboard.html"
class=
"text-decoration-none text-underline
lang"
lang=
"dashboard"
>
</a></li>
<li
class=
"breadcrumb-item active
lang"
lang=
"pickup"
aria-current=
"page"
><span>
</span></li>
</ol>
</nav>
<!-- title -->
<h1
class=
"fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0
"
>
ピックアップ
</h1>
<h1
class=
"fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0
lang"
lang=
"pickup"
>
</h1>
<!-- tab -->
<ul
class=
"nav nav-tabs line"
id=
"myTab"
role=
"tablist"
>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
id=
"liTabNewReport"
>
<a
class=
"nav-link active"
data-toggle=
"tab"
href=
"#tab1"
role=
"tab"
aria-controls=
"tab1"
aria-expanded=
"true"
>
<div
class=
"text-center
"
>
新規追加
</div>
<div
class=
"text-center
lang"
lang=
"addNew"
>
</div>
</a>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
id=
"liTabContinousWork"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab2"
role=
"tab"
aria-controls=
"tab2"
>
<div
class=
"text-center
"
>
工程作業
</div>
<div
class=
"text-center
lang"
lang=
"processWorkTitle"
>
</div>
</a>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
id=
"liTabReportWithWarning"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab3"
role=
"tab"
aria-controls=
"tab3"
>
<div
class=
"text-center
"
>
警告を含む報告
</div>
<div
class=
"text-center
lang"
lang=
"reportWarningTitle"
>
</div>
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab4"
role=
"tab"
aria-controls=
"tab4"
>
<div
class=
"text-center"
>
0件表示パターン
</div>
</a>
</li>
</ul>
<!-- tab content-->
<!-- new -->
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane fade show active"
id=
"tab1"
role=
"tabpanel"
aria-labelledby=
"1-tab"
>
<!-- view menu -->
<nav
aria-label=
"view"
class=
"view-menu mt-2"
>
<nav
aria-label=
"view"
class=
"view-menu mt-2"
id=
"viewMenuNewReport"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-9"
>
20
<span>
件表示
</span
></div>
<div
class=
"fs-9"
id=
"count-NewReport"
></div>
<div
class=
"view"
>
<a
href=
"#"
class=
"text-decoration-none view-btn view-list-btn"
>
<img
src=
"../common/img/icon_view_list.svg"
alt=
"リスト表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"リスト表示"
>
...
...
@@ -80,17 +88,8 @@
</div>
</nav>
<!-- task list -->
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"d-block px-3 py-3 text-decoration-none text-dark"
>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"d-block px-3 py-3 text-decoration-none text-dark"
>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。
</div>
</a>
</li>
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
id=
"newReport-list"
>
</ul>
</div>
<!-- proccess -->
...
...
@@ -261,11 +260,12 @@
</main>
<!-- confirm -->
<?php include('common/confirm-modal.html');?>
<!-- <?php include('common/confirm-modal.html');?> -->
<div
id=
"includedConfirmModal"
></div>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<
!-- <
script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="../common/js/app.js"></script>
<script
type=
"text/javascript"
src=
"../common/js/common.js"
></script>
<script type="text/javascript" src="../common/js/common.js"></script>
-->
</body>
</html>
\ No newline at end of file
abvw/js/pickup/pickup.js
View file @
a4f21958
...
...
@@ -14,56 +14,112 @@ PICKUP.initCommon = function() {
PICKUP
.
countNewReportList
=
0
;
PICKUP
.
countContinousWorkReport
=
0
;
PICKUP
.
countReportWithWarning
=
0
;
PICKUP
.
newReportList
=
{
list_0
:
[]};
PICKUP
.
continousWorkReport
=
{
list_0
:
[]};
PICKUP
.
reportWithWarning
=
{
list_0
:
[]};
}
PICKUP
.
defaultPickupList
=
{
operationList
:[]
}
PICKUP
.
baseApiUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
'pickup/'
;
PICKUP
.
getNewReportListApiUrl
=
PICKUP
.
baseApiUrl
+
'newReportList'
;
PICKUP
.
getContinuousWorkListApiUrl
=
PICKUP
.
baseApiUrl
+
'continuousWorkList'
;
PICKUP
.
getReportWithWarningsListApiUrl
=
PICKUP
.
baseApiUrl
+
'reportWithWarnings'
;
/**
* Call get new report list api get data
*/
PICKUP
.
getNewreportListData
=
function
(
callback
)
{
let
param
=
{
sid
:
COMMON
.
getSid
(),
};
COMMON
.
cmsAjax
(
PICKUP
.
getNewReportListApiUrl
,
param
,
false
,
function
(
json
)
{
if
(
callback
)
{
callback
(
json
);
}
},
function
()
{
console
.
log
(
'DASHBOARD.getNewreportListData error'
);
if
(
callback
)
{
callback
(
PICKUP
.
defaultPickupList
);
}
});
};
/**
* Call get Continuous Work list api get data
* @param {*} callback
*/
PICKUP
.
getContinuousWorkListData
=
function
(
callback
)
{
let
param
=
{
sid
:
COMMON
.
getSid
(),
};
COMMON
.
cmsAjax
(
PICKUP
.
getContinuousWorkListApiUrl
,
param
,
false
,
function
(
json
)
{
if
(
callback
)
{
callback
(
json
);
}
},
function
()
{
console
.
log
(
'DASHBOARD.getContinuousWorkListData error'
);
if
(
callback
)
{
callback
(
PICKUP
.
defaultPickupList
);
}
});
};
/**
* Call get Report With Warnings list api get data
* @param {*} callback
*/
PICKUP
.
getReportWithWarningsListData
=
function
(
callback
)
{
let
param
=
{
sid
:
COMMON
.
getSid
(),
};
COMMON
.
cmsAjax
(
PICKUP
.
getReportWithWarningsListApiUrl
,
param
,
false
,
function
(
json
)
{
if
(
callback
)
{
callback
(
json
);
}
},
function
()
{
console
.
log
(
'DASHBOARD.getReportWithWarningListData error'
);
if
(
callback
)
{
callback
(
PICKUP
.
defaultPickupList
);
}
});
};
/**
* Initialization pickup html
*/
PICKUP
.
init
=
function
()
{
console
.
log
(
"PICKUP.init"
);
CHK
.
initCommon
();
$
(
"#footer"
).
load
(
"main-footer.html"
,
function
()
{
CHK_Footer
.
activeDashboardBottomNav
();
});
if
(
CHK
.
operation
==
null
||
typeof
CHK
.
operation
===
'undefined'
)
{
CHK
.
loadJson
(
CHK
.
jsonPath
.
operationList
,
function
(
json
)
{
CHK
.
operation
=
json
;
PICKUP
.
initOperationList
(
CHK
.
operation
.
operationList
);
});
PICKUP
.
settingPickup
();
PICKUP
.
initSettingActivePickup
();
return
;
}
PICKUP
.
initOperationList
(
CHK
.
operation
.
operationList
);
TEMPLATE
.
loadHearder
();
TEMPLATE
.
loadConfirmModal
();
PICKUP
.
settingPickup
();
PICKUP
.
initSettingActivePickup
();
}
PICKUP
.
initOperationList
=
function
(
operationList
)
{
PICKUP
.
createNewReportList
(
operationList
);
PICKUP
.
createContinousWorkList
(
operationList
);
PICKUP
.
createReportWithWarning
(
operationList
);
PICKUP
.
setCountElementInPickup
();
}
/**
* Setting pickup data
*/
PICKUP
.
settingPickup
=
function
()
{
CHK
.
loadDashboardSetting
(
function
()
{
if
(
!
CHK
.
dashboardSetting
.
newReport
)
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
if
(
!
settings
.
newReport
)
{
$
(
"#liTabNewReport"
).
addClass
(
'd-none'
);
}
else
{
$
(
"#liTabNewReport"
).
css
(
"display"
,
"none"
);
$
(
"#liTabNewReport"
).
removeClass
(
'd-none'
);
PICKUP
.
initNewReportTab
();
}
if
(
!
CHK
.
dashboardSetting
.
continousWork
)
if
(
!
settings
.
continousWork
)
{
$
(
"#liTabContinousWork"
).
css
(
"display"
,
"none"
);
$
(
"#liTabContinousWork"
).
addClass
(
'd-none'
);
}
if
(
!
CHK
.
dashboardSetting
.
reportWarning
)
else
{
$
(
"#liTabReportWithWarning"
).
css
(
"display"
,
"none"
);
$
(
"#liTabContinousWork"
).
removeClass
(
'd-none'
);
}
if
(
!
settings
.
reportWarning
)
{
$
(
"#liTabReportWithWarning"
).
addClass
(
'd-none'
);
}
else
{
$
(
"#liTabReportWithWarning"
).
removeClass
(
'd-none'
);
}
});
}
...
...
@@ -107,24 +163,45 @@ PICKUP.settingActivePickup = function(pickupActive) {
PICKUP
.
changeActivePickup
=
function
(
liPickupTab
)
{
PICKUP
.
settingActivePickup
(
$
(
liPickupTab
).
attr
(
"data-active"
));
}
PICKUP
.
goBack
=
function
()
{
history
.
back
();
}
/**
* Initialization show not found pickup item html
* @param {*} elementId
*/
PICKUP
.
showNotFoundPickupItem
=
function
(
elementId
)
{
$
(
elementId
).
removeClass
();
$
(
elementId
).
addClass
(
'p-0 mt-3 card-list'
);
let
li
=
$
(
"<li class='card mb-2 not-found'></li>"
);
let
div
=
$
(
"<div class='text-dark mb-1 px-3 py-5 text-center m-auto'></div>"
);
let
imgdiv
=
$
(
"<img src=
\"
../common/img/icon_not_found.svg
\"
alt='該当する作業がありません。' class='not-found-img mb-2'>"
);
let
childDiv
=
$
(
"<div class='fs-9 text-secondary font-weight-bold'>該当する作業がありません。</div>"
);
div
.
append
(
imgdiv
);
div
.
append
(
childDiv
);
li
.
append
(
div
);
$
(
elementId
).
append
(
li
);
}
PICKUP
.
setCountElementInPickup
=
function
()
{
console
.
log
(
"setCountElementInPickup"
,
PICKUP
.
countNewReportList
,
PICKUP
.
countContinousWorkReport
,
PICKUP
.
countReportWithWarning
);
if
(
$
(
"#count-NewReport"
))
{
$
(
"#count-NewReport"
)[
0
].
innerHTML
=
PICKUP
.
countNewReportList
;
}
if
(
$
(
"#count-ContinousWork"
))
{
$
(
"#count-ContinousWork"
)[
0
].
innerHTML
=
PICKUP
.
countContinousWorkReport
;
}
if
(
$
(
"#count-ReportWithWarning"
))
{
$
(
"#count-ReportWithWarning"
)[
0
].
innerHTML
=
PICKUP
.
countReportWithWarning
;
}
/**
* Initialization view pickup menu html
* @param {*} elementId
* @param {*} count
*/
PICKUP
.
showCountDisplayPickupItem
=
function
(
elementId
,
count
)
{
let
span
=
$
(
'<span>'
+
I18N
.
i18nText
(
'display'
)
+
'</span>'
);
$
(
elementId
).
append
(
count
);
$
(
elementId
).
append
(
span
);
}
/**
* Initialization new report list html
*/
PICKUP
.
initNewReportTab
=
function
()
{
PICKUP
.
getNewreportListData
(
function
(
json
)
{
PICKUP
.
createNewReportList
(
json
.
operationList
);
});
}
PICKUP
.
sortNewReportList
=
function
(
operationList
)
{
operationList
=
operationList
.
sort
(
function
(
a
,
b
)
{
...
...
@@ -134,22 +211,23 @@ PICKUP.sortNewReportList = function(operationList) {
});
return
operationList
;
}
PICKUP
.
createNewReportList
=
function
(
operationListOld
,
isSearched
=
false
)
{
PICKUP
.
createNewReportList
=
function
(
operationListOld
)
{
var
operationList
=
PICKUP
.
sortNewReportList
(
operationListOld
);
$
(
'#viewMenuNewReport'
).
removeClass
(
'd-none'
);
$
(
"#newReport-list"
).
empty
();
PICKUP
.
countNewReportList
=
0
;
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
$
(
'#notFoundNewReport'
).
removeClass
(
'd-none'
);
PICKUP
.
showNotFoundPickupItem
(
"#newReport-list"
);
$
(
'#viewMenuNewReport'
).
addClass
(
'd-none'
);
return
;
}
$
(
'#n
otFoundNewReport'
).
addClass
(
'd-none
'
);
$
(
'#n
ewReport-list'
).
addClass
(
'task-list view-content view-block
'
);
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
//if(operationList[i].enableAddReport != 1 || ((operationList[i].reportType == CHK.REPORT_TYPE.WORKFLOW || operationList[i].reportType == CHK.REPORT_TYPE.WITHREPLY) && operationList[i].newReportFlg == 0) ) continue;
if
(
!
CHK
.
isNewReport
(
operationList
[
i
]))
continue
;
//TODO aタグlist.html 転移処理operationList[i].reportType == 2 && operationList[i].enableReportEdit == 0
var
messageli
=
$
(
"<li class='
item list-unstyled rounded border mb-2'
name = 'operationId_"
+
operationList
[
i
].
operationId
+
"' ></li>"
);
var
messageli
=
$
(
"<li class='
card mb-2'
name = 'operationId_"
+
operationList
[
i
].
operationId
+
"' ></li>"
);
var
ahrefRequiredFlg
;
if
(
operationList
[
i
].
permitCodeRequiredFlg
==
1
)
{
...
...
@@ -159,11 +237,9 @@ PICKUP.createNewReportList = function(operationListOld, isSearched = false) {
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'NEW_FORM_INPUT' ,'REPORT_LIST',null);
\"
class='d-block px-3 py-3 text-decoration-none text-dark'></a>"
);
}
var
divTitle
=
$
(
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div>"
);
var
iIcon
=
$
(
"<i class='fas fa-chevron-right fs-12'></i>"
);
ahrefRequiredFlg
.
append
(
divTitle
);
ahrefRequiredFlg
.
append
(
iIcon
);
var
divText
=
$
(
"<div class='fs-12 text-truncate'>"
+
operationList
[
i
].
operationName
+
"</div>"
);
ahrefRequiredFlg
.
append
(
divText
);
messageli
.
append
(
ahrefRequiredFlg
);
$
(
"#newReport-list"
).
append
(
messageli
);
...
...
@@ -172,12 +248,13 @@ PICKUP.createNewReportList = function(operationListOld, isSearched = false) {
}
// show not found if
if
(
PICKUP
.
countNewReportList
==
0
)
{
$
(
'#notFoundNewReport'
).
removeClass
(
'd-none'
);
}
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
PICKUP
.
showNotFoundPickupItem
(
"#newReport-list"
);
$
(
'#viewMenuNewReport'
).
addClass
(
'd-none'
);
return
;
}
};
PICKUP
.
showCountDisplayPickupItem
(
"#count-NewReport"
,
PICKUP
.
countNewReportList
)
}
PICKUP
.
sortContinousWorkList
=
function
(
operationList
)
{
var
newOperationList
=
[];
...
...
abvw/js/template/template.js
0 → 100644
View file @
a4f21958
/**
* Header js
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
TEMPLATE
=
{};
/** load common data */
TEMPLATE
.
loadCommon
=
function
()
{
$
(
"#includedHeader"
).
load
(
"../common/header.html"
,
function
()
{
I18N
.
initi18n
();
});
$
(
"#includedDashboardSetting"
).
load
(
"dashboard-setting.html"
,
function
()
{
DashboardSetting
.
init
();
I18N
.
initi18n
();
});
$
(
"#includedConfirmModal"
).
load
(
"../common/confirm-modal.html"
,
function
()
{
I18N
.
initi18n
();
});
}
TEMPLATE
.
loadHearder
=
function
()
{
$
(
"#includedHeader"
).
load
(
"../common/header.html"
,
function
()
{
I18N
.
initi18n
();
});
}
TEMPLATE
.
loadDashboardSetting
=
function
()
{
$
(
"#includedDashboardSetting"
).
load
(
"dashboard-setting.html"
,
function
()
{
DashboardSetting
.
init
();
I18N
.
initi18n
();
});
}
TEMPLATE
.
loadConfirmModal
=
function
()
{
$
(
"#includedConfirmModal"
).
load
(
"../common/confirm-modal.html"
,
function
()
{
I18N
.
initi18n
();
});
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment