TimeTrex/interface/html5/dist/reports-formw2-FormW2ReportViewController.bundle.js

1 line
154 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["reports-formw2-FormW2ReportViewController"],{7705:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FormW2ReportViewController\": () => (/* binding */ FormW2ReportViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass FormW2ReportViewController extends ReportBaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tkind_of_employer_array: null,\n\t\t\tform_type_array: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinitReport( options ) {\n\t\tthis.script_name = 'FormW2Report';\n\t\tthis.viewId = 'FormW2Report';\n\t\tthis.context_menu_name = $.i18n._( 'Form W2/W3' );\n\t\tthis.navigation_label = $.i18n._( 'Saved Report' );\n\t\tthis.view_file = 'FormW2ReportView.html';\n\t\tthis.api = TTAPI.APIFormW2Report;\n\t\tthis.api_paystub = TTAPI.APIPayStubEntryAccount;\n\t\tthis.include_form_setup = true;\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._( 'Form' ),\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._( 'Form' ),\n\t\t\t\t\tid: 'view_print',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\ticon: 'view-35x35.png',\n\t\t\t\t\ttype: 2\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'View: Government (Multiple Employees/Page)' ),\n\t\t\t\t\tid: 'pdf_form_government',\n\t\t\t\t\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\ticon: 'view-35x35.png',\n\t\t\t\t\ttype: 2,\n\t\t\t\t\tsort_order: 10100\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'View: Employee (One Employee/Page)' ),\n\t\t\t\t\tid: 'pdf_form',\n\t\t\t\t\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\ticon: 'view-35x35.png',\n\t\t\t\t\ttype: 2,\n\t\t\t\t\tsort_order: 10200\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'eFile' ),\n\t\t\t\t\tid: 'efile',\n\t\t\t\t\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\tsort_order: 10300\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\taction_group: 'view_form',\n\t\t\t\t\tgroup: 'form',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\tsort_order: 10400\n\t\t\t\t},\n\t\t\t]\n\t\t};\n\n\t\tif ( ( Global.getProductEdition() >= 15 ) ) {\n\t\t\tcontext_menu_model.include.push( {\n\t\t\t\tlabel: $.i18n._( 'Publish Employee Forms' ),\n\t\t\t\tid: 'pdf_form_publish_employee',\n\t\t\t\taction_group: 'view_form',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\tsort_order: 10250\n\t\t\t} );\n\t\t}\n\n\t\treturn context_menu_model;\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: 'kind_of_employer' },\n\t\t\t{ option_name: 'form_type' },\n\t\t\t{ option_name: 'auto_refresh' }\n\t\t];\n\n\t\tthis.initDropDownOptions( options, function( result ) {\n\t\t\tcallBack( result ); // First to initialize drop down options, and then to initialize edit view UI.\n\t\t} );\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'efile':\n\t\t\tcase 'pdf_form':\n\t\t\tcase 'pdf_form_government':\n\t\t\tcase 'pdf_form_publish_employee':\n\t\t\t\tthis.onReportMenuClick( id );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false; //FALSE tells onContextMenuClick() to keep processing.\n\t\t}\n\n\t\tretur