@chat21/chat21-ionic 3.4.30-rc2 → 3.4.30

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +4 -119
  2. package/angular.json +0 -1
  3. package/package.json +1 -1
  4. package/src/app/app.component.html +1 -3
  5. package/src/app/app.component.ts +16 -71
  6. package/src/app/chatlib/conversation-detail/message/image/image.component.html +0 -1
  7. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +0 -19
  8. package/src/app/components/canned-response/canned-response.component.html +23 -26
  9. package/src/app/components/canned-response/canned-response.component.scss +2 -0
  10. package/src/app/components/canned-response/canned-response.component.ts +1 -3
  11. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +1 -24
  12. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +0 -30
  13. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +9 -39
  14. package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -2
  15. package/src/app/components/conversation-info/info-group/info-group.component.ts +21 -23
  16. package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.html +1 -1
  17. package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.ts +1 -5
  18. package/src/app/components/navbar/navbar.component.html +3 -3
  19. package/src/app/components/navbar/navbar.component.ts +38 -29
  20. package/src/app/components/project-item/project-item.component.ts +11 -11
  21. package/src/app/components/sidebar/sidebar.component.html +45 -65
  22. package/src/app/components/sidebar/sidebar.component.ts +117 -110
  23. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +2 -2
  24. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +7 -10
  25. package/src/app/modals/create-ticket/create-ticket.page.ts +2 -4
  26. package/src/app/pages/conversation-detail/conversation-detail.page.html +3 -7
  27. package/src/app/pages/conversation-detail/conversation-detail.page.ts +7 -95
  28. package/src/app/pages/conversations-list/conversations-list.page.html +0 -2
  29. package/src/app/pages/conversations-list/conversations-list.page.ts +2 -40
  30. package/src/app/services/global-settings/global-settings.service.ts +3 -11
  31. package/src/app/services/nav-proxy.service.ts +1 -0
  32. package/src/app/services/tiledesk/tiledesk.service.ts +16 -0
  33. package/src/app/services/triggerEvents/triggerEvents.ts +0 -28
  34. package/src/app/services/websocket/websocket-js.ts +534 -59
  35. package/src/app/services/websocket/websocket.service.ts +10 -9
  36. package/src/app/shared/shared.module.ts +2 -11
  37. package/src/app/utils/globals.ts +0 -2
  38. package/src/app/utils/project-utils.ts +2 -2
  39. package/src/app/utils/utils.ts +1 -18
  40. package/src/assets/i18n/ar.json +1 -11
  41. package/src/assets/i18n/az.json +1 -11
  42. package/src/assets/i18n/de.json +1 -11
  43. package/src/assets/i18n/en.json +1 -11
  44. package/src/assets/i18n/es.json +1 -11
  45. package/src/assets/i18n/fr.json +1 -11
  46. package/src/assets/i18n/it.json +3 -13
  47. package/src/assets/i18n/kk.json +1 -11
  48. package/src/assets/i18n/pt.json +1 -11
  49. package/src/assets/i18n/ru.json +1 -11
  50. package/src/assets/i18n/sr.json +1 -11
  51. package/src/assets/i18n/sv.json +1 -11
  52. package/src/assets/i18n/tr.json +1 -11
  53. package/src/assets/i18n/uk.json +1 -11
  54. package/src/assets/i18n/uz.json +1 -12
  55. package/src/assets/js/chat21client.js +0 -36
  56. package/src/assets/test.html +2 -5
  57. package/src/chat-config-template.json +0 -1
  58. package/src/chat-config.json +0 -1
  59. package/src/chat21-core/providers/abstract/upload.service.ts +1 -5
  60. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
  61. package/src/chat21-core/providers/firebase/firebase-upload.service.ts +9 -136
  62. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -1
  63. package/src/chat21-core/providers/native/native-image-repo.ts +1 -1
  64. package/src/chat21-core/providers/native/native-upload-service.ts +45 -143
  65. package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +0 -3
  66. package/src/chat21-core/utils/utils.ts +2 -16
  67. package/src/app/services/project_users/project-users.service.spec.ts +0 -16
  68. package/src/app/services/project_users/project-users.service.ts +0 -63
  69. package/src/app/services/websocket/websocket-js_old.ts +0 -578
  70. package/src/app/services/websocket/websocket.worker.ts +0 -242
  71. package/src/app/utils/permissions.constants.ts +0 -138
  72. package/src/assets/img/no_data_found.png +0 -0
  73. package/src/assets/js/agentDesktop-sdk.js +0 -55
  74. package/src/assets/js/mqtt-keepalive-worker.js +0 -53
  75. package/src/chat21-core/models/projectUsers.ts +0 -19
