@hmcts/ccpay-web-component 5.0.7-beta27 → 5.0.7-beta29

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.
@@ -3071,7 +3071,9 @@ var NotificationService = /** @class */ (function () {
3071
3071
  * @return {?}
3072
3072
  */
3073
3073
  function (body) {
3074
- return this.https.post(this.paymentLibService.NOTIFICATION_API_ROOT + "/doc-preview", body).pipe(catchError(this.errorHandlerService.handleError));
3074
+ return this.https.post(this.paymentLibService.NOTIFICATION_API_ROOT + "/doc-preview", body, {
3075
+ withCredentials: true
3076
+ }).pipe(catchError(this.errorHandlerService.handleError));
3075
3077
  };
3076
3078
  NotificationService.decorators = [
3077
3079
  { type: Injectable, args: [{
@@ -11565,31 +11567,33 @@ var NotificationPreviewComponent = /** @class */ (function () {
11565
11567
  * @return {?}
11566
11568
  */
11567
11569
  function () {
11570
+ var _this = this;
11568
11571
  console.log('Notification app started');
11569
11572
  /** @type {?} */
11570
11573
  var notficationPreviewRequestBody = new NotificationPreviewRequest(this.payment, this.contactDetails, this.refundReason, this.refundAmount, this.refundReference, this.paymentReference);
11571
- console.log("1." + notficationPreviewRequestBody);
11572
11574
  this.notificationService.getNotificationPreview(notficationPreviewRequestBody).subscribe((/**
11573
11575
  * @param {?} res
11574
11576
  * @return {?}
11575
11577
  */
11576
- function (res) { console.log(JSON.parse(res)); }));
11577
- // this.notificationService.getNotificationPreview(notficationPreviewRequestBody).subscribe(
11578
- // res => {
11579
- // this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
11580
- // const JsonResponse = JSON.parse(res);
11581
- // console.log("2." + JsonResponse);
11582
- // this.notification = JsonResponse['data'];
11583
- // console.log("3." + this.notification);
11584
- // if (this.notification.template_type === 'letter') {
11585
- // this.notification.body = this.notification.body.replace(/\r\n/g, '<br/>');
11586
- // }
11587
- // },
11588
- // (error: any) => {
11589
- // this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
11590
- // console.log(this.errorMessage);
11591
- // window.scrollTo(0, 0);
11592
- // });
11578
+ function (res) {
11579
+ _this.errorMessage = _this.errorHandlerService.getServerErrorMessage(false, false, '');
11580
+ /** @type {?} */
11581
+ var JsonResponse = JSON.parse(res);
11582
+ console.log("2." + JsonResponse);
11583
+ _this.notification = JsonResponse['data'];
11584
+ console.log("3." + _this.notification);
11585
+ if (_this.notification.template_type === 'letter') {
11586
+ _this.notification.body = _this.notification.body.replace(/\r\n/g, '<br/>');
11587
+ }
11588
+ }), (/**
11589
+ * @param {?} error
11590
+ * @return {?}
11591
+ */
11592
+ function (error) {
11593
+ _this.errorMessage = _this.errorHandlerService.getServerErrorMessage(true, false, '');
11594
+ console.log(_this.errorMessage);
11595
+ window.scrollTo(0, 0);
11596
+ }));
11593
11597
  console.log('Notification app loaded');
11594
11598
  };
11595
11599
  NotificationPreviewComponent.decorators = [