taxtank-core 0.31.48 → 0.31.49

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.
@@ -15508,11 +15508,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
15508
15508
  }] });
15509
15509
 
15510
15510
  class UserService extends RestService$1 {
15511
- constructor(http, eventDispatcherService, environment) {
15512
- super(http, eventDispatcherService, environment);
15513
- this.http = http;
15514
- this.eventDispatcherService = eventDispatcherService;
15515
- this.environment = environment;
15511
+ constructor() {
15512
+ super(...arguments);
15516
15513
  this.modelClass = User;
15517
15514
  this.collectionClass = Collection;
15518
15515
  this.endpointUri = 'users';
@@ -15622,17 +15619,14 @@ class UserService extends RestService$1 {
15622
15619
  this.eventDispatcherService.on(AppEventTypeEnum.BASIQ_CONSENT_UPDATED).subscribe(() => this.refreshCache());
15623
15620
  }
15624
15621
  }
15625
- UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UserService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
15622
+ UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UserService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
15626
15623
  UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UserService, providedIn: 'root' });
15627
15624
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: UserService, decorators: [{
15628
15625
  type: Injectable,
15629
15626
  args: [{
15630
15627
  providedIn: 'root'
15631
15628
  }]
15632
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
15633
- type: Inject,
15634
- args: ['environment']
15635
- }] }]; } });
15629
+ }] });
15636
15630
 
15637
15631
  class FinancialYearService {
15638
15632
  constructor(http, environment, mpService) {
@@ -20439,29 +20433,6 @@ class AbstractForm extends UntypedFormGroup {
20439
20433
  }
20440
20434
  }
20441
20435
 
20442
- /**
20443
- * Validator for address, check if corelogic suggestion selected correctly
20444
- */
20445
- function addressCorelogicValidator() {
20446
- return (form) => {
20447
- // we are interested in corelogic ids only for Australian addresses
20448
- if (!form.isAustraliaSelected()) {
20449
- return null;
20450
- }
20451
- // we need at least corelogic locality id to get growth percent
20452
- const locIdControl = form.get('corelogicLocId');
20453
- const refIdControl = form.get('corelogicRefId');
20454
- if (locIdControl.enabled && locIdControl.hasError('required')) {
20455
- return { address: 'City, state or postal code not specified' };
20456
- }
20457
- // @TODO Artem why?
20458
- // if (refIdControl.enabled && refIdControl.hasError('required')) {
20459
- // return { address: 'Street number not specified' };
20460
- // }
20461
- return null;
20462
- };
20463
- }
20464
-
20465
20436
  /**
20466
20437
  * Address form. Works with corelogic or manual address
20467
20438
  */
@@ -20475,20 +20446,19 @@ class AddressForm extends AbstractForm {
20475
20446
  searchQuery: new UntypedFormControl(address?.address ? address.nameLong : null, Validators.required),
20476
20447
  type: new UntypedFormControl(address?.type || AddressTypeEnum.STREET, Validators.required),
20477
20448
  // corelogic fields (required for Australia and disabled for other countries)
20478
- corelogicLocId: new UntypedFormControl({ value: address?.corelogicLocId, disabled: true }, Validators.required),
20449
+ // @TODO not required temporary, waiting for corelogic support response why it can't find some suburbs (like Hamilton Island)
20450
+ corelogicLocId: new UntypedFormControl({ value: address?.corelogicLocId, disabled: true }),
20479
20451
  corelogicRefId: new UntypedFormControl({ value: address?.corelogicRefId, disabled: true }),
20480
- // @TODO Artem why?
20481
- // corelogicRefId: new UntypedFormControl({value: address?.corelogicRefId, disabled: true}, Validators.required),
20482
20452
  // manual fields (using when address not found in corelogic)
20483
20453
  unitNumber: new UntypedFormControl({ value: address?.unitNumber, disabled: true }),
20484
- address: new UntypedFormControl({ value: address?.address, disabled: true }, Validators.required),
20454
+ address: new UntypedFormControl({ value: address?.address, disabled: true }),
20485
20455
  streetNumber: new UntypedFormControl({ value: address?.streetNumber, disabled: true }, [Validators.required, Validators.pattern(AddressForm.streetNumberPattern)]),
20486
20456
  street: new UntypedFormControl({ value: address?.street, disabled: true }, Validators.required),
20487
20457
  city: new UntypedFormControl({ value: address?.city, disabled: true }, Validators.required),
20488
20458
  state: new UntypedFormControl({ value: address?.state, disabled: true }, Validators.required),
20489
20459
  postcode: new UntypedFormControl({ value: address?.postcode, disabled: true }, Validators.required),
20490
20460
  country: new UntypedFormControl({ value: address?.country || Country.australia, disabled: true }, Validators.required)
20491
- }, address, addressCorelogicValidator());
20461
+ }, address);
20492
20462
  /**
20493
20463
  * Emit event to search address in corelogic when user filled enough data for corelogic
20494
20464
  */
@@ -20517,13 +20487,13 @@ class AddressForm extends AbstractForm {
20517
20487
  */
20518
20488
  onSelectSuggestion(suggestion) {
20519
20489
  // if no suggestion then 'Add manually' option selected
20520
- if (!suggestion) {
20490
+ if (!suggestion && !this.isManual) {
20521
20491
  this.switchToManual();
20522
20492
  return;
20523
20493
  }
20524
20494
  this.patchValue({
20525
- corelogicLocId: suggestion.localityId,
20526
- corelogicRefId: suggestion.propertyId
20495
+ corelogicLocId: suggestion?.localityId ?? null,
20496
+ corelogicRefId: suggestion?.propertyId ?? null
20527
20497
  });
20528
20498
  }
20529
20499
  /**