@@ -15,10 +15,7 @@ import { tranlatedLanguage } from '../../../chat21-core/utils/constants';
15
15
  // utils
16
16
  import { avatarPlaceholder, getColorBck } from 'src/chat21-core/utils/utils-user';
17
17
  import { BRAND_BASE_INFO, LOGOS_ITEMS } from 'src/app/utils/utils-resources';
18
- import { getOSCode, hasRole } from 'src/app/utils/utils';
19
- import { PERMISSIONS } from 'src/app/utils/permissions.constants';
20
- import { ProjectUser } from 'src/chat21-core/models/projectUsers';
21
- import { ProjectUsersService } from 'src/app/services/project_users/project-users.service';
18
+ import { getOSCode } from 'src/app/utils/utils';
22
19
 
23
20
  @Component({
24
21
  selector: 'app-sidebar',
@@ -34,7 +31,7 @@ export class SidebarComponent implements OnInit {
34
31
  IS_AVAILABLE: boolean = false;
35
32
  IS_INACTIVE: boolean = true;
36
33
  IS_BUSY: boolean;
37
- // isVisibleAPP: boolean;
34
+ isVisibleAPP: boolean;
38
35
  isVisibleANA: boolean;
39
36
  isVisibleACT: boolean;
40
37
  isVisibleMON: boolean;
@@ -44,10 +41,9 @@ export class SidebarComponent implements OnInit {
44
41
  project_id: string;
45
42
  DASHBOARD_URL: string;
46
43
  // HAS_CLICKED_OPEN_USER_DETAIL: boolean = false
47
- public translationsMap: Map<string, string>;
44
+ public translationMap: Map<string, string>;
48
45
  public_Key: any;
49
46
  conversations_lbl: string;
50
- whatsappbroadcast_lbl: string;
51
47
  contacts_lbl: string;
52
48
  apps_lbl: string;
53
49
  analytics_lbl: string;
@@ -57,14 +53,19 @@ export class SidebarComponent implements OnInit {
57
53
  countClickOnOpenUserDetailSidebar: number = 0
58
54
  USER_PHOTO_PROFILE_EXIST: boolean;
59
55
  currentUser: any;
60
- URLS: { [key: string]: string} = {};
61
-
62
- public projectUser: ProjectUser;
63
- public roles: { [key: string]: boolean }
64
-
56
+ dashboard_home_url: string;
57
+ dashboard_knb_url: string;
58
+ dashboard_bots_url: string;
59
+ dashboard_convs_url: string;
60
+ dashboard_contacts_url: string;
61
+ dashboard_app_url: string;
62
+ dashboard_analytics_url: string;
63
+ dashboard_activities_url: string;
64
+ dashboard_history_url: string;
65
+ dashboard_settings_url: string;
66
+ tiledesk_url: string;
65
67
  LOGOS_ITEMS = LOGOS_ITEMS;
66
68
  BRAND_BASE_INFO = BRAND_BASE_INFO;
67
- PERMISSIONS = PERMISSIONS;
68
69
  constructor(
69
70
  public imageRepoService: ImageRepoService,
70
71
  public appStorageService: AppStorageService,
@@ -74,13 +75,12 @@ export class SidebarComponent implements OnInit {
74
75
  public wsService: WebsocketService,
75
76
  public appConfigProvider: AppConfigProvider,
76
77
  private translate: TranslateService,
77
- public projectUsersService: ProjectUsersService,
78
78
  public events: EventsService,
79
79
 
80
80
  ) { }
81
81
 
82
82
  ngOnInit() {
83
- this.URLS.TILEDESK = BRAND_BASE_INFO['COMPANY_SITE_URL'] as string
83
+ this.tiledesk_url = BRAND_BASE_INFO['COMPANY_SITE_URL'] as string
84
84
 
85
85
  this.DASHBOARD_URL = this.appConfig.getConfig().dashboardUrl + '#/project/';
86
86
  this.getStoredProjectAndUserRole()
@@ -92,57 +92,36 @@ export class SidebarComponent implements OnInit {
92
92
 
93
93
 
94
94
  getStoredProjectAndUserRole() {
95
- this.events.subscribe('storage:last_project',async (project) =>{
95
+ this.events.subscribe('storage:last_project',project =>{
96
96
  this.logger.log('[SIDEBAR] stored_project ', project)
97
97
  if (project && project !== 'undefined') {
98
98
  this.project_id = project.id_project.id
99
99
  this.USER_ROLE = project.role;
100
100
  this.buildURLs(this.USER_ROLE)
101
- this.projectUser = await this.projectUsersService.getProjectUserByProjectId(project.id_project.id)
102
- this.roles = this.checkRoles()
103
- this.logger.log('[SIDEBAR] roles ', this.roles)
104
101
  }
105
102
  })
106
103
  }
107
104
 
108
105
  buildURLs(USER_ROLE) {
109
- const base = this.DASHBOARD_URL + this.project_id;
110
-
111
- this.URLS = {
112
- HOME: `${base}/home`,
113
- KNOWLEDGEBASE: `${base}/knowledge-bases`,
114
- BOTS: `${base}/bots`,
115
- MONITOR: `${base}/wsrequests`,
116
- WHATSAPP: `${base}/automations`,
117
- CONTACTS: `${base}/contacts`,
118
- APPSTORE: `${base}/app-store`,
119
- ANALYTICS: `${base}/analytics`,
120
- ACTIVITIES: `${base}/activities`,
121
- HISTORY: `${base}/history`,
122
- SETTINGS: USER_ROLE !== 'agent' ? `${base}/widget-set-up` : `${base}/cannedresponses`,
123
- TILEDESK: 'https://www.tiledesk.com'
124
- };
125
-
126
- this.setQueryParamsForAll({ tiledesk_logOut: BRAND_BASE_INFO['LOGOUT_ENABLED'] });
106
+ this.dashboard_home_url = this.DASHBOARD_URL + this.project_id + '/home'
107
+ this.dashboard_knb_url = this.DASHBOARD_URL + this.project_id + '/knowledge-bases'
108
+ this.dashboard_bots_url = this.DASHBOARD_URL + this.project_id + '/bots'
109
+ this.dashboard_convs_url = this.DASHBOARD_URL + this.project_id + '/wsrequests'
110
+ this.dashboard_contacts_url = this.DASHBOARD_URL + this.project_id + '/contacts'
111
+ this.dashboard_app_url = this.DASHBOARD_URL + this.project_id + '/app-store'
112
+ this.dashboard_analytics_url = this.DASHBOARD_URL + this.project_id + '/analytics'
113
+ this.dashboard_activities_url = this.DASHBOARD_URL + this.project_id + '/activities'
114
+ this.dashboard_history_url = this.DASHBOARD_URL + this.project_id + '/history'
115
+ this.dashboard_settings_url = ''
116
+ if (USER_ROLE !== 'agent') {
117
+ this.dashboard_settings_url = this.DASHBOARD_URL + this.project_id + '/widget-set-up'
118
+ } else if (USER_ROLE === 'agent') {
119
+ this.dashboard_settings_url = this.DASHBOARD_URL + this.project_id + '/cannedresponses'
120
+ }
121
+ this.tiledesk_url = 'https://www.tiledesk.com'
127
122
 
128
123
  }
129
124
 
130
- // Funzione helper per aggiungere query params a tutte le URL
131
- setQueryParamsForAll(queryParams: any) {
132
- if (!queryParams) return;
133
-
134
- const queryString = new URLSearchParams(queryParams).toString();
135
-
136
- // Cicla tutte le chiavi di URLS
137
- Object.keys(this.URLS).forEach(key => {
138
- if (this.URLS[key]) {
139
- // Controlla se già ci sono query params
140
- const separator = this.URLS[key].includes('?') ? '&' : '?';
141
- this.URLS[key] = `${this.URLS[key]}${queryString ? separator + queryString : ''}`;
142
- }
143
- });
144
- }
145
-
146
125
  subcribeToAuthStateChanged() {
147
126
  this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
148
127
  this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
@@ -261,7 +240,6 @@ setQueryParamsForAll(queryParams: any) {
261
240
  this.logger.error('[SIDEBAR] - ngOnInit - currentUser not found in storage ')
262
241
  }
263
242
  this.translateLabels()
264
- this.translations()
265
243
  }
266
244
 
267
245
 
@@ -278,7 +256,6 @@ setQueryParamsForAll(queryParams: any) {
278
256
 
279
257
  this.translate.get(keys).subscribe((text: string) => {
280
258
  this.conversations_lbl = text['Conversations'];
281
- this.whatsappbroadcast_lbl = text['WhatsAppBroadcasts']
282
259
  this.contacts_lbl = text['LABEL_CONTACTS']
283
260
  this.apps_lbl = text['Apps']
284
261
  this.analytics_lbl = text['Analytics']
@@ -294,55 +271,13 @@ setQueryParamsForAll(queryParams: any) {
294
271
 
295
272
  this.isVisibleANA = getOSCode("ANA", this.public_Key);
296
273
  this.isVisibleACT = getOSCode("ACT", this.public_Key);
274
+ this.isVisibleAPP = getOSCode("APP", this.public_Key);
297
275
  this.isVisibleMON = getOSCode("MON", this.public_Key);
298
276
  this.isVisibleCNT = getOSCode("CNT", this.public_Key);
299
277
  this.isVisibleKNB = getOSCode("KNB", this.public_Key);
300
-
278
+
301
279
  }
302
280
 
303
-
304
- checkRoles(): { [key: string]: boolean } {
305
- const permissionKeys = [
306
- 'HOME_READ',
307
- 'KB_READ',
308
- 'FLOWS_READ',
309
- 'INBOX_READ',
310
- 'AUTOMATIONSLOG_READ',
311
- 'LEADS_READ',
312
- 'ANALYTICS_READ',
313
- 'ACTIVITIES_READ',
314
- 'HISTORY_READ',
315
- 'PROJECTSETTINGS_GENERAL_READ',
316
- 'PROJECTSETTINGS_DEVELOPER_READ',
317
- 'PROJECTSETTINGS_SMARTASSIGNMENT_READ',
318
- 'PROJECTSETTINGS_NOTIFICATION_READ',
319
- 'PROJECTSETTINGS_SECURITY_READ',
320
- 'PROJECTSETTINGS_BANNED_READ',
321
- 'PROJECTSETTINGS_ADVANCED_READ'
322
- ] as const;
323
-
324
- const roles: { [key: string]: boolean } = {};
325
- for (const key of permissionKeys) {
326
- const permission = PERMISSIONS[key];
327
- roles[permission] = hasRole(this.projectUser, permission);
328
- }
329
-
330
-
331
- let settingRoleKEys = [
332
- 'PROJECTSETTINGS_GENERAL_READ',
333
- 'PROJECTSETTINGS_DEVELOPER_READ',
334
- 'PROJECTSETTINGS_SMARTASSIGNMENT_READ',
335
- 'PROJECTSETTINGS_NOTIFICATION_READ',
336
- 'PROJECTSETTINGS_SECURITY_READ',
337
- 'PROJECTSETTINGS_BANNED_READ',
338
- 'PROJECTSETTINGS_ADVANCED_READ'
339
- ] as const;
340
- roles[PERMISSIONS.SETTINGS_READ] = settingRoleKEys.some(settingKey => roles[PERMISSIONS[settingKey]]);
341
-
342
- return roles;
343
-
344
- }
345
-
346
281
  listenTocurrentProjectUserUserAvailability$() {
347
282
  this.wsService.currentProjectUserAvailability$.subscribe((data) => {
348
283
  this.logger.log('[SIDEBAR] - $UBSC TO WS USER AVAILABILITY & BUSY STATUS RES ', data);
@@ -392,20 +327,92 @@ setQueryParamsForAll(queryParams: any) {
392
327
  }
393
328
  }
394
329
 
330
+ goToHome() {
331
+ let url = this.DASHBOARD_URL + this.project_id + '/home'
332
+ this.dashboard_home_url = url;
333
+ const myWindow = window.open(url, '_self');
334
+ myWindow.focus();
335
+ }
336
+
337
+ goToBots() {
338
+ let url = this.DASHBOARD_URL + this.project_id + '/bots/my-chatbots/all'
339
+ const myWindow = window.open(url, '_self');
340
+ myWindow.focus();
341
+ }
342
+
343
+ goToConversations() {
344
+ let url = this.DASHBOARD_URL + this.project_id + '/wsrequests'
345
+ const myWindow = window.open(url, '_self');
346
+ myWindow.focus();
347
+ }
348
+
349
+ goToContacts() {
350
+ let url = this.DASHBOARD_URL + this.project_id + '/contacts'
351
+ const myWindow = window.open(url, '_self');
352
+ myWindow.focus();
353
+ }
354
+
355
+ goToAppStore() {
356
+ let url = this.DASHBOARD_URL + this.project_id + '/app-store'
357
+ const myWindow = window.open(url, '_self');
358
+ myWindow.focus();
359
+ }
360
+
361
+ goToAnalytics() {
362
+ let url = this.DASHBOARD_URL + this.project_id + '/analytics'
363
+ const myWindow = window.open(url, '_self');
364
+ myWindow.focus();
365
+ }
366
+
367
+ goToActivities() {
368
+ let url = this.DASHBOARD_URL + this.project_id + '/activities'
369
+ const myWindow = window.open(url, '_self');
370
+ myWindow.focus();
371
+ }
372
+
373
+ goToHistory() {
374
+ let url = this.DASHBOARD_URL + this.project_id + '/history'
375
+ const myWindow = window.open(url, '_self');
376
+ myWindow.focus();
377
+ }
378
+
379
+ goToWidgetSetUpOrToCannedResponses() {
380
+ if (this.USER_ROLE !== 'agent') {
381
+ this.goToWidgetSetUp()
382
+ } else if (this.USER_ROLE === 'agent') {
383
+ this.goToSettings_CannedResponses()
384
+ }
385
+ }
386
+
387
+ goToWidgetSetUp() {
388
+ let url = this.DASHBOARD_URL + this.project_id + '/widget-set-up'
389
+ const myWindow = window.open(url, '_self');
390
+ myWindow.focus();
391
+ }
392
+
393
+ goToSettings_CannedResponses() {
394
+ let url = this.DASHBOARD_URL + this.project_id + '/cannedresponses'
395
+ const myWindow = window.open(url, '_self');
396
+ myWindow.focus();
397
+ }
398
+
399
+
400
+
395
401
  public translations() {
396
402
  const keys = [
397
- 'Monitor',
398
- 'Flows',
399
- 'Knowledgebases',
400
- 'WhatsAppBroadcasts',
401
- 'LABEL_CONTACTS',
402
- 'Apps',
403
- 'Analytics',
404
- 'Activities',
405
- 'History',
406
- 'Settings'
403
+ 'LABEL_AVAILABLE',
404
+ 'LABEL_NOT_AVAILABLE',
405
+ 'LABEL_BUSY',
406
+ 'VIEW_ALL_CONVERSATIONS',
407
+ 'CONVERSATIONS_IN_QUEUE',
408
+ 'CONVERSATION_IN_QUEUE',
409
+ 'NO_CONVERSATION_IN_QUEUE',
410
+ 'PINNED_PROJECT',
411
+ 'CHANGE_PINNED_PROJECT',
412
+ "CHANGE_TO_YOUR_STATUS_TO_AVAILABLE",
413
+ "CHANGE_TO_YOUR_STATUS_TO_UNAVAILABLE"
407
414
  ];
408
- this.translationsMap = this.translateService.translateLanguage(keys);
415
+ this.translationMap = this.translateService.translateLanguage(keys);
409
416
  }
410
417
 
411
418
 
@@ -81,11 +81,11 @@
81
81
  [searchable]="false">
82
82
  <ng-template ng-label-tmp let-item="item">
83
83
  <img style="width: 15px;height: 15px;position: relative; top: 1px;" height="15" width="15" [src]="item?.avatar" />
84
- <span id="sidebaravatar_{{item.name}}" style="text-transform: capitalize; margin-left:8px"> {{item.label | translate}} </span>
84
+ <span id="sidebaravatar_{{item.name}}" style="text-transform: capitalize; margin-left:8px"> {{item.label}} </span>
85
85
  </ng-template>
86
86
  <ng-template ng-option-tmp let-item="item" let-index="index">
87
87
  <img style="width: 15px;height: 15px;position: relative; top: 1px;" height="15" width="15" [src]="item?.avatar" />
88
- <span id="sidebaravatar_{{item.name}}" style="text-transform: capitalize; margin-left:8px"> {{item.label | translate}} </span>
88
+ <span id="sidebaravatar_{{item.name}}" style="text-transform: capitalize; margin-left:8px"> {{item.label}} </span>
89
89
  </ng-template>
90
90
  </ng-select>
91
91
  </section>
@@ -25,7 +25,6 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
25
25
  // HAS_CLICKED_OPEN_USER_DETAIL: boolean = false;
26
26
  // @Output() onCloseUserDetailsSidebar = new EventEmitter();
27
27
 
28
- @Input() logOut: boolean;
29
28
 
30
29
  public browserLang: string;
31
30
  private logger: LoggerService = LoggerInstance.getInstance()
@@ -243,9 +242,9 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
243
242
  .set('SubscriptionPaymentProblem', text['SubscriptionPaymentProblem'])
244
243
  .set('ThePlanHasExpired', text['ThePlanHasExpired'])
245
244
 
246
- // this.teammateStatus.forEach(element => {
247
- // element.label = this.translationsMap.get(element.label)
248
- // });
245
+ this.teammateStatus.forEach(element => {
246
+ element.label = this.translationsMap.get(element.label)
247
+ });
249
248
 
250
249
  });
251
250
  }
@@ -262,7 +261,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
262
261
  listenToCurrentStoredProject() {
263
262
  this.events.subscribe('storage:last_project', projectObjct => {
264
263
  if (projectObjct && projectObjct !== 'undefined') {
265
- this.logger.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ', projectObjct)
264
+ // this.logger.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ', projectObjct)
266
265
 
267
266
  //TODO: recuperare info da root e non da id_project
268
267
  this.project = {
@@ -285,8 +284,6 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
285
284
  } else if (this.project.profile.type === 'payment' && this.project.profile.name === 'enterprise') {
286
285
  this.getEnterprisePlanTranslation();
287
286
  }
288
-
289
- this.wsService.subscriptionToWsCurrentProjectUserAvailability(this.project._id, projectObjct._id);
290
287
  }
291
288
  })
292
289
 
@@ -332,14 +329,14 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
332
329
  // this.logger.log('teammateStatus ', this.teammateStatus)
333
330
  this.selectedStatus = this.teammateStatus[2].id;
334
331
  this.logger.debug('[SIDEBAR-USER-DETAILS] - PROFILE_STATUS selected option', this.teammateStatus[2].name);
335
- // this.teammateStatus = this.teammateStatus.slice(0)
332
+ this.teammateStatus = this.teammateStatus.slice(0)
336
333
  } else if (projectUser['user_available'] === false && (projectUser['profileStatus'] === '' || !projectUser['profileStatus'])) {
337
334
  this.selectedStatus = this.teammateStatus[1].id;
338
335
  this.logger.debug('[SIDEBAR-USER-DETAILS] - PROFILE_STATUS selected option', this.teammateStatus[1].name);
339
- // this.teammateStatus = this.teammateStatus.slice(0)
336
+ this.teammateStatus = this.teammateStatus.slice(0)
340
337
  } else if (projectUser['user_available'] === true && (projectUser['profileStatus'] === '' || !projectUser['profileStatus'])) {
341
338
  this.selectedStatus = this.teammateStatus[0].id
342
- // this.teammateStatus = this.teammateStatus.slice(0)
339
+ this.teammateStatus = this.teammateStatus.slice(0)
343
340
  this.logger.debug('[SIDEBAR-USER-DETAILS] - PROFILE_STATUS selected option', this.teammateStatus[0].name);
344
341
  }
345
342
  this.IS_BUSY = projectUser['isBusy']
@@ -9,7 +9,6 @@ import * as uuid from 'uuid';
9
9
  import { EventsService } from 'src/app/services/events-service'
10
10
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
11
11
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
12
- import { ProjectUsersService } from 'src/app/services/project_users/project-users.service'
13
12
 
14
13
  @Component({
15
14
  selector: 'app-create-ticket',
@@ -65,7 +64,6 @@ export class CreateTicketPage implements OnInit {
65
64
  logger: LoggerService = LoggerInstance.getInstance();
66
65
  constructor(
67
66
  public modalController: ModalController,
68
- public projectUsersService: ProjectUsersService,
69
67
  public tiledeskService: TiledeskService,
70
68
  public appConfigProvider: AppConfigProvider,
71
69
  public events: EventsService
@@ -106,7 +104,7 @@ export class CreateTicketPage implements OnInit {
106
104
  // Create the array of the project-users and contacts displayed in the combo box "Requester"
107
105
  // -------------------------------------------------------------------------------------------
108
106
  getProjectUsersAndContacts(projctid: string) {
109
- const projectUsers = this.projectUsersService.getProjectUsersByProjectId(projctid)
107
+ const projectUsers = this.tiledeskService.getProjectUsersByProjectId(projctid)
110
108
  const leads = this.tiledeskService.getAllLeadsActiveWithLimit(projctid,10000)
111
109
 
112
110
  zip(projectUsers, leads).subscribe(
@@ -245,7 +243,7 @@ export class CreateTicketPage implements OnInit {
245
243
  // -------------------------------------------------------------------------------------------------------------------
246
244
  getProjectUserBotsAndDepts(projctid: string) {
247
245
  // this.loadingAssignee = true;
248
- const projectUsers = this.projectUsersService.getProjectUsersByProjectId( projctid)
246
+ const projectUsers = this.tiledeskService.getProjectUsersByProjectId( projctid)
249
247
  const bots = this.tiledeskService.getAllBotByProjectId(projctid)
250
248
  const depts = this.tiledeskService.getDeptsByProjectId(projctid)
251
249
 
@@ -173,7 +173,7 @@
173
173
  <!-- ----------------------------------------------------------- -->
174
174
  <app-canned-response *ngIf="SHOW_CANNED_RESPONSES"
175
175
  id="canned"
176
- [roles]="rolesCanned"
176
+ [canShowCanned]="canShowCanned"
177
177
  [conversationWith]="conversationWith"
178
178
  [conversationWithFullname]="conversationWithFullname"
179
179
  [currentString]="messageStr"
@@ -201,8 +201,7 @@
201
201
  <!-- [tagsCannedFilter]="tagsCannedFilter" -->
202
202
  <!-- openInfoConversation {{openInfoConversation}} - isMobile {{isMobile}} -->
203
203
  <app-message-text-area *ngIf="(openInfoConversation === false && isMobile === true) || (openInfoConversation === true && isMobile === false) || (openInfoConversation === false && isMobile === false)"
204
- [loggedUser]="loggedUser"
205
- [projectUser]="projectUser"
204
+ [loggedUser]="loggedUser"
206
205
  [conversationWith]="conversationWith"
207
206
  [channelType]="channelType"
208
207
  [channel]="conversation?.attributes?.request_channel"
@@ -214,10 +213,8 @@
214
213
  [fileUploadAccept]="fileUploadAccept"
215
214
  [emailSection]="isEmailEnabled"
216
215
  [offlineMsgEmail]="offlineMsgEmail"
217
- [cannedSection]="canShowCanned"
218
216
  [whatsappTemplatesSection]="isWhatsappTemplatesEnabled"
219
217
  [isOpenInfoConversation]="openInfoConversation"
220
- [ticketSection]="isTicketEnabled"
221
218
  [stylesMap]="styleMap"
222
219
  [translationMap]="translationsMap"
223
220
  [dropEvent]="dropEvent"
@@ -226,8 +223,7 @@
226
223
  (onClickOpenCannedResponses)="onClickOpenCannedResponses($event)"
227
224
  (eventSendMessage)="returnSendMessage($event)"
228
225
  (onPresentModalScrollToBottom)="onPresentModalScrollToBottom($event)"
229
- (onOpenFooterSection)="onOpenFooterSection($event)"
230
- (onOpenTicket)="onOpenTicket($event)">
226
+ (onOpenFooterSection)="onOpenFooterSection($event)">
231
227
  </app-message-text-area>
232
228
  <!-- [events]="eventsReplaceTexareaText.asObservable()" -->
233
229
  </ion-row>