TimeTrex/interface/html5/dist/wizard-generate_pay_stub-GeneratePayStubWizardController.bundle.js

1 line
37 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-generate_pay_stub-GeneratePayStubWizardController"],{7534:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"GeneratePayStubWizardController\": () => (/* binding */ GeneratePayStubWizardController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass GeneratePayStubWizardController extends BaseWizardController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '.wizard-bg'\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\n\t\tthis.title = $.i18n._( 'Generate Pay Stub Wizard' );\n\t\tthis.steps = 3;\n\t\tthis.current_step = 1;\n\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tsuper.render();\n\n\t\tthis.initCurrentStep();\n\t}\n\n\tbuildCurrentStepUI() {\n\t\tvar $this = this;\n\t\tthis.content_div.empty();\n\n\t\tthis.stepsWidgetDic[this.current_step] = {};\n\n\t\tswitch ( this.current_step ) {\n\t\t\tcase 1:\n\t\t\t\tvar label = this.getLabel();\n\t\t\t\tlabel.text( $.i18n._( 'Generate pay stubs for individual employees when manual modifications or a termination occurs. Use Payroll -> Process Payroll if you wish to generate pay stubs for all employees instead.' ) );\n\n\t\t\t\tthis.content_div.append( label );\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\n\t\t\t\tlabel = this.getLabel();\n\t\t\t\tlabel.text( $.i18n._( 'Select one or more pay periods and choose a payroll run type' ) );\n\t\t\t\tthis.content_div.append( label );\n\t\t\t\t// Pay period\n\t\t\t\tvar form_item = $( Global.loadWidget( 'global/widgets/wizard_form_item/WizardFormItem.html' ) );\n\t\t\t\tvar form_item_label = form_item.find( '.form-item-label' );\n\t\t\t\tvar form_item_input_div = form_item.find( '.form-item-input-div' );\n\t\t\t\tvar a_combobox = this.getAComboBox( TTAPI.APIPayPeriod, true, 'global_Pay_period', 'pay_period_id' );\n\t\t\t\ta_combobox.unbind( 'formItemChange' ).bind( 'formItemChange', function( e, target ) {\n\t\t\t\t\t$this.saveCurrentStep();\n\t\t\t\t\t$this.onPayPeriodChange( true );\n\t\t\t\t\t$this.setPayRun( target.getValue() );\n\t\t\t\t} );\n\t\t\t\tform_item_label.text( $.i18n._( 'Pay Period' ) );\n\t\t\t\tform_item_input_div.append( a_combobox );\n\t\t\t\tthis.content_div.append( form_item );\n\t\t\t\tthis.stepsWidgetDic[this.current_step][a_combobox.getField()] = a_combobox;\n\n\t\t\t\t// Payroll Run Type\n\t\t\t\tform_item = $( Global.loadWidget( 'global/widgets/wizard_form_item/WizardFormItem.html' ) );\n\t\t\t\tform_item_label = form_item.find( '.form-item-label' );\n\t\t\t\tform_item_input_div = form_item.find( '.form-item-input-div' );\n\t\t\t\tvar combobox = this.getComboBox( 'type_id', false );\n\t\t\t\tform_item_label.text( $.i18n._( 'Payroll Run Type' ) );\n\t\t\t\tform_item_input_div.append( combobox );\n\t\t\t\tthis.content_div.append( form_item );\n\t\t\t\tthis.stepsWidgetDic[this.current_step][combobox.getField()] = combobox;\n\n\t\t\t\tcombobox.unbind( 'formItemChange' ).bind( 'formItemChange', function( e, target ) {\n\t\t\t\t\t$this.saveCurrentStep();\n\t\t\t\t\t$this.onPayrollTypeChange( true );\n\t\t\t\t} );\n\n\t\t\t\t//Carry Forward to Date\n\t\t\t\tform_item = $( Global.loadWidget( 'global/widgets/wizard_form_item/WizardFormItem.html' ) );\n\t\t\t\tform_item_label = form_item.find( '.form-item-label' );\n\t\t\t\tform_item_input_div = form_item.find( '.form-item-input-div' );\n\t\t\t\tvar date_picker = this.getDatePicker( 'carry_forward_to_date' );\n\t\t\t\tform_item_label.text( $.i18n._( 'Carry Forward Adjustments to' ) );\n\t\t\t\tform_item_input_div.append( date_picker );\n\t\t\t\tthis.content_div.append( form_item );\n\t\t\t\tthis.stepsWidgetDic[this.current_step][date_picker.getField()] = date_picker;\n\t\t\t\tthis.stepsWidgetDic[this.current_step][date_picker.getField() + '_row'] =