1 line
39 KiB
JavaScript
1 line
39 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["attendance-accrual_balance-AccrualBalanceViewController"],{8726:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AccrualBalanceViewController\": () => (/* binding */ AccrualBalanceViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass AccrualBalanceViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#accrual_balance_view_container',\n\n\t\t\tuser_group_api: null,\n\t\t\tuser_group_array: null,\n\n\t\t\tsub_accrual_view_controller: null,\n\n\t\t\tlog_object_ids: 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 = 'AccrualBalanceEditView.html';\n\t\tthis.permission_id = 'accrual';\n\t\tthis.viewId = 'AccrualBalance';\n\t\tthis.script_name = 'AccrualBalanceView';\n\t\tthis.table_name_key = 'accrual';\n\t\tthis.context_menu_name = $.i18n._( 'Accrual Balances' );\n\t\tthis.navigation_label = $.i18n._( 'Accrual Balance' );\n\t\tthis.api = TTAPI.APIAccrualBalance;\n\t\tthis.accrual_api = TTAPI.APIAccrual;\n\t\tthis.user_api = TTAPI.APIUser;\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\n\t\tthis.initPermission();\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tinitPermission() {\n\n\t\tsuper.initPermission();\n\n\t\tif ( PermissionManager.validate( this.permission_id, 'view' ) || PermissionManager.validate( this.permission_id, 'view_child' ) ) {\n\t\t\tthis.show_search_tab = true;\n\t\t} else {\n\t\t\tthis.show_search_tab = false;\n\t\t}\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'status', 'user_status_id', this.user_api, null, 'user_status_array' );\n\t\tthis.user_group_api.getUserGroup( '', false, false, {\n\t\t\tonResult: function( res ) {\n\n\t\t\t\tres = res.getResult();\n\t\t\t\tres = Global.buildTreeRecord( 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}\n\n\t\t\t\t$this.user_group_array = res;\n\n\t\t\t}\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_accrual': {\n\t\t\t\t'label': $.i18n._( 'Accrual' ),\n\t\t\t\t'init_callback': 'initSubAccrualView',\n\t\t\t\t'display_on_mass_edit': false\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.APIAccrualBalance,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_accrual_balance',\n\t\t\tnavigation_mode: true,\n\t\t\taddition_source_function: function( target, data ) {\n\t\t\t\treturn $this.__createRowId( data );\n\t\t\t},\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['default'],\n\t\t\tinclude: [\n\t\t\t\t'add',\n\t\t\t\t'view',\n\t\t\t\t'export_excel'\n\t\t\t]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tbuildSearchFields() {\n\t\tsuper.buildSearchFields();\n\n\t\tvar default_args = {};\n\t\tdefault_args.permission_section = 'accrual';\n\n\t\tthis.search_fields = [\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Employee' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tdefault_args: default_args,\n\t\t\t\tfield: 'user_id',\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._( 'Employee Status' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'user_status_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tlayout_name: 'global_option_column',\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._( 'Accrual Account' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'accrual_policy_account_id',\n\t\t\t\tlayout_name: 'global_accrual_policy_account',\n\t\t\t\tapi_class: TTAPI.APIAccrualPolicyAccount,\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._( 'Default Branch' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'default_branch_id',\n\t\t\t\tlayout_name: 'global_branch',\n\t\t\t\tapi_class: TTAPI.APIBranch,\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._( 'Default Department' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'default_department_id',\n\t\t\t\tlayout_name: 'global_department',\n\t\t\t\tapi_class: TTAPI.APIDepartment,\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._( 'Group' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tmultiple: true,\n\t\t\t\tfield: 'group_id',\n\t\t\t\tlayout_name: 'global_tree_column',\n\t\t\t\ttree_mode: 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\tgetFilterColumnsFromDisplayColumns() {\n\t\tvar column_filter = {};\n\t\tcolumn_filter.user_id = true;\n\t\tcolumn_filter.accrual_policy_account_id = true;\n\t\treturn this._getFilterColumnsFromDisplayColumns( column_filter, true );\n\t}\n\n\t__createRowId( data ) {\n\t\tif ( Array.isArray( data ) ) {\n\t\t\tfor ( var i = 0; i < data.length; i++ ) {\n\t\t\t\tdata[i].id = data[i]['user_id'] + '_' + data[i]['accrual_policy_account_id'];\n\t\t\t}\n\t\t} else if ( data && data['user_id'] && data['accrual_policy_account_id'] ) {\n\t\t\tdata.id = data['user_id'] + '_' + data['accrual_policy_account_id'];\n\t\t} else {\n\t\t\tDebug.Text( 'ERROR: Data format is invalid.', 'AccrualBalanceViewController.js', 'AccrualBalanceViewController', '__createRowId', 1 );\n\t\t}\n\t\treturn data;\n\t}\n\n//\tsaveLogIds( data ) {\n//\t\tthis.parent_view_controller.log_object_ids = [];\n//\t\tfor ( var i = 0; i < data.length; i++ ) {\n//\t\t\tthis.parent_view_controller.log_object_ids.push( data[i]['id'] );\n//\t\t}\n//\n//\t\treturn data;\n//\t},\n\n\tsetDefaultMenuAddIcon( context_btn, grid_selected_length, pId ) {\n\t\tthis.setDefaultMenuEditIcon( context_btn, grid_selected_length, pId );\n\t}\n\n\tsetEditMenuAddIcon( context_btn, pId ) {\n\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t}\n\n\tonAddClick() {\n\t\tvar $this = this;\n\t\tthis.setCurrentEditViewState( 'view' );\n\t\tthis.add_accrual = true;\n\t\t$this.openEditView();\n\n\t\tvar selected_item = null;\n\t\tvar grid_selected_id_array = this.getGridSelectIdArray();\n\n\t\tvar grid_selected_length = grid_selected_id_array.length;\n\n\t\tif ( grid_selected_length > 0 ) {\n\t\t\tselected_item = this.getRecordFromGridById( grid_selected_id_array[0] );\n\t\t} else {\n\t\t\tvar grid_source_data = $this.grid.getGridParam( 'data' );\n\t\t\tselected_item = grid_source_data[0];\n\t\t}\n\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\t\tif ( selected_item ) {\n\t\t\tfilter.filter_data.user_id = selected_item.user_id;\n\t\t\tfilter.filter_data.accrual_policy_account_id = selected_item.accrual_policy_account_id;\n\t\t}\n\n\t\tthis.api['get' + this.api.key_name]( filter, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\tif ( !result_data ) {\n\t\t\t\t\tresult_data = [];\n\t\t\t\t}\n\n\t\t\t\tresult_data = $this.__createRowId( result_data );\n\n\t\t\t\tresult_data = result_data[0];\n\n\t\t\t\tif ( !result_data ) {\n\t\t\t\t\tresult_data = {};\n\t\t\t\t}\n\n\t\t\t\t$this.current_edit_record = result_data;\n\n\t\t\t\tif ( $this.current_edit_record && $this.current_edit_record.user_id && $this.current_edit_record.accrual_policy_account_id ) {\n\t\t\t\t\tfilter.filter_data.user_id = $this.current_edit_record.user_id;\n\t\t\t\t\tfilter.filter_data.accrual_policy_account_id = $this.current_edit_record.accrual_policy_account_id;\n\t\t\t\t}\n\n\t\t\t\t// get the accrual data with the same filter data in order to be used for the audit tab.\n\t\t\t\t$this.accrual_api['get' + $this.accrual_api.key_name]( filter, {\n\t\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t\tvar result = res.getResult();\n\t\t\t\t\t\t$this.log_object_ids = [];\n\t\t\t\t\t\tfor ( var i = 0; i < result.length; i++ ) {\n\t\t\t\t\t\t\t$this.log_object_ids.push( result[i]['id'] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this.initEditView();\n\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tparseToUserId( id ) {\n\t\tif ( !id ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tid = id.toString();\n\n\t\tif ( id.indexOf( '_' ) > 0 ) {\n\t\t\treturn id.split( '_' )[0];\n\t\t}\n\n\t\treturn id;\n\t}\n\n\tparseToAccrualPolicyAccountId( id ) {\n\t\tif ( !id ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tid = id.toString();\n\n\t\tif ( id.indexOf( '_' ) > 0 ) {\n\t\t\treturn id.split( '_' )[1];\n\t\t}\n\n\t\treturn id;\n\t}\n\n\tgetAPIFilters() {\n\t\tvar composite_id = this.getCurrentSelectedRecord();\n\n\t\tvar filter = {};\n\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_data.user_id = this.parseToUserId( composite_id );\n\t\tfilter.filter_data.accrual_policy_account_id = this.parseToAccrualPolicyAccountId( composite_id );\n\n\t\treturn filter;\n\t}\n\n\tdoViewClickResult( result_data ) {\n\t\tvar $this = this;\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\n\t\tresult_data = $this.__createRowId( result_data );\n\t\t$this.current_edit_record = result_data;\n\t\tif ( $this.current_edit_record && $this.current_edit_record.user_id && $this.current_edit_record.accrual_policy_account_id ) {\n\t\t\tfilter.filter_data.user_id = $this.current_edit_record.user_id;\n\t\t\tfilter.filter_data.accrual_policy_account_id = $this.current_edit_record.accrual_policy_account_id;\n\t\t}\n\n\t\t// get the accrual data with the same filter data in order to be used for the audit tab.\n\t\treturn $this.accrual_api['get' + $this.accrual_api.key_name]( filter, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tvar result = res.getResult();\n\t\t\t\t$this.log_object_ids = [];\n\t\t\t\tfor ( var i = 0; i < result.length; i++ ) {\n\t\t\t\t\t$this.log_object_ids.push( result[i]['id'] );\n\t\t\t\t}\n\n\t\t\t\treturn $this.initEditView();\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tsetEditViewData() {\n\t\tthis.is_changed = false;\n\t\tthis.initEditViewData();\n\t\tthis.switchToProperTab();\n\t\tthis.initTabData();\n\t}\n\n\tinitEditViewData() {\n\t\tvar $this = this;\n\t\tif ( !this.edit_only_mode && this.navigation ) {\n\t\t\tvar grid_current_page_items = this.grid.getGridParam( 'data' );\n\n\t\t\tvar navigation_div = this.edit_view.find( '.navigation-div' );\n\n\t\t\tnavigation_div.css( 'display', 'block' );\n\t\t\t//Set Navigation Awesomebox\n\n\t\t\t//init navigation only when open edit view\n\n\t\t\tif ( !this.navigation.getSourceData() ) {\n\n\t\t\t\tthis.navigation.setSourceData( grid_current_page_items );\n\t\t\t\tthis.navigation.setRowPerPage( LocalCacheData.getLoginUserPreference().items_per_page );\n\t\t\t\tthis.navigation.setPagerData( this.pager_data );\n\n//\t\t\t\tthis.navigation.setDisPlayColumns( this.buildDisplayColumnsByColumnModel( this.grid.getGridParam( 'colModel' ) ) );\n\t\t\t\tvar default_args = {};\n\t\t\t\tdefault_args.filter_data = Global.convertLayoutFilterToAPIFilter( this.select_layout );\n\t\t\t\tdefault_args.filter_sort = this.select_layout.data.filter_sort;\n\t\t\t\tthis.navigation.setDefaultArgs( default_args );\n\t\t\t}\n\n\t\t\tthis.navigation.setValue( this.current_edit_record );\n\t\t}\n\n\t\tthis.setNavigationArrowsEnabled();\n\n\t\t// Create this function alone because of the column value of view is different from each other, some columns need to be handle specially. and easily to rewrite this function in sub-class.\n\n\t\tthis.setCurrentEditRecordData();\n\t\t//Init *Please save this record before modifying any related data* box\n\t\tthis.edit_view.find( '.save-and-continue-div' ).SaveAndContinueBox( { related_view_controller: this } );\n\t\tthis.edit_view.find( '.save-and-continue-div' ).css( 'display', 'none' );\n\t}\n\n\tinitSubAccrualView() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id && !this.add_accrual ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.sub_accrual_view_controller ) {\n\t\t\tthis.sub_accrual_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_accrual_view_controller.setDefaultMenu();\n\t\t\t$this.sub_accrual_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_accrual_view_controller.initData();\n\t\t\treturn;\n\t\t}\n\n\t\tGlobal.loadScript( 'views/attendance/accrual/AccrualViewController.js', function() {\n\t\t\tvar tab_accrual = $this.edit_view_tab.find( '#tab_accrual' );\n\n\t\t\tvar firstColumn = tab_accrual.find( '.first-column-sub-view' );\n\n\t\t\tTTPromise.add( 'initSubAccrualView', 'init' );\n\t\t\tTTPromise.wait( 'initSubAccrualView', 'init', function() {\n\t\t\t\tfirstColumn.css( 'opacity', '1' );\n\t\t\t} );\n\n\t\t\tfirstColumn.css( 'opacity', '0' ); //Hide the grid while its loading/sizing.\n\n\t\t\tGlobal.trackView( 'Sub' + 'Accrual' + 'View' );\n\t\t\tAccrualViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadView( subViewController ) {\n\t\t\t$this.sub_accrual_view_controller = subViewController;\n\t\t\t$this.sub_accrual_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_accrual_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_accrual_view_controller.is_trigger_add = $this.add_accrual ? true : false;\n\t\t\t$this.sub_accrual_view_controller.initData();\n\t\t\t$this.add_accrual = false;\n\t\t}\n\t}\n\n\tsetSubLogViewFilter() {\n\t\tif ( !this.sub_log_view_controller ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.sub_log_view_controller.parent_key = 'object_id';\n\t\tthis.sub_log_view_controller.parent_value = this.log_object_ids;\n\t\tthis.sub_log_view_controller.table_name_key = this.table_name_key;\n\n\t\treturn true;\n\t}\n\n\tremoveEditView() {\n\t\tsuper.removeEditView();\n\t\tthis.sub_accrual_view_controller = null;\n\t}\n\n\tsetNavigation() {\n\n\t\tvar $this = this;\n\t\tthis.navigation.setPossibleDisplayColumns( this.buildDisplayColumnsByColumnModel( this.grid.getGridParam( 'colModel' ) ),\n\t\t\tthis.buildDisplayColumns( this.default_display_columns ) );\n\n\t\tthis.navigation.unbind( 'formItemChange' ).bind( 'formItemChange', function( e, target ) {\n\n\t\t\tvar key = target.getField();\n\t\t\tvar next_select_item_id = target.getValue();\n\n\t\t\tif ( !next_select_item_id ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( next_select_item_id !== $this.current_edit_record.id ) {\n\t\t\t\tProgressBar.showOverlay();\n\n\t\t\t\t$this.onViewClick( next_select_item_id ); //Dont refresh UI\n\n\t\t\t}\n\n\t\t} );\n\n\t}\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODcyNi5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0EsSUFBSTs7QUFFSjtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMkJBQTJCLENBQUM7QUFDNUIsMEJBQTBCLENBQUM7QUFDM0I7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRU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