@chat21/chat21-ionic 3.4.27-rc15 → 3.4.27-rc17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
+
# 3.4.27-rc17
|
|
12
|
+
- **bug-fixed**: setNotification not called when click on a conversation
|
|
13
|
+
|
|
14
|
+
# 3.4.27-rc16
|
|
15
|
+
- **bug-fixed**: setNotification not called when resolve a conversation
|
|
16
|
+
|
|
11
17
|
# 3.4.27-rc15
|
|
12
18
|
- **changed**: /images with /img in assets folder
|
|
13
19
|
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -1125,6 +1125,7 @@ export class AppComponent implements OnInit {
|
|
|
1125
1125
|
if (conversation && conversation.is_new === true && this.isInitialized) {
|
|
1126
1126
|
this.manageTabNotification('conv_added', conversation.sound)
|
|
1127
1127
|
this.manageEventNewConversation(conversation)
|
|
1128
|
+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1128
1129
|
this.setNotification();
|
|
1129
1130
|
}
|
|
1130
1131
|
if(conversation) this.updateConversationsOnStorage()
|
|
@@ -1132,7 +1133,11 @@ export class AppComponent implements OnInit {
|
|
|
1132
1133
|
|
|
1133
1134
|
this.conversationsHandlerService.conversationChanged.subscribe((conversation: ConversationModel) => {
|
|
1134
1135
|
// console.log('[APP-COMP] ***** subscribeConversationChanged conversation: ', conversation);
|
|
1135
|
-
if(conversation)
|
|
1136
|
+
if(conversation){
|
|
1137
|
+
this.updateConversationsOnStorage();
|
|
1138
|
+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1139
|
+
this.setNotification();
|
|
1140
|
+
}
|
|
1136
1141
|
});
|
|
1137
1142
|
|
|
1138
1143
|
this.conversationsHandlerService.conversationChangedDetailed.subscribe((changes: {value: ConversationModel, previousValue: ConversationModel}) => {
|
|
@@ -1156,6 +1161,8 @@ export class AppComponent implements OnInit {
|
|
|
1156
1161
|
if(conversation) {
|
|
1157
1162
|
this.updateConversationsOnStorage();
|
|
1158
1163
|
this.segmentResolved(conversation);
|
|
1164
|
+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1165
|
+
this.setNotification();
|
|
1159
1166
|
this.router.navigateByUrl('conversation-detail/'); //redirect to basePage
|
|
1160
1167
|
}
|
|
1161
1168
|
});
|
|
@@ -1281,9 +1288,9 @@ export class AppComponent implements OnInit {
|
|
|
1281
1288
|
}
|
|
1282
1289
|
|
|
1283
1290
|
goToDashboardLogin(){
|
|
1284
|
-
let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
|
|
1285
|
-
const myWindow = window.open(DASHBOARD_URL, '_self');
|
|
1286
|
-
myWindow.focus();
|
|
1291
|
+
// let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
|
|
1292
|
+
// const myWindow = window.open(DASHBOARD_URL, '_self');
|
|
1293
|
+
// myWindow.focus();
|
|
1287
1294
|
}
|
|
1288
1295
|
|
|
1289
1296
|
connetWebsocket(tiledeskToken) {
|
|
@@ -1399,8 +1406,6 @@ export class AppComponent implements OnInit {
|
|
|
1399
1406
|
if(conversation && conversation.is_new){
|
|
1400
1407
|
this.audio_NewConv.pause();
|
|
1401
1408
|
this.conversationsHandlerService.setConversationRead(conversation.uid)
|
|
1402
|
-
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1403
|
-
this.setNotification();
|
|
1404
1409
|
}
|
|
1405
1410
|
}
|
|
1406
1411
|
|
|
@@ -1696,9 +1701,9 @@ export class AppComponent implements OnInit {
|
|
|
1696
1701
|
}
|
|
1697
1702
|
|
|
1698
1703
|
private setNotification() {
|
|
1699
|
-
this.logger.log('[APP-COMP] setNotification for NEW CONVERSATION');
|
|
1704
|
+
this.logger.log('[APP-COMP] setNotification for NEW CONVERSATION', this.conversationsHandlerService.countIsNew().toString());
|
|
1700
1705
|
if(window['AGENTDESKTOP']){
|
|
1701
|
-
this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP']);
|
|
1706
|
+
this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP'], this.conversationsHandlerService.countIsNew().toString());
|
|
1702
1707
|
window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew().toString())
|
|
1703
1708
|
}
|
|
1704
1709
|
}
|
|
@@ -35,13 +35,21 @@
|
|
|
35
35
|
|
|
36
36
|
function openTicketOnHDA(requestId){
|
|
37
37
|
console.log('openTicketOnHDA called with requestId:', requestId);
|
|
38
|
+
const message = { companyID: "1", sourceID: "CHAT", tiledeskID: requestId, target: "HDA", origin: "Tiledesk" }
|
|
38
39
|
if(window && window.parent){
|
|
39
|
-
const message = { companyID: "1", sourceID: "CHAT", tiledeskID: requestId }
|
|
40
40
|
window.parent.postMessage(message, 'https://devhda2bo.aruba.it/HDAPortal/');
|
|
41
41
|
window.postMessage(message, 'https://devhda2bo.aruba.it/HDAPortal/');
|
|
42
42
|
console.log('Message posted to parent window and current window');
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
if(window['AGENTDESKTOP']){
|
|
46
|
+
console.log('AGENTDESKTOP exist. Sending message . . .');
|
|
47
|
+
window['AGENTDESKTOP']['WIDGET'].sendDataToWidget('PAT', JSON.stringify(message)); // invia il messaggio ad HDA
|
|
48
|
+
AGENTDESKTOP.TAB.GoTo('PAT'); // dà il focus ad HDA
|
|
49
|
+
console.log('Message sent to AGENTDESKTOP widget');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
loadAgentDesktopScript();
|