@chat21/chat21-ionic 3.0.61-rc2 → 3.0.61-rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.61-rc3
4
+ - Replaces console.log with custom loggers
5
+ - Fixes the bug: the info support sidebar is no more displayed
6
+
3
7
  ### 3.0.61-rc2
4
8
  - Fixes the bug: Profile picture in the sidebar does not update when logged in with another user after logging out
5
9
  - Bug Fix: in the "info-profile" page avoid the "uid of undefined" error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
- "version": "3.0.61-rc2",
3
+ "version": "3.0.61-rc3",
4
4
  "author": "Tiledesk SRL",
5
5
  "homepage": "https://ionicframework.com/",
6
6
  "scripts": {
@@ -298,10 +298,10 @@ export class AppComponent implements OnInit {
298
298
  */
299
299
  ngOnInit() {
300
300
  const appconfig = this.appConfigProvider.getConfig();
301
- console.log('[APP-COMP] appconfig', appconfig)
301
+ // console.log('[APP-COMP] appconfig', appconfig)
302
302
  if (appconfig && appconfig.supportMode) {
303
303
  this.SUPPORT_MODE = appconfig.supportMode
304
- console.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
304
+ // console.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
305
305
  } else {
306
306
  this.SUPPORT_MODE = false;
307
307
  }
@@ -850,13 +850,13 @@ export class AppComponent implements OnInit {
850
850
  // if (this.isOnline === false) {
851
851
  // if (AUTH_STATE_ONLINE) {
852
852
  this.IS_ONLINE = true;
853
- console.log('[APP-COMP] IS_ONLINE', this.IS_ONLINE)
853
+ // console.log('[APP-COMP] IS_ONLINE', this.IS_ONLINE)
854
854
  this.goOnLine();
855
855
  // }
856
856
  } else if (state === AUTH_STATE_OFFLINE) {
857
857
  // this.checkTokenAndGoOffline() //se c'è un tiledeskToken salvato, allora aspetta, altrimenti vai offline
858
858
  this.IS_ONLINE = false;
859
- console.log('[APP-COMP] IS_ONLINE', this.IS_ONLINE)
859
+ // console.log('[APP-COMP] IS_ONLINE', this.IS_ONLINE)
860
860
  this.goOffLine()
861
861
  }
862
862
  }, error => {
@@ -95,10 +95,8 @@ export class IonListConversationsComponent extends ListConversationsComponent im
95
95
  this.translate.get('Resolve')
96
96
  .subscribe((text: string) => {
97
97
  // this.deleteContact_msg = text;
98
-
99
-
100
98
  this.archive_btn_tooltip = text;
101
- console.log('[ION-LIST-CONVS-COMP] getTranslations Resolve : ', text)
99
+ // console.log('[ION-LIST-CONVS-COMP] getTranslations Resolve : ', text)
102
100
 
103
101
  });
104
102
  }
@@ -10,9 +10,9 @@
10
10
  [groupDetail]="groupDetail">
11
11
  </app-info-group>
12
12
 
13
- <!-- <app-info-support-group *ngIf="panelType === 'support-group-panel'"
13
+ <app-info-support-group *ngIf="panelType === 'support-group-panel'"
14
14
  [urlConversationSupportGroup]="urlConversationSupportGroup">
15
- </app-info-support-group> -->
15
+ </app-info-support-group>
16
16
 
17
17
 
18
18
  </ion-content>
@@ -25,7 +25,7 @@ export class DdpHeaderComponent implements OnInit {
25
25
  if (/Android|iPhone/i.test(window.navigator.userAgent)) {
26
26
  this.IS_ON_MOBILE_DEVICE = true;
27
27
  }
28
- console.log('[DDP-HEADER] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
28
+ // console.log('[DDP-HEADER] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
29
29
  return this.IS_ON_MOBILE_DEVICE;
30
30
  }
31
31
 
@@ -71,7 +71,7 @@ export class ProjectItemComponent implements OnInit {
71
71
  if (/Android|iPhone/i.test(window.navigator.userAgent)) {
72
72
  this.IS_ON_MOBILE_DEVICE = true;
73
73
  }
74
- console.log('[PROJECT-ITEM] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
74
+ // console.log('[PROJECT-ITEM] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
75
75
  return this.IS_ON_MOBILE_DEVICE;
76
76
  }
77
77
 
@@ -57,7 +57,7 @@ export class SidebarComponent implements OnInit {
57
57
 
58
58
  ngOnInit() {
59
59
  this.DASHBOARD_URL = this.appConfig.getConfig().dashboardUrl + '#/project/';
60
- console.log('[SIDEBAR] DASHBOARD_URL ', this.DASHBOARD_URL)
60
+ // console.log('[SIDEBAR] DASHBOARD_URL ', this.DASHBOARD_URL)
61
61
  this.getStoredProjectAndDashboardBaseUrl()
62
62
  this.subcribeToAuthStateChanged()
63
63
  this.listenTocurrentProjectUserUserAvailability$()
@@ -68,25 +68,25 @@ export class SidebarComponent implements OnInit {
68
68
  getCurrentChatLangAndTranslateLabels() {
69
69
  const browserLang = this.translate.getBrowserLang();
70
70
  const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
71
- console.log('[SIDEBAR] - ngOnInit - currentUser ', currentUser)
72
- console.log('[SIDEBAR] - ngOnInit - browserLang ', browserLang)
71
+ // console.log('[SIDEBAR] - ngOnInit - currentUser ', currentUser)
72
+ // console.log('[SIDEBAR] - ngOnInit - browserLang ', browserLang)
73
73
  let currentUserId = ''
74
74
  if (currentUser) {
75
75
  currentUserId = currentUser.uid
76
- console.log('[SIDEBAR] - ngOnInit - currentUserId ', currentUserId)
76
+ // console.log('[SIDEBAR] - ngOnInit - currentUserId ', currentUserId)
77
77
  }
78
78
 
79
79
  const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
80
- console.log('[SIDEBAR] stored_preferred_lang: ', stored_preferred_lang);
80
+ // console.log('[SIDEBAR] stored_preferred_lang: ', stored_preferred_lang);
81
81
 
82
82
  let chat_lang = '';
83
83
  if (browserLang && !stored_preferred_lang) {
84
84
  chat_lang = browserLang
85
- console.log('[SIDEBAR] chat_lang: ', chat_lang);
85
+ this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
86
86
  } else if (browserLang && stored_preferred_lang) {
87
87
  chat_lang = stored_preferred_lang
88
88
 
89
- console.log('[SIDEBAR] chat_lang: ', chat_lang);
89
+ this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
90
90
  }
91
91
 
92
92
  this.translate.use(chat_lang);
@@ -115,7 +115,7 @@ export class SidebarComponent implements OnInit {
115
115
  getContactsTranslation() {
116
116
  this.translate.get('LABEL_CONTACTS')
117
117
  .subscribe((text: string) => {
118
- console.log('[SIDEBAR] - translate Contacts', text)
118
+ // console.log('[SIDEBAR] - translate Contacts', text)
119
119
  this.contacts_lbl = text
120
120
  });
121
121
  }
@@ -123,7 +123,7 @@ export class SidebarComponent implements OnInit {
123
123
  getAppsTranslation() {
124
124
  this.translate.get('Apps')
125
125
  .subscribe((text: string) => {
126
- console.log('[SIDEBAR] - translate Apps', text)
126
+ // console.log('[SIDEBAR] - translate Apps', text)
127
127
  this.apps_lbl = text
128
128
  });
129
129
  }
@@ -131,7 +131,7 @@ export class SidebarComponent implements OnInit {
131
131
  getAnalyticsTranslation() {
132
132
  this.translate.get('Analytics')
133
133
  .subscribe((text: string) => {
134
- console.log('[SIDEBAR] - translate Analytics', text)
134
+ // console.log('[SIDEBAR] - translate Analytics', text)
135
135
  this.analytics_lbl = text
136
136
  });
137
137
  }
@@ -139,7 +139,7 @@ export class SidebarComponent implements OnInit {
139
139
  getActivitiesTranslation() {
140
140
  this.translate.get('Activities')
141
141
  .subscribe((text: string) => {
142
- console.log('[SIDEBAR] - translate Activities', text)
142
+ // console.log('[SIDEBAR] - translate Activities', text)
143
143
  this.activities_lbl = text
144
144
  });
145
145
  }
@@ -147,7 +147,7 @@ export class SidebarComponent implements OnInit {
147
147
  getHistoryTranslation() {
148
148
  this.translate.get('History')
149
149
  .subscribe((text: string) => {
150
- console.log('[SIDEBAR] - translate History', text)
150
+ // console.log('[SIDEBAR] - translate History', text)
151
151
  this.history_lbl = text
152
152
  });
153
153
  }
@@ -155,7 +155,7 @@ export class SidebarComponent implements OnInit {
155
155
  getSettingsTranslation() {
156
156
  this.translate.get('Settings')
157
157
  .subscribe((text: string) => {
158
- console.log('[SIDEBAR] - translate Settings', text)
158
+ // console.log('[SIDEBAR] - translate Settings', text)
159
159
  this.settings_lbl = text
160
160
  });
161
161
  }
@@ -225,7 +225,7 @@ export class SidebarComponent implements OnInit {
225
225
 
226
226
  listenTocurrentProjectUserUserAvailability$() {
227
227
  this.wsService.currentProjectUserAvailability$.subscribe((projectUser) => {
228
- console.log('[SIDEBAR] - $UBSC TO WS USER AVAILABILITY & BUSY STATUS RES ', projectUser);
228
+ this.logger.log('[SIDEBAR] - $UBSC TO WS USER AVAILABILITY & BUSY STATUS RES ', projectUser);
229
229
 
230
230
  this.IS_AVAILABLE = projectUser['user_available']
231
231
  this.IS_BUSY = projectUser['isBusy']
@@ -249,11 +249,11 @@ export class SidebarComponent implements OnInit {
249
249
  }
250
250
 
251
251
  openUserDetailSidePanel() {
252
- console.log('[SIDEBAR] OPEN UESER DTLS SIDE PANEL')
252
+ this.logger.log('[SIDEBAR] OPEN UESER DTLS SIDE PANEL')
253
253
  this.HAS_CLICKED_OPEN_USER_DETAIL = true
254
- console.log('[SIDEBAR] OPEN USER DTLS SIDE PANEL ', this.HAS_CLICKED_OPEN_USER_DETAIL)
254
+ this.logger.log('[SIDEBAR] OPEN USER DTLS SIDE PANEL ', this.HAS_CLICKED_OPEN_USER_DETAIL)
255
255
  const elSidebarUserDtls = <HTMLElement>document.querySelector('#user-details');
256
- console.log('[SIDEBAR] OPEN USER DTLS SIDE PANEL elSidebarUserDtls ', elSidebarUserDtls)
256
+ this.logger.log('[SIDEBAR] OPEN USER DTLS SIDE PANEL elSidebarUserDtls ', elSidebarUserDtls)
257
257
  if (elSidebarUserDtls) {
258
258
  elSidebarUserDtls.classList.add("active");
259
259
  this.events.publish('userdetailsidebar:opened', true);
@@ -262,16 +262,16 @@ export class SidebarComponent implements OnInit {
262
262
  }
263
263
 
264
264
  onCloseUserDetailsSidebar($event) {
265
- console.log('[SIDEBAR] HAS_CLICKED_CLOSE_USER_DETAIL ', $event)
265
+ this.logger.log('[SIDEBAR] HAS_CLICKED_CLOSE_USER_DETAIL ', $event)
266
266
  this.HAS_CLICKED_OPEN_USER_DETAIL = $event
267
267
  const elemNavbar = <HTMLElement>document.querySelector('.navbar-absolute');
268
- console.log('[SIDEBAR] elemNavBar ', elemNavbar)
268
+ this.logger.log('[SIDEBAR] elemNavBar ', elemNavbar)
269
269
  if (elemNavbar) {
270
270
  elemNavbar.classList.remove("navbar-absolute-custom-class")
271
271
  }
272
272
 
273
273
  const elemNavbarBrand = <HTMLElement>document.querySelector('.navbar-brand');
274
- console.log('[SIDEBAR] elemNavbarBrand ', elemNavbarBrand)
274
+ this.logger.log('[SIDEBAR] elemNavbarBrand ', elemNavbarBrand)
275
275
  if (elemNavbarBrand) {
276
276
  elemNavbarBrand.classList.remove("navbar-brand-z-index-zero")
277
277
  }
@@ -279,14 +279,14 @@ export class SidebarComponent implements OnInit {
279
279
 
280
280
  subcribeToAuthStateChanged() {
281
281
  this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
282
- console.log('[SIDEBAR] BSAuthStateChanged ', state)
282
+ this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
283
283
 
284
284
  if (state === 'online') {
285
285
  const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
286
- console.log('[SIDEBAR] currentUser ', currentUser)
286
+ this.logger.log('[SIDEBAR] currentUser ', currentUser)
287
287
  if (currentUser) {
288
288
  this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(currentUser.uid)
289
- console.log('[SIDEBAR] photo_profile_URL ', this.photo_profile_URL)
289
+ this.logger.log('[SIDEBAR] photo_profile_URL ', this.photo_profile_URL)
290
290
  }
291
291
 
292
292
  }
@@ -299,13 +299,13 @@ export class SidebarComponent implements OnInit {
299
299
  // console.log('[SIDEBAR] stored_project ', stored_project)
300
300
  if (stored_project) {
301
301
  const project = JSON.parse(stored_project)
302
- console.log('[SIDEBAR] project ', project)
302
+ this.logger.log('[SIDEBAR] project ', project)
303
303
 
304
304
  this.project_id = project.id_project.id
305
- console.log('[SIDEBAR] project_id ', this.project_id)
305
+ this.logger.log('[SIDEBAR] project_id ', this.project_id)
306
306
 
307
307
  this.USER_ROLE = project.role;
308
- console.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
308
+ this.logger.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
309
309
  }
310
310
  }
311
311
 
@@ -76,25 +76,25 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
76
76
 
77
77
  listenOpenUserSidebarEvent() {
78
78
  this.events.subscribe('userdetailsidebar:opened', (openUserDetailsSidebar) => {
79
- console.log('[SIDEBAR-USER-DETAILS] - listenOpenUserSidebarEvent - openUserDetailsSidebar', openUserDetailsSidebar);
79
+ this.logger.log('[SIDEBAR-USER-DETAILS] - listenOpenUserSidebarEvent - openUserDetailsSidebar', openUserDetailsSidebar);
80
80
  this.HAS_CLICKED_OPEN_USER_DETAIL = true;
81
81
  });
82
82
  }
83
83
 
84
84
  @HostListener('document:click', ['$event'])
85
85
  clickout(event) {
86
- console.log('[SIDEBAR-USER-DETAILS] clickout event.target)', event.target)
87
- console.log('[SIDEBAR-USER-DETAILS] clickout event.target)', event.target.id)
86
+ this.logger.log('[SIDEBAR-USER-DETAILS] clickout event.target)', event.target)
87
+ this.logger.log('[SIDEBAR-USER-DETAILS] clickout event.target)', event.target.id)
88
88
  const clicked_element_id = event.target.id
89
89
  if (this.eRef.nativeElement.contains(event.target)) {
90
- console.log('[SIDEBAR-USER-DETAILS] clicked inside')
90
+ this.logger.log('[SIDEBAR-USER-DETAILS] clicked inside')
91
91
  } else {
92
- console.log('[SIDEBAR-USER-DETAILS] HAS_CLICKED_OPEN_USER_DETAIL ', this.HAS_CLICKED_OPEN_USER_DETAIL)
92
+ this.logger.log('[SIDEBAR-USER-DETAILS] HAS_CLICKED_OPEN_USER_DETAIL ', this.HAS_CLICKED_OPEN_USER_DETAIL)
93
93
  if (this.HAS_CLICKED_OPEN_USER_DETAIL === true) {
94
94
  if (!clicked_element_id.startsWith("sidebaravatar")) {
95
95
  this.closeUserDetailSidePanel();
96
96
  }
97
- console.log('[SIDEBAR-USER-DETAILS] clicked outside')
97
+ // this.logger.log('[SIDEBAR-USER-DETAILS] clicked outside')
98
98
  }
99
99
  }
100
100
  }
@@ -102,16 +102,16 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
102
102
  getCurrentChatLangAndTranslateLabels() {
103
103
  this.browserLang = this.translate.getBrowserLang();
104
104
  const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
105
- console.log('[SIDEBAR-USER-DETAILS] - ngOnInit - currentUser ', currentUser)
106
- console.log('[SIDEBAR-USER-DETAILS] - ngOnInit - browserLang ', this.browserLang)
105
+ this.logger.log('[SIDEBAR-USER-DETAILS] - ngOnInit - currentUser ', currentUser)
106
+ this.logger.log('[SIDEBAR-USER-DETAILS] - ngOnInit - browserLang ', this.browserLang)
107
107
  let currentUserId = ''
108
108
  if (currentUser) {
109
109
  currentUserId = currentUser.uid
110
- console.log('[SIDEBAR-USER-DETAILS] - ngOnInit - currentUserId ', currentUserId)
110
+ this.logger.log('[SIDEBAR-USER-DETAILS] - ngOnInit - currentUserId ', currentUserId)
111
111
  }
112
112
 
113
113
  const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
114
- console.log('[SIDEBAR-USER-DETAILS] stored_preferred_lang: ', stored_preferred_lang);
114
+ this.logger.log('[SIDEBAR-USER-DETAILS] stored_preferred_lang: ', stored_preferred_lang);
115
115
 
116
116
 
117
117
  this.chat_lang = ''
@@ -119,13 +119,13 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
119
119
  this.chat_lang = this.browserLang
120
120
  this.flag_url = "assets/images/language_flag/" + this.chat_lang + ".png"
121
121
 
122
- console.log('[SIDEBAR-USER-DETAILS] flag_url: ', this.flag_url);
123
- console.log('[SIDEBAR-USER-DETAILS] chat_lang: ', this.chat_lang);
122
+ this.logger.log('[SIDEBAR-USER-DETAILS] flag_url: ', this.flag_url);
123
+ this.logger.log('[SIDEBAR-USER-DETAILS] chat_lang: ', this.chat_lang);
124
124
  } else if (this.browserLang && stored_preferred_lang) {
125
125
  this.chat_lang = stored_preferred_lang
126
126
  this.flag_url = "assets/images/language_flag/" + this.chat_lang + ".png"
127
- console.log('[SIDEBAR-USER-DETAILS] flag_url: ', this.flag_url);
128
- console.log('[SIDEBAR-USER-DETAILS] chat_lang: ', this.chat_lang);
127
+ this.logger.log('[SIDEBAR-USER-DETAILS] flag_url: ', this.flag_url);
128
+ this.logger.log('[SIDEBAR-USER-DETAILS] chat_lang: ', this.chat_lang);
129
129
  }
130
130
 
131
131
  this.translate.use(this.chat_lang);
@@ -143,8 +143,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
143
143
 
144
144
  getOSCODE() {
145
145
  this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK;
146
- console.log('[SIDEBAR-USER-DETAILS] AppConfigService getAppConfig public_Key', this.public_Key);
147
- console.log('[SIDEBAR-USER-DETAILS] AppConfigService getAppConfig', this.appConfigProvider.getConfig());
146
+ this.logger.log('[SIDEBAR-USER-DETAILS] AppConfigService getAppConfig public_Key', this.public_Key);
147
+ this.logger.log('[SIDEBAR-USER-DETAILS] AppConfigService getAppConfig', this.appConfigProvider.getConfig());
148
148
  if (this.public_Key) {
149
149
  let keys = this.public_Key.split("-");
150
150
  this.logger.log('[SIDEBAR-USER-DETAILS] PUBLIC-KEY - public_Key keys', keys)
@@ -173,16 +173,16 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
173
173
  getAvailableTranslation() {
174
174
  this.translate.get('Available')
175
175
  .subscribe((text: string) => {
176
- // this.deleteContact_msg = text;
177
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
176
+
177
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
178
178
  this.IS_AVAILABLE_msg = text
179
179
  });
180
180
  }
181
181
  getUnavailableTranslation() {
182
182
  this.translate.get('Unavailable')
183
183
  .subscribe((text: string) => {
184
- // this.deleteContact_msg = text;
185
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
184
+
185
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
186
186
  this.IS_UNAVAILABLE_msg = text
187
187
  });
188
188
  }
@@ -190,8 +190,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
190
190
  getIsBusyTranslation() {
191
191
  this.translate.get('Busy')
192
192
  .subscribe((text: string) => {
193
- // this.deleteContact_msg = text;
194
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
193
+
194
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
195
195
  this.IS_BUSY_msg = text
196
196
  });
197
197
  }
@@ -199,8 +199,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
199
199
  getSubscriptionPaymentProblemTranslation() {
200
200
  this.translate.get('SubscriptionPaymentProblem')
201
201
  .subscribe((text: string) => {
202
- // this.deleteContact_msg = text;
203
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
202
+
203
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
204
204
  this.SUBSCRIPTION_PAYMENT_PROBLEM_msg = text
205
205
  });
206
206
  }
@@ -208,8 +208,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
208
208
  getThePlanHasExpiredTranslation() {
209
209
  this.translate.get('ThePlanHasExpired')
210
210
  .subscribe((text: string) => {
211
- // this.deleteContact_msg = text;
212
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
211
+
212
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
213
213
  this.THE_PLAN_HAS_EXPIRED_msg = text
214
214
  });
215
215
  }
@@ -218,30 +218,28 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
218
218
  getCurrentStoredProject() {
219
219
  try {
220
220
  const project = localStorage.getItem('last_project')
221
-
222
-
223
221
  if (project) {
224
222
  const projectObjct = JSON.parse(localStorage.getItem('last_project'))
225
- console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ', projectObjct)
223
+ // console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ', projectObjct)
226
224
 
227
225
  this.projectID = projectObjct['id_project']['_id']
228
- console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > PROJECT ID ', this.projectID);
226
+ // console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > PROJECT ID ', this.projectID);
229
227
 
230
228
  this.prjct_name = projectObjct['id_project']['name']
231
- console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > PROJECT NAME ', this.prjct_name);
229
+ // console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > PROJECT NAME ', this.prjct_name);
232
230
 
233
231
  this.plan_type = projectObjct['id_project']['profile']['type'];
234
- console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > PLAN TYPE ', this.plan_type);
232
+ // console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > PLAN TYPE ', this.plan_type);
235
233
 
236
234
  const trial_expired = projectObjct['id_project']['trialExpired']
237
- console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > TRIAL EXPIRED ', trial_expired);
235
+ // console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > TRIAL EXPIRED ', trial_expired);
238
236
 
239
237
  const profile_name = projectObjct['id_project']['profile']['name'];
240
- console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > PROFILE NAME ', profile_name);
238
+ // console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT > PROFILE NAME ', profile_name);
241
239
 
242
240
  this.plan_name = projectObjct['id_project']['profile']['name'];
243
241
  this.plan_subscription_is_active = projectObjct['id_project']['isActiveSubscription'];
244
-
242
+
245
243
  if (this.plan_type === 'free') {
246
244
 
247
245
  if (trial_expired === false) {
@@ -258,14 +256,14 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
258
256
  }
259
257
 
260
258
  } catch (err) {
261
- console.error('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ERR ', err)
259
+ this.logger.error('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ERR ', err)
262
260
  }
263
261
 
264
262
  try {
265
263
  this.tiledeskToken = this.appStorageService.getItem('tiledeskToken');
266
- console.log('[SIDEBAR-USER-DETAILS] - GET STORED TOKEN ', this.tiledeskToken)
264
+ // console.log('[SIDEBAR-USER-DETAILS] - GET STORED TOKEN ', this.tiledeskToken)
267
265
  } catch (err) {
268
- console.error('[SIDEBAR-USER-DETAILS] - GET STORED TOKEN ', err)
266
+ this.logger.error('[SIDEBAR-USER-DETAILS] - GET STORED TOKEN ', err)
269
267
  }
270
268
  }
271
269
 
@@ -274,8 +272,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
274
272
  // this.profile_name_translated = this.PRO_PLAN_TRIAL_msg;
275
273
  this.translate.get('ProPlanTrial')
276
274
  .subscribe((text: string) => {
277
- // this.deleteContact_msg = text;
278
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
275
+
276
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
279
277
  this.profile_name_translated = text
280
278
  });
281
279
  }
@@ -284,8 +282,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
284
282
  // this.profile_name_translated = this.FREE_PLAN_msg;
285
283
  this.translate.get('FreePlan')
286
284
  .subscribe((text: string) => {
287
- // this.deleteContact_msg = text;
288
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
285
+
286
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
289
287
  this.profile_name_translated = text
290
288
  });
291
289
  }
@@ -295,7 +293,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
295
293
  this.translate.get('PaydPlanNamePro')
296
294
  .subscribe((text: string) => {
297
295
  // this.deleteContact_msg = text;
298
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
296
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
299
297
  this.profile_name_translated = text
300
298
  });
301
299
  }
@@ -305,7 +303,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
305
303
  this.translate.get('PaydPlanNameEnterprise')
306
304
  .subscribe((text: string) => {
307
305
  // this.deleteContact_msg = text;
308
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
306
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
309
307
  this.profile_name_translated = text
310
308
  });
311
309
  }
@@ -316,13 +314,13 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
316
314
  this.wsService.currentProjectUserAvailability$
317
315
  .pipe(skip(1))
318
316
  .subscribe((projectUser) => {
319
- console.log('[SIDEBAR-USER-DETAILS] - $UBSC TO WS USER AVAILABILITY & BUSY STATUS RES ', projectUser);
317
+ this.logger.log('[SIDEBAR-USER-DETAILS] - $UBSC TO WS USER AVAILABILITY & BUSY STATUS RES ', projectUser);
320
318
 
321
319
  if (projectUser) {
322
320
  this.IS_AVAILABLE = projectUser['user_available']
323
321
  this.IS_BUSY = projectUser['isBusy']
324
322
  this.USER_ROLE = projectUser['role']
325
- console.log('[SIDEBAR-USER-DETAILS] -translateUserRole 1', this.USER_ROLE)
323
+ // console.log('[SIDEBAR-USER-DETAILS] -translateUserRole 1', this.USER_ROLE)
326
324
  this.translateUserRole(this.USER_ROLE)
327
325
  }
328
326
 
@@ -336,11 +334,11 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
336
334
  }
337
335
 
338
336
  translateUserRole(role) {
339
- console.log('[SIDEBAR-USER-DETAILS] -translateUserRole ', role)
337
+ // console.log('[SIDEBAR-USER-DETAILS] -translateUserRole ', role)
340
338
  this.translate.get(role)
341
339
  .subscribe((text: string) => {
342
- // this.deleteContact_msg = text;
343
- console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
340
+
341
+ // console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
344
342
  this.USER_ROLE_LABEL = text
345
343
  });
346
344
 
@@ -349,9 +347,9 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
349
347
 
350
348
 
351
349
  ngOnChanges() {
352
- console.log('[SIDEBAR-USER-DETAILS] HAS_CLICKED_OPEN_USER_DETAIL', this.HAS_CLICKED_OPEN_USER_DETAIL)
350
+ // console.log('[SIDEBAR-USER-DETAILS] HAS_CLICKED_OPEN_USER_DETAIL', this.HAS_CLICKED_OPEN_USER_DETAIL)
353
351
  var element = document.getElementById('user-details');
354
- console.log('[SIDEBAR-USER-DETAILS] element', element)
352
+ // console.log('[SIDEBAR-USER-DETAILS] element', element)
355
353
  if (this.HAS_CLICKED_OPEN_USER_DETAIL === true) {
356
354
  element.classList.add("active");
357
355
  }
@@ -359,15 +357,15 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
359
357
 
360
358
  subcribeToAuthStateChanged() {
361
359
  this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
362
- console.log('[SIDEBAR] BSAuthStateChanged ', state)
360
+ this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
363
361
 
364
362
  if (state === 'online') {
365
363
  const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
366
- console.log('[SIDEBAR-USER-DETAILS] currentUser ', currentUser)
364
+ this.logger.log('[SIDEBAR-USER-DETAILS] currentUser ', currentUser)
367
365
  if (currentUser) {
368
366
  this.user = currentUser;
369
367
  this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(currentUser.uid)
370
- console.log('[SIDEBAR-USER-DETAILS] photo_profile_URL ', this.photo_profile_URL)
368
+ this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL ', this.photo_profile_URL)
371
369
  }
372
370
 
373
371
  }
@@ -377,7 +375,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
377
375
  closeUserDetailSidePanel() {
378
376
  var element = document.getElementById('user-details');
379
377
  element.classList.remove("active");
380
- console.log('[SIDEBAR-USER-DETAILS] element', element);
378
+ this.logger.log('[SIDEBAR-USER-DETAILS] element', element);
381
379
  this.HAS_CLICKED_OPEN_USER_DETAIL === true
382
380
  // this.onCloseUserDetailsSidebar.emit(false);
383
381
  }
@@ -385,7 +383,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
385
383
 
386
384
 
387
385
  changeAvailabilityStateInUserDetailsSidebar(available) {
388
- console.log('[SIDEBAR-USER-DETAILS] - changeAvailabilityState projectid', this.projectID, ' available 1: ', available);
386
+ this.logger.log('[SIDEBAR-USER-DETAILS] - changeAvailabilityState projectid', this.projectID, ' available 1: ', available);
389
387
 
390
388
  // available = !available
391
389
  // console.log('[SIDEBAR-USER-DETAILS] - changeAvailabilityState projectid', this.projectID, ' available 2 : ', available);
@@ -393,7 +391,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
393
391
  this.wsService.updateCurrentUserAvailability(this.tiledeskToken, this.projectID, available)
394
392
  .subscribe((projectUser: any) => {
395
393
 
396
- console.log('[SIDEBAR-USER-DETAILS] - PROJECT-USER UPDATED ', projectUser)
394
+ this.logger.log('[SIDEBAR-USER-DETAILS] - PROJECT-USER UPDATED ', projectUser)
397
395
 
398
396
  // NOTIFY TO THE USER SERVICE WHEN THE AVAILABLE / UNAVAILABLE BUTTON IS CLICKED
399
397
  // this.usersService.availability_btn_clicked(true)
@@ -404,10 +402,10 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
404
402
  // }
405
403
 
406
404
  }, (error) => {
407
- console.error('[SIDEBAR-USER-DETAILS] - PROJECT-USER UPDATED - ERROR ', error);
405
+ this.logger.error('[SIDEBAR-USER-DETAILS] - PROJECT-USER UPDATED - ERROR ', error);
408
406
 
409
407
  }, () => {
410
- console.log('[SIDEBAR-USER-DETAILS] - PROJECT-USER UPDATED * COMPLETE *');
408
+ this.logger.log('[SIDEBAR-USER-DETAILS] - PROJECT-USER UPDATED * COMPLETE *');
411
409
 
412
410
  });
413
411
  }
@@ -206,7 +206,7 @@ export class ConversationListPage implements OnInit {
206
206
 
207
207
  getAppConfigToHideDiplayBtns() {
208
208
  const appConfig = this.appConfigProvider.getConfig();
209
- console.log('[ION-LIST-CONVS-COMP] - appConfig ', appConfig)
209
+ // console.log('[ION-LIST-CONVS-COMP] - appConfig ', appConfig)
210
210
  if (appConfig && appConfig.supportMode) {
211
211
  this.supportMode = appConfig.supportMode;
212
212
  } else {