@chat21/chat21-ionic 3.0.59-rc4 → 3.0.59-rc5
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 +3 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +19 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.59-rc5
|
|
4
|
+
- Display a "toast message" of success after that the agent has joined to an unassigned conversation
|
|
5
|
+
|
|
3
6
|
### 3.0.59-rc4
|
|
4
7
|
- Adds an item to the top of the conversation list that shows the number of unassigned conversations for a selected project
|
|
5
8
|
- Adds the ability, by clicking on the element that displays the number of unassigned conversations, to view the unassigned conversations and to join to them or archive them
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -261,22 +261,33 @@ export class AppComponent implements OnInit {
|
|
|
261
261
|
|
|
262
262
|
listenToPostMsgs() {
|
|
263
263
|
window.addEventListener("message", (event) => {
|
|
264
|
-
|
|
264
|
+
console.log("[APP-COMP] message event ", event);
|
|
265
265
|
|
|
266
266
|
if (event && event.data && event.data.action && event.data.parameter) {
|
|
267
267
|
if (event.data.action === 'openJoinConversationModal') {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
this.presentAlertConfirmJoinRequest(event.data.parameter)
|
|
271
|
-
|
|
272
|
-
|
|
268
|
+
console.log("[APP-COMP] message event action ", event.data.action);
|
|
269
|
+
console.log("[APP-COMP] message event parameter ", event.data.parameter);
|
|
270
|
+
this.presentAlertConfirmJoinRequest(event.data.parameter, event.data.calledBy)
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
if (event && event.data && event.data.action && event.data.text) {
|
|
274
|
+
if (event.data.action === "display_toast_join_complete") {
|
|
275
|
+
this.presentToastJoinComplete(event.data.text)
|
|
273
276
|
}
|
|
274
277
|
}
|
|
275
278
|
})
|
|
279
|
+
}
|
|
276
280
|
|
|
281
|
+
async presentToastJoinComplete(text) {
|
|
282
|
+
const toast = await this.toastController.create({
|
|
283
|
+
message: text,
|
|
284
|
+
duration: 2000,
|
|
285
|
+
color: "success"
|
|
286
|
+
});
|
|
287
|
+
toast.present();
|
|
277
288
|
}
|
|
278
289
|
|
|
279
|
-
async presentAlertConfirmJoinRequest(requestid) {
|
|
290
|
+
async presentAlertConfirmJoinRequest(requestid, calledby) {
|
|
280
291
|
var iframeWin = <HTMLIFrameElement>document.getElementById("unassigned-convs-iframe")
|
|
281
292
|
// console.log("[APP-COMP] message event iframeWin ", iframeWin);
|
|
282
293
|
|
|
@@ -304,7 +315,7 @@ export class AppComponent implements OnInit {
|
|
|
304
315
|
// console.log('Confirm Okay');
|
|
305
316
|
|
|
306
317
|
if (isIFrame(iframeWin) && iframeWin.contentWindow) {
|
|
307
|
-
const msg = { action: "joinConversation", parameter: requestid }
|
|
318
|
+
const msg = { action: "joinConversation", parameter: requestid, calledBy: calledby }
|
|
308
319
|
iframeWin.contentWindow.postMessage(msg, '*');
|
|
309
320
|
}
|
|
310
321
|
}
|