@chat21/chat21-ionic 3.0.60-rc6 → 3.0.61-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 +44 -0
- package/LICENSE +661 -21
- package/README.md +2 -0
- package/angular.json +2 -0
- package/env.sample +3 -1
- package/package.json +5 -1
- package/src/app/app.component.html +11 -2
- package/src/app/app.component.scss +13 -1
- package/src/app/app.component.ts +70 -23
- package/src/app/app.module.ts +3 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +62 -36
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +2 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +64 -14
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +2 -3
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -2
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -2
- package/src/app/components/ddp-header/ddp-header.component.html +14 -7
- package/src/app/components/ddp-header/ddp-header.component.scss +4 -0
- package/src/app/components/ddp-header/ddp-header.component.ts +21 -2
- package/src/app/components/project-item/project-item.component.html +37 -14
- package/src/app/components/project-item/project-item.component.scss +35 -15
- package/src/app/components/project-item/project-item.component.ts +17 -4
- package/src/app/components/sidebar/sidebar.component.html +210 -0
- package/src/app/components/sidebar/sidebar.component.scss +11 -0
- package/src/app/components/sidebar/sidebar.component.spec.ts +24 -0
- package/src/app/components/sidebar/sidebar.component.ts +400 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +102 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +310 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.spec.ts +24 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +423 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +34 -45
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +154 -84
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -7
- package/src/app/pages/conversations-list/conversations-list.page.ts +34 -9
- package/src/app/pages/profile-info/profile-info.page.html +2 -2
- package/src/app/pages/profile-info/profile-info.page.ts +23 -21
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +3 -3
- package/src/app/shared/shared.module.ts +16 -2
- package/src/assets/i18n/de.json +226 -0
- package/src/assets/i18n/en.json +25 -4
- package/src/assets/i18n/es.json +26 -5
- package/src/assets/i18n/fr.json +226 -0
- package/src/assets/i18n/it.json +26 -5
- package/src/assets/i18n/pt.json +226 -0
- package/src/assets/i18n/ru.json +226 -0
- package/src/assets/i18n/tr.json +227 -0
- package/src/assets/images/language_flag/ar.png +0 -0
- package/src/assets/images/language_flag/bg.png +0 -0
- package/src/assets/images/language_flag/ca.png +0 -0
- package/src/assets/images/language_flag/cs.png +0 -0
- package/src/assets/images/language_flag/da.png +0 -0
- package/src/assets/images/language_flag/de.png +0 -0
- package/src/assets/images/language_flag/el.png +0 -0
- package/src/assets/images/language_flag/en.png +0 -0
- package/src/assets/images/language_flag/es.png +0 -0
- package/src/assets/images/language_flag/fa.png +0 -0
- package/src/assets/images/language_flag/fi.png +0 -0
- package/src/assets/images/language_flag/fr.png +0 -0
- package/src/assets/images/language_flag/he.png +0 -0
- package/src/assets/images/language_flag/hi.png +0 -0
- package/src/assets/images/language_flag/hu.png +0 -0
- package/src/assets/images/language_flag/id.png +0 -0
- package/src/assets/images/language_flag/it.png +0 -0
- package/src/assets/images/language_flag/ja.png +0 -0
- package/src/assets/images/language_flag/ko.png +0 -0
- package/src/assets/images/language_flag/ml-IN.png +0 -0
- package/src/assets/images/language_flag/ne-NP.png +0 -0
- package/src/assets/images/language_flag/nl.png +0 -0
- package/src/assets/images/language_flag/no.png +0 -0
- package/src/assets/images/language_flag/pl.png +0 -0
- package/src/assets/images/language_flag/pt-BR.png +0 -0
- package/src/assets/images/language_flag/pt.png +0 -0
- package/src/assets/images/language_flag/ro.png +0 -0
- package/src/assets/images/language_flag/ru.png +0 -0
- package/src/assets/images/language_flag/sk.png +0 -0
- package/src/assets/images/language_flag/sl.png +0 -0
- package/src/assets/images/language_flag/sv-SE.png +0 -0
- package/src/assets/images/language_flag/ta.png +0 -0
- package/src/assets/images/language_flag/th.png +0 -0
- package/src/assets/images/language_flag/tr.png +0 -0
- package/src/assets/images/language_flag/uk.png +0 -0
- package/src/assets/images/language_flag/vi.png +0 -0
- package/src/assets/images/language_flag/zh-CN.png +0 -0
- package/src/assets/images/language_flag/zh-TW.png +0 -0
- package/src/assets/images/no_image_user.png +0 -0
- package/src/assets/js/chat21client.js +16 -3
- package/src/assets/tiledesk-solo-logo.png +0 -0
- package/src/chat-config-pre-test.json +3 -0
- package/src/chat-config-template.json +4 -1
- package/src/chat-config.json +4 -1
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +54 -43
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +23 -0
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/utils/constants.ts +2 -0
- package/src/chat21-core/utils/utils.ts +12 -1
- package/src/global.scss +451 -3
- package/src/index.html +7 -0
|
@@ -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>
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
+
<ion-toolbar style="height:60px" [ngClass]="{'bottom-border-on-mobile':IS_ON_MOBILE_DEVICE === true }">
|
|
1
2
|
|
|
2
|
-
<ion-
|
|
3
|
-
|
|
4
|
-
<ion-buttons slot="start">
|
|
3
|
+
<ion-buttons *ngIf="IS_ON_MOBILE_DEVICE === true || supportMode === false" slot="start" style="height:60px">
|
|
5
4
|
<ion-button ion-button icon-only fill="clear" (click)="onOpenProfileInfo($event)">
|
|
6
5
|
<ion-icon slot="icon-only" name="reorder-three-outline"></ion-icon>
|
|
7
6
|
</ion-button>
|
|
8
7
|
</ion-buttons>
|
|
9
8
|
|
|
10
9
|
<ion-title>
|
|
11
|
-
<img src="assets/chat21-logo.svg" class="header-logo" alt="header-logo">
|
|
10
|
+
<!-- <img src="assets/chat21-logo.svg" class="header-logo" alt="header-logo"> -->
|
|
12
11
|
<div *ngIf="numberOpenConv > 0" class="number-open-conv">({{numberOpenConv}})</div>
|
|
13
12
|
</ion-title>
|
|
14
13
|
|
|
15
14
|
<ion-buttons slot="end">
|
|
16
15
|
|
|
17
|
-
<ion-button *ngIf="
|
|
18
|
-
<ion-icon slot="icon-only" name="
|
|
16
|
+
<ion-button *ngIf="archived_btn" ion-button fill="clear" (click)="onClickArchivedConversation()">
|
|
17
|
+
<ion-icon slot="icon-only" name="file-tray-full-outline"></ion-icon>
|
|
18
|
+
<!-- <ion-icon name="file-tray-stacked-outline"></ion-icon> -->
|
|
19
|
+
<!-- <ion-icon name="file-tray-full-outline"></ion-icon> -->
|
|
19
20
|
</ion-button>
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
<ion-button *ngIf="teammates_btn" ion-button fill="clear" (click)="onOpenContactsDirectory($event)">
|
|
23
|
+
<!-- <ion-icon slot="icon-only" name="create-outline"></ion-icon> -->
|
|
24
|
+
<ion-icon slot="icon-only" name="people-outline"></ion-icon>
|
|
25
|
+
|
|
26
|
+
</ion-button>
|
|
27
|
+
|
|
28
|
+
<!-- <button ion-button icon-only (click)="onOpenArchivedConversationsPage()">
|
|
22
29
|
<span class="material-icons">history</span>
|
|
23
30
|
</button>
|
|
24
31
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
|
|
2
|
+
import { EventsService } from 'src/app/services/events-service';
|
|
3
3
|
@Component({
|
|
4
4
|
selector: 'app-ddp-header',
|
|
5
5
|
templateUrl: './ddp-header.component.html',
|
|
@@ -8,11 +8,26 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
|
8
8
|
export class DdpHeaderComponent implements OnInit {
|
|
9
9
|
@Input() numberOpenConv: number;
|
|
10
10
|
@Input() supportMode: boolean;
|
|
11
|
+
@Input() archived_btn: boolean;
|
|
12
|
+
@Input() teammates_btn: boolean;
|
|
11
13
|
@Output() openContactsDirectory = new EventEmitter();
|
|
12
14
|
@Output() openProfileInfo = new EventEmitter();
|
|
15
|
+
IS_ON_MOBILE_DEVICE: boolean;
|
|
13
16
|
|
|
14
17
|
constructor(
|
|
15
|
-
|
|
18
|
+
public events: EventsService,
|
|
19
|
+
) {
|
|
20
|
+
this.isOnMobileDevice()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
isOnMobileDevice() {
|
|
24
|
+
this.IS_ON_MOBILE_DEVICE = false;
|
|
25
|
+
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
26
|
+
this.IS_ON_MOBILE_DEVICE = true;
|
|
27
|
+
}
|
|
28
|
+
console.log('[DDP-HEADER] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
29
|
+
return this.IS_ON_MOBILE_DEVICE;
|
|
30
|
+
}
|
|
16
31
|
|
|
17
32
|
ngOnInit() {
|
|
18
33
|
// console.log('DDP HEADER SUPPORT MODE ', this.supportMode)
|
|
@@ -30,4 +45,8 @@ export class DdpHeaderComponent implements OnInit {
|
|
|
30
45
|
}
|
|
31
46
|
// END @Output() //
|
|
32
47
|
|
|
48
|
+
onClickArchivedConversation() {
|
|
49
|
+
this.events.publish('profileInfoButtonClick:changed', 'displayArchived');
|
|
50
|
+
}
|
|
51
|
+
|
|
33
52
|
}
|
|
@@ -32,29 +32,50 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
<ng-template #conversationsInQueue>
|
|
35
|
-
<span
|
|
35
|
+
<span *ngIf="unservedRequestCount > 1">
|
|
36
|
+
{{ unservedRequestCount }}
|
|
37
|
+
{{translationMap?.get('CONVERSATIONS_IN_QUEUE') }}
|
|
38
|
+
</span>
|
|
39
|
+
<span *ngIf="unservedRequestCount === 1">
|
|
40
|
+
{{ unservedRequestCount }}
|
|
41
|
+
{{translationMap?.get('CONVERSATION_IN_QUEUE') }}
|
|
42
|
+
</span>
|
|
43
|
+
<span *ngIf="unservedRequestCount === 0">
|
|
44
|
+
{{translationMap?.get('NO_CONVERSATION_IN_QUEUE') }}
|
|
45
|
+
|
|
46
|
+
</span>
|
|
36
47
|
</ng-template>
|
|
37
48
|
|
|
38
49
|
|
|
39
50
|
<div class="flex-child-right">
|
|
40
|
-
<div class="project-name-project-for-panel" [
|
|
41
|
-
placement="top" content-type="template" (click)="openUnservedConvs()">
|
|
51
|
+
<div class="project-name-project-for-panel" [ngClass]="{'project-name-project-for-panel-on-desktop': IS_ON_MOBILE_DEVICE === false}" [tooltip]="conversationsInQueueOnProjectName"
|
|
52
|
+
[options]="tooltipOptions" placement="top" content-type="template" (click)="openUnservedConvs()">
|
|
42
53
|
<div class="project---name"> {{ project?.id_project?.name }} </div>
|
|
43
54
|
</div>
|
|
44
55
|
<ng-template #conversationsInQueueOnProjectName>
|
|
45
|
-
<span
|
|
56
|
+
<span *ngIf="unservedRequestCount > 1">
|
|
57
|
+
{{ unservedRequestCount }}
|
|
58
|
+
{{translationMap?.get('CONVERSATIONS_IN_QUEUE') }}
|
|
59
|
+
</span>
|
|
60
|
+
<span *ngIf="unservedRequestCount === 1">
|
|
61
|
+
{{ unservedRequestCount }}
|
|
62
|
+
{{translationMap?.get('CONVERSATION_IN_QUEUE') }}
|
|
63
|
+
</span>
|
|
64
|
+
<span *ngIf="unservedRequestCount === 0">
|
|
65
|
+
{{translationMap?.get('NO_CONVERSATION_IN_QUEUE') }}
|
|
66
|
+
</span>
|
|
46
67
|
</ng-template>
|
|
47
68
|
|
|
48
69
|
<div class="availabily-and-busy-wpr">
|
|
49
70
|
<div class="availabily---wpr" tooltip="{{avaialble_status_for_tooltip}}" [options]="tooltipOptions">
|
|
50
|
-
<div class="onoffswitch"
|
|
71
|
+
<div class="onoffswitch"
|
|
51
72
|
(click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
|
|
52
|
-
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox"
|
|
53
|
-
tabindex="0" [checked]="project?.ws_projct_user_available">
|
|
73
|
+
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox"
|
|
74
|
+
id="switchavailableunavailablestatus" tabindex="0" [checked]="project?.ws_projct_user_available">
|
|
54
75
|
<label class="onoffswitch-label" for="switchavailableunavailablestatus"></label>
|
|
55
76
|
</div>
|
|
56
77
|
</div>
|
|
57
|
-
|
|
78
|
+
|
|
58
79
|
|
|
59
80
|
<!-- (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)" -->
|
|
60
81
|
<span *ngIf="project?.ws_projct_user_available === true" class="availibility-status-text"
|
|
@@ -66,7 +87,9 @@
|
|
|
66
87
|
[ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}">
|
|
67
88
|
{{translationMap?.get('Unavailable')}}
|
|
68
89
|
</span>
|
|
69
|
-
|
|
90
|
+
|
|
91
|
+
<div class="project-item--isBusy-icon-wpr" *ngIf="project?.ws_projct_user_isBusy === true" tooltip=" {{translationMap?.get('Busy')}}"
|
|
92
|
+
[options]="tooltipOptions" placement="top" >
|
|
70
93
|
<!-- <span class="material-icons project-item--isBusy-icon">
|
|
71
94
|
access_time
|
|
72
95
|
</span> -->
|
|
@@ -81,18 +104,19 @@
|
|
|
81
104
|
</g>
|
|
82
105
|
</svg>
|
|
83
106
|
</div>
|
|
84
|
-
<span *ngIf="project?.ws_projct_user_isBusy === true"
|
|
107
|
+
<!-- <span *ngIf="project?.ws_projct_user_isBusy === true"
|
|
85
108
|
class="project-item--isBusy-busy-text text-pulse-animation">
|
|
86
109
|
{{translationMap?.get('Busy')}}
|
|
87
|
-
</span>
|
|
110
|
+
</span> -->
|
|
88
111
|
</div>
|
|
89
112
|
</div>
|
|
90
113
|
|
|
91
|
-
<div class="flex-child-view-all-convs">
|
|
114
|
+
<div *ngIf="IS_ON_MOBILE_DEVICE === true" class="flex-child-view-all-convs">
|
|
92
115
|
<div class="view-all-convs-icon-wpr" style="cursor: pointer;" [tooltip]="viewAllConvs"
|
|
93
116
|
[options]="tooltipOptions" placement="top" content-type="template">
|
|
94
117
|
|
|
95
|
-
<ion-button ion-button fill="clear" class="open-unserved-convs-btn"
|
|
118
|
+
<ion-button ion-button fill="clear" class="open-unserved-convs-btn"
|
|
119
|
+
(click)="openUnservedConvsAndGoToProjectList()">
|
|
96
120
|
|
|
97
121
|
<span class="push-icon-and-list-wpr">
|
|
98
122
|
<!-- <svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg"
|
|
@@ -131,7 +155,6 @@
|
|
|
131
155
|
</div>
|
|
132
156
|
<ng-template #viewAllConvs>
|
|
133
157
|
<span>
|
|
134
|
-
|
|
135
158
|
{{translationMap?.get('CHANGE_PINNED_PROJECT') }}</span>
|
|
136
159
|
</ng-template>
|
|
137
160
|
</div>
|
|
@@ -20,10 +20,7 @@
|
|
|
20
20
|
// .main-content-project-for-panel:hover {
|
|
21
21
|
// background-color: rgb(244, 243, 244);
|
|
22
22
|
// }
|
|
23
|
-
|
|
24
|
-
padding: 0px !important;
|
|
25
|
-
width: 296px;
|
|
26
|
-
}
|
|
23
|
+
|
|
27
24
|
|
|
28
25
|
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
29
26
|
.main-content-projects-for-panel::-webkit-scrollbar {
|
|
@@ -218,24 +215,38 @@
|
|
|
218
215
|
}
|
|
219
216
|
}
|
|
220
217
|
|
|
218
|
+
.container-project-for-panel {
|
|
219
|
+
padding: 0px !important;
|
|
220
|
+
width: 296px;
|
|
221
|
+
}
|
|
222
|
+
|
|
221
223
|
.flex-container-project-for-panel {
|
|
222
224
|
display: flex;
|
|
223
225
|
width: 100%;
|
|
224
226
|
justify-content: center;
|
|
225
227
|
align-items: center;
|
|
226
|
-
position: relative;
|
|
228
|
+
// position: relative;
|
|
227
229
|
// cursor: pointer;
|
|
228
230
|
-moz-transition: all 0.2s ease-in;
|
|
229
231
|
-o-transition: all 0.2s ease-in;
|
|
230
232
|
-webkit-transition: all 0.2s ease-in;
|
|
231
233
|
transition: all 0.2s ease-in;
|
|
232
|
-
height:
|
|
234
|
+
height: 64px;
|
|
233
235
|
}
|
|
234
236
|
|
|
235
237
|
.flex-container:hover {
|
|
236
238
|
background-color: rgba(200, 200, 200, 0.2);
|
|
237
239
|
}
|
|
238
240
|
|
|
241
|
+
.flex-child-right {
|
|
242
|
+
flex: 1;
|
|
243
|
+
padding: 18px 0px;
|
|
244
|
+
// width: 227px;
|
|
245
|
+
// width: 207px;
|
|
246
|
+
height: 100%;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
239
250
|
.flex-child-left {
|
|
240
251
|
// flex: 0 0 20%;
|
|
241
252
|
width: 60px;
|
|
@@ -245,14 +256,6 @@
|
|
|
245
256
|
}
|
|
246
257
|
// border: 2px solid yellow;
|
|
247
258
|
|
|
248
|
-
.flex-child-right {
|
|
249
|
-
flex: 1;
|
|
250
|
-
padding: 18px 0px;
|
|
251
|
-
// width: 227px;
|
|
252
|
-
width: 207px;
|
|
253
|
-
height: 100%;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
259
|
.flex-child-view-all-convs {
|
|
257
260
|
width: 40px;
|
|
258
261
|
text-align: center;
|
|
@@ -262,6 +265,18 @@
|
|
|
262
265
|
margin-right: 10px;
|
|
263
266
|
}
|
|
264
267
|
|
|
268
|
+
@media (max-width: 768px) {
|
|
269
|
+
.container-project-for-panel {
|
|
270
|
+
width: 100%;
|
|
271
|
+
}
|
|
272
|
+
.flex-child-view-all-convs {
|
|
273
|
+
margin-right: 20px;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
265
280
|
.status--icon-project-for-panel {
|
|
266
281
|
width: 13px;
|
|
267
282
|
height: 13px;
|
|
@@ -296,7 +311,7 @@
|
|
|
296
311
|
color: #1e2129;
|
|
297
312
|
font-weight: 400;
|
|
298
313
|
margin-left: 10px;
|
|
299
|
-
width: 185px
|
|
314
|
+
width: 185px ;
|
|
300
315
|
// width: 220px !important;
|
|
301
316
|
white-space: nowrap !important;
|
|
302
317
|
overflow: hidden !important;
|
|
@@ -308,6 +323,11 @@
|
|
|
308
323
|
cursor: pointer;
|
|
309
324
|
}
|
|
310
325
|
|
|
326
|
+
|
|
327
|
+
.project-name-project-for-panel-on-desktop {
|
|
328
|
+
width: 217px
|
|
329
|
+
}
|
|
330
|
+
|
|
311
331
|
// .project-name-project-for-panel:hover span {
|
|
312
332
|
// color: rgba(0, 0, 0, 0.35);
|
|
313
333
|
// // display: none;
|
|
@@ -17,6 +17,8 @@ import { AppConfigProvider } from 'src/app/services/app-config';
|
|
|
17
17
|
styleUrls: ['./project-item.component.scss'],
|
|
18
18
|
})
|
|
19
19
|
export class ProjectItemComponent implements OnInit {
|
|
20
|
+
private logger: LoggerService = LoggerInstance.getInstance();
|
|
21
|
+
|
|
20
22
|
@Output() projectIdEvent = new EventEmitter<string>()
|
|
21
23
|
@Output() openUnsevedConvsEvent = new EventEmitter<any>()
|
|
22
24
|
|
|
@@ -29,7 +31,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
29
31
|
ROLE_IS_AGENT: boolean;
|
|
30
32
|
currentUserId: string;
|
|
31
33
|
public translationMap: Map<string, string>;
|
|
32
|
-
|
|
34
|
+
|
|
33
35
|
window_width_is_60: boolean;
|
|
34
36
|
newInnerWidth: any;
|
|
35
37
|
avaialble_status_for_tooltip: string;
|
|
@@ -42,7 +44,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
42
44
|
'hideDelayAfterClick': 3000,
|
|
43
45
|
'hide-delay': 200
|
|
44
46
|
};
|
|
45
|
-
|
|
47
|
+
IS_ON_MOBILE_DEVICE: boolean;
|
|
46
48
|
constructor(
|
|
47
49
|
public wsService: WebsocketService,
|
|
48
50
|
public appStorageService: AppStorageService,
|
|
@@ -59,9 +61,20 @@ export class ProjectItemComponent implements OnInit {
|
|
|
59
61
|
this.translations();
|
|
60
62
|
this.listenToPostMsgs();
|
|
61
63
|
this.onInitWindowWidth();
|
|
64
|
+
|
|
65
|
+
this.isOnMobileDevice()
|
|
62
66
|
// console.log('[PROJECT-ITEM] - on INIT')
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
isOnMobileDevice() {
|
|
70
|
+
this.IS_ON_MOBILE_DEVICE = false;
|
|
71
|
+
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
72
|
+
this.IS_ON_MOBILE_DEVICE = true;
|
|
73
|
+
}
|
|
74
|
+
console.log('[PROJECT-ITEM] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
75
|
+
return this.IS_ON_MOBILE_DEVICE;
|
|
76
|
+
}
|
|
77
|
+
|
|
65
78
|
openUnservedConvs() {
|
|
66
79
|
this.openUnsevedConvsEvent.emit('notificationsorprjctbtn')
|
|
67
80
|
}
|
|
@@ -117,6 +130,8 @@ export class ProjectItemComponent implements OnInit {
|
|
|
117
130
|
'Busy',
|
|
118
131
|
'VIEW_ALL_CONVERSATIONS',
|
|
119
132
|
'CONVERSATIONS_IN_QUEUE',
|
|
133
|
+
'CONVERSATION_IN_QUEUE',
|
|
134
|
+
'NO_CONVERSATION_IN_QUEUE',
|
|
120
135
|
'PINNED_PROJECT',
|
|
121
136
|
'CHANGE_PINNED_PROJECT',
|
|
122
137
|
"CHANGE_TO_YOUR_STATUS_TO_AVAILABLE",
|
|
@@ -208,8 +223,6 @@ export class ProjectItemComponent implements OnInit {
|
|
|
208
223
|
this.logger.log('[PROJECT-ITEM] - user_role ', user_role)
|
|
209
224
|
this.projectIdEvent.emit(project.id_project._id)
|
|
210
225
|
|
|
211
|
-
|
|
212
|
-
|
|
213
226
|
if (user_role === 'agent') {
|
|
214
227
|
this.ROLE_IS_AGENT = true;
|
|
215
228
|
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
<!-- *ngIf="project" -->
|
|
2
|
+
<div class="logo" style="background-color:#1e2129!important; padding-bottom: 5px;min-height: 60px; width: 60px;">
|
|
3
|
+
<a class="logo-img-wpr" [ngClass]="{'small-sidebar-logo-img-wpr' : SIDEBAR_IS_SMALL === true }">
|
|
4
|
+
<div class="logo-img" (click)="goToHome()" style="cursor: pointer;">
|
|
5
|
+
<img class="small-sidebar__logo" src="assets/tiledesk-solo-logo.png" />
|
|
6
|
+
</div>
|
|
7
|
+
</a>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="sidebar-wrapper">
|
|
11
|
+
<!-- // NK start NEW: AVATAR ON THE SIDEBAR -->
|
|
12
|
+
<div class="user tiledesk-nav-user" [ngClass]="{'small-sidebar-tiledesk-nav-user' : SIDEBAR_IS_SMALL === true }"
|
|
13
|
+
fxlayout="column" style="flex-direction: column; box-sizing: border-box; display: flex;">
|
|
14
|
+
<div class="h3 username" style="font-size: 16px;font-weight: 400;margin-top: 15px; margin-bottom: 5px;"
|
|
15
|
+
[ngClass]="{'small-sidebar-userfullname' : SIDEBAR_IS_SMALL === true }">
|
|
16
|
+
|
|
17
|
+
{{ user?.firstname }} {{ user?.lastname }}
|
|
18
|
+
</div>
|
|
19
|
+
<div class="h5 email hint-text mt-8"
|
|
20
|
+
style="color: rgba(255,255,255,.5)!important;font-size: 13px;margin-top: 0px!important;font-weight: 400;"
|
|
21
|
+
[ngClass]="{'small-sidebar-email' : SIDEBAR_IS_SMALL === true }">
|
|
22
|
+
{{ user?.email }}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
<div id="sidebaravatar-img-wpr" class="avatar-container tiledesk-nav-avatar" (click)="openUserDetailSidePanel()"
|
|
27
|
+
style="cursor: pointer;" [ngClass]="{'small-sidebar-avatar' : SIDEBAR_IS_SMALL === true }">
|
|
28
|
+
|
|
29
|
+
<img id="sidebaravatar-img" class="sidebar-avatar" [src]="photo_profile_URL" onerror="this.src='assets/images/no_image_user.png'" />
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<!-- matTooltipClass="custom-mat-tooltip" matTooltip="{{ tooltip_text_for_availability_status}}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" -->
|
|
33
|
+
<!-- (click)="changeAvailabilityState(IS_AVAILABLE = !IS_AVAILABLE)" -->
|
|
34
|
+
<div id="sidebaravatar-status-icon" class="status-icon"
|
|
35
|
+
[ngClass]="{'is-user-online' : IS_AVAILABLE === true, 'is-user-offline' : IS_AVAILABLE === false, 'small-sidebar-status-icon' : SIDEBAR_IS_SMALL === true }">
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
</div>
|
|
39
|
+
<!-- CAMERA ICONS OVER THE AVATAR -->
|
|
40
|
+
<!-- [ngClass]="{'hover-effect' : isOverAvar}" -->
|
|
41
|
+
<!-- <i class="material-icons is-over-camera"
|
|
42
|
+
[ngClass]="{'small-sidebar-camera-icon' : SIDEBAR_IS_SMALL === true, 'is-over-camera-decrease-top':IS_BUSY === true }">
|
|
43
|
+
camera_alt
|
|
44
|
+
</i> -->
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
<!-- matTooltipClass="custom-mat-tooltip" matTooltip="{{ 'Busy' | translate }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" -->
|
|
48
|
+
<div id="sidebaravatar-isbusy-icon-wpr" class="sidebar--isBusy-icon-wpr" *ngIf="IS_BUSY === true" style="cursor:pointer">
|
|
49
|
+
<span id="sidebaravatar-isbusy-icon" class="material-icons sidebar-is-busy-icon">
|
|
50
|
+
access_time
|
|
51
|
+
</span>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="nav-container">
|
|
56
|
+
<!-- [ngClass]="{'is-desktop-menu' : IS_MOBILE_MENU === false, 'is-mobile-menu' : IS_MOBILE_MENU === true }" -->
|
|
57
|
+
<ul style="padding-bottom: 65px;" class="nav">
|
|
58
|
+
|
|
59
|
+
<!-- ------------------------------------------- -->
|
|
60
|
+
<!-- CHAT -->
|
|
61
|
+
<!-- ------------------------------------------- -->
|
|
62
|
+
<li class="item-active" style="cursor: unset;" matTooltipClass="custom-mat-tooltip" matTooltip="Chat"
|
|
63
|
+
#tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
64
|
+
<a class="customAncor">
|
|
65
|
+
<i class="material-icons sidebar-icons">chat</i>
|
|
66
|
+
</a>
|
|
67
|
+
</li>
|
|
68
|
+
|
|
69
|
+
<!-- ------------------------------------------- -->
|
|
70
|
+
<!-- HOME -->
|
|
71
|
+
<!-- ------------------------------------------- -->
|
|
72
|
+
<li (click)="goToHome()" matTooltip="Home" #tooltip="matTooltip" matTooltipPosition='right'
|
|
73
|
+
matTooltipHideDelay="100" matTooltipClass="custom-mat-tooltip">
|
|
74
|
+
<a class="customAncor">
|
|
75
|
+
<i class="material-icons sidebar-icons">
|
|
76
|
+
home
|
|
77
|
+
</i>
|
|
78
|
+
</a>
|
|
79
|
+
</li>
|
|
80
|
+
|
|
81
|
+
<!-- ------------------------------------------- -->
|
|
82
|
+
<!-- REQUESTS (VISITORS) -->
|
|
83
|
+
<!-- ------------------------------------------- -->
|
|
84
|
+
<li (click)="goToConversations()"
|
|
85
|
+
matTooltipClass="custom-mat-tooltip" matTooltip="{{ conversations_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
86
|
+
<a class="customAncor">
|
|
87
|
+
<i class="material-icons sidebar-icons">forum</i>
|
|
88
|
+
</a>
|
|
89
|
+
</li>
|
|
90
|
+
|
|
91
|
+
<!-- ------------------------------------------- -->
|
|
92
|
+
<!-- CONTACTS (LEADS) -->
|
|
93
|
+
<!-- ------------------------------------------- -->
|
|
94
|
+
<li (click)="goToContacts()"
|
|
95
|
+
matTooltipClass="custom-mat-tooltip" matTooltip="{{ contacts_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
96
|
+
<a class="customAncor">
|
|
97
|
+
<i class="material-icons sidebar-icons">contacts</i>
|
|
98
|
+
</a>
|
|
99
|
+
</li>
|
|
100
|
+
|
|
101
|
+
<!-- ------------------------------------------- -->
|
|
102
|
+
<!-- APPS -->
|
|
103
|
+
<!-- ------------------------------------------- -->
|
|
104
|
+
<ng-container *ngIf="isVisibleAPP && USER_ROLE !== 'agent'">
|
|
105
|
+
<li (click)="goToAppStore()"
|
|
106
|
+
matTooltipClass="custom-mat-tooltip" matTooltip="{{ apps_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" >
|
|
107
|
+
<a class="customAncor">
|
|
108
|
+
<i class="material-icons sidebar-icons">apps</i>
|
|
109
|
+
</a>
|
|
110
|
+
</li>
|
|
111
|
+
</ng-container>
|
|
112
|
+
|
|
113
|
+
<!-- ------------------------------------------- -->
|
|
114
|
+
<!-- ANALYTICS -->
|
|
115
|
+
<!-- ------------------------------------------- -->
|
|
116
|
+
<ng-container *ngIf="isVisibleANA && USER_ROLE !== 'agent'">
|
|
117
|
+
<li (click)="goToAnalytics()"
|
|
118
|
+
matTooltipClass="custom-mat-tooltip" matTooltip="{{ analytics_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
119
|
+
<a class="customAncor">
|
|
120
|
+
<i class="material-icons sidebar-icons">trending_up</i>
|
|
121
|
+
</a>
|
|
122
|
+
</li>
|
|
123
|
+
</ng-container>
|
|
124
|
+
|
|
125
|
+
<!-- ------------------------------------------- -->
|
|
126
|
+
<!-- ACTIVITIES -->
|
|
127
|
+
<!-- ------------------------------------------- -->
|
|
128
|
+
<ng-container *ngIf="isVisibleACT">
|
|
129
|
+
<li *ngIf="USER_ROLE !== 'agent'" (click)="goToActivities()"
|
|
130
|
+
matTooltipClass="custom-mat-tooltip" matTooltip="{{ activities_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
131
|
+
<a class="customAncor">
|
|
132
|
+
<i class="material-icons sidebar-icons">assignment</i>
|
|
133
|
+
</a>
|
|
134
|
+
</li>
|
|
135
|
+
</ng-container>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<!-- ------------------------------------------- -->
|
|
139
|
+
<!-- REQUESTS HISTORY -->
|
|
140
|
+
<!-- ------------------------------------------- -->
|
|
141
|
+
<li (click)="goToHistory()"
|
|
142
|
+
matTooltipClass="custom-mat-tooltip" matTooltip="{{ history_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
143
|
+
<a class="customAncor">
|
|
144
|
+
<i class="material-icons sidebar-icons">history</i>
|
|
145
|
+
</a>
|
|
146
|
+
</li>
|
|
147
|
+
|
|
148
|
+
<!-- ------------------------------------------- -->
|
|
149
|
+
<!-- SETTINGS -->
|
|
150
|
+
<!-- ------------------------------------------- -->
|
|
151
|
+
<li *ngIf="USER_ROLE !== 'agent'" (click)="goToSettings_CannedResponses()"
|
|
152
|
+
matTooltipClass="custom-mat-tooltip" matTooltip="{{ settings_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
153
|
+
<a class="customAncor">
|
|
154
|
+
<i class="material-icons sidebar-icons">settings</i>
|
|
155
|
+
</a>
|
|
156
|
+
</li>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<!-- [_prjct_profile_name]="_prjct_profile_name" [plan_subscription_is_active]="plan_subscription_is_active"
|
|
160
|
+
[plan_name]="plan_name"
|
|
161
|
+
[plan_type]="plan_type"
|
|
162
|
+
[isVisiblePAY]="isVisiblePAY"
|
|
163
|
+
[prjct_name]="prjct_name" -->
|
|
164
|
+
<!-- HAS_CLICKED_OPEN_USER_DETAIL {{ HAS_CLICKED_OPEN_USER_DETAIL }} -->
|
|
165
|
+
<!-- [HAS_CLICKED_OPEN_USER_DETAIL]='HAS_CLICKED_OPEN_USER_DETAIL' -->
|
|
166
|
+
<!-- tabindex="-1" style="z-index: 20001;" -->
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<!-- <app-sidebar-user-details
|
|
170
|
+
(onCloseUserDetailsSidebar)='onCloseUserDetailsSidebar($event)'>
|
|
171
|
+
</app-sidebar-user-details> -->
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
</ul>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { IonicModule } from '@ionic/angular';
|
|
3
|
+
|
|
4
|
+
import { SidebarComponent } from './sidebar.component';
|
|
5
|
+
|
|
6
|
+
describe('SidebarComponent', () => {
|
|
7
|
+
let component: SidebarComponent;
|
|
8
|
+
let fixture: ComponentFixture<SidebarComponent>;
|
|
9
|
+
|
|
10
|
+
beforeEach(async(() => {
|
|
11
|
+
TestBed.configureTestingModule({
|
|
12
|
+
declarations: [ SidebarComponent ],
|
|
13
|
+
imports: [IonicModule.forRoot()]
|
|
14
|
+
}).compileComponents();
|
|
15
|
+
|
|
16
|
+
fixture = TestBed.createComponent(SidebarComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|