TimeTrex/interface/html5/dist/company-payroll_remittance_agency-PayrollRemittanceAgencyEventViewController.bundle.js

1 line
60 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["company-payroll_remittance_agency-PayrollRemittanceAgencyEventViewController"],{542:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PayrollRemittanceAgencyEventViewController\": () => (/* binding */ PayrollRemittanceAgencyEventViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass PayrollRemittanceAgencyEventViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#payroll_remittance_agency_event_view_container', //Must set el here and can only set string, so events can work\n\n\t\t\tuser_api: null,\n\t\t\tstatus_array: null,\n\t\t\taction_array: null,\n\t\t\tagency_array: null,\n\t\t\tpayment_frequency_array: null,\n\t\t\treport_frequency_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\t\t\tdistrict_array: null,\n\n\t\t\tmonth_of_year_array: null,\n\t\t\tmonth_of_quarter_array: null,\n\t\t\tweek_interval_array: null,\n\t\t\tday_of_month_array: null,\n\t\t\tday_of_week_array: null,\n\n\t\t\tremittance_source_account_array: null,\n\t\t\tsub_event_view_controller: null,\n\n\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'PayrollRemittanceAgencyEventEditView.html';\n\t\tthis.permission_id = 'payroll_remittance_agency';\n\t\tthis.script_name = 'PayrollRemittanceAgencyEventView';\n\t\tthis.table_name_key = 'payroll_remittance_agency_event';\n\t\tthis.viewId = 'PayrollRemittanceAgencyEvent';\n\t\tthis.context_menu_name = $.i18n._( 'Remittance Agency Event' );\n\t\tthis.navigation_label = $.i18n._( 'Remittance Agency Event' );\n\t\tthis.api = TTAPI.APIPayrollRemittanceAgencyEvent;\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\t\tthis.company_api = TTAPI.APICompany;\n\n\t\tthis.date_api = TTAPI.APITTDate;\n\t\tthis.api_user_report = TTAPI.APIUserReportData;\n\t\tthis.month_of_quarter_array = Global.buildRecordArray( { 1: 1, 2: 2, 3: 3 } );\n\n\t\tthis.render();\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\tthis.buildContextMenu( true );\n\t\t} else {\n\t\t\tthis.buildContextMenu();\n\t\t}\n\n\t\t//call init data in parent view\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.initData();\n\t\t}\n\t}\n\n\t//override required because this is a subview in an edit view.\n\t_setGridSizeGridWidthOfSubViewMode() {\n\t\tthis.grid.setGridWidth( $( this.el ).parents( '.edit-view-tab' ).parent().parent().width() - 10 );\n\t}\n\n\t//Don't initOptions if edit_only_mode. Do it in sub views\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'status' );\n\t\tthis.initDropDownOption( 'frequency' );\n\n\t\tthis.api.getOptions( 'week_interval', {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.week_interval_array = res;\n\t\t\t}\n\n\t\t} );\n\t\tthis.date_api.getMonthOfYearArray( {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.month_of_year_array = res;\n\t\t\t}\n\t\t} );\n\t\tthis.date_api.getDayOfMonthArray( {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.day_of_month_array = Global.buildRecordArray( res );\n\t\t\t}\n\t\t} );\n\t\tthis.date_api.getDayOfWeekArray( {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.day_of_week_array = res;\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetTypeOptions() {\n\t\tvar $this = this;\n\t\tvar type_params = {\n\t\t\t'payroll_remittance_agency_id': this.edit_view_ui_dic.payroll_remittance_agency_id.getValue()\n\t\t};\n\n\t\tthis.api.getOptions( 'type', type_params, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\t$this.edit_view_ui_dic.type_id.setSourceData( Global.buildRecordArray( res ) );\n\n\t\t\t\t$this.edit_view_