TimeTrex/interface/html5/dist/attendance-job-JobViewController.bundle.js

1 line
102 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["attendance-job-JobViewController"],{1088:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JobViewController\": () => (/* binding */ JobViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass JobViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#job_view_container',\n\n\t\t\t// _required_files: {\n\t\t\t// \t15: ['leaflet-timetrex']\n\t\t\t// },\n\t\t\tstatus_array: null,\n\n\t\t\tjob_group_array: null,\n\t\t\tjob_group_api: null,\n\t\t\tuser_group_api: null,\n\t\t\tjob_item_group_api: null,\n\t\t\tjob_detail_report_api: null,\n\n\t\t\tuser_group_selection_type_array: null,\n\t\t\tuser_branch_selection_type_array: null,\n\t\t\tuser_department_selection_type_array: null,\n\t\t\tjob_item_group_selection_type_array: null,\n\t\t\tuser_title_selection_type_id_array: null,\n\n\t\t\tuser_group_array: null,\n\n\t\t\tsub_document_view_controller: null,\n\n\t\t\tsub_job_item_amendment_view_controller: null,\n\n\t\t\tdocument_object_type_id: null,\n\t\t\tdate_api: null,\n\t\t\treport_template: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\n\t\t\te_province_array: null,\n\n\t\t\tcompany_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 = 'JobEditView.html';\n\t\tthis.permission_id = 'job';\n\t\tthis.viewId = 'Job';\n\t\tthis.script_name = 'JobView';\n\t\tthis.table_name_key = 'job';\n\t\tthis.context_menu_name = $.i18n._( 'Job' );\n\t\tthis.navigation_label = $.i18n._( 'Job' );\n\n\t\tthis.document_object_type_id = 60;\n\t\tthis.api = TTAPI.APIJob;\n\t\tthis.date_api = TTAPI.APITTDate;\n\t\tthis.job_group_api = TTAPI.APIJobGroup;\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\t\tthis.job_item_group_api = TTAPI.APIJobItemGroup;\n\t\tthis.job_detail_report_api = TTAPI.APIJobDetailReport;\n\t\tthis.company_api = TTAPI.APICompany;\n\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: 'status', api: this.api },\n\t\t\t{ option_name: 'user_group_selection_type', api: this.api },\n\t\t\t{ option_name: 'user_branch_selection_type', api: this.api },\n\t\t\t{ option_name: 'user_department_selection_type', api: this.api },\n\t\t\t{ option_name: 'user_title_selection_type_id', api: this.api },\n\t\t\t{ option_name: 'job_item_group_selection_type', api: this.api },\n\t\t\t{ option_name: 'country', field_name: 'country', api: this.company_api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options );\n\n\t\tthis.job_group_api.getJobGroup( '', false, false, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\tres = Global.buildTreeRecord( res );\n\n\t\t\t\tif ( !$this.sub_view_mode && $this.basic_search_field_ui_dic['group_id'] ) {\n\t\t\t\t\t$this.basic_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t\t$this.adv_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t}\n\n\t\t\t\t$this.job_group_array = res;\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.user_group_api.getUserGroup( '', false, false, {\n\t\t\tonResult: function( res ) {\n\n\t\t\t\tres = res.getResult();\n\t\t\t\tres = Global.buildTreeRecord( res );\n\t\t\t\t$this.user_group_array = res;\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.job_item_group_api.getJobItemGroup( '', false, false, {\n\t\t\tonResult: function( res ) {\n\n\t\t\t\tres = res.getResult();\n\t\t\t\tres = Global.buildTreeRecord( res );\n\t\t\t\t$this.job_item_group_array = res;\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.job_detail_report_api.getTemplate( 'view_job_detail', {\n\t\t\tonResult: function( res ) {\n\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.report_templ