TimeTrex/interface/html5/dist/reports-us_state_unemployment-USStateUnemploymentReportViewController.bundle.js

1 line
35 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["reports-us_state_unemployment-USStateUnemploymentReportViewController"],{2786:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"USStateUnemploymentReportViewController\": () => (/* binding */ USStateUnemploymentReportViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass USStateUnemploymentReportViewController extends ReportBaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tform_setup_states_array: null,\n\n\t\t\tform_setup_ui_dic: {},\n\t\t\tform_setup_data: {},\n\n\t\t\tsave_form_setup_data: {}\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinitReport( options ) {\n\t\tthis.script_name = 'USStateUnemploymentReport';\n\t\tthis.viewId = 'USStateUnemploymentReport';\n\t\tthis.context_menu_name = $.i18n._( 'US State Unemployment' );\n\t\tthis.navigation_label = $.i18n._( 'Saved Report' );\n\t\tthis.view_file = 'USStateUnemploymentReportView.html';\n\t\tthis.api = TTAPI.APIUSStateUnemploymentReport;\n\t\tthis.include_form_setup = true;\n\t\tthis.form_setup_data = {};\n\t}\n\n\tinitOptions( callBack ) {\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: 'auto_refresh' },\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: 'form_setup_states' }\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},\n\t\t\texclude: [],\n\t\t\tinclude: [\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\tsort_order: 3000\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\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 Form 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 'cancel':\n\t\t\t\tthis.onCancelClick();\n\t\t\t\tbreak;\n\t\t\tcase 'save_existed_report': //All report view\n\t\t\t\tthis.onSaveExistedReportClick();\n\t\t\t\tbreak;\n\t\t\tcase 'save_new_report': //All report view\n\t\t\t\tthis.onSaveNewReportClick();\n\t\t\t\tbreak;\n\t\t\tcase 'save_setup': //All report view\n\t\t\t\tthis.onSaveSetup( $.i18n._( 'Form setup' ) );\n\t\t\t\tbreak;\n\t\t}\n\t\tGlobal.triggerAnalyticsContextMenuClick( context_btn, menu_name );\n\t}\n\n\tbuildEditViewUI() {\n\t\tsuper.buildEditViewUI();\n\n\t\tvar tab_3_label = this.edit_view.find( 'a[ref=tab_form_setup]' );\n\t\ttab_3_label.text( $.i18n._( 'Form Setup' ) );\n\t}\n\n\tbuildFormSetupUI() {\n\n\t\tvar $this = this;\n\n\t\tvar tab3 = this.edit_view_tab.find( '#tab_form_setup'