"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["employees-roe-ROEViewController"],{8967:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ROEViewController\": () => (/* binding */ ROEViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass ROEViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#roe_view_container', //Must set el here and can only set string, so events can work\n\t\t\tuser_api: null,\n\t\t\tcompany_api: null,\n\t\t\tpay_period_schedule_api: null,\n\t\t\tuser_status_array: null,\n\t\t\tstatus_array: null,\n\t\t\tcode_array: null,\n\t\t\ttype_array: null,\n\t\t\tuser_termination_status_array: null,\n\n\t\t\tuser_generic_data_api: null,\n\n\t\t\tform_setup_item: 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.permission_id = 'roe';\n\t\tthis.viewId = 'ROE';\n\t\tthis.edit_view_tpl = 'ROEEditView.html';\n\t\tthis.script_name = 'ROEView';\n\t\tthis.table_name_key = 'roe';\n\t\tthis.context_menu_name = $.i18n._( 'Record Of Employment' );\n\t\tthis.navigation_label = $.i18n._( 'Record Of Employment' );\n\t\tthis.api = TTAPI.APIROE;\n\t\tthis.report_api = TTAPI.APIROEReport;\n\t\tthis.user_api = TTAPI.APIUser;\n\t\tthis.company_api = TTAPI.APICompany;\n\t\tthis.pay_period_schedule_api = TTAPI.APIPayPeriodSchedule;\n\t\tthis.user_generic_data_api = TTAPI.APIUserGenericData;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\t\tthis.initData();\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\t\tvar options = [\n\t\t\t{ option_name: 'status', api: this.api },\n\t\t\t{ option_name: 'user_status', api: this.api },\n\t\t\t{ option_name: 'user_termination_status', api: this.api },\n\t\t\t{ option_name: 'code', api: this.api },\n\t\t\t{ option_name: 'type', field_name: 'pay_period_type_id', api: this.pay_period_schedule_api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options, () => {\n\t\t\tif ( $this.type_array ) {\n\t\t\t\t$this.type_array.shift();\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetFilterColumnsFromDisplayColumns() {\n\t\tvar column_filter = {};\n\t\tcolumn_filter.user_id = true;\n\n\t\treturn this._getFilterColumnsFromDisplayColumns( column_filter, true );\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['view'],\n\t\t\tinclude: [\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Form' ),\n\t\t\t\t\tid: 'form_header',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'form',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\tpermission_result: false // to hide it in legacy context menu and avoid errors in legacy parsers.\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'View' ),\n\t\t\t\t\tid: 'view_roe', //Don't bother with constant here, as its only used once.\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'form',\n\t\t\t\t\tshow_on_right_click: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'eFile' ),\n\t\t\t\t\tid: 'e_file',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'form',\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\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'form',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Jump To' ),\n\t\t\t\t\tid: 'jump_to_header',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\tpermission_result: false // to hide it in legacy context menu and avoid errors in legacy parsers.\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Pay Stubs' ),\n\t\t\t\t\tid: 'pay_stub',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Edit Employee' ),\n\t\t\t\t\tid: 'edit_employee',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'TimeSheet' ),\n\t\t\t\t\tid: 'timesheet',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'jump_to',\n\t\t\t\t\tgroup: 'navigation',\n\t\t\t\t\t}\n\t\t\t]\n\t\t};\n\n\t\tif ( ( Global.getProductEdition() >= 15 ) ) {\n\t\t\tvar publish = {\n\t\t\t\tlabel: $.i18n._( 'Publish' ),\n\t\t\t\tid: 'publish_roe', //Don't bother with constant here, as its only used once.\n\t\t\t\tmenu_align: 'right',\n\t\t\t\taction_group: 'form',\n\t\t\t\tsort_order: 2100\n\t\t\t};\n\n\t\t\tcontext_menu_model.include.unshift( publish );\n\t\t}\n\n\t\treturn context_menu_model;\n\t}\n\n\tsetCustomDefaultMenuIcon( id, context_btn, grid_selected_length ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'view_roe':\n\t\t\t\tthis.setDefaultMenuViewIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'publish_roe':\n\t\t\t\tthis.setDefaultMenuViewIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'print':\n\t\t\t\tthis.setDefaultMenuPrintIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'e_file':\n\t\t\t\tthis.setDefaultMenuEfileIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'save_setup':\n\t\t\t\tthis.setDefaultMenuSaveSetupIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub':\n\t\t\t\tthis.setDefaultMenuPayStubIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'edit_employee':\n\t\t\t\tthis.setDefaultMenuEditEmployeeIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'timesheet':\n\t\t\t\tthis.setDefaultMenuTimesheetIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetDefaultMenuPrintIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( grid_selected_length > 0 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuEfileIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( grid_selected_length > 0 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuSaveSetupIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t}\n\n\tsetDefaultMenuPayStubIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( !PermissionManager.checkTopLevelPermission( 'PayStub' ) ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t}\n\n\t\tif ( grid_selected_length === 1 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuEditEmployeeIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( !this.editPermissionValidate( 'user' ) ) {\n\t\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false )\n\t\t}\n\n\t\tif ( grid_selected_length === 1 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuTimesheetIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( grid_selected_length === 1 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuViewIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( grid_selected_length > 0 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditRoeViewIcon( context_btn, grid_selected_length, pId ) {\n\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t}\n\n\tsetEditMenuPublishIcon( context_btn, grid_selected_length, pId ) {\n\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t}\n\n\tsetCustomEditMenuIcon( id, context_btn ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'view_roe':\n\t\t\t\tthis.setEditMenuViewIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase 'publish_roe':\n\t\t\t\tthis.setEditMenuPublishIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase 'print':\n\t\t\t\tthis.setEditMenuPrintIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase 'e_file':\n\t\t\t\tthis.setEditMenuEfileIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase 'save_setup':\n\t\t\t\tthis.setEditMenuSaveSetupIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub':\n\t\t\t\tthis.setEditMenuPayStubIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase 'edit_employee':\n\t\t\t\tthis.setEditMenuEditEmployeeIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase 'timesheet':\n\t\t\t\tthis.setEditMenuTimeSheetIcon( context_btn );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetEditMenuPrintIcon( context_btn, pId ) {\n\n\t\tif ( !this.current_edit_record || !this.current_edit_record.id ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuEfileIcon( context_btn, pId ) {\n\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\tContextMenuManager.hideMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t}\n\n\tsetEditMenuSaveSetupIcon( context_btn, pId ) {\n\n//\t\tif ( !this.current_edit_record || !this.current_edit_record.id ) {\n//\t\t\tcontext_btn.addClass( 'disable-image' );\n//\t\t}\n\t}\n\n\tsetEditMenuPayStubIcon( context_btn, pId ) {\n\n\t\tif ( !this.current_edit_record || !this.current_edit_record.id ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuEditEmployeeIcon( context_btn, pId ) {\n\n\t\tif ( !this.current_edit_record || !this.current_edit_record.id ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuTimeSheetIcon( context_btn, pId ) {\n\n\t\tif ( !this.current_edit_record || !this.current_edit_record.id ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tbuildSearchFields() {\n\t\tsuper.buildSearchFields();\n\t\tvar default_args = { permission_section: 'roe' };\n\t\tthis.search_fields = [\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Employee' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'user_id',\n\t\t\t\tdefault_args: default_args,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Status' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'status_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Reason' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'code_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Pay Period Type' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'pay_period_type_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Comments' ),\n\t\t\t\tfield: 'comments',\n\t\t\t\tbasic_search: true,\n\t\t\t\tin_column: 1,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'First Name' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'first_name',\n\t\t\t\tbasic_search: true,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Last Name' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'last_name',\n\t\t\t\tbasic_search: true,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Created By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'created_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tscript_name: 'EmployeeView',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Updated By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'updated_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tscript_name: 'EmployeeView',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} )\n\n\t\t];\n\t}\n\n\tsearch( set_default_menu, page_action, page_number, callBack ) {\n\t\tif ( !this.form_setup_item ) {\n\t\t\tthis.initFormSetup( () => {\n\t\t\t\tsuper.search( set_default_menu, page_action, page_number, callBack );\n\t\t\t} );\n\t\t} else {\n\t\t\tsuper.search( set_default_menu, page_action, page_number, callBack );\n\t\t}\n\t}\n\n\tsetCurrentEditRecordData() {\n\n\t\t//Set current edit record data to all widgets\n\t\tfor ( var key in this.current_edit_record ) {\n\n\t\t\tif ( !this.current_edit_record.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar widget = this.edit_view_ui_dic[key];\n\t\t\tif ( Global.isSet( widget ) ) {\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'country': //popular case\n\t\t\t\t\t\tthis.setCountryValue( widget, key );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tthis.setFormSetupData();\n\t\tthis.collectUIDataToCurrentEditRecord();\n\t\tthis.setEditViewDataDone();\n\t}\n\n\tbuildEditViewUI() {\n\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_roe': {\n\t\t\t\t'label': $.i18n._( 'ROE' )\n\t\t\t},\n\t\t\t'tab_form_setup': { 'label': $.i18n._( 'Form Setup' ), 'on_exit_callback': 'checkFormSetupSaved' },\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIROE,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_roe',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\t//Tab 0 start\n\n\t\tvar tab_roe = this.edit_view_tab.find( '#tab_roe' );\n\t\tvar tab_form_setup = this.edit_view_tab.find( '#tab_form_setup' );\n\n\t\tvar tab_roe_column1 = tab_roe.find( '.first-column' );\n\t\tvar tab_form_setup_column1 = tab_form_setup.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\t\tthis.edit_view_tabs[1] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_roe_column1 );\n\t\tthis.edit_view_tabs[1].push( tab_form_setup_column1 );\n\n\t\tvar form_item_input;\n\t\tvar widgetContainer;\n\t\tvar label;\n\n\t\t// Employee\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIUser,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_user',\n\t\t\tfield: 'user_id',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true\n\t\t} );\n\n\t\tvar default_args = {};\n\t\tdefault_args.permission_section = 'roe';\n\t\tform_item_input.setDefaultArgs( default_args );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Employee' ), form_item_input, tab_roe_column1, '' );\n\n\t\t// Status\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'status_id' } );\n\t\tform_item_input.setSourceData( $this.user_status_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Status' ), form_item_input, tab_roe_column1 );\n\n\t\t// Reason\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'code_id' } );\n\t\tform_item_input.setSourceData( $this.code_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Reason' ), form_item_input, tab_roe_column1 );\n\n\t\t// Pay Period Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'pay_period_type_id' } );\n\t\tform_item_input.setSourceData( $this.type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Pay Period Type' ), form_item_input, tab_roe_column1 );\n\n\t\t// First Day Worked\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'first_date' } );\n\t\twidgetContainer = $( '
' );\n\t\tlabel = $( ' ' + '(' + $.i18n._( 'Or first day since last ROE' ) + ')' + '' );\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'First Day Worked' ), form_item_input, tab_roe_column1, '', widgetContainer );\n\n\t\t// Last Day For Which Paid\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'last_date' } );\n\t\twidgetContainer = $( '
' );\n\t\tlabel = $( ' ' + '(' + $.i18n._( 'Last day worked or received insurable earnings' ) + ')' + '' );\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Last Day For Which Paid' ), form_item_input, tab_roe_column1, '', widgetContainer );\n\n\t\t//Final Pay Period Ending Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'pay_period_end_date' } );\n\t\twidgetContainer = $( '
' );\n\t\tlabel = $( ' ' + '(' + $.i18n._( 'Pay period end date after Last Day For Which Paid' ) + ')' + '' );\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Final Pay Period Ending Date' ), form_item_input, tab_roe_column1, '', widgetContainer );\n\n\t\t// Expected Date of Recall\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'recall_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Expected Date of Recall' ), form_item_input, tab_roe_column1 );\n\n\t\t// Serial No\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'serial', width: 100 } );\n\t\twidgetContainer = $( '
' );\n\t\tlabel = $( ' ' + '(' + $.i18n._( 'Optional' ) + ')' + '' );\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Serial No' ), form_item_input, tab_roe_column1, '', widgetContainer );\n\n\t\t// Comments\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'comments', width: 400 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Comments' ), form_item_input, tab_roe_column1 );\n\n\t\t// Release All Accruals\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'release_accruals' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Release All Accruals' ), form_item_input, tab_roe_column1 );\n\n\t\t// Generate Final Pay Stub\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'generate_pay_stub' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Generate Final Pay Stub' ), form_item_input, tab_roe_column1, '' );\n\n\t\t// Set User Termination Status\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'user_termination_status_id' } );\n\t\tform_item_input.setSourceData( $this.user_termination_status_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Change Employee Status To' ), form_item_input, tab_roe_column1 );\n\n\t\t//Final Pay Stub End Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'final_pay_stub_end_date' } );\n\t\twidgetContainer = $( '
' );\n\t\tlabel = $( ' ' + '(' + $.i18n._( 'May be after Final Pay Period Ending Date if vacation/severence is paid separately' ) + ')' + '' );\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Final Pay Stub End Date' ), form_item_input, tab_roe_column1, '', widgetContainer );\n\n\t\t//Final Pay Stub Transaction Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'final_pay_stub_transaction_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Final Pay Stub Transaction Date' ), form_item_input, tab_roe_column1 );\n\n\t\t// Insurable Absence Policies\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIAbsencePolicy,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: 'global_absences',\n\t\t\tfield: 'absence_policy_ids',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true\n\t\t} );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Insurable Absence Policies' ), form_item_input, tab_form_setup_column1, '' );\n\n\t\tvar args = {};\n\t\targs.filter_data = {};\n\t\targs.filter_data.type_id = [10, 30, 40, 80];\n\t\targs.filter_data.status_id = 10;\n\n\t\t// Insurable Earnings (Box 15B)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\tfield: 'insurable_earnings_psea_ids',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true\n\t\t} );\n\n\t\tform_item_input.setDefaultArgs( args );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Insurable Earnings (Box 15B)' ), form_item_input, tab_form_setup_column1, '' );\n\n\t\t// Vacation Pay (Box 17A)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\tfield: 'vacation_psea_ids',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true\n\t\t} );\n\n\t\tform_item_input.setDefaultArgs( args );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Vacation Pay (Box 17A)' ), form_item_input, tab_form_setup_column1, '' );\n\n\t\t// Other Monies (Box 17C)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\tfield: 'other_psea_ids',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true\n\t\t} );\n\n\t\tform_item_input.setDefaultArgs( args );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Other Monies (Box 17C)' ), form_item_input, tab_form_setup_column1, '' );\n\n\t\t//Date all employees were issues ROEs from a previous payroll system.\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'min_first_date' } );\n\t\twidgetContainer = $( '
' );\n\t\tlabel = $( ' ' + '(' + $.i18n._( 'Date all employees were issued an ROE' ) + ')' + '' );\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( label );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Earliest First Day Since Last ROE' ), form_item_input, tab_form_setup_column1, '', widgetContainer );\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'download':\n\t\t\t\tthis.onDownloadClick();\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub':\n\t\t\tcase 'edit_employee':\n\t\t\tcase 'timesheet':\n\t\t\tcase 'view_roe':\n\t\t\tcase 'print':\n\t\t\tcase 'e_file':\n\t\t\tcase 'publish_roe':\n\t\t\tcase 'export_excel':\n\t\t\t\tthis.onNavigationClick( id );\n\t\t\t\tbreak;\n\t\t\tcase 'save_setup':\n\t\t\t\tthis.onSaveSetup();\n\t\t}\n\t}\n\n\tinitFormSetup( callBack ) {\n\t\tvar args = {};\n\t\tvar $this = this;\n\t\targs.filter_data = {};\n\t\targs.filter_data.script = 'roe';\n\t\targs.filter_data.user_id = TTUUID.zero_id;\n\t\targs.filter_data.is_default = true;\n\n\t\tthis.user_generic_data_api.getUserGenericData( args, {\n\t\t\tonResult: function( result ) {\n\n\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\tif ( result_data && result_data.length > 0 ) {\n\t\t\t\t\t$this.form_setup_item = result_data[0];\n\t\t\t\t} else {\n\t\t\t\t\t$this.form_setup_item = {};\n\t\t\t\t}\n\n\t\t\t\tif ( callBack ) {\n\t\t\t\t\tcallBack();\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tsetFormSetupData() {\n\t\tif ( this.form_setup_item.data ) {\n\t\t\tthis.edit_view_ui_dic.absence_policy_ids.setValue( this.form_setup_item.data.absence_policy_ids );\n\t\t\tthis.edit_view_ui_dic.insurable_earnings_psea_ids.setValue( this.form_setup_item.data.insurable_earnings_psea_ids );\n\t\t\tthis.edit_view_ui_dic.vacation_psea_ids.setValue( this.form_setup_item.data.vacation_psea_ids );\n\t\t\tthis.edit_view_ui_dic.other_psea_ids.setValue( this.form_setup_item.data.other_psea_ids );\n\t\t\tthis.edit_view_ui_dic.min_first_date.setValue( this.form_setup_item.data.min_first_date );\n\t\t}\n\t}\n\n\tgetFormSetupData( form_item ) {\n\n\t\t//Error: TypeError: form_item is undefined in /interface/html5/framework/jquery.min.js?v=8.0.0-20141117-091433 line 2 > eval line 1015\n\t\tif ( !form_item ) {\n\t\t\tform_item = {};\n\t\t}\n\n\t\tform_item.form = {};\n\n\t\tform_item.form.absence_policy_ids = this.edit_view_ui_dic.absence_policy_ids.getValue();\n\t\tform_item.form.insurable_earnings_psea_ids = this.edit_view_ui_dic.insurable_earnings_psea_ids.getValue();\n\t\tform_item.form.vacation_psea_ids = this.edit_view_ui_dic.vacation_psea_ids.getValue();\n\t\tform_item.form.other_psea_ids = this.edit_view_ui_dic.other_psea_ids.getValue();\n\t\tform_item.form.min_first_date = this.edit_view_ui_dic.min_first_date.getValue();\n\n\t\treturn form_item;\n\t}\n\n\tonSaveSetup() {\n\t\tvar $this = this;\n\t\tvar form_setup = this.form_setup_item;\n\n\t\tform_setup.user_id = TTUUID.zero_id;\n\t\tform_setup.is_default = true;\n\n\t\tif ( !form_setup.id ) {\n\t\t\tform_setup.script = 'roe';\n\t\t\tform_setup.name = 'form';\n\t\t}\n\n\t\tform_setup.data = this.getFormSetupData( {} ).form;\n\n\t\t$this.form_setup_item = form_setup;\n\t\tthis.user_generic_data_api.setUserGenericData( form_setup, {\n\t\t\tonResult: function( result ) {\n\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\tif ( typeof $this.form_setup_item.id == 'undefined' && TTUUID.isUUID( result.getResult() ) ) {\n\t\t\t\t\t\t$this.form_setup_item.id = result.getResult();\n\t\t\t\t\t}\n\t\t\t\t\tTAlertManager.showAlert( $.i18n._( 'Form Setup has been saved successfully' ) );\n\t\t\t\t} else {\n\t\t\t\t\tTAlertManager.showAlert( $.i18n._( 'Form Setup save failed, Please try again' ) );\n\t\t\t\t}\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tonNavigationClick( iconName ) {\n\n\t\tvar $this = this;\n\n\t\tvar grid_selected_id_array;\n\n\t\tvar filter = {};\n\n\t\tvar user_ids = [];\n\n\t\tvar ids = [];\n\n\t\tvar base_date;\n\n\t\tif ( $this.edit_view && $this.current_edit_record.id ) {\n\t\t\tuser_ids.push( $this.current_edit_record.user_id );\n\t\t\tbase_date = $this.current_edit_record.last_date;\n\t\t\tids.push( $this.current_edit_record.id );\n\t\t} else {\n\t\t\tgrid_selected_id_array = this.getGridSelectIdArray();\n\t\t\t$.each( grid_selected_id_array, function( index, value ) {\n\t\t\t\tvar grid_selected_row = $this.getRecordFromGridById( value );\n\t\t\t\tuser_ids.push( grid_selected_row.user_id );\n\t\t\t\tbase_date = grid_selected_row.last_date;\n\t\t\t\tids.push( grid_selected_row.id );\n\t\t\t} );\n\t\t}\n\n\t\tvar args = { roe_id: ids };\n\n\t\tif ( !$this.edit_view ) {\n\t\t\tif ( this.form_setup_item.data ) {\n\t\t\t\targs.form = this.form_setup_item.data;\n\t\t\t}\n\t\t} else {\n\t\t\targs.form = this.getFormSetupData( this.current_edit_record ).form;\n\t\t}\n\n\t\tvar post_data;\n\n\t\tswitch ( iconName ) {\n\t\t\tcase 'edit_employee':\n\t\t\t\tif ( user_ids.length > 0 ) {\n\t\t\t\t\tIndexViewController.openEditView( this, 'Employee', user_ids[0] );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub':\n\t\t\t\tif ( user_ids.length > 0 ) {\n\t\t\t\t\tfilter.filter_data = {};\n\t\t\t\t\tfilter.filter_data.user_id = user_ids[0];\n\t\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Record of Employment' ), window.location.href );\n\t\t\t\t\tIndexViewController.goToView( 'PayStub', filter );\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'timesheet':\n\t\t\t\tif ( user_ids.length > 0 ) {\n\t\t\t\t\tfilter.user_id = user_ids[0];\n\t\t\t\t\tfilter.base_date = base_date;\n\t\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Record of Employment' ), window.location.href );\n\t\t\t\t\tIndexViewController.goToView( 'TimeSheet', filter );\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'view_roe':\n\t\t\t\tpost_data = { 0: args, 1: 'pdf_form' };\n\t\t\t\tthis.doFormIFrameCall( post_data );\n\t\t\t\tbreak;\n\t\t\tcase 'publish_roe':\n\t\t\t\tthis.report_api.getROEReport( args, 'pdf_form_publish_employee', {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\t\t\tvar retval = result.getResult();\n\t\t\t\t\t\t\tif ( retval ) {\n\t\t\t\t\t\t\t\tUserGenericStatusWindowController.open( retval, LocalCacheData.getLoginUser().id );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTAlertManager.showErrorAlert( result );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\tcase 'print':\n\t\t\t\tpost_data = { 0: args, 1: 'pdf_form_print' };\n\t\t\t\tthis.doFormIFrameCall( post_data );\n\t\t\t\tbreak;\n\t\t\tcase 'e_file':\n\t\t\t\tpost_data = { 0: args, 1: 'efile_xml' };\n\t\t\t\tthis.doFormIFrameCall( post_data );\n\n\t\t\t\t//Refresh grid within 5 seconds, hopefully the file has been downloaded by then.\n\t\t\t\t$this = this;\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t$this.search();\n\t\t\t\t}, 5000 );\n\t\t\t\tbreak;\n\t\t\tcase 'export_excel':\n\t\t\t\tthis.onExportClick( 'export' + this.api.key_name );\n\t\t\t\tbreak;\n\n\t\t}\n\t}\n\n\tdoFormIFrameCall( postData ) {\n\t\tGlobal.APIFileDownload( 'APIROEReport', 'getROEReport', postData );\n\t}\n\n\tonSaveResult( result ) {\n\t\tsuper.onSaveResult( result );\n\t\tif ( result.isValid() ) {\n\t\t\tthis.showStatusReport( result, this.refresh_id );\n\t\t}\n\t}\n\n\tonSaveAndNewResult( result ) {\n\t\tsuper.onSaveAndNewResult( result );\n\t\tif ( result.isValid() ) {\n\t\t\tthis.showStatusReport( result, this.refresh_id );\n\t\t}\n\t}\n\n\tonSaveAndContinueResult( result ) {\n\t\tsuper.onSaveAndContinueResult( result );\n\t\tif ( result.isValid() ) {\n\t\t\tthis.showStatusReport( result, this.refresh_id );\n\t\t}\n\t}\n\n\tonSaveAndNextResult( result ) {\n\t\tsuper.onSaveAndNextResult( result );\n\t\tif ( result.isValid() ) {\n\t\t\tthis.showStatusReport( result, this.refresh_id );\n\t\t}\n\t}\n\n\tonSaveAndCopyResult( result ) {\n\t\tsuper.onSaveAndCopyResult( result );\n\t\tif ( result.isValid() ) {\n\t\t\tthis.showStatusReport( result, this.refresh_id );\n\t\t}\n\t}\n\n\tshowStatusReport( result, id ) {\n\t\tvar user_ids = id;\n\t\tvar user_generic_status_batch_id = result.getAttributeInAPIDetails( 'user_generic_status_batch_id' );\n\t\tif ( user_generic_status_batch_id && TTUUID.isUUID( user_generic_status_batch_id ) && user_generic_status_batch_id != TTUUID.zero_id && user_generic_status_batch_id != TTUUID.not_exist_id ) {\n\t\t\tUserGenericStatusWindowController.open( user_generic_status_batch_id, user_ids );\n\t\t}\n\t}\n\n\t/**\n\t * Originally copied from same function name in ReportBaseViewController\n\t * FIXME: refactor to base class when needed in other children\n\t * @param label\n\t */\n\tcheckFormSetupSaved( label ) {\n\t\tvar $this = this;\n\n\t\tlabel = $.i18n._( 'Form Setup' );\n\n\t\tif ( this.form_setup_changed ) {\n\t\t\t$this.form_setup_changed = false;\n\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'You have modified' ) + ' ' + label + ' ' + $.i18n._( 'data without saving, would you like to save your data now?' ), '', function( flag ) {\n\t\t\t\tif ( flag ) {\n\t\t\t\t\t$this.onSaveSetup( label );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\t\tif ( this.getEditViewTabIndex() == 1 ) {\n\t\t\tthis.form_setup_changed = true;\n\t\t}\n\n\t\tvar $this = this;\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\t\tvar key = target.getField();\n\t\tvar c_value = target.getValue();\n\t\tswitch ( key ) {\n\t\t\tcase 'user_id':\n\t\t\t\tthis.api['get' + this.api.key_name + 'DefaultData']( c_value, {\n\t\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t\tvar result = res.getResult();\n\t\t\t\t\t\t$this.edit_view_ui_dic['first_date'].setValue( result.first_date );\n\t\t\t\t\t\t$this.edit_view_ui_dic['last_date'].setValue( result.last_date );\n\t\t\t\t\t\t$this.edit_view_ui_dic['pay_period_end_date'].setValue( result.pay_period_end_date );\n\t\t\t\t\t\t$this.edit_view_ui_dic['final_pay_stub_end_date'].setValue( result.final_pay_stub_end_date );\n\t\t\t\t\t\t$this.edit_view_ui_dic['final_pay_stub_transaction_date'].setValue( result.final_pay_stub_transaction_date );\n\t\t\t\t\t\t$this.edit_view_ui_dic['pay_period_type_id'].setValue( result.pay_period_type_id );\n\t\t\t\t\t\t$this.edit_view_ui_dic['release_accruals'].setValue( result.release_accruals );\n\t\t\t\t\t\t$this.edit_view_ui_dic['generate_pay_stub'].setValue( result.generate_pay_stub );\n\n\t\t\t\t\t\t$this.current_edit_record.first_date = result.first_date;\n\t\t\t\t\t\t$this.current_edit_record.last_date = result.last_date;\n\t\t\t\t\t\t$this.current_edit_record.pay_period_end_date = result.pay_period_end_date;\n\t\t\t\t\t\t$this.current_edit_record.final_pay_stub_end_date = result.final_pay_stub_end_date;\n\t\t\t\t\t\t$this.current_edit_record.final_pay_stub_transaction_date = result.final_pay_stub_transaction_date;\n\t\t\t\t\t\t$this.current_edit_record.pay_period_type_id = result.pay_period_type_id;\n\t\t\t\t\t\t$this.current_edit_record.release_accruals = result.release_accruals;\n\t\t\t\t\t\t$this.current_edit_record.generate_pay_stub = result.generate_pay_stub;\n\t\t\t\t\t\t$this.current_edit_record[key] = c_value;\n\t\t\t\t\t\tif ( !doNotValidate ) {\n\t\t\t\t\t\t\t$this.validate();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.current_edit_record[key] = c_value;\n\t\t\t\tif ( !doNotValidate ) {\n\t\t\t\t\tthis.validate();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tuniformVariable( records ) {\n\n\t\trecords.form = this.getFormSetupData( records ).form;\n\n\t\treturn records;\n\t}\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODk2Ny5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7OztBQUdBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwyQkFBMkIsQ0FBQztBQUM1QiwwQkFBMEIsQ0FBQztBQUMzQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsS0FBSyxzQ0FBc0M7QUFDM0MsS0FBSywyQ0FBMkM7QUFDaEQsS0FBSyx1REFBdUQ7QUFDNUQsS0FBSyxvQ0FBb0M7QUFDekMsS0FBSywwRkFBMEY7QUFDL0Y7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJO0FBQ0o7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVksQ0FBQztBQUNiO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQSxZQUFZLENBQUM7QUFDYjtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBLFlBQVksQ0FBQztBQU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