TimeTrex/interface/html5/dist/wizard-find_available-FindAvailableWizardController.bundle.js

1 line
8.5 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-find_available-FindAvailableWizardController"],{6792:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FindAvailableWizardController\": () => (/* binding */ FindAvailableWizardController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass FindAvailableWizardController 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._( 'Find available Employees' );\n\t\tthis.steps = 1;\n\t\tthis.current_step = 1;\n\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tsuper.render();\n\n\t\tFindAvailableWizardController.type = this.default_data;\n\n\t\tthis.initCurrentStep();\n\t}\n\n\tbuildCurrentStepUI() {\n\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._( 'Pick one employee then click the green checkmark icon to assign the selected shift(s) to that employee' ) );\n\t\t\t\tthis.content_div.append( label );\n\n\t\t\t\tGlobal.loadViewSource( 'LoginUser', 'LoginUserView.css' );\n\n\t\t\t\tGlobal.loadViewSource( 'FindAvailable', 'FindAvailableViewController.js', function() {\n\n\t\t\t\t\tGlobal.loadViewSource( 'FindAvailable', 'FindAvailableView.html', function( result ) {\n\t\t\t\t\t\tvar args = {};\n\n\t\t\t\t\t\tvar template = _.template( result );\n\t\t\t\t\t\t$this.content_div.append( template( args ) );\n\n\t\t\t\t\t\tlet form_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\t\t\t\tform_item_input.TCheckbox( { field: 'notify_user_schedule_change' } );\n\n\t\t\t\t\t\tlet widgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\t\t\t\t\tlet label = $( '<span class=\\'widget-right-label\\' style=\\'position: relative; top: 5px;\\'> ' + $.i18n._( 'Notify Employee' ) + '</span>' );\n\t\t\t\t\t\twidgetContainer.append( form_item_input );\n\t\t\t\t\t\twidgetContainer.append( label );\n\n\t\t\t\t\t\t$this.content_div.find( '#find_available_view_container' ).prepend( widgetContainer );\n\t\t\t\t\t\t$this.stepsWidgetDic[$this.current_step].notify_user_schedule_change = form_item_input;\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\t\tbreak;\n\n\t\t}\n\t}\n\n\tbuildCurrentStepData() {\n\t}\n\n\tonCloseClick() {\n\n\t\t$( this.el ).remove();\n\t\tLocalCacheData.current_open_wizard_controllers = LocalCacheData.current_open_wizard_controllers.filter( wizard => wizard.wizard_id !== this.wizard_id );\n\t\tLocalCacheData.extra_filter_for_next_open_view = null;\n\t}\n\n\tonDoneClick() {\n\n\t\tif ( find_available_view_controller.getGridSelectIdArray().length != 1 ) {\n\t\t\tTAlertManager.showAlert( $.i18n._( 'Choose one Employee' ) );\n\t\t\treturn;\n\t\t}\n\n\t\tthis.onCloseClick();\n\n\t\tlet notify_user_schedule_change = this.stepsWidgetDic[this.current_step].notify_user_schedule_change.getValue();\n\n\t\tif ( this.call_back ) {\n\t\t\tthis.call_back( find_available_view_controller.getGridSelectIdArray()[0], notify_user_schedule_change );\n\t\t}\n\t}\n\n}\n\nFindAvailableWizardController.type = '';//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjc5Mi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDtBQUNBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTtBQUNBOztBQUVBLGVBQWUsQ0FBQztBQUNoQjtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsZ0JBQWdCLENBQUM7QUFDakI7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQSxxQkFBcUIsQ0FBQztBQUN0Qjs7QUFFQTtBQUNBLG1DQUFtQyx1Q0FBdUM7O0FBRTFFLDRCQUE