"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["common-AuthorizationHistoryCommon"],{5533:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AuthorizationHistory\": () => (/* binding */ AuthorizationHistory)\n/* harmony export */ });\n/* provided dependency */ var $ = __webpack_require__(9755);\nvar AuthorizationHistory = {\n\n\t/**\n\t * There's only 4 steps for ading auth history to a view file:\n\t * 1. Copy the authorization-grid-div from RequestEditView.html\n\t * 2. Paste that div into the editview html of the new view\n\t * 3. Add AuthorizationHistory.init(this) to setEditViewDataDone() or to the end of onViewClick() if you experience screen flashing with it in setEditViewDataDone()\n\t * 4a.If the view only has one hierarchytype id, add this.hierarchy_type_id = [**the correct id**]; to the init function of the view\n\t * 4b.Else, ensure that hierarch_type_id is set in the view's current_edit_record\n\t *\n\t */\n\n\tauthorization_api: null,\n\tauthorization_history_columns: [],\n\tauthorization_history_default_display_columns: [],\n\n\thost_view_controller: null,\n\n\t/**\n\t * call this to render the auth grid.\n\t * assumes this.edit_view exists.\n\t * @param $this\n\t * @returns {AuthorizationHistory}\n\t */\n\tinit: function( host ) {\n\t\t$( '.authorization-grid-div' ).hide();\n\t\tif ( host.is_add ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar separate_box = $( '.authorization-grid-div .grid-title' );\n\t\tseparate_box.html( '' );\n\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.SEPARATED_BOX );\n\t\tform_item_input.SeparatedBox( { label: $.i18n._( 'Authorization History' ) } );\n\t\tform_item_input.attr( 'id', 'authorization_history' );\n\t\thost.addEditFieldToColumn( null, form_item_input, separate_box );\n\n\t\tthis.host_view_controller = host;\n\t\tthis.authorization_api = TTAPI.APIAuthorization;\n\n\t\tvar $this = this;\n\t\tthis.getAuthorizationHistoryColumns( function() {\n\t\t\t$this.initAuthorizationHistoryLayout( function() {\n\t\t\t\t$this.setAuthorizationGridSize();\n\t\t\t} );\n\t\t} );\n\n\t\treturn $this;\n\t},\n\n\tinitAuthorizationHistoryLayout: function( callback ) {\n\t\tvar $this = this;\n\t\tthis.getAuthorizationHistoryDefaultDisplayColumns( function() {\n\t\t\tif ( !$this.host_view_controller.edit_view ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$this.setAuthorizationHistorySelectLayout();\n\t\t\t$this.initAuthorizationHistoryData();\n\t\t\tif ( callback ) {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Gets data from the API and puts it into the authorization history grid.\n\t *\n\t * @param callback\n\t */\n\tinitAuthorizationHistoryData: function( callback ) {\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\n\t\tfilter.filter_columns = { 'created_by': true, 'created_date': true, 'authorized': true };\n\t\tfilter.filter_data.object_id = [this.host_view_controller.current_edit_record.id];\n\t\tfilter.filter_data.object_type_id = this.host_view_controller.hierarchy_type_id ? this.host_view_controller.hierarchy_type_id : this.host_view_controller.current_edit_record.hierarchy_type_id;\n\n\t\tvar $this = this;\n\t\tthis.authorization_api['get' + this.authorization_api.key_name]( filter, {\n\t\t\tonResult: function( result ) {\n\n\t\t\t\tif ( !$this.host_view_controller.edit_view ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar result_data = result.getResult();\n\t\t\t\tif ( result.isValid() && Global.isArray( result_data ) && result_data.length >= 1 ) {\n\t\t\t\t\tresult_data = Global.formatGridData( result_data, $this.authorization_api.key_name );\n\n\t\t\t\t\t$this.authorization_history_grid.setData( result_data );\n\n\t\t\t\t\t$( $this.host_view_controller.edit_view.find( '.authorization-grid-div' ) ).show();\n\t\t\t\t\t$this.showAuthorizationHistoryGridBorders();\n\t\t\t\t\t$this.setAuthorizationGridSize();\n\t\t\t\t} else {\n\t\t\t\t\t$( $this.host_view_controller.edit_view.find( '.authorization-grid-div' ) ).hide();\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t},\n\n\tsetAuthorizationGridSize: function() {\n\t\tvar history_height_unit;\n\t\tif ( ( !this.authorization_history_grid || !this.authorization_history_grid.grid.is( ':visible' ) ) ) {\n\t\t\treturn;\n\t\t}\n\t\thistory_height_unit = this.authorization_history_grid.getData().length;\n\t\thistory_height_unit > 5 && ( history_height_unit = 5 );\n\t\tthis.authorization_history_grid.grid.setGridWidth( $( this.host_view_controller.edit_view.find( '#authorization_history' ) ).width() );\n\t\tthis.authorization_history_grid.grid.setGridHeight( history_height_unit * 25 );\n\t},\n\n\tbuildAuthorizationDisplayColumns: function( apiDisplayColumnsArray ) {\n\t\tvar len = this.authorization_history_columns.length;\n\t\tvar len1 = apiDisplayColumnsArray.length;\n\t\tvar display_columns = [];\n\n\t\tfor ( var j = 0; j < len1; j++ ) {\n\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\tif ( apiDisplayColumnsArray[j] === this.authorization_history_columns[i].value ) {\n\t\t\t\t\tdisplay_columns.push( this.authorization_history_columns[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn display_columns;\n\t},\n\n\tshowAuthorizationHistoryGridBorders: function() {\n\t\tvar top_border = this.host_view_controller.edit_view.find( '.grid-top-border' );\n\t\tvar bottom_border = this.host_view_controller.edit_view.find( '.grid-bottom-border' );\n\n\t\ttop_border.css( 'display', 'block' );\n\t\tbottom_border.css( 'display', 'block' );\n\t},\n\n\tgetAuthorizationHistoryDefaultDisplayColumns: function( callBack ) {\n\t\tvar $this = this;\n\t\tthis.authorization_api.getOptions( 'default_display_columns', {\n\t\t\tonResult: function( columns_result ) {\n\t\t\t\tvar columns_result_data = columns_result.getResult();\n\n\t\t\t\t$this.authorization_history_default_display_columns = columns_result_data;\n\n\t\t\t\tif ( callBack ) {\n\t\t\t\t\tcallBack();\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t},\n\n\tgetAuthorizationHistoryColumns: function( callBack ) {\n\t\tvar $this = this;\n\t\tthis.authorization_api.getOptions( 'columns', {\n\t\t\tonResult: function( columns_result ) {\n\t\t\t\tvar columns_result_data = columns_result.getResult();\n\t\t\t\t$this.authorization_history_columns = Global.buildColumnArray( columns_result_data );\n\n\t\t\t\tif ( callBack ) {\n\t\t\t\t\tcallBack();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tsetAuthorizationHistorySelectLayout: function( column_start_from ) {\n\t\tvar $this = this;\n\t\tvar grid = this.host_view_controller.edit_view.find( '#grid' );\n\t\tif ( grid ) {\n\t\t\tgrid.attr( 'id', 'authorization_history_grid' ); //Grid's id is ScriptName + _grid\n\t\t}\n\t\tvar column_info_array = [];\n\t\tvar display_columns = this.buildAuthorizationDisplayColumns( this.authorization_history_default_display_columns );\n\n\t\t//Set Data Grid on List view\n\t\tvar len = display_columns.length;\n\n\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\tvar view_column_data = display_columns[i];\n\n\t\t\tvar column_info = {\n\t\t\t\tname: view_column_data.value,\n\t\t\t\tindex: view_column_data.value,\n\t\t\t\tlabel: view_column_data.label,\n\t\t\t\twidth: 100,\n\t\t\t\tsortable: false,\n\t\t\t\ttitle: false\n\t\t\t};\n\t\t\tcolumn_info_array.push( column_info );\n\t\t}\n\n\t\tif ( this.authorization_history_grid ) {\n\n\t\t\tthis.authorization_history_grid.grid.jqGrid( 'GridUnload' );\n\t\t\tthis.authorization_history_grid = null;\n\t\t}\n\n\t\tthis.authorization_history_grid = new TTGrid( 'authorization_history_grid', {\n\t\t\tonResizeGrid: false,\n\t\t\twinMultiselect: false,\n\t\t\tmultiselect: false,\n\t\t\twidth: this.host_view_controller.edit_view.find( '.edit-view-tab' ).width()\n\t\t}, column_info_array );\n\t}\n\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTUzMy5qcyIsIm1hcHBpbmdzIjoiOzs7OztBQUFPOztBQUVQO0FBQ0E7QUFDQTtBQUN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