TimeTrex/interface/html5/dist/portal-hr-my_profile-MyProfileViewController.bundle.js

1 line
104 KiB
JavaScript

(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["portal-hr-my_profile-MyProfileViewController"],{388:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MyProfileViewController\": () => (/* binding */ MyProfileViewController)\n/* harmony export */ });\n/* harmony import */ var jquery_ui_ui_widgets_datepicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4414);\n/* harmony import */ var jquery_ui_ui_widgets_datepicker__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_ui_widgets_datepicker__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _views_portal_PortalBaseViewController__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97);\n/* harmony import */ var _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7526);\n/* harmony import */ var _global_TTUUID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4936);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\n\n\nclass MyProfileViewController extends _views_portal_PortalBaseViewController__WEBPACK_IMPORTED_MODULE_1__.PortalBaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#my_profile_view',\n\t\t\tevents: {\n\t\t\t\t'click #saveBtn': 'onSaveClick',\n\t\t\t\t'click #available_jobs': 'availableJobsClick',\n\t\t\t\t'click #applied_jobs': 'appliedJobsClick',\n\t\t\t\t'change input[type=\"text\"]': 'onFormItemChange',\n\t\t\t\t'change input[type=\"checkbox\"]': 'onFormItemChange',\n\t\t\t\t'change select.form-control': 'onFormItemChange',\n\t\t\t\t'change textarea.form-control': 'onFormItemChange',\n\t\t\t\t'click .detail-form-title': 'onFormTitleClick',\n\t\t\t\t'click .table-title .add-btn': 'onSubViewAddClick'\n\t\t\t\t// 'click .styled-select .glyphicon': 'onSelectClick',\n\t\t\t},\n\t\t\t// _required_files: [\n\t\t\t// \t'JobApplicantEmploymentSubViewController',\n\t\t\t// \t'JobApplicantReferenceSubViewController',\n\t\t\t// \t'JobApplicantLocationSubViewController',\n\t\t\t// \t'JobApplicantSkillSubViewController',\n\t\t\t// \t'JobApplicantEducationSubViewController',\n\t\t\t// \t'JobApplicantMembershipSubViewController',\n\t\t\t// \t'JobApplicantLicenseSubViewController',\n\t\t\t// \t'JobApplicantLanguageSubViewController',\n\t\t\t// \t'JobApplicationSubViewController',\n\t\t\t// \t'DocumentSubViewController'\n\t\t\t// ]\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit() {\n\t\tif ( !Global.isSet( LocalCacheData.getPortalLoginUser() ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.current_edit_record = Global.clone( LocalCacheData.getPortalLoginUser() );\n\t\tthis.model = new Backbone.Model( this.current_edit_record );\n\t\tthis.viewId = 'MyProfile';\n\n\t\t// __non_webpack_require__( this._required_files, function() {\n\t\tthis.api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__/* .TTAPI.APIJobApplicantPortal */ .y.APIJobApplicantPortal;\n\t\tthis.company_api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__/* .TTAPI.APICompanyPortal */ .y.APICompanyPortal;\n\t\tthis.ethnic_group_api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__/* .TTAPI.APIEthnicGroupPortal */ .y.APIEthnicGroupPortal;\n\t\tthis.qualification_api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__/* .TTAPI.APIQualificationPortal */ .y.APIQualificationPortal;\n\t\tthis.script_name = 'ProfileView';\n\t\tthis.edit_view_error_ui_dic = {};\n\t\tthis.applicant_fields = {};\n\t\tthis.background_fields = {};\n\t\tthis.availability_fields = {};\n\t\tthis.employment_history_fields = {};\n\t\tthis.reference_fields = {};\n\t\tthis.location_fields = {};\n\t\tthis.skill_fields = {};\n\t\tthis.education_fields = {};\n\t\tthis.membership_fields = {};\n\t\tthis.license_fields = {};\n\t\tthis.language_fields = {};\n\t\tthis.enable_add_qualification_fields = {};\n\t\tthis.is_changed = null;\n\n\t\tvar $this = this;\n\t\tthis.getAvailableFieldsForSection( function() {\n\t\t\t$this.render();\n\t\t} );\n\t\t// } );\n\t}\n\n\trefreshProfile() {\n\t\tvar $this = this;\n\t\tthis.api.getJobApplicant( {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\tLocalCacheData.setPortalLoginUser( result.getResult()[0] );\n\t\t\t\t\t$this.current_edit_record = Global.clone( LocalCacheData.getPortalLoginUser() );\n\t\t\t\t}\n\t\t\t\t$this.$( '.job-applicant-detail' ).remove();\n\t\t\t\t$this.render();\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetAvailableFieldsForSection( callback ) {\n\t\tvar $this = this;\n\t\tvar sections;\n\t\tthis.api.getRecruitmentPortalConfig( {}, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tvar result = res.getResult();\n\t\t\t\tif ( Global.isArray( result ) ) {\n\t\t\t\t\tsections = result[0];\n\t\t\t\t}\n\n\t\t\t\tif ( sections ) {\n\t\t\t\t\tfor ( var section in sections ) {\n\t\t\t\t\t\tvar section_available_fields_ids;\n\t\t\t\t\t\tif ( sections.hasOwnProperty( section ) ) {\n\t\t\t\t\t\t\tsection_available_fields_ids = sections[section];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( Global.isArray( section_available_fields_ids ) ) {\n\t\t\t\t\t\t\tfor ( var i = 0; i < section_available_fields_ids.length; i++ ) {\n\t\t\t\t\t\t\t\tvar section_available_fields_id = section_available_fields_ids[i];\n\t\t\t\t\t\t\t\t$this[section + '_fields'][section_available_fields_id] = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this.api.getJobApplicant( {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\t\t\tLocalCacheData.setPortalLoginUser( result.getResult()[0] );\n\t\t\t\t\t\t\t$this.current_edit_record = Global.clone( LocalCacheData.getPortalLoginUser() );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\trender() {\n\t\tvar tpl = Global.loadWidget( 'views/portal/hr/my_profile/MyProfileDetailView.html' );\n\t\tthis.$el.append( _.template( tpl )( {\n\t\t\t'applicant': this.applicant_fields,\n\t\t\t'background': this.background_fields,\n\t\t\t'availability': this.availability_fields,\n\t\t\t'employment_history': this.employment_history_fields,\n\t\t\t'reference': this.reference_fields,\n\t\t\t'location': this.location_fields,\n\t\t\t'skill': this.skill_fields,\n\t\t\t'education': this.education_fields,\n\t\t\t'membership': this.membership_fields,\n\t\t\t'license': this.license_fields,\n\t\t\t'language': this.language_fields\n\t\t} ) );\n\t\tthis.initOptions();\n\t\tthis.registerDatePicker();\n\t\tthis.setCurrentEditRecordData();\n\t\tthis.initSubHistoryView();\n\t\tthis.initSubQualificationView();\n\t\tthis.initSubApplicationView();\n\t\tthis.initSubDocumentView();\n\n\t\tvar $this = this;\n\t\t//Required to send the update credentials data into the api.\n\t\t$( '.portal-tables #password, .portal-tables #password_confirm' ).on( 'change', function( e ) {\n\t\t\t$this.onFormItemChange( e );\n\t\t} );\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\t\tthis.api.getJobApplicantOptions( 'sex', {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.setSourceData( 'sex_id', result.getResult() );\n\t\t\t}\n\t\t} );\n\t\tthis.ethnic_group_api.getEthnicGroup( { filter_columns: { 'id': true, 'name': true } }, 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( 'ethnic_group_id', options, true );\n\t\t\t}\n\t\t} );\n\t\tthis.api.getJobApplicantOptions( 'minimum_wage_type', {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.setSourceData( 'minimum_wage_type_id', result.getResult(), true );\n\t\t\t}\n\t\t} );\n\t\tthis.company_api.getOptions( 'country', {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result = result.getResult();\n\t\t\t\t$this.setSourceData( 'country', result, true );\n\t\t\t\t$this.setSourceData( 'identification_country', result, true );\n\t\t\t}\n\t\t} );\n\t\tthis.api.getJobApplicantOptions( 'identification_type', {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.setSourceData( 'identification_type_id', result.getResult(), true );\n\t\t\t}\n\t\t} );\n\t\tthis.api.getJobApplicantOptions( 'available_days_of_week', {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.setSourceData( 'available_days_of_week', result.getResult(), true );\n\t\t\t}\n\t\t} );\n\t\tthis.api.getJobApplicantOptions( 'available_hours_of_day', {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.setSourceData( 'available_hours_of_day', result.getResult(), true );\n\t\t\t}\n\t\t} );\n\t}\n\n\tonSelectClick( e ) {\n\t\tvar elem = $( e.currentTarget ).parent().find( 'select' );\n\t\tif ( document.createEvent ) {\n\t\t\tvar e = document.createEvent( 'MouseEvents' );\n\t\t\te.initMouseEvent( 'mousedown', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null );\n\t\t\telem[0].dispatchEvent( e );\n\t\t} else if ( element.fireEvent ) {\n\t\t\telem[0].fireEvent( 'onmousedown' );\n\t\t}\n\t}\n\n\tregisterDatePicker() {\n\t\tvar time_format = 'h:mm TT';\n\t\tvar format = 'dd-M-y';\n\t\tvar focus_out_timer;\n\t\tvar is_open = false;\n\t\t// When portal mode, no user preference.\n\t\t// if ( LocalCacheData.getLoginUserPreference() ) {\n\t\t// \tformat = LocalCacheData.getLoginUserPreference().date_format_1;\n\t\t// \ttime_format = LocalCacheData.getLoginUserPreference().time_format_1;\n\t\t// }\n\t\tvar day_name_min = [\n\t\t\t$.i18n._( 'Sun' ), $.i18n._( 'Mon' ), $.i18n._( 'Tue' ),\n\t\t\t$.i18n._( 'Wed' ), $.i18n._( 'Thu' ), $.i18n._( 'Fri' ), $.i18n._( 'Sat' )\n\t\t];\n\t\tvar month_name_short = [\n\t\t\t$.i18n._( 'Jan' ), $.i18n._( 'Feb' ),\n\t\t\t$.i18n._( 'Mar' ), $.i18n._( 'Apr' ), $.i18n._( 'May' ),\n\t\t\t$.i18n._( 'Jun' ), $.i18n._( 'Jul' ), $.i18n._( 'Aug' ),\n\t\t\t$.i18n._( 'Sep' ), $.i18n._( 'Oct' ), $.i18n._( 'Nov' ),\n\t\t\t$.i18n._( 'Dec' )\n\t\t];\n\t\tvar current_text = $.i18n._( 'Today' );\n\t\tvar close_text = $.i18n._( 'Close' );\n\t\tvar options = {\n\t\t\tshowTime: false,\n\t\t\tdateFormat: format,\n\t\t\tshowHour: false,\n\t\t\tshowMinute: false,\n\t\t\tchangeMonth: true,\n\t\t\tchangeYear: true,\n\t\t\tshowButtonPanel: true,\n\t\t\tduration: '',\n\t\t\tshowAnim: '',\n\t\t\tyearRange: '-100:+10',\n\t\t\tshowOn: '',\n\t\t\tdayNamesMin: day_name_min,\n\t\t\tcurrentText: current_text,\n\t\t\tmonthNamesShort: month_name_short,\n\t\t\tcloseText: close_text,\n\t\t\tbeforeShow: function() {\n\t\t\t},\n\t\t\tonSelect: function( dateText ) {\n\t\t\t\t$( this ).change();\n\t\t\t},\n\t\t\tonClose: function() {\n\t\t\t\tfocus_out_timer = setTimeout( function() {\n\t\t\t\t\tis_open = false;\n\t\t\t\t}, 100 );\n\t\t\t}\n\n\t\t};\n\t\tthis.$( 'input[type=\"text\"].datepicker' ).datepicker( options );\n\t\t// if ( LocalCacheData.getLoginUserPreference() ) {\n\t\t// \tthis.$('input[type=\"text\"].datepicker').attr( 'placeholder', LocalCacheData.getLoginUserPreference().date_format_display );\n\t\t// } else {\n\t\t// \tthis.$('input[type=\"text\"].datepicker').attr( 'placeholder', 'dd-mmm-yy' );\n\t\t// }\n\t\tthis.$( 'input[type=\"text\"].datepicker' ).attr( 'placeholder', 'dd-mmm-yy' );\n\t\tthis.$( 'input[type=\"text\"].datepicker' ).bind( 'mouseup', function() {\n\t\t\tif ( !is_open ) {\n\t\t\t\t$( this ).datepicker( 'show' );\n\t\t\t\tis_open = true;\n\t\t\t} else {\n\t\t\t\tis_open = false;\n\t\t\t\tif ( focus_out_timer ) {\n\t\t\t\t\tclearTimeout( focus_out_timer );\n\t\t\t\t\tfocus_out_timer = null;\n\t\t\t\t}\n\t\t\t}\n\t\t} ).next('.glyphicon').bind( 'mouseup', function() { $(this).prev().trigger( 'mouseup' ) } ); // this allows clicking on the calendar icon as well as the input box\n\t}\n\n\tsetSourceData( field, source_data, set_empty ) {\n\t\tvar $this = this;\n\t\tvar field_selector = 'select[id=\"' + field + '\"]';\n\t\tif ( this.$( field_selector ) && this.$( field_selector )[0] ) {\n\t\t\tthis.$( field_selector ).empty();\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\tif ( _.size( source_data ) == 0 ) {\n\t\t\tset_empty = true;\n\t\t}\n\t\tif ( set_empty === true ) {\n\t\t\tif ( field === 'available_days_of_week' || field === 'available_hours_of_day' ) {\n\t\t\t\tthis.$( field_selector ).append( $( '<option></option>' ).prop( 'value', '0' ).text( '-- ' + $.i18n._( 'Select all that apply' ) + ' --' ).attr( 'selected', 'selected' ) );\n\t\t\t} else {\n\t\t\t\tthis.$( field_selector ).append( $( '<option></option>' ).prop( 'value', '0' ).text( '-- ' + $.i18n._( 'None' ) + ' --' ).attr( 'selected', 'selected' ) );\n\t\t\t}\n\t\t}\n\t\tif ( _.size( source_data ) > 0 ) {\n\t\t\t$.each( source_data, function( value, label ) {\n\t\t\t\t$this.$( field_selector ).append( $( '<option></option>' ).prop( 'value', value ).text( label ) );\n\t\t\t\tif ( field === 'available_days_of_week' || field === 'available_hours_of_day' ) {\n\t\t\t\t\tif ( _.isArray( $this.current_edit_record[field] ) ) {\n\t\t\t\t\t\t$this.$( field_selector ).find( 'option[value=\\'0\\']' ).removeAttr( 'selected' );\n\t\t\t\t\t\tvar weeks = $this.current_edit_record[field];\n\t\t\t\t\t\tfor ( var i = 0; i < weeks.length; i++ ) {\n\t\t\t\t\t\t\tif ( value == weeks[i] ) {\n\t\t\t\t\t\t\t\t$this.$( field_selector ).find( 'option[value=\\'' + value + '\\']' ).attr( 'selected', 'selected' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( $this.current_edit_record[field] == value ) {\n\t\t\t\t\t\t$this.$( field_selector ).val( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} );\n\t\t}\n\t\t$this.$( field_selector ).selectpicker();\n\t}\n\n\tsetCurrentEditRecordData() {\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.current_edit_record ) {\n\t\t\tif ( !this.current_edit_record.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// if ( this.current_edit_record[key] === false ) {\n\t\t\t// \tthis.current_edit_record[key] = '';\n\t\t\t// }\n\t\t\tswitch ( key ) {\n\t\t\t\tcase 'country':\n\t\t\t\tcase 'identification_country':\n\t\t\t\t\t// if ( this.current_edit_record[key] === false ) {\n\t\t\t\t\t// \tthis.current_edit_record[key] = '';\n\t\t\t\t\t// }\n\t\t\t\t\t// field_selector = 'select[id=\"' + key + '\"]';\n\t\t\t\t\t// this.$(field_selector ).val( this.current_edit_record[key] );\n\t\t\t\t\tif ( key === 'country' ) {\n\t\t\t\t\t\tthis.eSetProvince( this.current_edit_record[key] );\n\t\t\t\t\t} else if ( key === 'identification_country' ) {\n\t\t\t\t\t\tthis.iSetProvince( this.current_edit_record[key] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'currently_employed':\n\t\t\t\tcase 'immediate_drug_test':\n\t\t\t\tcase 'criminal_record':\n\t\t\t\t\tfield_selector = 'input[id=\"' + key + '\"]';\n\t\t\t\t\tif ( this.current_edit_record[key] === true ) {\n\t\t\t\t\t\tthis.$( field_selector ).prop( 'checked', 'checked' );\n\t\t\t\t\t\tif ( this.$( 'textarea[id=\"criminal_record_description\"]' )[0] ) {\n\t\t\t\t\t\t\tif ( key === 'criminal_record' ) {\n\t\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).removeAttr( 'disabled' );\n\t\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).css( 'background-color', '#fff' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).attr( 'disabled', 'disabled' );\n\t\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).css( 'background-color', '#eee' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( this.current_edit_record[key] === false ) {\n\t\t\t\t\t\tthis.$( field_selector ).removeAttr( 'checked' );\n\t\t\t\t\t\tif ( this.$( 'textarea[id=\"criminal_record_description\"]' )[0] ) {\n\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).attr( 'disabled', 'disabled' );\n\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).css( 'background-color', '#eee' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// case 'available_days_of_week':\n\t\t\t\t// case 'identification_type_id':\n\t\t\t\t// case 'ethnic_group_id':\n\t\t\t\t// case 'sex_id':\n\t\t\t\t// \tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif ( this.current_edit_record[key] === false ) {\n\t\t\t\t\t\tthis.current_edit_record[key] = '';\n\t\t\t\t\t}\n\t\t\t\t\tfield_selector = '.form-control[id=\"' + key + '\"]';\n\t\t\t\t\tfield_control = this.$( field_selector );\n\t\t\t\t\tif ( field_control && field_control[0] ) {\n\t\t\t\t\t\tthis.$( field_selector ).val( this.current_edit_record[key] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\n\t\t// this.collectUIDataToCurrentEditRecord();\n\t\t// this.setEditViewDataDone();\n\t}\n\n\tonFormItemChange( e, doNotValidate ) {\n\t\tif ( e.currentTarget.name ) {\n\t\t\tvar key = e.currentTarget.name;\n\t\t} else if ( e.currentTarget.id ) {\n\t\t\tvar key = e.currentTarget.id;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar $this = this;\n\t\tthis.current_edit_record[key] = $( e.currentTarget ).val();\n\t\tthis.model.set( key, $( e.currentTarget ).val() );\n\t\tthis.is_changed = true;\n\t\tswitch ( key ) {\n\t\t\t// case 'country':\n\t\t\t// case 'identification_country':\n\t\t\t// \tvar widget = this.$('select[id=\"' + key + '\"]');\n\t\t\t// \twidget.val( null );\n\t\t\t// \tbreak;\n\t\t\tcase 'currently_employed':\n\t\t\tcase 'immediate_drug_test':\n\t\t\tcase 'criminal_record':\n\t\t\t\tif ( $( e.currentTarget ).is( ':checked' ) ) {\n\t\t\t\t\tthis.current_edit_record[key] = true;\n\t\t\t\t\tthis.model.set( key, true );\n\t\t\t\t\tif ( key === 'criminal_record' ) {\n\t\t\t\t\t\tif ( this.$( 'textarea[id=\"criminal_record_description\"]' )[0] ) {\n\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).removeAttr( 'disabled' );\n\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).css( 'background-color', '#fff' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.current_edit_record[key] = false;\n\t\t\t\t\tthis.model.set( key, false );\n\t\t\t\t\tif ( key === 'criminal_record' ) {\n\t\t\t\t\t\tif ( this.$( 'textarea[id=\"criminal_record_description\"]' )[0] ) {\n\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).attr( 'disabled', 'disabled' );\n\t\t\t\t\t\t\tthis.$( 'textarea[id=\"criminal_record_description\"]' ).css( 'background-color', '#eee' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'available_days_of_week':\n\t\t\tcase 'available_hours_of_day':\n\t\t\t\tif ( $( e.currentTarget ).val() === null ) {\n\t\t\t\t\tthis.current_edit_record[key] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'confirm_password':\n\t\t\t\tdoNotValidate = false;\n\t\t\t\tbreak;\n\t\t}\n\t\tif ( key == 'country' ) {\n\t\t\tthis.eSetProvince( this.$( 'select[id=\"country\"]' ).val(), true, function() {\n\t\t\t\t$this.validate();\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\t\tif ( key === 'identification_country' ) {\n\t\t\tthis.iSetProvince( this.$( 'select[id=\"identification_country\"]' ).val(), true, function() {\n\t\t\t\t$this.validate();\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tvalidate() {\n\t\tvar $this = this;\n\t\tvar record = this.current_edit_record;\n\t\tthis.api.validateJobApplicant( record, {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.validateResult( result );\n\t\t\t}\n\t\t} );\n\t}\n\n\tvalidateResult( result ) {\n\t\tthis.clearErrorTips();\n\t\tthis.setErrorTips( result );\n\t}\n\n\tclearErrorTips( clear_all ) {\n\t\tfor ( var key in this.edit_view_error_ui_dic ) {\n\t\t\tif ( this.edit_view_error_ui_dic[key].val() !== '' || clear_all ) {\n\t\t\t\tthis.edit_view_error_ui_dic[key].removeClass( 'error-tip' );\n\t\t\t\tthis.edit_view_error_ui_dic[key].tooltip().tooltip( 'dispose' );\n\n\t\t\t}\n\t\t}\n\t\t// this.edit_view_error_ui_dic = {};\n\t}\n\n\tsetErrorTips( result ) {\n\t\tthis.clearErrorTips( true );\n\t\tvar error_list = result.getDetails() ? result.getDetails()[0] : {};\n\t\tif ( error_list && error_list.hasOwnProperty( 'error' ) ) {\n\t\t\terror_list = error_list.error;\n\t\t}\n\t\tvar sort_array = [];\n\t\tif ( _.size( error_list ) > 0 ) {\n\t\t\tthis.$( '.save-btn' ).addClass( 'error' );\n\t\t} else {\n\t\t\tthis.$( '.save-btn' ).removeClass( 'error' );\n\t\t}\n\t\tfor ( var key in error_list ) {\n\t\t\tif ( !error_list.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar field_obj;\n\t\t\tif ( this.$( 'input[id=\"' + key + '\"]:visible' )[0] ) {\n\t\t\t\tfield_obj = this.$( 'input[id=\"' + key + '\"]:visible' );\n\t\t\t} else if ( this.$( 'select[id=\"' + key + '\"]:visible' )[0] ) {\n\t\t\t\tfield_obj = this.$( 'select[id=\"' + key + '\"]:visible' ).parents( '.styled-select' );\n\t\t\t} else if ( this.$( 'textarea[id=\"' + key + '\"]:visible' )[0] ) {\n\t\t\t\tfield_obj = this.$( 'textarea[id=\"' + key + '\"]:visible' );\n\t\t\t}\n\t\t\tif ( field_obj ) {\n\n\t\t\t\tfield_obj.addClass( 'error-tip' );\n\t\t\t\tvar error_string;\n\t\t\t\tif ( _.isArray( error_list[key] ) ) {\n\t\t\t\t\terror_string = error_list[key][0];\n\t\t\t\t} else {\n\t\t\t\t\terror_string = error_list[key];\n\t\t\t\t}\n\n\t\t\t\tfield_obj.tooltip( {\n\t\t\t\t\t'title': error_string,\n\t\t\t\t\t'placement': 'top',\n\t\t\t\t\t'selector': '#' + key\n\t\t\t\t} );\n\t\t\t\tfield_obj.tooltip( 'show' );\n\t\t\t\t//field_obj.tooltip('update');\n\n\t\t\t\tthis.edit_view_error_ui_dic[key] = field_obj;\n\t\t\t\tsort_array.push( field_obj.attr( 'data-sort' ) );\n\t\t\t}\n\t\t\t// if ( field_obj ) {\n\t\t\t// \t$('html, body').animate({\n\t\t\t// \t\tscrollTop: field_obj.offset().top\n\t\t\t// \t}, 2000);\n\t\t\t// }\n\t\t}\n\t\tif ( sort_array.length > 0 ) {\n\t\t\tsort_array.sort();\n\t\t\tvar error_top_object;\n\t\t\tvar key = sort_array[0];\n\t\t\tif ( this.$( 'input[data-sort=\"' + key + '\"]' )[0] ) {\n\t\t\t\terror_top_object = this.$( 'input[data-sort=\"' + key + '\"]' );\n\t\t\t} else if ( this.$( 'select[data-sort=\"' + key + '\"]' )[0] ) {\n\t\t\t\terror_top_object = this.$( 'select[data-sort=\"' + key + '\"]' );\n\t\t\t} else if ( this.$( 'textarea[data-sort=\"' + key + '\"]' )[0] ) {\n\t\t\t\terror_top_object = this.$( 'textarea[data-sort=\"' + key + '\"]' );\n\t\t\t}\n\t\t\t// $('html, body').animate({\n\t\t\t// \tscrollTop: error_top_object.offset().top\n\t\t\t// }, 2000);\n\t\t\tvar page = $( 'html, body' );\n\t\t\tpage.on( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function( e ) {\n\t\t\t\tif ( e.which > 0 || e.type == 'mousedown' || e.type == 'mousewheel' || e.type == 'touchmove' ) {\n\t\t\t\t\tpage.stop();\n\t\t\t\t}\n\t\t\t} );\n\t\t\tif ( error_top_object ) {\n\t\t\t\tpage.animate( { scrollTop: error_top_object.parent().find( '[data-toggle=tooltip]' ).offset().top }, 'slow', function() {\n\t\t\t\t\tpage.off( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove' );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\teSetProvince( val, refresh, callback ) {\n\t\tvar $this = this;\n\t\t$this.$( 'select[id=\"province\"]' ).selectpicker( 'destroy' );\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.e_province_array = [];\n\t\t\t$this.setSourceData( 'province', [] );\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\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\t$this.model.set( 'province', $this.e_province_array[0].value );\n\t\t\t\t\t\t$this.$( 'select[id=\"province\"]' ).val( $this.current_edit_record.province );\n\t\t\t\t\t}\n\t\t\t\t\t$this.setSourceData( 'province', res );\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}\n\t\t\t} );\n\t\t}\n\t}\n\n\tiSetProvince( val, refresh, callback ) {\n\t\tvar $this = this;\n\t\t$this.$( 'select[id=\"identification_province\"]' ).selectpicker( 'destroy' );\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.i_province_array = [];\n\t\t\t$this.setSourceData( 'identification_province', [] );\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.i_province_array = Global.buildRecordArray( res );\n\t\t\t\t\tif ( refresh && $this.i_province_array.length > 0 ) {\n\t\t\t\t\t\t$this.current_edit_record.identification_province = $this.i_province_array[0].value;\n\t\t\t\t\t\t$this.model.set( 'identification_province', $this.i_province_array[0].value );\n\t\t\t\t\t\t$this.$( 'select[id=\"identification_province\"]' ).val( $this.current_edit_record.identification_province );\n\t\t\t\t\t}\n\t\t\t\t\t$this.setSourceData( 'identification_province', res );\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}\n\t\t\t} );\n\t\t}\n\t}\n\n\tavailableJobsClick() {\n\t\twindow.location = Global.getBaseURL() + '#!m=PortalJobVacancy&company_id=' + LocalCacheData.getAllURLArgs().company_id;\n\t\tLocalCacheData.setAllURLArgs( {} );\n\t}\n\n\tappliedJobsClick() {\n\t\twindow.location = Global.getBaseURL() + '#!m=MyJobApplication&company_id=' + LocalCacheData.getAllURLArgs().company_id;\n\t\tLocalCacheData.setAllURLArgs( {} );\n\t}\n\n\tonSaveClick() {\n\t\tthis.clearErrorTips( true );\n\t\tvar $this = this;\n\t\t// if ( _.size(this.edit_view_error_ui_dic) > 0 ) {\n\t\t// \treturn;\n\t\t// }\n\t\tthis.api.setJobApplicant( this.current_edit_record, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\t$this.is_changed = null;\n\t\t\t\t\t$this.showAlert( $.i18n._( 'Profile Saved Successfully!' ), {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t'border': '2px solid #154575',\n\t\t\t\t\t\t\t'color': '#154575'\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\t$this.api.getJobApplicant( {\n\t\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\t\t\t\t$this.$( '#saveBtn' ).removeClass( 'error' );\n\t\t\t\t\t\t\t\t$this.edit_view_error_ui_dic = {};\n\t\t\t\t\t\t\t\tLocalCacheData.setPortalLoginUser( result.getResult()[0] );\n\t\t\t\t\t\t\t\tIndexViewController.instance.router.headerView.render();\n\t\t\t\t\t\t\t\t// $this.initEditViewData();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this.showErrorAlert( result );\n\t\t\t\t\t\t\t\tProgressBar.closeOverlay();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\t$this.setErrorTips( result );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tshowErrorAlert( result ) {\n\t\tvar details = result.getDetails();\n\n\t\tif ( details.hasOwnProperty( 'error' ) ) {\n\n\t\t}\n\t\tif ( !details ) {\n\t\t\tdetails = result.getDescription(); // If the details is empty, try to get description to show.\n\t\t}\n\t\tvar error_string = '';\n\n\t\tif ( Global.isArray( details ) || typeof details === 'object' ) {\n\n\t\t\t$.each( details, function( index, val ) {\n\n\t\t\t\tif ( val.hasOwnProperty( 'error' ) ) {\n\t\t\t\t\tval = val.error;\n\t\t\t\t}\n\n\t\t\t\tfor ( var key in val ) {\n\t\t\t\t\terror_string = error_string + val[key] + '<br>';\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\n\t\t\terror_string = details;\n\t\t}\n\n\t\tthis.showAlert( error_string );\n\t}\n\n\tshowAlert( content, options ) {\n\t\tIndexViewController.instance.router.showTipModal( content, options );\n\t}\n\n\tonFormTitleClick( e ) {\n\t\tthis.toggleSubViews( e );\n\t\t$( 'span.glyphicon', e.currentTarget ).toggleClass( 'glyphicon-chevron-up glyphicon-chevron-down' );\n\t\tsetTimeout( function() {\n\t\t\t$( e.currentTarget ).toggleClass( 'title-expand title-pack-up' );\n\t\t}, 500 );\n\t}\n\n\ttoggleSubViews( e ) {\n\t\tvar current_target_id = $( e.currentTarget ).attr( 'id' );\n\t\tvar target = '.' + current_target_id;\n\t\tthis.$( target ).slideToggle( 'row-expand row-pack-up' );\n\t}\n\n\tinitSubHistoryView() {\n\t\tvar history_views = [\n\t\t\t'JobApplicantEmployment', 'JobApplicantReference', 'JobApplicantLocation'\n\t\t];\n\t\tfor ( var key in history_views ) {\n\t\t\tthis.initSubViews( history_views[key] );\n\t\t}\n\t}\n\n\tinitSubQualificationView() {\n\t\t// var qualification_views = [\n\t\t// \t'JobApplicantSkill', 'JobApplicantEducation', 'JobApplicantMembership', 'JobApplicantLicense', 'JobApplicantLanguage'\n\t\t// ];\n\t\t// for( var key in qualification_views ) {\n\t\t// \tthis.initSubViews( qualification_views[key] );\n\t\t// }\n\t\tthis.initSubViews( 'JobApplicantSkill', { type_id: 10 } );\n\t\tthis.initSubViews( 'JobApplicantEducation', { type_id: 20 } );\n\t\tthis.initSubViews( 'JobApplicantLicense', { type_id: 30 } );\n\t\tthis.initSubViews( 'JobApplicantLanguage', { type_id: 40 } );\n\t\tthis.initSubViews( 'JobApplicantMembership', { type_id: 50 } );\n\t}\n\n\tinitSubApplicationView() {\n\t\tthis.initSubViews( 'JobApplication' );\n\t}\n\n\tinitSubDocumentView() {\n\t\tthis.initSubViews( 'Document' );\n\t}\n\n\tinitSubViews( sub_view_id, options ) {\n\t\tvar $this = this;\n\t\tswitch ( sub_view_id ) {\n\t\t\tcase 'JobApplication':\n\t\t\t\tvar all_columns = {\n\t\t\t\t\t'job_vacancy': $.i18n._( 'Job Vacancy' ),\n\t\t\t\t\t'created_date': $.i18n._( 'Date' )\n\t\t\t\t};\n\t\t\t\tthis.setSubViews( sub_view_id, all_columns );\n\t\t\t\tbreak;\n\t\t\tcase 'Document':\n\t\t\t\tvar all_columns = {\n\t\t\t\t\t'name': $.i18n._( 'Name' ),\n\t\t\t\t\t'created_date': $.i18n._( 'Uploaded Date' )\n\t\t\t\t};\n\t\t\t\tthis.setSubViews( sub_view_id, all_columns, options );\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantSkill':\n\t\t\tcase 'JobApplicantEducation':\n\t\t\tcase 'JobApplicantMembership':\n\t\t\tcase 'JobApplicantLicense':\n\t\t\tcase 'JobApplicantLanguage':\n\t\t\t\tvar args = {};\n\t\t\t\tvar filter_data = {};\n\t\t\t\tfilter_data.type_id = [options.type_id];\n\t\t\t\targs.filter_data = filter_data;\n\t\t\t\targs.filter_columns = {\n\t\t\t\t\t'id': true,\n\t\t\t\t\t'name': true\n\t\t\t\t};\n\t\t\t\tthis.qualification_api.getQualification( args, true, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\tvar res = result.getResult();\n\t\t\t\t\t\tif ( res === true && $this.isEnableAddQualification( sub_view_id ) === false ) {\n\t\t\t\t\t\t\t$this.$( '.' + sub_view_id + '-table' ).parent().parent().css( 'display', 'none' );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.showQualificationHeader();\n\t\t\t\t\t\t\t$this.getAllColumns( sub_view_id, function( all_columns ) {\n\t\t\t\t\t\t\t\t$this.setSubViews( sub_view_id, all_columns );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.getAllColumns( sub_view_id, function( all_columns ) {\n\t\t\t\t\t$this.setSubViews( sub_view_id, all_columns );\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tshowQualificationHeader() {\n\t\tthis.$( '#qualifications-tables' ).show();\n\t}\n\n\tisEnableAddQualification( sub_view_id ) {\n\t\tvar is_enable;\n\t\tswitch ( sub_view_id ) {\n\t\t\tcase 'JobApplicantSkill':\n\t\t\t\tis_enable = this.enable_add_qualification_fields.hasOwnProperty( 'skill' ) && this.enable_add_qualification_fields.skill === true;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantEducation':\n\t\t\t\tis_enable = this.enable_add_qualification_fields.hasOwnProperty( 'education' ) && this.enable_add_qualification_fields.education === true;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantMembership':\n\t\t\t\tis_enable = this.enable_add_qualification_fields.hasOwnProperty( 'membership' ) && this.enable_add_qualification_fields.membership === true;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantLicense':\n\t\t\t\tis_enable = this.enable_add_qualification_fields.hasOwnProperty( 'license' ) && this.enable_add_qualification_fields.license === true;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantLanguage':\n\t\t\t\tis_enable = this.enable_add_qualification_fields.hasOwnProperty( 'language' ) && this.enable_add_qualification_fields.language === true;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn is_enable;\n\t}\n\n\taddDocumentRow( document_id ) {\n\t\tvar $this = this;\n\t\tvar options = {};\n\t\toptions.filter_data = {\n\t\t\tid: document_id\n\t\t};\n\t\toptions.append = true;\n\t\tthis.initSubViews( 'Document', options );\n\t\t// $('html, body').animate({\n\t\t// \tscrollTop: $this.$('.Document-table').offset().top\n\t\t// }, 2000);\n\t}\n\n\tgetAllColumns( sub_view_id, callBack ) {\n\t\tvar $this = this;\n\t\tvar method = 'get' + sub_view_id + 'Options';\n\t\tthis.api[method]( 'columns', {\n\t\t\tonResult: function( columns_result ) {\n\t\t\t\tvar columns_result_data = columns_result.getResult();\n\t\t\t\tif ( callBack ) {\n\t\t\t\t\tcallBack( columns_result_data );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tsetSubViews( sub_view_id, display_columns, options ) {\n\t\tvar $this = this;\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_sort = {};\n\t\t// filter.filter_columns = this.getFilterColumnsFromDisplayColumns( display_columns );\n\t\tfilter.filter_items_per_page = 0; // Default to 0 to load user preference defined\n\t\tfilter.filter_page = 1;\n\t\tif ( Global.isSet( options ) && Global.isSet( options.filter_data ) ) {\n\t\t\tfilter.filter_data = options.filter_data;\n\t\t}\n\t\tthis.api['get' + sub_view_id]( filter, true, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result_data = result.getResult();\n\t\t\t\tvar container = '.' + sub_view_id + '-table';\n\t\t\t\tif ( !Global.isSet( options ) || ( Global.isSet( options ) && !options.append ) ) {\n\t\t\t\t\t$this.$( container ).empty();\n\t\t\t\t}\n\t\t\t\tif ( !Global.isArray( result_data ) && !( _global_TTUUID__WEBPACK_IMPORTED_MODULE_3__/* .TTUUID.isUUID */ .d.isUUID( $this.refresh_id ) ) ) {\n\t\t\t\t\t$this.$( container ).html( '<h4 class=\"no-result\">' + $.i18n._( 'None provided yet, click the ' + '\"+\"' + ' icon to add' ) + '</h4>' );\n\t\t\t\t} else {\n\t\t\t\t\t// if ( $this.$('.'+sub_view_id+'-table').find('.table-container').length == 0 ) {\n\t\t\t\t\t// \t$this.$('.'+sub_view_id+'-table').html('<div class=\"table-responsive\"><table class=\"table table-condensed table-bordered table-container\"><thead></thead><tbody></tbody></table></div>');\n\t\t\t\t\t// }\n\t\t\t\t\tfor ( var key in result_data ) {\n\t\t\t\t\t\t$this.initSubView( sub_view_id, display_columns, result_data[key] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tinitSubView( sub_view_id, display_columns, view_data ) {\n\t\tvar $this = this;\n\t\tvar sub_view_model = new Backbone.Model( view_data );\n\t\tvar view_name = sub_view_id + 'SubViewController';\n\t\tvar available_fields = null;\n\t\tvar enable_add_qualification;\n\t\tswitch ( sub_view_id ) {\n\t\t\tcase 'JobApplicantEmployment':\n\t\t\t\tavailable_fields = this.employment_history_fields;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantReference':\n\t\t\t\tavailable_fields = this.reference_fields;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantLocation':\n\t\t\t\tavailable_fields = this.location_fields;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantSkill':\n\t\t\t\tavailable_fields = this.skill_fields;\n\t\t\t\tenable_add_qualification = this.enable_add_qualification_fields.skill;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantEducation':\n\t\t\t\tavailable_fields = this.education_fields;\n\t\t\t\tenable_add_qualification = this.enable_add_qualification_fields.education;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantMembership':\n\t\t\t\tavailable_fields = this.membership_fields;\n\t\t\t\tenable_add_qualification = this.enable_add_qualification_fields.membership;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantLicense':\n\t\t\t\tavailable_fields = this.license_fields;\n\t\t\t\tenable_add_qualification = this.enable_add_qualification_fields.license;\n\t\t\t\tbreak;\n\t\t\tcase 'JobApplicantLanguage':\n\t\t\t\tavailable_fields = this.language_fields;\n\t\t\t\tenable_add_qualification = this.enable_add_qualification_fields.language;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// From the old requirejs imports:\n\t\t// \t'JobApplicantEmploymentSubViewController',\n\t\t// \t'JobApplicantReferenceSubViewController',\n\t\t// \t'JobApplicantLocationSubViewController',\n\t\t// \t'JobApplicantSkillSubViewController',\n\t\t// \t'JobApplicantEducationSubViewController',\n\t\t// \t'JobApplicantMembershipSubViewController',\n\t\t// \t'JobApplicantLicenseSubViewController',\n\t\t// \t'JobApplicantLanguageSubViewController',\n\t\t// \t'JobApplicationSubViewController',\n\t\t// \t'DocumentSubViewController'\n\t\t__webpack_require__(1034)(`./${view_name}`).then(function( module ) {\n\t\t\t//Old: Need to use eval() here to dynamically instantiate ES6 classes, rather than use: new window[view_name]\n\t\t\t//Old: var sub_view_controller = eval( 'new ' + view_name + \"( { table_container: $this.$( '.' + sub_view_id + '-table' ), model: sub_view_model, sub_view_id: sub_view_id, _delegate: $this, available_fields: available_fields, enable_add_qualification: enable_add_qualification, display_columns: display_columns } );\" );\n\n\t\t\tvar sub_view_controller = new module[view_name]( {\n\t\t\t\t// table_container: $this.$('.'+sub_view_id+'-table').find('.table-container'),\n\t\t\t\ttable_container: $this.$( '.' + sub_view_id + '-table' ),\n\t\t\t\tmodel: sub_view_model,\n\t\t\t\tsub_view_id: sub_view_id,\n\t\t\t\t_delegate: $this,\n\t\t\t\tavailable_fields: available_fields,\n\t\t\t\tenable_add_qualification: enable_add_qualification,\n\t\t\t\tdisplay_columns: display_columns\n\t\t\t} );\n\n\t\t}).catch( Global.importErrorHandler );\n\t}\n\n\tonSubViewAddClick( e ) {\n\t\tvar $this = this;\n\t\tvar current_target_id = $( e.currentTarget ).attr( 'id' );\n\t\tvar sub_view_id = current_target_id.split( '-' )[0];\n\t\tswitch ( sub_view_id ) {\n\t\t\tcase 'JobApplication':\n\t\t\t\tvar all_columns = {\n\t\t\t\t\t'job_vacancy': $.i18n._( 'Job Vacancy' ),\n\t\t\t\t\t'created_date': $.i18n._( 'Date' )\n\t\t\t\t};\n\t\t\t\t$this.setSubViewsDefaultData( sub_view_id, all_columns );\n\t\t\t\tbreak;\n\t\t\tcase 'Document':\n\t\t\t\tvar all_columns = {\n\t\t\t\t\t'name': $.i18n._( 'Name' ),\n\t\t\t\t\t'created_date': $.i18n._( 'Uploaded Date' )\n\t\t\t\t};\n\t\t\t\t$this.setSubViewsDefaultData( sub_view_id, all_columns );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.getAllColumns( sub_view_id, function( all_columns ) {\n\t\t\t\t\t$this.setSubViewsDefaultData( sub_view_id, all_columns );\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetSubViewsDefaultData( sub_view_id, display_columns ) {\n\t\tvar $this = this;\n\t\tif ( sub_view_id === 'JobApplication' ) {\n\t\t\tthis.availableJobsClick();\n\t\t\treturn;\n\t\t}\n\t\tthis.api['get' + sub_view_id + 'DefaultData']( {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result_data = result.getResult();\n\t\t\t\t// if ( $this.$('.'+sub_view_id+'-table').find('.table-container').length == 0 ) {\n\t\t\t\t// \t$this.$('.'+sub_view_id+'-table').html('<div class=\"table-responsive\"><table class=\"table table-condensed table-bordered table-container\"><thead></thead><tbody></tbody></table></div>');\n\t\t\t\t// }\n\t\t\t\t$this.initSubView( sub_view_id, display_columns, result_data );\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetFilterColumnsFromDisplayColumns( display_columns ) {\n\t\tvar column_filter = {};\n\t\tcolumn_filter.is_owner = true;\n\t\tcolumn_filter.id = true;\n\t\tcolumn_filter.is_child = true;\n\t\tcolumn_filter.in_use = true;\n\t\tcolumn_filter.first_name = true;\n\t\tcolumn_filter.last_name = true;\n\t\tcolumn_filter.job_vacancy_id = true;\n\n\t\t// Error: Unable to get property 'getGridParam' of undefined or null reference\n\t\t//Fixed possible exception -- Error: Unable to get property 'length' of undefined or null reference in /interface/html5/views/BaseViewController.js?v=7.4.3-20140924-090129 line 5031\n\t\t// if ( display_columns ) {\n\t\t// \tvar len = display_columns.length;\n\t\t//\n\t\t// \tfor ( var i = 0; i < len; i++ ) {\n\t\t// \t\tvar column_info = display_columns[i];\n\t\t// \t\tcolumn_filter[column_info.name] = true;\n\t\t// \t}\n\t\t// }\n\t\tfor ( var key in display_columns ) {\n\t\t\tcolumn_filter[key] = true;\n\t\t}\n\n\t\treturn column_filter;\n\t}\n\n}\n\nMyProfileViewController.html_template = `\n<div id=\"my_profile_view\">\n\t<div class=\"job-applicant-navbar\">\n\t\t<div class=\"container\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-3 col-sm-12 col-xs-12\">\n\t\t\t\t\t<button id=\"available_jobs\" class=\"btn btn-block btn-default\"><span class=\"glyphicon glyphicon-menu-left\"></span> <%= $.i18n._('Available Jobs') %></button>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-md-3 col-sm-12 col-xs-12\">\n\t\t\t\t\t<button id=\"applied_jobs\" class=\"btn btn-block btn-default\"><%= $.i18n._('Applied Jobs') %></button>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-md-2 col-sm-12 col-xs-12 offset-4\">\n\t\t\t\t\t<button id=\"saveBtn\" class=\"btn save-btn btn-block\"><%= $.i18n._('Save') %></button>\n\t\t\t\t</div>\n\t\t\t</div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8L2Rpdj5cblx0XHRcdFx0PGRpdiBjbGFzcz1cImNvbC1tZC0zIGNvbC1zbS0xMiBjb2wteHMtMTJcIj5cblx0XHRcdFx0XHQ8YnV0dG9uIGlkPVwiYXBwbGllZF9qb2JzXCIgY2xhc3M9XCJidG4gYnRuLWJsb2NrIGJ0bi1kZWZhdWx0XCI+PCU9ICQuaTE4bi5fKCdBcHBsaWVkIEpvYnMnKSAlPjwvYnV0dG9uPlxuXHRcdFx0XHQ8L2Rpdj5cblx0XHRcdFx0PGRpdiBjbGFzcz1cImNvbC1tZC0yIGNvbC1zbS0xMiBjb2wteHMtMTIgb2Zmc2V0LTRcIj5cblx0XHRcdFx0XHQ8YnV0dG9uIGlkPVwic2F2ZUJ0blwiIGNsYXNzPVwiYnRuIHNhdmUtYnRuIGJ0bi1ibG9ja1wiPjwlPSAkLmkxOG4uXygnU2F2ZScpICU+PC9idXR0b24+XG5cdFx0XHRcdDwvZGl2PlxuXHRcdFx0PC9kaXY+XG5cdFx0PC9kaXY+XG5cdDwvZGl2PlxuPC9kaXY+XG5gO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///388\n")},1034:(t,c,l)=>{var d={"./DocumentSubViewController":[9495,"DocumentSubViewController"],"./DocumentSubViewController.js":[9495,"DocumentSubViewController"],"./JobApplicantEducationSubViewController":[6042,"JobApplicantEducationSubViewController"],"./JobApplicantEducationSubViewController.js":[6042,"JobApplicantEducationSubViewController"],"./JobApplicantEmploymentSubViewController":[2838,"JobApplicantEmploymentSubViewController"],"./JobApplicantEmploymentSubViewController.js":[2838,"JobApplicantEmploymentSubViewController"],"./JobApplicantLanguageSubViewController":[864,"JobApplicantLanguageSubViewController"],"./JobApplicantLanguageSubViewController.js":[864,"JobApplicantLanguageSubViewController"],"./JobApplicantLicenseSubViewController":[536,"JobApplicantLicenseSubViewController"],"./JobApplicantLicenseSubViewController.js":[536,"JobApplicantLicenseSubViewController"],"./JobApplicantLocationSubViewController":[8157,"JobApplicantLocationSubViewController"],"./JobApplicantLocationSubViewController.js":[8157,"JobApplicantLocationSubViewController"],"./JobApplicantMembershipSubViewController":[1993,"JobApplicantMembershipSubViewController"],"./JobApplicantMembershipSubViewController.js":[1993,"JobApplicantMembershipSubViewController"],"./JobApplicantReferenceSubViewController":[9232,"JobApplicantReferenceSubViewController"],"./JobApplicantReferenceSubViewController.js":[9232,"JobApplicantReferenceSubViewController"],"./JobApplicantSkillSubViewController":[9548,"JobApplicantSkillSubViewController"],"./JobApplicantSkillSubViewController.js":[9548,"JobApplicantSkillSubViewController"],"./JobApplicantSubBaseViewController":[3757,"JobApplicantSubBaseViewController"],"./JobApplicantSubBaseViewController.js":[3757,"JobApplicantSubBaseViewController"],"./JobApplicationSubViewController":[3510,"JobApplicationSubViewController"],"./JobApplicationSubViewController.js":[3510,"JobApplicationSubViewController"],"./MyProfileViewController":[388],"./MyProfileViewController.js":[388]};function n(t){if(!l.o(d,t))return Promise.resolve().then((()=>{var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}));var c=d[t],n=c[0];return Promise.all(c.slice(1).map(l.e)).then((()=>l(n)))}n.keys=()=>Object.keys(d),n.id=1034,t.exports=n}}]);