@chat21/chat21-ionic 3.4.27-rc15 → 3.4.27-rc16

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,8 @@
8
8
  ### **Copyrigth**:
9
9
  *Tiledesk SRL*
10
10
 
11
+ # 3.4.27-rc16
12
+
11
13
  # 3.4.27-rc15
12
14
  - **changed**: /images with /img in assets folder
13
15
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.4.27-rc15",
4
+ "version": "3.4.27-rc16",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -1156,6 +1156,7 @@ export class AppComponent implements OnInit {
1156
1156
  if(conversation) {
1157
1157
  this.updateConversationsOnStorage();
1158
1158
  this.segmentResolved(conversation);
1159
+ this.setNotification();
1159
1160
  this.router.navigateByUrl('conversation-detail/'); //redirect to basePage
1160
1161
  }
1161
1162
  });
@@ -1698,7 +1699,7 @@ export class AppComponent implements OnInit {
1698
1699
  private setNotification() {
1699
1700
  this.logger.log('[APP-COMP] setNotification for NEW CONVERSATION');
1700
1701
  if(window['AGENTDESKTOP']){
1701
- this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP']);
1702
+ this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP'], this.conversationsHandlerService.countIsNew().toString());
1702
1703
  window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew().toString())
1703
1704
  }
1704
1705
  }
@@ -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();