@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.
@@ -6281,6 +6281,8 @@ var AddRemissionComponent = /** @class */ (function () {
6281
6281
  function () {
6282
6282
  var _this = this;
6283
6283
  this.default = 'Select a different reason';
6284
+ this.pattern1 = '^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$';
6285
+ this.pattern2 = '^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$';
6284
6286
  if (this.viewCompStatus !== '' && this.viewCompStatus !== undefined) {
6285
6287
  this.viewStatus = '';
6286
6288
  }
@@ -6299,9 +6301,14 @@ var AddRemissionComponent = /** @class */ (function () {
6299
6301
  this.remissionForm = this.formBuilder.group({
6300
6302
  remissionCode: new FormControl('', Validators.compose([
6301
6303
  Validators.required,
6302
- // 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})$/')
6303
- Validators.pattern('^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$')
6304
+ Validators.pattern("(" + this.pattern1 + ")|(" + this.pattern2 + ")")
6304
6305
  ])),
6306
+ // remissionCode: new FormControl('', Validators.compose([ [A-Za-z]{2}[0-9]{2} [0-9]{6}
6307
+ // Validators.required,
6308
+ // // 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})$/')
6309
+ // // Validators.pattern('^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$'),
6310
+ // 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}))$/')
6311
+ // ])),
6305
6312
  amount: new FormControl('', Validators.compose([
6306
6313
  Validators.required,
6307
6314
  Validators.pattern('^[0-9]+(\.[0-9]{1,2})?$')
@@ -6310,9 +6317,6 @@ var AddRemissionComponent = /** @class */ (function () {
6310
6317
  refundDDReason: new FormControl('', Validators.compose([Validators.required])),
6311
6318
  reason: new FormControl()
6312
6319
  });
6313
- // const remissionctrls=this.remissionForm.controls; ,
6314
- // Validators.pattern('^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$')
6315
- // remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});
6316
6320
  if (this.viewCompStatus === '') {
6317
6321
  this.viewStatus = 'main';
6318
6322
  }
@@ -6350,12 +6354,6 @@ var AddRemissionComponent = /** @class */ (function () {
6350
6354
  if (this.viewCompStatus === 'processretroremissonpage' && this.isFromRefundListPage) {
6351
6355
  this.viewStatus = 'processretroremissonpage';
6352
6356
  }
6353
- // this.refundService.getUserDetails().subscribe(
6354
- // userdetail => {
6355
- // console.log(userdetail);
6356
- // console.log(userdetail['data']);
6357
- // } );
6358
- // this.paymentLibComponent.CCD_CASE_NUMBER
6359
6357
  };
6360
6358
  /**
6361
6359
  * @return {?}
@@ -6371,7 +6369,7 @@ var AddRemissionComponent = /** @class */ (function () {
6371
6369
  var isRemissionLessThanFee = this.fee.calculated_amount > remissionctrls.amount.value;
6372
6370
  this.remissionForm.controls['refundReason'].setErrors(null);
6373
6371
  this.remissionForm.controls['refundDDReason'].setErrors(null);
6374
- this.remissionForm.controls['amount'].setErrors(null);
6372
+ //this.remissionForm.controls['amount'].setErrors(null);
6375
6373
  if (this.remissionForm.dirty && this.remissionForm.valid && isRemissionLessThanFee) {
6376
6374
  this.viewStatus = 'confirmation';
6377
6375
  }