"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["payroll-process_transactions_wizard-ProcessTransactionsWizardController","payroll-process_transactions_wizard-ProcessTransactionsWizard","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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIwNy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFd0Q7O0FBRWpELHFCQUFxQixpRUFBYztBQUMxQywyQkFBMkI7QUFDM0IsRUFBRSxDQUFDO0FBQ0g7QUFDQTtBQUNBLGdCQUFnQixDQUFDO0FBQ2pCLG1CQUFtQjtBQUNuQixtQkFBbUI7QUFDbkIsT0FBTyxDQUFDO0FBQ1I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBSTs7QU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JDb21tdW5pdHkoIGNhbGxiYWNrICkge1xuXHRcdGlmICggR2xvYmFsLmdldFByb2R1Y3RFZGl0aW9uKCkgPD0gMTAgKSB7XG5cdFx0XHRUQWxlcnRNYW5hZ2VyLnNob3dBbGVydCggR2xvYmFsLmdldFVwZ3JhZGVNZXNzYWdlKCksICQuaTE4bi5fKCAnRGVuaWVkJyApICk7XG5cdFx0fSBlbHNlIHtcblx0XHRcdGlmICggdHlwZW9mIGNhbGxiYWNrID09ICdmdW5jdGlvbicgKSB7XG5cdFx0XHRcdGNhbGxiYWNrKCk7XG5cdFx0XHR9XG5cdFx0fVxuXG5cdH1cblxufSJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///3207\n")},171:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ProcessTransactionsWizard\": () => (/* binding */ ProcessTransactionsWizard)\n/* harmony export */ });\n/* harmony import */ var _global_widgets_wizard_Wizard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3207);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\nclass ProcessTransactionsWizard extends _global_widgets_wizard_Wizard__WEBPACK_IMPORTED_MODULE_0__.Wizard {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: $( '.process_transactions_wizard' ),\n\t\t\tcurrent_step: false,\n\t\t\twizard_name: $.i18n._( 'Process Transactions' ),\n\n\t\t\tselected_transaction_ids: [],\n\n\t\t\twizard_id: 'ProcessTransactionsWizard',\n\t\t\t_step_map: {\n\t\t\t\t'home': { // TODO: Webpack: Investigate how this works/does not work with Webpack\n\t\t\t\t\tscript_path: 'views/payroll/process_transactions_wizard/ProcessTransactionsWizardStepHome.js',\n\t\t\t\t\tobject_name: 'ProcessTransactionsWizardStepHome'\n\t\t\t\t}\n\n\t\t\t},\n\t\t\tapi: null,\n\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tsetTransactionIds( data ) {\n\t\tthis.selected_transaction_ids = data;\n\t\tif ( this.selected_transaction_ids.length > 0 ) {\n\t\t\t$( '.process_transactions_wizard .done-btn' ).removeClass( 'disable-image' );\n\t\t} else {\n\t\t\t$( '.process_transactions_wizard .done-btn' ).addClass( 'disable-image' );\n\t\t}\n\t}\n\n\t/**\n\t * @param e\n\t */\n\tonDone( e ) {\n\t\tif ( e && $( e.target ).hasClass( 'disable-image' ) == false ) {\n\t\t\tvar $this = LocalCacheData.current_open_wizard_controllers.find( wizard => wizard.wizard_id === this.wizard_id );\n\n\t\t\tvar data = { filter_data: {} };\n\t\t\tvar external_data = $this.getExternalData();\n\t\t\tif ( external_data ) {\n\t\t\t\tif ( !external_data.filter_data ) {\n\t\t\t\t\tdata.filter_data = external_data;\n\t\t\t\t} else {\n\t\t\t\t\tdata.filter_data = external_data.filter_data;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !data || !data.filter_data ) {\n\t\t\t\tdata.filter_data = {};\n\t\t\t}\n\n\t\t\tif ( !data.filter_data.remittance_source_account_id ) {\n\t\t\t\tdata.filter_data.remittance_source_account_id = [];\n\t\t\t}\n\n\t\t\tif ( !data.filter_data.setup_last_check_number ) {\n\t\t\t\tdata.setup_last_check_number = {};\n\t\t\t}\n\n\t\t\tvar table_rows = $( '#process_transactions_wizard_source_account_table tr' );\n\t\t\tif ( table_rows.length > 0 ) {\n\t\t\t\tfor ( var x = 0; x < table_rows.length; x++ ) {\n\t\t\t\t\tvar row = $( table_rows[x] );\n\t\t\t\t\tif ( row.find( '[type=\"checkbox\"]' ).is( ':checked' ) ) {\n\t\t\t\t\t\tdata.filter_data.remittance_source_account_id.push( row.find( '[type=\"checkbox\"]' ).val() );\n\t\t\t\t\t\tdata.setup_last_check_number[row.find( '[type=\"checkbox\"]' ).val()] = row.find( 'input.last_transaction_number' ).val();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( data.filter_data.remittance_source_account_id.length > 0 ) {\n\t\t\t\t$( e.target ).addClass( 'disable-image' );\n\t\t\t\tvar post_data = { 0: data, 1: true, 2: 'export_transactions' };\n\t\t\t\tvar api = TTAPI.APIPayStub;\n\t\t\t\tGlobal.APIFileDownload( api.className, 'getPayStub', post_data );\n\t\t\t} else {\n\t\t\t\tDebug.Text( 'No source accounts selected', 'ProcessTransactionsWizard.js', 'ProcessTransactionsWizard', 'onDone', 10 );\n\t\t\t}\n\t\t\t$this.onCloseClick( true );\n\t\t}\n\t}\n\n\tonCloseClick( e ) {\n\t\tif ( e === true || ( e && $( e.target ).hasClass( 'disable-image' ) == false ) ) {\n\t\t\t//if process payroll wizard is minimized, click it.\n\t\t\tif ( $( '#min_tab_ProcessPayrollWizard' )[0] ) {\n\t\t\t\t$( $( '#min_tab_ProcessPayrollWizard' )[0] ).click();\n\t\t\t}\n\t\t\tthis.cleanUp();\n\t\t}\n\t}\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcxLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBd0Q7O0FBRWpELHdDQUF3QyxpRUFBTTtBQUNyRCwyQkFBMkI7QUFDM0IsRUFBRSxDQUFDO0FBQ0gsT0FBTyxDQUFDO0FBQ1I7QUFDQSxnQkFBZ0IsQ0FBQzs7QUFFakI7O0FBRUE7QUFDQTtBQUNBLGNBQWM7QUFDZDtBQUNBO0FBQ0E7O0FBRUEsSUFBSTtBQUNKOztBQUVBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxHQUFHLENBQUM7QUFDSixJQUFJO0FBQ0osR0FBRyxDQUFDO0FBQ0o7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVksQ0FBQztBQUNiOztBQUVBLGd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iB0cnVlLCAyOiAnZXhwb3J0X3RyYW5zYWN0aW9ucycgfTtcblx0XHRcdFx0dmFyIGFwaSA9IFRUQVBJLkFQSVBheVN0dWI7XG5cdFx0XHRcdEdsb2JhbC5BUElGaWxlRG93bmxvYWQoIGFwaS5jbGFzc05hbWUsICdnZXRQYXlTdHViJywgcG9zdF9kYXRhICk7XG5cdFx0XHR9IGVsc2Uge1xuXHRcdFx0XHREZWJ1Zy5UZXh0KCAnTm8gc291cmNlIGFjY291bnRzIHNlbGVjdGVkJywgJ1Byb2Nlc3NUcmFuc2FjdGlvbnNXaXphcmQuanMnLCAnUHJvY2Vzc1RyYW5zYWN0aW9uc1dpemFyZCcsICdvbkRvbmUnLCAxMCApO1xuXHRcdFx0fVxuXHRcdFx0JHRoaXMub25DbG9zZUNsaWNrKCB0cnVlICk7XG5cdFx0fVxuXHR9XG5cblx0b25DbG9zZUNsaWNrKCBlICkge1xuXHRcdGlmICggZSA9PT0gdHJ1ZSB8fCAoIGUgJiYgJCggZS50YXJnZXQgKS5oYXNDbGFzcyggJ2Rpc2FibGUtaW1hZ2UnICkgPT0gZmFsc2UgKSApIHtcblx0XHRcdC8vaWYgcHJvY2VzcyBwYXlyb2xsIHdpemFyZCBpcyBtaW5pbWl6ZWQsIGNsaWNrIGl0LlxuXHRcdFx0aWYgKCAkKCAnI21pbl90YWJfUHJvY2Vzc1BheXJvbGxXaXphcmQnIClbMF0gKSB7XG5cdFx0XHRcdCQoICQoICcjbWluX3RhYl9Qcm9jZXNzUGF5cm9sbFdpemFyZCcgKVswXSApLmNsaWNrKCk7XG5cdFx0XHR9XG5cdFx0XHR0aGlzLmNsZWFuVXAoKTtcblx0XHR9XG5cdH1cbn0iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///171\n")},3248:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ProcessTransactionsWizardController\": () => (/* binding */ ProcessTransactionsWizardController)\n/* harmony export */ });\n/* harmony import */ var _views_payroll_process_transactions_wizard_ProcessTransactionsWizard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(171);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\nclass ProcessTransactionsWizardController extends BaseWindowController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '.process_transactions_wizard',\n\n\t\t\twizard_obj: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( external_data ) {\n\t\tvar $this = this;\n\n\t\tvar wizard_id = 'ProcessTransactionsWizard';\n\t\t//LocalCacheData[this.wizard_id] is set when the wizard is minimized due to external navigation\n\t\tif ( !$this.wizard_obj && LocalCacheData[wizard_id] ) {\n\t\t\t$this.wizard_obj = LocalCacheData[wizard_id];\n\t\t\tdelete LocalCacheData[wizard_id];\n\t\t} else {\n\t\t\t$this.wizard_obj = new _views_payroll_process_transactions_wizard_ProcessTransactionsWizard__WEBPACK_IMPORTED_MODULE_0__.ProcessTransactionsWizard( {\n\t\t\t\tel: $( '.process_transactions_wizard' ),\n\t\t\t\texternal_data: external_data\n\t\t\t} );\n\t\t}\n\t}\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzI0OC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQWtIOztBQUUzRztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJO0FBQ0osMEJBQTBCLDJIQUF5QjtBQUNuRCxRQUFRLENBQUM7QUFDVDtBQUNBLEtBQUs7QUFDTDtBQUNBO0FBQ0E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