@chat21/chat21-ionic 3.4.29 → 3.4.30-rc2
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 +120 -2
- package/angular.json +1 -0
- package/package.json +1 -1
- package/src/app/app.component.html +3 -1
- package/src/app/app.component.ts +71 -12
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +1 -0
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +19 -0
- package/src/app/components/canned-response/canned-response.component.html +26 -23
- package/src/app/components/canned-response/canned-response.component.scss +0 -2
- package/src/app/components/canned-response/canned-response.component.ts +3 -1
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +24 -1
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +30 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +39 -9
- package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -2
- package/src/app/components/conversation-info/info-group/info-group.component.ts +23 -21
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.html +1 -1
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.ts +5 -1
- package/src/app/components/navbar/navbar.component.html +3 -3
- package/src/app/components/navbar/navbar.component.ts +29 -38
- package/src/app/components/project-item/project-item.component.ts +11 -11
- package/src/app/components/sidebar/sidebar.component.html +65 -45
- package/src/app/components/sidebar/sidebar.component.ts +110 -117
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +2 -2
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +10 -7
- package/src/app/modals/create-ticket/create-ticket.page.ts +4 -2
- package/src/app/pages/conversation-detail/conversation-detail.page.html +7 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +95 -7
- package/src/app/pages/conversations-list/conversations-list.page.html +2 -0
- package/src/app/pages/conversations-list/conversations-list.page.ts +40 -2
- package/src/app/services/global-settings/global-settings.service.ts +11 -3
- package/src/app/services/nav-proxy.service.ts +0 -1
- package/src/app/services/project_users/project-users.service.spec.ts +16 -0
- package/src/app/services/project_users/project-users.service.ts +63 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +0 -16
- package/src/app/services/triggerEvents/triggerEvents.ts +28 -0
- package/src/app/services/websocket/websocket-js.ts +59 -534
- package/src/app/services/websocket/websocket-js_old.ts +578 -0
- package/src/app/services/websocket/websocket.service.ts +9 -10
- package/src/app/services/websocket/websocket.worker.ts +242 -0
- package/src/app/shared/shared.module.ts +11 -2
- package/src/app/utils/globals.ts +2 -0
- package/src/app/utils/permissions.constants.ts +138 -0
- package/src/app/utils/project-utils.ts +2 -2
- package/src/app/utils/utils.ts +18 -1
- package/src/assets/i18n/ar.json +11 -1
- package/src/assets/i18n/az.json +11 -1
- package/src/assets/i18n/de.json +11 -1
- package/src/assets/i18n/en.json +11 -1
- package/src/assets/i18n/es.json +11 -1
- package/src/assets/i18n/fr.json +11 -1
- package/src/assets/i18n/it.json +13 -3
- package/src/assets/i18n/kk.json +11 -1
- package/src/assets/i18n/pt.json +11 -1
- package/src/assets/i18n/ru.json +11 -1
- package/src/assets/i18n/sr.json +11 -1
- package/src/assets/i18n/sv.json +11 -1
- package/src/assets/i18n/tr.json +11 -1
- package/src/assets/i18n/uk.json +11 -1
- package/src/assets/i18n/uz.json +12 -1
- package/src/assets/img/no_data_found.png +0 -0
- package/src/assets/js/agentDesktop-sdk.js +55 -0
- package/src/assets/js/chat21client.js +36 -0
- package/src/assets/js/mqtt-keepalive-worker.js +53 -0
- package/src/assets/test.html +5 -2
- package/src/chat-config-template.json +1 -0
- package/src/chat-config.json +1 -0
- package/src/chat21-core/models/projectUsers.ts +19 -0
- package/src/chat21-core/providers/abstract/upload.service.ts +5 -1
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-upload.service.ts +136 -9
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/native/native-image-repo.ts +1 -1
- package/src/chat21-core/providers/native/native-upload-service.ts +143 -45
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +3 -0
- package/src/chat21-core/utils/utils.ts +16 -2
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { LoaderPreviewPage } from 'src/app/modals/loader-preview/loader-preview.
|
|
|
12
12
|
// Services
|
|
13
13
|
import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
|
|
14
14
|
// utils
|
|
15
|
-
import { TYPE_MSG_EMAIL, TYPE_MSG_TEXT, CHANNEL_TYPE } from 'src/chat21-core/utils/constants';
|
|
15
|
+
import { TYPE_MSG_EMAIL, TYPE_MSG_TEXT, CHANNEL_TYPE, TYPE_DIRECT } from 'src/chat21-core/utils/constants';
|
|
16
16
|
// Models
|
|
17
17
|
import { UploadModel } from 'src/chat21-core/models/upload';
|
|
18
18
|
|
|
@@ -26,6 +26,7 @@ import { CopilotService } from 'src/app/services/copilot/copilot.service';
|
|
|
26
26
|
import { BRAND_BASE_INFO } from 'src/app/utils/utils-resources';
|
|
27
27
|
import { ProjectService } from 'src/app/services/projects/project.service';
|
|
28
28
|
import { Project } from 'src/chat21-core/models/projects';
|
|
29
|
+
import { ProjectUser } from 'src/chat21-core/models/projectUsers';
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
@Component({
|
|
@@ -49,6 +50,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
49
50
|
@ViewChild('fileInput', { static: false }) fileInput: any;
|
|
50
51
|
|
|
51
52
|
@Input() loggedUser: UserModel;
|
|
53
|
+
@Input() projectUser: ProjectUser;
|
|
52
54
|
@Input() conversationWith: string;
|
|
53
55
|
@Input() channelType: string;
|
|
54
56
|
@Input() channel: string;
|
|
@@ -61,16 +63,20 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
61
63
|
@Input() emailSection: boolean;
|
|
62
64
|
@Input() offlineMsgEmail: boolean;
|
|
63
65
|
@Input() whatsappTemplatesSection: boolean;
|
|
66
|
+
@Input() ticketSection: boolean
|
|
64
67
|
@Input() isOpenInfoConversation: boolean;
|
|
68
|
+
@Input() cannedSection: boolean;
|
|
65
69
|
@Input() stylesMap: Map<string, string>;
|
|
66
70
|
@Input() translationMap: Map<string, string>;
|
|
67
71
|
@Input() dropEvent: any;
|
|
68
72
|
@Input() disableTextarea: boolean;
|
|
73
|
+
@Input() roles: Array<string>;
|
|
69
74
|
@Output() eventChangeTextArea = new EventEmitter<{msg: string, offsetHeight: number}>();
|
|
70
75
|
@Output() eventSendMessage = new EventEmitter<{msg: string, type: string, metadata?: Object, attributes?: Object}>();
|
|
71
76
|
@Output() onClickOpenCannedResponses = new EventEmitter<boolean>();
|
|
72
77
|
@Output() onPresentModalScrollToBottom = new EventEmitter<boolean>();
|
|
73
78
|
@Output() onOpenFooterSection = new EventEmitter<string>();
|
|
79
|
+
@Output() onOpenTicket = new EventEmitter<boolean>();
|
|
74
80
|
|
|
75
81
|
public project: Project;
|
|
76
82
|
public conversationEnabled = false;
|
|
@@ -162,6 +168,11 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
162
168
|
|
|
163
169
|
this.project = this.projectService.getProject();
|
|
164
170
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea ngOnChanges in [MSG-TEXT-AREA] project', this.project)
|
|
171
|
+
if (this.channelType === TYPE_DIRECT) {
|
|
172
|
+
this.uploadService.initialize();
|
|
173
|
+
} else {
|
|
174
|
+
this.uploadService.initialize(this.project?._id);
|
|
175
|
+
}
|
|
165
176
|
// use case drop
|
|
166
177
|
if (this.dropEvent) {
|
|
167
178
|
this.presentModal(this.dropEvent)
|
|
@@ -288,6 +299,17 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
288
299
|
this.prensentTemplateModal();
|
|
289
300
|
}
|
|
290
301
|
|
|
302
|
+
onClickTicket(option: "open" | "close"){
|
|
303
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] - onClickTicket', option);
|
|
304
|
+
switch(option){
|
|
305
|
+
case "open":
|
|
306
|
+
this.onOpenTicket.emit();
|
|
307
|
+
case "close":
|
|
308
|
+
this.section = 'chat'
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
}
|
|
312
|
+
|
|
291
313
|
|
|
292
314
|
/**
|
|
293
315
|
*
|
|
@@ -384,7 +406,10 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
384
406
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] FIREBASE-UPLOAD presentModal onDidDismiss currentUpload', currentUpload);
|
|
385
407
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] FIREBASE-UPLOAD presentModal onDidDismiss detail.data', detail.data);
|
|
386
408
|
|
|
387
|
-
|
|
409
|
+
const uploadPromise = (that.channelType === TYPE_DIRECT)
|
|
410
|
+
? that.uploadService.upload(that.loggedUser.uid, currentUpload)
|
|
411
|
+
: that.uploadService.uploadFile(that.loggedUser.uid, currentUpload)
|
|
412
|
+
uploadPromise.then((data) => {
|
|
388
413
|
metadata.src = data.src;
|
|
389
414
|
metadata.downloadURL = data.downloadURL;
|
|
390
415
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] FIREBASE-UPLOAD presentModal invio msg metadata::: ', metadata);
|
|
@@ -567,8 +592,10 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
567
592
|
if (!text.includes("/")) {
|
|
568
593
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 1 message: ', message);
|
|
569
594
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 1 message: ", message);
|
|
570
|
-
|
|
595
|
+
|
|
571
596
|
this.sendMessage(text);
|
|
597
|
+
// this.messageString = '';
|
|
598
|
+
|
|
572
599
|
this.countClicks = 0
|
|
573
600
|
} else if (text.includes("/") && pos === 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0) {
|
|
574
601
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 2: ', this.tagsCannedFilter.length);
|
|
@@ -580,9 +607,10 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
580
607
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
581
608
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
582
609
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
|
|
583
|
-
|
|
584
|
-
|
|
610
|
+
|
|
585
611
|
this.sendMessage(text);
|
|
612
|
+
// this.messageString = '';
|
|
613
|
+
|
|
586
614
|
this.countClicks = 0
|
|
587
615
|
} else if (text.includes("/") && pos > 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0 && text.substr(-1) !== '/') {
|
|
588
616
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
|
|
@@ -594,17 +622,19 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
594
622
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
595
623
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
596
624
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
|
|
597
|
-
|
|
598
|
-
|
|
625
|
+
|
|
599
626
|
this.sendMessage(text);
|
|
627
|
+
// this.messageString = '';
|
|
628
|
+
|
|
600
629
|
this.countClicks = 0
|
|
601
630
|
} else if (text.includes("/") && this.tagsCannedFilter.length === 0) {
|
|
602
631
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
|
|
603
632
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message: ', message);
|
|
604
633
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
|
|
605
|
-
|
|
606
|
-
|
|
634
|
+
|
|
607
635
|
this.sendMessage(text);
|
|
636
|
+
// this.messageString = '';
|
|
637
|
+
|
|
608
638
|
this.countClicks = 0
|
|
609
639
|
|
|
610
640
|
}
|
|
@@ -70,8 +70,8 @@ export class InfoContentComponent implements OnInit {
|
|
|
70
70
|
this.route.paramMap.subscribe(params => {
|
|
71
71
|
this.logger.log('[INFO-CONTENT-COMP] initialize params: ', params);
|
|
72
72
|
this.conversationWith = params.get('IDConv');
|
|
73
|
-
this.conversationWithFullname = params.get('FullNameConv');
|
|
74
|
-
this.conv_type = params.get('Convtype');
|
|
73
|
+
this.conversationWithFullname = decodeURIComponent(params.get('FullNameConv'));
|
|
74
|
+
this.conv_type = decodeURIComponent(params.get('Convtype'));
|
|
75
75
|
|
|
76
76
|
const conversationWith_segments = this.conversationWith.split('-');
|
|
77
77
|
|
|
@@ -151,27 +151,29 @@ export class InfoGroupComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
151
151
|
});
|
|
152
152
|
|
|
153
153
|
this.contactsService.loadContactDetail(key).pipe(takeUntil(this.unsubscribe$)).subscribe(user => {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
154
|
+
if(user){
|
|
155
|
+
this.logger.log('InfoGroupComponent group detail loadContactDetail RES', user);
|
|
156
|
+
// this.logger.log('InfoGroupComponent group detail this.presenceService.BSIsOnline.value()', this.presenceService.BSIsOnline.getValue);
|
|
157
|
+
|
|
158
|
+
user.imageurl = this.imageRepoService.getImagePhotoUrl(key)
|
|
159
|
+
// this.member_array.push({ userid: user.uid, avatar: user.avatar, color: user.color, email: user.email, fullname: user.fullname, imageurl: user.imageurl, userOnline: isOnline })
|
|
160
|
+
var index = this.member_array.findIndex(m => m.userid === user.uid);
|
|
161
|
+
this.logger.log('InfoGroupComponent member_array first of push index', index);
|
|
162
|
+
this.logger.log('InfoGroupComponent member_array first of push', this.member_array);
|
|
163
|
+
if (index === -1) {
|
|
164
|
+
this.member_array.push(
|
|
165
|
+
{
|
|
166
|
+
userid: user.uid,
|
|
167
|
+
avatar: user.avatar,
|
|
168
|
+
color: user.color,
|
|
169
|
+
email: user.email,
|
|
170
|
+
fullname: user.fullname,
|
|
171
|
+
imageurl: user.imageurl,
|
|
172
|
+
userOnline: members_isonline_array[user.uid]['isSignin']
|
|
173
|
+
})
|
|
174
|
+
} else {
|
|
175
|
+
this.logger.log('InfoGroupComponent member already exist in member_array');
|
|
176
|
+
}
|
|
175
177
|
}
|
|
176
178
|
}, (error) => {
|
|
177
179
|
this.logger.error('InfoGroupComponent group detail loadContactDetail - ERROR ', error);
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<!-- <ion-icon name="file-tray-full-outline"></ion-icon> -->
|
|
35
35
|
</ion-button>
|
|
36
36
|
|
|
37
|
-
<ion-button *ngIf="writeto_btn" ion-button fill="clear" (click)="onOpenContactsDirectory($event)"
|
|
37
|
+
<ion-button *ngIf="writeto_btn && isVisibleCNT && roles?.[PERMISSIONS.LEADS_READ]" ion-button fill="clear" (click)="onOpenContactsDirectory($event)"
|
|
38
38
|
tooltip="{{translationMap?.get('ViewContactsList')}}" placement="bottom">
|
|
39
39
|
<ion-icon slot="icon-only" name="create-outline"></ion-icon>
|
|
40
40
|
<!-- <ion-icon slot="icon-only" name="people-outline"></ion-icon> -->
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PERMISSIONS } from 'src/app/utils/permissions.constants';
|
|
1
2
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'
|
|
2
3
|
import { ModalController } from '@ionic/angular'
|
|
3
4
|
import { EventsService } from 'src/app/services/events-service'
|
|
@@ -17,6 +18,8 @@ export class HeaderConversationsList implements OnInit {
|
|
|
17
18
|
@Input() sound_btn: string;
|
|
18
19
|
@Input() isMobile: boolean;
|
|
19
20
|
@Input() isVisibleTKT: boolean = true;
|
|
21
|
+
@Input() isVisibleCNT: boolean = true;;
|
|
22
|
+
@Input() roles: Array<string>;
|
|
20
23
|
@Output() onSoundChange = new EventEmitter<string>()
|
|
21
24
|
@Output() openContactsDirectory = new EventEmitter()
|
|
22
25
|
@Output() openProfileInfo = new EventEmitter()
|
|
@@ -24,6 +27,7 @@ export class HeaderConversationsList implements OnInit {
|
|
|
24
27
|
createTicketModal = null
|
|
25
28
|
public translationMap: Map<string, string>;
|
|
26
29
|
|
|
30
|
+
PERMISSIONS = PERMISSIONS;
|
|
27
31
|
constructor(
|
|
28
32
|
public events: EventsService,
|
|
29
33
|
public modalController: ModalController,
|
|
@@ -62,7 +66,7 @@ export class HeaderConversationsList implements OnInit {
|
|
|
62
66
|
// }
|
|
63
67
|
|
|
64
68
|
ngOnInit() {
|
|
65
|
-
|
|
69
|
+
console.log('DDP HEADER SUPPORT MODE ', this.roles)
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
// START @Output() //
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</div>
|
|
6
6
|
<div class="navbar-right">
|
|
7
7
|
<!-- test site -->
|
|
8
|
-
<ng-container *ngIf="project">
|
|
8
|
+
<ng-container *ngIf="project && roles?.[PERMISSIONS.SIMULATE_CONV]">
|
|
9
9
|
<button class="btn simulate-visitor-btn" (click)="testWidgetPage()">
|
|
10
10
|
<i class="material-icons">play_arrow</i>
|
|
11
11
|
<!-- {{translationsMap?.get('NAVBAR.SIMULATE_VISITOR')}} -->
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</ng-container>
|
|
24
24
|
|
|
25
25
|
<!-- ------ PROJECTS DROPDOWN ------ -->
|
|
26
|
-
<ng-container *ngIf="project">
|
|
26
|
+
<ng-container *ngIf="project && roles?.[PERMISSIONS.CHANGE_PROJECT]">
|
|
27
27
|
<li>
|
|
28
28
|
<button class="btn dropdown-toggle project-dropdown" (click)="openDropdownProjects = !openDropdownProjects">
|
|
29
29
|
<span class="project-dropdown" style="text-transform: none"> {{ project?.id_project?.name }} </span>
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</li>
|
|
50
50
|
|
|
51
51
|
<!-- ADD PROJECT -->
|
|
52
|
-
<li id="navbar_create_prjct" *ngIf="
|
|
52
|
+
<li id="navbar_create_prjct" *ngIf="isVisibleMT" (click)="onClickDropdownOption('addProject')" class="add-project">
|
|
53
53
|
<a>
|
|
54
54
|
<i class="material-icons">add_circle_outline </i>
|
|
55
55
|
{{translationsMap?.get('NAVBAR.ADD_PROJECT')}}
|
|
@@ -7,6 +7,10 @@ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service
|
|
|
7
7
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
8
8
|
import { Project } from 'src/chat21-core/models/projects';
|
|
9
9
|
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
10
|
+
import { ProjectUsersService } from 'src/app/services/project_users/project-users.service';
|
|
11
|
+
import { ProjectUser } from 'src/chat21-core/models/projectUsers';
|
|
12
|
+
import { PERMISSIONS } from 'src/app/utils/permissions.constants';
|
|
13
|
+
import { getOSCode, hasRole } from 'src/app/utils/utils';
|
|
10
14
|
|
|
11
15
|
@Component({
|
|
12
16
|
selector: 'app-navbar',
|
|
@@ -30,10 +34,14 @@ export class NavbarComponent implements OnInit {
|
|
|
30
34
|
public openDropdownProjects: boolean = false
|
|
31
35
|
private public_Key: string;
|
|
32
36
|
public isVisible: boolean;
|
|
33
|
-
public
|
|
37
|
+
public isVisibleMT: boolean;
|
|
34
38
|
|
|
39
|
+
public projectUser: ProjectUser;
|
|
40
|
+
public roles: { [key: string]: boolean }
|
|
41
|
+
PERMISSIONS = PERMISSIONS;
|
|
35
42
|
constructor(
|
|
36
43
|
private projectService: ProjectService,
|
|
44
|
+
public projectUsersService: ProjectUsersService,
|
|
37
45
|
private tiledeskAuthService: TiledeskAuthService,
|
|
38
46
|
private appConfigProvider: AppConfigProvider,
|
|
39
47
|
private translateService: CustomTranslateService,
|
|
@@ -96,11 +104,14 @@ export class NavbarComponent implements OnInit {
|
|
|
96
104
|
}
|
|
97
105
|
|
|
98
106
|
getStoredProjectAndUserRole() {
|
|
99
|
-
this.events.subscribe('storage:last_project',project =>{
|
|
107
|
+
this.events.subscribe('storage:last_project',async (project) =>{
|
|
100
108
|
this.logger.log('[NAVBAR] stored_project ', project)
|
|
101
109
|
if (project && project !== 'undefined') {
|
|
102
110
|
this.project = project;
|
|
103
111
|
this.USER_ROLE = project.role;
|
|
112
|
+
this.projectUser = await this.projectUsersService.getProjectUserByProjectId(project.id_project.id)
|
|
113
|
+
this.roles = this.checkRoles()
|
|
114
|
+
this.logger.log('[SIDEBAR] roles ', this.roles)
|
|
104
115
|
}
|
|
105
116
|
})
|
|
106
117
|
}
|
|
@@ -108,44 +119,24 @@ export class NavbarComponent implements OnInit {
|
|
|
108
119
|
getOSCODE() {
|
|
109
120
|
this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK;
|
|
110
121
|
this.logger.log('[NAVBAR] AppConfigService getAppConfig public_Key', this.public_Key)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - pay key&value', pay);
|
|
122
|
-
if (pay[1] === "F") {
|
|
123
|
-
this.isVisible = false;
|
|
124
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - pay isVisible', this.isVisible);
|
|
125
|
-
} else {
|
|
126
|
-
this.isVisible = true;
|
|
127
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - pay isVisible', this.isVisible);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (key.includes("MTT")) {
|
|
132
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - key', key);
|
|
133
|
-
let mt = key.split(":");
|
|
134
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - mt key&value', mt);
|
|
135
|
-
if (mt[1] === "F") {
|
|
136
|
-
this.MT = false;
|
|
137
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - mt is', this.MT);
|
|
138
|
-
} else {
|
|
139
|
-
this.MT = true;
|
|
140
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - mt is', this.MT);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
});
|
|
122
|
+
|
|
123
|
+
this.isVisibleMT = getOSCode("MTT", this.public_Key);
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
checkRoles(): { [key: string]: boolean } {
|
|
128
|
+
const permissionKeys = [
|
|
129
|
+
'CHANGE_PROJECT',
|
|
130
|
+
'SIMULATE_CONV',
|
|
131
|
+
] as const;
|
|
144
132
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
133
|
+
const roles: { [key: string]: boolean } = {};
|
|
134
|
+
for (const key of permissionKeys) {
|
|
135
|
+
const permission = PERMISSIONS[key];
|
|
136
|
+
roles[permission] = hasRole(this.projectUser, permission);
|
|
148
137
|
}
|
|
138
|
+
|
|
139
|
+
return roles;
|
|
149
140
|
|
|
150
141
|
}
|
|
151
142
|
|
|
@@ -87,17 +87,17 @@ export class ProjectItemComponent implements OnInit {
|
|
|
87
87
|
|
|
88
88
|
connetWebsocket(tiledeskToken) {
|
|
89
89
|
|
|
90
|
-
this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] tiledeskToken ', tiledeskToken)
|
|
91
|
-
const appconfig = this.appConfigProvider.getConfig();
|
|
92
|
-
this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', appconfig.wsUrl)
|
|
93
|
-
const WS_URL = appconfig.wsUrl + '?token=' + tiledeskToken
|
|
94
|
-
this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', WS_URL)
|
|
95
|
-
this.webSocketJs.init(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
);
|
|
90
|
+
// this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] tiledeskToken ', tiledeskToken)
|
|
91
|
+
// const appconfig = this.appConfigProvider.getConfig();
|
|
92
|
+
// this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', appconfig.wsUrl)
|
|
93
|
+
// const WS_URL = appconfig.wsUrl + '?token=' + tiledeskToken
|
|
94
|
+
// this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', WS_URL)
|
|
95
|
+
// this.webSocketJs.init(
|
|
96
|
+
// WS_URL,
|
|
97
|
+
// undefined,
|
|
98
|
+
// undefined,
|
|
99
|
+
// undefined
|
|
100
|
+
// );
|
|
101
101
|
|
|
102
102
|
this.getLastProjectStoredAndSubscToWSAvailabilityAndConversations();
|
|
103
103
|
}
|
|
@@ -57,25 +57,27 @@
|
|
|
57
57
|
<!-- ------------------------------------------- -->
|
|
58
58
|
<!-- HOME (click)="goToHome()"" -->
|
|
59
59
|
<!-- ------------------------------------------- -->
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<
|
|
64
|
-
<
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
<ng-container *ngIf="roles?.[PERMISSIONS.HOME_READ]">
|
|
61
|
+
<div matTooltip="Home" #tooltip="matTooltip" matTooltipPosition='right'
|
|
62
|
+
matTooltipHideDelay="100" matTooltipClass="custom-mat-tooltip">
|
|
63
|
+
<a target="_self" href="{{ URLS.HOME }}" class="customAncor">
|
|
64
|
+
<span>
|
|
65
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width="24px" height="24px" fill="none">
|
|
66
|
+
<path d="M240-200h120v-240h240v240h120v-360L480-740 240-560v360Zm-80 80v-480l320-240 320 240v480H520v-240h-80v240H160Zm320-350Z" />
|
|
67
|
+
</svg>
|
|
68
|
+
</span>
|
|
69
|
+
</a>
|
|
70
|
+
</div>
|
|
71
|
+
</ng-container>
|
|
70
72
|
|
|
71
73
|
<!-- -------------------------------------------------------- -->
|
|
72
74
|
<!-- @ Knowledge Bases -->
|
|
73
75
|
<!-- -------------------------------------------------------- -->
|
|
74
|
-
<ng-container *ngIf="USER_ROLE !== 'agent' && isVisibleKNB">
|
|
76
|
+
<ng-container *ngIf="USER_ROLE !== 'agent' && isVisibleKNB && roles?.[PERMISSIONS.KB_READ]">
|
|
75
77
|
<div id="bot-anchor-wpr" matTooltipClass="custom-mat-tooltip"
|
|
76
|
-
matTooltip="
|
|
78
|
+
matTooltip="{{translationsMap?.get('Knowledgebases')}}" #tooltip="matTooltip" matTooltipPosition='right'
|
|
77
79
|
matTooltipHideDelay="100" routerLinkActive="item-active">
|
|
78
|
-
<a target="_self" href="{{
|
|
80
|
+
<a target="_self" href="{{ URLS.KNOWLEDGEBASE }}" class="customAncor">
|
|
79
81
|
<span>
|
|
80
82
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width="24px" height="24px" fill="none">
|
|
81
83
|
<path d="M390-120q-51 0-88-35.5T260-241q-60-8-100-53t-40-106q0-21 5.5-41.5T142-480q-11-18-16.5-38t-5.5-42q0-61 40-105.5t99-52.5q3-51 41-86.5t90-35.5q26 0 48.5 10t41.5 27q18-17 41-27t49-10q52 0 89.5 35t40.5 86q59 8 99.5 53T840-560q0 22-5.5 42T818-480q11 18 16.5 38.5T840-400q0 62-40.5 106.5T699-241q-5 50-41.5 85.5T570-120q-25 0-48.5-9.5T480-156q-19 17-42 26.5t-48 9.5Zm130-590v460q0 21 14.5 35.5T570-200q20 0 34.5-16t15.5-36q-21-8-38.5-21.5T550-306q-10-14-7.5-30t16.5-26q14-10 30-7.5t26 16.5q11 16 28 24.5t37 8.5q33 0 56.5-23.5T760-400q0-5-.5-10t-2.5-10q-17 10-36.5 15t-40.5 5q-17 0-28.5-11.5T640-440q0-17 11.5-28.5T680-480q33 0 56.5-23.5T760-560q0-33-23.5-56T680-640q-11 18-28.5 31.5T613-587q-16 6-31-1t-20-23q-5-16 1.5-31t22.5-20q15-5 24.5-18t9.5-30q0-21-14.5-35.5T570-760q-21 0-35.5 14.5T520-710Zm-80 460v-460q0-21-14.5-35.5T390-760q-21 0-35.5 14.5T340-710q0 16 9 29.5t24 18.5q16 5 23 20t2 31q-6 16-21 23t-31 1q-21-8-38.5-21.5T279-640q-32 1-55.5 24.5T200-560q0 33 23.5 56.5T280-480q17 0 28.5 11.5T320-440q0 17-11.5 28.5T280-400q-21 0-40.5-5T203-420q-2 5-2.5 10t-.5 10q0 33 23.5 56.5T280-320q20 0 37-8.5t28-24.5q10-14 26-16.5t30 7.5q14 10 16.5 26t-7.5 30q-14 19-32 33t-39 22q1 20 16 35.5t35 15.5q21 0 35.5-14.5T440-250Zm40-230Z" />
|
|
@@ -89,10 +91,10 @@
|
|
|
89
91
|
<!-- ---------------------------------- -->
|
|
90
92
|
<!-- Bot (click)="goToBots()" -->
|
|
91
93
|
<!-- ---------------------------------- -->
|
|
92
|
-
<ng-container *ngIf="USER_ROLE !== 'agent'">
|
|
93
|
-
<div id="bot-anchor-wpr" matTooltipClass="custom-mat-tooltip" matTooltip="
|
|
94
|
+
<ng-container *ngIf="USER_ROLE !== 'agent' && roles?.[PERMISSIONS.FLOWS_READ]">
|
|
95
|
+
<div id="bot-anchor-wpr" matTooltipClass="custom-mat-tooltip" matTooltip="{{translationsMap?.get('Flows')}}"
|
|
94
96
|
#tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
95
|
-
<a target="_self" href="{{
|
|
97
|
+
<a target="_self" href="{{ URLS.BOTS }}" id="bot-anchor" #botbtn class="customAncor">
|
|
96
98
|
<span class="bot-icon-wpr">
|
|
97
99
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"width="24px" height="24px" fill="none">
|
|
98
100
|
<path d="M12,21.9c-1,0-1.8-0.3-2.5-1c-0.7-0.7-1-1.5-1-2.5c0-0.8,0.3-1.6,0.8-2.2c0.5-0.6,1.2-1,1.9-1.2v-2.3H5.5V9H3 V2.5h6.4V9H7v2.3h10V8.9c-0.8-0.2-1.4-0.6-1.9-1.2c-0.5-0.6-0.8-1.3-0.8-2.2c0-1,0.3-1.8,1-2.5c0.7-0.7,1.5-1,2.5-1 c1,0,1.8,0.3,2.5,1c0.7,0.7,1,1.5,1,2.5c0,0.8-0.3,1.6-0.8,2.2c-0.5,0.6-1.2,1-1.9,1.2v3.9h-5.7v2.3c0.8,0.2,1.4,0.6,1.9,1.2 c0.5,0.6,0.8,1.3,0.8,2.2c0,1-0.3,1.8-1,2.5C13.8,21.6,13,21.9,12,21.9z M17.8,7.5c0.5,0,1-0.2,1.4-0.6c0.4-0.4,0.6-0.8,0.6-1.4 c0-0.5-0.2-1-0.6-1.4c-0.4-0.4-0.8-0.6-1.4-0.6c-0.5,0-1,0.2-1.4,0.6C16,4.5,15.8,5,15.8,5.5c0,0.5,0.2,1,0.6,1.4S17.2,7.5,17.8,7.5 z M4.5,7.5H8V4H4.5C4.5,4,4.5,7.5,4.5,7.5z M12,20.4c0.5,0,1-0.2,1.4-0.6S14,19,14,18.5s-0.2-1-0.6-1.4c-0.4-0.4-0.8-0.6-1.4-0.6 c-0.5,0-1,0.2-1.4,0.6S10,17.9,10,18.5s0.2,1,0.6,1.4C11,20.2,11.5,20.4,12,20.4z" />
|
|
@@ -105,10 +107,10 @@
|
|
|
105
107
|
<!-- ------------------------------------------- -->
|
|
106
108
|
<!-- Conversations (MONITOR) (click)="goToConversations()" -->
|
|
107
109
|
<!-- ------------------------------------------- -->
|
|
108
|
-
<ng-container *ngIf="isVisibleMON">
|
|
109
|
-
<div matTooltipClass="custom-mat-tooltip" matTooltip="Monitor"
|
|
110
|
+
<ng-container *ngIf="isVisibleMON && roles?.[PERMISSIONS.INBOX_READ]">
|
|
111
|
+
<div matTooltipClass="custom-mat-tooltip" matTooltip="{{translationsMap?.get('Monitor')}}"
|
|
110
112
|
#tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
111
|
-
<a target="_self" href="{{
|
|
113
|
+
<a target="_self" href="{{ URLS.MONITOR }}" class="customAncor">
|
|
112
114
|
<!-- <i class="material-icons sidebar-icons">forum</i> -->
|
|
113
115
|
<span>
|
|
114
116
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width="24px" height="24px" fill="none">
|
|
@@ -123,13 +125,27 @@
|
|
|
123
125
|
|
|
124
126
|
<div class="nav-custom sidebar-bottom">
|
|
125
127
|
|
|
128
|
+
<!-- ----------------------------- -->
|
|
129
|
+
<!-- WA broadcasts -->
|
|
130
|
+
<!-- ----------------------------- -->
|
|
131
|
+
<ng-container *ngIf="USER_ROLE !== 'agent' && roles?.[PERMISSIONS.AUTOMATIONSLOG_READ]">
|
|
132
|
+
<div matTooltipClass="custom-mat-tooltip" matTooltip="{{translationsMap?.get('WhatsAppBroadcasts')}}"
|
|
133
|
+
#tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
134
|
+
<a target="_self" href="{{ URLS.WHATSAPP }}" class="customAncor">
|
|
135
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 48 48" height="24" width="24">
|
|
136
|
+
<path fill="none" fill-rule="evenodd" d="M40.6666 7.3156c-2.1744 -2.1755 -4.7577 -3.8995 -7.6012 -5.0726C30.222 1.0699 27.1745 0.4708 24.0986 0.4801 11.1899 0.4801 0.6816 10.936 0.6763 23.79c-0.0057 4.093 1.0733 8.1145 3.1269 11.655L0.48 47.52l12.4163 -3.2413c3.4367 1.8619 7.2841 2.8363 11.193 2.835h0.0094c12.9076 0 23.415 -10.4569 23.4212 -23.31 0.0078 -3.0653 -0.594 -6.1017 -1.7706 -8.9324 -1.1766 -2.8306 -2.9043 -5.399 -5.0827 -7.5557ZM24.0987 43.1794h-0.0084c-3.4845 0.001 -6.9057 -0.9315 -9.9078 -2.7007l-0.7109 -0.42 -7.3678 1.9236 1.9666 -7.1494 -0.463 -0.735C5.659 31.0132 4.6267 27.4386 4.6306 23.79c0 -10.6815 8.7371 -19.3724 19.4754 -19.3724 5.1513 -0.0092 10.0953 2.0281 13.7446 5.6638 3.6493 3.6357 5.705 8.572 5.715 13.7233 -0.0041 10.6827 -8.737 19.3747 -19.4669 19.3747Zm10.6774 -14.51c-0.5849 -0.2919 -3.465 -1.701 -3.9984 -1.8952 -0.5334 -0.1943 -0.9271 -0.292 -1.3167 0.2919 -0.3895 0.5837 -1.512 1.89 -1.8532 2.2837 -0.3413 0.3938 -0.6826 0.4368 -1.2675 0.1449 -0.5847 -0.2918 -2.4716 -0.9062 -4.707 -2.8906 -1.7399 -1.5446 -2.9137 -3.4513 -3.255 -4.0341 -0.3413 -0.5828 -0.0368 -0.8988 0.2561 -1.1886 0.2636 -0.2614 0.5849 -0.6804 0.8779 -1.0206 0.2929 -0.3403 0.3906 -0.5839 0.5848 -0.9723 0.1943 -0.3885 0.0976 -0.7288 -0.0483 -1.0195 -0.1459 -0.2909 -1.3167 -3.1585 -1.8039 -4.325 -0.4757 -1.1361 -0.9576 -0.9818 -1.3167 -0.9996 -0.3413 -0.0168 -0.7349 -0.021 -1.1225 -0.021 -0.2961 0.0077 -0.5875 0.0765 -0.856 0.2018 -0.2685 0.1253 -0.5081 0.3048 -0.7043 0.5269 -0.5364 0.5838 -2.0485 1.995 -2.0485 4.8594s2.1001 5.6364 2.3898 6.0248c0.2899 0.3886 4.1265 6.2717 9.997 8.7948 1.0901 0.4669 2.204 0.8763 3.337 1.2264 1.4017 0.4431 2.6775 0.3812 3.6854 0.2311 1.1246 -0.167 3.4651 -1.4092 3.9512 -2.7699 0.4862 -1.3608 0.4872 -2.5263 0.3413 -2.7689 -0.146 -0.2426 -0.5366 -0.3895 -1.1225 -0.6804Z" clip-rule="evenodd" stroke-width="1"></path>
|
|
137
|
+
</svg>
|
|
138
|
+
</a>
|
|
139
|
+
</div>
|
|
140
|
+
</ng-container>
|
|
141
|
+
|
|
126
142
|
<!-- ------------------------------------------- -->
|
|
127
143
|
<!-- CONTACTS (LEADS) (click)="goToContacts()" -->
|
|
128
144
|
<!-- ------------------------------------------- -->
|
|
129
|
-
<ng-container *ngIf="isVisibleCNT">
|
|
130
|
-
<div matTooltipClass="custom-mat-tooltip" matTooltip="{{
|
|
145
|
+
<ng-container *ngIf="isVisibleCNT && roles?.[PERMISSIONS.LEADS_READ]">
|
|
146
|
+
<div matTooltipClass="custom-mat-tooltip" matTooltip="{{translationsMap?.get('LABEL_CONTACTS')}}"
|
|
131
147
|
#tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
132
|
-
<a target="_self" href="{{
|
|
148
|
+
<a target="_self" href="{{ URLS.CONTACTS }}" class="customAncor">
|
|
133
149
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width="24px" height="24px" fill="none">
|
|
134
150
|
<path d="M160-40v-80h640v80H160Zm0-800v-80h640v80H160Zm320 400q50 0 85-35t35-85q0-50-35-85t-85-35q-50 0-85 35t-35 85q0 50 35 85t85 35ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm70-80q45-56 109-88t141-32q77 0 141 32t109 88h70v-480H160v480h70Zm118 0h264q-29-20-62.5-30T480-280q-36 0-69.5 10T348-240Zm132-280q-17 0-28.5-11.5T440-560q0-17 11.5-28.5T480-600q17 0 28.5 11.5T520-560q0 17-11.5 28.5T480-520Zm0 40Z" />
|
|
135
151
|
</svg>
|
|
@@ -141,10 +157,10 @@
|
|
|
141
157
|
<!-- ------------------------------------------- -->
|
|
142
158
|
<!-- ANALYTICS (click)="goToAnalytics()" -->
|
|
143
159
|
<!-- ------------------------------------------- -->
|
|
144
|
-
<ng-container *ngIf="
|
|
145
|
-
<div matTooltipClass="custom-mat-tooltip" matTooltip="{{
|
|
160
|
+
<ng-container *ngIf="USER_ROLE !== 'agent' && isVisibleANA && roles?.[PERMISSIONS.ANALYTICS_READ]">
|
|
161
|
+
<div matTooltipClass="custom-mat-tooltip" matTooltip="{{translationsMap?.get('Analytics')}}"
|
|
146
162
|
#tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" >
|
|
147
|
-
<a target="_self" href="{{
|
|
163
|
+
<a target="_self" href="{{ URLS.ANALYTICS }}" class="customAncor">
|
|
148
164
|
<!-- <i class="material-icons sidebar-icons">trending_up</i> -->
|
|
149
165
|
<!-- <i class="material-icons sidebar-icons"> analytics </i> -->
|
|
150
166
|
<!-- <i class="material-icons sidebar-icons"> bar_chart </i> -->
|
|
@@ -160,10 +176,10 @@
|
|
|
160
176
|
<!-- ------------------------------------------- -->
|
|
161
177
|
<!-- ACTIVITIES (click)="goToActivities()" -->
|
|
162
178
|
<!-- ------------------------------------------- -->
|
|
163
|
-
<ng-container *ngIf="isVisibleACT">
|
|
179
|
+
<ng-container *ngIf="isVisibleACT && roles?.[PERMISSIONS.ACTIVITIES_READ]">
|
|
164
180
|
<div *ngIf="USER_ROLE !== 'agent'" matTooltipClass="custom-mat-tooltip"
|
|
165
|
-
matTooltip="{{
|
|
166
|
-
<a target="_self" href="{{
|
|
181
|
+
matTooltip="{{translationsMap?.get('Activities')}}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
182
|
+
<a target="_self" href="{{ URLS.ACTIVITIES }}" class="customAncor">
|
|
167
183
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width="24px" height="24px" fill="none">
|
|
168
184
|
<path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h168q13-36 43.5-58t68.5-22q38 0 68.5 22t43.5 58h168q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm80-80h280v-80H280v80Zm0-160h400v-80H280v80Zm0-160h400v-80H280v80Zm200-190q13 0 21.5-8.5T510-820q0-13-8.5-21.5T480-850q-13 0-21.5 8.5T450-820q0 13 8.5 21.5T480-790ZM200-200v-560 560Z" />
|
|
169
185
|
</svg>
|
|
@@ -174,26 +190,30 @@
|
|
|
174
190
|
<!-- ------------------------------------------- -->
|
|
175
191
|
<!-- REQUESTS HISTORY (click)="goToHistory()" -->
|
|
176
192
|
<!-- ------------------------------------------- -->
|
|
177
|
-
<
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
<
|
|
181
|
-
<
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
193
|
+
<ng-container *ngIf="roles?.[PERMISSIONS.HISTORY_READ]">
|
|
194
|
+
<div matTooltipClass="custom-mat-tooltip" matTooltip="{{translationsMap?.get('History')}}"
|
|
195
|
+
#tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
196
|
+
<a target="_self" href="{{URLS.HISTORY}}" class="customAncor">
|
|
197
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width="24px" height="24px" fill="none">
|
|
198
|
+
<path d="M480-120q-138 0-240.5-91.5T122-440h82q14 104 92.5 172T480-200q117 0 198.5-81.5T760-480q0-117-81.5-198.5T480-760q-69 0-129 32t-101 88h110v80H120v-240h80v94q51-64 124.5-99T480-840q75 0 140.5 28.5t114 77q48.5 48.5 77 114T840-480q0 75-28.5 140.5t-77 114q-48.5 48.5-114 77T480-120Zm112-192L440-464v-216h80v184l128 128-56 56Z" />
|
|
199
|
+
</svg>
|
|
200
|
+
</a>
|
|
201
|
+
</div>
|
|
202
|
+
</ng-container>
|
|
185
203
|
|
|
186
204
|
<!-- ----------------------------------------------------------------------------------- -->
|
|
187
205
|
<!-- SETTINGS // old: goToSettings_CannedResponses() *ngIf="USER_ROLE !== 'agent'" (click)="goToWidgetSetUpOrToCannedResponses()" -->
|
|
188
206
|
<!-- ----------------------------------------------------------------------------------- -->
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
<
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
207
|
+
<ng-container *ngIf="roles?.[PERMISSIONS.SETTINGS_READ]">
|
|
208
|
+
<div *ngIf="USER_ROLE !== 'agent'" matTooltipClass="custom-mat-tooltip"
|
|
209
|
+
matTooltip="{{translationsMap?.get('Settings')}}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
210
|
+
<a target="_self" href="{{URLS.SETTINGS}}" class="customAncor">
|
|
211
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width="24px" height="24px" fill="none">
|
|
212
|
+
<path d="m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z" />
|
|
213
|
+
</svg>
|
|
214
|
+
</a>
|
|
215
|
+
</div>
|
|
216
|
+
</ng-container>
|
|
197
217
|
|
|
198
218
|
<div class="sidebar-separator">
|
|
199
219
|
<!-- <i class="material-symbols-outlined sidebar-icons">
|
|
@@ -210,7 +230,7 @@
|
|
|
210
230
|
<!-- ------------------------------------------- -->
|
|
211
231
|
<!-- LOGO BRAND (click)="goToOfficialSite()" -->
|
|
212
232
|
<!-- ------------------------------------------- -->
|
|
213
|
-
<a target="_blank" href="{{
|
|
233
|
+
<a target="_blank" href="{{ URLS.TILEDESK }}" class="customAncor">
|
|
214
234
|
<img [src]="LOGOS_ITEMS['COMPANY_LOGO_NO_TEXT'].icon">
|
|
215
235
|
</a>
|
|
216
236
|
</div>
|