TimeTrex/interface/html5/dist/employees-employee-EmployeeViewController.bundle.js

1 line
292 KiB
JavaScript

(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["employees-employee-EmployeeViewController","filebrowser-TImage","filebrowser-TImageAdvBrowser"],{1469:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImage = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImage.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn null;\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\tthis.attr( 'src', '' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar d = new Date();\n\t\t\tthis.attr( 'src', val + '&t=' + d.getTime() );\n\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImage.defaults = {};\n\n\t$( document ).on( 'mouseover', '.file-browser img', function( e ) {\n\t\tvar $this_image_widget = $( e.target ).parents( '.file-browser' );\n\n\t\tif ( !$( '.file_browser_overlay' )[0] && $( e.target ).attr( 'enable-delete' ) == 1 ) {\n\t\t\tvar height = $( e.target ).height();\n\t\t\tvar top = ( height - 32 ) / 2;\n\t\t\tvar left = top;\n\n\t\t\tvar file_browser_overlay = $( '<div class=\"file_browser_overlay\"><img src=\"theme/default/images/delete-512.png\" style=\"position:absolute;width:32px;height:32px;top:' + top + 'px;left:' + left + 'px;\"></div>' );\n\t\t\tfile_browser_overlay.css( 'position', 'absolute' );\n\t\t\tfile_browser_overlay.css( 'top', '0px' );\n\t\t\tfile_browser_overlay.css( 'left', '0' );\n\t\t\tfile_browser_overlay.css( 'cursor', 'pointer' );\n\t\t\tfile_browser_overlay.css( 'height', height + 'px' );\n\t\t\tfile_browser_overlay.css( 'width', '100%' );\n\t\t\tfile_browser_overlay.css( 'background', 'rgba(255,255,255,0.85)' );\n\n\t\t\t$( e.target ).parents( '.file-browser' ).append( file_browser_overlay );\n\n\t\t\t$( document ).on( 'click', '.file_browser_overlay', function( e ) {\n\t\t\t\tvar img_src = $( e.target ).parent().find( 'img' ).attr( 'src' );\n\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'This will permanently delete the image. Are you sure?' ), '', function( flag ) {\n\t\t\t\t\tif ( flag ) {\n\t\t\t\t\t\tvar e = { type: 'deleteClick', message: 'Delete image clicked.', time: new Date() };\n\t\t\t\t\t\t$this_image_widget.trigger( e );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t$( document ).on( 'mouseleave', '.file-browser', function() {\n\t\t\t\t$( document ).off( 'click', '.file_browser_overlay' );\n\t\t\t\tif ( $( '.file_browser_overlay' )[0] ) {\n\t\t\t\t\tvar file_browser_overlay = $( this ).find( '.file_browser_overlay' );\n\t\t\t\t\tfile_browser_overlay.off().remove();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ2OS5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQSxnQ0FBZ0M7O0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pack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageAdvBrowser = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageAdvBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar name = 'filedata';\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\n\t\tvar callBack = null;\n\n\t\tvar enabled = true;\n\n\t\tvar image;\n\n\t\tvar result_form_data;\n\n\t\tthis.setEnable = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.children().eq( 1 );\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.hide();\n\t\t\t} else {\n\t\t\t\tbtn.show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn result_form_data;\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() + '&X-CSRF-Token=' + getCookie( 'CSRF-Token' ) );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tthis.onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\tvar $$this = this;\n\n\t\t\t$( this ).find( '#upload_image' ).text( $.i18n._( 'Upload Image' ) );\n\n\t\t\tif ( o.callBack ) {\n\t\t\t\tcallBack = o.callBack;\n\t\t\t}\n\n\t\t\tif ( o.show_browser === false ) {\n\t\t\t\t$( this ).children().eq( 1 ).hide();\n\t\t\t}\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\t$this.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tvar browser = $( this ).children().eq( 1 );\n\t\t\tbrowser.bind( 'click', function() {\n\t\t\t\tIndexViewController.openWizard( 'UserPhotoWizard', null, function( form_data ) {\n\n\t\t\t\t\tif ( callBack ) {\n\t\t\t\t\t\tcallBack( form_data );\n\t\t\t\t\t}\n\n\t\t\t\t\tresult_form_data = form_data;\n\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\timage = $( this ).children().eq( 0 );\n\t\t\timage.on( 'load', function() {\n\t\t\t\t$this.onImageLoad( this );\n\t\t\t} );\n\n\t\t\timage.hide();\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageAdvBrowser.defaults = {};\n\t$.fn.TImageAdvBrowser.html_template = `\n\t<div class=\"file-browser\">\n\t\t<img class=\"image\">\n\t\t<button id=\"upload_image\" class=\"t-button file-browser-btn\" style=\"display: block\"></button>\n\t</div>\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI0My5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs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zvcm1fZGF0YSA9IGZvcm1fZGF0YTtcblxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9ICk7XG5cblx0XHRcdGltYWdlID0gJCggdGhpcyApLmNoaWxkcmVuKCkuZXEoIDAgKTtcblx0XHRcdGltYWdlLm9uKCAnbG9hZCcsIGZ1bmN0aW9uKCkge1xuXHRcdFx0XHQkdGhpcy5vbkltYWdlTG9hZCggdGhpcyApO1xuXHRcdFx0fSApO1xuXG5cdFx0XHRpbWFnZS5oaWRlKCk7XG5cblx0XHR9ICk7XG5cblx0XHRyZXR1cm4gdGhpcztcblxuXHR9O1xuXG5cdCQuZm4uVEltYWdlQWR2QnJvd3Nlci5kZWZhdWx0cyA9IHt9O1xuXHQkLmZuLlRJbWFnZUFkdkJyb3dzZXIuaHRtbF90ZW1wbGF0ZSA9IGBcblx0PGRpdiBjbGFzcz1cImZpbGUtYnJvd3NlclwiPlxuXHRcdDxpbWcgY2xhc3M9XCJpbWFnZVwiPlxuXHRcdDxidXR0b24gaWQ9XCJ1cGxvYWRfaW1hZ2VcIiBjbGFzcz1cInQtYnV0dG9uIGZpbGUtYnJvd3Nlci1idG5cIiBzdHlsZT1cImRpc3BsYXk6IGJsb2NrXCI+PC9idXR0b24+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8243\n")},1961:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EmployeeViewController\": () => (/* binding */ EmployeeViewController)\n/* harmony export */ });\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1469);\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8243);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_1__);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\nclass EmployeeViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#employee_view_container', //Must set el here and can only set string, so events can work\n\n\t\t\t// _required_files: {\n\t\t\t// \t10: ['TImage', 'TImageAdvBrowser'],\n\t\t\t// \t15: ['leaflet', 'leaflet-timetrex'],\n\t\t\t// },\n\n\t\t\tuser_api: null,\n\t\t\tuser_group_api: null,\n\t\t\tpunch_tag_api: null,\n\t\t\tcompany_api: null,\n\t\t\thierarchyControlAPI: null,\n\t\t\tredurring_schedule_control_api: null,\n\t\t\tstatus_array: null,\n\t\t\tmfa_type_array: null,\n\t\t\tsex_array: null,\n\t\t\tuser_group_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\t\t\te_province_array: null,\n\n\t\t\tdefault_punch_tag: [],\n\t\t\tprevious_punch_tag_selection: [],\n\n\t\t\tsub_wage_view_controller: null,\n\t\t\tsub_user_contact_view_controller: null,\n\t\t\tsub_accrual_policy_user_modifier_view_controller: null,\n\t\t\tsub_log_view_controller: null,\n\t\t\tsub_company_tax_view_controller: null,\n\t\t\tsub_job_application_view_controller: null,\n\t\t\tsub_user_skill_view_controller: null,\n\t\t\tsub_user_education_view_controller: null,\n\t\t\tsub_user_membership_view_controller: null,\n\t\t\tsub_user_license_view_controller: null,\n\t\t\tsub_user_language_view_controller: null,\n\t\t\tsub_user_review_control_view_controller: null,\n\n\t\t\tsub_payment_methods_view_controller: null,\n\n\t\t\thierarchy_options_dic: null,\n\t\t\thierarchy_ui_model: null,\n\t\t\tshow_hierarchy: false,\n\t\t\tselect_company_id: null,\n\n\t\t\tsub_view_grid_autosize: true,\n\t\t\tevents: {}\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//super.initialize( options );\n\n\t\tthis.edit_view_tpl = 'EmployeeEditView.html';\n\t\tthis.permission_id = 'user';\n\t\tthis.viewId = 'Employee';\n\t\tthis.script_name = 'EmployeeView';\n\t\tthis.table_name_key = 'users';\n\t\tthis.document_object_type_id = 100;\n\t\tthis.context_menu_name = $.i18n._( 'Employees' );\n\t\tthis.navigation_label = $.i18n._( 'Employee' );\n\t\tthis.api = TTAPI.APIUser;\n\t\tthis.api_user_default = TTAPI.APIUserDefault;\n\t\tthis.select_company_id = LocalCacheData.getCurrentCompany().id;\n\n\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\tthis.job_api = TTAPI.APIJob;\n\t\t\tthis.job_item_api = TTAPI.APIJobItem;\n\t\t\tthis.punch_tag_api = TTAPI.APIPunchTag;\n\t\t}\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\t\tthis.company_api = TTAPI.APICompany;\n\t\tthis.hierarchyControlAPI = TTAPI.APIHierarchyControl;\n\t\tthis.redurring_schedule_control_api = TTAPI.APIRecurringScheduleControl;\n\t\tthis.event_bus = new TTEventBus({ view_id: this.viewId });\n\n\t\tthis.render();\n\n\t\tthis.buildContextMenu();\n\t\tthis.initData();\n\t}\n\n\tjobUIValidate() {\n\t\tif ( PermissionManager.validate( 'job', 'enabled' ) &&\n\t\t\t( PermissionManager.validate( 'job', 'view' ) ||\n\t\t\t\tPermissionManager.validate( 'job', 'view_child' ) ||\n\t\t\t\tPermissionManager.validate( 'job', 'view_own' ) ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tjobItemUIValidate() {\n\n\t\tif ( PermissionManager.validate( 'job_item', 'enabled' ) &&\n\t\t\t( PermissionManager.validate( 'job_item', 'view' ) ||\n\t\t\t\tPermissionManager.validate( 'job_item', 'view_child' ) ||\n\t\t\t\tPermissionManager.validate( 'job_item', 'view_own' ) ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpunchTagUIValidate() {\n\n\t\tif ( PermissionManager.validate( 'punch_tag', 'enabled' ) &&\n\t\t\t( PermissionManager.validate( 'punch_tag', 'view' ) ||\n\t\t\t\tPermissionManager.validate( 'punch_tag', 'view_child' ) ||\n\t\t\t\tPermissionManager.validate( 'punch_tag', 'view_own' ) ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t//Speical permission check for views, need override\n\tinitPermission() {\n\t\tsuper.initPermission();\n\n\t\tif ( this.jobUIValidate() ) {\n\t\t\tthis.show_job_ui = true;\n\t\t} else {\n\t\t\tthis.show_job_ui = false;\n\t\t}\n\n\t\tif ( this.jobItemUIValidate() ) {\n\t\t\tthis.show_job_item_ui = true;\n\t\t} else {\n\t\t\tthis.show_job_item_ui = false;\n\t\t}\n\n\t\tif ( this.punchTagUIValidate() ) {\n\t\t\tthis.show_punch_tag_ui = true;\n\t\t} else {\n\t\t\tthis.show_punch_tag_ui = false;\n\t\t}\n\t}\n\n\t// parseContextMenuEditViewAttributes() {\n\t// // Overriding BaseView. This code is an example in case the tab context menu needs to be INSIDE the tab, without a context menu for the main employee records.\n\t// \t// e.g. tab_hierarchy_content_div\n\t// \tvar active_tab_name = this.getEditViewActiveTabName();\n\t// \tif( active_tab_name !== false ) {\n\t// \t\treturn {\n\t// \t\t\tparent_mount_point: $( '#'+ active_tab_name + '_content_div' ),\n\t// \t\t\t_parent_type: 'editview_tab_contextmenu',\n\t// \t\t\t_parent_id: this.ui_id + '_' + active_tab_name\n\t// \t\t}\n\t// \t} else {\n\t// \t\treturn super.parseContextMenuEditViewAttributes();\n\t// \t}\n\t// }\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\t'exclude': ['copy'],\n\t\t\t'include': [\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\tvue_icon: 'tticon tticon-map_black_24dp',\n\t\t\t\t\tsort_order: 2000\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Import' ),\n\t\t\t\t\tid: 'import_icon',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'import_export',\n\t\t\t\t\tgroup: 'other',\n\t\t\t\t\tvue_icon: 'tticon tticon-file_download_black_24dp',\n\t\t\t\t\tpermission_result: PermissionManager.checkTopLevelPermission( 'ImportCSVEmployee' ),\n\t\t\t\t\tsort_order: 2010\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\tsort_order: 3000\n\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\tsort_order: 3010\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Schedule' ),\n\t\t\t\t\tid: 'schedule',\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: 3020\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\tsort_order: 3030\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Pay Stub Amendments' ),\n\t\t\t\t\tid: 'pay_stub_amendment',\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: 3040\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\n\t\tif ( this.edit_only_mode ) {\n\t\t\tcontext_menu_model.exclude.push(\n\t\t\t\t'timesheet',\n\t\t\t\t'schedule',\n\t\t\t\t'pay_stub',\n\t\t\t\t'pay_stub_amendment',\n\t\t\t\t'map',\n\t\t\t\t'import_icon',\n\t\t\t\t'export_excel'\n\t\t\t);\n\t\t}\n\n\t\treturn context_menu_model;\n\t}\n\n\topenEditView( id ) {\n\t\tif ( this.edit_only_mode ) {\n\n\t\t\tif ( this.parent_view_controller.viewId === 'JobApplication' && id === undefined ) {\n\t\t\t\tid = this.refresh_id;\n\t\t\t}\n\t\t\tvar $this_obj = this;\n\t\t\tthis.initOptions( function( result ) {\n\t\t\t\tif ( !$this_obj.edit_view ) {\n\t\t\t\t\t$this_obj.initEditViewUI( $this_obj.viewId, $this_obj.edit_view_tpl );\n\t\t\t\t\tvar $this = this;\n\t\t\t\t\tdoNext();\n\t\t\t\t} else {\n\t\t\t\t\tdoNext();\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t} else {\n\t\t\tif ( !this.edit_view ) {\n\t\t\t\tthis.initEditViewUI( this.viewId, this.edit_view_tpl );\n\t\t\t}\n\t\t}\n\n\t\tfunction doNext() {\n\t\t\t$this_obj.getEmployeeData( id, function( result ) {\n\t\t\t\t//Error: Uncaught TypeError: Cannot read property 'user_id' of null in interface/html5/#!m=TimeSheet&date=20150915&user_id=42175&show_wage=0 line 79\n\t\t\t\tif ( !result ) {\n\t\t\t\t\tTAlertManager.showAlert( $.i18n._( 'Record does not exist.' ) );\n\t\t\t\t\t$this_obj.onCancelClick();\n\t\t\t\t} else {\n\t\t\t\t\t// Waiting for the TTAPI.API returns data to set the current edit record.\n\t\t\t\t\t$this_obj.current_edit_record = result;\n\t\t\t\t\t$this_obj.initEditView();\n\t\t\t\t}\n\n\t\t\t\tif ( $this_obj.edit_only_mode ) {\n\t\t\t\t\t$( '.edit-view-tab-bar' ).css( 'opacity', 1 );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tsetEditViewDataDone() {\n\t\tsuper.setEditViewDataDone();\n\t}\n\n\tgetEmployeeData( id, callBack ) {\n\t\tif ( typeof id === 'object' ) {\n\n\t\t\tid.id = '';\n\t\t\tid.company = LocalCacheData.current_company.name;\n\n\t\t\tcallBack( id );\n\t\t} else {\n\t\t\tvar filter = {};\n\t\t\tfilter.filter_data = {};\n\t\t\tfilter.filter_data.id = [id];\n\n\t\t\tthis.api['get' + this.api.key_name]( filter, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\t\tif ( !result_data ) {\n\t\t\t\t\t\tresult_data = [];\n\t\t\t\t\t}\n\t\t\t\t\tresult_data = result_data[0];\n\n\t\t\t\t\tcallBack( result_data );\n\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tinitOptions( callBack ) {\n\n\t\tvar options = [\n\t\t\t{ option_name: 'status' },\n\t\t\t{ option_name: 'sex' },\n\t\t\t{ option_name: 'mfa_type' },\n\t\t\t{ option_name: 'country', field_name: 'country', api: this.company_api }\n\t\t];\n\n\t\tthis.initDropDownOptions( options, function( result ) {\n\n\t\t\tif ( callBack ) {\n\t\t\t\tcallBack( result ); // First to initialize drop down options, and then to initialize edit view UI.\n\t\t\t}\n\n\t\t} );\n\t}\n\n\tinitDropDownOptions( options, callBack ) {\n\t\tvar $this = this;\n\t\tvar len = options.length + 2; //2=Number of additional API calls performed in this function over and above options.length.\n\t\tvar complete_count = 0;\n\t\tvar option_result = [];\n\n\t\tif ( this.hierarchyPermissionValidate() ) {\n\t\t\t$this.hierarchyControlAPI.getOptions( 'object_type', {\n\t\t\t\tonResult: function( res_1 ) {\n\t\t\t\t\tvar data_1 = res_1.getResult();\n\t\t\t\t\tif ( data_1 ) {\n\t\t\t\t\t\tvar array = [];\n\n\t\t\t\t\t\tfor ( var key in data_1 ) {\n\t\t\t\t\t\t\tarray.push( { id: Global.removeSortPrefix( key ), value: data_1[key] } );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this.hierarchy_ui_model = array;\n\t\t\t\t\t}\n\n\t\t\t\t\tcomplete_count = complete_count + 1;\n\t\t\t\t\tif ( complete_count === len ) {\n\t\t\t\t\t\tcallBack( option_result );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.show_hierarchy = false;\n\t\t\tcomplete_count = complete_count + 1;\n\t\t}\n\n\t\tthis.user_group_api.getUserGroup( '', false, false, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\tres = Global.buildTreeRecord( res );\n\n\t\t\t\tif ( !$this.edit_only_mode ) {\n\t\t\t\t\tif ( !$this.sub_view_mode && $this.basic_search_field_ui_dic['group_id'] ) {\n\t\t\t\t\t\t$this.basic_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t\t\t$this.adv_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this.user_group_array = res;\n\n\t\t\t\tcomplete_count = complete_count + 1;\n\t\t\t\tif ( complete_count === len ) {\n\t\t\t\t\tcallBack( option_result );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tfor ( var i = 0; i < len - 2; i++ ) {\n\t\t\tvar option_info = options[i];\n\n\t\t\tthis.initDropDownOption( option_info.option_name, option_info.field_name, option_info.api, onGetOptionResult );\n\t\t}\n\n\t\tfunction onGetOptionResult( result ) {\n\t\t\toption_result.push( result );\n\n\t\t\tcomplete_count = complete_count + 1;\n\t\t\tif ( complete_count === len ) {\n\t\t\t\tcallBack( option_result );\n\t\t\t}\n\t\t}\n\t}\n\n\tsetCustomDefaultMenuIcon( id, context_btn, grid_selected_length ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'timesheet':\n\t\t\t\tthis.setDefaultMenuViewIcon( context_btn, grid_selected_length, 'punch' );\n\t\t\t\tbreak;\n\t\t\tcase 'schedule':\n\t\t\t\tthis.setDefaultMenuViewIcon( context_btn, grid_selected_length, 'schedule' );\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub_amendment':\n\t\t\t\tthis.setDefaultMenuViewIcon( context_btn, grid_selected_length, 'pay_stub_amendment' );\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub':\n\t\t\t\tthis.setDefaultMenuPayStubIcon( context_btn, grid_selected_length, 'pay_stub' );\n\t\t\t\tbreak;\n\t\t}\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\tinitSubQualificationView() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\t$( '#tab_qualifications .first-column-sub-view' ).css( 'opacity', '0' );\n\t\tTTPromise.add( 'Employee_Qualifications_Tab', 'initSubQualificationView' );\n\n\t\tProgressBar.showProgressBar(); // start skills\n\t\tTTPromise.add( 'Employee_Qualifications_Tab', 'UserSkillViewController' );\n\t\tGlobal.loadScript( 'views/hr/qualification/UserSkillViewController.js', function() {\n\t\t\tvar tab_qualifications = $this.edit_view_tab.find( '#tab_qualifications' );\n\t\t\tvar firstColumn = tab_qualifications.find( '.first-column-sub-view' ).find( '.first-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'UserSkill' + 'View' );\n\t\t\tUserSkillViewController.loadSubView( firstColumn, beforeLoadView, afterLoadUserSkillView );\n\n\t\t} );\n\n\t\tProgressBar.showProgressBar(); // start education\n\t\tTTPromise.add( 'Employee_Qualifications_Tab', 'UserEducationViewController' );\n\t\tGlobal.loadScript( 'views/hr/qualification/UserEducationViewController.js', function() {\n\t\t\tvar tab_qualifications = $this.edit_view_tab.find( '#tab_qualifications' );\n\t\t\tvar firstColumn = tab_qualifications.find( '.first-column-sub-view' ).find( '.second-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'UserEducation' + 'View' );\n\t\t\tUserEducationViewController.loadSubView( firstColumn, beforeLoadView, afterLoadUserEducationView );\n\n\t\t} );\n\n\t\tProgressBar.showProgressBar(); // start memberships\n\t\tTTPromise.add( 'Employee_Qualifications_Tab', 'UserMembershipViewController' );\n\t\tGlobal.loadScript( 'views/hr/qualification/UserMembershipViewController.js', function() {\n\t\t\tvar tab_qualifications = $this.edit_view_tab.find( '#tab_qualifications' );\n\t\t\tvar firstColumn = tab_qualifications.find( '.first-column-sub-view' ).find( '.third-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'UserMembership' + 'View' );\n\t\t\tUserMembershipViewController.loadSubView( firstColumn, beforeLoadView, afterLoadUserMembershipView );\n\n\t\t} );\n\n\t\tProgressBar.showProgressBar(); // start licences\n\t\tTTPromise.add( 'Employee_Qualifications_Tab', 'UserLicenseViewController' );\n\t\tGlobal.loadScript( 'views/hr/qualification/UserLicenseViewController.js', function() {\n\t\t\tvar tab_qualifications = $this.edit_view_tab.find( '#tab_qualifications' );\n\t\t\tvar firstColumn = tab_qualifications.find( '.first-column-sub-view' ).find( '.forth-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'UserLicense' + 'View' );\n\t\t\tUserLicenseViewController.loadSubView( firstColumn, beforeLoadView, afterLoadUserLicenseView );\n\n\t\t} );\n\n\t\tProgressBar.showProgressBar(); // start languages\n\t\tTTPromise.add( 'Employee_Qualifications_Tab', 'UserLanguageViewController' );\n\t\tGlobal.loadScript( 'views/hr/qualification/UserLanguageViewController.js', function() {\n\t\t\tvar tab_qualifications = $this.edit_view_tab.find( '#tab_qualifications' );\n\t\t\tvar firstColumn = tab_qualifications.find( '.first-column-sub-view' ).find( '.fifth-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'UserLanguage' + 'View' );\n\t\t\tUserLanguageViewController.loadSubView( firstColumn, beforeLoadView, afterLoadUserLanguageView );\n\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadUserSkillView( subViewController ) {\n\t\t\t$( subViewController.el ).find( '.sub-view-title' ).text( $.i18n._( 'Skills' ) );\n\t\t\t$this.sub_user_skill_view_controller = subViewController;\n\t\t\t$this.sub_user_skill_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_user_skill_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_skill_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_skill_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_user_skill_view_controller.postInit = function() {\n\t\t\t\tthis.buildContextMenu(); // To load context menu\n\t\t\t\tthis.initData();\n\t\t\t\tProgressBar.removeProgressBar(); // end skills\n\t\t\t};\n\t\t}\n\n\t\tfunction afterLoadUserLicenseView( subViewController ) {\n\t\t\t$( subViewController.el ).find( '.sub-view-title' ).text( $.i18n._( 'Licenses' ) );\n\t\t\t$this.sub_user_license_view_controller = subViewController;\n\t\t\t$this.sub_user_license_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_user_license_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_license_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_license_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_user_license_view_controller.postInit = function() {\n\t\t\t\tthis.buildContextMenu(); // To load context menu\n\t\t\t\tthis.initData();\n\t\t\t\tProgressBar.removeProgressBar(); // end licences\n\t\t\t};\n\t\t}\n\n\t\tfunction afterLoadUserLanguageView( subViewController ) {\n\t\t\t$( subViewController.el ).find( '.sub-view-title' ).text( $.i18n._( 'Languages' ) );\n\t\t\t$this.sub_user_language_view_controller = subViewController;\n\t\t\t$this.sub_user_language_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_user_language_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_language_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_language_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_user_language_view_controller.postInit = function() {\n\t\t\t\tthis.buildContextMenu(); // To load context menu\n\t\t\t\tthis.initData();\n\t\t\t\tProgressBar.removeProgressBar(); // end languages\n\t\t\t};\n\t\t}\n\n\t\tfunction afterLoadUserEducationView( subViewController ) {\n\t\t\t$( subViewController.el ).find( '.sub-view-title' ).text( $.i18n._( 'Education' ) );\n\t\t\t$this.sub_user_education_view_controller = subViewController;\n\t\t\t$this.sub_user_education_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_user_education_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_education_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_education_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_user_education_view_controller.postInit = function() {\n\t\t\t\tthis.buildContextMenu(); // To load context menu\n\t\t\t\tthis.initData();\n\t\t\t\tProgressBar.removeProgressBar(); // end education\n\t\t\t};\n\t\t}\n\n\t\tfunction afterLoadUserMembershipView( subViewController ) {\n\t\t\t$( subViewController.el ).find( '.sub-view-title' ).text( $.i18n._( 'Memberships' ) );\n\t\t\t$this.sub_user_membership_view_controller = subViewController;\n\t\t\t$this.sub_user_membership_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_user_membership_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_membership_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_membership_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_user_membership_view_controller.postInit = function() {\n\t\t\t\tthis.buildContextMenu(); // To load context menu\n\t\t\t\tthis.initData();\n\t\t\t\tProgressBar.removeProgressBar(); // end memberships\n\t\t\t};\n\t\t}\n\n\t\tTTPromise.wait( 'Employee_Qualifications_Tab', null, function() {\n\t\t\t$( '#contentContainer' ).trigger( 'resize' );\n\t\t\t$( '#tab_qualifications .first-column-sub-view' ).css( 'opacity', '1' );\n\t\t} );\n\n\t\tTTPromise.resolve( 'Employee_Qualifications_Tab', 'initSubQualificationView' );\n\t}\n\n\tinitSubCompanyTaxView() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\tTTPromise.add( 'TaxView', 'init' );\n\n\t\tif ( this.sub_company_tax_view_controller ) {\n\t\t\tthis.sub_company_tax_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_company_tax_view_controller.setDefaultMenu();\n\t\t\t$this.sub_company_tax_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_company_tax_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_company_tax_view_controller.initData();\n\t\t\treturn;\n\t\t}\n\n\t\tGlobal.loadViewSource( 'CompanyTaxDeduction', 'CompanyTaxDeductionViewController.js', function() {\n\t\t\tif ( !$this.edit_view_tab ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar tab_employee = $this.edit_view_tab.find( '#tab_tax' );\n\t\t\tvar firstColumn = tab_employee.find( '.first-column-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'UserContact' + 'View' );\n\t\t\tCompanyTaxDeductionViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadView( subViewController ) {\n\t\t\t$this.sub_company_tax_view_controller = subViewController;\n\t\t\t$this.sub_company_tax_view_controller.parent_key = 'include_user_id';\n\t\t\t$this.sub_company_tax_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_company_tax_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_company_tax_view_controller.parent_view_controller = $this;\n\t\t\tTTPromise.wait( 'BaseViewController', 'initialize', function() {\n\t\t\t\t$this.sub_company_tax_view_controller.initData();\n\t\t\t} );\n\t\t}\n\t}\n\n\tinitSubUserReviewControlView() {\n\t\t;\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\tTTPromise.add( 'ReviewView', 'init' );\n\n\t\tif ( this.sub_user_review_control_view_controller ) {\n\t\t\tthis.sub_user_review_control_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_user_review_control_view_controller.setDefaultMenu();\n\t\t\t$this.sub_user_review_control_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_user_review_control_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_review_control_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_review_control_view_controller.initData();\n\t\t\treturn;\n\t\t}\n\n\t\tGlobal.loadScript( 'views/hr/kpi/UserReviewControlViewController.js', function() {\n\t\t\tif ( !$this.edit_view_tab ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar tab_employee = $this.edit_view_tab.find( '#tab_reviews' );\n\t\t\tvar firstColumn = tab_employee.find( '.first-column-sub-view' );\n\n\t\t\tGlobal.trackView( 'Sub' + 'UserReviewControl' + 'View' );\n\t\t\tUserReviewControlViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadView( subViewController ) {\n\t\t\t$this.sub_user_review_control_view_controller = subViewController;\n\t\t\t$this.sub_user_review_control_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_user_review_control_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_review_control_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_review_control_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_user_review_control_view_controller.initData();\n\t\t}\n\t}\n\n\tinitSubPaymentMethodsView() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\tTTPromise.add( 'PaymentMethodsView', 'init' );\n\n\t\tif ( this.sub_payment_methods_view_controller ) {\n\t\t\tthis.sub_payment_methods_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_payment_methods_view_controller.setDefaultMenu();\n\t\t\t$this.sub_payment_methods_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_payment_methods_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_payment_methods_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_payment_methods_view_controller.initData();\n\t\t\treturn;\n\t\t}\n\n\t\tGlobal.loadScript( 'views/employees/remittance_destination_account/RemittanceDestinationAccountViewController.js', function() {\n\t\t\tif ( !$this.edit_view_tab ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar tab_payment_methods = $this.edit_view_tab.find( '#tab_payment_methods' );\n\t\t\tvar firstColumn = tab_payment_methods.find( '.first-column-sub-view' );\n\n\t\t\tGlobal.trackView( 'Sub' + 'RemittanceDestinationAccount' + 'View' );\n\t\t\tRemittanceDestinationAccountViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadView( subViewController ) {\n\t\t\t$this.sub_payment_methods_view_controller = subViewController;\n\t\t\t$this.sub_payment_methods_view_controller.is_subview = true;\n\t\t\t$this.sub_payment_methods_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_payment_methods_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_payment_methods_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_payment_methods_view_controller.parent_view_controller = $this;\n\t\t\tTTPromise.wait( 'BaseViewController', 'initialize', function() {\n\t\t\t\t$this.sub_payment_methods_view_controller.initData();\n\t\t\t} );\n\t\t}\n\t}\n\n\tinitSubJobApplicationView() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\tTTPromise.add( 'JobAppView', 'init' );\n\n\t\tif ( this.sub_job_application_view_controller ) {\n\t\t\tthis.sub_job_application_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_job_application_view_controller.setDefaultMenu();\n\t\t\t$this.sub_job_application_view_controller.parent_key = 'interviewer_user_id';\n\t\t\t$this.sub_job_application_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_job_application_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_job_application_view_controller.initData();\n\t\t\treturn;\n\t\t}\n\n\t\tGlobal.loadScript( 'views/hr/recruitment/JobApplicationViewController.js', function() {\n\t\t\tif ( !$this.edit_view_tab ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar tab_applications = $this.edit_view_tab.find( '#tab_applications' );\n\t\t\tvar firstColumn = tab_applications.find( '.first-column-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'JobApplication' + 'View' );\n\t\t\tJobApplicationViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadView( subViewController ) {\n\t\t\t$this.sub_job_application_view_controller = subViewController;\n\t\t\t$this.sub_job_application_view_controller.parent_key = 'interviewer_user_id';\n\t\t\t$this.sub_job_application_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_job_application_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_job_application_view_controller.parent_view_controller = $this;\n\t\t\tTTPromise.wait( 'BaseViewController', 'initialize', function() {\n\t\t\t\t$this.sub_job_application_view_controller.initData();\n\t\t\t} );\n\t\t}\n\t}\n\n\tinitSubUserContactView() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\tTTPromise.add( 'ContactView', 'init' );\n\n\t\tif ( this.sub_user_contact_view_controller ) {\n\t\t\tthis.sub_user_contact_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_user_contact_view_controller.setDefaultMenu();\n\t\t\t$this.sub_user_contact_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_contact_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_contact_view_controller.initData();\n\t\t\treturn;\n\t\t}\n\n\t\tGlobal.loadScript( 'views/employees/user_contact/UserContactViewController.js', function() {\n\t\t\tif ( !$this.edit_view_tab ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar tab_employee = $this.edit_view_tab.find( '#tab_contacts' );\n\t\t\tvar firstColumn = tab_employee.find( '.first-column-sub-view' );\n\n\t\t\tGlobal.trackView( 'Sub' + 'UserContact' + 'View' );\n\t\t\tUserContactViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadView( subViewController ) {\n\t\t\t$this.sub_user_contact_view_controller = subViewController;\n\t\t\t$this.sub_user_contact_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_user_contact_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_user_contact_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_user_contact_view_controller.parent_view_controller = $this;\n\t\t\tTTPromise.wait( 'BaseViewController', 'initialize', function() {\n\t\t\t\t$this.sub_user_contact_view_controller.initData();\n\t\t\t} );\n\t\t}\n\t}\n\n\tinitSubWageView() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\tTTPromise.add( 'WageView', 'init' );\n\n\t\tif ( this.sub_wage_view_controller ) {\n\t\t\tthis.sub_wage_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_wage_view_controller.setDefaultMenu();\n\t\t\t$this.sub_wage_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_wage_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_wage_view_controller.initData(); //Init data in this parent view\n\t\t\tTTPromise.resolve( 'WageView', 'init' );\n\t\t\treturn;\n\t\t}\n\n\t\tGlobal.loadScript( 'views/company/wage/WageViewController.js', function() {\n\t\t\tif ( !$this.edit_view_tab ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar tab_employee = $this.edit_view_tab.find( '#tab_wage' );\n\t\t\tvar firstColumn = tab_employee.find( '.first-column-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'Wage' + 'View' );\n\t\t\tWageViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadView( subViewController, firstColumn ) {\n\n\t\t\t$this.sub_wage_view_controller = subViewController;\n\t\t\t$this.sub_wage_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_wage_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_wage_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_wage_view_controller.parent_view_controller = $this;\n\t\t\tTTPromise.wait( 'BaseViewController', 'initialize', function() {\n\t\t\t\t//#2581 - $this.sub_wage_view_controller is null\n\t\t\t\tif ( $this.sub_wage_view_controller ) {\n\t\t\t\t\t$this.sub_wage_view_controller.initData(); //Init data in this parent view\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tinitSubAccrualPolicyUserModifier() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\tthis.edit_view.find( '.permission-defined-div' ).css( 'display', 'none' ); // Fixes issue with this div overlapping with save and continue. This div does not need to be shown until employee is saved.\n\t\t\treturn;\n\t\t}\n\n\t\tTTPromise.add( 'AccrualView', 'init' );\n\n\t\tif ( this.sub_accrual_policy_user_modifier_view_controller ) {\n\t\t\tthis.sub_accrual_policy_user_modifier_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_accrual_policy_user_modifier_view_controller.setDefaultMenu();\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.initData(); //Init data in this parent view\n\t\t\treturn;\n\t\t}\n\n\t\tif ( Global.getProductEdition() >= 15 ) {\n\t\t\tthis.edit_view.find( '.permission-defined-div' ).css( 'display', 'none' );\n\n\t\t\tGlobal.loadScript( 'views/policy/accrual_policy/AccrualPolicyUserModifierViewController.js', function() {\n\t\t\t\tif ( !$this.edit_view_tab ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar tab_employee = $this.edit_view_tab.find( '#tab_accruals' );\n\n\t\t\t\tvar firstColumn = tab_employee.find( '.first-column-sub-view' );\n\n\t\t\t\tGlobal.trackView( 'Sub' + 'AccrualPolicyUserModifier' + 'View' );\n\t\t\t\tAccrualPolicyUserModifierViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.edit_view_tab.find( '#tab_accruals' ).find( '.first-column-sub-view' ).css( 'display', 'none' );\n\t\t\tthis.edit_view.find( '.permission-defined-div' ).css( 'display', 'block' );\n\t\t\tthis.edit_view.find( '.permission-message' ).html( Global.getUpgradeMessage() );\n\t\t}\n\n\t\tfunction beforeLoadView( tpl ) {\n\t\t\tvar args = { parent_view: 'employee' };\n\n\t\t\treturn { template: _.template( tpl ), args: args };\n\t\t}\n\n\t\tfunction afterLoadView( subViewController ) {\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller = subViewController;\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.parent_key = 'user_id';\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.sub_view_mode = true;\n\t\t\tTTPromise.wait( 'BaseViewController', 'initialize', function() {\n\t\t\t\t$this.sub_accrual_policy_user_modifier_view_controller.initData(); //Init data in this parent view\n\t\t\t} );\n\t\t}\n\t}\n\n\tsetDefaultUserName() {\n\t\tif ( this.is_add == true ) {\n\t\t\tvar first_name_widget = this.edit_view_ui_dic['first_name'];\n\t\t\tvar last_name_widget = this.edit_view_ui_dic['last_name'];\n\n\t\t\tvar user_name_widget = this.edit_view_ui_dic['user_name'];\n\n\t\t\tuser_name_widget.setValue( first_name_widget.getValue().toLowerCase().replace( /[^a-zA-Z_]/gi, '' ) + '.' + last_name_widget.getValue().toLowerCase().replace( /[^a-zA-Z_]/gi, '' ) );\n\t\t\tthis.current_edit_record.user_name = user_name_widget.getValue();\n\t\t}\n\t}\n\n\t// setDefaultQuickPunch() {\n\t// \tif ( this.is_add == true ) {\n\t// \t\tvar home_phone_widget = this.edit_view_ui_dic['home_phone'];\n\t// \t\tclean_home_phone = home_phone_widget.getValue().replace(/\\D/g,'');\n\t//\n\t// \t\tvar quick_punch_id_widget = this.edit_view_ui_dic['phone_id'];\n\t// \t\tquick_punch_id_widget.setValue( clean_home_phone.substring( ( clean_home_phone.length - 7 ) ) );\n\t// \t\tthis.current_edit_record.phone_id = quick_punch_id_widget.getValue();\n\t//\n\t// \t\tvar quick_punch_password_widget = this.edit_view_ui_dic['phone_password'];\n\t// \t\tquick_punch_password_widget.setValue( quick_punch_id_widget.getValue().substring( ( quick_punch_id_widget.getValue().length - 4 ) ) );\n\t// \t\tthis.current_edit_record.phone_password = quick_punch_password_widget.getValue();\n\t// \t}\n\t// },\n\n\tonFormItemChange( target, doNotValidate ) {\n\t\tvar $this = this;\n\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\t\tvar key = target.getField();\n\n\t\tif ( !this.current_edit_record ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( parseInt( key ) > 0 ) {\n\n\t\t\tif ( !this.current_edit_record.hierarchy_control ) {\n\t\t\t\tthis.current_edit_record.hierarchy_control = {};\n\t\t\t}\n\n\t\t\tthis.current_edit_record.hierarchy_control[key] = target.getValue();\n\t\t} else {\n\t\t\tthis.current_edit_record[key] = target.getValue();\n\t\t}\n\n\t\tswitch ( key ) {\n\t\t\tcase 'first_name':\n\t\t\t\tvar widget = this.edit_view_ui_dic['first_name_1'];\n\t\t\t\twidget.setValue( target.getValue() );\n\t\t\t\tthis.current_edit_record.first_name_1 = target.getValue();\n\t\t\t\tthis.setDefaultUserName();\n\t\t\t\tbreak;\n\t\t\tcase 'last_name':\n\t\t\t\twidget = this.edit_view_ui_dic['last_name_1'];\n\t\t\t\twidget.setValue( target.getValue() );\n\t\t\t\tthis.current_edit_record.last_name_1 = target.getValue();\n\t\t\t\tthis.setDefaultUserName();\n\t\t\t\tbreak;\n\t\t\tcase 'first_name_1':\n\t\t\t\twidget = this.edit_view_ui_dic['first_name'];\n\t\t\t\twidget.setValue( target.getValue() );\n\t\t\t\tthis.current_edit_record.first_name = target.getValue();\n\t\t\t\tthis.setDefaultUserName();\n\t\t\t\tbreak;\n\t\t\tcase 'last_name_1':\n\t\t\t\twidget = this.edit_view_ui_dic['last_name'];\n\t\t\t\twidget.setValue( target.getValue() );\n\t\t\t\tthis.current_edit_record.last_name = target.getValue();\n\t\t\t\tthis.setDefaultUserName();\n\t\t\t\tbreak;\n\t\t\t// case 'home_phone':\n\t\t\t// \tthis.setDefaultQuickPunch();\n\t\t\t// \tbreak;\n\t\t\tcase 'country':\n\t\t\t\twidget = this.edit_view_ui_dic['province'];\n\t\t\t\twidget.setValue( null );\n\t\t\t\tbreak;\n\t\t\tcase 'default_job_id':\n\t\t\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\t\t\tthis.edit_view_ui_dic['job_quick_search'].setValue( target.getValue( true ) ? ( target.getValue( true ).manual_id ? target.getValue( true ).manual_id : '' ) : '' );\n\t\t\t\t\tthis.setJobItemValueWhenJobChanged( target.getValue( true ), 'default_job_item_id', {\n\t\t\t\t\t\tstatus_id: 10,\n\t\t\t\t\t\tjob_id: this.current_edit_record.default_job_id,\n\t\t\t\t\t\tcompany_id: this.select_company_id\n\t\t\t\t\t} );\n\t\t\t\t\tthis.edit_view_ui_dic['job_quick_search'].setCheckBox( true );\n\t\t\t\t\tthis.setPunchTagValuesWhenCriteriaChanged( this.getPunchTagFilterData(), 'default_punch_tag_id' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'default_job_item_id':\n\t\t\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\t\t\tthis.edit_view_ui_dic['job_item_quick_search'].setValue( target.getValue( true ) ? ( target.getValue( true ).manual_id ? target.getValue( true ).manual_id : '' ) : '' );\n\t\t\t\t\tthis.edit_view_ui_dic['job_item_quick_search'].setCheckBox( true );\n\t\t\t\t\tthis.setPunchTagValuesWhenCriteriaChanged( this.getPunchTagFilterData(), 'default_punch_tag_id' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'default_punch_tag_id':\n\t\t\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\t\t\tif ( target.getValue() !== TTUUID.zero_id && target.getValue() !== false && target.getValue().length > 0 ) {\n\t\t\t\t\t\tthis.setPunchTagQuickSearchManualIds( target.getSelectItems() );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.edit_view_ui_dic['punch_tag_quick_search'].setValue( '' );\n\t\t\t\t\t}\n\t\t\t\t\t//Reset source data to make sure correct punch tags are always shown.\n\t\t\t\t\tthis.edit_view_ui_dic['default_punch_tag_id'].setSourceData( null );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'id':\n\t\t\tcase 'default_branch_id':\n\t\t\tcase 'default_department_id':\n\t\t\tcase 'group_id':\n\t\t\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\t\t\tthis.setPunchTagValuesWhenCriteriaChanged( this.getPunchTagFilterData(), 'default_punch_tag_id' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'job_quick_search':\n\t\t\tcase 'job_item_quick_search':\n\t\t\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\t\t\tthis.onJobQuickSearch( key, target.getValue(), 'default_job_id', 'default_job_item_id', {\n\t\t\t\t\t\tstatus_id: 10,\n\t\t\t\t\t\tcompany_id: $this.select_company_id\n\t\t\t\t\t} );\n\t\t\t\t\tTTPromise.wait( 'BaseViewController', 'onJobQuickSearch', function() {\n\t\t\t\t\t\t$this.setPunchTagValuesWhenCriteriaChanged( $this.getPunchTagFilterData(), 'default_punch_tag_id' );\n\t\t\t\t\t} );\n\t\t\t\t\t//Don't validate immediately as onJobQuickSearch is doing async API calls, and it would cause a guaranteed validation failure.\n\t\t\t\t\tdoNotValidate = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'punch_tag_quick_search':\n\t\t\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\t\t\tthis.onPunchTagQuickSearch( target.getValue(), this.getPunchTagFilterData(), 'default_punch_tag_id' );\n\n\t\t\t\t\t//Don't validate immediately as onJobQuickSearch is doing async API calls, and it would cause a guaranteed validation failure.\n\t\t\t\t\tdoNotValidate = true;\n\t\t\t\t}\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\thierarchyPermissionValidate( p_id, selected_item ) {\n\n\t\tif ( PermissionManager.validate( 'hierarchy', 'edit' ) ||\n\t\t\tPermissionManager.validate( 'user', 'edit_hierarchy' ) ) {\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tcheckTabPermissions( tab ) {\n\t\tvar retval = false;\n\n\t\tswitch ( tab ) {\n\t\t\tcase 'tab_hierarchy':\n\t\t\t\tif ( this.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_wage':\n\t\t\t\tif ( PermissionManager.checkTopLevelPermission( 'Wage' ) && this.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_tax':\n\t\t\t\tif ( PermissionManager.checkTopLevelPermission( 'UserTaxDeduction' ) &&\n\t\t\t\t\tthis.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_payment_methods':\n\t\t\t\tif ( PermissionManager.checkTopLevelPermission( 'RemittanceDestinationAccount' ) &&\n\t\t\t\t\tthis.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_contacts':\n\t\t\t\tif ( PermissionManager.checkTopLevelPermission( 'UserContact' ) && this.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_applications':\n\t\t\t\tif ( PermissionManager.subJobApplicationValidate( 'JobApplication' ) && this.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_accruals':\n\t\t\t\tif ( PermissionManager.checkTopLevelPermission( 'AccrualPolicy' ) && this.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_qualifications':\n\t\t\t\tif ( PermissionManager.checkTopLevelPermission( 'Qualification' ) && this.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'tab_reviews':\n\t\t\t\tif ( PermissionManager.checkTopLevelPermission( 'UserReviewControl' ) && this.select_company_id === LocalCacheData.getCurrentCompany().id ) {\n\t\t\t\t\tretval = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tretval = super.checkTabPermissions( tab );\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn retval;\n\t}\n\n\t/* jshint ignore:start */\n\tsetCurrentEditRecordData() {\n\t\tvar $this = this;\n\t\tvar dont_set_dic = {};\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 ) || key === 'hierarchy_control' ) {\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'first_name':\n\t\t\t\t\tcase 'last_name':\n\t\t\t\t\t\tdont_set_dic[key + '_1'] = true;\n\t\t\t\t\t\tvar brother = this.edit_view_ui_dic[key + '_1'];\n\t\t\t\t\t\tbrother.setValue( 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\tcase 'country':\n\t\t\t\t\t\tthis.setCountryValue( widget, key );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'hierarchy_control':\n\t\t\t\t\t\tif ( this.show_hierarchy ) {\n\t\t\t\t\t\t\tfor ( var h_key in this.current_edit_record.hierarchy_control ) {\n\t\t\t\t\t\t\t\tvar value = this.current_edit_record.hierarchy_control[h_key];\n\t\t\t\t\t\t\t\tif ( this.edit_view_ui_dic[h_key] ) {\n\t\t\t\t\t\t\t\t\twidget = this.edit_view_ui_dic[h_key];\n\t\t\t\t\t\t\t\t\tdont_set_dic[h_key] = true;\n\t\t\t\t\t\t\t\t\twidget.setValue( value );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'default_job_id':\n\t\t\t\t\t\t// Employee view does not filter job based on employee criteria as this that controls many of the settings itself.\n\t\t\t\t\t\t// var args = {};\n\t\t\t\t\t\t// args.filter_data = { status_id: 10, user_id: this.current_edit_record.id };\n\t\t\t\t\t\t// widget.setDefaultArgs( args );\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\tcase 'default_job_item_id':\n\t\t\t\t\t\tvar args = {};\n\t\t\t\t\t\targs.filter_data = { status_id: 10, job_id: this.current_edit_record.default_job_id };\n\t\t\t\t\t\twidget.setDefaultArgs( args );\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\tcase 'default_punch_tag_id':\n\t\t\t\t\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\t\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\t\tthis.previous_punch_tag_selection = this.current_edit_record[key];\n\n\t\t\t\t\t\t\tvar punch_tag_widget = widget;\n\t\t\t\t\t\t\tTTPromise.wait( null, null, function() {\n\t\t\t\t\t\t\t\t//Update default args for punch tags AComboBox last as they rely on data from job, job item and related fields.\n\t\t\t\t\t\t\t\tvar args = {};\n\t\t\t\t\t\t\t\targs.filter_data = $this.getPunchTagFilterData();\n\t\t\t\t\t\t\t\tpunch_tag_widget.setDefaultArgs( args );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'job_quick_search':\n//\t\t\t\t\t\twidget.setValue( this.current_edit_record['job_id'] ? this.current_edit_record['job_id'] : 0 );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'job_item_quick_search':\n//\t\t\t\t\t\twidget.setValue( this.current_edit_record['job_item_id'] ? this.current_edit_record['job_item_id'] : 0 );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'punch_tag_quick_search':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif ( !dont_set_dic[key] ) {\n\t\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tif ( this.current_edit_record.id ) {\n\t\t\tif ( this.file_browser ) {\n\t\t\t\tthis.file_browser.show();\n\t\t\t\tthis.file_browser.setImage( ServiceCaller.getURLByObjectType( 'user_photo' ) + '&object_id=' + this.current_edit_record.id );\n\t\t\t\tif ( this.is_viewing ) {\n\t\t\t\t\tthis.file_browser.setEnable( false );\n\t\t\t\t} else {\n\t\t\t\t\tthis.file_browser.setEnable( true );\n\t\t\t\t}\n\t\t\t\t$( '.upload-image-alert' ).remove();\n\t\t\t}\n\t\t} else {\n\t\t\tif ( this.file_browser ) {\n\t\t\t\tthis.file_browser.hide();\n\t\t\t\tvar span = $( '<span class=\"upload-image-alert\">' );\n\t\t\t\tspan.text( $.i18n._( 'Please save this record before uploading a photo' ) );\n\t\t\t\tthis.file_browser.parent().append( span );\n\t\t\t}\n\t\t}\n\n\t\t// Error: TypeError: this.edit_view_ui_dic.company_id is undefined in interface/html5/framework/jquery.min.js?v=9.0.5-20151222-162143 line 2 > eval line 1374\n\t\tthis.edit_view_ui_dic['company_id'] && this.edit_view_ui_dic['company_id'].setEnabled( false );\n\t\tthis.edit_view_ui_dic['mfa_type_id'].setEnabled( false );\n\n\t\tthis.collectUIDataToCurrentEditRecord();\n\t\tthis.setEmailIcon();\n\n\t\tthis.setEditViewDataDone();\n\t}\n\n\t/* jshint ignore:end */\n\n\tsetEmailIcon() {\n\t\tvar $this = this;\n\t\t$( '.employee-email-icon' ).remove();\n\t\tvar work_email = $( '<img title=\"' + $.i18n._( 'ReValidate Email Address' ) + '\" class=\"employee-email-icon work-email\" src=\"theme/default/images/email16x16.png\">' );\n\t\tvar home_email = $( '<img title=\"' + $.i18n._( 'ReValidate Email Address' ) + '\" class=\"employee-email-icon home-email\" src=\"theme/default/images/email16x16.png\">' );\n\t\tif ( this.current_edit_record.hasOwnProperty( 'work_email_is_valid' ) && !this.current_edit_record.work_email_is_valid ) {\n\t\t\tthis.edit_view_form_item_dic.work_email.children().eq( 1 ).append( work_email );\n\t\t\twork_email.on( 'click', function() {\n\t\t\t\tcheckEmail( 'work_email' );\n\t\t\t} );\n\t\t} else {\n\n\t\t}\n\n\t\tif ( this.current_edit_record.hasOwnProperty( 'home_email_is_valid' ) && !this.current_edit_record.home_email_is_valid ) {\n\t\t\tthis.edit_view_form_item_dic.home_email.children().eq( 1 ).append( home_email );\n\t\t\thome_email.on( 'click', function() {\n\t\t\t\tcheckEmail( 'home_email' );\n\t\t\t} );\n\t\t}\n\n\t\tfunction checkEmail() {\n\t\t\t$this.api.sendValidationEmail( $this.current_edit_record.id, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\t\tTAlertManager.showAlert( $.i18n._( 'Validation email sent...' ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTAlertManager.showAlert( $.i18n._( 'No validation email sent...' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tonSaveResult( result ) {\n\t\tsuper.onSaveResult( result );\n\t\tif ( result && result.isValid() ) {\n\t\t\tvar system_job_queue = result.getAttributeInAPIDetails( 'system_job_queue' );\n\t\t\tif ( system_job_queue ) {\n\t\t\t\tthis.event_bus.emit( 'tt_topbar', 'toggle_job_queue_spinner', {\n\t\t\t\t\tshow: true,\n\t\t\t\t\tget_job_data: true\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\tonSaveDone( result ) {\n\t\tif ( this.edit_only_mode && LocalCacheData.current_open_primary_controller.viewId === 'TimeSheet' ) {\n\t\t\tLocalCacheData.current_open_primary_controller.updateSelectUserAndRefresh( this.current_edit_record );\n\t\t}\n\t}\n\n\tgetCopyAsNewFilter( filter ) {\n\t\t// overriding BaseViewController for _continueDoCopyAsNew()\n\t\tfilter.filter_data.company_id = this.select_company_id;\n\t\treturn filter;\n\t}\n\n\tonAddClick() {\n\t\tvar $this = this;\n\n\t\tif ( Global.getProductEdition() == 10 ) {\n\t\t\t$this.selectUserDefaultSettings( null );\n\t\t} else {\n\t\t\tvar data = {};\n\t\t\tdata.filter_columns = { id: true, name: true };\n\n\t\tif( $this.edit_view_tab ) {\n\t\t\t// Switch to Employee tab if New is triggered, to reinforce that this data needs filling in, as well as signalling to the user the difference for example between New Employee and New in sub grid in Qualifactions.\n\t\t\t$this.edit_view_tab.tabs( 'option', 'active', 0 ); // Switch active tab.\n\t\t\t$('.employee-edit-view .label-wrap').scrollLeft( 0 ); // Scroll through tab label wrap to ensure first tab is visible.\n\t\t}\n\n\t\t$this.api_user_default.getUserDefault( data, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\t\tif ( result_data.length > 1 ) {\n\t\t\t\t\t\t$this.showUserDefaultChoiceModal( result_data );\n\t\t\t\t\t} else if ( result_data.length === 1 ) {\n\t\t\t\t\t\t$this.selectUserDefaultSettings( result_data[0].id );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.selectUserDefaultSettings( null );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tshowUserDefaultChoiceModal( choices ) {\n\t\tfor ( var i = 0; i < choices.length; i++ ) {\n\t\t\tchoices[i].value = choices[i].id;\n\t\t\tchoices[i].label = choices[i].name;\n\t\t}\n\n\t\tTAlertManager.showFlexAlert( $.i18n._( 'New Hire Default' ), $.i18n._( 'Select a new hire default template to use for this employee.' ), 'dropdown', choices, ( selection ) => {\n\t\t\tif ( selection !== false ) {\n\t\t\t\tthis.selectUserDefaultSettings( selection );\n\t\t\t}\n\t\t} );\n\n\t}\n\n\tselectUserDefaultSettings( default_id ) {\n\t\tvar $this = this;\n\t\tthis.setCurrentEditViewState( 'new' );\n\t\t$this.openEditView();\n\n\t\t$this.api['get' + $this.api.key_name + 'DefaultData']( this.select_company_id, default_id, {\n\t\t\tonResult: function( result ) {\n\t\t\t\t$this.onAddResult( result );\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tonMassEditClick() {\n\n\t\tvar $this = this;\n\t\t$this.is_add = false;\n\t\t$this.is_viewing = false;\n\t\t$this.is_mass_editing = true;\n\t\tLocalCacheData.current_doing_context_action = 'mass_edit';\n\t\t$this.openEditView();\n\t\tvar filter = {};\n\t\tvar grid_selected_id_array = this.getGridSelectIdArray();\n\t\tvar grid_selected_length = grid_selected_id_array.length;\n\t\tthis.mass_edit_record_ids = [];\n\n\t\t$.each( grid_selected_id_array, function( index, value ) {\n\t\t\t$this.mass_edit_record_ids.push( value );\n\t\t} );\n\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_data.id = this.mass_edit_record_ids;\n\t\tfilter.filter_data.company_id = this.select_company_id;\n\n\t\tthis.api['getCommon' + this.api.key_name + 'Data']( filter, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tvar result_data = result.getResult();\n\n\t\t\t\tif ( !result_data ) {\n\t\t\t\t\tresult_data = [];\n\t\t\t\t}\n\n\t\t\t\t$this.api['getOptions']( 'unique_columns', {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t$this.unique_columns = result.getResult();\n\t\t\t\t\t\t$this.api['getOptions']( 'linked_columns', {\n\t\t\t\t\t\t\tonResult: function( result1 ) {\n\t\t\t\t\t\t\t\t$this.linked_columns = result1.getResult();\n\n\t\t\t\t\t\t\t\tif ( $this.sub_view_mode && $this.parent_key ) {\n\t\t\t\t\t\t\t\t\tresult_data[$this.parent_key] = $this.parent_value;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$this.current_edit_record = result_data;\n\t\t\t\t\t\t\t\t$this.initEditView();\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t}\n\t\t} );\n\t}\n\n\tgetAPIFilters() {\n\t\tvar filter = super.getAPIFilters();\n\t\tfilter.filter_data.company_id = this.select_company_id;\n\n\t\treturn filter;\n\t}\n\n\tsearch( set_default_menu, page_action, page_number, callBack ) {\n\t\tif ( !Global.isSet( set_default_menu ) ) {\n\t\t\tset_default_menu = true;\n\t\t}\n\n\t\tvar $this = this;\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_sort = {};\n\t\tfilter.filter_columns = this.getFilterColumnsFromDisplayColumns();\n\t\tfilter.filter_items_per_page = 0; // Default to 0 to load user preference defined\n\n\t\tif ( this.pager_data ) {\n\n\t\t\tif ( LocalCacheData.paging_type === 0 ) {\n\t\t\t\tif ( page_action === 'next' ) {\n\t\t\t\t\tfilter.filter_page = this.pager_data.next_page;\n\t\t\t\t} else {\n\t\t\t\t\tfilter.filter_page = 1;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\tswitch ( page_action ) {\n\t\t\t\t\tcase 'next':\n\t\t\t\t\t\tfilter.filter_page = this.pager_data.next_page;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'last':\n\t\t\t\t\t\tfilter.filter_page = this.pager_data.previous_page;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'start':\n\t\t\t\t\t\tfilter.filter_page = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'end':\n\t\t\t\t\t\tfilter.filter_page = this.pager_data.last_page_number;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'go_to':\n\t\t\t\t\t\tfilter.filter_page = page_number;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tfilter.filter_page = this.pager_data.current_page;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\t\t\tfilter.filter_page = 1;\n\t\t}\n\n\t\tif ( this.sub_view_mode && this.parent_key ) {\n\t\t\tthis.select_layout.data.filter_data[this.parent_key] = this.parent_value;\n\t\t}\n\n\t\t//If sub view controller set custom filters, get it\n\t\tif ( Global.isSet( this.getSubViewFilter ) ) {\n\t\t\tthis.select_layout.data.filter_data = this.getSubViewFilter( this.select_layout.data.filter_data );\n\t\t}\n\n\t\t//select_layout will not be null, it's set in setSelectLayout function\n\t\tfilter.filter_data = Global.convertLayoutFilterToAPIFilter( this.select_layout );\n\t\tif ( this.select_layout && this.select_layout.data ) { //Fix: Uncaught TypeError: Cannot read property 'data' of null\n\t\t\tfilter.filter_sort = this.select_layout.data.filter_sort;\n\t\t}\n\n\t\tif ( TTUUID.isUUID( this.refresh_id ) ) {\n\t\t\tfilter.filter_data = {};\n\t\t\tfilter.filter_data.id = [this.refresh_id];\n\n\t\t\tthis.last_select_ids = filter.filter_data.id;\n\n\t\t} else {\n\t\t\tthis.last_select_ids = [];\n\t\t\tvar ids = this.getGridSelectIdArray();\n\t\t\t//ensure detached reference to value source or lose this.last_select_ids when grid is cleared.\n\t\t\tfor ( var i = 0; i < ids.length; i++ ) {\n\t\t\t\tthis.last_select_ids.push( ids[i] );\n\t\t\t}\n\t\t}\n\n\t\tthis.api['get' + this.api.key_name]( filter, {\n\t\t\tonResult: function( result ) {\n\n\t\t\t\tvar result_data = result.getResult();\n\t\t\t\tif ( !Global.isArray( result_data ) ) {\n\t\t\t\t\t$this.showNoResultCover();\n\t\t\t\t} else {\n\t\t\t\t\t$this.removeNoResultCover();\n\t\t\t\t\tif ( Global.isSet( $this.__createRowId ) ) {\n\t\t\t\t\t\tresult_data = $this.__createRowId( result_data );\n\t\t\t\t\t}\n\n\t\t\t\t\tresult_data = Global.formatGridData( result_data, $this.api.key_name );\n\t\t\t\t}\n\t\t\t\tif ( TTUUID.isUUID( $this.refresh_id ) ) {\n\t\t\t\t\t$this.refresh_id = null;\n\t\t\t\t\tif ( $this.grid ) { //When viwwing from JobApplication view, employee grid will not exist.\n\t\t\t\t\t\tvar grid_source_data = $this.grid.getData();\n\t\t\t\t\t\tvar len = grid_source_data.length;\n\n\t\t\t\t\t\tif ( $.type( grid_source_data ) !== 'array' ) {\n\t\t\t\t\t\t\tgrid_source_data = [];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar found = false;\n\t\t\t\t\t\tvar new_record = result_data[0];\n\n\t\t\t\t\t\t//Error: Uncaught TypeError: Cannot read property 'id' of undefined in /interface/html5/views/BaseViewController.js?v=7.4.3-20140924-084605 line 4851\n\t\t\t\t\t\tif ( new_record ) {\n\t\t\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\t\t\tvar record = grid_source_data[i];\n\n\t\t\t\t\t\t\t\t//Fixed === issue. The id set by jQGrid is string type.\n\t\t\t\t\t\t\t\t// if ( !isNaN( parseInt( record.id ) ) ) {\n\t\t\t\t\t\t\t\t// \trecord.id = parseInt( record.id );\n\t\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t\tif ( record.id == new_record.id ) {\n\t\t\t\t\t\t\t\t\t$this.grid.grid.setRowData( new_record.id, new_record );\n\t\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( !found ) {\n//\t\t\t\t\t\t\t$this.grid.addRowData( new_record.id, new_record, 0 );\n\t\t\t\t\t\t\t\t$this.grid.setData( grid_source_data.concat( new_record ) );\n\t\t\t\t\t\t\t\t$this.highLightGridRowById( new_record.id );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//Set Page data to widget, next show display info when setDefault Menu\n\t\t\t\t\t$this.pager_data = result.getPagerData();\n\n\t\t\t\t\t//CLick to show more mode no need this step\n\t\t\t\t\tif ( LocalCacheData.paging_type !== 0 ) {\n\t\t\t\t\t\t$this.paging_widget.setPagerData( $this.pager_data );\n\t\t\t\t\t\t$this.paging_widget_2.setPagerData( $this.pager_data );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( LocalCacheData.paging_type === 0 && page_action === 'next' ) {\n\t\t\t\t\t\tvar current_data = $this.grid.getData();\n\t\t\t\t\t\tresult_data = current_data.concat( result_data );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $this.grid ) {\n\t\t\t\t\t\t$this.grid.setData( result_data );\n\n\t\t\t\t\t\t$this.reSelectLastSelectItems();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this.setGridCellBackGround(); //Set cell background for some views\n\n\t\t\t\tProgressBar.closeOverlay(); //Add this in initData\n\n\t\t\t\tif ( set_default_menu ) {\n\t\t\t\t\t$this.setDefaultMenu( true );\n\t\t\t\t}\n\n\t\t\t\tif ( LocalCacheData.paging_type === 0 ) {\n\t\t\t\t\tif ( !$this.pager_data || $this.pager_data.is_last_page ) {\n\t\t\t\t\t\t$this.paging_widget.css( 'display', 'none' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.paging_widget.css( 'display', 'block' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( callBack ) {\n\t\t\t\t\tcallBack( result );\n\t\t\t\t}\n\n\t\t\t\t// when call this from save and new result, we don't call auto open, because this will call onAddClick twice\n\t\t\t\tif ( set_default_menu ) {\n\t\t\t\t\t$this.autoOpenEditViewIfNecessary();\n\t\t\t\t}\n\n\t\t\t\t$this.searchDone();\n\n\t\t\t}\n\t\t} );\n\n\t\t//This seems to be the only difference from BaseViewController search() function.\n\t\tif ( filter && filter.filter_data && filter.filter_data.company_id ) {\n\t\t\tthis.select_company_id = filter.filter_data.company_id;\n\n\t\t\tthis.user_group_api.getUserGroup( { filter_data: { company_id: this.select_company_id } }, false, false, {\n\t\t\t\tonResult: function( res ) {\n\n\t\t\t\t\tres = res.getResult();\n\t\t\t\t\tres = Global.buildTreeRecord( res );\n\n\t\t\t\t\tif ( !$this.edit_only_mode ) {\n\t\t\t\t\t\tif ( !$this.sub_view_mode && $this.basic_search_field_ui_dic['group_id'] ) {\n\t\t\t\t\t\t\t$this.basic_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t\t\t\t$this.adv_search_field_ui_dic['group_id'].setSourceData( res );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$this.user_group_array = res;\n\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} else {\n\t\t\tthis.select_company_id = LocalCacheData.getCurrentCompany().id;\n\t\t}\n\t}\n\n\tonCustomContextClick( id ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'import_icon':\n\t\t\t\tthis.onImportClick();\n\t\t\t\tbreak;\n\t\t\tcase 'timesheet':\n\t\t\tcase 'schedule':\n\t\t\tcase 'pay_stub':\n\t\t\tcase 'pay_stub_amendment':\n\t\t\t\tthis.onNavigationClick( id );\n\t\t\t\tbreak;\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\tfirst_name: true,\n\t\t\t\t\tlast_name: 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\n\t\t\tvar cells = [];\n\t\t\tif ( this.is_edit ) {\n\t\t\t\t//when editing, if the user reloads, the grid's selected id array become the whole grid.\n\t\t\t\t//to avoid mapping every punch in that scenario we need to grab the current_edit_record, rather than pull data from getGridSelectIdArray()\n\t\t\t\t//check for mass edit as well. <-- not sure what this refers to, assuming the same happens in mass edit, but maps are disabled on mass edit atm.\n\t\t\t\tcells.push( this.current_edit_record );\n\t\t\t} else {\n\t\t\t\tvar ids = this.getGridSelectIdArray();\n\t\t\t\tdata.filter_data = Global.convertLayoutFilterToAPIFilter( this.select_layout );\n\t\t\t\tif ( ids.length > 0 ) {\n\t\t\t\t\tdata.filter_data.id = ids;\n\t\t\t\t}\n\t\t\t\tcells = this.api.getUser( data, { async: false } ).getResult();\n\t\t\t}\n\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\tonImportClick() {\n\n\t\tvar $this = this;\n\t\tIndexViewController.openWizard( 'ImportCSVWizard', 'User', function() {\n\t\t\t$this.search();\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 base_date = new Date().format();\n\n\t\tif ( $this.edit_view && $this.current_edit_record.id ) {\n\t\t\tuser_ids.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.id );\n\t\t\t} );\n\t\t}\n\n\t\tswitch ( iconName ) {\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._( 'Employees' ), window.location.href );\n\t\t\t\t\tIndexViewController.goToView( 'TimeSheet', filter );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'schedule':\n\t\t\t\tfilter.filter_data = {};\n\t\t\t\tvar include_users = { value: user_ids };\n\t\t\t\tfilter.filter_data.include_user_ids = include_users;\n\t\t\t\tfilter.select_date = base_date;\n\t\t\t\tGlobal.addViewTab( this.viewId, $.i18n._( 'Employees' ), window.location.href );\n\t\t\t\tIndexViewController.goToView( 'Schedule', filter );\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._( 'Employees' ), window.location.href );\n\t\t\t\t\tIndexViewController.goToView( 'PayStub', filter );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'pay_stub_amendment':\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._( 'Employees' ), window.location.href );\n\t\t\t\t\tIndexViewController.goToView( 'PayStubAmendment', filter );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tremoveEditView() {\n\n\t\tsuper.removeEditView();\n\t\tthis.sub_user_contact_view_controller = null;\n\t\tthis.sub_wage_view_controller = null;\n\t\tthis.sub_company_tax_view_controller = null;\n\t\tthis.sub_accrual_policy_user_modifier_view_controller = null;\n\t\tthis.sub_user_review_control_view_controller = null;\n\t\tthis.sub_job_application_view_controller = null;\n\t\tthis.sub_user_skill_view_controller = null;\n\t\tthis.sub_user_education_view_controller = null;\n\n\t\tthis.sub_user_membership_view_controller = null;\n\n\t\tthis.sub_user_license_view_controller = null;\n\n\t\tthis.sub_user_language_view_controller = null;\n\n\t\tthis.sub_payment_methods_view_controller = null;\n\t}\n\n\tbuildEditViewUI() {\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_employee': { 'label': $.i18n._( 'Employee' ), 'is_multi_column': true },\n\t\t\t'tab_contact_info': { 'label': $.i18n._( 'Contact Info' ), 'is_multi_column': true },\n\t\t\t'tab_hierarchy': {\n\t\t\t\t'label': $.i18n._( 'Hierarchy' ),\n\t\t\t\t'display_on_mass_edit': false,\n\t\t\t\t'html_template': this.getHierarchyTabHtml(),\n\t\t\t},\n\t\t\t'tab_login': { 'label': $.i18n._( 'Login' ), 'is_multi_column': true },\n\t\t\t'tab_wage': {\n\t\t\t\t'label': $.i18n._( 'Wage' ),\n\t\t\t\t'is_sub_view': true,\n\t\t\t\t'init_callback': 'initSubWageView',\n\t\t\t\t'display_on_mass_edit': false\n\t\t\t},\n\t\t\t'tab_tax': {\n\t\t\t\t'label': $.i18n._( 'Tax' ),\n\t\t\t\t'is_sub_view': true,\n\t\t\t\t'init_callback': 'initSubCompanyTaxView',\n\t\t\t\t'display_on_mass_edit': false\n\t\t\t},\n\t\t\t'tab_payment_methods': {\n\t\t\t\t'label': $.i18n._( 'Pay Methods' ),\n\t\t\t\t'init_callback': 'initSubPaymentMethodsView',\n\t\t\t\t'display_on_mass_edit': false\n\t\t\t},\n\t\t\t'tab_contacts': {\n\t\t\t\t'label': $.i18n._( 'Contacts' ),\n\t\t\t\t'init_callback': 'initSubUserContactView',\n\t\t\t\t'display_on_mass_edit': false\n\t\t\t},\n\t\t\t'tab_applications': {\n\t\t\t\t'label': $.i18n._( 'Applications' ),\n\t\t\t\t'init_callback': 'initSubJobApplicationView',\n\t\t\t\t'display_on_mass_edit': false\n\t\t\t},\n\t\t\t'tab_accruals': {\n\t\t\t\t'label': $.i18n._( 'Accruals' ),\n\t\t\t\t'init_callback': 'initSubAccrualPolicyUserModifier',\n\t\t\t\t'display_on_mass_edit': false,\n\t\t\t\t'show_permission_div': true\n\t\t\t},\n\t\t\t'tab_qualifications': {\n\t\t\t\t'label': $.i18n._( 'Qualifications' ),\n\t\t\t\t'init_callback': 'initSubQualificationView',\n\t\t\t\t'display_on_mass_edit': false,\n\t\t\t\t'html_template': this.getQualificationsTabHtml(),\n\t\t\t},\n\t\t\t'tab_reviews': {\n\t\t\t\t'label': $.i18n._( 'Reviews' ),\n\t\t\t\t'init_callback': 'initSubUserReviewControlView',\n\t\t\t\t'display_on_mass_edit': false\n\t\t\t},\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\tif ( !this.edit_only_mode ) {\n\t\t\tthis.navigation.AComboBox( {\n\t\t\t\tid: this.script_name + '_navigation',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tnavigation_mode: true,\n\t\t\t\tshow_search_inputs: true\n\t\t\t} );\n\n\t\t\tthis.setNavigation();\n\t\t}\n\n\t\t//Employee Tab start\n\t\tvar tab_employee = this.edit_view_tab.find( '#tab_employee' );\n\t\tvar tab_employee_column1 = tab_employee.find( '.first-column' );\n\t\tvar tab_employee_column2 = tab_employee.find( '.second-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\t\tthis.edit_view_tabs[0].push( tab_employee_column1 );\n\t\tthis.edit_view_tabs[0].push( tab_employee_column2 );\n\n\t\t//Company\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APICompany,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_company',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'company_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Company' ), form_item_input, tab_employee_column1 );\n\t\tform_item_input.setEnabled( false );\n\n\t\t//Legal Entity\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APILegalEntity,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_legal_entity',\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'legal_entity_id',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tset_empty: true,\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Legal Entity' ), form_item_input, tab_employee_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_employee_column1 );\n\n\t\t//First Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'first_name', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'First Name' ), form_item_input, tab_employee_column1, '' );\n\n\t\t//Last Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'last_name', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Last Name' ), form_item_input, tab_employee_column1 );\n\n\t\t//Employee Number\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'employee_number', width: 90 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Employee Number' ), form_item_input, tab_employee_column1 );\n\n\t\t//Permission Group\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPermissionControl,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_permission_control',\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'permission_control_id',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tset_empty: true\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Permission Group' ), form_item_input, tab_employee_column1 );\n\n\t\t//Pay Period Schedule\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayPeriodSchedule,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_pay_period_schedule',\n\t\t\tshow_search_inputs: true,\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tset_empty: true,\n\t\t\tfield: 'pay_period_schedule_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Pay Period Schedule' ), form_item_input, tab_employee_column1 );\n\n\t\t//Policy Group\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPolicyGroup,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_policy_group',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'policy_group_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Policy Group' ), form_item_input, tab_employee_column1 );\n\n\t\tif ( this.is_add ) {\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tfield: 'recurring_schedule_id',\n\t\t\t\tapi_class: TTAPI.APIRecurringScheduleTemplateControl,\n\t\t\t\tallow_multiple_selection: true,\n\t\t\t\tlayout_name: 'global_recurring_template_control',\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true\n\t\t\t} );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Recurring Schedule' ), form_item_input, tab_employee_column1, 'first_last' );\n\t\t}\n\n\t\t//Title\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIUserTitle,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_job_title',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'title_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Title' ), form_item_input, tab_employee_column1, '' );\n\n\t\t//Second Column Start\n\n\t\t//Currency\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\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\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'currency_id',\n\t\t\tset_empty: true\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Currency' ), form_item_input, tab_employee_column2 );\n\n\t\t//Default Branch\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIBranch,\n\t\t\tallow_multiple_selection: false,\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tlayout_name: 'global_branch',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'default_branch_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Default Branch' ), form_item_input, tab_employee_column2 );\n\n\t\t//Department\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIDepartment,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_department',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tfield: 'default_department_id'\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Default Department' ), form_item_input, tab_employee_column2 );\n\n\t\tthis.initPermission(); //#2398 - job/task permissions were getting broken on multiple opens of same employee.\n\t\tif ( ( Global.getProductEdition() >= 20 ) ) {\n\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIJob,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_job',\n\t\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t\t} ),\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\talways_include_columns: ['group_id'],\n\t\t\t\tsetRealValueCallBack: ( function( val ) {\n\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\tjob_coder.setValue( val.manual_id );\n\t\t\t\t\t}\n\t\t\t\t} ),\n\t\t\t\tfield: 'default_job_id'\n\t\t\t} );\n\n\t\t\tvar default_job_description = $( '<div class=\\'widget-h-box\\'></div>' );\n\n\t\t\tvar job_coder = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tjob_coder.TTextInput( { field: 'job_quick_search', disable_keyup_event: true } );\n\t\t\tjob_coder.addClass( 'job-coder' );\n\n\t\t\tdefault_job_description.append( job_coder );\n\t\t\tdefault_job_description.append( form_item_input );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Default Job' ), [form_item_input, job_coder], tab_employee_column2, '', default_job_description, true );\n\n\t\t\tif ( !this.show_job_ui ) {\n\t\t\t\tthis.detachElement( 'default_job_id' );\n\t\t\t}\n\n\t\t\t//Job Item\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIJobItem,\n\t\t\t\tallow_multiple_selection: false,\n\t\t\t\tlayout_name: 'global_job_item',\n\t\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t\t} ),\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\talways_include_columns: ['group_id'],\n\t\t\t\tsetRealValueCallBack: ( function( val ) {\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\tjob_item_coder.setValue( val.manual_id );\n\t\t\t\t\t}\n\t\t\t\t} ),\n\t\t\t\tfield: 'default_job_item_id'\n\t\t\t} );\n\n\t\t\tvar default_task_description = $( '<div class=\\'widget-h-box\\'></div>' );\n\n\t\t\tvar job_item_coder = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tjob_item_coder.TTextInput( { field: 'job_item_quick_search', disable_keyup_event: true } );\n\t\t\tjob_item_coder.addClass( 'job-coder' );\n\n\t\t\tdefault_task_description.append( job_item_coder );\n\t\t\tdefault_task_description.append( form_item_input );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Default Task' ), [form_item_input, job_item_coder], tab_employee_column2, '', default_task_description, true );\n\n\t\t\tif ( !this.show_job_item_ui ) {\n\t\t\t\tthis.detachElement( 'default_job_item_id' );\n\t\t\t}\n\n\t\t\t//Punch Tag\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\t\tform_item_input.AComboBox( {\n\t\t\t\tapi_class: TTAPI.APIPunchTag,\n\t\t\t\tallow_multiple_selection: true,\n\t\t\t\tlayout_name: 'global_punch_tag',\n\t\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t\t} ),\n\t\t\t\tshow_search_inputs: true,\n\t\t\t\tset_empty: true,\n\t\t\t\tget_real_data_on_multi: true,\n\t\t\t\tsetRealValueCallBack: ( ( punch_tags, get_real_data ) => {\n\t\t\t\t\tif ( punch_tags ) {\n\t\t\t\t\t\tthis.setPunchTagQuickSearchManualIds( punch_tags, get_real_data );\n\t\t\t\t\t}\n\t\t\t\t} ),\n\t\t\t\tfield: 'default_punch_tag_id'\n\t\t\t} );\n\n\t\t\tvar default_punch_tag_description = $( '<div class=\\'widget-h-box\\'></div>' );\n\n\t\t\tvar punch_tag_coder = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\t\tpunch_tag_coder.TTextInput( { field: 'punch_tag_quick_search', disable_keyup_event: true } );\n\t\t\tpunch_tag_coder.addClass( 'job-coder' );\n\n\t\t\tdefault_punch_tag_description.append( punch_tag_coder );\n\t\t\tdefault_punch_tag_description.append( form_item_input );\n\t\t\tthis.addEditFieldToColumn( $.i18n._( 'Default Punch Tag' ), [form_item_input, punch_tag_coder], tab_employee_column2, '', default_punch_tag_description, true );\n\n\t\t\tif ( !this.show_punch_tag_ui ) {\n\t\t\t\tthis.detachElement( 'default_punch_tag_id' );\n\t\t\t}\n\t\t}\n\n\t\t//Group\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\ttree_mode: true,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_tree_column',\n\t\t\tset_empty: true,\n\t\t\tfield: 'group_id'\n\t\t} );\n\t\tform_item_input.setSourceData( $this.user_group_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Group' ), form_item_input, tab_employee_column2 );\n\n\t\t// Ethnicity\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIEthnicGroup,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_ethnic_group',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'ethnic_group_id',\n\t\t\tset_empty: true\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Ethnicity' ), form_item_input, tab_employee_column2 );\n\n\t\t//SIN\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'sin', width: 90 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'SIN / SSN' ), form_item_input, tab_employee_column2 );\n\n\t\t//Birth Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'birth_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Birth Date' ), form_item_input, tab_employee_column2 );\n\n\t\t//Hire Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'hire_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Hire Date' ), form_item_input, tab_employee_column2 );\n\n\t\t//Termination Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'termination_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Termination Date' ), form_item_input, tab_employee_column2 );\n\n\t\t//Tags\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TAG_INPUT );\n\t\tform_item_input.TTagInput( { field: 'tag', object_type_id: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Tags' ), form_item_input, tab_employee_column2, '', null, null, true );\n\n\t\t//Contact Tab start\n\t\tvar tab_contact_info = this.edit_view_tab.find( '#tab_contact_info' );\n\t\tvar tab_contact_info_column1 = tab_contact_info.find( '.first-column' );\n\t\tvar tab_contact_info_column2 = tab_contact_info.find( '.second-column' );\n\n\t\tthis.edit_view_tabs[1] = [];\n\t\tthis.edit_view_tabs[1].push( tab_contact_info_column1 );\n\t\tthis.edit_view_tabs[1].push( tab_contact_info_column2 );\n\n\t\t// Photo\n\t\tif ( typeof FormData == 'undefined' ) {\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.IMAGE_BROWSER );\n\t\t\tthis.file_browser = form_item_input.TImageBrowser( {\n\t\t\t\tfield: '',\n\t\t\t\tdefault_width: 128,\n\t\t\t\tdefault_height: 128,\n\t\t\t\tenable_delete: true\n\t\t\t} );\n\n\t\t\tthis.file_browser.bind( 'imageChange', function( e, target ) {\n\t\t\t\tnew ServiceCaller().uploadFile( target.getValue(), 'object_type=user_photo&object_id=' + $this.current_edit_record.id, {\n\t\t\t\t\tonResult: function( result ) {\n\n\t\t\t\t\t\tif ( result.toLowerCase() === 'true' ) {\n\t\t\t\t\t\t\t$this.file_browser.setImage( ServiceCaller.getURLByObjectType( 'user_photo' ) + '&object_id=' + $this.current_edit_record.id );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tTAlertManager.showAlert( result, 'Error' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t} );\n\n\t\t} else {\n\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.IMAGE_AVD_BROWSER );\n\t\t\tthis.file_browser = form_item_input.TImageAdvBrowser( {\n\t\t\t\tfield: '',\n\t\t\t\tdefault_width: 128,\n\t\t\t\tdefault_height: 128,\n\t\t\t\tenable_delete: true,\n\t\t\t\tcallBack: function( form_data ) {\n\t\t\t\t\tnew ServiceCaller().uploadFile( form_data, 'object_type=user_photo&object_id=' + $this.current_edit_record.id, {\n\t\t\t\t\t\tonResult: function( result ) {\n\n\t\t\t\t\t\t\tif ( result.toLowerCase() === 'true' ) {\n\t\t\t\t\t\t\t\t$this.file_browser.setImage( ServiceCaller.getURLByObjectType( 'user_photo' ) + '&object_id=' + $this.current_edit_record.id );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tTAlertManager.showAlert( result, 'Error' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t},\n\t\t\t\tdeleteImageHandler: function( e ) {\n\t\t\t\t\t$this.onDeleteImage();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t}\n\n\t\tif ( this.is_edit ) {\n\t\t\tthis.file_browser.setEnableDelete( true );\n\t\t\tthis.file_browser.bind( 'deleteClick', function( e, target ) {\n\t\t\t\t$this.api.deleteImage( $this.current_edit_record.id, {\n\t\t\t\t\tonResult: function( result ) {\n\t\t\t\t\t\t$this.onDeleteImage();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Photo' ), this.file_browser, tab_contact_info_column1, '', null, false, true );\n\n\t\t//First Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'first_name_1', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'First Name' ), form_item_input, tab_contact_info_column1 );\n\n\t\t//Middle Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'middle_name', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Middle Name' ), form_item_input, tab_contact_info_column1 );\n\n\t\t//Last Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'last_name_1', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Last Name' ), form_item_input, tab_contact_info_column1 );\n\n\t\t//Home Address(Line 1)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'address1', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Home Address (Line 1)' ), form_item_input, tab_contact_info_column1 );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//Home Address(Line 2)\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'address2', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Home Address (Line 2)' ), form_item_input, tab_contact_info_column1 );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//City\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'city', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'City' ), form_item_input, tab_contact_info_column1 );\n\n\t\t//Country\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\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_info_column1 );\n\n\t\t//Province / State\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\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_info_column1 );\n\n\t\t//City\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'postal_code', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Postal/ZIP Code' ), form_item_input, tab_contact_info_column1, '' );\n\n\t\t//Column 2\n\n\t\t//Gender\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'sex_id' } );\n\t\tform_item_input.setSourceData( $this.sex_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Gender' ), form_item_input, tab_contact_info_column2 );\n\n\t\t//Work Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'work_phone', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Work Phone' ), form_item_input, tab_contact_info_column2, '' );\n\n\t\t//Work Phone Ext\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'work_phone_ext' } );\n\t\tform_item_input.css( 'width', '50' );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Work Phone Ext' ), form_item_input, tab_contact_info_column2 );\n\n\t\t//Home Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'home_phone', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Home Phone' ), form_item_input, tab_contact_info_column2 );\n\n\t\t//Mobile Phone\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'mobile_phone', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Mobile Phone' ), form_item_input, tab_contact_info_column2 );\n\n\t\t//Fax\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'fax_phone', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Fax' ), form_item_input, tab_contact_info_column2 );\n\n\t\t//Work Email\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'work_email', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Work Email' ), form_item_input, tab_contact_info_column2, '', null, true );\n\n\t\t//Home Email\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'home_email', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Home Email' ), form_item_input, tab_contact_info_column2, '', null, true );\n\n\t\t//Note\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\tform_item_input.TTextArea( { field: 'note', width: '100%', rows: 4 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Note' ), form_item_input, tab_contact_info_column2, '', null, null, true );\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t//Hierarchy Tab start\n\t\tvar tab_hierarchy = this.edit_view_tab.find( '#tab_hierarchy' );\n\t\tvar tab_hierarchy_column1 = tab_hierarchy.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[2] = [];\n\t\tthis.edit_view_tabs[2].push( tab_hierarchy_column1 );\n\n\t\tif ( this.hierarchyPermissionValidate() ) {\n\t\t\tvar res = this.hierarchyControlAPI.getHierarchyControlOptions( { async: false } );\n\t\t\t$this.hierarchy_options_dic = {};\n\t\t\tvar data = res.getResult();\n\t\t\tfor ( var key in data ) {\n\t\t\t\tif ( parseInt( key ) === 200 && Global.getProductEdition() != 25 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$this.hierarchy_options_dic[key] = Global.buildRecordArray( data[key] );\n\t\t\t}\n\t\t\tif ( _.size( $this.hierarchy_options_dic ) > 0 ) {\n\t\t\t\t$this.show_hierarchy = true;\n\t\t\t} else {\n\t\t\t\t$this.show_hierarchy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( this.show_hierarchy && this.hierarchy_ui_model ) {\n\t\t\tthis.edit_view_tab.find( '#tab_hierarchy' ).find( '.first-column' ).css( 'display', 'block' );\n\t\t\tthis.edit_view_tab.find( '#tab_hierarchy' ).find( '.hierarchy-div' ).css( 'display', 'none' );\n\t\t\tvar len = this.hierarchy_ui_model.length;\n\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\tvar ui_model = this.hierarchy_ui_model[i];\n\t\t\t\tvar options = this.hierarchy_options_dic[ui_model.id];\n\t\t\t\tif ( options ) {\n\t\t\t\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\t\t\t\tform_item_input.TComboBox( { field: ui_model.id } );\n\t\t\t\t\tform_item_input.setSourceData( options );\n\t\t\t\t\tthis.addEditFieldToColumn( ui_model.value, form_item_input, tab_hierarchy_column1 );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.edit_view_tab.find( '#tab_hierarchy' ).find( '.first-column' ).css( 'display', 'none' );\n\t\t\tthis.edit_view_tab.find( '#tab_hierarchy' ).find( '.hierarchy-div' ).NoHierarchyBox( { related_view_controller: this } );\n\t\t\tthis.edit_view_tab.find( '#tab_hierarchy' ).find( '.hierarchy-div' ).css( 'display', 'block' );\n\t\t}\n\n\t\t//Login Tab start\n\t\tvar tab_login = this.edit_view_tab.find( '#tab_login' );\n\t\tvar tab_login_column1 = tab_login.find( '.first-column' );\n\t\tvar tab_login_column2 = tab_login.find( '.second-column' );\n\n\t\tthis.edit_view_tabs[3] = [];\n\t\tthis.edit_view_tabs[3].push( tab_login_column1 );\n\t\tthis.edit_view_tabs[3].push( tab_login_column2 );\n\n\t\t//Login Enabled\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'enable_login' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Login Enabled' ), form_item_input, tab_login_column1 );\n\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'mfa_type_id' } );\n\t\tform_item_input.setSourceData( $this.mfa_type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Multifactor Authentication' ), form_item_input, tab_login_column1, null, null, true );\n\n\t\t//User Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'user_name', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'User Name' ), form_item_input, tab_login_column1 );\n\n\t\t//Password\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.PASSWORD_INPUT );\n\t\tform_item_input.TTextInput( { field: 'password', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Change Password' ), form_item_input, tab_login_column1 );\n\n\t\t//Password Confirm\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.PASSWORD_INPUT );\n\t\tform_item_input.TTextInput( { field: 'password_confirm', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Confirm Password' ), form_item_input, tab_login_column1 );\n\n\t\t//Quick Punch ID\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'phone_id', width: 90 } );\n\t\tvar quick_punch_id_description = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tquick_punch_id_description.append( form_item_input );\n\t\tquick_punch_id_description.append( $( '<span class=\\'widget-right-label\\'>( ' + $.i18n._( 'Optional' ) + ' )</span>' ) );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Quick Punch ID' ), form_item_input, tab_login_column2, '', quick_punch_id_description );\n\n\t\t//Quick Punch Password\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'phone_password', width: 90 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Quick Punch Password' ), form_item_input, tab_login_column2 );\n\n\t\t//Login Expire Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.DATE_PICKER );\n\t\tform_item_input.TDatePicker( { field: 'login_expire_date' } );\n\t\tvar login_expire_date_description = $( '<div class=\\'widget-h-box\\'></div>' );\n\t\tlogin_expire_date_description.append( form_item_input );\n\t\tlogin_expire_date_description.append( $( '<span class=\\'widget-right-label\\'>( ' + $.i18n._( 'Leave blank to never expire' ) + ' )</span>' ) );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Login Expire Date' ), form_item_input, tab_login_column2, '', login_expire_date_description );\n\n\t\t//Terminated Permission Group\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPermissionControl,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_permission_control',\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'terminated_permission_control_id',\n\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t} ),\n\t\t\tset_empty: true\n\t\t} );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Terminated Permission Group' ), form_item_input, tab_login_column2 );\n\n\t\tTTPromise.resolve( 'employeeEditView', 'openEditView' );\n\t}\n\n\tgetQualificationsTabHtml() {\n\t\tvar html_template = `<div id=\"tab_qualifications\" class=\"edit-view-tab-outside-sub-view\">\n\t\t\t\t\t\t\t\t<div class=\"edit-view-tab\" id=\"tab_qualifications_content_div\">\n\t\t\t\t\t\t\t\t\t<div class=\"first-column-sub-view\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"first-sub-view\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"second-sub-view\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"third-sub-view\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"forth-sub-view\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"fifth-sub-view\"></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"save-and-continue-div\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"message\"></span>\n\t\t\t\t\t\t\t\t\t\t<div class=\"save-and-continue-button-div\">\n\t\t\t\t\t\t\t\t\t\t\t<button class=\"tt-button p-button p-component\" type=\"button\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"icon\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"p-button-label\"></span>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>`;\n\n\t\treturn html_template;\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\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\t\t\t\t\t$this.e_province_array = Global.buildRecordArray( res );\n\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\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\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\tonBuildBasicUIFinished() {\n\t\tvar basicSearchTabPanel = this.search_panel.find( 'div #basic_search' );\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\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\n\t\tvar $this = this;\n\t\tthis.search_fields = [\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Company' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'company_id',\n\t\t\t\tlayout_name: 'global_company',\n\t\t\t\tapi_class: TTAPI.APICompany,\n\t\t\t\tmultiple: false,\n\t\t\t\tcustom_first_label: Global.default_item,\n\t\t\t\tbasic_search: PermissionManager.checkTopLevelPermission( 'Companies' ) ? true : false,\n\t\t\t\tadv_search: PermissionManager.checkTopLevelPermission( 'Companies' ) ? true : false,\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._( 'Legal Entity' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'legal_entity_id',\n\t\t\t\tlayout_name: 'global_legal_entity',\n\t\t\t\tapi_class: TTAPI.APILegalEntity,\n\t\t\t\tmultiple: true,\n\t\t\t\tcustom_first_label: Global.any_item,\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\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\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\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\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Last Name' ),\n\t\t\t\tfield: 'last_name',\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\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Employee Number' ),\n\t\t\t\tfield: 'employee_number',\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tin_column: 1,\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._( 'Phone' ),\n\t\t\t\tfield: 'any_phone',\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_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._( 'Email' ),\n\t\t\t\tfield: 'any_email',\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._( '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: 2,\n\t\t\t\tobject_type_id: 200,\n\t\t\t\tform_item_type: FormItemType.TAG_INPUT\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Gender' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'sex_id',\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\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Group' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tmultiple: true,\n\t\t\t\tfield: 'group_id',\n\t\t\t\tlayout_name: 'global_tree_column',\n\t\t\t\ttree_mode: 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\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Default Branch' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'default_branch_id',\n\t\t\t\tlayout_name: 'global_branch',\n\t\t\t\tapi_class: TTAPI.APIBranch,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t\t} ),\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._( 'Default Department' ),\n\t\t\t\tfield: 'default_department_id',\n\t\t\t\tin_column: 2,\n\t\t\t\tlayout_name: 'global_department',\n\t\t\t\tapi_class: TTAPI.APIDepartment,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: true,\n\t\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t\t} ),\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._( 'Policy Group' ),\n\t\t\t\tfield: 'policy_group_id',\n\t\t\t\tin_column: 3,\n\t\t\t\tlayout_name: 'global_policy_group',\n\t\t\t\tapi_class: TTAPI.APIPolicyGroup,\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\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Title' ),\n\t\t\t\tfield: 'title_id',\n\t\t\t\tin_column: 3,\n\t\t\t\tlayout_name: 'global_job_title',\n\t\t\t\tapi_class: TTAPI.APIUserTitle,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tcustomSearchFilter: ( function( args ) {\n\t\t\t\t\treturn $this.setCompanyIdFilter( args );\n\t\t\t\t} ),\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._( 'Country' ),\n\t\t\t\tin_column: 3,\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: 3,\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\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: 3,\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._( 'SIN/SSN' ),\n\t\t\t\tfield: 'sin',\n\t\t\t\tbasic_search: false,\n\t\t\t\tadv_search: true,\n\t\t\t\tin_column: 3,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} )\n\t\t];\n\t}\n\n\tsetCompanyIdFilter( args ) {\n\n\t\tif ( !args ) {\n\t\t\targs = { filter_data: { company_id: this.select_company_id } };\n\n\t\t} else {\n\t\t\tif ( !args.filter_data ) {\n\t\t\t\targs.filter_data = { company_id: this.select_company_id };\n\t\t\t} else {\n\t\t\t\targs.filter_data.company_id = this.select_company_id;\n\t\t\t}\n\t\t}\n\n\t\treturn args;\n\t}\n\n\tcleanWhenUnloadView( callBack ) {\n\n\t\t$( '#employee_view_container' ).remove();\n\t\tsuper.cleanWhenUnloadView( callBack );\n\t}\n\n\tgetFilterColumnsFromDisplayColumns( column_filter, enable_system_columns ) {\n\t\tif ( column_filter == undefined ) {\n\t\t\tcolumn_filter = {};\n\t\t}\n\t\tcolumn_filter.company_id = true;\n\t\tcolumn_filter.latitude = true;\n\t\tcolumn_filter.longitude = true;\n\t\treturn this._getFilterColumnsFromDisplayColumns( column_filter, enable_system_columns );\n\t}\n\n\tgetPunchTagFilterData() {\n\t\tif ( !this.current_edit_record || !this.current_edit_record.user_id ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tvar filter_data = {\n\t\t\tstatus_id: 10,\n\t\t\tuser_id: this.current_edit_record.id,\n\t\t\tuser_group_id: this.current_edit_record.group_id,\n\t\t\tbranch_id: this.current_edit_record.default_branch_id,\n\t\t\tdepartment_id: this.current_edit_record.default_department_id,\n\t\t\tjob_id: this.current_edit_record.default_job_id,\n\t\t\tjob_item_id: this.current_edit_record.default_job_item_id,\n\t\t};\n\n\t\treturn filter_data;\n\t}\n\n\tgetHierarchyTabHtml() {\n\t\treturn `<div id=\"tab_hierarchy\" class=\"edit-view-tab-outside\">\n\t\t\t\t\t<div class=\"edit-view-tab\" id=\"tab_hierarchy_content_div\">\n\t\t\t\t\t\t<div class=\"first-column full-width-column\"></div>\n\t\t\t\t\t\t<div class=\"hierarchy-div\">\n\t\t\t\t\t\t\t<span class=\"message\"></span>\n\t\t\t\t\t\t\t<div class=\"save-and-continue-button-div\">\n\t\t\t\t\t\t\t\t<button class=\"tt-button p-button p-component\" type=\"button\">\n\t\t\t\t\t\t\t\t\t<span class=\"icon\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"p-button-label\"></span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>`;\n\t}\n\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTk2MS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQTZDO0FBQ1U7O0FBRWhEO0FBQ1AsMkJBQTJCO0FBQzNCLEVBQUUsQ0FBQztBQUNIOztBQUVBO0FBQ0E7QUFDQTtBQUNBLE9BQU87O0FBRVA7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7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