1 line
59 KiB
JavaScript
1 line
59 KiB
JavaScript
|
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["JobApplicantMembershipSubViewController","portal-hr-my_profile-JobApplicantMembershipSubViewController","portal-hr-my_profile-JobApplicantSubBaseViewController","JobApplicantSubBaseViewController"],{1993:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JobApplicantMembershipSubViewController\": () => (/* binding */ JobApplicantMembershipSubViewController)\n/* harmony export */ });\n/* harmony import */ var _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7526);\n/* harmony import */ var _views_portal_hr_my_profile_JobApplicantSubBaseViewController__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3757);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\nclass JobApplicantMembershipSubViewController extends _views_portal_hr_my_profile_JobApplicantSubBaseViewController__WEBPACK_IMPORTED_MODULE_1__.JobApplicantSubBaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\n\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\tthis.qualification_type_id = 50;\n\t\tthis.currency_api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_0__/* .TTAPI.APICurrencyPortal */ .y.APICurrencyPortal;\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\t\tvar args = {};\n\t\tthis.api.getJobApplicantMembershipOptions( 'ownership', {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.setSourceData( 'ownership_id', result.getResult(), true );\n\t\t\t}\n\t\t} );\n\t\tvar filter_data = {};\n\t\tfilter_data.type_id = [this.qualification_type_id];\n\t\targs.filter_data = filter_data;\n\t\targs.filter_columns = {\n\t\t\t'id': true,\n\t\t\t'name': true\n\t\t};\n\t\tthis.qualification_api.getQualification( args, true, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar res = result.getResult();\n\t\t\t\tvar options = {};\n\t\t\t\tfor ( var i in res ) {\n\t\t\t\t\tif ( !res.hasOwnProperty( i ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tvar row = res[i];\n\t\t\t\t\toptions[row.id] = $.i18n._( row.name );\n\t\t\t\t}\n\t\t\t\t$this.setSourceData( 'qualification_id', options, true );\n\t\t\t}\n\t\t} );\n\t\tthis.currency_api.getCurrency( {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar res = result.getResult();\n\t\t\t\tvar options = {};\n\t\t\t\tfor ( var i in res ) {\n\t\t\t\t\tif ( !res.hasOwnProperty( i ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tvar row = res[i];\n\t\t\t\t\toptions[row.id] = $.i18n._( row.name );\n\t\t\t\t}\n\t\t\t\t$this.setSourceData( 'currency_id', options, true );\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetJobApplicantMembership( callback ) {\n\t\tvar $this = this;\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_data.id = this.model.id;\n\t\tthis.api['getJobApplicantMembership']( filter, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\tvar result_data = result.getResult();\n\t\t\t\t\tif ( !result_data ) {\n\t\t\t\t\t\tresult_data = [];\n\t\t\t\t\t}\n\t\t\t\t\tresult_data = result_data[0];\n\t\t\t\t\t$this.model.set( result_data );\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this.showErrorAlert( result );\n\t\t\t\t\tProgressBar.closeOverlay();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tsetCurrentEditRecordData() {\n\t\tsuper.setCurrentEditRecordData();\n\t\tvar field_selector;\n\t\tvar field_control;\n\t\t//Set current edit record data to all widgets\n\t\tfor ( var key in this.model.attributes ) {\n\t\t\tif ( !this.model.has( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch ( key ) {\n\t\t\t\tdefault:\n\t\t\t\t\tif ( this.model.get( key ) === false ) {\n\t\t\t\t\t\tthis.model.set( key, '' );\n\t\t\t\t\t\tif ( key === 'qualification_id' && this.enable_add_qualification ) {\n\t\t\t\t\t\t\tthis.showAddQualificationContain
|