1 line
27 KiB
JavaScript
1 line
27 KiB
JavaScript
|
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-re_calculate_accrual-ReCalculateAccrualWizardController"],{1490:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ReCalculateAccrualWizardController\": () => (/* binding */ ReCalculateAccrualWizardController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass ReCalculateAccrualWizardController extends BaseWizardController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '.wizard-bg',\n\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._( 'Accrual ReCalculation 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\t//Create each page UI\n\tbuildCurrentStepUI() {\n\n\t\tthis.content_div.empty();\n\t\tvar $this = this;\n\t\tthis.stepsWidgetDic[this.current_step] = {};\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._( 'Select one or more accrual policies' ) );\n\n\t\t\t\tvar a_combobox = this.getAComboBox( TTAPI.APIAccrualPolicy, true, 'global_accrual', 'accrual_policy_id' );\n\t\t\t\tvar div = $( '<div class=\\'wizard-acombobox-div\\'></div>' );\n\t\t\t\tdiv.append( a_combobox );\n\n\t\t\t\tthis.stepsWidgetDic[this.current_step][a_combobox.getField()] = a_combobox;\n\n\t\t\t\tthis.content_div.append( label );\n\t\t\t\tthis.content_div.append( div );\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tlabel = this.getLabel();\n\t\t\t\tlabel.text( $.i18n._( 'Select the date range' ) );\n\n\t\t\t\tthis.content_div.append( label );\n\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\n\t\t\t\tvar combobox = this.getComboBox( 'time_period', true );\n\n\t\t\t\tform_item_label.text( $.i18n._( 'Time Period' ) );\n\t\t\t\tform_item_input_div.append( combobox );\n\n\t\t\t\tthis.content_div.append( form_item );\n\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\n\t\t\t\tvar start_picker = this.getDatePicker( 'start_date' );\n\n\t\t\t\tform_item_label.text( $.i18n._( 'Start Date' ) );\n\t\t\t\tform_item_input_div.append( start_picker );\n\n\t\t\t\tthis.content_div.append( form_item );\n\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\n\t\t\t\tvar end_picker = this.getDatePicker( 'end_date' );\n\n\t\t\t\tform_item_label.text( $.i18n._( 'End Date' ) );\n\t\t\t\tform_item_input_div.append( end_picker );\n\n\t\t\t\tthis.content_div.append( form_item );\n\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\n\t\t\t\tvar pay_period = this.getAComboBox( TTAPI.APIPayPeriod, true, 'global_Pay_period', 'pay_period_id' );\n\n\t\t\t\tform_item_label.text( $.i18n._( 'Pay Period' ) );\n\t\t\t\tform_item_input_div.append( pay_period );\n\n\t\t\t\tthis.content_div.append( form_item );\n\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
|