@chat21/chat21-ionic 3.4.27-rc8 → 3.4.28-rc1
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 +61 -0
- package/package.json +1 -1
- package/src/app/app.component.html +3 -1
- package/src/app/app.component.ts +36 -30
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.scss +3 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +1 -1
- package/src/app/chatlib/conversation-detail/message/avatar/avatar.component.html +1 -1
- package/src/app/chatlib/conversation-detail/message/avatar/avatar.component.ts +4 -4
- package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.scss +3 -3
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +9 -9
- package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.html +1 -1
- package/src/app/components/canned-response/canned-response.component.html +2 -2
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +8 -8
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +9 -0
- 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/copilot-popover/copilot-popover.component.html +1 -1
- package/src/app/components/navbar/navbar.component.ts +1 -1
- package/src/app/components/project-item/project-item.component.ts +59 -41
- package/src/app/components/sidebar/sidebar.component.html +2 -2
- package/src/app/components/sidebar/sidebar.component.ts +18 -0
- 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 +8 -7
- package/src/app/modals/create-ticket/create-ticket.page.html +6 -6
- package/src/app/modals/create-ticket/create-ticket.page.ts +4 -4
- package/src/app/modals/loader-preview/loader-preview.page.ts +1 -1
- package/src/app/modals/send-whatsapp-template/send-whatsapp-template.page.scss +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +35 -10
- package/src/app/pages/conversations-list/conversations-list.page.html +2 -0
- package/src/app/pages/conversations-list/conversations-list.page.ts +48 -10
- package/src/app/pages/profile-info/profile-info.page.ts +3 -3
- package/src/app/services/brand/brand.service.ts +5 -5
- package/src/app/services/global-settings/global-settings.service.ts +7 -2
- package/src/app/services/nav-proxy.service.ts +0 -1
- 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 +0 -2
- package/src/app/utils/globals.ts +2 -0
- package/src/app/utils/utils-resources.ts +8 -7
- package/src/assets/js/agentDesktop-sdk.js +9 -1
- 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/chat21-core/models/project_user.ts +25 -0
- package/src/chat21-core/utils/constants.ts +2 -2
- package/src/chat21-core/utils/utils.ts +6 -0
- /package/src/assets/{images → img}/channel_icons/chat21.svg +0 -0
- /package/src/assets/{images → img}/channel_icons/direct.svg +0 -0
- /package/src/assets/{images → img}/channel_icons/email-logo.svg +0 -0
- /package/src/assets/{images → img}/channel_icons/form-logo_v2.svg +0 -0
- /package/src/assets/{images → img}/channel_icons/group.svg +0 -0
- /package/src/assets/{images → img}/channel_icons/messenger-logo.svg +0 -0
- /package/src/assets/{images → img}/channel_icons/telegram-logo.svg +0 -0
- /package/src/assets/{images → img}/channel_icons/voice.svg +0 -0
- /package/src/assets/{images → img}/channel_icons/whatsapp-logo.svg +0 -0
- /package/src/assets/{images → img}/default-avatar-x-select.png +0 -0
- /package/src/assets/{images → img}/f21ico-done.svg +0 -0
- /package/src/assets/{images → img}/f21ico-done_all.svg +0 -0
- /package/src/assets/{images → img}/f21ico-schedule.svg +0 -0
- /package/src/assets/{images → img}/file-alt-solid.png +0 -0
- /package/src/assets/{images → img}/icons/copilot.svg +0 -0
- /package/src/assets/{images → img}/json-file.svg +0 -0
- /package/src/assets/{images → img}/language_flag/ar.png +0 -0
- /package/src/assets/{images → img}/language_flag/az.png +0 -0
- /package/src/assets/{images → img}/language_flag/bg.png +0 -0
- /package/src/assets/{images → img}/language_flag/ca.png +0 -0
- /package/src/assets/{images → img}/language_flag/cs.png +0 -0
- /package/src/assets/{images → img}/language_flag/da.png +0 -0
- /package/src/assets/{images → img}/language_flag/de.png +0 -0
- /package/src/assets/{images → img}/language_flag/el.png +0 -0
- /package/src/assets/{images → img}/language_flag/en.png +0 -0
- /package/src/assets/{images → img}/language_flag/es.png +0 -0
- /package/src/assets/{images → img}/language_flag/fa.png +0 -0
- /package/src/assets/{images → img}/language_flag/fi.png +0 -0
- /package/src/assets/{images → img}/language_flag/fr.png +0 -0
- /package/src/assets/{images → img}/language_flag/he.png +0 -0
- /package/src/assets/{images → img}/language_flag/hi.png +0 -0
- /package/src/assets/{images → img}/language_flag/hr.png +0 -0
- /package/src/assets/{images → img}/language_flag/hu.png +0 -0
- /package/src/assets/{images → img}/language_flag/id.png +0 -0
- /package/src/assets/{images → img}/language_flag/it.png +0 -0
- /package/src/assets/{images → img}/language_flag/ja.png +0 -0
- /package/src/assets/{images → img}/language_flag/kk.png +0 -0
- /package/src/assets/{images → img}/language_flag/ko.png +0 -0
- /package/src/assets/{images → img}/language_flag/ml-IN.png +0 -0
- /package/src/assets/{images → img}/language_flag/ne-NP.png +0 -0
- /package/src/assets/{images → img}/language_flag/nl.png +0 -0
- /package/src/assets/{images → img}/language_flag/no.png +0 -0
- /package/src/assets/{images → img}/language_flag/pl.png +0 -0
- /package/src/assets/{images → img}/language_flag/pt-BR.png +0 -0
- /package/src/assets/{images → img}/language_flag/pt.png +0 -0
- /package/src/assets/{images → img}/language_flag/ro.png +0 -0
- /package/src/assets/{images → img}/language_flag/ru.png +0 -0
- /package/src/assets/{images → img}/language_flag/sk.png +0 -0
- /package/src/assets/{images → img}/language_flag/sl.png +0 -0
- /package/src/assets/{images → img}/language_flag/sr.png +0 -0
- /package/src/assets/{images → img}/language_flag/sv.png +0 -0
- /package/src/assets/{images → img}/language_flag/ta.png +0 -0
- /package/src/assets/{images → img}/language_flag/th.png +0 -0
- /package/src/assets/{images → img}/language_flag/tr.png +0 -0
- /package/src/assets/{images → img}/language_flag/uk.png +0 -0
- /package/src/assets/{images → img}/language_flag/uz.png +0 -0
- /package/src/assets/{images → img}/language_flag/vi.png +0 -0
- /package/src/assets/{images → img}/language_flag/zh-CN.png +0 -0
- /package/src/assets/{images → img}/language_flag/zh-TW.png +0 -0
- /package/src/assets/{logos → img/logos}/chat21-logo.png +0 -0
- /package/src/assets/{logos → img/logos}/logo.png +0 -0
- /package/src/assets/{logos → img/logos}/tiledesk-logo_new_white.svg +0 -0
- /package/src/assets/{logos → img/logos}/tiledesk-solo-logo.png +0 -0
- /package/src/assets/{logos → img/logos}/tiledesk_logo.svg +0 -0
- /package/src/assets/{logos → img/logos}/tiledesk_logo_no_text.svg +0 -0
- /package/src/assets/{logos → img/logos}/tiledesk_logo_white_small.svg +0 -0
- /package/src/assets/{images → img}/no_conversation.jpg +0 -0
- /package/src/assets/{images → img}/no_image.png +0 -0
- /package/src/assets/{images → img}/no_image_user.png +0 -0
- /package/src/assets/{images → img}/pin.svg +0 -0
- /package/src/assets/{images → img}/pinned.svg +0 -0
- /package/src/assets/{images → img}/priority_icons/high.svg +0 -0
- /package/src/assets/{images → img}/priority_icons/high_v2.svg +0 -0
- /package/src/assets/{images → img}/priority_icons/low.svg +0 -0
- /package/src/assets/{images → img}/priority_icons/low_v2.svg +0 -0
- /package/src/assets/{images → img}/priority_icons/medium.svg +0 -0
- /package/src/assets/{images → img}/priority_icons/medium_v2.svg +0 -0
- /package/src/assets/{images → img}/priority_icons/urgent.svg +0 -0
- /package/src/assets/{images → img}/priority_icons/urgent_v2.svg +0 -0
- /package/src/assets/{images → img}/teammate-status/avaible.svg +0 -0
- /package/src/assets/{images → img}/teammate-status/inactive.svg +0 -0
- /package/src/assets/{images → img}/teammate-status/unavaible.svg +0 -0
- /package/src/assets/{images → img}/whatsapp_background.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,67 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
+
# 3.4.28-rc1
|
|
12
|
+
- **bug-fixed**: cannot do project subscription if last_project object is not a project_user obj
|
|
13
|
+
|
|
14
|
+
# 3.4.27-rc26
|
|
15
|
+
- **bug-fixed**: wss push requests twice
|
|
16
|
+
|
|
17
|
+
# 3.4.27-rc25
|
|
18
|
+
- **bug-fixed**: projectUserService is not initialized
|
|
19
|
+
|
|
20
|
+
# 3.4.27-rc24
|
|
21
|
+
- **added**: implementation of multiple message in wss onmessage
|
|
22
|
+
|
|
23
|
+
# 3.4.27-rc23
|
|
24
|
+
- **added**: keepAlive worker for MQTT connection
|
|
25
|
+
|
|
26
|
+
# 3.4.27-rc22
|
|
27
|
+
- **added**: new WsWorker to manage iframe chrome throttling while tab is in background or hidden
|
|
28
|
+
|
|
29
|
+
# 3.4.27-rc21
|
|
30
|
+
- **changed**: new wss reconnect and timeout keepalive
|
|
31
|
+
- **bug-fixed**: cannot route if senderFullaname contains /
|
|
32
|
+
|
|
33
|
+
# 3.4.27-rc20
|
|
34
|
+
- **added**: onOpenTicketExternally event in triggerEvents service
|
|
35
|
+
|
|
36
|
+
# 3.4.27-rc19
|
|
37
|
+
- **added**: window.parent['openTicketOnHDA']
|
|
38
|
+
|
|
39
|
+
# 3.4.27-rc18
|
|
40
|
+
- **added**: triggerOnUpdateNewConversationBadge to update conversation badge count in parent component
|
|
41
|
+
|
|
42
|
+
# 3.4.27-rc17
|
|
43
|
+
- **bug-fixed**: setNotification not called when click on a conversation
|
|
44
|
+
|
|
45
|
+
# 3.4.27-rc16
|
|
46
|
+
- **bug-fixed**: setNotification not called when resolve a conversation
|
|
47
|
+
|
|
48
|
+
# 3.4.27-rc15
|
|
49
|
+
- **changed**: /images with /img in assets folder
|
|
50
|
+
|
|
51
|
+
# 3.4.27-rc14
|
|
52
|
+
- **added**: DISPLAY_EDIT_PROFILE brand variable
|
|
53
|
+
- **bug-fixed**: emojii is sent also if is not allowed
|
|
54
|
+
|
|
55
|
+
# 3.4.27-rc13
|
|
56
|
+
- **added**: ability to mantain logout parameter when redirect to dashboard urls from sidebar component
|
|
57
|
+
|
|
58
|
+
# 3.4.27-rc12
|
|
59
|
+
- **added**: ability to manage logOut option in sidebar-user-detail with tiledesk_logOut url query params
|
|
60
|
+
|
|
61
|
+
# 3.4.27-rc11
|
|
62
|
+
- **bug-fixed**: fixed infinite loading in contact list
|
|
63
|
+
|
|
64
|
+
# 3.4.27-rc10
|
|
65
|
+
- **added**: ability to manage header-conversation-list with roles
|
|
66
|
+
- **bug-fixed**: members in group list not loaded
|
|
67
|
+
|
|
68
|
+
# 3.4.27-rc9
|
|
69
|
+
- **bug-fixed**: Scrolling to the last message when opening a conversation
|
|
70
|
+
- **bug-fixed**: Loading in the conversation list disabled when removing the last conversation
|
|
71
|
+
|
|
11
72
|
# 3.4.27-rc8
|
|
12
73
|
- **added**: ability to open ticket to external service
|
|
13
74
|
- **added**: ticketSection env var
|
package/package.json
CHANGED
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
</div> -->
|
|
22
22
|
|
|
23
23
|
<div class="user-details-sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE || SUPPORT_MODE === false}">
|
|
24
|
-
<app-sidebar-user-details
|
|
24
|
+
<app-sidebar-user-details
|
|
25
|
+
[logOut]="g?.logOut">
|
|
26
|
+
</app-sidebar-user-details>
|
|
25
27
|
</div>
|
|
26
28
|
|
|
27
29
|
<ion-split-pane when="md" contentId="main" [ngClass]="{'mobile': IS_ON_MOBILE_DEVICE, 'sidebar-hidden': IS_ON_MOBILE_DEVICE || SUPPORT_MODE === false}">
|
package/src/app/app.component.ts
CHANGED
|
@@ -45,6 +45,7 @@ import { ProjectService } from './services/projects/project.service';
|
|
|
45
45
|
import { ContactsService } from './services/contacts/contacts.service';
|
|
46
46
|
import { TiledeskService } from './services/tiledesk/tiledesk.service';
|
|
47
47
|
import { Project } from 'src/chat21-core/models/projects';
|
|
48
|
+
import { BRAND_BASE_INFO } from './utils/utils-resources';
|
|
48
49
|
import { ProjectUsersService } from './services/project_users/project-users.service';
|
|
49
50
|
|
|
50
51
|
@Component({
|
|
@@ -301,6 +302,9 @@ export class AppComponent implements OnInit {
|
|
|
301
302
|
|
|
302
303
|
this.SUPPORT_MODE = this.g.supportMode
|
|
303
304
|
this.logger.info('[APP-COMP] this.SUPPORT_MODE', this.SUPPORT_MODE)
|
|
305
|
+
|
|
306
|
+
BRAND_BASE_INFO['LOGOUT_ENABLED'] = this.g.logOut
|
|
307
|
+
this.logger.info('[APP-COMP] this.logOut', BRAND_BASE_INFO['LOGOUT_ENABLED'])
|
|
304
308
|
}
|
|
305
309
|
|
|
306
310
|
});
|
|
@@ -539,10 +543,10 @@ export class AppComponent implements OnInit {
|
|
|
539
543
|
this.statusBar.styleLightContent();
|
|
540
544
|
this.navService.init(this.sidebarNav, this.detailNav);
|
|
541
545
|
this.tiledeskAuthService.initialize(this.appConfigProvider.getConfig().apiUrl);
|
|
542
|
-
|
|
543
|
-
|
|
546
|
+
|
|
544
547
|
// this.currentUserService.initialize();
|
|
545
548
|
this.chatManager.initialize();
|
|
549
|
+
this.messagingAuthService.initialize();
|
|
546
550
|
this.presenceService.initialize(this.tenant);
|
|
547
551
|
this.typingService.initialize(this.tenant);
|
|
548
552
|
|
|
@@ -892,7 +896,7 @@ export class AppComponent implements OnInit {
|
|
|
892
896
|
|
|
893
897
|
let pageUrl = 'conversation-detail/'
|
|
894
898
|
if (IDConv && FullNameConv) {
|
|
895
|
-
pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
|
|
899
|
+
pageUrl += IDConv + '/' + encodeURIComponent(FullNameConv) + '/' + Convtype
|
|
896
900
|
}
|
|
897
901
|
|
|
898
902
|
const queryParams = this.route.snapshot.queryParams;
|
|
@@ -900,7 +904,7 @@ export class AppComponent implements OnInit {
|
|
|
900
904
|
pageUrl += queryString ? `?${queryString}` : '';
|
|
901
905
|
|
|
902
906
|
// replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
|
|
903
|
-
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29')
|
|
907
|
+
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
|
|
904
908
|
|
|
905
909
|
|
|
906
910
|
// const DASHBOARD_URL = this.appConfigProvider.getConfig().DASHBOARD_URL;
|
|
@@ -1121,14 +1125,19 @@ export class AppComponent implements OnInit {
|
|
|
1121
1125
|
if (conversation && conversation.is_new === true && this.isInitialized) {
|
|
1122
1126
|
this.manageTabNotification('conv_added', conversation.sound)
|
|
1123
1127
|
this.manageEventNewConversation(conversation)
|
|
1124
|
-
|
|
1128
|
+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1129
|
+
this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
|
|
1125
1130
|
}
|
|
1126
1131
|
if(conversation) this.updateConversationsOnStorage()
|
|
1127
1132
|
});
|
|
1128
1133
|
|
|
1129
1134
|
this.conversationsHandlerService.conversationChanged.subscribe((conversation: ConversationModel) => {
|
|
1130
1135
|
// console.log('[APP-COMP] ***** subscribeConversationChanged conversation: ', conversation);
|
|
1131
|
-
if(conversation)
|
|
1136
|
+
if(conversation){
|
|
1137
|
+
this.updateConversationsOnStorage();
|
|
1138
|
+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1139
|
+
this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
|
|
1140
|
+
}
|
|
1132
1141
|
});
|
|
1133
1142
|
|
|
1134
1143
|
this.conversationsHandlerService.conversationChangedDetailed.subscribe((changes: {value: ConversationModel, previousValue: ConversationModel}) => {
|
|
@@ -1152,6 +1161,8 @@ export class AppComponent implements OnInit {
|
|
|
1152
1161
|
if(conversation) {
|
|
1153
1162
|
this.updateConversationsOnStorage();
|
|
1154
1163
|
this.segmentResolved(conversation);
|
|
1164
|
+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1165
|
+
this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
|
|
1155
1166
|
this.router.navigateByUrl('conversation-detail/'); //redirect to basePage
|
|
1156
1167
|
}
|
|
1157
1168
|
});
|
|
@@ -1176,7 +1187,7 @@ export class AppComponent implements OnInit {
|
|
|
1176
1187
|
// if (supportmode === true) {
|
|
1177
1188
|
// this.connetWebsocket() // moved in the comp project-item
|
|
1178
1189
|
// }
|
|
1179
|
-
|
|
1190
|
+
|
|
1180
1191
|
const currentUser = this.tiledeskAuthService.getCurrentUser();
|
|
1181
1192
|
this.setLanguage(currentUser);
|
|
1182
1193
|
// this.logger.printDebug('APP-COMP - goOnLine****', currentUser);
|
|
@@ -1185,9 +1196,12 @@ export class AppComponent implements OnInit {
|
|
|
1185
1196
|
this.chatManager.setCurrentUser(currentUser);
|
|
1186
1197
|
|
|
1187
1198
|
this.tiledeskService.initialize(serverBaseURL)
|
|
1188
|
-
this.projectService.initialize(serverBaseURL)
|
|
1189
1199
|
this.projectUsersService.initialize(serverBaseURL)
|
|
1200
|
+
this.projectService.initialize(serverBaseURL)
|
|
1190
1201
|
this.contactsService.initialize(serverBaseURL)
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
this.events.publish('go:online', true);
|
|
1191
1205
|
// this.chatManager.startApp();
|
|
1192
1206
|
|
|
1193
1207
|
|
|
@@ -1277,9 +1291,9 @@ export class AppComponent implements OnInit {
|
|
|
1277
1291
|
}
|
|
1278
1292
|
|
|
1279
1293
|
goToDashboardLogin(){
|
|
1280
|
-
let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
|
|
1281
|
-
const myWindow = window.open(DASHBOARD_URL, '_self');
|
|
1282
|
-
myWindow.focus();
|
|
1294
|
+
// let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
|
|
1295
|
+
// const myWindow = window.open(DASHBOARD_URL, '_self');
|
|
1296
|
+
// myWindow.focus();
|
|
1283
1297
|
}
|
|
1284
1298
|
|
|
1285
1299
|
connetWebsocket(tiledeskToken) {
|
|
@@ -1290,10 +1304,7 @@ export class AppComponent implements OnInit {
|
|
|
1290
1304
|
const WS_URL = appconfig.wsUrl + '?token=' + tiledeskToken
|
|
1291
1305
|
this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', WS_URL)
|
|
1292
1306
|
this.webSocketJs.init(
|
|
1293
|
-
WS_URL
|
|
1294
|
-
undefined,
|
|
1295
|
-
undefined,
|
|
1296
|
-
undefined
|
|
1307
|
+
WS_URL
|
|
1297
1308
|
);
|
|
1298
1309
|
}
|
|
1299
1310
|
|
|
@@ -1345,7 +1356,7 @@ export class AppComponent implements OnInit {
|
|
|
1345
1356
|
subscribeChangedConversationSelected = (user: UserModel, type: string) => {
|
|
1346
1357
|
this.logger.log('[APP-COMP] subscribeUidConvSelectedChanged navigateByUrl', user, type);
|
|
1347
1358
|
// this.router.navigateByUrl('conversation-detail/' + user.uid + '?conversationWithFullname=' + user.fullname);
|
|
1348
|
-
this.router.navigateByUrl('conversation-detail/' + user.uid + '/' + user.fullname + '/' + type);
|
|
1359
|
+
this.router.navigateByUrl('conversation-detail/' + user.uid + '/' + encodeURIComponent(user.fullname) + '/' + type);
|
|
1349
1360
|
}
|
|
1350
1361
|
|
|
1351
1362
|
subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
|
|
@@ -1395,8 +1406,6 @@ export class AppComponent implements OnInit {
|
|
|
1395
1406
|
if(conversation && conversation.is_new){
|
|
1396
1407
|
this.audio_NewConv.pause();
|
|
1397
1408
|
this.conversationsHandlerService.setConversationRead(conversation.uid)
|
|
1398
|
-
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1399
|
-
this.setNotification();
|
|
1400
1409
|
}
|
|
1401
1410
|
}
|
|
1402
1411
|
|
|
@@ -1474,7 +1483,7 @@ export class AppComponent implements OnInit {
|
|
|
1474
1483
|
}
|
|
1475
1484
|
|
|
1476
1485
|
//INIT NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1477
|
-
this.
|
|
1486
|
+
this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
|
|
1478
1487
|
});
|
|
1479
1488
|
|
|
1480
1489
|
}
|
|
@@ -1523,10 +1532,10 @@ export class AppComponent implements OnInit {
|
|
|
1523
1532
|
let Convtype = 'active'
|
|
1524
1533
|
|
|
1525
1534
|
if (IDConv && FullNameConv) {
|
|
1526
|
-
pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
|
|
1535
|
+
pageUrl += IDConv + '/' + encodeURIComponent(FullNameConv) + '/' + Convtype
|
|
1527
1536
|
}
|
|
1528
1537
|
// replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
|
|
1529
|
-
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29')
|
|
1538
|
+
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
|
|
1530
1539
|
} else {
|
|
1531
1540
|
console.log("FCM: Received in foreground", JSON.stringify(data));
|
|
1532
1541
|
// let IDConv = data.recipient
|
|
@@ -1537,7 +1546,7 @@ export class AppComponent implements OnInit {
|
|
|
1537
1546
|
// pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
|
|
1538
1547
|
// }
|
|
1539
1548
|
// // replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
|
|
1540
|
-
// this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29')
|
|
1549
|
+
// this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
|
|
1541
1550
|
};
|
|
1542
1551
|
});
|
|
1543
1552
|
}
|
|
@@ -1691,14 +1700,6 @@ export class AppComponent implements OnInit {
|
|
|
1691
1700
|
this.triggerEvents.triggerOnNewConversationInit(conversation)
|
|
1692
1701
|
}
|
|
1693
1702
|
|
|
1694
|
-
private setNotification() {
|
|
1695
|
-
this.logger.log('[APP-COMP] setNotification for NEW CONVERSATION');
|
|
1696
|
-
if(window['AGENTDESKTOP']){
|
|
1697
|
-
this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP']);
|
|
1698
|
-
window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew().toString())
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
1703
|
|
|
1703
1704
|
@HostListener('document:visibilitychange', [])
|
|
1704
1705
|
visibilitychange() {
|
|
@@ -1765,6 +1766,11 @@ export class AppComponent implements OnInit {
|
|
|
1765
1766
|
this.triggerEvents.triggerOnInit(detailOBJ)
|
|
1766
1767
|
}
|
|
1767
1768
|
|
|
1769
|
+
private triggerOnUpdateNewConversationBadge(count: number){
|
|
1770
|
+
const detailOBJ = { event: 'onUpdateNewConversationBadge', count: count.toString() }
|
|
1771
|
+
this.triggerEvents.triggerOnUpdateNewConversationBadge(detailOBJ)
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1768
1774
|
|
|
1769
1775
|
// @HostListener('mouseenter', ['$event'])
|
|
1770
1776
|
// onMouseEnter(event: any) {
|
package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.scss
CHANGED
|
@@ -205,13 +205,13 @@
|
|
|
205
205
|
// overflow-x: hidden;
|
|
206
206
|
// }
|
|
207
207
|
// .c21-ico-schedule {
|
|
208
|
-
// background-image: url("src/assets/
|
|
208
|
+
// background-image: url("src/assets/img/f21ico-schedule.svg");
|
|
209
209
|
// }
|
|
210
210
|
// .c21-ico-done {
|
|
211
|
-
// background-image: url("src/assets/
|
|
211
|
+
// background-image: url("src/assets/img/f21ico-done.svg");
|
|
212
212
|
// }
|
|
213
213
|
// .c21-ico-done_all {
|
|
214
|
-
// background-image: url("src/assets/
|
|
214
|
+
// background-image: url("src/assets/img/f21ico-done_all.svg");
|
|
215
215
|
// }
|
|
216
216
|
// }
|
|
217
217
|
|
package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts
CHANGED
|
@@ -58,7 +58,7 @@ export class ConversationContentComponent implements OnInit {
|
|
|
58
58
|
MESSAGE_TYPE_OTHERS = MESSAGE_TYPE_OTHERS;
|
|
59
59
|
// ========== end:: check message type functions ======= //
|
|
60
60
|
|
|
61
|
-
urlBOTImage = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/dev/2.0.4-beta.7/assets/
|
|
61
|
+
urlBOTImage = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/dev/2.0.4-beta.7/assets/img/avatar_bot_tiledesk.svg'
|
|
62
62
|
uploadProgress: number;
|
|
63
63
|
showUploadProgress: boolean = false;
|
|
64
64
|
fileType: string;
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
<ng-container *ngIf="isCopilotEnabled">
|
|
185
185
|
<ion-button shape="round" size="small" class="btn-info-msg btn-copilot" ion-button fill="clear"
|
|
186
186
|
(click)="onClickOptionsCopilot(message, i)">
|
|
187
|
-
<ion-icon id="copilot" src="assets/
|
|
187
|
+
<ion-icon id="copilot" src="assets/img/icons/copilot.svg"></ion-icon>
|
|
188
188
|
</ion-button>
|
|
189
189
|
</ng-container>
|
|
190
190
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class="c21-icon-avatar">
|
|
2
2
|
<div class="c21-avatar-image profile_image">
|
|
3
|
-
<!-- <img src="getUrlImgProfile(message.sender) {{getUrlImgProfile(message.sender)}}" onError="this.src = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/v2/assets/
|
|
3
|
+
<!-- <img src="getUrlImgProfile(message.sender) {{getUrlImgProfile(message.sender)}}" onError="this.src = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/v2/assets/img/line_avatar_male_tiledesk.svg'" /> -->
|
|
4
4
|
<!-- <img [src]="url" (error)="onBotImgError($event)" /> -->
|
|
5
5
|
<img *ngIf="senderID?.indexOf('bot_') !== -1 || senderFullname === 'Bot'" [src]="url" (error)="onBotImgError($event)" (load)="onLoadedBot($event)"/>
|
|
6
6
|
<!-- is a HUMAN -->
|
|
@@ -17,18 +17,18 @@ export class AvatarComponent implements OnInit {
|
|
|
17
17
|
if(this.senderID){
|
|
18
18
|
this.url = this.imageRepoService.getImagePhotoUrl(this.senderID)
|
|
19
19
|
if(!this.url && (this.senderID.indexOf('bot_') !== -1 || this.senderFullname === 'Bot')){
|
|
20
|
-
this.url = this.baseLocation +'/assets/
|
|
20
|
+
this.url = this.baseLocation +'/assets/img/avatar_bot_tiledesk.svg'
|
|
21
21
|
}else if(!this.url && this.senderID.indexOf('bot_') == -1){
|
|
22
|
-
this.url = this.baseLocation +'/assets/
|
|
22
|
+
this.url = this.baseLocation +'/assets/img/light_avatar_placeholder.svg'
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
onBotImgError(event){
|
|
28
|
-
event.target.src = this.baseLocation +'/assets/
|
|
28
|
+
event.target.src = this.baseLocation +'/assets/img/avatar_bot_tiledesk.svg'
|
|
29
29
|
}
|
|
30
30
|
onHumanImgError(event) {
|
|
31
|
-
event.target.src = this.baseLocation + "/assets/
|
|
31
|
+
event.target.src = this.baseLocation + "/assets/img/light_avatar_placeholder.svg"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
onLoadedBot(event){
|
package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.scss
CHANGED
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.c21-ico-schedule {
|
|
19
|
-
background-image: url("/src/assets/
|
|
19
|
+
background-image: url("/src/assets/img/f21ico-schedule.svg");
|
|
20
20
|
}
|
|
21
21
|
.c21-ico-done {
|
|
22
|
-
background-image: url("/src/assets/
|
|
22
|
+
background-image: url("/src/assets/img/f21ico-done.svg");
|
|
23
23
|
}
|
|
24
24
|
.c21-ico-done_all {
|
|
25
|
-
background-image: url("/src/assets/
|
|
25
|
+
background-image: url("/src/assets/img/f21ico-done_all.svg");
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -96,23 +96,23 @@
|
|
|
96
96
|
<div class="conversation_project truncate">
|
|
97
97
|
<!-- DIRECT CONV -->
|
|
98
98
|
<div *ngIf="conversation.channel_type === CHANNEL_TYPE.DIRECT">
|
|
99
|
-
<img class="channel-icon" src="assets/
|
|
99
|
+
<img class="channel-icon" src="assets/img/channel_icons/direct.svg">
|
|
100
100
|
<span class="truncate">{{translationsMap.get('DIRECT_CHAT')}}</span>
|
|
101
101
|
</div>
|
|
102
102
|
<!-- GROUP CONV -->
|
|
103
103
|
<div *ngIf="conversation.uid.startsWith(CHANNEL_TYPE.GROUP)">
|
|
104
|
-
<img class="channel-icon" src="assets/
|
|
104
|
+
<img class="channel-icon" src="assets/img/channel_icons/group.svg">
|
|
105
105
|
<span class="truncate">{{translationsMap.get('GROUP_CHAT')}}</span>
|
|
106
106
|
</div>
|
|
107
107
|
<!-- SUPPORT-GROUP CONV -->
|
|
108
108
|
<div *ngIf="conversation.uid.startsWith(CHANNEL_TYPE.SUPPORT_GROUP) && !IS_ON_MOBILE_DEVICE">
|
|
109
|
-
<img class="channel-icon" src="assets/
|
|
110
|
-
<img class="channel-icon" src="assets/
|
|
111
|
-
<img class="channel-icon" src="assets/
|
|
112
|
-
<img class="channel-icon" src="assets/
|
|
113
|
-
<img class="channel-icon" src="assets/
|
|
114
|
-
<img class="channel-icon" src="assets/
|
|
115
|
-
<img class="channel-icon" src="assets/
|
|
109
|
+
<img class="channel-icon" src="assets/img/channel_icons/chat21.svg" *ngIf="conversation?.attributes && ( (conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.CHAT21) || !conversation?.attributes?.request_channel) " >
|
|
110
|
+
<img class="channel-icon" src="assets/img/channel_icons/email-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.EMAIL" >
|
|
111
|
+
<img class="channel-icon" src="assets/img/channel_icons/form-logo_v2.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.FORM" >
|
|
112
|
+
<img class="channel-icon" src="assets/img/channel_icons/messenger-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.MESSENGER" >
|
|
113
|
+
<img class="channel-icon" src="assets/img/channel_icons/whatsapp-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.WHATSAPP" >
|
|
114
|
+
<img class="channel-icon" src="assets/img/channel_icons/telegram-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.TELEGRAM" >
|
|
115
|
+
<img class="channel-icon" src="assets/img/channel_icons/voice.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel.startsWith(CHANNEL_TYPE.VOICE)" >
|
|
116
116
|
<span *ngIf="conversation?.attributes?.project_name" class="truncate">{{conversation?.attributes?.project_name}}</span>
|
|
117
117
|
<span *ngIf="!conversation?.attributes?.project_name" class="truncate">{{conversation?.attributes?.projectId}}</span>
|
|
118
118
|
</div>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<ion-label>{{translationsMap?.get('AddAsCannedResponse')}}</ion-label>
|
|
10
10
|
</ion-item>
|
|
11
11
|
<ion-item button="true" *ngIf="logLevel >= LogLevel.DEBUG" (click)="onClickOption('jsonInfo')">
|
|
12
|
-
<ion-icon src="assets/
|
|
12
|
+
<ion-icon src="assets/img/json-file.svg" slot="start"></ion-icon>
|
|
13
13
|
<ion-label>{{translationsMap?.get('JSON_RESPONSE')}}</ion-label>
|
|
14
14
|
</ion-item>
|
|
15
15
|
</ion-list>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<ion-input [class.readonly]="canned?.disabled" [readonly]="canned?.disabled" type="text" [(ngModel)]="canned.title" class="title" id="{{'titleCanned_'+canned._id}}" #title></ion-input>
|
|
10
10
|
<ion-input [class.readonly]="canned?.disabled" [readonly]="canned?.disabled" type="text" [(ngModel)]="canned.text" class="text truncate"></ion-input>
|
|
11
11
|
</div>
|
|
12
|
-
<!-- <ion-icon class="canned-item-icon" name="pin" src="assets/
|
|
13
|
-
<ion-icon class="canned-item-icon" name="pin" src="assets/
|
|
12
|
+
<!-- <ion-icon class="canned-item-icon" name="pin" src="assets/img/pin.svg" slot=end *ngIf="canned.pinned" (click)="onPinCanned(canned, $event)"></ion-icon>
|
|
13
|
+
<ion-icon class="canned-item-icon" name="pin" src="assets/img/pinned.svg" slot=end (click)="onUnPinCanned(canned, $event)"></ion-icon> -->
|
|
14
14
|
<ion-icon class="canned-item-icon" name="checkmark-sharp" slot=end *ngIf="(canned.createdBy === loggedUser.uid && !canned.disabled) && roles[PERMISSIONS.CANNED_RESPONSES_UPDATE]" (click)="onConfirmEditCanned(canned, $event)"></ion-icon>
|
|
15
15
|
<ion-icon class="canned-item-icon" name="pencil-sharp" slot=end *ngIf="(canned.createdBy === loggedUser.uid && canned.disabled) && roles[PERMISSIONS.CANNED_RESPONSES_UPDATE]" (click)="onEditCanned(canned, $event)"></ion-icon>
|
|
16
16
|
<ion-icon class="canned-item-icon" name="trash-bin-outline" slot=end *ngIf="(canned.createdBy === loggedUser.uid) && roles[PERMISSIONS.CANNED_RESPONSES_DELETE]" (click)="onDeleteCanned(canned, $event)"></ion-icon>
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
</div>
|
|
48
48
|
<!-- SUPPORT-GROUP CONV -->
|
|
49
49
|
<div *ngIf="conversationUid?.startsWith(CHANNEL_TYPE.SUPPORT_GROUP) && !IS_ON_MOBILE_DEVICE">
|
|
50
|
-
<img class="channel-icon" src="assets/
|
|
51
|
-
<img class="channel-icon" src="assets/
|
|
52
|
-
<img class="channel-icon" src="assets/
|
|
53
|
-
<img class="channel-icon" src="assets/
|
|
54
|
-
<img class="channel-icon" src="assets/
|
|
55
|
-
<img class="channel-icon" src="assets/
|
|
56
|
-
<img class="channel-icon" src="assets/
|
|
50
|
+
<img class="channel-icon" src="assets/img/channel_icons/chat21.svg" *ngIf="( (conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.CHAT21) || !conversationAvatar?.request_channel) " >
|
|
51
|
+
<img class="channel-icon" src="assets/img/channel_icons/email-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.EMAIL" >
|
|
52
|
+
<img class="channel-icon" src="assets/img/channel_icons/form-logo_v2.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.FORM" >
|
|
53
|
+
<img class="channel-icon" src="assets/img/channel_icons/messenger-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.MESSENGER" >
|
|
54
|
+
<img class="channel-icon" src="assets/img/channel_icons/whatsapp-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.WHATSAPP" >
|
|
55
|
+
<img class="channel-icon" src="assets/img/channel_icons/telegram-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.TELEGRAM" >
|
|
56
|
+
<img class="channel-icon" src="assets/img/channel_icons/voice.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel.startsWith(CHANNEL_TYPE.VOICE)" >
|
|
57
57
|
<span *ngIf="conversationAvatar?.project_name" class="truncate">{{conversationAvatar?.project_name}}</span>
|
|
58
58
|
<span *ngIf="!conversationAvatar?.project_name" class="truncate">{{conversationAvatar?.projectId}}</span>
|
|
59
59
|
</div>
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
<!-- COPILOT-OPTION -->
|
|
66
66
|
<div *ngIf="isCopilotEnabled" class="copilot-container" id="copilot">
|
|
67
67
|
<ion-button id="copilot" fill="clear" (click)="onOpenSection('copilot')">
|
|
68
|
-
<ion-icon class="channel-icon" src="assets/
|
|
68
|
+
<ion-icon class="channel-icon" src="assets/img/icons/copilot.svg"></ion-icon>
|
|
69
69
|
{{translationsMap?.get('COPILOT.SOLVE_WITH_AI')}}
|
|
70
70
|
</ion-button>
|
|
71
71
|
</div>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -548,6 +548,10 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
548
548
|
e.preventDefault(); // Prevent press enter from creating new line
|
|
549
549
|
// console.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea * event: ", e);
|
|
550
550
|
|
|
551
|
+
if(this.showAlertEmoji || this.showAlertUrl){
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
|
|
551
555
|
this.countClicks++;
|
|
552
556
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - countClicks: ', this.countClicks);
|
|
553
557
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event: ', e);
|
|
@@ -652,6 +656,11 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
652
656
|
return
|
|
653
657
|
}
|
|
654
658
|
|
|
659
|
+
let check = this.checkForEmojii(text)
|
|
660
|
+
if(!check){
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
|
|
655
664
|
this.messageString = '';
|
|
656
665
|
// text = text.replace(/(\r\n|\n|\r)/gm, '');
|
|
657
666
|
|
|
@@ -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() //
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</ion-content>
|
|
19
19
|
<ion-footer class="ion-no-border">
|
|
20
20
|
<ion-button fill="clear" (click)="onClickCopilot()">
|
|
21
|
-
<ion-icon src="assets/
|
|
21
|
+
<ion-icon src="assets/img/icons/copilot.svg"></ion-icon>
|
|
22
22
|
{{translationsMap.get('COPILOT.ASK_AI') }}
|
|
23
23
|
</ion-button>
|
|
24
24
|
</ion-footer>
|
|
@@ -111,7 +111,7 @@ export class NavbarComponent implements OnInit {
|
|
|
111
111
|
this.USER_ROLE = project.role;
|
|
112
112
|
this.projectUser = await this.projectUsersService.getProjectUserByProjectId(project.id_project.id)
|
|
113
113
|
this.roles = this.checkRoles()
|
|
114
|
-
|
|
114
|
+
this.logger.log('[SIDEBAR] roles ', this.roles)
|
|
115
115
|
}
|
|
116
116
|
})
|
|
117
117
|
}
|