"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' );\n\n\t\tvar tab3_column1 = tab3.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[3] = [];\n\n\t\tthis.edit_view_tabs[3].push( tab3_column1 );\n\n\t\t//Form setup\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'form_setup_type', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.form_setup_states_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'State' ), form_item_input, tab3_column1, '' );\n\n\t\tform_item_input.bind( 'formItemChange', function( e, target ) {\n\t\t\t$this.onFormSetupChange( target.getValue() );\n\t\t} );\n\t}\n\n\tonFormSetupChange( state ) {\n\t\tvar $this = this;\n\n\t\tthis.removeCurrentFormSetupUI();\n\t\tthis.form_setup_ui_dic = {};\n\n\t\tswitch ( state ) {\n\t\t\tcase 'IA':\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'reporting_unit_number', $.i18n._( 'Reporting Unit Number' ) );\n\t\t\t\tbreak;\n\t\t\tcase 'CA':\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'branch_code', $.i18n._( 'Branch Code' ) );\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'wage_plan_code', $.i18n._( 'Wage Plan Code' ) );\n\t\t\t\tbreak;\n\t\t\tcase 'CO':\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'branch_code', $.i18n._( 'Unit / Division / Location / Plant Code' ) );\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'is_seasonal', $.i18n._( 'Seasonal' ) );\n\t\t\t\tbreak;\n\t\t\tcase 'IN':\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'occupation_classification_code', $.i18n._( 'Occupation Classification Code' ) );\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'designation', $.i18n._( 'Designation [FT/PT/Seasonal]' ) );\n\t\t\t\tbreak;\n\t\t\tcase 'MI':\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'multi_unit_number', $.i18n._( 'Multi-Unit Number' ) );\n\t\t\t\tbreak;\n\t\t\tcase 'TX':\n\t\t\t\t$this.buildAdditionalCustomInputBox( state, 'county_code', $.i18n._( 'County Code' ) );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.edit_view_tab.find( '#tab_form_setup .first-column' ).append( '
'+ $.i18n._( 'No form setup required for this state.' ) +'
' );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Overridden to allow stateful form_setup formats. This ensures your changes are put into memory..\n\t *\n\t * @param target\n\t * @param doNotDoValidate\n\t */\n\tonFormItemChange( target, doNotValidate ) {\n\t\tif ( target && target.getField && target.getField() == 'form_setup_type' ) { // cannot read property getField of undefined\n\t\t\tvar other = {};\n\t\t\tother.form_setup_type = this.current_edit_record.form_setup_type;\n\t\t\tother[other.form_setup_type] = {};\n\n\t\t\t// this.save_form_setup_data[other.form_setup_type] = this.getFormSetupData( other );\n\t\t\tthis.form_setup_changed = true;\n\t\t\treturn; //make room for the custom event above\n\t\t}\n\t\tsuper.onFormItemChange( target, doNotValidate );\n\t}\n\n\t/**\n\t * Get the form setup data from the api\n\t * @param res_Data\n\t */\n\tsetFormSetupData( res_data ) {\n\t\tif ( !res_data ) {\n\t\t\tthis.show_empty_message = true;\n\t\t}\n\n\t\tthis.save_form_setup_data = res_data;\n\n\t\tif ( res_data.form_setup_type ) {\n\t\t\tthis.edit_view_ui_dic.form_setup_type.setValue( res_data.form_setup_type );\n\t\t\tthis.onFormSetupChange( res_data.form_setup_type );\n\t\t}\n\t}\n\n\tbuildAdditionalCustomInputBox( state, code, label ) {\n\t\tif ( !this.save_form_setup_data ) {\n\t\t\tthis.save_form_setup_data = {};\n\t\t}\n\n\t\tif ( !this.save_form_setup_data[state] ) {\n\t\t\tthis.save_form_setup_data[state] = {};\n\t\t}\n\n\t\tvar tab3 = this.edit_view_tab.find( '#tab_form_setup' );\n\t\tvar tab3_column1 = tab3.find( '.first-column' );\n\t\tthis.edit_view_tabs[3] = [];\n\t\tthis.edit_view_tabs[3].push( tab3_column1 );\n\n\t\tvar field_name = 'form_setup_' + state + '_' + code;\n\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: field_name } );\n\n\t\tvar h_box = $( '' );\n\t\tvar text_box = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\ttext_box.css( 'margin-left', '10px' );\n\t\ttext_box.TTextInput( { field: field_name + '_text' } );\n\t\th_box.append( form_item_input );\n\t\th_box.append( text_box );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( label ), [form_item_input, text_box], tab3_column1, '', h_box, true );\n\t\tthis.setWidgetVisible( [form_item_input, text_box] );\n\t\tform_item_input.bind( 'formItemChange', ( e, target ) => {\n\t\t\tif ( target.getValue() === 0 ) {\n\t\t\t\ttext_box.css( 'display', 'inline' );\n\t\t\t\ttext_box.setValue( '' );\n\t\t\t} else {\n\t\t\t\ttext_box.css( 'display', 'none' );\n\t\t\t}\n\t\t} );\n\n\t\tthis.api.getOptions( 'form_setup_state_codes', {\n\t\t\tonResult: ( result ) => {\n\n\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\tform_item_input.setSourceData( Global.buildRecordArray( result_data ) );\n\n\t\t\t\tif ( this.save_form_setup_data[state] && this.save_form_setup_data[state][code] ) {\n\t\t\t\t\tform_item_input.setValue( this.save_form_setup_data[state][code] );\n\t\t\t\t}\n\t\t\t\tform_item_input.trigger( 'formItemChange', [form_item_input, true] );\n\t\t\t}\n\t\t} );\n\n\t\tthis.form_setup_ui_dic[field_name] = this.edit_view_form_item_dic[field_name];\n\t\tdelete this.edit_view_form_item_dic[field_name];\n\n\t\tthis.editFieldResize( 3 );\n\t}\n\n\tremoveCurrentFormSetupUI() {\n\n\t\tfor ( var key in this.form_setup_ui_dic ) {\n\t\t\tvar html_item = this.form_setup_ui_dic[key];\n\t\t\thtml_item.remove();\n\t\t}\n\n\t\t$( '#no-setup-data' ).remove();\n\n\t\t//Error: Unable to get property 'find' of undefined or null reference in /interface/html5/ line 1033\n\t\tif ( !this.edit_view_tab ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar tab3 = this.edit_view_tab.find( '#tab_form_setup' );\n\t\tvar tab3_column1 = tab3.find( '.first-column' );\n\t\tvar clear_both_div = tab3_column1.find( '.clear-both-div' );\n\n\t\tclear_both_div.remove();\n\t}\n\n\t/**\n\t * Gets array of properly configured values for the form_setup setup form.\n\t *\n\t * @param field_list Array\n\t * @returns {{}|*}\n\t */\n\tgetFormSetupFieldValues( state, field_list ) {\n\t\tvar ret_arr = {};\n\n\t\tfor ( var i = 0; i < field_list.length; i++ ) {\n\t\t\tif ( this.edit_view_ui_dic['form_setup_' + state + '_' + field_list[i]] && !this.edit_view_ui_dic['form_setup_' + state + '_' + field_list[i]].getValue() ) {\n\t\t\t\tret_arr[field_list[i]] = this.edit_view_ui_dic['form_setup_' + state + '_' + field_list[i] + '_text'].getValue();\n\t\t\t\tret_arr[field_list[i] + '_value'] = this.edit_view_ui_dic['form_setup_' + state + '_' + field_list[i] + '_text'].getValue();\n\t\t\t} else {\n\t\t\t\tif ( !this.edit_view_ui_dic['form_setup_' + state + '_' + field_list[i]] ) {\n\t\t\t\t\tret_arr[field_list[i]] = '';\n\t\t\t\t} else {\n\t\t\t\t\tret_arr[field_list[i]] = this.edit_view_ui_dic['form_setup_' + state + '_' + field_list[i]].getValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret_arr;\n\t}\n\n\tgetFormData( other, for_display ) {\n\t\tif ( !other || !other.form_setup_type ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tother[other.form_setup_type] = this.getFormSetupFieldValues( other.form_setup_type, this.getFieldList( other.form_setup_type ) );\n\n\t\tif ( !this.save_form_setup_data ) {\n\t\t\tthis.save_form_setup_data = {};\n\t\t}\n\t\tthis.save_form_setup_data[other.form_setup_type] = other[other.form_setup_type];\n\t\tthis.save_form_setup_data['form_setup_type'] = other.form_setup_type;\n\n\t\tif ( for_display ) {\n\t\t\tfor ( var key in this.save_form_setup_data ) {\n\t\t\t\tif ( key !== false && typeof ( this.save_form_setup_data[key] ) !== 'string' ) {\n\t\t\t\t\tthis.save_form_setup_data[key] = this.convertFormSetupValues( this.save_form_setup_data[key] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.save_form_setup_data;\n\t}\n\n\tgetFieldList( state ) {\n\t\tvar field_list = [];\n\n\t\tswitch ( state ) {\n\t\t\tcase 'IA':\n\t\t\t\tfield_list = ['reporting_unit_number'];\n\t\t\t\tbreak;\n\t\t\tcase 'CA':\n\t\t\t\tfield_list = ['branch_code', 'wage_plan_code'];\n\t\t\t\tbreak;\n\t\t\tcase 'CO':\n\t\t\t\tfield_list = ['branch_code', 'is_seasonal'];\n\t\t\t\tbreak;\n\t\t\tcase 'IN':\n\t\t\t\tfield_list = ['occupation_classification_code', 'occupation_classification_code', 'designation'];\n\t\t\t\tbreak;\n\t\t\tcase 'MI':\n\t\t\t\tfield_list = ['multi_unit_number'];\n\t\t\t\tbreak;\n\t\t\tcase 'TX':\n\t\t\t\tfield_list = ['county_code'];\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn field_list;\n\t}\n\n\t/* jshint ignore:start */\n\tgetFormSetupData( for_view ) {\n\t\tvar other = {};\n\t\tother.form_setup_type = this.edit_view_ui_dic.form_setup_type.getValue();\n\n\t\tother[other.form_setup_type] = {};\n\n\t\tother = this.getFormData( other, true );\n\n\t\t// if ( !for_view && other.form_setup_type ) {\n\t\t// \tvar form_setup_type = other.form_setup_type;\n\t\t// \tother = other[form_setup_type];\n\t\t// \tother.form_setup_type = form_setup_type;\n\t\t// \tother[form_setup_type] = {};\n\t\t// }\n\n\t\treturn other;\n\t}\n\n\t/**\n\t * Backwards compatible function for custom data to be moved from the way the api stores it to the way the form needs it.\n\t *\n\t * the old custom field data was stored in obj[key]\n\t * new custom field data is stored in obj[key+'_value']\n\t *\n\t * ie. obj[company_code] is now obj[company_code_value]\n\t *\n\t * @param data\n\t * @returns {*}\n\t */\n\tconvertFormSetupValues( data ) {\n\t\tfor ( var api_data_key in data ) {\n\t\t\tvar form_data_key = api_data_key.substr( 0, api_data_key.indexOf( '_value' ) );\n\t\t\tif ( api_data_key.search( '_value' ) > 0 ) {\n\t\t\t\tdata[form_data_key] = data[api_data_key];\n\t\t\t}\n\t\t}\n\t\t//conversion for lower form_setup grid data from old format\n\t\tif ( data.form_setup_columns && !data.columns && data.form_setup_type != 0 && data.form_setup_columns[data.form_setup_type] ) {\n\t\t\tdata.columns = {};\n\t\t\tdata.columns = data.form_setup_columns[data.form_setup_type].columns;\n\t\t}\n\n\t\treturn data;\n\t}\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjc4Ni5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQSx3QkFBd0I7QUFDeEIsc0JBQXNCOztBQUV0QjtBQUNBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSwyQkFBMkIsQ0FBQztBQUM1QiwwQkFBMEIsQ0FBQztBQUMzQjtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxLQUFLLGlDQUFpQztBQUN0QyxLQUFLLDBCQUEwQjtBQUMvQixLQUFLLDZCQUE2Qj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