TimeTrex/interface/html5/dist/attendance-recurring_schedule_control-RecurringScheduleControlViewController.bundle.js

1 line
72 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["attendance-recurring_schedule_control-RecurringScheduleControlViewController"],{869:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RecurringScheduleControlViewController\": () => (/* binding */ RecurringScheduleControlViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass RecurringScheduleControlViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#recurring_schedule_control_view_container',\n\n\n\t\t\tuser_status_array: null,\n\n\t\t\tuser_group_array: null,\n\t\t\tuser_api: null,\n\n\t\t\tuser_group_api: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'RecurringScheduleControlEditView.html';\n\t\tthis.permission_id = 'recurring_schedule';\n\t\tthis.viewId = 'RecurringScheduleControl';\n\t\tthis.script_name = 'RecurringScheduleControlView';\n\t\tthis.table_name_key = 'recurring_schedule_control';\n\t\tthis.context_menu_name = $.i18n._( 'Recurring Schedules' );\n\t\tthis.navigation_label = $.i18n._( 'Recurring Schedule' );\n\t\tthis.api = TTAPI.APIRecurringScheduleControl;\n\t\tthis.user_api = TTAPI.APIUser;\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\t\tthis.event_bus = new TTEventBus({ view_id: this.viewId });\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'status', 'user_status_id', this.user_api, function( res ) {\n\t\t\tres = res.getResult();\n\t\t\t$this.user_status_array = Global.buildRecordArray( res );\n\t\t} );\n\n\t\tthis.user_group_api.getUserGroup( '', false, false, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\n\t\t\t\tres = Global.buildTreeRecord( res );\n\t\t\t\t$this.user_group_array = res;\n\n\t\t\t\tif ( !$this.sub_view_mode && $this.basic_search_field_ui_dic['group_id'] ) {\n\t\t\t\t\t$this.basic_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t\t$this.adv_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tbuildEditViewUI() {\n\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_recurring_schedule': { 'label': $.i18n._( 'Recurring Schedule' ) },\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tvar form_item_input;\n\t\tvar widgetContainer;\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIRecurringScheduleControl,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_recurring_schedule_control',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\t//Tab 0 start\n\n\t\tvar tab_recurring_schedule = this.edit_view_tab.find( '#tab_recurring_schedule' );\n\n\t\tvar tab_recurring_schedule_column1 = tab_recurring_schedule.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_recurring_schedule_column1 );\n\n\t\t// Template\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIRecurringScheduleTemplateControl,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_recurring_template_control',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'recurring_schedule_template_control_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Template' ), form_item_input, tab_recurring_schedule_column1, '' );\n\n\t\t// Start Week\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'start_week', widt