@colijnit/transaction 258.1.35 → 258.1.36

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.
@@ -294,8 +294,8 @@ class Version {
294
294
  constructor() {
295
295
  this.name = "@colijnit/transaction";
296
296
  this.description = "Colijn IT transaction package";
297
- this.symVer = "258.1.35";
298
- this.publishDate = "19-6-2025 10:49:58";
297
+ this.symVer = "258.1.36";
298
+ this.publishDate = "20-6-2025 12:34:14";
299
299
  }
300
300
  }
301
301
 
@@ -15312,9 +15312,7 @@ CheckoutOverviewRelationEditComponent.decorators = [
15312
15312
  (inputChangeForSuggestions)="handleInputChange($event)"
15313
15313
  ></co-relation-address>
15314
15314
  </div>
15315
- </div>
15316
- <div class="checkout-data-column" *ngIf="relationKind === relKind.Customer">
15317
- <div class="checkout-data-row">
15315
+ <div *ngIf="relationKind === relKind.Customer">
15318
15316
  <co-vat-payment [model]="vatPayment"
15319
15317
  [screenConfigurationObject]="cfgNames.RelationVatPayment"
15320
15318
  (modelChange)="handleVatPaymentChange($event)"
@@ -15323,7 +15321,7 @@ CheckoutOverviewRelationEditComponent.decorators = [
15323
15321
  [screenConfigurationObject]="cfgNames.RelationVatCode"
15324
15322
  (modelChange)="handleVatCodeChange($event)"
15325
15323
  ></co-vat-code>
15326
- </div>
15324
+ </div>
15327
15325
  </div>
15328
15326
  <ng-container *ngIf="showAddresses">
15329
15327
  <div class="checkout-data-column">
@@ -16878,7 +16876,7 @@ class RelationAddressComponent extends RelationBaseComponent {
16878
16876
  this.transactionService = transactionService;
16879
16877
  this.addressChange = new EventEmitter();
16880
16878
  this.countries = [];
16881
- // public addressTypes: CoDomainValue[] = [];
16879
+ this.addressTypes = [];
16882
16880
  this.fields = { text: "description", value: "code" };
16883
16881
  this.postalCodeCheckErrorMessage = "";
16884
16882
  this._prevPostalCodeForCheck = "";
@@ -16901,9 +16899,9 @@ class RelationAddressComponent extends RelationBaseComponent {
16901
16899
  this.countries = countries;
16902
16900
  this._setSelectedAddress();
16903
16901
  });
16904
- // this._connector.getAddressTypes('NL').then((codes: CoDomainValue[]) => {
16905
- // this.addressTypes = codes;
16906
- // });
16902
+ this._connector.getAddressTypes('NL').then((codes) => {
16903
+ this.addressTypes = codes;
16904
+ });
16907
16905
  });
16908
16906
  }
16909
16907
  checkForPostalCodeCheckError() {
@@ -16967,6 +16965,14 @@ class RelationAddressComponent extends RelationBaseComponent {
16967
16965
  this.inputChangeForSuggestions.next(this.suggestionRequest);
16968
16966
  }
16969
16967
  }
16968
+ handleAddressTypeChange(addressType) {
16969
+ if (Object.values(AddressType).includes(addressType.code)) {
16970
+ this.address.addressType = addressType.code;
16971
+ }
16972
+ }
16973
+ addressTypeForCode(addressType) {
16974
+ return this.addressTypes.find((addressTypeListItem) => addressTypeListItem.code === addressType);
16975
+ }
16970
16976
  _setSelectedAddress() {
16971
16977
  if (!this.address || !this.countries) {
16972
16978
  return;
@@ -17026,16 +17032,17 @@ RelationAddressComponent.decorators = [
17026
17032
  (modelChange)="handleCountryChange($event)"
17027
17033
  ></co-list-of-values>
17028
17034
  </div>
17029
- <!-- <div class="relation-address-data-row default single">-->
17030
- <!-- <co-list-of-values-->
17031
- <!-- [(model)]="address.addressType"-->
17032
- <!-- [collection]="addressTypes"-->
17033
- <!-- [displayField]="'description'"-->
17034
- <!-- [label]="'ADDRESS_TYPE' | localize"-->
17035
- <!-- [required]="true"-->
17036
- <!-- ></co-list-of-values>-->
17037
- <!-- </div>-->
17038
- <!-- -->
17035
+ <div class="relation-address-data-row default single">
17036
+ <co-list-of-values
17037
+ [model]="addressTypeForCode(address.addressType)"
17038
+ (modelChange)="handleAddressTypeChange($event)"
17039
+ [collection]="addressTypes"
17040
+ [displayField]="'description'"
17041
+ [label]="'ADDRESS_TYPE' | localize"
17042
+ [required]="true"
17043
+ ></co-list-of-values>
17044
+ </div>
17045
+
17039
17046
  `,
17040
17047
  encapsulation: ViewEncapsulation.None
17041
17048
  },] }
@@ -20302,6 +20309,7 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
20302
20309
  this.additionalFileName = '';
20303
20310
  this.pdfDoc = '';
20304
20311
  this.disablePdfPreview = false;
20312
+ this.isAdditionalDocAllowedByScreenConfig = false;
20305
20313
  }
20306
20314
  ngOnInit() {
20307
20315
  super.ngOnInit();
@@ -20390,6 +20398,9 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
20390
20398
  this.transactionService.getTermsAndConditionsForm(this.transactionInfo.id).then(result => {
20391
20399
  this.additionalFileContents = result;
20392
20400
  this.additionalFileName = this.transactionInfo.transactionKind + '_' + this.transactionInfo.transactionNr.toString();
20401
+ // @ts-ignore
20402
+ this.isAdditionalDocEnabled = this.isAdditionalDocAllowedByScreenConfig && !!result;
20403
+ this.detectChanges();
20393
20404
  });
20394
20405
  }
20395
20406
  upsertDocument(doc) {
@@ -20418,8 +20429,11 @@ class TransactionQuickAccessSendMethodBaseComponent extends TransactionHeaderBas
20418
20429
  this._getDefaultSendMethod();
20419
20430
  this._getEmailLayouts();
20420
20431
  this._getPrintLayouts();
20421
- this.isDocSignEnabled = this.screenConfigService.getObjectConfigurationFor(this.cfgNames.IsDocSignEnabled).immediatelyVisible();
20422
- this.isAdditionalDocEnabled = this.screenConfigService.getObjectConfigurationFor(this.cfgNames.IsAdditionalDocEnabled).immediatelyVisible();
20432
+ this.isAdditionalDocAllowedByScreenConfig =
20433
+ this.screenConfigService.getObjectConfigurationFor(this.cfgNames.IsAdditionalDocEnabled).immediatelyVisible();
20434
+ if (this.isAdditionalDocAllowedByScreenConfig) {
20435
+ this.getTermsAndConditionsForm();
20436
+ }
20423
20437
  this.getHistoricDocuments();
20424
20438
  }
20425
20439
  _getPrinters() {