TimeTrex/interface/html5/dist/reports-payroll_export-PayrollExportReportViewController.bundle.js

1 line
221 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["reports-payroll_export-PayrollExportReportViewController"],{5613:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PayrollExportReportViewController\": () => (/* binding */ PayrollExportReportViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass PayrollExportReportViewController extends ReportBaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\n\t\t\texport_type_array: null,\n\n\t\t\texport_policy_array: null,\n\n\t\t\texport_setup_ui_dic: null,\n\n\t\t\texport_setup_data: null,\n\n\t\t\texport_grid: null,\n\n\t\t\tselect_grid_last_row: null,\n\n\t\t\tsave_export_setup_data: {}\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinitReport( options ) {\n\t\tthis.script_name = 'PayrollExportReport';\n\t\tthis.viewId = 'PayrollExportReport';\n\t\tthis.context_menu_name = $.i18n._( 'Payroll Export' );\n\t\tthis.navigation_label = $.i18n._( 'Saved Report' );\n\t\tthis.view_file = 'PayrollExportReportView.html';\n\t\tthis.api = TTAPI.APIPayrollExportReport;\n\t\tthis.include_form_setup = true;\n\t\tthis.export_setup_data = {};\n\t}\n\n\tinitOptions( callBack ) {\n\t\tvar $this = this;\n\t\tvar options = [\n\t\t\t{ option_name: 'page_orientation' },\n\t\t\t{ option_name: 'font_size' },\n\t\t\t{ option_name: 'chart_display_mode' },\n\t\t\t{ option_name: 'chart_type' },\n\t\t\t{ option_name: 'templates' },\n\t\t\t{ option_name: 'setup_fields' },\n\t\t\t{ option_name: 'export_type' },\n\t\t\t{ option_name: 'auto_refresh' }\n\t\t];\n\n\t\tthis.initDropDownOptions( options, function( result ) {\n\n\t\t\tcallBack( result ); // First to initialize drop down options, and then to initialize edit view UI.\n\n\t\t} );\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\tgroups: {\n\t\t\t\tform: {\n\t\t\t\t\tlabel: $.i18n._( 'Export' ), // Export is deliberate (rather than Form) due to export setup tab\n\t\t\t\t\tid: this.viewId + 'Form'\n\t\t\t\t}\n\t\t\t},\n\t\t\texclude: [],\n\t\t\tinclude: [\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Export' ),\n\t\t\t\t\tid: 'export_export',\n\t\t\t\t\tgroup: 'editor',\n\t\t\t\t\tvue_icon: 'tticon tticon-file_upload_black_24dp',\n\t\t\t\t\tmenu_align: 'right'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Save Setup' ),\n\t\t\t\t\tid: 'save_setup',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tvue_icon: 'tticon tticon-settings_black_24dp',\n\t\t\t\t\tmenu_align: 'right'\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tonTabIndexChange() {\n\n\t\t// Don't do anything in this sub class\n\t}\n\n\tsetEditMenuViewIcon() {\n\t\t// Don't do anything in this sub class\n\t}\n\n\t/* jshint ignore:start */\n\tonContextMenuClick( context_btn, menu_name ) {\n\t\tvar id;\n\t\tif ( Global.isSet( menu_name ) ) {\n\t\t\tid = menu_name;\n\t\t} else {\n\n\t\t\tif ( context_btn.disabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( this.select_grid_last_row ) {\n\t\t\tthis.export_grid.grid.jqGrid( 'saveRow', this.select_grid_last_row );\n\t\t\tthis.select_grid_last_row = null;\n\t\t}\n\n\t\tvar message_override = $.i18n._( 'Setup data for this report has not been configured yet. Please click on the Export Setup tab to do so now.' );\n\n\t\tswitch ( id ) {\n\t\t\tcase 'view':\n\t\t\t\tProgressBar.showOverlay();\n\t\t\t\tthis.onViewClick( null, false, message_override );\n\t\t\t\tbreak;\n\t\t\tcase 'view_html':\n\t\t\t\tProgressBar.showOverlay();\n\t\t\t\tthis.onViewClick( 'html', false, message_override );\n\t\t\t\tbreak;\n\t\t\tcase 'view_html_new_window':\n\t\t\t\tthis.onViewClick( 'html', false, message_override );\n\t\t\t\tbreak;\n\t\t\tcase 'export_excel':\n\t\t\t\tthis.onViewExcelClick( message_override );\n\t\t\t\tbreak;\n\t\t\tcase 'export_export':\n\t\t\t\tProgressBar.showOverlay();\n\t\t\t