"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["attendance-recurring_schedule_template_control-RecurringScheduleTemplateControlViewController"],{7067:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RecurringScheduleTemplateControlViewController\": () => (/* binding */ RecurringScheduleTemplateControlViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass RecurringScheduleTemplateControlViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#recurring_schedule_template_control_view_container',\n\n\n\t\t\tsub_document_view_controller: null,\n\n\t\t\tdocument_object_type_id: null,\n\n\t\t\trecurring_schedule_template_api: null,\n\n\t\t\tschedule_api: null,\n\n\t\t\trecurring_schedule_status_array: 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 = 'RecurringScheduleTemplateControlEditView.html';\n\t\tthis.permission_id = 'recurring_schedule_template';\n\t\tthis.viewId = 'RecurringScheduleTemplateControl';\n\t\tthis.script_name = 'RecurringScheduleTemplateControlView';\n\t\tthis.table_name_key = 'recurring_schedule_template_control';\n\t\tthis.context_menu_name = $.i18n._( 'Recurring Templates' );\n\t\tthis.navigation_label = $.i18n._( 'Recurring Template' );\n\t\tthis.api = TTAPI.APIRecurringScheduleTemplateControl;\n\t\tthis.schedule_api = TTAPI.APISchedule;\n\t\tthis.recurring_schedule_template_api = TTAPI.APIRecurringScheduleTemplate;\n\n\t\tthis.document_object_type_id = 10;\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', null, this.recurring_schedule_template_api, function( res ) {\n\t\t\tres = res.getResult();\n\t\t\t$this.recurring_schedule_status_array = Global.buildRecordArray( res );\n\t\t} );\n\t}\n\n\tbuildEditViewUI() {\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_recurring_template': {\n\t\t\t\t'label': $.i18n._( 'Recurring Template' ),\n\t\t\t\t'html_template': this.getRecurringTemplateTabHtml()\n\t\t\t},\n\t\t\t'tab_attachment': true,\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tvar form_item_input;\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIRecurringScheduleTemplateControl,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_recurring_template_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//These width changes can cause crashes when tab is hidden on selenium screenshot unit test mode.\n\t\t//Left menu would not be clickable due to elements overlapping.\n\t\tif ( Global.UNIT_TEST_MODE == false ){\n\t\t\tthis.edit_view_tab.css( 'max-width', 'none' );\n\n\t\t\tif ( Global.getProductEdition() >= 20 ) {\n\t\t\t\tthis.edit_view_tab.css( 'min-width', '1250px' );\n\t\t\t} else if ( Global.getProductEdition() >= 15 ) {\n\t\t\t\tthis.edit_view_tab.css( 'min-width', '1050px' );\n\t\t\t} else {\n\t\t\t\tthis.edit_view_tab.css( 'min-width', '950px' );\n\t\t\t}\n\t\t}\n\n\t\t//Tab 0 start\n\n\t\tvar tab_recurring_template = this.edit_view_tab.find( '#tab_recurring_template' );\n\n\t\tvar tab_recurring_template_column1 = tab_recurring_template.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_recurring_template_column1 );\n\n\t\t//Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'name', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Name' ), form_item_input, tab_recurring_template_column1, '' );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Description\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'description', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Description' ), form_item_input, tab_recurring_template_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIUser,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_user',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'created_by_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Created By' ), form_item_input, tab_recurring_template_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//Inside editor\n\n\t\tvar inside_editor_div = tab_recurring_template.find( '.inside-editor-div' );\n\n\t\tvar args = {\n\t\t\tweek: $.i18n._( 'Week' ),\n\t\t\tstatus: $.i18n._( 'Status' ),\n\t\t\tweek_names: 'S M T W T  F S',\n\t\t\tshift_time: $.i18n._( 'Shift Time' ),\n\t\t\ttotal: $.i18n._( 'Total' ),\n\t\t\tschedule_policy: $.i18n._( 'Schedule Policy' ),\n\t\t\tbranch_department: $.i18n._( 'Branch/Department' ),\n\t\t\tjob_task: $.i18n._( 'Job/Task/Tags' ),\n\t\t\topen_shift_multiplier: $.i18n._( 'Open Shift Multiplier' )\n\t\t};\n\n\t\tthis.editor = Global.loadWidgetByName( FormItemType.INSIDE_EDITOR );\n\n\t\tthis.editor.InsideEditor( {\n\t\t\ttitle: $.i18n._( 'NOTE: To set different In/Out times for each day of the week, add additional weeks all with the same week number.' ),\n\t\t\taddRow: this.insideEditorAddRow,\n\t\t\tremoveRow: this.insideEditorRemoveRow,\n\t\t\tgetValue: this.insideEditorGetValue,\n\t\t\tsetValue: this.insideEditorSetValue,\n\t\t\tparent_controller: this,\n\t\t\tapi: this.recurring_schedule_template_api,\n\t\t\trender: getRender(),\n\t\t\trender_args: args,\n\t\t\trender_inline_html: true,\n\t\t\trow_render: getRowRender()\n\n\t\t} );\n\n\t\tfunction getRender() {\n\t\t\tvar render = ''\n\n\t\t\tif ( Global.getProductEdition() >= 20 ) {\n\t\t\t\trender = `\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t<%= week %> | \n\t\t\t\t\t\t<%= status %> | \n\t\t\t\t\t\t<%= week_names %> | \n\t\t\t\t\t\t<%= shift_time %> | \n\t\t\t\t\t\t<%= total %> | \n\t\t\t\t\t\t<%= schedule_policy %> | \n\t\t\t\t\t\t<%= branch_department %> | \n\t\t\t\t\t\t<%= job_task %> | \n\t\t\t\t\t\t<%= open_shift_multiplier %> | \n\t\t\t\t\t
\n\t\t\t\t
`;\n\t\t\t} else if ( Global.getProductEdition() >= 15 ) {\n\t\t\t\trender = `\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t<%= week %> | \n\t\t\t\t\t\t<%= status %> | \n\t\t\t\t\t\t<%= week_names %> | \n\t\t\t\t\t\t<%= shift_time %> | \n\t\t\t\t\t\t<%= total %> | \n\t\t\t\t\t\t<%= schedule_policy %> | \n\t\t\t\t\t\t<%= branch_department %> | \n\t\t\t\t\t\t<%= open_shift_multiplier %> | \n\t\t\t\t\t
\n\t\t\t\t
`;\n\t\t\t} else {\n\t\t\t\trender = `\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t<%= week %> | \n\t\t\t\t\t\t<%= status %> | \n\t\t\t\t\t\t<%= week_names %> | \n\t\t\t\t\t\t<%= shift_time %> | \n\t\t\t\t\t\t<%= total %> | \n\t\t\t\t\t\t<%= schedule_policy %> | \n\t\t\t\t\t\t<%= branch_department %> | \n\t\t\t\t\t
\n\t\t\t\t
`;\n\t\t\t}\n\t\t\treturn render;\n\t\t}\n\n\t\tfunction getRowRender() {\n\t\t\tvar render = '';\n\n\t\t\tif ( Global.getProductEdition() >= 20 ) {\n\t\t\t\trender = `\n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\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\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\t\t\t} else if ( Global.getProductEdition() >= 15 ) {\n\t\t\t\trender = `\n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t | \n\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\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\t\t\t} else {\n\t\t\t\trender = `\n\t\t\t\t\t\n\t\t\t\t\t\t | \n\t\t\t\t\t\t | \n\t\t\t\t\t\t | \n\t\t\t\t\t\t | \n\t\t\t\t\t\t | \n\t\t\t\t\t\t | \n\t\t\t\t\t\t | \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t | \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t | \n\t\t\t\t\t
`;\n\t\t\t}\n\t\t\treturn render;\n\t\t}\n\n\t\tinside_editor_div.append( this.editor );\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tif ( !this.is_mass_editing ) {\n\t\t\tthis.initInsideEditorData();\n\t\t\tthis.edit_view.find( '.inside-editor-div' ).show();\n\t\t} else {\n\t\t\tthis.edit_view.find( '.inside-editor-div' ).hide();\n\t\t}\n\t}\n\n\tinitInsideEditorData() {\n\t\tvar $this = this;\n\t\tvar args = {};\n\t\targs.filter_data = {};\n\n\t\tif ( ( !this.current_edit_record || !this.current_edit_record.id ) && !this.copied_record_id ) {\n\t\t\t$this.editor.removeAllRows();\n\t\t\t$this.editor.getDefaultData();\n\n\t\t} else {\n\n\t\t\targs.filter_data.recurring_schedule_template_control_id = this.current_edit_record.id ? this.current_edit_record.id : this.copied_record_id;\n\t\t\tthis.copied_record_id = '';\n\t\t\t$this.recurring_schedule_template_api['get' + $this.recurring_schedule_template_api.key_name]( args, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tif ( !$this.edit_view ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tvar data = res.getResult();\n\t\t\t\t\t$this.editor.setValue( data );\n\n\t\t\t\t}\n\t\t\t} );\n\n\t\t}\n\t}\n\n\tinsideEditorAddRow( data, index ) {\n\n\t\tvar form_item_input;\n\n\t\tvar $this = this;\n\t\tif ( !data ) {\n\t\t\tthis.getDefaultData( index );\n\t\t} else {\n\t\t\tvar form_item_input;\n\t\t\tvar widgetContainer;\n\n\t\t\tvar row_id = ( data.id && this.parent_controller.current_edit_record.id ) ? data.id : TTUUID.generateUUID();\n\t\t\tvar row = this.getRowRender(); //Get Row render\n\t\t\tvar render = this.getRender(); //get render, should be a table\n\t\t\tvar widgets = {}; //Save each row's widgets\n\n\t\t\t//Build row widgets\n\n\t\t\t// Week\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'week', width: 40 } );\n\t\t\tform_item_input.setValue( data.week ? data.week : 1 );\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\t\trow.children().eq( 0 ).append( form_item_input );\n\t\t\tform_item_input.attr( 'recurring_schedule_template_id', row_id );\n\t\t\tform_item_input.attr( 'date_stamp', data.date_stamp ); //Needed to prepend start/end times with so they can be parsed properly and calculate Total Time.\n\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\t// Status\n\t\t\twidgetContainer = $( '' );\n\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\t\tform_item_input.TComboBox( { field: 'status_id' } );\n\t\t\tform_item_input.setSourceData( this.parent_controller.recurring_schedule_status_array );\n\t\t\tform_item_input.setValue( data.status_id ? data.status_id : 10 );\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\tform_item_input.bind( 'formItemChange', function( e, target ) {\n\t\t\t\tif ( target.getValue() == 10 ) {\n\t\t\t\t\twidgets['absence_policy_id'].hide();\n\t\t\t\t} else if ( target.getValue() == 20 ) {\n\t\t\t\t\twidgets['absence_policy_id'].show();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\twidgetContainer.append( form_item_input );\n\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIAbsencePolicy,\n\t\t\t\twidth: 132,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_absences',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\tfield: 'absence_policy_id'\n\t\t\t} );\n\n\t\t\tform_item_input.css( 'position', 'absolute' );\n\t\t\tform_item_input.css( 'left', '0' );\n\t\t\tform_item_input.css( 'top', '30px' );\n\t\t\tform_item_input.css( 'z-index', '1' ); //For some reason if this overlaps with the \"checkboxes\", it goes behind that div and makes the down arrow unclickable.\n\t\t\tform_item_input.setValue( data.absence_policy_id ? data.absence_policy_id : '' );\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\t\t\twidgetContainer.append( form_item_input );\n\n\t\t\trow.children().eq( 1 ).append( widgetContainer );\n\n\t\t\t// sun mon tue wed thu fri sat\n\t\t\tvar widgetContainer2 = $( '' );\n\t\t\t// Sun\n\t\t\tvar form_item_sun_checkbox = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\tform_item_sun_checkbox.TCheckbox( { field: 'sun' } );\n\t\t\tform_item_sun_checkbox.setValue( data.sun ? data.sun : false );\n\t\t\twidgets[form_item_sun_checkbox.getField()] = form_item_sun_checkbox;\n\t\t\twidgetContainer2.append( form_item_sun_checkbox );\n\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_sun_checkbox );\n\t\t\t// Mon\n\t\t\tvar form_item_mon_checkbox = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\tform_item_mon_checkbox.TCheckbox( { field: 'mon' } );\n\t\t\tform_item_mon_checkbox.setValue( data.mon ? data.mon : false );\n\t\t\twidgets[form_item_mon_checkbox.getField()] = form_item_mon_checkbox;\n\t\t\twidgetContainer2.append( form_item_mon_checkbox );\n\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_mon_checkbox );\n\t\t\t// Tue\n\t\t\tvar form_item_tue_checkbox = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\tform_item_tue_checkbox.TCheckbox( { field: 'tue' } );\n\t\t\tform_item_tue_checkbox.setValue( data.tue ? data.tue : false );\n\t\t\twidgets[form_item_tue_checkbox.getField()] = form_item_tue_checkbox;\n\t\t\twidgetContainer2.append( form_item_tue_checkbox );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_tue_checkbox );\n\t\t\t// Wed\n\t\t\tvar form_item_wed_checkbox = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\tform_item_wed_checkbox.TCheckbox( { field: 'wed' } );\n\t\t\tform_item_wed_checkbox.setValue( data.wed ? data.wed : false );\n\t\t\twidgets[form_item_wed_checkbox.getField()] = form_item_wed_checkbox;\n\t\t\twidgetContainer2.append( form_item_wed_checkbox );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_wed_checkbox );\n\t\t\t// Thu\n\t\t\tvar form_item_thu_checkbox = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\tform_item_thu_checkbox.TCheckbox( { field: 'thu' } );\n\t\t\tform_item_thu_checkbox.setValue( data.thu ? data.thu : false );\n\t\t\twidgets[form_item_thu_checkbox.getField()] = form_item_thu_checkbox;\n\t\t\twidgetContainer2.append( form_item_thu_checkbox );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_thu_checkbox );\n\t\t\t// Fri\n\t\t\tvar form_item_fri_checkbox = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\tform_item_fri_checkbox.TCheckbox( { field: 'fri' } );\n\t\t\tform_item_fri_checkbox.setValue( data.fri ? data.fri : false );\n\t\t\twidgets[form_item_fri_checkbox.getField()] = form_item_fri_checkbox;\n\t\t\twidgetContainer2.append( form_item_fri_checkbox );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_fri_checkbox );\n\t\t\t// Sat\n\t\t\tvar form_item_sat_checkbox = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\t\tform_item_sat_checkbox.TCheckbox( { field: 'sat' } );\n\t\t\tform_item_sat_checkbox.setValue( data.sat ? data.sat : false );\n\t\t\twidgets[form_item_sat_checkbox.getField()] = form_item_sat_checkbox;\n\t\t\twidgetContainer2.append( form_item_sat_checkbox );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_sat_checkbox );\n\n\t\t\trow.children().eq( 2 ).append( widgetContainer2 );\n\n\t\t\t// Shift Time\n\t\t\twidgetContainer = $( '' );\n\n\t\t\tvar divContainer1 = $( '' );\n\n\t\t\tvar label_1 = $( ' ' + $.i18n._( 'In' ) + ' ' );\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TIME_PICKER );\n\t\t\tform_item_input.TTimePicker( { field: 'start_time' } );\n\t\t\tform_item_input.setValue( data.start_time ? data.start_time : '' );\n\n\t\t\tform_item_input.bind( 'formItemChange', function( e, target ) {\n\n\t\t\t\tvar rows_widgets = $this.rows_widgets_array[target.parent().parent().parent().parent().index() - 1];\n\n\t\t\t\t$this.parent_controller.onRowChanges( rows_widgets );\n\t\t\t} );\n\n\t\t\twidgets[form_item_input.getField() + row_id] = form_item_input;\n\t\t\tthis.parent_controller.edit_view_ui_validation_field_dic[form_item_input.getField() + row_id] = form_item_input;\n\n\t\t\tdivContainer1.append( label_1 );\n\t\t\tdivContainer1.append( form_item_input );\n\n\t\t\twidgetContainer.append( divContainer1 );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\tvar divContainer2 = $( '' );\n\n\t\t\tvar label_2 = $( ' ' + $.i18n._( 'Out' ) + ' ' );\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TIME_PICKER );\n\t\t\tform_item_input.TTimePicker( { field: 'end_time' } );\n\t\t\tform_item_input.setValue( data.end_time ? data.end_time : '' );\n\n\t\t\tform_item_input.bind( 'formItemChange', function( e, target ) {\n\t\t\t\tvar rows_widgets = $this.rows_widgets_array[target.parent().parent().parent().parent().index() - 1];\n\n\t\t\t\t$this.parent_controller.onRowChanges( rows_widgets );\n\t\t\t} );\n\n\t\t\twidgets[form_item_input.getField() + row_id] = form_item_input;\n\t\t\tthis.parent_controller.edit_view_ui_validation_field_dic[form_item_input.getField() + row_id] = form_item_input;\n\n\t\t\tdivContainer2.append( label_2 );\n\t\t\tdivContainer2.append( form_item_input );\n\n\t\t\twidgetContainer.append( divContainer2 );\n\n\t\t\trow.children().eq( 3 ).append( widgetContainer );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\t// Total\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\t\tform_item_input.TText( { field: 'total_time' } );\n\t\t\tform_item_input.setValue( data.total_time ? Global.getTimeUnit( data.total_time ) : '' ); //\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\trow.children().eq( 4 ).append( form_item_input );\n\n\t\t\t// Schedule Policy\n\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APISchedulePolicy,\n\t\t\t\twidth: 80,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_schedule',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\tfield: 'schedule_policy_id'\n\t\t\t} );\n\n\t\t\tform_item_input.setValue( data.schedule_policy_id ? data.schedule_policy_id : '' );\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\trow.children().eq( 5 ).append( form_item_input );\n\n\t\t\tform_item_input.bind( 'formItemChange', function( e, target ) {\n\t\t\t\tvar rows_widgets = $this.rows_widgets_array[target.parent().parent().index() - 1];\n\n\t\t\t\t$this.parent_controller.onRowChanges( rows_widgets );\n\t\t\t} );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\t// Branch / Department\n\n\t\t\twidgetContainer = $( '' );\n\n\t\t\tdivContainer1 = $( '' );\n\n\t\t\tlabel_1 = $( ' ' + $.i18n._( 'Branch' ) + ' ' );\n\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIBranch,\n\t\t\t\twidth: 80,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_branch',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_any: true,\n\t\t\t\tfield: 'branch_id',\n\t\t\t\tcustom_first_label: Global.default_item\n\t\t\t} );\n\n\t\t\tif ( data.branch_id.toUpperCase() === TTUUID.not_exist_id.toUpperCase() ) {\n\t\t\t\tform_item_input.set_default_value = true;\n\t\t\t} else {\n\t\t\t\tform_item_input.setValue( data.branch_id ? data.branch_id : '' );\n\t\t\t}\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\tdivContainer1.append( label_1 );\n\t\t\tdivContainer1.append( form_item_input );\n\n\t\t\twidgetContainer.append( divContainer1 );\n\n\t\t\tdivContainer2 = $( '' );\n\n\t\t\tlabel_2 = $( ' ' + $.i18n._( 'Department' ) + ' ' );\n\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIDepartment,\n\t\t\t\twidth: 80,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_department',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_any: true,\n\t\t\t\tfield: 'department_id',\n\t\t\t\tcustom_first_label: Global.default_item\n\t\t\t} );\n\t\t\tform_item_input.setValue( ( data.department_id ) ? data.department_id : '' );\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\tdivContainer2.append( label_2 );\n\t\t\tdivContainer2.append( form_item_input );\n\n\t\t\twidgetContainer.append( divContainer2 );\n\n\t\t\trow.children().eq( 6 ).append( widgetContainer );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\t// Job/Task/Punch Tag\n\n\t\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\n\t\t\t\twidgetContainer = $( '' );\n\n\t\t\t\tdivContainer1 = $( '' );\n\n\t\t\t\tlabel_1 = $( ' ' + $.i18n._( 'Job' ) + ' ' );\n\n\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\t\tform_item_input.AComboBox( {\n\t\t\t\t\tapi_class: TTAPI.APIJob,\n\t\t\t\t\twidth: 80,\n\t\t\t\t\tallow_multiple_selection: false,\n\t\t\t\t\tlayout_name: 'global_job',\n\t\t\t\t\tshow_search_inputs: true,\n\t\t\t\t\tset_any: true,\n\t\t\t\t\tfield: 'job_id',\n\t\t\t\t\tcustom_first_label: Global.default_item\n\t\t\t\t} );\n\t\t\t\tform_item_input.setValue( data.job_id ? data.job_id : '' );\n\t\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\t\tdivContainer1.append( label_1 );\n\t\t\t\tdivContainer1.append( form_item_input );\n\n\t\t\t\twidgetContainer.append( divContainer1 );\n\n\t\t\t\tdivContainer2 = $( '' );\n\n\t\t\t\tlabel_2 = $( ' ' + $.i18n._( 'Task' ) + ' ' );\n\t\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\t\tform_item_input.AComboBox( {\n\t\t\t\t\tapi_class: TTAPI.APIJobItem,\n\t\t\t\t\twidth: 80,\n\t\t\t\t\tallow_multiple_selection: false,\n\t\t\t\t\tlayout_name: 'global_job_item',\n\t\t\t\t\tshow_search_inputs: true,\n\t\t\t\t\tset_any: true,\n\t\t\t\t\tfield: 'job_item_id',\n\t\t\t\t\tcustom_first_label: Global.default_item\n\t\t\t\t} );\n\t\t\t\tform_item_input.setValue( data.job_item_id ? data.job_item_id : '' );\n\t\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\t\tdivContainer2.append( label_2 );\n\t\t\t\tdivContainer2.append( form_item_input );\n\n\t\t\t\twidgetContainer.append( divContainer2 );\n\n\t\t\t\tvar divContainer3 = $( '' );\n\n\t\t\t\tvar label_3 = $( ' ' + $.i18n._( 'Tags' ) + ' ' );\n\t\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\t\tform_item_input.AComboBox( {\n\t\t\t\t\tapi_class: TTAPI.APIPunchTag,\n\t\t\t\t\twidth: 80,\n\t\t\t\t\tallow_multiple_selection: true,\n\t\t\t\t\tlayout_name: 'global_punch_tag',\n\t\t\t\t\tshow_search_inputs: true,\n\t\t\t\t\tset_any: true,\n\t\t\t\t\tsetRealValueCallBack: ( ( punch_tags ) => {\n\t\t\t\t\t\tif ( punch_tags ) {\n\t\t\t\t\t\t\tthis.setPunchTagQuickSearchManualIds( punch_tags );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ),\n\t\t\t\t\tfield: 'punch_tag_id',\n\t\t\t\t\tcustom_first_label: Global.default_item\n\t\t\t\t} );\n\t\t\t\tform_item_input.setValue( data.punch_tag_id ? data.punch_tag_id : '' );\n\t\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\t\tdivContainer3.append( label_3 );\n\t\t\t\tdivContainer3.append( form_item_input );\n\n\t\t\t\twidgetContainer.append( divContainer3 );\n\n\t\t\t\trow.children().eq( 7 ).append( widgetContainer );\n\t\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t\t}\n\n\t\t\tif ( Global.getProductEdition() >= 15 ) {\n\t\t\t\t// Open Shift Multiplier\n\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\t\tform_item_input.TTextInput( { field: 'open_shift_multiplier', width: 20 } );\n\t\t\t\tform_item_input.setValue( data.open_shift_multiplier ? data.open_shift_multiplier : 1 );\n\t\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\n\t\t\t\tif ( Global.getProductEdition() <= 15 ) {\n\t\t\t\t\trow.children().eq( 7 ).append( form_item_input );\n\t\t\t\t} else {\n\t\t\t\t\trow.children().eq( 8 ).append( form_item_input );\n\t\t\t\t}\n\n\t\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\t\t\t}\n\n\t\t\tif ( typeof index != 'undefined' ) {\n\n\t\t\t\trow.insertAfter( $( render ).find( 'tr' ).eq( index ) );\n\t\t\t\tthis.rows_widgets_array.splice( ( index ), 0, widgets );\n\n\t\t\t} else {\n\t\t\t\t$( render ).append( row );\n\t\t\t\tthis.rows_widgets_array.push( widgets );\n\t\t\t}\n\n\t\t\tif ( this.parent_controller.is_viewing ) {\n\t\t\t\trow.find( '.control-icon' ).hide();\n\t\t\t}\n\n\t\t\tif ( widgets.status_id.getValue() == 10 ) {\n\t\t\t\twidgets.absence_policy_id.css( 'display', 'none' );\n\t\t\t} else if ( widgets.status_id.getValue() == 20 ) {\n\t\t\t\twidgets.absence_policy_id.css( 'display', 'block' );\n\t\t\t}\n\n\t\t\tthis.addIconsEvent( row ); //Bind event to add and minus icon\n\t\t\tthis.removeLastRowLine();\n\t\t}\n\t}\n\n\tonRowChanges( row_widgets ) {\n\t\tvar recurring_schedule_template_id = row_widgets.week.attr( 'recurring_schedule_template_id' );\n\t\tvar date_stamp = row_widgets.week.attr( 'date_stamp' );\n\n\t\tif ( recurring_schedule_template_id ) {\n\t\t\tvar startTime = date_stamp +' '+ row_widgets['start_time' + recurring_schedule_template_id].getValue();\n\t\t\tvar endTime = date_stamp +' '+ row_widgets['end_time' + recurring_schedule_template_id].getValue();\n\t\t\tvar schedulePolicyId = row_widgets.schedule_policy_id.getValue();\n\n\t\t\tif ( startTime !== '' && endTime !== '' && schedulePolicyId !== '' ) {\n\t\t\t\tvar result = this.schedule_api.getScheduleTotalTime( startTime, endTime, schedulePolicyId, { async: false } );\n\t\t\t\tif ( result ) {\n\t\t\t\t\tvar total_time = result.getResult();\n\n\t\t\t\t\trow_widgets.total_time.setValue( Global.getTimeUnit( total_time ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tinsideEditorGetValue( current_edit_item_id ) {\n\t\tvar len = this.rows_widgets_array.length;\n\n\t\tvar result = [];\n\n\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\tvar row = this.rows_widgets_array[i];\n\n\t\t\tvar recurring_schedule_template_id = row.week.attr( 'recurring_schedule_template_id' );\n\t\t\tvar date_stamp = row.week.attr( 'date_stamp' );\n\n\t\t\tif ( recurring_schedule_template_id ) {\n\t\t\t\tvar data = {\n\t\t\t\t\tid: recurring_schedule_template_id,\n\n\t\t\t\t\tweek: row.week.getValue(),\n\t\t\t\t\tstatus_id: row.status_id.getValue(),\n\n\t\t\t\t\tmon: row.mon.getValue(),\n\t\t\t\t\ttue: row.tue.getValue(),\n\t\t\t\t\twed: row.wed.getValue(),\n\t\t\t\t\tthu: row.thu.getValue(),\n\t\t\t\t\tfri: row.fri.getValue(),\n\t\t\t\t\tsat: row.sat.getValue(),\n\t\t\t\t\tsun: row.sun.getValue(),\n\n\t\t\t\t\tdate_stamp: date_stamp,\n\t\t\t\t\tstart_time: row['start_time' + recurring_schedule_template_id].getValue(),\n\t\t\t\t\tend_time: row['end_time' + recurring_schedule_template_id].getValue(),\n\t\t\t\t\ttotal_time: null,\n\n\t\t\t\t\tbranch_id: row.branch_id.getValue(),\n\t\t\t\t\tdepartment_id: row.department_id.getValue(),\n\n\t\t\t\t\tabsence_policy_id: row.absence_policy_id.getValue(),\n\t\t\t\t\tschedule_policy_id: row.schedule_policy_id.getValue()\n\t\t\t\t};\n\n\t\t\t\tif ( Global.getProductEdition() >= 15 ) {\n\t\t\t\t\tdata.open_shift_multiplier = row.open_shift_multiplier.getValue();\n\t\t\t\t}\n\n\t\t\t\tif ( Global.getProductEdition() >= 20 ) {\n\t\t\t\t\tdata.job_id = row.job_id.getValue();\n\t\t\t\t\tdata.job_item_id = row.job_item_id.getValue();\n\t\t\t\t\tdata.punch_tag_id = row.punch_tag_id.getValue();\n\t\t\t\t}\n\n\t\t\t\tdata.recurring_schedule_template_control_id = current_edit_item_id;\n\t\t\t\tresult.push( data );\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tinsideEditorSetValue( val ) {\n\t\tvar len = val.length;\n\t\tthis.removeAllRows();\n\n\t\tif ( len > 0 ) {\n\t\t\tfor ( var i = 0; i < val.length; i++ ) {\n\t\t\t\tif ( Global.isSet( val[i] ) ) {\n\t\t\t\t\tvar row = val[i];\n\t\t\t\t\tthis.addRow( row );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.getDefaultData();\n\t\t}\n\t}\n\n\tinsideEditorRemoveRow( row ) {\n\t\tvar index = row[0].rowIndex - 1;\n\t\tvar remove_id = this.rows_widgets_array[index].week.attr( 'recurring_schedule_template_id' );\n\t\tif ( TTUUID.isUUID( remove_id ) && remove_id != TTUUID.zero_id && remove_id != TTUUID.not_exist_id ) {\n\t\t\tthis.delete_ids.push( remove_id );\n\t\t}\n\t\trow.remove();\n\t\tthis.rows_widgets_array.splice( index, 1 );\n\n\t\tthis.removeLastRowLine();\n\t}\n\n\tuniformVariable( records ) {\n\t\tif ( !this.is_mass_editing ) {\n\t\t\trecords.recurring_schedule_template = this.editor.getValue( this.refresh_id );\n\t\t}\n\t\treturn records;\n\t}\n\n\trenameObjectKey( obj, old_key, new_key ) {\n\t\tif ( old_key !== new_key ) {\n\t\t\tObject.defineProperty( obj, new_key,\n\t\t\t\tObject.getOwnPropertyDescriptor( obj, old_key ) );\n\t\t\tdelete obj[old_key];\n\t\t}\n\t}\n\n\t_continueDoCopyAsNew() {\n\t\tthis.setCurrentEditViewState( 'new' );\n\t\tLocalCacheData.current_doing_context_action = 'copy_as_new';\n\n\t\tif ( Global.isSet( this.edit_view ) ) {\n\t\t\tfor ( var i = 0; i < this.editor.rows_widgets_array.length; i++ ) {\n\t\t\t\t//Fix JS exception: Uncaught TypeError: Cannot read property 'getValue' of undefined\n\t\t\t\t//start_time,end_time object keys are appended with the recurring_schedule_template_id, so when copying records we need to rename them to use the new recurring_schedule_template_id\n\t\t\t\tvar new_uuid = TTUUID.generateUUID();\n\t\t\t\tvar old_recurring_schedule_template_id = this.editor.rows_widgets_array[i].week.attr( 'recurring_schedule_template_id' );\n\n\t\t\t\tthis.renameObjectKey( this.editor.rows_widgets_array[i], 'start_time' + old_recurring_schedule_template_id, 'start_time' + new_uuid );\n\t\t\t\tthis.renameObjectKey( this.editor.rows_widgets_array[i], 'end_time' + old_recurring_schedule_template_id, 'end_time' + new_uuid );\n\n\t\t\t\tthis.editor.rows_widgets_array[i].week.attr( 'recurring_schedule_template_id', new_uuid );\n\t\t\t}\n\t\t}\n\t\tsuper._continueDoCopyAsNew();\n\t}\n\n\tonCopyAsNewResult( result ) {\n\t\tvar $this = this;\n\t\tvar result_data = result.getResult();\n\n\t\tif ( !result_data ) {\n\t\t\tTAlertManager.showAlert( $.i18n._( 'Record does not exist' ) );\n\t\t\t$this.onCancelClick();\n\t\t\treturn;\n\t\t}\n\n\t\t$this.openEditView(); // Put it here is to avoid if the selected one is not existed in data or have deleted by other pragram. in this case, the edit view should not be opend.\n\n\t\tresult_data = result_data[0];\n\t\tthis.copied_record_id = result_data.id;\n\t\tresult_data.id = '';\n\t\tif ( $this.sub_view_mode && $this.parent_key ) {\n\t\t\tresult_data[$this.parent_key] = $this.parent_value;\n\t\t}\n\n\t\t$this.current_edit_record = result_data;\n\t\t$this.initEditView();\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\t\tthis.search_fields = [\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Name' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'name',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Description' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'description',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Template' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'id',\n\t\t\t\tlayout_name: 'global_recurring_template_control',\n\t\t\t\tapi_class: TTAPI.APIRecurringScheduleTemplateControl,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Schedule Policy' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'schedule_policy_id',\n\t\t\t\tlayout_name: 'global_schedule',\n\t\t\t\tapi_class: TTAPI.APISchedulePolicy,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Created By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'created_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Updated By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'updated_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} )\n\t\t];\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: [],\n\t\t\tinclude: [\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Jump To' ),\n\t\t\t\t\tid: 'jump_to_header',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\tpermission_result: false // to hide it in legacy context menu and avoid errors in legacy parsers.\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Recurring Schedules' ),\n\t\t\t\t\tid: 'recurring_schedule',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t}]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'recurring_schedule':\n\t\t\t\tthis.onNavigationClick( id );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonNavigationClick( iconName ) {\n\n\t\tvar $this = this;\n\n\t\tvar grid_selected_id_array;\n\n\t\tvar filter = { filter_data: {} };\n\n\t\tvar recurring_schedule_template_control_ids = [];\n\n\t\tif ( $this.edit_view && $this.current_edit_record.id ) {\n\t\t\trecurring_schedule_template_control_ids.push( $this.current_edit_record.id );\n\t\t} else {\n\t\t\tgrid_selected_id_array = this.getGridSelectIdArray();\n\t\t\t$.each( grid_selected_id_array, function( index, value ) {\n\t\t\t\tvar grid_selected_row = $this.getRecordFromGridById( value );\n\t\t\t\trecurring_schedule_template_control_ids.push( grid_selected_row.id );\n\t\t\t} );\n\t\t}\n\n\t\tfilter.filter_data.recurring_schedule_template_control_id = recurring_schedule_template_control_ids;\n\n\t\tswitch ( iconName ) {\n\t\t\tcase 'recurring_schedule':\n\t\t\t\tGlobal.addViewTab( this.viewId, $.i18n._( 'Recurring Templates' ), window.location.href );\n\t\t\t\tIndexViewController.goToView( 'RecurringScheduleControl', filter );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetCustomDefaultMenuIcon( id, context_btn, grid_selected_length ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'recurring_schedule':\n\t\t\t\tthis.setDefaultMenuRecurringScheduleIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetDefaultMenuRecurringScheduleIcon( context_btn, grid_selected_length, pId ) {\n\t\tif ( !PermissionManager.checkTopLevelPermission( 'RecurringScheduleControl' ) || this.edit_only_mode ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t}\n\n\t\tif ( grid_selected_length > 0 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetCustomEditMenuIcon( id, context_btn ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'recurring_schedule':\n\t\t\t\tthis.setEditMenuRecurringScheduleIcon( context_btn );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetEditMenuRecurringScheduleIcon( context_btn, pId ) {\n\t\tif ( !this.viewPermissionValidate( pId ) || this.edit_only_mode ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t}\n\n\t\tif ( !this.current_edit_record || !this.current_edit_record.id ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\n\t}\n\n\tonSaveResult( result ) {\n\t\tsuper.onSaveResult( result );\n\t\tif ( result && result.isValid() ) {\n\t\t\tvar system_job_queue = result.getAttributeInAPIDetails( 'system_job_queue' );\n\t\t\tif ( system_job_queue ) {\n\t\t\t\tthis.event_bus.emit( 'tt_topbar', 'toggle_job_queue_spinner', {\n\t\t\t\t\tshow: true,\n\t\t\t\t\tget_job_data: true\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\tgetRecurringTemplateTabHtml() {\n\t\treturn `\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
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