TimeTrex/interface/html5/dist/policy-contributing_shift_policy-ContributingShiftPolicyViewController.bundle.js

1 line
92 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["policy-contributing_shift_policy-ContributingShiftPolicyViewController"],{4362:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ContributingShiftPolicyViewController\": () => (/* binding */ ContributingShiftPolicyViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass ContributingShiftPolicyViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#contributing_shift_policy_view_container',\n\n\t\t\ttype_array: null,\n\t\t\tinclude_holiday_type_array: null,\n\t\t\tinclude_shift_type_array: null,\n\n\t\t\tbranch_selection_type_array: null,\n\t\t\tdepartment_selection_type_array: null,\n\n\t\t\tjob_group_selection_type_array: null,\n\t\t\tjob_selection_type_array: null,\n\n\t\t\tjob_group_array: null,\n\t\t\tjob_item_group_array: null,\n\t\t\tpunch_tag_group_array: null,\n\n\t\t\tjob_item_group_selection_type_array: null,\n\t\t\tjob_item_selection_type_array: null,\n\n\t\t\tpunch_tag_group_selection_type_array: null,\n\t\t\tpunch_tag_selection_type_array: null,\n\n\t\t\tjob_group_api: null,\n\t\t\tjob_item_group_api: null,\n\t\t\tpunch_tag_group_api: null,\n\t\t\tdate_api: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'ContributingShiftPolicyEditView.html';\n\t\tthis.permission_id = 'contributing_shift_policy';\n\t\tthis.viewId = 'ContributingShiftPolicy';\n\t\tthis.script_name = 'ContributingShiftPolicyView';\n\t\tthis.table_name_key = 'contributing_shift_policy';\n\t\tthis.context_menu_name = $.i18n._( 'Contributing Shift Policy' );\n\t\tthis.navigation_label = $.i18n._( 'Contributing Shift Policy' );\n\t\tthis.api = TTAPI.APIContributingShiftPolicy;\n\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\tthis.job_group_api = TTAPI.APIJobGroup;\n\t\t\tthis.job_item_group_api = TTAPI.APIJobItemGroup;\n\t\t\tthis.punch_tag_group_api = TTAPI.APIPunchTagGroup;\n\t\t}\n\n\t\tthis.date_api = TTAPI.APITTDate;\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tvar options = [\n\t\t\t{ option_name: 'type', api: this.api },\n\t\t\t{ option_name: 'include_holiday_type', api: this.api },\n\t\t\t{ option_name: 'include_shift_type', api: this.api },\n\t\t\t{ option_name: 'branch_selection_type', api: this.api },\n\t\t\t{ option_name: 'department_selection_type', api: this.api },\n\t\t\t{ option_name: 'job_group_selection_type', api: this.api },\n\t\t\t{ option_name: 'job_selection_type', api: this.api },\n\t\t\t{ option_name: 'job_item_group_selection_type', api: this.api },\n\t\t\t{ option_name: 'job_item_selection_type', api: this.api },\n\t\t\t{ option_name: 'punch_tag_group_selection_type', api: this.api },\n\t\t\t{ option_name: 'punch_tag_selection_type', api: this.api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options );\n\n\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\tthis.job_group_api.getJobGroup( '', false, false, {\n\t\t\t\tonResult: function( res ) {\n\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tres = Global.buildTreeRecord( res );\n\t\t\t\t\t$this.job_group_array = res;\n\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tthis.job_item_group_api.getJobItemGroup( '', false, false, {\n\t\t\t\tonResult: function( res ) {\n\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tres = Global.buildTreeRecord( res );\n\t\t\t\t\t$this.job_item_group_array = res;\n\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tthis.punch_tag_group_api.getPunchTagGroup( '', false, false, {\n\t\t\t\tonResult: function( res ) {\n\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tres = Global.buildTreeRecord( res );\n\t\t\t\t\t$this.punch_tag_group_array = res;\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tbui