Commit 1d2aefce by Takumi Imai

課題65 定期点検の遷移

parent 6d01bc08
...@@ -36,81 +36,42 @@ RF.loadCommon = function () { ...@@ -36,81 +36,42 @@ RF.loadCommon = function () {
* create breadcrumb menu on ReportForm * create breadcrumb menu on ReportForm
*/ */
RF.initBreadcrumb = function () { RF.initBreadcrumb = function () {
let navs = [];
const reportFormBread = { titleLang: CONSTANT.PAGE_NAME.REPORT_FORM };
const reportListBread = {
titleLang: CONSTANT.PAGE_NAME.REPORT_LIST,
href: CONSTANT.URL_TREE_NAME.REPORT_LIST,
};
if (sessionStorage.activeHomePage == CONSTANT.PAGE_TAB.DASHBOARD) { if (sessionStorage.activeHomePage == CONSTANT.PAGE_TAB.DASHBOARD) {
const dashBordBread = {
titleLang: CONSTANT.PAGE_NAME.DASHBOARD,
href: CONSTANT.URL_TREE_NAME.DASHBOARD,
};
let pickupBread = { titleLang: CONSTANT.PAGE_NAME.PICKUP };
if (sessionStorage.getItem('pickUpType') == CONSTANT.PICK_UP_TYPE.CONTINOUS_WORK) { if (sessionStorage.getItem('pickUpType') == CONSTANT.PICK_UP_TYPE.CONTINOUS_WORK) {
navs = [ pickupBread.href = CONSTANT.URL_TREE_NAME.PICKUP_CONTINUOS;
{ navs = [dashBordBread, pickupBread, reportFormBread];
titleLang: CONSTANT.PAGE_NAME.DASHBOARD,
href: CONSTANT.URL_TREE_NAME.DASHBOARD,
},
{
titleLang: CONSTANT.PAGE_NAME.PICKUP,
href: CONSTANT.URL_TREE_NAME.PICKUP_CONTINUOS,
},
{
titleLang: CONSTANT.PAGE_NAME.REPORT_FORM,
},
];
} else if (sessionStorage.getItem('pickUpType') == CONSTANT.PICK_UP_TYPE.WARNING_REPORT) { } else if (sessionStorage.getItem('pickUpType') == CONSTANT.PICK_UP_TYPE.WARNING_REPORT) {
navs = [ pickupBread.href = CONSTANT.URL_TREE_NAME.PICKUP_WARNING;
{ navs = [dashBordBread, pickupBread, reportFormBread];
titleLang: CONSTANT.PAGE_NAME.DASHBOARD,
href: CONSTANT.URL_TREE_NAME.DASHBOARD,
},
{
titleLang: CONSTANT.PAGE_NAME.PICKUP,
href: CONSTANT.URL_TREE_NAME.PICKUP_WARNING,
},
{
titleLang: CONSTANT.PAGE_NAME.REPORT_FORM,
},
];
} else { } else {
navs = [ pickupBread.href = CONSTANT.URL_TREE_NAME.PICKUP_NEW;
{ navs = [dashBordBread, pickupBread, reportListBread, reportFormBread];
titleLang: CONSTANT.PAGE_NAME.DASHBOARD,
href: CONSTANT.URL_TREE_NAME.DASHBOARD,
},
{
titleLang: CONSTANT.PAGE_NAME.PICKUP,
href: CONSTANT.URL_TREE_NAME.PICKUP_NEW,
},
{
titleLang: CONSTANT.PAGE_NAME.REPORT_LIST,
href: CONSTANT.URL_TREE_NAME.REPORT_LIST,
},
{
titleLang: CONSTANT.PAGE_NAME.REPORT_FORM,
},
];
} }
} else { } else {
if (sessionStorage.getItem('pickUpType')) sessionStorage.removeItem('pickUpType'); if (sessionStorage.getItem('pickUpType')) sessionStorage.removeItem('pickUpType');
const operationListBread = {
titleLang: CONSTANT.PAGE_NAME.OPERATION_LIST,
href: CONSTANT.URL_TREE_NAME.OPERATION_LIST,
};
if (RF.addReportFlg && RF.addReportFlg == 1) { const reportType = sessionStorage.getItem('reportType');
navs = [ if ((RF.addReportFlg && RF.addReportFlg == 1) || reportType == CONSTANT.REPORT_TYPE_INT.ROUTINE) {
{ navs = [operationListBread, reportListBread, reportFormBread];
titleLang: CONSTANT.PAGE_NAME.OPERATION_LIST,
href: CONSTANT.URL_TREE_NAME.OPERATION_LIST,
},
{
titleLang: CONSTANT.PAGE_NAME.REPORT_LIST,
href: CONSTANT.URL_TREE_NAME.REPORT_LIST,
},
{
titleLang: CONSTANT.PAGE_NAME.REPORT_FORM,
},
];
} else { } else {
navs = [ navs = [operationListBread, reportFormBread];
{
titleLang: CONSTANT.PAGE_NAME.OPERATION_LIST,
href: CONSTANT.URL_TREE_NAME.OPERATION_LIST,
},
{
titleLang: CONSTANT.PAGE_NAME.REPORT_FORM,
},
];
} }
} }
TEMPLATE.loadMainNavsTitle('#includedMainTitle', CONSTANT.PAGE_NAME.REPORT_FORM, navs, RF.loadMainTitleCallback); TEMPLATE.loadMainNavsTitle('#includedMainTitle', CONSTANT.PAGE_NAME.REPORT_FORM, navs, RF.loadMainTitleCallback);
......
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