TimeTrex/interface/html5/dist/hr-recruitment-JobApplicantEducationViewController.bundle.js

1 line
23 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["hr-recruitment-JobApplicantEducationViewController"],{7580:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JobApplicantEducationViewController\": () => (/* binding */ JobApplicantEducationViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass JobApplicantEducationViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#job_applicant_education_view_container',\n\n\t\t\tqualification_array: null,\n\n\t\t\tqualification_api: null,\n\n\t\t\tsub_view_grid_autosize: true,\n\t\t\tsub_view_mode: 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 = 'JobApplicantEducationEditView.html';\n\t\tthis.permission_id = 'job_applicant';\n\t\tthis.viewId = 'JobApplicantEducation';\n\t\tthis.script_name = 'JobApplicantEducationView';\n\t\tthis.table_name_key = 'job_applicant_education';\n\t\tthis.context_menu_name = $.i18n._( 'Education' );\n\t\tthis.navigation_label = $.i18n._( 'Education' );\n\t\tthis.api = TTAPI.APIJobApplicantEducation;\n\t\tthis.qualification_api = TTAPI.APIQualification;\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.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_job_applicant_license_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_job_applicant_license_view_controller.unSelectAll();\n\t\t\tcase typeof ( this.parent_view_controller.sub_job_applicant_language_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_job_applicant_language_view_controller.unSelectAll();\n\t\t\tcase typeof ( this.parent_view_controller.sub_job_applicant_skill_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_job_applicant_skill_view_controller.unSelectAll();\n\t\t\tcase typeof ( this.parent_view_controller.sub_job_applicant_membership_view_controller ) !== 'undefined':\n\t\t\t\tthis.parent_view_controller.sub_job_applicant_membership_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\tonMassEditClick() {\n\n\t\tvar $this = this;\n\t\t$this.is_add = false;\n\t\t$this.is_viewing = false;\n\t\t$this.is_mass_editing = true;\n\t\tLocalCacheData.current_doing_context_action = 'mass_edit';\n\t\t$this.openEditView();\n\t\tvar filter = {};\n\t\tvar grid_selected_id_array = this.getGridSelectIdArray();\n\t\tvar grid_selected_length = grid_selected_id_array.length;\n\t\tthis.mass_edit_record_ids = [];\n\n\t\t$.each( grid_selected_id_array, function( index, value ) {\n\t\t\t$this.mass_edit_record_ids.push( value );\n\t\t} );\n\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_data.id = this.mass_edit_record_ids;\n\n\t\tthis.api['getCommon' + this.api.key_name + 'Data']( filter, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\t$this.unique_columns = {};\n\n\t\t\t\t$this.linked_columns = {};\n\n\t\t\t\tif ( !result_data ) {\