TimeTrex/interface/html5/dist/hr-qualification-UserEducationViewController.bundle.js

1 line
38 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["hr-qualification-UserEducationViewController"],{2305:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UserEducationViewController\": () => (/* binding */ UserEducationViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass UserEducationViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#user_education_view_container',\n\n\n\n\t\t\tdocument_object_type_id: null,\n\n\t\t\tqualification_group_array: null,\n\t\t\tsource_type_array: null,\n\n\t\t\tqualification_group_api: null,\n\t\t\tqualification_api: null,\n\n\t\t\tsub_view_grid_autosize: true\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 = 'UserEducationEditView.html';\n\t\tthis.permission_id = 'user_education';\n\t\tthis.viewId = 'UserEducation';\n\t\tthis.script_name = 'UserEducationVoew';\n\t\tthis.table_name_key = 'user_education';\n\t\tthis.context_menu_name = $.i18n._( 'Education' );\n\t\tthis.navigation_label = $.i18n._( 'Education' );\n\t\tthis.api = TTAPI.APIUserEducation;\n\t\tthis.qualification_api = TTAPI.APIQualification;\n\t\tthis.qualification_group_api = TTAPI.APIQualificationGroup;\n\n\t\tthis.document_object_type_id = 126;\n\t\tthis.render();\n\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu();\n\t\t\tthis.initData();\n\t\t}\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'source_type' );\n\n\t\tthis.qualification_group_api.getQualificationGroup( '', false, false, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\n\t\t\t\tres = Global.buildTreeRecord( res );\n\t\t\t\t$this.qualification_group_array = 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}\n\t\t} );\n\n\t\tvar args = {};\n\t\tvar filter_data = {};\n\t\tfilter_data.type_id = [20];\n\t\tfilter_data.visibility_type_id = [10, 100]; //10=Internal Only, 100=Both\n\t\targs.filter_data = filter_data;\n\t\tthis.qualification_api.getQualification( args, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\tif ( !$this.sub_view_mode && $this.basic_search_field_ui_dic['qualification_id'] ) {\n\t\t\t\t\t$this.basic_search_field_ui_dic['qualification_id'].setSourceData( res );\n\t\t\t\t\t$this.adv_search_field_ui_dic['qualification_id'].setSourceData( res );\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tshowNoResultCover( show_new_btn ) {\n\t\tsuper.showNoResultCover( ( this.sub_view_mode ) ? true : false );\n\t}\n\n\tonGridSelectRow() {\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu( true );\n\t\t\tthis.cancelOtherSubViewSelectedStatus();\n\t\t} else {\n\t\t\tthis.buildContextMenu();\n\t\t}\n\t\tthis.setDefaultMenu();\n\t}\n\n\tonGridSelectAll() {\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu( true );\n\t\t\tthis.cancelOtherSubViewSelectedStatus();\n\t\t}\n\t\tthis.setDefaultMenu();\n\t}\n\n\tcancelOtherSubViewSelectedStatus() {\n\t\tswitch ( true ) {\n\t\t\tcase typeof ( this.parent_view_controller.sub_user_skill_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_user_skill_view_controller.unSelectAll();\n\t\t\tcase typeof ( this.parent_view_controller.sub_user_license_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_user_license_view_controller.unSelectAll();\n\t\t\tcase typeof ( this.parent_view_controller.sub_user_membership_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_user_membership_view_c