@hmcts/ccpay-web-component 5.0.2-beta96 → 5.0.2-beta99

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.
@@ -3064,7 +3064,7 @@
3064
3064
  this.postCodeForm = this.formBuilder.group({
3065
3065
  postcode: new forms.FormControl('', forms.Validators.compose([
3066
3066
  forms.Validators.required,
3067
- forms.Validators.pattern('^([A-Z]{1,2}[0-9]{1,2}[A-Z]{0,1} ?[0-9][A-Z]{2})')
3067
+ forms.Validators.pattern('^([A-Za-z]{1,2}[0-9]{1,2}[A-Za-z]{0,1} ?[0-9][A-Za-z]{2})')
3068
3068
  ]))
3069
3069
  });
3070
3070
  this.manualAddressForm = this.formBuilder.group({
@@ -3084,7 +3084,7 @@
3084
3084
  ])),
3085
3085
  mpostcode: new forms.FormControl('', forms.Validators.compose([
3086
3086
  forms.Validators.required,
3087
- forms.Validators.pattern('^([A-Z]{1,2}[0-9]{1,2}[A-Z]{0,1} ?[0-9][A-Z]{2})')
3087
+ forms.Validators.pattern('^([A-Za-z]{1,2}[0-9]{1,2}[A-Za-z]{0,1} ?[0-9][A-Za-z]{2})')
3088
3088
  ])),
3089
3089
  country: new forms.FormControl('', forms.Validators.compose([
3090
3090
  forms.Validators.required
@@ -3257,6 +3257,7 @@
3257
3257
  */
3258
3258
  function (str) {
3259
3259
  var _this = this;
3260
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
3260
3261
  /** @type {?} */
3261
3262
  var postcodeField = this.postCodeForm.controls.postcode;
3262
3263
  if (this.postCodeForm.valid) {
@@ -3266,7 +3267,10 @@
3266
3267
  * @return {?}
3267
3268
  */function (refundsNotification) {
3268
3269
  _this.addressPostcodeList = refundsNotification['data']['results'];
3269
- _this.isShowPickAddress = true;
3270
+ _this.isShowPickAddress = refundsNotification['data']['header'].totalresults > 0;
3271
+ if (!_this.isShowPickAddress) {
3272
+ _this.resetForm([false, false, false, true, false, false, false, false, false, false, false, false, false], 'postcode');
3273
+ }
3270
3274
  })),
3271
3275
  ( /**
3272
3276
  * @param {?} error
@@ -5149,18 +5153,23 @@
5149
5153
  if (fee.calculated_amount === 0) {
5150
5154
  _this.isFeeAmountZero = true;
5151
5155
  }
5152
- _this.isRemissionsMatch = false;
5153
- paymentGroup.remissions.forEach(( /**
5154
- * @param {?} rem
5155
- * @return {?}
5156
- */function (rem) {
5157
- if (rem.fee_code === fee.code) {
5158
- _this.isRemissionsMatch = true;
5159
- fee['remissions'] = rem;
5156
+ if (paymentGroup.remissions) {
5157
+ _this.isRemissionsMatch = false;
5158
+ paymentGroup.remissions.forEach(( /**
5159
+ * @param {?} rem
5160
+ * @return {?}
5161
+ */function (rem) {
5162
+ if (rem.fee_code === fee.code) {
5163
+ _this.isRemissionsMatch = true;
5164
+ fee['remissions'] = rem;
5165
+ fees.push(fee);
5166
+ }
5167
+ }));
5168
+ if (!_this.isRemissionsMatch) {
5160
5169
  fees.push(fee);
5161
5170
  }
5162
- }));
5163
- if (!_this.isRemissionsMatch) {
5171
+ }
5172
+ else {
5164
5173
  fees.push(fee);
5165
5174
  }
5166
5175
  }));
@@ -7217,12 +7226,11 @@
7217
7226
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7218
7227
  */
7219
7228
  var AddRemissionComponent = /** @class */ (function () {
7220
- function AddRemissionComponent(formBuilder, router$$1, paymentViewService, paymentLibComponent, PaymentViewComponent$$1, refundService, cd, OrderslistService$$1) {
7229
+ function AddRemissionComponent(formBuilder, router$$1, paymentViewService, paymentLibComponent, refundService, cd, OrderslistService$$1) {
7221
7230
  this.formBuilder = formBuilder;
7222
7231
  this.router = router$$1;
7223
7232
  this.paymentViewService = paymentViewService;
7224
7233
  this.paymentLibComponent = paymentLibComponent;
7225
- this.PaymentViewComponent = PaymentViewComponent$$1;
7226
7234
  this.refundService = refundService;
7227
7235
  this.cd = cd;
7228
7236
  this.OrderslistService = OrderslistService$$1;
@@ -7409,7 +7417,7 @@
7409
7417
  this.paymentLibComponent.paymentMethod = this.payment.method;
7410
7418
  this.paymentLibComponent.paymentGroupReference = this.paymentGroupRef;
7411
7419
  this.paymentLibComponent.paymentReference = this.paymentReference;
7412
- this.PaymentViewComponent.viewCompStatus = 'overpayment';
7420
+ //this.PaymentViewComponent.viewCompStatus = 'overpayment';
7413
7421
  this.paymentLibComponent.viewName = 'payment-view';
7414
7422
  };
7415
7423
  /**
@@ -8725,7 +8733,6 @@
8725
8733
  { type: router.Router },
8726
8734
  { type: PaymentViewService },
8727
8735
  { type: PaymentLibComponent },
8728
- { type: PaymentViewComponent },
8729
8736
  { type: RefundsService },
8730
8737
  { type: i0.ChangeDetectorRef },
8731
8738
  { type: OrderslistService }