@hmcts/ccpay-web-component 5.0.7-beta30 → 5.0.7-beta31

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.
@@ -11367,6 +11367,7 @@
11367
11367
  * @return {?}
11368
11368
  */
11369
11369
  function () {
11370
+ var _this = this;
11370
11371
  console.log('Notification app started');
11371
11372
  /** @type {?} */
11372
11373
  var notficationPreviewRequestBody = new NotificationPreviewRequest(this.payment, this.contactDetails, this.refundReason, this.refundAmount, this.refundReference, this.paymentReference);
@@ -11374,7 +11375,22 @@
11374
11375
  * @param {?} res
11375
11376
  * @return {?}
11376
11377
  */function (res) {
11377
- console.log('subscribed');
11378
+ _this.errorMessage = _this.errorHandlerService.getServerErrorMessage(false, false, '');
11379
+ /** @type {?} */
11380
+ var JsonResponse = JSON.parse(res);
11381
+ console.log("2." + JsonResponse);
11382
+ _this.notification = JsonResponse['data'];
11383
+ console.log("3." + _this.notification);
11384
+ if (_this.notification.template_type === 'letter') {
11385
+ _this.notification.body = _this.notification.body.replace(/\r\n/g, '<br/>');
11386
+ }
11387
+ }), ( /**
11388
+ * @param {?} error
11389
+ * @return {?}
11390
+ */function (error) {
11391
+ _this.errorMessage = _this.errorHandlerService.getServerErrorMessage(true, false, '');
11392
+ console.log(_this.errorMessage);
11393
+ window.scrollTo(0, 0);
11378
11394
  }));
11379
11395
  console.log('Notification app loaded');
11380
11396
  };