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

1 line
42 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["hr-qualification-UserSkillViewController"],{1634:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UserSkillViewController\": () => (/* binding */ UserSkillViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass UserSkillViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#user_skill_view_container',\n\n\n\n\t\t\tproficiency_array: null,\n\t\t\tdocument_object_type_id: null,\n\t\t\tqualification_group_api: null,\n\t\t\tqualification_api: null,\n\t\t\tqualification_group_array: null,\n\t\t\tsource_type_array: null,\n\t\t\tqualification_array: 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 = 'UserSkillEditView.html';\n\t\tthis.permission_id = 'user_skill';\n\t\tthis.viewId = 'UserSkill';\n\t\tthis.script_name = 'UserSkillView';\n\t\tthis.table_name_key = 'user_skill';\n\t\tthis.context_menu_name = $.i18n._( 'Skills' );\n\t\tthis.navigation_label = $.i18n._( 'Skill' );\n\t\tthis.api = TTAPI.APIUserSkill;\n\t\tthis.qualification_api = TTAPI.APIQualification;\n\t\tthis.qualification_group_api = TTAPI.APIQualificationGroup;\n\t\tthis.document_object_type_id = 125;\n\t\tthis.render();\n\n\t\t//call init data in parent view\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu();\n\t\t\tthis.initData();\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_education_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_user_education_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_controller.unSelectAll();\n\t\t\tcase typeof ( this.parent_view_controller.sub_user_language_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_user_language_view_controller.unSelectAll();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonAddClick() {\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu( true );\n\t\t}\n\n\t\tsuper.onAddClick();\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'proficiency' );\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 = [10];\n\t\tfilter_data.visibility_type_id = [10, 100]; //10=Interna