Commit 1d2aefce by Takumi Imai

課題65 定期点検の遷移

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