@hmcts/ccpay-web-component 4.0.0-beta550 → 4.0.0-beta551

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.
@@ -6194,6 +6194,8 @@
6194
6194
  function () {
6195
6195
  var _this = this;
6196
6196
  this.default = 'Select a different reason';
6197
+ this.pattern1 = '^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$';
6198
+ this.pattern2 = '^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$';
6197
6199
  if (this.viewCompStatus !== '' && this.viewCompStatus !== undefined) {
6198
6200
  this.viewStatus = '';
6199
6201
  }
@@ -6212,9 +6214,14 @@
6212
6214
  this.remissionForm = this.formBuilder.group({
6213
6215
  remissionCode: new forms.FormControl('', forms.Validators.compose([
6214
6216
  forms.Validators.required,
6215
- // Validators.pattern('/(^[a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$/|/(^[A-Za-z]{2}[0-9]{2})-([0-9]{6})$/')
6216
- forms.Validators.pattern('^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$')
6217
+ forms.Validators.pattern("(" + this.pattern1 + ")|(" + this.pattern2 + ")")
6217
6218
  ])),
6219
+ // remissionCode: new FormControl('', Validators.compose([ [A-Za-z]{2}[0-9]{2} [0-9]{6}
6220
+ // Validators.required,
6221
+ // // Validators.pattern('/(^[a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$/|/^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$/')
6222
+ // // Validators.pattern('^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$'),
6223
+ // Validators.pattern('/^(([A-Za-z]{2}[0-9]{2})-([0-9]{6}))|(([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3}))$/')
6224
+ // ])),
6218
6225
  amount: new forms.FormControl('', forms.Validators.compose([
6219
6226
  forms.Validators.required,
6220
6227
  forms.Validators.pattern('^[0-9]+(\.[0-9]{1,2})?$')
@@ -6223,9 +6230,6 @@
6223
6230
  refundDDReason: new forms.FormControl('', forms.Validators.compose([forms.Validators.required])),
6224
6231
  reason: new forms.FormControl()
6225
6232
  });
6226
- // const remissionctrls=this.remissionForm.controls; ,
6227
- // Validators.pattern('^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$')
6228
- // remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});
6229
6233
  if (this.viewCompStatus === '') {
6230
6234
  this.viewStatus = 'main';
6231
6235
  }
@@ -6258,12 +6262,6 @@
6258
6262
  if (this.viewCompStatus === 'processretroremissonpage' && this.isFromRefundListPage) {
6259
6263
  this.viewStatus = 'processretroremissonpage';
6260
6264
  }
6261
- // this.refundService.getUserDetails().subscribe(
6262
- // userdetail => {
6263
- // console.log(userdetail);
6264
- // console.log(userdetail['data']);
6265
- // } );
6266
- // this.paymentLibComponent.CCD_CASE_NUMBER
6267
6265
  };
6268
6266
  /**
6269
6267
  * @return {?}
@@ -6279,7 +6277,7 @@
6279
6277
  var isRemissionLessThanFee = this.fee.calculated_amount > remissionctrls.amount.value;
6280
6278
  this.remissionForm.controls['refundReason'].setErrors(null);
6281
6279
  this.remissionForm.controls['refundDDReason'].setErrors(null);
6282
- this.remissionForm.controls['amount'].setErrors(null);
6280
+ //this.remissionForm.controls['amount'].setErrors(null);
6283
6281
  if (this.remissionForm.dirty && this.remissionForm.valid && isRemissionLessThanFee) {
6284
6282
  this.viewStatus = 'confirmation';
6285
6283
  }