![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/tech_preview/hr/ |
Upload File : |
hr.menu.index = 0; hr.menu.heightFooter = 30; hr.menu.distanceButtonForm = "10px"; hr.menu.changeCurrentUrl = function(url){ if (!hr.isMobile){ history.replaceState({}, "", window.domain + url); } }; hr.menu.openTaskById = function(taskid){ var holder, host; holder = absol.buildDom({ tag: "tabframe" }); host = { holder: holder, frameList: absol.buildDom({ tag: "frameview", class: "main-frame-view", style: { width: "100%", height: "100%" } }) }; host.holder.currentUrl = "activities_task/" + taskid; host.funcs = { formActivitiesInit: theme.formActivitiesInit, formActivitiesContentData: theme.formActivitiesContentData, formActivitiesGetRow: theme.formActivitiesGetRow }; holder.name = LanguageModule.text("txt_to_do"); hr.menu.tabPanel.addChild(holder); host.holder.appendChild(host.frameList); host.quick_open = true; hr.activities.showActivitiesTaskQuickModePre(host, taskid); }; hr.menu.openMeetingById = function(meetingid){ var holder, host; holder = absol.buildDom({ tag: "tabframe" }); host = { holder: holder, frameList: absol.buildDom({ tag: "frameview", class: "main-frame-view", style: { width: "100%", height: "100%" } }) }; host.holder.currentUrl = "activities_meeting/" + meetingid; host.funcs = { formActivitiesInit: theme.formActivitiesInit, formActivitiesContentData: theme.formActivitiesContentData, formActivitiesGetRow: theme.formActivitiesGetRow }; holder.name = LanguageModule.text("txt_to_do"); hr.menu.tabPanel.addChild(holder); host.holder.appendChild(host.frameList); host.quick_open = true; hr.activities.showActivitiesMeetingQuickModePre(host, meetingid); }; hr.menu.openObjectById = function(objectid, param2){ var holder, host; holder = absol.buildDom({ tag: "tabframe" }); host = { holder: holder, frameList: absol.buildDom({ tag: "frameview", class: "main-frame-view", style: { width: "100%", height: "100%" } }) }; host.holder.currentUrl = "work_flows"; host.funcs = { formWork_flowsInit: theme.formWork_flowsInit, formWork_flowsContentData: theme.formWork_flowsContentData, formWork_flowGetRow: theme.formWork_flowGetRow }; holder.name = LanguageModule.text("txt_work_flows"); hr.menu.tabPanel.addChild(holder); host.holder.appendChild(host.frameList); host.quick_open = true; hr.work_flows.viewObjectsPre(host, objectid, param2); }; hr.menu.openPartnerByID = function(partnerid){ var holder, host; holder = absol.buildDom({ tag: "tabframe" }); host = { holder: holder, frameList: absol.buildDom({ tag: "frameview", class: "main-frame-view", style: { width: "100%", height: "100%" } }) }; host.holder.currentUrl = "partner"; holder.name = LanguageModule.text("txt_partner"); hr.menu.tabPanel.addChild(holder); host.holder.appendChild(host.frameList); host.quick_open = true; hr.partner.showPartnerPre(host, partnerid); }; hr.menu.openContactByID = function(contactid, employeeEditContactDic){ var holder, host; holder = absol.buildDom({ tag: "tabframe" }); host = { holder: holder, frameList: absol.buildDom({ tag: "frameview", class: "main-frame-view", style: { width: "100%", height: "100%" } }) }; host.holder.currentUrl = "contact"; holder.name = LanguageModule.text("txt_contact"); hr.menu.tabPanel.addChild(holder); host.holder.appendChild(host.frameList); host.quick_open = true; host.employeeEditContactDic = employeeEditContactDic; hr.contact.showContactPre(host, contactid); }; hr.menu.changeCurrentUrlTab = function(host, url){ if (!hr.isMobile){ host.holder.currentUrl = url; history.replaceState({}, "", window.domain + url); } }; if (hr.isMobile){ hr.menu.tabPanel = absol.buildDom({ tag: "frameview", class: ["main-tabview", 'am-application-frameview'] }); hr.menu.staticFrameTaskIds = [100, 97, 1001, 86, 1000, 1002]; hr.menu.mobileTabbar = absol.buildDom({ tag: 'mbottomtabbar', class: 'am-application-tabbar', props: { items: [ { icon: 'span.mdi.mdi-format-list-checks', value: 100 }, { icon: 'span.mdi.mdi-stack-overflow', value: 97 }, { icon: "span.mdi.mdi-information-outline", items: [ { icon: 'span.mdi.mdi-comment-multiple-outline', value: 1001 }, { icon: 'span.mdi.mdi-chat-outline', value: 86 }, { icon: 'span.mdi.mdi-help-circle-outline', value: 1002 } ] }, { icon: 'span.mdi.mdi-menu', value: 1000 } ] }, on: { change: function(){ var value = this.value; hr.menu.loadPage(value); } } }); hr.menu.showMobileTabbar = function (flag) { var appDiv = hr.menu.layoutInit; var current = appDiv.classList.contains('am-show-tabbar'); if (current == flag) return; if (flag) { appDiv.addClass('am-show-tabbar'); } else { appDiv.removeClass('am-show-tabbar'); } absol.Dom.updateResizeSystem(); }; } else { hr.menu.tabPanel = absol.buildDom({ tag: "tabview", class: "main-tabview", on: { activetab: function(event, me){ if (event.holder.tabFrame.boardid){ data_module.boardActive = event.holder.tabFrame.boardid; } if (event.holder.tabFrame.currentUrl !== undefined){ hr.menu.changeCurrentUrl(event.holder.tabFrame.currentUrl); } else { hr.menu.changeCurrentUrl(""); } }, removetab: function (event) { if (this.getAllChild().length === 0) { hr.menu.changeCurrentUrl(""); } } } }); } hr.listTabChat = []; hr.menu.loadDataChatComment = function(){ //comment data_module.loadCommentList().then(function(content){ host = {database: {}}; host.holder = hr.notification_comment_ctn; hr.menu.mobileTabbar.modifyItem(1001, 'counter', content.number_of_unread); delete content.number_of_unread; contentModule.makeDatabaseContent(host, content); contentModule.makeUserEmployeeName(host); contentModule.createCommentPage(host); }); //chat Promise.all([data_module.loadChatList(), data_module.loadEmployeeItemsPrivView(), data_module.loadNumberOfChatUnread()]).then(function(values){ var host = values[1]; hr.menu.mobileTabbar.modifyItem(86, 'counter', values[2]); contentModule.makeDatabaseContent(host, values[0]); contentModule.makeUserEmployeeName(host); host.holder = hr.chat_ctn; hr.chat_ctn.host = host; contentModule.createChatPage(host); }); }; hr.menu.showNotificationCommentPage = function(host){ host.holder.addChild(hr.notification_comment_ctn); }; hr.menu.showOnlineSupportPage = function(host){ var support_online_iframe = document.createElement("iframe"); var iBridge = IFrameBridge.fromIFrame(support_online_iframe); var userid = systemconfig.userid; var companyid = systemconfig.companyid; var serviceid = systemconfig.serviceid; support_online_iframe.src = window.originHost + "/online_support/ui_customer_chatbox2.php?userid="+ userid +"&&companyid=" +companyid+ "&&serviceid=" + serviceid + "&&mobile=1"; support_online_iframe.style.width = "100%"; support_online_iframe.style.height = "100%"; support_online_iframe.style.border = "none"; var online_support_ctn = DOMElement.div({ attrs: { style: { height: "calc(100% - 10px)" } }, children: [support_online_iframe] }); host.holder.addChild(online_support_ctn); iBridge.on('seen', function(){ hr.menu.mobileTabbar.modifyItem(1002, 'counter', 0); }); iBridge.on('newmess', function(number){ hr.menu.mobileTabbar.modifyItem(1002, 'counter', number); }); window.iBridge = iBridge; }; hr.menu.showChatPage = function(host, hostid){ host.holder.addChild(hr.chat_ctn); hr.listTabChat.push(hr.chat_ctn.host); if (hostid > 0) hr.chats.openNewChatFromId(hr.chat_ctn.host, hostid); }; hr.menu.showMenu = function(host){ var profile = absol.buildDom({ tag: 'mtinyprofileblock', props:{ avatarSrc: systemconfig.user_avatars, name: systemconfig.username, desc: systemconfig.fullname }, on:{ click: function(){ //todo: view profile } } }); profile.$avatar.id = "user_avatar_img"; host.holder.addChild(profile); host.holder.addChild(absol.buildDom({ style:{ height: 'calc(100% - 5.42857142857em)', overflowY: 'auto' }, child: [hr.menu.menuHeader] })); }; hr.menu.loadPageMobile = function (taskid, hostid) { var holder; if (hr.menu.staticFrameTaskIds.indexOf(taskid) >= 0){ hr.menu.showMobileTabbar(true); hr.menu.mobileTabbar.value = taskid; if (hr.menu.staticFrameTasks[taskid]){ holder = hr.menu.staticFrameTasks[taskid].holder; holder.requestActive(); if (hostid > 0) hr.chats.openNewChatFromId(hr.listTabChat[0], hostid); return; } } else { hr.menu.showMobileTabbar(false); } holder = absol.buildDom({ tag: "tabframe", style: { backgroundColor: "white" } }); var frameList = absol.buildDom({ tag: "frameview", class: "main-frame-view", style: { width: "100%", height: "100%" } }); var host = { holder: holder, frameList: frameList }; hr.menu.tabPanel.addChild(holder); if (taskid != 1002) holder.requestActive(); hr.menu.staticFrameTasks[taskid] = host; switch (taskid){ case 1001: return hr.menu.showNotificationCommentPage(host); case 1002: return hr.menu.showOnlineSupportPage(host); case 1000: return hr.menu.showMenu(host); case 86: return hr.menu.showChatPage(host, hostid); case 1: return hr.menu.showProfile(host); case 11: host.funcs = { formOrgsInit: theme.formOrgsInit }; holder.name = LanguageModule.text("txt_organization_chart"); return hr.orgs.init(host); case 80: host.funcs = {}; holder.name = LanguageModule.text("txt_document_manager"); return hr.document_manager.init(host); case 93: host.funcs = {}; holder.name = LanguageModule.text("txt_partner"); return hr.partner.init(host); case 94: host.funcs = {}; holder.name = LanguageModule.text("txt_contact"); return hr.contact.init(host); case 95: host.funcs = {}; holder.name = LanguageModule.text("txt_partner_checkin"); return hr.partner_checkin.init(host); case 97: host.funcs = {}; holder.name = LanguageModule.text("txt_work_flows"); return hr.work_flows.init(host); case 100: host.funcs = { formActivitiesContentData: theme.formActivitiesContentData, formActivitiesGetRow: theme.formActivitiesGetRow, formActivitiesInit: theme.formActivitiesInit }; holder.name = LanguageModule.text("txt_to_do"); return hr.activities.init(host); case 111: holder.name = LanguageModule.text("txt_exercise"); return hr.exercise.init(host); case 109: holder.name = LanguageModule.text("txt_lesson"); return hr.lesson.init(host); case 115: holder.name = LanguageModule.text("txt_examination"); return hr.examination.init(host); default: holder.innerHTML = "under construction (" + taskid + ")"; break; } }; hr.menu.loadPagePC = function (taskid, hostid, hostid2){ var holder, host; holder = absol.buildDom({ tag: "tabframe" }); host = { holder: holder, frameList: absol.buildDom({ tag: "frameview", class: "main-frame-view", style: { width: "100%", height: "100%" } }) }; switch (taskid) { case 1: host.holder.currentUrl = "personal_profile"; host.direct = 0; host.funcs = { closeButton: theme.closeButton, saveButton: theme.saveButton, saveCloseButton: theme.saveCloseButton, okButton: theme.okButton, formConfirmPassword: theme.formConfirmPassword, formPersonalProfile: theme.formPersonalProfile, input: theme.input }; holder.name = LanguageModule.text("txt_personal_profile"); hr.menu.tabPanel.addChild(holder); return hr.menu.showProfile(host); case 2: host.holder.currentUrl = "user"; host.direct = 0; host.funcs = { closeButton: theme.closeButton, saveButton: theme.saveButton, saveCloseButton: theme.saveCloseButton, addButton: theme.addButton, okButton: theme.okButton, formConfirmPassword: theme.formConfirmPassword, formAccountInit: theme.formAccountInit, formAccountContentData: theme.formAccountContentData, formAccountGetRow: theme.formAccountGetRow, formAccountEdit: theme.formAccountEdit, input: theme.input }; holder.name = LanguageModule.text("txt_user"); hr.menu.tabPanel.addChild(holder); return hr.account.init(host); case 3: host.holder.currentUrl = "datatypes"; host.funcs = { closeButton: theme.closeButton, saveButton: theme.saveButton, saveCloseButton: theme.saveCloseButton, addButton: theme.addButton, okButton: theme.okButton, formDatatypesInit: theme.formDatatypesInit, formDatatypesContentData: theme.formDatatypesContentData, formDatatypesGetRow: theme.formDatatypesGetRow, formDatatypesEdit: theme.formDatatypesEdit, input: theme.input }; holder.name = LanguageModule.text("txt_datatypes"); hr.menu.tabPanel.addChild(holder); return hr.datatypes.init(host); case 4: host.holder.currentUrl = "input_form"; host.direct = 0; host.funcs = { closeButton: theme.closeButton, saveButton: theme.saveButton, saveCloseButton: theme.saveCloseButton, addButton: theme.addButton, okButton: theme.okButton, inputFormInit: theme.inputFormInit, inputFormAddNew: theme.inputFormAddNew, loadTypeList: data_module.loadTypeList, loadFormContent: data_module.loadFormContent, loadFormList: data_module.loadInputFormList, loadUsersList: data_module.loadUsersList, loadPeoplesList: data_module.loadPeoplesList, loadOrgsList: data_module.loadOrgsList, loadEmployeesList: data_module.loadEmployeesList, loadPositionsList: data_module.loadPositionsList, loadGeographiesList: data_module.loadGeographiesList }; holder.name = LanguageModule.text("txt_input_form"); hr.menu.tabPanel.addChild(holder); return hr.input_form.init(host); case 5: host.holder.currentUrl = "output_form"; host.direct = 0; host.funcs = { closeButton: theme.closeButton, saveButton: theme.saveButton, saveCloseButton: theme.saveCloseButton, addButton: theme.addButton, okButton: theme.okButton, loadTypeList: data_module.loadTypeList, loadFormContent: data_module.loadFormContent, loadFormList: data_module.loadOutputFormList, loadUsersList: data_module.loadUsersList, loadPeoplesList: data_module.loadPeoplesList, loadOrgsList: data_module.loadOrgsList, loadEmployeesList: data_module.loadEmployeesList, loadPositionsList: data_module.loadPositionsList, loadGeographiesList: data_module.loadGeographiesList }; holder.name = LanguageModule.text("txt_output_form"); hr.menu.tabPanel.addChild(holder); return hr.output_form.init(host); case 9: host.holder.currentUrl = "form_config"; host.funcs = { closeButton: theme.closeButton, saveButton: theme.saveButton, saveCloseButton: theme.saveCloseButton, addButton: theme.addButton, okButton: theme.okButton, }; holder.name = LanguageModule.text("txt_form_config"); hr.menu.tabPanel.addChild(holder); return hr.form_config.init(host); case 10: host.holder.currentUrl = "geopos"; host.funcs = { formGeoposInit: theme.formGeoposInit, formGeoposContentData: theme.formGeoposContentData, formGeoposEdit: theme.formGeoposEdit, formGeoposGetRow: theme.formGeoposGetRow }; holder.name = LanguageModule.text("txt_geographical_position"); hr.menu.tabPanel.addChild(holder); return hr.geopos.init(host); case 11: host.holder.currentUrl = "orgs"; host.funcs = { formOrgsInit: theme.formOrgsInit }; holder.name = LanguageModule.text("txt_organization_chart"); hr.menu.tabPanel.addChild(holder); return hr.orgs.init(host); case 12: host.holder.currentUrl = "paths"; host.funcs = { formPathsInit: theme.formPathsInit, formPathsContentData: theme.formPathsContentData, formPathGetRow: theme.formPathGetRow }; holder.name = LanguageModule.text("txt_media_manager"); hr.menu.tabPanel.addChild(holder); return hr.paths.init(host); // case 15: // host.holder.currentUrl = "activities_task"; // // host.funcs = { // // formTaskInit: theme.formTaskInit // // }; // host.funcs = { // formActivitiesTaskInit: theme.formActivitiesTaskInit, // formActivitiesTaskContentData: theme.formActivitiesTaskContentData, // formActivitiesTaskGetRow: theme.formActivitiesTaskGetRow // }; // holder.name = LanguageModule.text("txt_task"); // hr.menu.tabPanel.addChild(holder); // return hr.activities_task.init(host); // case 16: // host.holder.currentUrl = "activities_meeting"; // // host.funcs = { // // formMeetingInit: theme.formMeetingInit // // }; // host.funcs = { // formActivitiesMeetingInit: theme.formActivitiesMeetingInit, // formActivitiesMeetingContentData: theme.formActivitiesMeetingContentData, // formActivitiesMeetingGetRow: theme.formActivitiesMeetingGetRow // }; // holder.name = LanguageModule.text("txt_meeting"); // hr.menu.tabPanel.addChild(holder); // return hr.activities_meeting.init(host); case 17: host.holder.currentUrl = "variable_input_form"; host.funcs = { variableAddNew: theme.variableAddNew, variableInputFormInit: theme.variableInputFormInit }; holder.name = LanguageModule.text("txt_variables"); hr.menu.tabPanel.addChild(holder); return hr.variable_input_form.init(host); case 18: host.holder.currentUrl = "holidays"; host.funcs = { formHolidaysInit: theme.formHolidaysInit, formHolidaysContentData: theme.formHolidaysContentData, formHolidayGetRow: theme.formHolidayGetRow }; holder.name = LanguageModule.text("txt_holiday"); hr.menu.tabPanel.addChild(holder); return hr.holidays.init(host); case 19: host.holder.currentUrl = "shifts"; host.funcs = { formShiftsInit: theme.formShiftsInit, formShiftsContentData: theme.formShiftsContentData, formShiftGetRow: theme.formShiftGetRow }; holder.name = LanguageModule.text("txt_shift"); hr.menu.tabPanel.addChild(holder); return hr.shifts.init(host); case 20: host.holder.currentUrl = "worktime_checkins"; host.funcs = { formWorktime_checkinsInit: theme.formWorktime_checkinsInit, formWorktime_checkinsContentData: theme.formWorktime_checkinsContentData, formWorktime_checkinGetRow: theme.formWorktime_checkinGetRow }; holder.name = LanguageModule.text("txt_worktime_checkins"); hr.menu.tabPanel.addChild(holder); return hr.worktime_checkins.init(host); case 21: host.holder.currentUrl = "worktime_machines"; holder.name = LanguageModule.text("txt_worktime_machine"); hr.menu.tabPanel.addChild(holder); return hr.worktime_machines.init(host); case 22: host.holder.currentUrl = "worktime_logs"; host.funcs = { formWorktime_logsInit: theme.formWorktime_logsInit, formWorktime_logsContentData: theme.formWorktime_logsContentData, formWorktime_logGetRow: theme.formWorktime_logGetRow }; holder.name = LanguageModule.text("txt_worktime_logs"); hr.menu.tabPanel.addChild(holder); return hr.worktime_logs.init(host); case 23: host.holder.currentUrl = "functions"; holder.name = LanguageModule.text("txt_function_manager"); hr.menu.tabPanel.addChild(holder); return hr.sclang.init(host); case 24: host.holder.currentUrl = "training_programs"; host.funcs = { formTraining_programsInit: theme.formTraining_programsInit, formTraining_programsContentData: theme.formTraining_programsContentData, formTraining_programGetRow: theme.formTraining_programGetRow }; holder.name = LanguageModule.text("txt_training_program"); hr.menu.tabPanel.addChild(holder); return hr.training_programs.init(host); case 25: host.holder.currentUrl = "assets"; host.funcs = { formAssetsInit: theme.formAssetsInit, formAssetsContentData: theme.formAssetsContentData, formAssetGetRow: theme.formAssetGetRow }; holder.name = LanguageModule.text("txt_asset_list"); hr.menu.tabPanel.addChild(holder); return hr.assets.init(host); case 26: host.holder.currentUrl = "warehouses"; host.funcs = { formWarehousesInit: theme.formWarehousesInit, formWarehousesContentData: theme.formWarehousesContentData, formWarehouseGetRow: theme.formWarehouseGetRow }; holder.name = LanguageModule.text("txt_warehouse_list"); hr.menu.tabPanel.addChild(holder); return hr.warehouses.init(host); case 27: host.holder.currentUrl = "instruments_and_tools"; host.funcs = { formInstruments_and_toolsInit: theme.formInstruments_and_toolsInit, formInstruments_and_toolsContentData: theme.formInstruments_and_toolsContentData, formInstruments_and_toolGetRow: theme.formInstruments_and_toolGetRow }; holder.name = LanguageModule.text("txt_instruments_and_tools_list"); hr.menu.tabPanel.addChild(holder); return hr.instruments_and_tools.init(host); case 28: host.holder.currentUrl = "asset_handover"; host.funcs = { formAsset_handoverInit: theme.formAsset_handoverInit, formAsset_handoverContentData: theme.formAsset_handoverContentData, formAsset_handoverGetRow: theme.formAsset_handoverGetRow }; holder.name = LanguageModule.text("txt_asset_handover"); hr.menu.tabPanel.addChild(holder); return hr.asset_handover.init(host); case 29: host.holder.currentUrl = "my_assets"; host.funcs = { formMy_assetsInit: theme.formMy_assetsInit, formMy_assetsContentData: theme.formMy_assetsContentData, formMy_assetGetRow: theme.formMy_assetGetRow }; holder.name = LanguageModule.text("txt_my_assets"); hr.menu.tabPanel.addChild(holder); return hr.my_assets.init(host); case 32: host.holder.currentUrl = "training_program_groups"; host.funcs = { formTrainingProgram_groupsInit: theme.formTrainingProgram_groupsInit, formTrainingProgram_groupsContentData: theme.formTrainingProgram_groupsContentData, formTrainingProgram_groupGetRow: theme.formTrainingProgram_groupGetRow }; holder.name = LanguageModule.text("txt_training_program_group"); hr.menu.tabPanel.addChild(holder); return hr.training_program_groups.init(host); case 55: host.holder.currentUrl = "nations"; host.funcs = { formNationsInit: theme.formNationsInit, formNationsContentData: theme.formNationsContentData, formNationGetRow: theme.formNationGetRow }; holder.name = LanguageModule.text("txt_nation"); hr.menu.tabPanel.addChild(holder); return hr.nations.init(host); case 56: host.holder.currentUrl = "cities"; host.funcs = { formCitiesInit: theme.formCitiesInit, formCitiesContentData: theme.formCitiesContentData, formCityGetRow: theme.formCityGetRow }; holder.name = LanguageModule.text("txt_city"); hr.menu.tabPanel.addChild(holder); return hr.cities.init(host); case 57: host.holder.currentUrl = "ethnics"; host.funcs = { formEthnicsInit: theme.formEthnicsInit, formEthnicsContentData: theme.formEthnicsContentData, formEthnicGetRow: theme.formEthnicGetRow }; holder.name = LanguageModule.text("txt_ethnic"); hr.menu.tabPanel.addChild(holder); return hr.ethnics.init(host); case 58: host.holder.currentUrl = "religions"; host.funcs = { formReligionsInit: theme.formReligionsInit, formReligionsContentData: theme.formReligionsContentData, formReligionGetRow: theme.formReligionGetRow }; holder.name = LanguageModule.text("txt_religion"); hr.menu.tabPanel.addChild(holder); return hr.religions.init(host); case 59: host.holder.currentUrl = "employment_contract_types"; host.funcs = { formEmployment_contract_typesInit: theme.formEmployment_contract_typesInit, formEmployment_contract_typesContentData: theme.formEmployment_contract_typesContentData, formEmployment_contract_typeGetRow: theme.formEmployment_contract_typeGetRow }; holder.name = LanguageModule.text("txt_employment_contract"); hr.menu.tabPanel.addChild(holder); return hr.employment_contract_types.init(host); case 62: host.holder.currentUrl = "examination_programs"; host.funcs = { formExaminationProgramInit: theme.formExaminationProgramInit, formExaminationProgramContentData: theme.formExaminationProgramContentData, formExaminationProgramGetRow: theme.formExaminationProgramGetRow }; holder.name = LanguageModule.text("txt_examination_session"); hr.menu.tabPanel.addChild(holder); return hr.examination_programs.init(host); case 64: host.holder.currentUrl = "shift_schedule"; host.funcs = { formShift_scheduleInit: theme.formShift_scheduleInit, formShift_scheduleContentData: theme.formShift_scheduleContentData }; holder.name = LanguageModule.text("txt_shift_schedule"); hr.menu.tabPanel.addChild(holder); return hr.shift_schedule.init(host); case 66: host.holder.currentUrl = "employment_contract"; host.funcs = { formEmployment_contractInit: theme.formEmployment_contractInit, formEmployment_contractContentData: theme.formEmployment_contractContentData, formEmployment_contractGetRow: theme.formEmployment_contractGetRow }; holder.name = LanguageModule.text("txt_employment_contract"); hr.menu.tabPanel.addChild(holder); return hr.employment_contract.init(host); case 71: host.holder.currentUrl = "salary_decisions"; host.funcs = { formSalary_decisionsInit: theme.formSalary_decisionsInit, formSalary_decisionsContentData: theme.formSalary_decisionsContentData }; holder.name = LanguageModule.text("txt_salary_decision"); hr.menu.tabPanel.addChild(holder); return hr.salary_decisions.init(host); case 73: host.holder.currentUrl = "asset_recall"; host.funcs = { formAsset_recallInit: theme.formAsset_recallInit, formAsset_recallContentData: theme.formAsset_recallContentData, formAsset_recallGetRow: theme.formAsset_recallGetRow }; holder.name = LanguageModule.text("txt_recall"); hr.menu.tabPanel.addChild(holder); return hr.asset_recall.init(host); case 74: host.holder.currentUrl = "asset_category"; host.funcs = { formAsset_categoryInit: theme.formAsset_categoryInit, formAsset_categoryContentData: theme.formAsset_categoryContentData, formAsset_categoryGetRow: theme.formAsset_categoryGetRow }; holder.name = LanguageModule.text("txt_asset_category"); hr.menu.tabPanel.addChild(holder); return hr.asset_category.init(host); case 75: host.holder.currentUrl = "instruments_and_tools_category"; host.funcs = { formInstruments_and_tools_categoryInit: theme.formInstruments_and_tools_categoryInit, formInstruments_and_tools_categoryContentData: theme.formInstruments_and_tools_categoryContentData, formInstruments_and_tools_categoryGetRow: theme.formInstruments_and_tools_categoryGetRow }; holder.name = LanguageModule.text("txt_instruments_and_tools_category"); hr.menu.tabPanel.addChild(holder); return hr.instruments_and_tools_category.init(host); case 76: host.holder.currentUrl = "projects"; host.funcs = { formProjectsInit: theme.formProjectsInit, formProjectsContentData: theme.formProjectsContentData, formProjectGetRow: theme.formProjectGetRow }; holder.name = LanguageModule.text("txt_projects"); hr.menu.tabPanel.addChild(holder); return hr.projects.init(host); case 77: host.holder.currentUrl = "task_templates"; host.funcs = { formTaskTemplatesInit: theme.formTaskTemplatesInit, formTaskTemplatesContentData: theme.formTaskTemplatesContentData, formTaskTemplateGetRow: theme.formTaskTemplateGetRow, formTaskTemplateChooseGroup: theme.formTaskTemplateChooseGroup }; holder.name = LanguageModule.text("txt_task_template"); hr.menu.tabPanel.addChild(holder); return hr.task_templates.init(host); case 78: host.holder.currentUrl = "document_types"; host.funcs = { formDocument_typesInit: theme.formDocument_typesInit, formDocument_typesContentData: theme.formDocument_typesContentData, formDocument_typeGetRow: theme.formDocument_typeGetRow }; holder.name = LanguageModule.text("txt_document_type"); hr.menu.tabPanel.addChild(holder); return hr.document_types.init(host); case 79: host.holder.currentUrl = "document_groups"; host.funcs = { formDocument_groupsInit: theme.formDocument_groupsInit, formDocument_groupsContentData: theme.formDocument_groupsContentData, formDocument_groupGetRow: theme.formDocument_groupGetRow }; holder.name = LanguageModule.text("txt_document_group"); hr.menu.tabPanel.addChild(holder); return hr.document_groups.init(host); case 80: host.holder.currentUrl = "document_manager"; host.funcs = { formDocument_managerInit: theme.formDocument_managerInit, formDocument_foldersContentData: theme.formDocument_foldersContentData, formDocument_folderGetRow: theme.formDocument_folderGetRow }; holder.name = LanguageModule.text("txt_document_manager"); hr.menu.tabPanel.addChild(holder); return hr.document_manager.init(host); case 81: host.holder.currentUrl = "meeting_templates"; host.funcs = { formMeetingTemplatesInit: theme.formMeetingTemplatesInit, formMeetingTemplatesContentData: theme.formMeetingTemplatesContentData, formMeetingTemplateGetRow: theme.formMeetingTemplateGetRow, formMeetingTemplateChooseGroup: theme.formMeetingTemplateChooseGroup }; holder.name = LanguageModule.text("txt_meeting_template"); hr.menu.tabPanel.addChild(holder); return hr.meeting_templates.init(host); case 82: host.holder.currentUrl = "document_templates"; host.funcs = { formDocument_templatesInit: theme.formDocument_templatesInit, formDocument_templatesContentData: theme.formDocument_templatesContentData, formDocument_templateGetRow: theme.formDocument_templateGetRow }; holder.name = LanguageModule.text("txt_document_template"); hr.menu.tabPanel.addChild(holder); return hr.document_templates.init(host); case 83: host.holder.currentUrl = "email_templates"; host.funcs = { formEmailTemplatesInit: theme.formEmailTemplatesInit, formEmailTemplatesContentData: theme.formEmailTemplatesContentData, formEmailTemplateGetRow: theme.formEmailTemplateGetRow, formEmailTemplateChooseGroup: theme.formEmailTemplateChooseGroup }; holder.name = LanguageModule.text("txt_email_template"); hr.menu.tabPanel.addChild(holder); return hr.email_templates.init(host); case 84: host.holder.currentUrl = "onboarding"; host.funcs = { formOnboardingInit: theme.formOnboardingInit, formOnboardingContentData: theme.formOnboardingContentData, formOnboardingAddTask: theme.formOnboardingAddTask }; holder.name = LanguageModule.text("txt_onboarding"); hr.menu.tabPanel.addChild(holder); return hr.onboarding.init(host); case 85: host.holder.currentUrl = "instruments_and_tools_handover"; host.funcs = { formInstruments_and_tools_handoverInit: theme.formInstruments_and_tools_handoverInit, formInstruments_and_tools_handoverContentData: theme.formInstruments_and_tools_handoverContentData, formInstruments_and_tools_handoverGetRow: theme.formInstruments_and_tools_handoverGetRow }; holder.name = LanguageModule.text("txt_instruments_and_tools_handover"); hr.menu.tabPanel.addChild(holder); return hr.instruments_and_tools_handover.init(host); case 86: host.holder.currentUrl = "chats"; if (hr.listTabChat.length > 0){ hr.menu.tabPanel.activeTab(hr.listTabChat[0].holder.id); if (hostid > 0){ hr.chats.openNewChatFromId(hr.listTabChat[0], hostid); } } else { host.holder.currentUrl = "chats"; host.funcs = {}; holder.name = LanguageModule.text("txt_chat"); hr.menu.tabPanel.addChild(holder); hr.listTabChat.push(host); holder.on("remove", function(event){ for (var i = 0; i < hr.listTabChat.length; i++){ if (hr.listTabChat[i].holder.id == this.id){ hr.listTabChat.splice(i, 1); break; } } }); hr.chats.init(host).then(function(){ if (hostid > 0){ hr.chats.openNewChatFromId(host, hostid); } }); } break; case 87: host.holder.currentUrl = "employee_groups"; host.funcs = { formEmployee_groupsInit: theme.formEmployee_groupsInit, formEmployee_groupsContentData: theme.formEmployee_groupsContentData, formEmployee_groupGetRow: theme.formEmployee_groupGetRow }; holder.name = LanguageModule.text("txt_employee_group"); hr.menu.tabPanel.addChild(holder); return hr.employee_groups.init(host); case 88: host.holder.currentUrl = "document_properties"; host.funcs = { formDocument_propertiesInit: theme.formDocument_propertiesInit, formDocument_propertiesContentData: theme.formDocument_propertiesContentData, formDocument_propertyGetRow: theme.formDocument_propertyGetRow }; holder.name = LanguageModule.text("txt_document_property"); hr.menu.tabPanel.addChild(holder); return hr.document_properties.init(host); case 89: host.holder.currentUrl = "welcome_templates"; host.funcs = { formWelcomeTemplatesInit: theme.formWelcomeTemplatesInit }; holder.name = LanguageModule.text("txt_welcome_template"); hr.menu.tabPanel.addChild(holder); return hr.welcome_templates.init(host); case 90: host.holder.currentUrl = "offboarding_types"; host.funcs = { formOffboarding_typesInit: theme.formOffboarding_typesInit, formOffboarding_typesContentData: theme.formOffboarding_typesContentData, formOffboarding_typeGetRow: theme.formOffboarding_typeGetRow }; holder.name = LanguageModule.text("txt_offboarding_type"); hr.menu.tabPanel.addChild(holder); return hr.offboarding_types.init(host); case 91: host.holder.currentUrl = "offboarding_reasons"; host.funcs = { formOffboarding_reasonsInit: theme.formOffboarding_reasonsInit, formOffboarding_reasonsContentData: theme.formOffboarding_reasonsContentData, formOffboarding_reasonGetRow: theme.formOffboarding_reasonGetRow }; holder.name = LanguageModule.text("txt_offboarding_reason"); hr.menu.tabPanel.addChild(holder); return hr.offboarding_reasons.init(host); case 92: host.holder.currentUrl = "partner_class"; host.funcs = { formPartner_classInit: theme.formPartner_classInit, formPartner_classContentData: theme.formPartner_classContentData, formPartner_classGetRow: theme.formPartner_classGetRow }; holder.name = LanguageModule.text("txt_partner_class"); hr.menu.tabPanel.addChild(holder); return hr.partner_class.init(host); case 93: host.holder.currentUrl = "partner"; host.funcs = { formPartnerInit: theme.formPartnerInit, formPartnerContentData: theme.formPartnerContentData, formPartnerGetRow: theme.formPartnerGetRow }; holder.name = LanguageModule.text("txt_partner"); hr.menu.tabPanel.addChild(holder); return hr.partner.init(host); case 94: host.holder.currentUrl = "contact"; host.funcs = { formContactInit: theme.formContactInit, formContactContentData: theme.formContactContentData, formContactGetRow: theme.formContactGetRow }; holder.name = LanguageModule.text("txt_contact"); hr.menu.tabPanel.addChild(holder); return hr.contact.init(host); case 95: host.holder.currentUrl = "partner_checkin"; host.funcs = { formPartner_checkinInit: theme.formPartner_checkinInit, formPartner_checkinContentData: theme.formPartner_checkinContentData }; holder.name = LanguageModule.text("txt_partner_checkin"); hr.menu.tabPanel.addChild(holder); return hr.partner_checkin.init(host); case 96: host.holder.currentUrl = "work_flow_groups"; host.funcs = { formWork_flow_groupsInit: theme.formWork_flow_groupsInit, formWork_flow_groupsContentData: theme.formWork_flow_groupsContentData, formWork_flow_groupGetRow: theme.formWork_flow_groupGetRow }; holder.name = LanguageModule.text("txt_work_flow_group"); hr.menu.tabPanel.addChild(holder); return hr.work_flow_groups.init(host); case 97: host.holder.currentUrl = "work_flows"; host.funcs = { formWork_flowsInit: theme.formWork_flowsInit, formWork_flowsContentData: theme.formWork_flowsContentData, formWork_flowGetRow: theme.formWork_flowGetRow }; holder.name = LanguageModule.text("txt_work_flows"); hr.menu.tabPanel.addChild(holder); return hr.work_flows.init(host); case 98: host.holder.currentUrl = "stages_report"; host.funcs = { formReportStagesInit: theme.formReportStagesInit }; holder.name = LanguageModule.text("txt_stages_report"); hr.menu.tabPanel.addChild(holder); return hr.report_stages.init(host); case 100: host.holder.currentUrl = "activities"; host.funcs = { formActivitiesInit: theme.formActivitiesInit, formActivitiesContentData: theme.formActivitiesContentData, formActivitiesGetRow: theme.formActivitiesGetRow }; holder.name = LanguageModule.text("txt_to_do"); hr.menu.tabPanel.addChild(holder); return hr.activities.init(host); case 101: host.holder.currentUrl = "input_form_mobile"; host.direct = 0; host.funcs = { closeButton: theme.closeButton, saveButton: theme.saveButton, saveCloseButton: theme.saveCloseButton, addButton: theme.addButton, okButton: theme.okButton, inputFormInit: theme.inputFormInit, inputFormAddNew: theme.inputFormAddNew, loadTypeList: data_module.loadTypeList, loadFormContent: data_module.loadMobileFormContent, loadFormList: data_module.loadMobileInputFormList, loadUsersList: data_module.loadUsersList, loadPeoplesList: data_module.loadPeoplesList, loadOrgsList: data_module.loadOrgsList, loadEmployeesList: data_module.loadEmployeesList, loadPositionsList: data_module.loadPositionsList, loadGeographiesList: data_module.loadGeographiesList }; holder.name = LanguageModule.text("txt_input_form_mobile"); hr.menu.tabPanel.addChild(holder); return hr.input_form_mobile.init(host); case 102: host.holder.currentUrl = "output_form_mobile"; host.direct = 0; host.funcs = { closeButton: theme.closeButton, saveButton: theme.saveButton, saveCloseButton: theme.saveCloseButton, addButton: theme.addButton, okButton: theme.okButton, inputFormInit: theme.inputFormInit, inputFormAddNew: theme.inputFormAddNew, loadTypeList: data_module.loadTypeList, loadFormContent: data_module.loadMobileFormContent, loadFormList: data_module.loadMobileOutputFormList, loadUsersList: data_module.loadUsersList, loadPeoplesList: data_module.loadPeoplesList, loadOrgsList: data_module.loadOrgsList, loadEmployeesList: data_module.loadEmployeesList, loadPositionsList: data_module.loadPositionsList, loadGeographiesList: data_module.loadGeographiesList }; holder.name = LanguageModule.text("txt_output_form_mobile"); hr.menu.tabPanel.addChild(holder); return hr.output_form_mobile.init(host); case 103: return theme.checkinPartnerForm(host); case 104: host.holder.currentUrl = "options"; host.funcs = { formOptionsInit: theme.formOptionsInit }; holder.name = LanguageModule.text("txt_option"); hr.menu.tabPanel.addChild(holder); return hr.options.init(host); case 105: host.holder.currentUrl = "employee_templates"; host.funcs = { formEmployee_templatesInit: theme.formEmployee_templatesInit }; holder.name = LanguageModule.text("txt_employee_template"); hr.menu.tabPanel.addChild(holder); return hr.employee_templates.init(host); case 106: host.holder.currentUrl = "object_report"; host.funcs = { formReportObjectsInit: theme.formReportObjectsInit }; holder.name = LanguageModule.text("txt_object_report"); hr.menu.tabPanel.addChild(holder); return hr.report_objects.init(host); case 107: host.holder.currentUrl = "partner_report"; host.funcs = { formReportPartnerInit: theme.formReportPartnerInit }; holder.name = LanguageModule.text("txt_partner_report"); hr.menu.tabPanel.addChild(holder); return hr.report_partner.init(host); case 108: host.holder.currentUrl = "lesson_category"; host.funcs = {}; holder.name = LanguageModule.text("txt_lesson_category"); hr.menu.tabPanel.addChild(holder); return hr.lesson_category.init(host); case 109: host.holder.currentUrl = "lesson"; host.funcs = {}; host.openLink = window.extcontent; holder.name = LanguageModule.text("txt_lesson"); hr.menu.tabPanel.addChild(holder); return hr.lesson.init(host); case 110: host.holder.currentUrl = "functional_matrix"; host.funcs = {}; holder.name = LanguageModule.text("txt_functional_matrix"); hr.menu.tabPanel.addChild(holder); return hr.functional_matrix.init(host); case 111: host.holder.currentUrl = "exercise"; host.funcs = {}; holder.name = LanguageModule.text("txt_exercise"); hr.menu.tabPanel.addChild(holder); return hr.exercise.init(host); case 112: host.holder.currentUrl = "examination_category"; host.funcs = {}; holder.name = LanguageModule.text("txt_examination_category"); hr.menu.tabPanel.addChild(holder); return hr.examination_category.init(host); case 113: host.holder.currentUrl = "payroll_cycle"; host.funcs = {}; holder.name = LanguageModule.text("txt_payroll_cycle"); hr.menu.tabPanel.addChild(holder); return hr.payroll_cycle.init(host); case 114: host.holder.currentUrl = "timesheet"; host.funcs = {}; holder.name = LanguageModule.text("txt_timesheet"); hr.menu.tabPanel.addChild(holder); return hr.timesheet.init(host); case 115: host.holder.currentUrl = "examination"; host.funcs = {}; host.openLink = window.extcontent; holder.name = LanguageModule.text("txt_examination"); hr.menu.tabPanel.addChild(holder); return hr.examination.init(host); case 116: host.holder.currentUrl = "human_resource_policy_groups"; holder.name = LanguageModule.text("txt_human_resource_policy_group"); hr.menu.tabPanel.addChild(holder); return hr.human_resource_policy_groups.init(host); case 117: host.holder.currentUrl = "question_pool"; host.funcs = {}; holder.name = LanguageModule.text("txt_question_pool"); hr.menu.tabPanel.addChild(holder); return hr.question_pool.init(host); case 121: host.holder.currentUrl = "template_category"; host.funcs = { formTemplate_categoryInit: theme.formTemplate_categoryInit, formTemplate_categoryContentData: theme.formTemplate_categoryContentData, formTemplate_categoryGetRow: theme.formTemplate_categoryGetRow }; holder.name = LanguageModule.text("txt_template_groups"); hr.menu.tabPanel.addChild(holder); return hr.template_category.init(host); case 122: host.holder.currentUrl = "pay_sheet"; host.funcs = {}; holder.name = LanguageModule.text("txt_pay_sheet"); hr.menu.tabPanel.addChild(holder); return hr.pay_sheet.init(host); case 123: host.holder.currentUrl = "processes"; host.funcs = {}; holder.name = LanguageModule.text("txt_process"); hr.menu.tabPanel.addChild(holder); return hr.processes.init(host); case 124: host.holder.currentUrl = "execute"; host.funcs = {}; holder.name = LanguageModule.text("txt_execute"); hr.menu.tabPanel.addChild(holder); return hr.execute.init(host); case 125: host.holder.currentUrl = "examination_config_mail"; host.funcs = {}; holder.name = LanguageModule.text("txt_examination_config_mail"); hr.menu.tabPanel.addChild(holder); return hr.examination_config_mail.init(host); case 126: host.holder.currentUrl = "bsc_criteriadefinitions"; holder.name = LanguageModule.text("txt_kpi"); hr.menu.tabPanel.addChild(holder); return hr.bsc_criteriadefinitions.init(host); case 127: host.holder.currentUrl = "bsc_formulas"; holder.name = LanguageModule.text("txt_formula_performance"); hr.menu.tabPanel.addChild(holder); return hr.bsc_formulas.init(host); case 128: host.holder.currentUrl = "bsc_perspectives"; holder.name = LanguageModule.text("txt_perspective"); hr.menu.tabPanel.addChild(holder); return hr.bsc_perspectives.init(host); case 129: host.holder.currentUrl = "bsc_scorecards"; holder.name = LanguageModule.text("txt_scorecard"); hr.menu.tabPanel.addChild(holder); return hr.bsc_scorecards.init(host); case 130: host.holder.currentUrl = "bsc_accumulate_values"; holder.name = LanguageModule.text("txt_accumulate_values"); hr.menu.tabPanel.addChild(holder); return hr.bsc_accumulate_values.init(host); case 131: host.holder.currentUrl = "bsc_input_values"; holder.name = LanguageModule.text("txt_input_values"); hr.menu.tabPanel.addChild(holder); return hr.bsc_input_values.init(host); case 132: host.holder.currentUrl = "bsc_approval_values"; holder.name = LanguageModule.text("txt_approval_values"); hr.menu.tabPanel.addChild(holder); return hr.bsc_approval_values.init(host); case 133: host.holder.currentUrl = "bsc_report"; holder.name = LanguageModule.text("txt_report"); hr.menu.tabPanel.addChild(holder); return hr.bsc_reports.init(host); case 134: host.holder.currentUrl = "offboarding"; holder.name = LanguageModule.text("txt_offboarding"); host.funcs = { formOffboardingInit: theme.formOffboardingInit, formOffboardingContentData: theme.formOffboardingContentData, formOffboardingAddTask: theme.formOffboardingAddTask, formOffboardingAddNew: theme.formOffboardingAddNew, }; hr.menu.tabPanel.addChild(holder); return hr.offboarding.init(host); case 135: host.holder.currentUrl = "bsc_lock_scorecards"; holder.name = LanguageModule.text("txt_lock_scorecard"); hr.menu.tabPanel.addChild(holder); return hr.bsc_lock_scorecards.init(host); case 136: host.holder.currentUrl = "bsc_unlock_values"; holder.name = LanguageModule.text("txt_unlock_values"); hr.menu.tabPanel.addChild(holder); return hr.bsc_lock_values.init(host); case 137: host.holder.currentUrl = "companies"; holder.name = LanguageModule.text("txt_company"); hr.menu.tabPanel.addChild(holder); return hr.companies.init(host); case 138: host.holder.currentUrl = "human_resource_policies"; holder.name = LanguageModule.text("txt_human_resource_policy"); hr.menu.tabPanel.addChild(holder); return hr.human_resource_policies.init(host, hostid); case 139: host.holder.currentUrl = "human_resource_list"; holder.name = LanguageModule.text("txt_request_list"); hr.menu.tabPanel.addChild(holder); return hr.human_resource_list.init(host, hostid); case 140: host.holder.currentUrl = "human_resource_request"; holder.name = LanguageModule.text("txt_request"); hr.menu.tabPanel.addChild(holder); return hr.human_resource_request.init(host, hostid); case 141: host.holder.currentUrl = "templates"; host.funcs = { formTemplateInit: theme.formTemplateInit, formTaskTemplatesInit: theme.formTaskTemplatesInit, formTaskTemplatesContentData: theme.formTaskTemplatesContentData, formTaskTemplateGetRow: theme.formTaskTemplateGetRow, formTaskTemplateChooseGroup: theme.formTaskTemplateChooseGroup, formMeetingTemplatesInit: theme.formMeetingTemplatesInit, formMeetingTemplatesContentData: theme.formMeetingTemplatesContentData, formMeetingTemplateGetRow: theme.formMeetingTemplateGetRow, formMeetingTemplateChooseGroup: theme.formMeetingTemplateChooseGroup, formEmailTemplatesInit: theme.formEmailTemplatesInit, formEmailTemplatesContentData: theme.formEmailTemplatesContentData, formEmailTemplateGetRow: theme.formEmailTemplateGetRow, formEmailTemplateChooseGroup: theme.formEmailTemplateChooseGroup, formWelcomeTemplatesInit: theme.formWelcomeTemplatesInit }; holder.name = LanguageModule.text("txt_template"); hr.menu.tabPanel.addChild(holder); return hr.templates.init(host); case 142: host.holder.currentUrl = "human_resource_approval"; holder.name = LanguageModule.text("txt_approval"); hr.menu.tabPanel.addChild(holder); return hr.human_resource_approval.init(host, hostid); default: console.log("under construction (" + taskid + ")");; break; } }; if (hr.isMobile){ hr.menu.loadPage = hr.menu.loadPageMobile; } else { hr.menu.loadPage = hr.menu.loadPagePC; } hr.menu.staticFrameTasks = {}; hr.menu.nonAccentVietnamese = function (s) { return s.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, "a") .replace(/À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ/g, "A") .replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, "e") .replace(/È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ/g, "E") .replace(/ì|í|ị|ỉ|ĩ/g, "i") .replace(/Ì|Í|Ị|Ỉ|Ĩ/g, "I") .replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, "o") .replace(/Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ/g, "O") .replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, "u") .replace(/Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ/g, "U") .replace(/ỳ|ý|ỵ|ỷ|ỹ/g, "y") .replace(/Ỳ|Ý|Ỵ|Ỷ|Ỹ/g, "Y") .replace(/đ/g, "d") .replace(/Đ/g, "D") .replace(/\u0300|\u0301|\u0303|\u0309|\u0323/g, "") .replace(/\u02C6|\u0306|\u031B/g, ""); }; absol.coreDom.install("singlepagenfooter", function SinglePageNFooter(){ var res = absol._({ tag:'singlepage' // , // child:[ // hr.menu.footer() // ] }, true); return res; }); hr.menu.confirmPassword = function(host){ var pass = host.password_confirm.value.trim(); if (pass == "") { ModalElement.alert({ message: LanguageModule.text("war_no_password"), func: function(){ host.password_confirm.focus(); } }); return; } ModalElement.show_loading(); FormClass.api_call({ url: "account_confirm_password.php", params: [ { name: "pass", value: pass } ], func: function(success, message) { ModalElement.close(-1); if (success){ if (message == "ok"){ ModalElement.close(1); host.direct = 1; hr.menu.showProfile(host); } else if (message.substr(0,6) == "failed"){ DOMElement.removeAllChildren(host.notification); host.notification.appendChild(DOMElement.div({ attrs: {style: {color: "red", paddingBottom: "5px"}}, text: LanguageModule.text("war_txt_password_incorrect") })); host.password_confirm.focus(); return; } else { ModalElement.alert({ message: message }); return; } } else { ModalElement.alert({ message: message }); return; } } }) }; hr.menu.showProfile = function (host) { ModalElement.show_loading(); FormClass.api_call({ url: "database_load.php", params: [ {name: "task", value: "menu_user_profile"}, {name: "id", value: systemconfig.userid} ], func: function(success, message){ ModalElement.close(-1); if (success){ if (message.substr(0, 2) == "ok"){ host.dataUser = EncodingClass.string.toVariable(message.substr(2)); DOMElement.removeAllChildren(host.holder); var cmdbutton = { close: function () { if (hr.isMobile){ host.holder.selfRemove(); hr.menu.loadPage(1000); } else { hr.menu.tabPanel.removeTab(host.holder.id); } }, save: function(){ hr.menu.userprofile_update_submit(host, 0); }, save_close: function(){ hr.menu.userprofile_update_submit(host, 1); } }; host.personal_profileEdit = theme.formPersonalProfile({ cmdbutton: cmdbutton, data: { user_avatars: systemconfig.user_avatars, username: host.dataUser.username, fullname: host.dataUser.fullname, email: host.dataUser.email, language: LanguageModule.defaultcode, languageList: contentModule.generateLanguageList(), comment: host.dataUser.comment, theme: systemconfig.theme, font_level: systemconfig.font_level }, func: { theme_change: function(theme){ hr.menu.changeTheme(theme); } } }); host.holder.addChild(host.personal_profileEdit); } else { ModalElement.alert({message: message}); } } else { ModalElement.alert({message: message}); } } }); }; hr.menu.userprofile_update_submit = function (host, typesubmit) { var params = [], homeid = systemconfig.userid; var data = host.personal_profileEdit.getValue(); if (!data) return; if (data.newpassword !== undefined){ params.push({name: "oldpassword",value: data.oldpassword}); params.push({name: "newpassword",value: data.newpassword}); } if (data.user_avatars !== undefined){ if (systemconfig.connectorFile){ params.push({name: "newConectorFile", value: 1}); var x = data.user_avatars.indexOf("/"); var y = data.user_avatars.indexOf(";base64"); var suffixesFile = data.user_avatars.substr(x + 1, y - x - 1); var blob = absol.file.dataURItoBlob(data.user_avatars); var avatarFile = absol.file.blobToFile(blob, contentModule.generateRandom() + "." + suffixesFile); params.push({name: "avatar", value: avatarFile.name}); } else { params.push({name: "avatar", value: data.user_avatars}); } } params.push({name: "fullname",value: data.fullname}); params.push({name: "email",value: data.email}); params.push({name: "comment", value: data.comment}); params.push({name: "language",value: data.language}); params.push({name: "language",value: data.language}); if (hr.isMobile) params.push({name: "font_level",value: data.font_level}); params.push({name: "config",value: EncodingClass.string.fromVariable(data.config)}); ModalElement.show_loading(); FormClass.api_call({ url: "user_update2.php", params: params, func: function(success, message) { ModalElement.close(-1); if (success) { if (message.substr(0, 2) == "ok") { if (hr.isMobile && data.font_level != systemconfig.font_level){ systemconfig.font_level = data.font_level; systemconfig.styleConfig.setRule(':root', cssInitConfiguration[systemconfig.font_level]).commit(); window.dispatchEvent(new Event('resize')); } if (data.user_avatars !== undefined){ systemconfig.user_avatars = data.user_avatars; document.getElementById("user_avatar_img").style.backgroundImage = "url(" + systemconfig.user_avatars + ")"; if (systemconfig.connectorFile){ function saveFile(){ if (host.dataUser.avatar != "" && host.dataUser.file_new){ systemconfig.connectorFile.delete({ index: 0, path: ["user_avatars"], files: [systemconfig.userid + "_" + host.dataUser.avatar], onsuccess: function (){ console.log("success"); }, onfailed: function (content){ console.log(content); } }); } systemconfig.connectorFile.upload({ index: 0, path: ["user_avatars"], filehandle: avatarFile, filename: systemconfig.userid + "_" + avatarFile.name, onsuccess: function (content){ console.log(content); }, onfailed: function (content){ ModalElement.alert({message: LanguageModule.text("war_txt_no_upload_file")}); console.log(message); } }); host.dataUser.avatar = avatarFile.name; host.dataUser.file_new = 1; }; systemconfig.loadFolderFunc().then(function(value){ if (value) saveFile(); else { systemconfig.reconnectFile().then(function(){ saveFile(); }); } }); } else { var st = EncodingClass.string.toVariable(message.substr(2)); host.dataUser.avatar = st.avatar; host.dataUser.file_new = 0; } } if (data.language != LanguageModule.defaultcode) { location.reload(true); return; } if (typesubmit == 1){ hr.menu.tabPanel.removeTab(host.holder.id); } } else if (message == "war_txt_failed_email" || message == "war_txt_failed_password"){ ModalElement.alert({ message: LanguageModule.text(message) }); return; } else { ModalElement.alert({ message: message }); return; } } else { ModalElement.alert({ message: message }); return; } } }); }; hr.menu.logout = function(){ if (window.isApp){ ModalElement.show_loading(); FormClass.api_call({ url: "logout_app.php", params: [ {name: "storage", value: "hr_" + window.userToken}, {name: "cookie", value: getCookie("hr_user")} ], func: function(success, message) { ModalElement.close(-1); if (success){ if (message.substr(0,2) == "ok") { window.session = undefined; mobileHost.reload(); } else { ModalElement.alert({ message: message }); } } else { ModalElement.alert({ message: message }); } } }); } else { ModalElement.show_loading(); FormClass.api_call({ url: "logout.php", params: [], func: function(success, message) { ModalElement.close(-1); if (success){ if (message.substr(0,2) == "ok"){ window.location.href = window.location.href; } else { ModalElement.alert({ message: message, class: "button-black-gray" }); } } else { ModalElement.alert({ message: message, class: "button-black-gray" }); } } }); } } hr.menu.showMenuTab = function(){ var box = document.getElementById("box_menutab"); if (box.style.visibility == "visible"){ box.style.visibility = "hidden"; } else { box.style.visibility = "visible"; setTimeout(function () { absol.$('body').once('click', function(){ box.style.visibility = "hidden"; }, false); }, 100); } }; hr.menu.toggleSupportOnline = function(holder, iBridge){ var box = document.getElementById("box_support"); if (box.style.visibility == "visible"){ box.style.visibility = "hidden"; iBridge.invoke('focus'); iBridge.invoke('minimize'); } else { box.style.visibility = "visible"; iBridge.invoke('focus'); iBridge.invoke('maximize'); } }; hr.menu.removeNotificationQueue = function(content){ if (!systemconfig.userHasApp) return; var data = { sessionid: content.sessionid, localid: content.dataDraw[content.dataDraw.length - 1].localid }; FormClass.api_call({ url: "chat_remove_notitication_queue.php", params: [{name: "data", value: EncodingClass.string.fromVariable(data)}], func: function(success, message){ if (success){ if (message.substr(0,2) == "ok"){ // console.log("success removeNotificationQueue: ", content); } else { // console.log("Failed removeNotificationQueue: " + message); } } else { // console.log("Failed removeNotificationQueue: " + message); } } }); }; hr.menu.changeTheme = function(theme){ FormClass.api_call({ url: "theme_save.php", params: [{name: "theme", value: theme}], func: function(success, message){ if (success){ if (message.substr(0, 2) == "ok"){ systemconfig.theme = theme; hr.menu.makeTheme(); } else { ModalElement.alert({message: message}) } } else { ModalElement.alert({message: message}); } } }) }; hr.menu.makeTheme = function(){ if (hr.isMobile) return; if (systemconfig.theme == "") systemconfig.theme = hr.default_theme; if (systemconfig.oldTheme !== undefined) document.body.classList.remove(systemconfig.oldTheme); document.body.classList.add(systemconfig.theme); systemconfig.oldTheme = systemconfig.theme; }; hr.menu.themeList = function(){ return [ {value: "theme-dark-blue", text: LanguageModule.text("txt_dark_blue_theme")}, {value: "theme-sky-blue", text: LanguageModule.text("txt_sky_blue_theme")}, {value: "theme-dark-green", text: LanguageModule.text("txt_dark_green_theme")}, {value: "theme-light-ocean-blue", text: LanguageModule.text("txt_light_ocean_blue_theme")}, {value: "theme-celadon", text: LanguageModule.text("txt_celadon_theme")}, {value: "theme-red", text: LanguageModule.text("txt_red_theme") + " (" + LanguageModule.text("txt_default") + ")"}, {value: "theme-orange", text: LanguageModule.text("txt_orange_theme")}, {value: "theme-violet", text: LanguageModule.text("txt_violet_theme")} ]; }; hr.menu.showNotificationCenter = function(){ hr.SupportPage = (function(){ var support_online_iframe = document.createElement("iframe"); support_online_iframe.style.border = "none"; var iBridge = IFrameBridge.fromIFrame(support_online_iframe); var userid = systemconfig.userid; var companyid = systemconfig.companyid; var serviceid = systemconfig.serviceid; support_online_iframe.src = "https://" + window.location.host + "/online_support/ui_customer_chatbox2.php?userid="+ userid +"&&companyid=" +companyid+ "&&serviceid=" + serviceid; support_online_iframe.style.width = "100%"; support_online_iframe.style.height = "100%"; support_online_iframe.style.border = "none"; var OverviewPage = absol.OverviewPage; function SupportPage(host){ OverviewPage.apply(this, arguments); } absol.OOP.mixClass(SupportPage, OverviewPage); SupportPage.prototype.createView = function(){ this.$view = support_online_iframe; }; SupportPage.prototype.onStart = function(){ }; SupportPage.prototype.name = LanguageModule.text("txt_online_support"); SupportPage.prototype.tabIcon = { tag: 'span', class:['mdi','mdi-help-circle-outline'] }; iBridge.on('seen', function(){ hr.mSupportPage.counter = 0; }); iBridge.on('newmess', function(number){ hr.mSupportPage.counter = number; }); window.iBridge = iBridge; return SupportPage; })(); hr.CommentPage = (function(){ var OverviewPage = absol.OverviewPage; function CommentPage(host){ OverviewPage.apply(this, arguments); } absol.OOP.mixClass(CommentPage, OverviewPage); var comment_page_ctn = DOMElement.div({}); CommentPage.prototype.createView = function(){ this.$view = comment_page_ctn; }; CommentPage.prototype.onStart = function(){ var self = this; data_module.loadCommentList().then(function(content){ var host = {database: {}}; host.number_of_unread = content.number_of_unread; delete content.number_of_unread; self.counter = host.number_of_unread; contentModule.makeDatabaseContent(host, content); host.holder = comment_page_ctn; contentModule.createCommentPage(host); }); }; CommentPage.prototype.name = LanguageModule.text("txt_comment"); CommentPage.prototype.tabIcon = { tag: 'span', class:['mdi','mdi-comment-multiple-outline'] }; return CommentPage; })(); hr.ChatPage = (function(){ var OverviewPage = absol.OverviewPage; function ChatPage(host){ OverviewPage.apply(this, arguments); } absol.OOP.mixClass(ChatPage, OverviewPage); var chat_page_ctn = DOMElement.div({}); ChatPage.prototype.createView = function(){ this.$view = chat_page_ctn; }; ChatPage.prototype.onStart = function(){ var self = this; Promise.all([data_module.loadChatList(), data_module.loadEmployeeItemsPrivView(), data_module.loadNumberOfChatUnread()]).then(function(values){ self.counter = values[2]; var host = values[1]; contentModule.makeDatabaseContent(host, values[0]); contentModule.makeUserEmployeeName(host); host.holder = chat_page_ctn; host.isNotiCenter = true; contentModule.createChatPage(host); }); }; ChatPage.prototype.name = LanguageModule.text("txt_chat"); ChatPage.prototype.tabIcon = { tag: 'span', class:['mdi','mdi-chat-processing-outline'] }; return ChatPage; })(); hr.mCommentPage = new hr.CommentPage(); hr.mChatPage = new hr.ChatPage(); hr.mSupportPage = new hr.SupportPage(); hr.overviewWidget = new absol.OverviewWidget({}, [hr.mCommentPage, hr.mChatPage, hr.mSupportPage]); hr.overviewWidget.onStart(); }; if (hr.isMobile){ hr.notification_comment_ctn = DOMElement.div({ attrs: { style: { height: "100%" } }, children: [absol.buildDom({ tag: 'spinnerico', style: { width: "100px" } })] }); hr.chat_ctn = DOMElement.div({ attrs: { style: { height: "100%" } }, children: [absol.buildDom({ tag: 'spinnerico', style: { width: "100px" } })] }); } hr.menu.init = function(holder){ hr.menu.makeTheme(); DOMElement.removeAllChildren(holder); var triggerFunc = function(){ var h,h1; var companyConfig = database.company; var homehref; homehref = window.location.origin + "/"; var homepath = window.location.pathname.substr(1); var x0 = homepath.indexOf("/"); homehref += homepath.substr(0,x0 + 1); var serviceActiveList = []; var nowTime = new Date().getTime(); for (var i = 0; i < database.register.items.length; i++){ var serviceId = database.register.items[i].serviceid; var serviceIndex = database.services.getIndex(serviceId); if (serviceIndex < 0) continue; if (database.register.items[i].expireddate.getTime() < nowTime) continue; if ((database.services.items[serviceIndex].target == "") && (database.services.items[serviceIndex].prefix == "")) continue; database.services.items[serviceIndex].avai = 1; serviceActiveList.push({ link: homehref + database.services.items[serviceIndex].subDNS, logo: database.services.items[serviceIndex].srcimg, name: LanguageModule.text(database.services.items[serviceIndex].name) }); } var serviceInactiveList = []; for (i = 0; i < database.services.items.length; i++){ if ((database.services.items[i].target == "") && (database.services.items[i].prefix == "")) continue; if (database.services.items[i].avai != 1){ serviceInactiveList.push({ logo: database.services.items[i].srcimgDisabled, name: LanguageModule.text(database.services.items[i].name) }); } } if (!hr.isMobile){ hr.menu.showNotificationCenter(); } else { hr.menu.loadDataChatComment(); } var cmdMenu = { personal_profile: function (index) { return hr.menu.loadPage(1); }, logout: function (index) { hr.menu.logout(); }, showMenuService: function (event, me) { hr.menu.showMenuTab(holder); } }; cmdMenu.employee_templates = function(){ return hr.menu.loadPage(105); }; if (systemconfig.privSystem >= 2 || data_module.employeeOfMe.length > 0){ if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.template){ cmdMenu.welcome_templates = function(){ return hr.menu.loadPage(141); }; cmdMenu.task_templates = function(){ return hr.menu.loadPage(141); }; cmdMenu.meeting_templates = function(){ return hr.menu.loadPage(141); }; cmdMenu.email_templates = function(){ return hr.menu.loadPage(141); }; cmdMenu.template_category = function(){ return hr.menu.loadPage(121); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.document_templates){ cmdMenu.document_templates = function(){ return hr.menu.loadPage(82); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.document_properties){ cmdMenu.document_properties = function(){ return hr.menu.loadPage(88); }; } cmdMenu.document_manager = function(){ return hr.menu.loadPage(80); }; cmdMenu.onboarding = function(){ return hr.menu.loadPage(84); }; cmdMenu.offboarding = function(){ return hr.menu.loadPage(134); }; cmdMenu.offboarding_types = function(){ return hr.menu.loadPage(90); }; cmdMenu.offboarding_reasons = function(){ return hr.menu.loadPage(91); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.human_resource_policy_group){ cmdMenu.human_resource_policy_groups = function(){ return hr.menu.loadPage(116); }; } cmdMenu.projects = function(){ return hr.menu.loadPage(76); }; cmdMenu.human_resource_policies = function(hostid){ return hr.menu.loadPage(138, hostid); }; cmdMenu.human_resource_list = function(hostid){ return hr.menu.loadPage(139, hostid); }; cmdMenu.human_resource_request = function(hostid){ return hr.menu.loadPage(140, hostid); }; cmdMenu.human_resource_approval = function(hostid){ return hr.menu.loadPage(142, hostid); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.ethnics){ cmdMenu.ethnics = function(){ return hr.menu.loadPage(57); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.religions){ cmdMenu.religions = function(){ return hr.menu.loadPage(58); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.employment_contract_types){ cmdMenu.employment_contract_types = function(){ return hr.menu.loadPage(59); }; } cmdMenu.employment_contract = function(){ return hr.menu.loadPage(66); }; cmdMenu.salary_decisions = function(){ return hr.menu.loadPage(71); }; cmdMenu.shift_schedule = function(){ return hr.menu.loadPage(64); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.training_program_groups){ cmdMenu.training_program_groups = function(){ return hr.menu.loadPage(32); }; } cmdMenu.my_assets = function(){ return hr.menu.loadPage(29); }; // cmdMenu.activities_meeting = function(){ // return hr.menu.loadPage(16); // }; // cmdMenu.activities_task = function(){ // return hr.menu.loadPage(15); // }; cmdMenu.checkin = function(){ if (hr.isMobile) theme.checkinPartnerForm({}); else return hr.menu.loadPage(103); }; cmdMenu.project_checkin = function(){ theme.checkinProjectForm({}); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.holidays){ cmdMenu.holidays = function(){ return hr.menu.loadPage(18); }; } cmdMenu.worktime_logs = function(){ return hr.menu.loadPage(22); }; cmdMenu.worktime_machines = function(){ return hr.menu.loadPage(21); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.warehouse_list){ cmdMenu.warehouses = function(){ return hr.menu.loadPage(26); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.asset_category){ cmdMenu.asset_category = function(){ return hr.menu.loadPage(74); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.instruments_and_tools_category){ cmdMenu.instruments_and_tools_category = function(){ return hr.menu.loadPage(75); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.instruments_and_tool_list){ cmdMenu.instruments_and_tools = function(){ return hr.menu.loadPage(27); }; } cmdMenu.asset_handover = function(){ return hr.menu.loadPage(28); }; cmdMenu.instruments_and_tools_handover = function(){ return hr.menu.loadPage(85); }; if (systemconfig.privSystem >= 2) cmdMenu.employee_groups = function(){ return hr.menu.loadPage(87); }; cmdMenu.chats = function(){ return hr.menu.loadPage(86); }; cmdMenu.asset_recall = function(){ return hr.menu.loadPage(73); }; cmdMenu.worktime_checkins = function(){ return hr.menu.loadPage(20); }; cmdMenu.shifts = function(){ return hr.menu.loadPage(19); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.training_programs){ cmdMenu.training_programs = function(){ return hr.menu.loadPage(24); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.examination_programs){ cmdMenu.examination_programs = function(){ return hr.menu.loadPage(62); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.asset_list){ cmdMenu.assets = function(){ return hr.menu.loadPage(25); }; } cmdMenu.payroll_cycle = function(){ return hr.menu.loadPage(113); }; cmdMenu.timesheet = function(){ return hr.menu.loadPage(114); }; cmdMenu.pay_sheet = function(){ return hr.menu.loadPage(122); }; cmdMenu.processes = function(){ return hr.menu.loadPage(123); }; cmdMenu.execute = function(){ return hr.menu.loadPage(124); }; cmdMenu.orgs = function(){ return hr.menu.loadPage(11); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.geographical_position){ cmdMenu.geopos = function(){ return hr.menu.loadPage(10); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.setting_system_menu){ cmdMenu.options = function(){ return hr.menu.loadPage(104); }; cmdMenu.form_config = function(){ return hr.menu.loadPage(9); }; cmdMenu.nations = function(){ return hr.menu.loadPage(55); }; cmdMenu.cities = function(){ return hr.menu.loadPage(56); }; cmdMenu.variable_input_form = function(){ return hr.menu.loadPage(17); }; cmdMenu.paths = function(){ return hr.menu.loadPage(12); }; cmdMenu.functions = function(){ return hr.menu.loadPage(23); }; cmdMenu.output_form = function(){ return hr.menu.loadPage(5); }; cmdMenu.input_form = function(){ return hr.menu.loadPage(4); }; cmdMenu.datatypes = function(){ return hr.menu.loadPage(3); }; } if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.partner_class) cmdMenu.partner_class = function(){ return hr.menu.loadPage(92); }; cmdMenu.partner = function(){ return hr.menu.loadPage(93); }; cmdMenu.contact = function(){ return hr.menu.loadPage(94); }; cmdMenu.partner_checkin = function(){ return hr.menu.loadPage(95); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.work_flow_groups) cmdMenu.work_flow_groups = function(){ return hr.menu.loadPage(96); }; cmdMenu.work_flows = function(){ return hr.menu.loadPage(97); }; if (systemconfig.privSystem >= 2) cmdMenu.user = function(){ return hr.menu.loadPage(2); }; cmdMenu.report_stages = function(){ return hr.menu.loadPage(98); }; cmdMenu.activities = function(){ return hr.menu.loadPage(100); }; if (systemconfig.privSystem >= 2) cmdMenu.input_form_mobile = function(){ return hr.menu.loadPage(101); }; if (systemconfig.privSystem >= 2) cmdMenu.output_form_mobile = function(){ return hr.menu.loadPage(102); }; cmdMenu.report_objects = function(){ return hr.menu.loadPage(106); }; cmdMenu.report_partner = function(){ return hr.menu.loadPage(107); }; cmdMenu.lesson_category = function(){ return hr.menu.loadPage(108); }; cmdMenu.lesson = function(){ return hr.menu.loadPage(109); }; cmdMenu.exercise = function(){ return hr.menu.loadPage(111); }; cmdMenu.examination_category = function(){ return hr.menu.loadPage(112); }; cmdMenu.examination = function(){ return hr.menu.loadPage(115); }; cmdMenu.examination_config_mail = function(){ return hr.menu.loadPage(125); }; cmdMenu.question_pool = function(){ return hr.menu.loadPage(117); }; if (systemconfig.privSystem >= 2 || data_module.admin_rights_of_me.functional_matrixs_scorecards){ cmdMenu.functional_matrix = function(){ return hr.menu.loadPage(110); }; cmdMenu.bsc_criteriadefinitions = function(){ return hr.menu.loadPage(126); }; cmdMenu.bsc_formulas = function(){ return hr.menu.loadPage(127); }; cmdMenu.bsc_perspectives = function(){ return hr.menu.loadPage(128); }; } cmdMenu.bsc_scorecards = function(){ return hr.menu.loadPage(129); }; cmdMenu.bsc_accumulate_values = function(){ return hr.menu.loadPage(130); }; cmdMenu.bsc_input_values = function(){ return hr.menu.loadPage(131); }; cmdMenu.bsc_approval_values = function(){ return hr.menu.loadPage(132); }; cmdMenu.bsc_lock_scorecards = function(){ return hr.menu.loadPage(135); }; cmdMenu.bsc_lock_values = function(){ return hr.menu.loadPage(136); }; cmdMenu.bsc_report = function(){ return hr.menu.loadPage(133); }; cmdMenu.templates = function(){ return hr.menu.loadPage(141); }; if (systemconfig.privSystem >= 2) cmdMenu.companies = function(){ return hr.menu.loadPage(137); }; cmdMenu.help = function(){ window.open("/help", "_blank"); }; } else { setTimeout(function(){ ModalElement.alert({message: LanguageModule.text("war_txt_you_need_to_link_with_an_employee_in_organization_chart_to_use_app_functions")}); }, 500); } var onMessageFunc = function(message){ var message = EncodingClass.string.duplicate(message); contentModule.shareMessageReceiver.handleMessage(message); }; var hostName = window.domain; var x = hostName.indexOf("://"); if (x >= 0) hostName = hostName.substr(x + 3); x = hostName.indexOf("/"); hostName = hostName.substr(0, x); var x = window.domain.indexOf(hostName); var y = window.domain.indexOf("/hr"); var channel = window.domain.substr(x + hostName.length + 1, y - (x + hostName.length + 1)); var connectorChat = ChatClass.connect({ host: hostName, channel: channel + "/hr", onMessage: function(message){ onMessageFunc(message); }, onConnectionLost: function(message){ console.log("onConnectionLost"); }, onConnect: function(){ console.log("connect_" + (new Date()).getTime()); }, onClosed: function(message){ console.log("onClosed", message); }, onReconnect: function(){ } }); setTimeout(function(connectorChat){ return function(){ connectorChat.echo = true; } }(connectorChat), 2000); hr.sendMessageFunc = function (connectorChat) { return function(content){ content.userid = systemconfig.userid; connectorChat.send({ content: content, receivertype: "all", onsent: function () { // console.log("send mess", content); } }); }; } (connectorChat); hr.menu.menuHeader = theme.menuHeader({ serviceLogo: "/general_images/Logo_keeview.png", serviceActiveList: serviceActiveList, serviceInactiveList: serviceInactiveList, privSystem: systemconfig.privSystem, cmd: cmdMenu, username: systemconfig.username, user_avatars: systemconfig.user_avatars, companyWebsite: companyConfig.website, companyLogo: (companyConfig.logo == "") ? "" : window.domainCompany_logo + companyConfig.logo }); hr.menu.layoutInit = theme.layoutInit({ header: hr.menu.menuHeader, tabPanel: hr.menu.tabPanel, tabBar: hr.menu.mobileTabbar }); holder.appendChild(hr.menu.layoutInit); data_module.loadAllEmployeesList(); data_module.loadConfigBsc(); data_module.pendingData = { status: "pending", promiseArray: [ form_module.loadDefaultCircuitOfForm(), data_module.loadInputFormList(), data_module.loadMobileInputFormList(), data_module.loadMobileOutputFormList(), data_module.loadOutputFormList(), data_module.loadType_listsList() ] }; Promise.all(data_module.pendingData.promiseArray).then(function(value){ var content = { input_forms: value[1], mobile_input_forms: value[2], mobile_output_forms: value[3], output_forms: value[4], typelists: value[5] }; data_module.makeDatabaseCommon(content); data_module.typelists.items = contentModule.getDatatypePrimitiveList().concat(data_module.typelists.items); contentModule.makeInputFormDecode(data_module.input_forms.items); contentModule.makeInputFormDecode(data_module.mobile_input_forms.items); contentModule.makeOutputFormDecode(data_module.output_forms.items); contentModule.makeOutputFormDecode(data_module.mobile_output_forms.items); var p1 = hr.input_form.loadFormConstructorToAssembler(data_module.input_forms.items, data_module.typelists.items); var p2 = hr.output_form.loadFormConstructorToAssembler(data_module.output_forms.items, data_module.typelists.items); var p3 = hr.input_form_mobile.loadFormConstructorToAssembler(data_module.mobile_input_forms.items, data_module.typelists.items); var p4 = hr.output_form_mobile.loadFormConstructorToAssembler(data_module.mobile_output_forms.items, data_module.typelists.items); Promise.all([p1, p2, p3, p4]).then(function(){data_module.pendingData.status = "success";}, function(message){console.log(message); data_module.pendingData.status = "error";}); }); data_module.partner_loading = false; data_module.loadPartnerOnTop = function(){ data_module.partner_loading = true; data_module.loadDataPartnerClassGlobal().then(function() { if (data_module.partnerReady !== true) data_module.loadDataPartnerGlobal(); }); if (data_module.contactReady !== true) data_module.loadDataContactGlobal(); } setTimeout(function(){ data_module.loadPartnerOnTop(); }, 30000); if (hr.isMobile){ hr.menu.loadPage(1002); hr.menu.loadPage(1000); } else if (database.onboarding.length > 0) { data_module.welcomeFunc(database.onboarding[0].employeeid); } else { var ex = false; for (param in cmdMenu){ if (param == window.exttask){ if (window.extcontent){ cmdMenu[param]().then(function(host){ switch (window.exttask) { case "worktime_checkins": hr.worktime_checkins.addWorktime_checkin(host, window.extcontent, function(){ hr.worktime_checkins.redraw(host); }); break; case "worktime_logs": hr.worktime_logs.addWorktime_log(host, window.extcontent, function(){ hr.worktime_logs.redraw(host); }); break; case "asset_handover": data_module.loadCompanyidFromAsset_transactionsById(host, window.extcontent).then(function(orgid){ hr.asset_handover.init2(host).then(function(){ hr.asset_handover.viewAsset_handoverPre(host, window.extcontent); }); }); break; case "instruments_and_tools_handover": data_module.loadCompanyidFromAsset_transactionsById(host, window.extcontent).then(function(orgid){ hr.instruments_and_tools_handover.init2(host).then(function(){ hr.instruments_and_tools_handover.viewInstruments_and_tools_handoverPre(host, window.extcontent); }); }); break; case "asset_recall": data_module.loadCompanyidFromAsset_transactionsById(host, window.extcontent).then(function(orgid){ hr.asset_recall.init2(host).then(function(){ hr.asset_recall.viewAsset_recallPre(host, window.extcontent); }); }); break; case "employment_contract": data_module.loadCompanyidFromEmployment_ContractById(host, window.extcontent).then(function(orgid){ hr.employment_contract.init2(host).then(function(){ hr.employment_contract.showEmployment_contractPre(host, window.extcontent); }); }); break; case "salary_decisions": data_module.loadCompanyidFromSalary_decisionById(host, window.extcontent).then(function(orgid){ hr.salary_decisions.init2(host).then(function(){ hr.salary_decisions.showSalary_decisionsPre(host, window.extcontent); }); }); break; case "document_types": hr.document_types.addDocument_type(host, window.extcontent, function(value){ hr.document_types.redraw(host); }); break; case "document_groups": var index = host.database.document_groups.getIndex(window.extcontent); if (index >= 0){ var item = host.database.document_groups.items[index]; hr.document_groups.addDocument_group(host, item.parentid, item.id, function(){ hr.document_groups.redraw(host); }); } break; case "document_properties": var index = host.database.document_properties.getIndex(window.extcontent); if (index >= 0){ var item = host.database.document_properties.items[index]; hr.document_properties.addDocument_property(host, item.parentid, item.id, function(){ hr.document_properties.redraw(host); }); } break; case "document_templates": hr.document_templates.showDocument_templatePre(host, window.extcontent); break; case "employment_contract_types": hr.employment_contract_types.addEmployment_contract_type(host, window.extcontent, function(){ hr.employment_contract_types.redraw(host); }); break; case "geopos": hr.geopos.addGeopos(host, window.extcontent, function(){ hr.geopos.redraw(host); }); break; case "holidays": hr.holidays.addHoliday(host, window.extcontent, function(){ hr.holidays.redraw(host); }); break; case "projects": hr.projects.showProjectPre(host, window.extcontent, function(){ hr.projects.redraw(host); }); break; case "ethnics": hr.ethnics.addEthnic(host, window.extcontent, function(){ hr.ethnics.redraw(host); }); break; case "religions": hr.religions.addReligion(host, window.extcontent, function(){ hr.religions.redraw(host); }); break; case "shifts": hr.shifts.showShift(host, window.extcontent); break; case "worktime_machines": hr.worktime_machines.addWorktime_machine(host, window.extcontent, function(){ hr.worktime_machines.redraw(host); }); break; case "warehouses": hr.warehouses.showWarehousePre(host, window.extcontent); break; case "asset_category": hr.asset_category.addAsset_category(host, window.extcontent); break; case "template_category": hr.template_category.addTemplate_category(host, window.extcontent); break; case "instruments_and_tools_category": hr.instruments_and_tools_category.addInstruments_and_tools_category(host, window.extcontent); break; case "datatypes": hr.datatypes.addDatatype(host, window.extcontent, function(){ hr.datatypes.redraw(host); }); break; case "nations": hr.nations.addNation(host, window.extcontent, function(){ hr.nations.redraw(host); }); break; case "cities": hr.cities.addCity(host, window.extcontent, function(){ hr.cities.redraw(host); }); break; case "task_templates": hr.templates.loadData(host, 0, "task").then(function(){ hr.task_templates.addTaskTemplate(host, window.extcontent, function(){ hr.task_templates.redraw(host); }); }) break; case "meeting_templates": hr.templates.loadData(host, 0, "meeting").then(function(){ hr.meeting_templates.addTaskTemplate(host, window.extcontent, function(){ hr.meeting_templates.redraw(host); }); }) break; case "email_templates": hr.templates.loadData(host, 0, "email").then(function(){ hr.email_templates.addEmailTemplate(host, window.extcontent, function(){ hr.email_templates.redraw(host); }); }) break; case "onboarding": data_module.loadCompanyidFromOnboardingById(host, window.extcontent).then(function(orgid){ hr.onboarding.init2(host).then(function(){ hr.onboarding.showOnboardingPre(host, window.extcontent, function(){ hr.onboarding.redraw(host); }); }); }); break; case "offboarding_types": hr.offboarding_types.addOffboarding_type(host, window.extcontent, function(){ hr.offboarding_types.redraw(host); }); break; case "offboarding_reasons": hr.offboarding_reasons.addOffboarding_reason(host, window.extcontent, function(){ hr.offboarding_reasons.redraw(host); }); break; case "document_manager": host.folderid = window.extcontent; hr.document_manager.redrawFolderDetails(host); break; case "paths": host.pathid = window.extcontent; hr.paths.redrawPathDetails(host); hr.paths.highlightRow(host, host.tableView.data); break; case "welcome_templates": hr.templates.loadData(host, 0, "welcome").then(function(){ hr.welcome_templates.editWelcomeTemplate(host, window.extcontent); }) break; case "partner_class": hr.partner_class.addPartner_class(host, window.extcontent, function(){ hr.partner_class.redraw(host); }); break; case "partner": hr.partner.showPartnerPre(host, window.extcontent); break; case "contact": hr.contact.showContactPre(host, window.extcontent); break; case "employee_groups": hr.employee_groups.showEmployee_groupPre(host, window.extcontent); break; case "lesson_categories": hr.lesson_categories.addLesson_category(host, window.extcontent); break; default: } }); } else { cmdMenu[param](); } ex = true; } } if (!ex){ console.log(window.exttask); switch (window.exttask) { case "lesson_view": cmdMenu.lesson(); break; case "do_examination": cmdMenu.examination(); break; case "edit_department": case "view_employee": case "edit_position": cmdMenu.orgs().then(function(host){ if (window.exttask == "edit_department"){ data_module.loadOrgById(window.extcontent).then(function(item){ hr.orgs.addDepartmentPre(host, item.parentid, item.id); }); } else if (window.exttask == "view_employee"){ data_module.loadEmployeeById(window.extcontent).then(function(item){ hr.orgs.showEmployeePre(host, item.id); }); } else if (window.exttask == "edit_position"){ data_module.loadPositionById(window.extcontent).then(function(item){ hr.orgs.addPositionPre(host, item.orgid, item.id); }); } }); break; case "view_document": cmdMenu.document_manager().then(function(host){ hr.document_manager.showDocumentPre(host, window.extcontent); }); break; case "work_flows_settings": cmdMenu.work_flows().then(function(host){ hr.work_flows.settingWork_flowPre(host, window.extcontent); }); break; case "work_flows_kanban_view": cmdMenu.work_flows().then(function(host){ hr.work_flows.showWorkFlow(host, window.extcontent, "kanban"); }); break; case "work_flows_object_view": hr.menu.openObjectById(window.extcontent); break; case "work_flows_table_view": cmdMenu.work_flows().then(function(host){ hr.work_flows.showWorkFlow(host, window.extcontent, "table"); }); break; case "activities_meeting": hr.menu.openMeetingById(window.extcontent); break; case "activities_task": hr.menu.openTaskById(window.extcontent); break; case "allowance_policies": case "insurance_policies": case "leave_policies": case "benefit_policies": case "bonus_policies": case "punishment_policies": case "tax_policies": case "advance_payment_policies": case "late_early_checkin_policies": case "trade_union_policies": case "overtime_policies": case "other_liability_policies": var x = window.exttask.indexOf("_policies"); var type = window.exttask.substr(0, x); cmdMenu.human_resource_policies(type).then(function(host){ hr[window.exttask]["show" + type[0].toUpperCase() + type.substr(1) + "_policyPre"](host[type], window.extcontent); }); break; case "bonus_list": case "benefit_list": case "punishment_list": case "allowance_list": case "salary_adjustment_list": case "other_liability_list": var x = window.exttask.indexOf("_list"); var type = window.exttask.substr(0, x); cmdMenu.human_resource_list(type).then(function(host){ hr[window.exttask]["show" + type[0].toUpperCase() + type.substr(1) + "_listPre"](host[type], window.extcontent); }); break; default: openLinkDefault(); } } } console.log(new Date().getTime(), 4); }; var openLinkDefault = function(){ }; var prerequisites = [ "Common_view", "Activities_view", "Contact_view", "Onboarding_view", "Partner_checkin_view", "Partner_view", "Work_flows_view" ]; if (ModuleManagerClass.isReady("Menu")){ triggerFunc(); } else { ModuleManagerClass.register({ name: "Menu", prerequisites: prerequisites, trigger: triggerFunc }); } };