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

1 line
38 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["hr-recruitment-JobApplicantEmploymentViewController"],{2257:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JobApplicantEmploymentViewController\": () => (/* binding */ JobApplicantEmploymentViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass JobApplicantEmploymentViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#job_applicant_employment_view_container',\n\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\t\t\te_province_array: null,\n\t\t\ti_province_array: null,\n\t\t\temployment_status_array: null,\n\t\t\twage_type_array: null,\n\n\t\t\tcompany_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\tinitOptions() {\n\t\tvar options = [\n\t\t\t{ option_name: 'employment_status', api: this.api },\n\t\t\t{ option_name: 'wage_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\t}\n\n\tshowNoResultCover( show_new_btn ) {\n\t\tsuper.showNoResultCover( ( this.sub_view_mode ) ? true : false );\n\t}\n\n\tonAddClick() {\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\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'JobApplicantEmploymentEditView.html';\n\t\tthis.permission_id = 'job_applicant';\n\t\tthis.viewId = 'JobApplicantEmployment';\n\t\tthis.script_name = 'JobApplicantEmploymentView';\n\t\tthis.table_name_key = 'job_applicant_employment';\n\t\tthis.context_menu_name = $.i18n._( 'Employment' );\n\t\tthis.navigation_label = $.i18n._( 'Job Applicant Employment' );\n\t\tthis.api = TTAPI.APIJobApplicantEmployment;\n\t\tthis.company_api = TTAPI.APICompany;\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\tbuildEditViewUI() {\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_job_applicant_employment': { 'label': $.i18n._( 'Job Applicant Employment' ), 'is_multi_column': true },\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIJobApplicantEmployment,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_job_applicant_employment',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\tvar tab_job_applicant_employment = this.edit_view_tab.find( '#tab_job_applicant_employment' );\n\t\tvar tab_job_applicant_employment_column1 = tab_job_applicant_employment.find( '.first-column' );\n\t\tvar tab_job_applicant_employment_column2 = tab_job_applicant_employment.find( '.second-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_job_applicant_employment_column1 );\n\t\tthis.edit_view_tabs[0].push( tab_job_applicant_employment_column2 );\n\n\t\tvar form_item_input;\n\t\tvar widgetContainer;\n\t\tvar label;\n\n\t\t// tab_job_applicant_employment column1\n\n\t\t// Company Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'company_name', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Company Name' ), form_item_input, tab_job_applicant_employment_column1, '' );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Job Title\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'title', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i