"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-Wizard"],{3207:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Wizard\": () => (/* binding */ Wizard)\n/* harmony export */ });\n/* harmony import */ var _views_TTBackboneView__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6739);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n/**\n * For an example of implementation see: interface/html5/views/payroll/remittance_wizard/PayrollRemittanceAgencyEventWizard.js\n *\n * CRITICAL: ALL WIZARDS MUST HAVE A HOME STEP SO THAT THEY HAVE SOMEWHERE TO START.\n **/\n\n\n\nclass Wizard extends _views_TTBackboneView__WEBPACK_IMPORTED_MODULE_0__.TTBackboneView {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tcurrent_step: false,\n\t\t\twizard_id: 'generic_wizard',\n\t\t\twizard_name: $.i18n._( 'Wizard' ),\n\t\t\tstep_history: {},\n\t\t\tstep_objects: {},\n\t\t\tel: $( '.wizard' ),\n\t\t\tprevious_wizard: null,\n\t\t\t_step_map: null,\n\t\t\tdo_not_initialize_onload: false, //when this flag is set, initialize will not be run automagically.\n\t\t\texternal_data: null,\n\t\t\tevents: {\n\t\t\t\t'click .close-btn': 'onCloseClick',\n\t\t\t\t'click .close-icon': 'onCloseClick',\n\t\t\t\t'click .wizard-overlay.onclick-close': 'onCloseClick',\n\t\t\t\t'click .forward-btn': 'onNextClick',\n\t\t\t\t'click .back-btn': 'onPrevClick',\n\t\t\t\t'click .done-btn': 'onDone'\n\t\t\t}\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinitialize( options ) {\n\t\tsuper.initialize( options );\n\n\t\tif ( options && options.external_data ) {\n\t\t\tthis.setExternalData( options.external_data );\n\t\t}\n\n\t\tif ( !this.do_not_initialize_onload ) {\n\t\t\tthis.step_history = {};\n\t\t\tthis.step_objects = {};\n\t\t\tvar $this = this;\n\n\t\t\tthis.initStepObject( ( this.getCurrentStepName() ? this.getCurrentStepName() : 'home' ), function( obj ) {\n\t\t\t\t$this.init();\n\t\t\t\t$this.render();\n\t\t\t\t$this.enableButtons();\n\n\n\t\t\t\tif ( $this.wizard_id === null ) {\n\t\t\t\t\t$this.wizard_id = $this.constructor.name;\n\t\t\t\t}\n\n\t\t\t\tif ( LocalCacheData.current_open_wizard_controllers.some( wizard => wizard.wizard_id === $this.wizard_id ) ) {\n\t\t\t\t\t$this.previous_wizard = LocalCacheData.current_open_wizard_controllers.find( wizard => wizard.wizard_id === $this.wizard_id );\n\t\t\t\t} else {\n\t\t\t\t\t$this.previous_wizard = false;\n\t\t\t\t}\n\n\t\t\t\tLocalCacheData.current_open_wizard_controllers.push( $this );\n\t\t\t} );\n\t\t}\n\t}\n\n\t//always override\n\tinit() {\n\t\treturn;\n\t}\n\n\tsetExternalData( data ) {\n\t\tthis.external_data = data;\n\t}\n\n\tgetExternalData() {\n\t\treturn this.external_data;\n\t}\n\n\tonNextClick( e ) {\n\t\tif ( this.button_click_procesing == true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.getStepObject().isRequiredButtonsClicked() == false ) { //On last step.\n\t\t\tvar $this = this;\n\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'WARNING: You are about to proceed to the next step without performing all required actions!

This may result in payments or reports not being submitted to this agency.

Are you sure you wish to continue?

' ), null, function( flag ) {\n\t\t\t\tif ( flag === true ) {\n\t\t\t\t\t//Log the fact that the user skipped a step.\n\t\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( $this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'step', $this.getStepObject().current_step, 'skip', false, true, {\n\t\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\t$this.onNextClickComplete( e );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( this.getStepObject().current_step == 'home' ) {\n\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'wizard', this.getStepObject().current_step, 'start', false, true, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'step', this.getStepObject().current_step, 'complete', false, true, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis.onNextClickComplete( e );\n\t\t}\n\t}\n\n\tonNextClickComplete( e ) {\n\t\tif ( $( e.target ).hasClass( 'disable-image' ) == false ) {\n\t\t\tthis.disableButtons();\n\n\t\t\tvar name = this.getStepObject().getNextStepName();\n\t\t\tvar $this = this;\n\t\t\tthis.initStepObject( name, function( step_obj ) {\n\t\t\t\tstep_obj.setPreviousStepName( $this.getCurrentStepName() );\n\t\t\t\t$this.setCurrentStepName( name );\n\t\t\t\t//$this.enableButtons(); //This should be done at the end of each _render() function to avoid race conditions and hammer clicking right arrow causing JS exceptions.\n\t\t\t} );\n\t\t}\n\t}\n\n\tonPrevClick( e ) {\n\t\tif ( this.button_click_procesing == true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( e === true || $( e.target ).hasClass( 'disable-image' ) == false ) {\n\t\t\tthis.disableButtons();\n\n\t\t\tvar name = this.getStepObject().getPreviousStepName();\n\t\t\tvar $this = this;\n\n\t\t\t//Needs to be initialized in the event that we came back from the min_tab.\n\t\t\tthis.initStepObject( name, function( step_obj ) {\n\t\t\t\t//step_obj.setPreviousStepName($this.getCurrentStepName());\n\t\t\t\t$this.setCurrentStepName( name );\n\t\t\t\t//$this.enableButtons(); //This should be done at the end of each _render() function to avoid race conditions and hammer clicking right arrow causing JS exceptions.\n\t\t\t} );\n\t\t}\n\t}\n\n\tonCloseClick( e ) {\n\t\tif ( !e || $( e.target ).hasClass( 'disable-image' ) == false ) {\n\t\t\tvar $this = this;\n\n\t\t\tif ( this.getStepObject().getPreviousStepName() !== false && this.getStepObject().getNextStepName() !== false ) { //Not on first step, and not last step\n\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'Are you sure you wish to cancel without completing all steps for this event?' ), null, function( flag ) {\n\t\t\t\t\tif ( flag === true ) {\n\t\t\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( $this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'wizard', $this.getStepObject().current_step, 'cancel', false, true, {\n\t\t\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t$this.cleanUp();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else if ( this.getStepObject().getNextStepName() == false ) { //On last step.\n\t\t\t\tif ( this.getStepObject().isRequiredButtonsClicked() == false ) { //Required actions are not performed.\n\t\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'WARNING: You are about to cancel without performing all required actions on this step!

This may result in payments or reports not being submitted to this agency.

Are you sure you wish to continue?

' ), null, function( flag ) {\n\t\t\t\t\t\tif ( flag === true ) {\n\t\t\t\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( $this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'wizard', $this.getStepObject().current_step, 'cancel', false, true, {\n\t\t\t\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t$this.cleanUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} else { //Required actions ARE performed.\n\t\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'Are you sure you wish to cancel without marking this event as completed?' ), null, function( flag ) {\n\t\t\t\t\t\tif ( flag === true ) {\n\t\t\t\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( $this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'wizard', $this.getStepObject().current_step, 'cancel', false, true, {\n\t\t\t\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t$this.cleanUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'wizard', this.getStepObject().current_step, 'complete', false, true, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t$this.cleanUp();\n\t\t\t}\n\t\t}\n\t}\n\n\tonDone( e ) {\n\t\tif ( !e || $( e.target ).hasClass( 'disable-image' ) == false ) {\n\t\t\tvar $this = this;\n\n\t\t\tif ( this.getStepObject().getNextStepName() == false && this.getStepObject().isRequiredButtonsClicked() == false ) { //On last step.\n\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'WARNING: You are about to mark this event as completed without performing all required actions on this step!

This may result in payments or reports not being submitted to this agency.

Are you sure you wish to continue?

' ), null, function( flag ) {\n\t\t\t\t\tif ( flag === true ) {\n\t\t\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( $this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'step', $this.getStepObject().current_step, 'skip', false, true, {\n\t\t\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\t\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( $this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'wizard', $this.getStepObject().current_step, 'complete', false, true, {\n\t\t\t\t\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t$this.onDoneComplete();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tvar api_payroll_remittance_agency_event = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\t\t\tapi_payroll_remittance_agency_event.doLogWizardEvent( this.getStepObject().getWizardObject().selected_remittance_agency_event_id, 'wizard', this.getStepObject().current_step, 'complete', false, true, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t$this.onDoneComplete();\n\t\t\t}\n\t\t}\n\t}\n\n\t//Override this function to perform other actions when the user clicks the green checkmark to complete the wizard.\n\tonDoneComplete( e ) {\n\t\t$this.cleanUp();\n\t}\n\n\taddStepObject( name, obj ) {\n\t\t//always override.\n\t\tthis.step_objects[name] = obj;\n\t\treturn this.step_objects[name]; //returned for chaining.\n\t}\n\n\tgetStepObject( name ) {\n\t\tif ( typeof name == 'undefined' ) {\n\t\t\tname = this.getCurrentStepName();\n\t\t}\n\n\t\tif ( typeof this.step_objects[name] == 'object' ) {\n\t\t\treturn this.step_objects[name];\n\t\t}\n\t\treturn this.step_objects['home'];\n\t}\n\n\tgetCurrentStepName() {\n\t\treturn this.current_step;\n\t}\n\n\tsetCurrentStepName( val ) {\n\t\tthis.current_step = val;\n\t}\n\n\t//Stub to stop backbone from complaining that it's missing, Wizard really doesn't render itself as such, it just displays its template.\n\trender() {\n\t}\n\n\t/*\n\t * Clean up the markup.\n\t */\n\tcleanUp() {\n\t\t$( this.el ).remove();\n\t\tfor ( var n in this.step_objects ) {\n\t\t\tif ( this.step_objects[n] ) {\n\t\t\t\tthis.step_objects[n].reload = true;\n\t\t\t}\n\t\t}\n\n\t\tLocalCacheData.current_open_wizard_controllers = LocalCacheData.current_open_wizard_controllers.filter( wizard => wizard.wizard_id !== this.wizard_id );\n\n\t\t$().TFeedback( {\n\t\t\tsource: this.wizard_id\n\t\t} );\n\t}\n\n\t/**\n\t * setup a step object\n\t *\n\t * @param name\n\t * @param callback\n\t */\n\tinitStepObject( name, callback ) {\n\t\tif ( this._step_map.hasOwnProperty( name ) ) {\n\t\t\tif ( this.step_objects[name] == null || typeof this.step_objects[name] != 'object' ) {\n\t\t\t\tvar $this = this;\n\t\t\t\tGlobal.loadScript( this._step_map[name].script_path, function() {\n\t\t\t\t\t$this.setCurrentStepName( name );\n\t\t\t\t\t$( $this.el ).find( '.content' ).html( '' );\n\n\t\t\t\t\t//var obj = new window[$this._step_map[name].object_name]( $this );\n\t\t\t\t\tvar obj = eval( 'new ' + $this._step_map[name].object_name + '( $this );' );\n\t\t\t\t\tobj.reload = false;\n\t\t\t\t\t$this.addStepObject( name, obj );\n\n\t\t\t\t\tif ( typeof callback == 'function' ) {\n\t\t\t\t\t\tcallback( obj );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t//reopening a step\n\t\t\t\tthis.setCurrentStepName( name );\n\t\t\t\tif ( typeof callback == 'function' ) {\n\t\t\t\t\tvar obj = this.step_objects[name];\n\n\t\t\t\t\t$( this.el ).find( '.content' ).html( '' );\n\t\t\t\t\t//obj = new window[this._step_map[name].object_name]( this );\n\t\t\t\t\tvar obj = eval( 'new ' + this._step_map[name].object_name + '( this );' );\n\n\t\t\t\t\t//reopening a step that has been opened in a previously closed wizard.\n\t\t\t\t\tif ( this.step_objects[name].reload == true ) {\n\t\t\t\t\t\tobj.clicked_buttons = {};\n\t\t\t\t\t\tobj.reload = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.addStepObject( name, obj );\n\n\t\t\t\t\tcallback( obj );\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tdisableButtons() {\n\t\tthis.button_click_procesing = true;\n\n\t\t//Changing the button images causes flashing and isn't required for just disabling the buttons while the view loads.\n\t\t// $( this.el ).find( '.forward-btn' ).addClass( 'disable-image' );\n\t\t// $( this.el ).find( '.back-btn' ).addClass( 'disable-image' );\n\t}\n\n\t/**\n\t * Enables the next/prev buttons\n\t * the step object for the first step should return false instead fo a previous step name to disable the previous button\n\t * the step object for the last step should return false instead of a next step name to disable the next button and enable the done button.\n\t */\n\tenableButtons() {\n\t\tvar step = this.getStepObject();\n\n\t\tif ( typeof step.getNextStepName() != 'string' ) {\n\t\t\t$( this.el ).find( '.forward-btn' ).addClass( 'disable-image' );\n\t\t\t$( this.el ).find( '.done-btn' ).removeClass( 'disable-image' ); //When right arrow is disabled, assume last step and enable done button.\n\t\t} else {\n\t\t\t$( this.el ).find( '.forward-btn' ).removeClass( 'disable-image' );\n\t\t\t$( this.el ).find( '.done-btn' ).addClass( 'disable-image' ); //When right arrow is enabled, assume *not* last step, disable done button.\n\t\t}\n\n\t\tif ( typeof step.getPreviousStepName() != 'string' ) {\n\t\t\t$( this.el ).find( '.back-btn' ).addClass( 'disable-image' );\n\t\t} else {\n\t\t\t$( this.el ).find( '.back-btn' ).removeClass( 'disable-image' );\n\t\t}\n\n\t\tthis._enableButtons();\n\n\t\tthis.button_click_procesing = false;\n\t}\n\n\t//override me.\n\t_enableButtons() {\n\t}\n\n\t/**\n\t * minimize the wiazrd to a min_tab\n\t */\n\tminimize() {\n\t\tLocalCacheData.PayrollRemittanceAgencyEventWizardController = this;\n\t\t//Remove from current_open_wizard_controllers so that when opening a new wizard the user does not get\n\t\t//a message asking them to close the previous (minimized) wizard that is not viewable.\n\t\tLocalCacheData.current_open_wizard_controllers = LocalCacheData.current_open_wizard_controllers.filter( wizard => wizard.wizard_id !== this.wizard_id );\n\t\tGlobal.addViewTab( this.wizard_id, this.wizard_name, window.location.href );\n\t\tthis.delegateEvents();\n\t\t$( this.el ).remove();\n\t}\n\n\treload() {\n\t\tfor ( var i in this.step_objects ) {\n\t\t\tthis.step_objects[i].reload = true;\n\t\t}\n\t}\n\n\tdisableForCommunity( callback ) {\n\t\tif ( Global.getProductEdition() <= 10 ) {\n\t\t\tTAlertManager.showAlert( Global.getUpgradeMessage(), $.i18n._( 'Denied' ) );\n\t\t} else {\n\t\t\tif ( typeof callback == 'function' ) {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\n\t}\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIwNy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFd0Q7O0FBRWpELHFCQUFxQixpRUFBYztBQUMxQywyQkFBMkI7QUFDM0IsRUFBRSxDQUFDO0FBQ0g7QUFDQTtBQUNBLGdCQUFnQixDQUFDO0FBQ2pCLG1CQUFtQjtBQUNuQixtQkFBbUI7QUFDbkIsT0FBTyxDQUFDO0FBQ1I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBSTs7QUFFSjtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0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