1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["hr-recruitment-JobApplicantReferenceViewController"],{2144:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JobApplicantReferenceViewController\": () => (/* binding */ JobApplicantReferenceViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass JobApplicantReferenceViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#job_applicant_reference_view_container',\n\n\t\t\ttype_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\t\t\te_province_array: null,\n\n\t\t\tcompany_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\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'JobApplicantReferenceEditView.html';\n\t\tthis.permission_id = 'job_applicant';\n\t\tthis.viewId = 'JobApplicantReference';\n\t\tthis.script_name = 'JobApplicantReferenceView';\n\t\tthis.table_name_key = 'job_applicant_reference';\n\t\tthis.context_menu_name = $.i18n._( 'Reference' );\n\t\tthis.navigation_label = $.i18n._( 'Job Applicant Reference' );\n\t\tthis.api = TTAPI.APIJobApplicantReference;\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\tshowNoResultCover( show_new_btn ) {\n\t\tsuper.showNoResultCover( ( this.sub_view_mode ) ? true : false );\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( 'type' );\n\n\t\tthis.initDropDownOption( 'country', 'country', this.company_api );\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_reference': { 'label': $.i18n._( 'Job Applicant Reference' ) },\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.APIJobApplicantReference,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_job_applicant_reference',\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_reference = this.edit_view_tab.find( '#tab_job_applicant_reference' );\n\t\tvar tab_job_applicant_reference_column1 = tab_job_applicant_reference.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_job_applicant_reference_column1 );\n\n\t\tvar form_item_input;\n\t\tvar widgetContainer;\n\t\tvar label;\n\n\t\t// tab_job_applicant_reference column1\n\n\t\t// Type\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'type_id' } );\n\t\tform_item_input.setSourceData( $this.type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_job_applicant_reference_column1, '' );\n\n\t\t// First Name\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( {\n\t\t\tfield: 'first_name',\n\t\t\twidth: 200\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'First Name' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Last Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( {\n\t\t\tfield: 'last_name',\n\t\t\twidth: 200\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Last Name' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Title\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( {\n\t\t\tfield: 'title',\n\t\t\twidth: 200\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Title' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Address (Line 1)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( {\n\t\t\tfield: 'address1',\n\t\t\twidth: 200\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Address (Line 1)' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Address (Line 2)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( {\n\t\t\tfield: 'address2',\n\t\t\twidth: 200\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Address (Line 2)' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// City\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'city', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'City' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Country\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'country', set_empty: true } );\n\t\tform_item_input.setSourceData( $this.country_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Country' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Province/State\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'province' } );\n\t\tform_item_input.setSourceData( [] );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Province/State' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Postal / ZIP Code\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'postal_code', width: 90 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Postal/ZIP Code' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Known Since\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\n\t\tform_item_input.TDatePicker( { field: 'start_date' } );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlabel = $( '<span class=\\'widget-right-label\\'> ' + $.i18n._( 'ie' ) + ' : ' + LocalCacheData.getLoginUserPreference().date_format_display + '</span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Known Since' ), form_item_input, tab_job_applicant_reference_column1, '', widgetContainer );\n\n\t\t// Work Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'work_phone', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Work Phone' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Home Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'home_phone', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Home Phone' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Mobile Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'mobile_phone', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Mobile Phone' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Work Email\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'work_email', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Work Email' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t// Home Email\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'home_email', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Home Email' ), form_item_input, tab_job_applicant_reference_column1 );\n\n\t\t//Tags\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TAG_INPUT );\n\n\t\tform_item_input.TTagInput( { field: 'tag', object_type_id: 390 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Tags' ), form_item_input, tab_job_applicant_reference_column1, '', null, null, true );\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\t\tvar key = target.getField();\n\n\t\tthis.current_edit_record[key] = target.getValue();\n\n\t\tswitch ( key ) {\n\n\t\t\tcase 'country':\n\t\t\t\tvar widget = this.edit_view_ui_dic['province'];\n\t\t\t\twidget.setValue( null );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tif ( key === 'country' ) {\n\t\t\tthis.onCountryChange();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tsetCurrentEditRecordData() {\n\n\t\t//Set current edit record data to all widgets\n\t\t//Set current edit record data to all widgets\n\t\tfor ( var key in this.current_edit_record ) {\n\t\t\tvar widget = this.edit_view_ui_dic[key];\n\t\t\tif ( Global.isSet( widget ) ) {\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'country': //popular case\n\t\t\t\t\t\tthis.setCountryValue( widget, key );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tthis.collectUIDataToCurrentEditRecord();\n\t\tthis.setEditViewDataDone();\n\t}\n\n\tsetProvince( val, m ) {\n\t\tvar $this = this;\n\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.province_array = [];\n\t\t\tthis.adv_search_field_ui_dic['province'].setSourceData( [] );\n\t\t} else {\n\n\t\t\tthis.company_api.getOptions( 'province', val, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.province_array = Global.buildRecordArray( res );\n\t\t\t\t\t$this.adv_search_field_ui_dic['province'].setSourceData( $this.province_array );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\teSetProvince( val, refresh ) {\n\t\tvar $this = this;\n\t\tvar province_widget = $this.edit_view_ui_dic['province'];\n\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.e_province_array = [];\n\t\t\tprovince_widget.setSourceData( [] );\n\t\t} else {\n\t\t\tthis.company_api.getOptions( 'province', val, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.e_province_array = Global.buildRecordArray( res );\n\t\t\t\t\tif ( refresh && $this.e_province_array.length > 0 ) {\n\t\t\t\t\t\t$this.current_edit_record.province = $this.e_province_array[0].value;\n\t\t\t\t\t\tprovince_widget.setValue( $this.current_edit_record.province );\n\t\t\t\t\t}\n\t\t\t\t\tprovince_widget.setSourceData( $this.e_province_array );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tonGridSelectRow() {\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu( true );\n\t\t} else {\n\t\t\tthis.buildContextMenu();\n\t\t}\n\t\tthis.setDefaultMenu();\n\t}\n\n\tsearchDone() {\n\n\t\tsuper.searchDone();\n\n\t\tTTPromise.resolve( 'JobApplicant_History_Tab', 'JobApplicantReferenceViewController' );\n\n\t}\n\n}\n\nJobApplicantReferenceViewController.loadSubView = function( container, beforeViewLoadedFun, afterViewLoadedFun ) {\n\tGlobal.loadViewSource( 'JobApplicantReference', 'SubJobApplicantReferenceView.html', function( result ) {\n\t\tvar args = {};\n\t\tvar template = _.template( result );\n\n\t\tif ( Global.isSet( beforeViewLoadedFun ) ) {\n\t\t\tbeforeViewLoadedFun();\n\t\t}\n\t\tif ( Global.isSet( container ) ) {\n\t\t\tcontainer.html( template( args ) );\n\t\t\tif ( Global.isSet( afterViewLoadedFun ) ) {\n\t\t\t\tafterViewLoadedFun( sub_job_applicant_reference_view_controller );\n\t\t\t}\n\t\t}\n\t} );\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE0NC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwyQkFBMkIsQ0FBQztBQUM1QiwwQkFBMEIsQ0FBQztBQUMzQjtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQSxvQ0FBb0MsU0FBUyxDQUFDLHNDQUFzQztBQUNwRjtBQUNBO0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