TimeTrex/interface/html5/dist/employees-user_preference-UserPreferenceViewController.bundle.js

1 line
103 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["employees-user_preference-UserPreferenceViewController"],{8427:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UserPreferenceViewController\": () => (/* binding */ UserPreferenceViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass UserPreferenceViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#user_preference_view_container',\n\n\t\t\tdate_format_array: null,\n\t\t\tother_date_format_array: null,\n\t\t\tjs_date_format_array: null,\n\t\t\tflex_date_format_array: null,\n\t\t\tjquery_date_format_array: null,\n\t\t\ttime_format_array: null,\n\t\t\tjs_time_format_array: null,\n\t\t\tflex_time_format_array: null,\n\t\t\tdate_time_format_array: null,\n\t\t\ttime_unit_format_array: null,\n\t\t\tdistance_format_array: null,\n\t\t\ttime_zone_array: null,\n\t\t\tlocation_timezone_array: null,\n\t\t\tarea_code_timezone_array: null,\n\t\t\ttimesheet_view_array: null,\n\t\t\tstart_week_day_array: null,\n\t\t\tschedule_icalendar_type_array: null,\n\t\t\tlanguage_array: null,\n\t\t\tuser_group_array: null,\n\t\t\tcountry_array: null,\n\t\t\tprovince_array: null,\n\n\t\t\tnotification_status_array: null,\n\t\t\tnotification_type_array: null,\n\t\t\tpriority_array: null,\n\t\t\toriginal_user_preference_notification_data: [],\n\n\t\t\te_province_array: null,\n\t\t\tuser_api: null,\n\t\t\tuser_group_api: null,\n\t\t\tcompany_api: null,\n\n\t\t\tapi_date: null,\n\n\t\t\tuser_preference_notification_api: null\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'UserPreferenceEditView.html';\n\t\tthis.permission_id = 'user_preference';\n\t\tthis.viewId = 'UserPreference';\n\t\tthis.script_name = 'UserPreferenceView';\n\t\tthis.table_name_key = 'user_preference';\n\t\tthis.context_menu_name = $.i18n._( 'Preferences' );\n\t\tthis.navigation_label = $.i18n._( 'Employees' );\n\t\tthis.api = TTAPI.APIUserPreference;\n\t\tthis.api_date = TTAPI.APITTDate;\n\t\tthis.user_api = TTAPI.APIUser;\n\t\tthis.user_group_api = TTAPI.APIUserGroup;\n\t\tthis.company_api = TTAPI.APICompany;\n\t\tthis.user_preference_notification_api = TTAPI.APIUserPreferenceNotification;\n\n\t\tthis.render();\n\n\t\tthis.buildContextMenu();\n\n\t\t//call init data in parent view\n\n\t\tthis.initData();\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: [\n\t\t\t\t'add',\n\t\t\t\t'copy',\n\t\t\t\t'copy_as_new',\n\t\t\t\t'save_and_copy',\n\t\t\t\t'save_and_new',\n\t\t\t\t'delete_icon',\n\t\t\t\t'delete_and_next'\n\t\t\t],\n\t\t\tinclude: []\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tinitOptions() {\n\n\t\tvar $this = this;\n\n\t\tvar options = [\n\t\t\t{ option_name: 'status', api: this.user_api },\n\t\t\t{ option_name: 'country', field_name: 'country', api: this.company_api },\n\t\t\t{ option_name: 'language', api: this.api },\n\t\t\t{ option_name: 'date_format', api: this.api },\n\t\t\t{ option_name: 'time_format', api: this.api },\n\t\t\t{ option_name: 'time_unit_format', api: this.api },\n\t\t\t{ option_name: 'distance_format', api: this.api },\n\t\t\t{ option_name: 'time_zone', api: this.api },\n\t\t\t{ option_name: 'start_week_day', api: this.api },\n\t\t\t{ option_name: 'schedule_icalendar_type', api: this.api },\n\t\t\t{ option_name: 'default_login_screen', api: this.api },\n\t\t\t{ option_name: 'notification_status', api: this.api },\n\t\t\t{ option_name: 'notification_type', api: this.user_preference_notification_api },\n\t\t\t{ option_name: 'priority', api: this.user_preference_notification_api },\n\t\t];\n\n\t\tthis.initDropDownOptions( options );\n\n\t\tthis.user_group_api.getUserGroup( '', false, false, {\n\t\t\tonResu