TimeTrex/interface/html5/dist/policy-exception_policy-ExceptionPolicyControlViewController.bundle.js

1 line
52 KiB
JavaScript

"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["policy-exception_policy-ExceptionPolicyControlViewController"],{6556:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExceptionPolicyControlViewController\": () => (/* binding */ ExceptionPolicyControlViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass ExceptionPolicyControlViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#exception_policy_control_view_container',\n\n\t\t\tseverity_array: null,\n\t\t\temail_notification_array: null,\n\t\t\tpunch_notification_array: null,\n\t\t\toriginal_exception_data: [],\n\t\t\teditor: null,\n\t\t\tapi_exception_policy: null,\n\t\t\tdate_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 = 'ExceptionPolicyControlEditView.html';\n\t\tthis.permission_id = 'exception_policy';\n\t\tthis.viewId = 'ExceptionPolicyControl';\n\t\tthis.script_name = 'ExceptionPolicyControlView';\n\t\tthis.table_name_key = 'exception_policy_control';\n\t\tthis.context_menu_name = $.i18n._( 'Exception Policy' );\n\t\tthis.navigation_label = $.i18n._( 'Exception Policy' );\n\t\tthis.api = TTAPI.APIExceptionPolicyControl;\n\t\tthis.api_exception_policy = TTAPI.APIExceptionPolicy;\n\t\tthis.date_api = TTAPI.APITTDate;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['mass_edit'],\n\t\t\tinclude: []\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'severity', 'severity_id', this.api_exception_policy );\n\t\tthis.initDropDownOption( 'punch_notification', 'punch_notification_id', this.api_exception_policy );\n\t\tthis.initDropDownOption( 'email_notification', 'email_notification_id', this.api_exception_policy );\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_exception_policy': {\n\t\t\t\t'label': $.i18n._( 'Exception Policy' ),\n\t\t\t\t'html_template': this.getExceptionPolicyTabHtml()\n\t\t\t},\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIExceptionPolicyControl,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_hierarchy',\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_exception_policy = this.edit_view_tab.find( '#tab_exception_policy' );\n\n\t\tvar tab_exception_policy_column1 = tab_exception_policy.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_exception_policy_column1 );\n\n\t\t//Name\n\t\tvar form_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_exception_policy_column1, 'first_last' );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Description\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\tform_item_input.TTextArea( { field: 'description', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Description' ), form_item_input, tab_exception_policy_column1, '', null, null, true );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//Inside editor\n\n\t\tvar inside_editor_div = tab_exception_policy.find( '.inside-editor-div' );\n\t\tvar args = {\n\t\t\tactive: $.i18n._( 'Active' ),\n\t\t\tcode: $.i18n._( 'Code' ),\n\t\t\tname: $.i18n._( 'Name' ),\n\t\t\tseverity: $.i18n._( 'Severity' ),\n\t\t\tgrace: $.i18n._( 'Grace' ),\n\t\t\twatch_window: $.i18n._( 'Watch Window' ),\n\t\t\tdemerit: $.i18n._( 'Demerit Points' ),\n\t\t\tpunch_notification: $.i18n._( 'Punch Notice' ),\n\t\t\temail_notification: $.i18n._( 'Notify' )\n\t\t};\n\n\t\tthis.editor = Global.loadWidgetByName( FormItemType.INSIDE_EDITOR );\n\n\t\tthis.editor.InsideEditor( {\n\t\t\ttitle: '',\n\t\t\taddRow: this.insideEditorAddRow,\n\t\t\tgetValue: this.insideEditorGetValue,\n\t\t\tsetValue: this.insideEditorSetValue,\n\t\t\tupdateAllRows: this.insideEditorUpdateAllRows,\n\t\t\tparent_controller: this,\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\t\t} );\n\n\t\tfunction getRender() {\n\t\t\treturn `\n\t\t\t<table class=\"inside-editor-render\">\n\t\t\t\t<tr class=\"title\">\n\t\t\t\t\t<td style=\"width: 50px\"><%= active %></td>\n\t\t\t\t\t<td style=\"width: 50px\"><%= code %></td>\n\t\t\t\t\t<td style=\"width: 250px\"><%= name %></td>\n\t\t\t\t\t<td style=\"width: 90px\"><%= severity %></td>\n\t\t\t\t\t<td style=\"width: 90px\"><%= grace %></td>\n\t\t\t\t\t<td style=\"width: 140px\"><%= watch_window %></td>\n\t\t\t\t\t<td style=\"width: 140px\"><%= demerit %></td>\n\t\t\t\t\t<td style=\"width: 140px\"><%= punch_notification %></td>\n\t\t\t\t\t<td style=\"width: 140px\"><%= email_notification %></td>\n\t\t\t\t</tr>\n\t\t\t</table>`;\n\t\t}\n\n\t\tfunction getRowRender() {\n\t\t\treturn `\n\t\t\t<tr class=\"inside-editor-row data-row\">\n\t\t\t\t<td class=\"level cell\"></td>\n\t\t\t\t<td class=\"code cell\"></td>\n\t\t\t\t<td class=\"name cell\"></td>\n\t\t\t\t<td class=\"severity cell\"></td>\n\t\t\t\t<td class=\"grace cell\"></td>\n\t\t\t\t<td class=\"watch-window cell\"></td>\n\t\t\t\t<td class=\"demerit cell\"></td>\n\t\t\t\t<td class=\"punch-notification cell\"></td>\n\t\t\t\t<td class=\"email-notification cell\"></td>\n\t\t\t</tr>`;\n\t\t}\n\n\t\tinside_editor_div.append( this.editor );\n\t}\n\n\t_continueDoCopyAsNew() {\n\t\tthis.setCurrentEditViewState( 'new' );\n\t\tLocalCacheData.current_doing_context_action = 'copy_as_new';\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\tthis.editor.rows_widgets_array[i].current_edit_item.id = '';\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\n\t\tthis.copied_record_id = result_data.id;\n\t\tresult_data.id = '';\n\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\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t\tthis.initInsideEditorData();\n\t}\n\n\tinitInsideEditorData() {\n\t\tvar $this = this;\n\t\tvar args = {};\n\t\targs.filter_data = {};\n\n\t\tvar exception_control_id = this.current_edit_record.id ? this.current_edit_record.id : this.copied_record_id;\n\t\tthis.copied_record_id = '';\n\n\t\tif ( !exception_control_id ) {\n\n\t\t\tthis.api_exception_policy.getExceptionPolicyDefaultData( args, true, {\n\t\t\t\tonResult: function( res ) {\n\n\t\t\t\t\tif ( !$this.edit_view ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar data = res.getResult();\n\t\t\t\t\tvar array_data = [];\n\t\t\t\t\tfor ( var key in data ) {\n\n\t\t\t\t\t\tif ( !data.hasOwnProperty( key ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata[key].id = '';\n\t\t\t\t\t\tarray_data.push( data[key] );\n\t\t\t\t\t}\n\t\t\t\t\tarray_data = array_data.sort( function( a, b ) {\n\t\t\t\t\t\treturn Global.compare( a, b, 'type_id' );\n\t\t\t\t\t} );\n\n\t\t\t\t\t$this.original_exception_data = _.map(array_data, _.clone);\n\t\t\t\t\t$this.editor.setValue( array_data );\n\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} else {\n\n\t\t\targs.filter_data.exception_policy_control_id = exception_control_id;\n\n\t\t\tthis.api_exception_policy.getExceptionPolicyDefaultData( args, true, {\n\t\t\t\tonResult: function( res ) {\n\n\t\t\t\t\tif ( !$this.edit_view ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar data = res.getResult();\n\t\t\t\t\tvar array_data = [];\n\n\t\t\t\t\tfor ( var key in data ) {\n\n\t\t\t\t\t\tif ( !data.hasOwnProperty( key ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata[key].id = '';\n\t\t\t\t\t\tarray_data.push( data[key] );\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_data = array_data.sort( function( a, b ) {\n\t\t\t\t\t\treturn Global.compare( a, b, 'type_id' );\n\t\t\t\t\t} );\n\n\t\t\t\t\t$this.original_exception_data = _.map(array_data, _.clone);\n\t\t\t\t\t$this.editor.setValue( array_data );\n\n\t\t\t\t\tvar ep_filter = {};\n\t\t\t\t\tep_filter.filter_data = { exception_policy_control_id: exception_control_id };\n\n\t\t\t\t\t$this.api_exception_policy.getExceptionPolicy( ep_filter, true, {\n\t\t\t\t\t\tonResult: function( ep_res ) {\n\n\t\t\t\t\t\t\tif ( !$this.edit_view ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar data = ep_res.getResult();\n\t\t\t\t\t\t\tvar array_data = [];\n\t\t\t\t\t\t\tfor ( var key in data ) {\n\n\t\t\t\t\t\t\t\tif ( !data.hasOwnProperty( key ) ) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tarray_data.push( data[key] );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tarray_data = array_data.sort( function( a, b ) {\n\t\t\t\t\t\t\t\treturn Global.compare( a, b, 'type_id' );\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t$this.original_exception_data = _.map(array_data, _.clone);\n\t\t\t\t\t\t\t$this.editor.setValue( array_data );\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tinsideEditorUpdateAllRows( val ) {\n\t\tvar len = this.rows_widgets_array.length;\n\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\tvar c_row = this.rows_widgets_array[i];\n\t\t\tvar c_row_data = c_row.current_edit_item;\n\n\t\t\tvar len1 = val.length;\n\n\t\t\tfor ( var j = 0; j < len1; j++ ) {\n\t\t\t\tvar new_row = val[j];\n\n\t\t\t\tif ( new_row.type_id === c_row_data.type_id ) {\n\t\t\t\t\tc_row.current_edit_item = new_row;\n\n\t\t\t\t\tif ( !this.parent_controller.current_edit_record.id ) {\n\t\t\t\t\t\tc_row.current_edit_item.id = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tc_row.active.setValue( new_row.active );\n\t\t\t\t\tc_row.severity_id.setValue( new_row.severity_id );\n\n\t\t\t\t\tif ( new_row.is_enabled_grace ) {\n\t\t\t\t\t\tc_row.grace.setValue( new_row.grace );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( new_row.is_enabled_watch_window ) {\n\t\t\t\t\t\tc_row.watch_window.setValue( new_row.watch_window );\n\t\t\t\t\t}\n\n\t\t\t\t\tc_row.demerit.setValue( new_row.demerit );\n\n\t\t\t\t\tif ( new_row.is_enabled_punch_notice ) {\n\t\t\t\t\t\tc_row.punch_notification_id.setValue( new_row.punch_notification_id );\n\t\t\t\t\t}\n\n\t\t\t\t\tc_row.email_notification_id.setValue( new_row.email_notification_id );\n\n\t\t\t\t\tval.splice( j, 1 );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\tinsideEditorSetValue( val ) {\n\t\tvar len = val.length;\n\n\t\tif ( len === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !val[0].id ) {\n\t\t\tthis.removeAllRows();\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.updateAllRows( val );\n\t\t}\n\t}\n\n\tinsideEditorAddRow( data, index ) {\n\t\tif ( !data ) {\n\t\t\tdata = {};\n\t\t}\n\n\t\tvar row = this.getRowRender(); //Get Row render\n\t\tvar render = this.getRender(); //get render, should be a table\n\t\tvar widgets = {}; //Save each row's widgets\n\n\t\t//Build row widgets\n\n\t\t//Active\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'active' } );\n\t\tform_item_input.setValue( data.active );\n\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\trow.children().eq( 0 ).append( form_item_input );\n\t\tform_item_input.attr( 'exception_policy_id', ( data.id && this.parent_controller.current_edit_record.id ) ? data.id : '' );\n\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t//Code\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'type_id' } );\n\t\tform_item_input.setValue( data.type_id );\n\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\trow.children().eq( 1 ).append( form_item_input );\n\n\t\t//Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'name' } );\n\t\tform_item_input.setValue( data.name );\n\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\trow.children().eq( 2 ).append( form_item_input );\n\n\t\t//Severity\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'severity_id', set_empty: false } );\n\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\t\tform_item_input.setSourceData( this.parent_controller.severity_array );\n\t\tform_item_input.setValue( data.severity_id );\n\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\trow.children().eq( 3 ).append( form_item_input );\n\n\t\tif ( data.is_enabled_grace ) {\n\t\t\t//Grace\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'grace', width: 90, need_parser_sec: true } );\n\t\t\tform_item_input.setValue( data.grace );\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\t\trow.children().eq( 4 ).append( form_item_input );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\t\t}\n\n\t\tif ( data.is_enabled_watch_window ) {\n\t\t\t//Watch Window\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tform_item_input.TTextInput( { field: 'watch_window', width: 90, need_parser_sec: true } );\n\t\t\tform_item_input.setValue( data.watch_window );\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\t\trow.children().eq( 5 ).append( form_item_input );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\t\t}\n\n\t\t//Demerits\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'demerit', width: 50, need_parser_sec: false } );\n\t\tform_item_input.setValue( data.demerit );\n\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\trow.children().eq( 6 ).append( form_item_input );\n\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\tif ( data.is_enabled_punch_notice ) {\n\t\t\t//Punch Notification\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\t\tform_item_input.TComboBox( { field: 'punch_notification_id', set_empty: false } );\n\t\t\tform_item_input.setSourceData( this.parent_controller.punch_notification_array );\n\t\t\tform_item_input.setValue( data.punch_notification_id );\n\t\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\t\trow.children().eq( 7 ).append( form_item_input );\n\t\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\t\t}\n\n\t\t//Email Notification\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'email_notification_id', set_empty: false } );\n\t\tform_item_input.setSourceData( this.parent_controller.email_notification_array );\n\t\tform_item_input.setValue( data.email_notification_id );\n\t\twidgets[form_item_input.getField()] = form_item_input;\n\t\trow.children().eq( 8 ).append( form_item_input );\n\t\tthis.setWidgetEnableBaseOnParentController( form_item_input );\n\n\t\t//Save current set item\n\t\twidgets.current_edit_item = data;\n\n\t\tif ( typeof index != 'undefined' ) {\n\n\t\t\trow.insertAfter( $( render ).find( 'tr' ).eq( index ) );\n\t\t\tthis.rows_widgets_array.splice( ( index ), 0, widgets );\n\n\t\t} else {\n\t\t\t$( render ).append( row );\n\t\t\tthis.rows_widgets_array.push( widgets );\n\t\t}\n\n\t\tif ( this.parent_controller.is_viewing ) {\n\t\t\trow.find( '.control-icon' ).hide();\n\t\t}\n\n\t\tthis.removeLastRowLine();\n\t}\n\n\tinsideEditorGetValue( current_edit_item_id ) {\n\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\t\t\tvar data = row.current_edit_item;\n\t\t\tdata.exception_policy_control_id = current_edit_item_id;\n\t\t\tdata.active = row.active.getValue();\n\t\t\tdata.severity_id = row.severity_id.getValue();\n\t\t\tif ( data.is_enabled_grace ) {\n\t\t\t\tdata.grace = row.grace.getValue();\n\t\t\t}\n\n\t\t\tif ( data.is_enabled_watch_window ) {\n\t\t\t\tdata.watch_window = row.watch_window.getValue();\n\t\t\t}\n\n\t\t\tdata.demerit = row.demerit.getValue();\n\n\t\t\tif ( data.is_enabled_punch_notice ) {\n\t\t\t\tdata.punch_notification_id = row.punch_notification_id.getValue();\n\t\t\t}\n\n\t\t\tdata.email_notification_id = row.email_notification_id.getValue();\n\n\t\t\tresult.push( data );\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tonSaveResult( result ) {\n\t\tvar $this = this;\n\t\tif ( result.isValid() ) {\n\t\t\tvar result_data = result.getResult();\n\t\t\tif ( result_data === true ) {\n\t\t\t\t$this.refresh_id = $this.current_edit_record.id;\n\t\t\t} else if ( TTUUID.isUUID( result_data ) && result_data != TTUUID.zero_id && result_data != TTUUID.not_exist_id ) {\n\t\t\t\t$this.refresh_id = result_data;\n\t\t\t}\n\n\t\t\t$this.saveInsideEditorData( function() {\n\t\t\t\t$this.search();\n\t\t\t\t$this.onSaveDone( result );\n\n\t\t\t\t$this.removeEditView();\n\t\t\t} );\n\n\t\t} else {\n\t\t\t$this.setErrorMenu();\n\t\t\t$this.setErrorTips( result );\n\n\t\t}\n\t}\n\n\tonSaveAndCopyResult( result ) {\n\t\tvar $this = this;\n\t\tif ( result.isValid() ) {\n\t\t\tvar result_data = result.getResult();\n\t\t\tif ( result_data === true ) {\n\t\t\t\t$this.refresh_id = $this.current_edit_record.id;\n\n\t\t\t} else if ( TTUUID.isUUID( result_data ) && result_data != TTUUID.zero_id && result_data != TTUUID.not_exist_id ) {\n\t\t\t\t$this.refresh_id = result_data;\n\t\t\t}\n\n\t\t\t$this.saveInsideEditorData( function() {\n\t\t\t\t$this.search( false );\n\t\t\t\t$this.onCopyAsNewClick();\n\n\t\t\t} );\n\n\t\t} else {\n\t\t\t$this.setErrorTips( result );\n\t\t\t$this.setErrorMenu();\n\t\t}\n\t}\n\n\tsaveInsideEditorData( callBack ) {\n\n\t\tvar data = this.editor.getValue( this.refresh_id );\n\n\t\tlet changed_data = this.getChangedRecords( data, this.original_exception_data, [] );\n\n\t\tif ( Array.isArray( changed_data ) && changed_data.length > 0 ) {\n\t\t\tthis.api_exception_policy.setExceptionPolicy( changed_data, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tif ( Global.isSet( callBack ) ) {\n\t\t\t\t\t\tcallBack();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( Global.isSet( callBack ) ) {\n\t\t\t\tcallBack();\n\t\t\t}\n\t\t}\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\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\tgetExceptionPolicyTabHtml() {\n\t\treturn `<div id=\"tab_exception_policy\" class=\"edit-view-tab-outside\">\n\t\t\t\t\t<div class=\"edit-view-tab\" id=\"tab_exception_policy_content_div\">\n\t\t\t\t\t\t<div class=\"first-column full-width-column\"></div>\n\t\t\t\t\t\t<div class=\"inside-editor-div full-width-column\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>`;\n\t}\n\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjU1Ni5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDJCQUEyQixDQUFDO0FBQzVCLDBCQUEwQixDQUFDO0FBQzNCO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQ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