1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-user_generic_data_status-UserGenericStatusWindowController"],{1706:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UserGenericStatusWindowController\": () => (/* binding */ UserGenericStatusWindowController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass UserGenericStatusWindowController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\t// el: '.user-generic-data-status',\n\t\t\tel: '', // el is set to the DOM id which is set in UserGenericStatusWindowController.open()\n\n\t\t\tbatch_id: '',\n\t\t\tuser_id: '',\n\n\t\t\tcallback: null,\n\n\t\t\tevents: {\n\t\t\t\t'click .done-btn': 'onCloseClick'\n\t\t\t},\n\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\tthis.options = options;\n\t\tthis.content_div = $( this.el ).find( '.content' );\n\t\tthis.batch_id = this.options.batch_id;\n\t\tthis.user_id = this.options.user_id;\n\n\t\tif ( this.options.callback ) {\n\t\t\tthis.callback = this.options.callback;\n\t\t}\n\n\t\tthis.api = TTAPI.APIUserGenericStatus;\n\t\tthis.render();\n\t\tthis.initData();\n\n\t}\n\n\t//Don't initOptions if edit_only_mode. Do it in sub views\n\tinitData() {\n\t\tvar $this = this;\n\t\tProgressBar.showOverlay();\n\t\tthis.getAllColumns( function() {\n\t\t\t$this.initLayout();\n\t\t} );\n\t}\n\n\tinitLayout() {\n\t\tvar $this = this;\n\t\t$this.getDefaultDisplayColumns( function() {\n\t\t\t$this.setSelectLayout();\n\t\t\t$this.search();\n\n\t\t} );\n\t}\n\n\tonCloseClick() {\n\t\t// UserGenericStatusWindowController.instance = null;\n\t\t$( this.el ).remove();\n\n\t\tif ( this.callback ) {\n\t\t\tthis.callback();\n\t\t}\n\t}\n\n\trender() {\n\t\tvar title = $( this.el ).find( '.title' );\n\t\ttitle.text( $.i18n._( 'Status Report' ) );\n\n\t}\n\n\tgetAllColumns( callBack ) {\n\n\t\tvar $this = this;\n\t\tthis.api.getOptions( 'columns', {\n\t\t\tonResult( columns_result ) {\n\t\t\t\tvar columns_result_data = columns_result.getResult();\n\t\t\t\t$this.all_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\n\t\t\t}\n\t\t} );\n\n\t}\n\n\tsearch( set_default_menu ) {\n\n\t\tif ( !Global.isSet( set_default_menu ) ) {\n\t\t\tset_default_menu = true;\n\t\t}\n\n\t\tvar $this = this;\n\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_data.batch_id = this.batch_id;\n\t\tfilter.filter_items_per_page = 0; // Default to 0 to load user preference defined\n\n\t\tthis.api['getUserGenericStatus']( filter, true, {\n\t\t\tonResult: function( result ) {\n\n\t\t\t\tvar result_data = result.getResult();\n\t\t\t\tresult_data = Global.formatGridData( result_data, $this.api.key_name );\n\n\t\t\t\t$this.grid.setData( result_data );\n\n\t\t\t\t$this.setGridSize();\n\n\t\t\t\tProgressBar.closeOverlay(); //Add this in initData\n\n\t\t\t\tif ( set_default_menu ) {\n\t\t\t\t\t$this.setDefaultMenu( true );\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.api['getUserGenericStatusCountArray']( this.user_id, this.batch_id, {\n\t\t\tonResult: function( result ) {\n\n\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\tvar failed = $( $this.el ).find( '.failed' );\n\t\t\t\tvar warning = $( $this.el ).find( '.warning' );\n\t\t\t\tvar success = $( $this.el ).find( '.success' );\n\n\t\t\t\tif ( result_data != true && result_data.status ) {\n\t\t\t\t\tfailed.text( result_data.status[10].total + '/' + result_data.total + '( ' + result_data.status[10].percent + '% )' );\n\t\t\t\t\twarning.text( result_data.status[20].total + '/' + result_data.total + '( ' + result_data.status[20].percent + '% )' );\n\t\t\t\t\tsuccess.text( result_data.status[30].total + '/' + result_data.total + '( ' + result_data.status[30].percent + '% )' );\n\t\t\t\t}\n\n\t\t\t\tvar export_button = $( $this.el ).find( '#export-user-generic-status' );\n\t\t\t\texport_button.find( '.p-button-label' ).text( $.i18n._( 'Export' ) );\n\n\t\t\t\texport_button.unbind( 'click' ).bind( 'click', function() {\n\t\t\t\t\t$this.select_layout.data.filter_data = { batch_id: $this.batch_id };\n\t\t\t\t\t$this.onExportClick( 'export' + $this.api.key_name );\n\t\t\t\t} );\n\n\t\t\t}\n\t\t} );\n\n\t}\n\n\tsetGridSize() {\n\n\t}\n\n\tsetSelectLayout( column_start_from ) {\n\n\t\tvar $this = this;\n\t\tvar column_info_array = [];\n\n\t\tthis.select_layout = { id: '' };\n\t\tthis.select_layout.data = { filter_data: {}, filter_sort: {} };\n\t\tthis.select_layout.data.display_columns = this.default_display_columns;\n\t\tvar layout_data = this.select_layout.data;\n\t\tvar display_columns = this.buildDisplayColumns( layout_data.display_columns );\n\n\t\t//Set Data Grid on List view\n\t\tvar len = display_columns.length;\n\n\t\tif ( layout_data.display_columns.length < 1 ) {\n\t\t\tlayout_data.display_columns = this.default_display_columns;\n\t\t}\n\n\t\tvar start_from = 0;\n\n\t\tif ( Global.isSet( column_start_from ) && column_start_from > 0 ) {\n\t\t\tstart_from = column_start_from;\n\t\t}\n\n\t\tfor ( var i = start_from; i < len; i++ ) {\n\t\t\tvar view_column_data = display_columns[i];\n\n\t\t\tif ( view_column_data.value === 'description' ) {\n\t\t\t\tvar column_info = {\n\t\t\t\t\tname: view_column_data.value,\n\t\t\t\t\tindex: view_column_data.value,\n\t\t\t\t\tlabel: view_column_data.label,\n\t\t\t\t\twidth: 400,\n\t\t\t\t\tsortable: false,\n\t\t\t\t\ttitle: false\n\t\t\t\t};\n\n\t\t\t} else if ( view_column_data.value === 'status' ) {\n\t\t\t\tcolumn_info = {\n\t\t\t\t\tname: view_column_data.value, index: view_column_data.value, label: view_column_data.label,\n\t\t\t\t\twidth: 100, sortable: false, title: false, formatter: function( cell_value, related_data, row ) {\n\n\t\t\t\t\t\tvar span = $( '<span></span>' );\n\n\t\t\t\t\t\tif ( cell_value === 'Failed' ) {\n\t\t\t\t\t\t\tspan.addClass( 'failed-label' );\n\t\t\t\t\t\t} else if ( cell_value === 'Warning' ) {\n\t\t\t\t\t\t\tspan.addClass( 'warning-label' );\n\t\t\t\t\t\t} else if ( cell_value === 'Success' ) {\n\t\t\t\t\t\t\tspan.addClass( 'success-label' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tspan.text( cell_value );\n\t\t\t\t\t\treturn span.get( 0 ).outerHTML;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t} else {\n\t\t\t\tcolumn_info = {\n\t\t\t\t\tname: view_column_data.value,\n\t\t\t\t\tindex: view_column_data.value,\n\t\t\t\t\tlabel: view_column_data.label,\n\t\t\t\t\twidth: 100,\n\t\t\t\t\tsortable: false,\n\t\t\t\t\ttitle: false\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcolumn_info_array.push( column_info );\n\t\t}\n\n\t\tif ( this.grid ) {\n\t\t\tthis.grid.grid.jqGrid( 'GridUnload' );\n\t\t\tthis.grid = null;\n\t\t}\n\n\t\tthis.grid = new TTGrid( 'user_generic_data_status_grid-' + this.batch_id, {\n\t\t\taltRows: true,\n\t\t\tonSelectRow: $.proxy( this.onGridSelectRow, this ),\n\t\t\tdata: [],\n\t\t\trowNum: 10000,\n\t\t\tsortable: false,\n\t\t\tdatatype: 'local',\n\t\t\twidth: 600,\n\t\t\tcolNames: [],\n\t\t\tviewrecords: true\n\t\t}, column_info_array );\n\n\t\tvar content_div = $( this.el ).find( '.content' );\n\n\t\tthis.grid.grid.setGridWidth( content_div.width() - 2 );\n\t\tthis.grid.grid.setGridHeight( content_div.height() - 25 );\n\t\t$( window ).off( 'resize.user_generic_status_window' ).on( 'resize.user_generic_status_window', function() {\n\t\t\t$this.grid.grid.setGridWidth( content_div.width() - 2 );\n\t\t\t$this.grid.grid.setGridHeight( content_div.height() - 25 );\n\t\t} );\n\n\t\tthis.filter_data = this.select_layout.data.filter_data;\n\t}\n\n}\n\n// UserGenericStatusWindowController.instance = null;\n\nUserGenericStatusWindowController.open = function( batch_id, user_id, callback ) {\n\tGlobal.loadViewSource( 'UserGenericStatus', 'UserGenericStatusWindow.css' );\n\tGlobal.loadViewSource( 'UserGenericStatus', 'UserGenericStatusWindow.html', function( result ) {\n\t\tif ( TTUUID.isUUID( batch_id ) == true ) {\n\t\t\tvar args = {\n\t\t\t\tbatch_id: batch_id,\n\t\t\t\tfailed: $.i18n._( 'Failed' ),\n\t\t\t\twarning: $.i18n._( 'Warning' ),\n\t\t\t\tsuccess: $.i18n._( 'Success' )\n\t\t\t};\n\n\t\t\tvar template = _.template( result );\n\t\t\t$( 'body' ).append( template( args ) );\n\n\t\t\tnew UserGenericStatusWindowController( {\n\t\t\t\tel: '#' + batch_id,\n\t\t\t\tbatch_id: batch_id,\n\t\t\t\tuser_id: user_id,\n\t\t\t\tcan_cache_controller: false,\n\t\t\t\tcallback: callback,\n\t\t\t} );\n\t\t} else {\n\t\t\tTAlertManager.showAlert( $.i18n._( 'Status report is empty. Please try again.', LocalCacheData.getApplicationName() ), $.i18n._( 'NOTICE' ) );\n\t\t}\n\t} );\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcwNi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBLElBQUk7O0FBRUosSUFBSTs7QUFFSjtBQUNBOztBQUVBO0FBQ0E7QUFDQSxxQkFBcUIsQ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