"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["invoice-client_contact-ClientContactViewController"],{7397:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ClientContactViewController\": () => (/* binding */ ClientContactViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass ClientContactViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#client_contact_view_container',\n\n\t\t\tstatus_array: null,\n\t\t\ttype_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\n\t\t\te_province_array: null,\n\n\t\t\tdistrict_array: null,\n\n\t\t\tcompany_api: null,\n\t\t\tarea_policy_api: null,\n\t\t\tsub_document_view_controller: null,\n\t\t\tdocument_object_type_id: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'ClientContactEditView.html';\n\t\tthis.permission_id = 'client';\n\t\tthis.viewId = 'ClientContact';\n\t\tthis.script_name = 'ClientContactView';\n\t\tthis.table_name_key = 'client_contact';\n\t\tthis.document_object_type_id = 85;\n\t\tthis.context_menu_name = $.i18n._( 'Client Contacts' );\n\t\tthis.navigation_label = $.i18n._( 'Client Contact' );\n\t\tthis.api = TTAPI.APIClientContact;\n\t\tthis.company_api = TTAPI.APICompany;\n\t\tthis.area_policy_api = TTAPI.APIAreaPolicy;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tif ( !this.sub_view_mode ) {\n\t\t\tthis.initData();\n\t\t}\n\t}\n\n\tinitOptions() {\n\t\tvar options = [\n\t\t\t{ option_name: 'status', api: this.api },\n\t\t\t{ option_name: 'type', api: this.api },\n\t\t\t{ option_name: 'country', field_name: 'country', api: this.company_api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options );\n\t}\n\n\tgetFilterColumnsFromDisplayColumns() {\n\t\tvar column_filter = {};\n\t\tcolumn_filter.client_id = true;\n\t\tthis._getFilterColumnsFromDisplayColumns( column_filter, true );\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: [], //This is modified below.\n\t\t\tinclude: [\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Map' ),\n\t\t\t\t\tid: 'map',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\tgroup: 'other',\n\t\t\t\t\tvue_icon: 'tticon tticon-map_black_24dp',\n\t\t\t\t\tsort_order: 8000,\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\n\t\tif ( this.sub_view_mode ) {\n\t\t\tcontext_menu_model.exclude.push( 'export_excel' ); //Hide Export icon.\n\t\t} else {\n\t\t\tcontext_menu_model.include.push(\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\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Edit Client' ),\n\t\t\t\t\tid: 'edit_client',\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\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Invoices' ),\n\t\t\t\t\tid: 'invoice',\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\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Transactions' ),\n\t\t\t\t\tid: 'transaction',\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\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Payment Methods' ),\n\t\t\t\t\tid: 'payment_method',\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\tsort_order: 9050,\n\t\t\t\t},\n\t\t\t\t'export_excel'\n\t\t\t);\n\t\t}\n\n\t\tcontext_menu_model.include.push(\n\t\t\t{\n\t\t\t\tlabel: '', //Empty label. vue_icon is displayed instead of text.\n\t\t\t\tid: 'other_header',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\taction_group: 'other',\n\t\t\t\taction_group_header: true,\n\t\t\t\tvue_icon: 'tticon tticon-more_vert_black_24dp',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: $.i18n._( 'Add Company' ),\n\t\t\t\tid: 'add_company',\n\t\t\t\tmenu_align: 'right',\n\t\t\t\taction_group: 'other'\n\t\t\t},\n\t\t)\n\n\t\treturn context_menu_model;\n\t}\n\n\tsetDefaultMenuAddCompanyIcon( context_btn, grid_selected_length ) {\n\n\t\tif ( !PermissionManager.validate( 'company', 'enabled' ) || !PermissionManager.validate( 'company', 'add' ) ) {\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\tsetCustomDefaultMenuIcon( id, context_btn, grid_selected_length ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'edit_client':\n\t\t\t\tthis.setDefaultMenuEditClientIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'add_company':\n\t\t\t\tthis.setDefaultMenuAddCompanyIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetCustomEditMenuIcon( id, context_btn ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'edit_client':\n\t\t\t\tthis.setEditMenuEditClientIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase 'add_company':\n\t\t\t\tthis.setEditMenuAddCompanyIcon( context_btn );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetEditMenuAddCompanyIcon( 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, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuEditClientIcon( context_btn, pId ) {\n\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\n\t\tif ( this.is_mass_editing ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuEditClientIcon( context_btn, grid_selected_length, pId ) {\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\tonMapClick() {\n\t\t// only trigger map load in specific product editions.\n\t\tif ( ( Global.getProductEdition() >= 15 ) ) {\n\t\t\tthis.is_viewing = false;\n\t\t\tProgressBar.showProgressBar();\n\t\t\tvar data = {\n\t\t\t\tfilter_columns: {\n\t\t\t\t\tid: true,\n\t\t\t\t\tclient: true,\n\t\t\t\t\tfirst_name: true,\n\t\t\t\t\tlast_name: true,\n\t\t\t\t\ttype: true,\n\t\t\t\t\taddress1: true,\n\t\t\t\t\taddress2: true,\n\t\t\t\t\tcity: true,\n\t\t\t\t\tprovince: true,\n\t\t\t\t\tcountry: true,\n\t\t\t\t\tpostal_code: true,\n\t\t\t\t\tlatitude: true,\n\t\t\t\t\tlongitude: true\n\t\t\t\t}\n\t\t\t};\n\t\t\tvar ids = this.getGridSelectIdArray();\n\t\t\tdata.filter_data = Global.convertLayoutFilterToAPIFilter( this.select_layout );\n\t\t\tif ( ids.length > 0 ) {\n\t\t\t\tdata.filter_data.id = ids;\n\t\t\t}\n\t\t\tvar cells = this.api.getClientContact( data, { async: false } ).getResult();\n\t\t\tif ( !this.is_mass_editing ) {\n\t\t\t\tPromise.all(/* import() | leaflet-timetrex */[__webpack_require__.e(\"vendors-node_modules_leaflet_dist_images_marker-icon-2x_png-node_modules_leaflet_dist_images_-78d511\"), __webpack_require__.e(\"interface_html5_framework_leaflet_leaflet-timetrex_js\"), __webpack_require__.e(\"leaflet-timetrex\")]).then(__webpack_require__.bind(__webpack_require__, 6889)).then(( module )=>{\n\t\t\t\t\tvar processed_data_for_map = module.TTConvertMapData.processBasicFromGenericViewController( cells );\n\t\t\t\t\tIndexViewController.openEditView( this, 'Map', processed_data_for_map );\n\t\t\t\t}).catch( Global.importErrorHandler );\n\t\t\t}\n\t\t}\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'edit_client':\n\t\t\tcase 'invoice':\n\t\t\tcase 'transaction':\n\t\t\tcase 'payment_method':\n\t\t\t\tthis.onNavigationClick( id );\n\t\t\t\tbreak;\n\t\t\tcase 'add_company':\n\t\t\t\tthis.onAddCompanyClick();\n\t\t\t\tbreak;\n\t\t\tcase 'map':\n\t\t\t\tthis.onMapClick();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonAddCompanyClick() {\n\n\t\tvar $this = this;\n\t\tvar id = '';\n\n\t\tif ( this.edit_view ) {\n\t\t\tid = this.current_edit_record.id;\n\t\t} else {\n\t\t\tid = this.getGridSelectIdArray()[0];\n\t\t}\n\n\t\tthis.api.addCompany( id, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( !result.isValid() ) {\n\t\t\t\t\tTAlertManager.showErrorAlert( result );\n\t\t\t\t} else {\n\t\t\t\t\t$this.search();\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 = { filter_data: {} };\n\n\t\tvar client_ids = [];\n\n\t\tif ( $this.edit_view && $this.current_edit_record.id ) {\n\t\t\tclient_ids.push( $this.current_edit_record.client_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\tclient_ids.push( grid_selected_row.client_id );\n\t\t\t} );\n\t\t}\n\n\t\tfilter.filter_data.client_id = client_ids;\n\n\t\tswitch ( iconName ) {\n\t\t\tcase 'edit_client':\n\t\t\t\tif ( client_ids.length > 0 ) {\n\t\t\t\t\tIndexViewController.openEditView( this, 'Client', client_ids[0] );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'invoice':\n\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Client Contacts' ), window.location.href );\n\t\t\t\tIndexViewController.goToView( 'Invoice', filter );\n\t\t\t\tbreak;\n\t\t\tcase 'transaction':\n\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Client Contacts' ), window.location.href );\n\t\t\t\tIndexViewController.goToView( 'InvoiceTransaction', filter );\n\t\t\t\tbreak;\n\t\t\tcase 'payment_method':\n\t\t\t\tGlobal.addViewTab( $this.viewId, $.i18n._( 'Client Contacts' ), window.location.href );\n\t\t\t\tIndexViewController.goToView( 'ClientPayment', filter );\n\t\t\t\tbreak;\n\n\t\t}\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_contact_information': { 'label': $.i18n._( 'Contact Information' ), 'is_multi_column': true },\n\t\t\t'tab_policy': { 'label': $.i18n._( 'Policy' ) },\n\t\t\t'tab_portal': { 'label': $.i18n._( 'Portal' ) },\n\t\t\t'tab_attachment': true,\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.APIUserTitle,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_client_contact',\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_contact_information = this.edit_view_tab.find( '#tab_contact_information' );\n\n\t\tvar tab_contact_information_column1 = tab_contact_information.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_contact_information_column1 );\n\n\t\t//Client\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIClient,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_client',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'client_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Client' ), form_item_input, tab_contact_information_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.status_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Status' ), form_item_input, tab_contact_information_column1 );\n\n\t\t// Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'type_id' } );\n\t\tform_item_input.setSourceData( $this.type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_contact_information_column1 );\n\n\t\t// Default\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'is_default' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Default' ), form_item_input, tab_contact_information_column1 );\n\n\t\t// Currency\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APICurrency,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_currency',\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'currency_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Currency' ), form_item_input, tab_contact_information_column1 );\n\n\t\t// First Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'first_name', width: 150 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'First Name' ), form_item_input, tab_contact_information_column1 );\n\n\t\t// Last Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'last_name', width: 150 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Last Name' ), form_item_input, tab_contact_information_column1 );\n\n\t\t// Address(Line 1)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'address1', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Address(Line 1)' ), form_item_input, tab_contact_information_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Address(Line 2)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'address2', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Address(Line 2)' ), form_item_input, tab_contact_information_column1 );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Address(Line 3)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'address3', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Address(Line 3)' ), form_item_input, tab_contact_information_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//Tags\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TAG_INPUT );\n\n\t\tform_item_input.TTagInput( { field: 'tag', object_type_id: 810 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Tags' ), form_item_input, tab_contact_information_column1, '', null, null, true );\n\n\t\tvar tab_contact_information_column2 = tab_contact_information.find( '.second-column' );\n\n\t\tthis.edit_view_tabs[0].push( tab_contact_information_column2 );\n\n\t\t//City\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'city', width: 150 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'City' ), form_item_input, tab_contact_information_column2, '' );\n\n\t\t//Country\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'country', set_empty: true } );\n\t\tform_item_input.setSourceData( $this.country_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Country' ), form_item_input, tab_contact_information_column2 );\n\n\t\t//Province / State\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'province' } );\n\t\tform_item_input.setSourceData( [] );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Province / State' ), form_item_input, tab_contact_information_column2 );\n\n\t\tform_item_input.change( $.proxy( function() {\n\t\t\tvar c = this.edit_view_ui_dic['country'].getValue();\n\t\t\tvar p = this.edit_view_ui_dic['province'].getValue();\n\t\t\tthis.setDistrict( c, p );\n\n\t\t}, this ) );\n\n\t\t// District\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'invoice_district_id', set_empty: true } );\n\t\tform_item_input.setSourceData( [] );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'District' ), form_item_input, tab_contact_information_column2 );\n\n\t\t// Postal / ZIP Code\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'postal_code', width: 150 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Postal/ZIP Code' ), form_item_input, tab_contact_information_column2 );\n\n\t\t//Work Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'work_phone', width: 150 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Work Phone' ), form_item_input, tab_contact_information_column2 );\n\n\t\t//Mobile Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'mobile_phone', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Mobile Phone' ), form_item_input, tab_contact_information_column2 );\n\n\t\t//Fax\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'fax_phone', width: 150 } );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Fax' ), form_item_input, tab_contact_information_column2 );\n\n\t\t// Email\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'email', width: 220 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Email' ), form_item_input, tab_contact_information_column2 );\n\n\t\t//Note\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\n\t\tform_item_input.TTextArea( { field: 'note', width: '100%' } );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Note' ), form_item_input, tab_contact_information_column2, '', null, null, true );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\tvar tab_policy = this.edit_view_tab.find( '#tab_policy' );\n\n\t\tvar tab_policy_column1 = tab_policy.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[1] = [];\n\n\t\tthis.edit_view_tabs[1].push( tab_policy_column1 );\n\n\t\t// Include Tax Policy\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APITaxPolicy,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: 'global_tax_policy',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'include_tax_policy'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Include Tax Policy' ), form_item_input, tab_policy_column1, '' );\n\n\t\t// Exclude Tax Policy\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APITaxPolicy,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: 'global_tax_policy',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'exclude_tax_policy'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Exclude Tax Policy' ), form_item_input, tab_policy_column1, '' );\n\n\t\tvar tab_portal = this.edit_view_tab.find( '#tab_portal' );\n\n\t\tvar tab_portal_column1 = tab_portal.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[2] = [];\n\n\t\tthis.edit_view_tabs[2].push( tab_portal_column1 );\n\n\t\t// User Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'user_name', width: 150 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'User Name' ), form_item_input, tab_portal_column1, '' );\n\n\t\t// Password\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'password', width: 150 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Password' ), form_item_input, tab_portal_column1 );\n\n\t\t// Password(confirm)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'password2', width: 150 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Password (Confirm)' ), form_item_input, tab_portal_column1, '' );\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\t\tthis.search_fields = [\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Client' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'client_id',\n\t\t\t\tlayout_name: 'global_client',\n\t\t\t\tapi_class: TTAPI.APIClient,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\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._( '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\tadv_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\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Type' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'type_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_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\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'First Name' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'first_name',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\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._( 'Last Name' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'last_name',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\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._( 'Tags' ),\n\t\t\t\tfield: 'tag',\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tin_column: 1,\n\t\t\t\tobject_type_id: 810,\n\t\t\t\tform_item_type: FormItemType.TAG_INPUT\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'City' ),\n\t\t\t\tfield: 'city',\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tin_column: 2,\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._( 'Country' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'country',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.COMBO_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Province/State' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'province',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_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\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Phone' ),\n\t\t\t\tfield: 'any_phone',\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tin_column: 2,\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._( 'Email' ),\n\t\t\t\tfield: 'email',\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tin_column: 2,\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._( '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: false,\n\t\t\t\tadv_search: true,\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: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} )\n\t\t];\n\t}\n\n\tsetSelectLayout() {\n\t\tif ( this.sub_view_mode ) {\n\t\t\tsuper.setSelectLayout( ['client'] );\n\t\t} else {\n\t\t\tsuper.setSelectLayout();\n\t\t}\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\t\tvar key = target.getField();\n\n\t\tthis.current_edit_record[key] = target.getValue();\n\n\t\tswitch ( key ) {\n\n\t\t\tcase 'country':\n\t\t\t\tvar widget = this.edit_view_ui_dic['province'];\n\t\t\t\twidget.setValue( null );\n\t\t\t\tbreak;\n\t\t\tcase 'province':\n\t\t\t\twidget = this.edit_view_ui_dic['invoice_district_id'];\n\t\t\t\twidget.setValue( null );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( key === 'country' ) {\n\t\t\tthis.onCountryChange();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tonGridDblClickRow() {\n\t\t//Shorten the path. it's only ever an edit click\n\t\tthis.onEditClick();\n\t}\n\n\tsetCurrentEditRecordData() {\n\n\t\t//Set current edit record data to all widgets\n\t\t//Set current edit record data to all widgets\n\t\tfor ( var key in this.current_edit_record ) {\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\tcase 'province': //popular case\n\t\t\t\t\t\tthis.setDistrict( this.current_edit_record['country'], this.current_edit_record[key] );\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\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.collectUIDataToCurrentEditRecord();\n\t\tthis.setEditViewDataDone();\n\t}\n\n\tonSetSearchFilterFinished() {\n\n\t\tif ( this.search_panel.getSelectTabIndex() === 1 ) {\n\t\t\tvar combo = this.adv_search_field_ui_dic['country'];\n\t\t\tvar select_value = combo.getValue();\n\t\t\tthis.setProvince( select_value );\n\t\t}\n\t}\n\n\tsetProvince( val, m ) {\n\t\tvar $this = this;\n\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.province_array = [];\n\t\t\tthis.adv_search_field_ui_dic['province'].setSourceData( [] );\n\t\t} else {\n\n\t\t\tthis.company_api.getOptions( 'province', val, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.province_array = Global.buildRecordArray( res );\n\t\t\t\t\t$this.adv_search_field_ui_dic['province'].setSourceData( $this.province_array );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\teSetProvince( val, refresh ) {\n\t\tvar $this = this;\n\t\tvar province_widget = $this.edit_view_ui_dic['province'];\n\n\t\tif ( !val || val === '-1' || val === '0' ) {\n\t\t\t$this.e_province_array = [];\n\t\t\tprovince_widget.setSourceData( [] );\n\t\t} else {\n\t\t\tthis.company_api.getOptions( 'province', val, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.e_province_array = Global.buildRecordArray( res );\n\t\t\t\t\tif ( refresh && $this.e_province_array.length > 0 ) {\n\t\t\t\t\t\t$this.current_edit_record.province = $this.e_province_array[0].value;\n\t\t\t\t\t\tprovince_widget.setValue( $this.current_edit_record.province );\n\t\t\t\t\t}\n\t\t\t\t\tprovince_widget.setSourceData( $this.e_province_array );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tsetDistrict( c, p ) {\n\t\tvar $this = this;\n\t\tvar district_widget = $this.edit_view_ui_dic['invoice_district_id'];\n\n\t\tif ( !Global.isSet( c ) || c === '-1' || c === '0' || !Global.isSet( p ) || p === '-1' || p === '0' ) {\n\t\t\t$this.district_array = [];\n\t\t\tdistrict_widget.setSourceData( [] );\n\t\t} else {\n\n\t\t\tthis.area_policy_api.getDistrictOptions( c, p, {\n\t\t\t\tonResult: function( res ) {\n\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tif ( !res ) {\n\t\t\t\t\t\tres = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.district_array = Global.buildRecordArray( res );\n\t\t\t\t\tdistrict_widget.setSourceData( $this.district_array );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tonBuildAdvUIFinished() {\n\n\t\tthis.adv_search_field_ui_dic['country'].change( $.proxy( function() {\n\t\t\tvar combo = this.adv_search_field_ui_dic['country'];\n\t\t\tvar selectVal = combo.getValue();\n\n\t\t\tthis.setProvince( selectVal );\n\n\t\t\tthis.adv_search_field_ui_dic['province'].setValue( null );\n\n\t\t}, this ) );\n\t}\n\n\tremoveEditView() {\n\t\tsuper.removeEditView();\n\t\tthis.sub_client_contact_view_controller = null;\n\t}\n}\n\nClientContactViewController.loadSubView = function( container, beforeViewLoadedFun, afterViewLoadedFun ) {\n\n\tGlobal.loadViewSource( 'ClientContact', 'SubClientContactView.html', function( result ) {\n\t\tvar args = {};\n\t\tvar template = _.template( result );\n\n\t\tif ( Global.isSet( beforeViewLoadedFun ) ) {\n\t\t\tbeforeViewLoadedFun();\n\t\t}\n\n\t\tif ( Global.isSet( container ) ) {\n\t\t\tcontainer.html( template( args ) );\n\t\t\tif ( Global.isSet( afterViewLoadedFun ) ) {\n\t\t\t\tafterViewLoadedFun( sub_client_contact_view_controller );\n\t\t\t}\n\t\t}\n\t} );\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzM5Ny5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUF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