@colijnit/transaction 261.20.34 → 261.20.35

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.
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, EventEmitter, Pipe, HostBinding, Input, ViewEncapsulation, Component, Injector, InjectionToken, Optional, Inject, Output, ContentChildren, Directive, ElementRef, forwardRef, ViewChild, ViewContainerRef, ChangeDetectionStrategy, HostListener, ViewChildren, NgModule, LOCALE_ID, model } from '@angular/core';
3
3
  import { TransactionKind } from '@colijnit/transactionapi/build/enum/transaction-kind.enum';
4
4
  import * as i1$1 from '@colijnit/corecomponents_v12';
5
- import { BaseModuleService, BaseModuleScreenConfigService, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, InputTextComponent, SimpleGridColumnTemplateType, SimpleGridColumnDirective, FormMasterService, ColumnAlign, OverlayService, ContentViewMode, InputCheckboxComponent, InputDatePickerComponent, InputTextareaComponent, CoDialogModule, ButtonModule, CollapsibleModule, InputCheckboxModule, InputTextModule, ListOfValuesModule, InputSearchModule, FormModule, ScreenConfigurationModule, InputRadioButtonModule, IconModule, TooltipDirectiveModule, CheckmarkOverlayModule, PriceDisplayPipeModule, Carousel3dModule, CarouselModule, InputTextareaModule, FormComponent, InputDatePickerModule, FilterPipeModule, ObserveVisibilityModule, CoCurrencyPipeModule, ImageModule, FilterViewmodel, CoreComponentsTranslationModule, ColorPickerModule, ClickoutsideModule, OverlayModule, CalendarComponent, InputNumberPickerModule, SimpleGridModule, GridToolbarButtonModule, InputDateRangePickerModule, HourSchedulingComponentModule, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateModule, ViewModeButtonsModule, FilterItemMode, FilterItemComponent, FilterItemModule, PaginationModule, PaginationBarModule, IconCollapseHandleModule, PopupModule, CoDialogWizardModule, InputScannerModule, CoreComponentsIcon } from '@colijnit/corecomponents_v12';
5
+ import { BaseModuleService, BaseModuleScreenConfigService, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, InputTextComponent, SimpleGridColumnTemplateType, SimpleGridColumnDirective, FormMasterService, ColumnAlign, OverlayService, ContentViewMode, InputCheckboxComponent, FormComponent, InputDatePickerComponent, InputTextareaComponent, CoDialogModule, ButtonModule, CollapsibleModule, InputCheckboxModule, InputTextModule, ListOfValuesModule, InputSearchModule, FormModule, ScreenConfigurationModule, InputRadioButtonModule, IconModule, TooltipDirectiveModule, CheckmarkOverlayModule, PriceDisplayPipeModule, Carousel3dModule, CarouselModule, InputTextareaModule, InputDatePickerModule, FilterPipeModule, ObserveVisibilityModule, CoCurrencyPipeModule, ImageModule, FilterViewmodel, CoreComponentsTranslationModule, ColorPickerModule, ClickoutsideModule, OverlayModule, CalendarComponent, InputNumberPickerModule, SimpleGridModule, GridToolbarButtonModule, InputDateRangePickerModule, HourSchedulingComponentModule, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateModule, ViewModeButtonsModule, FilterItemMode, FilterItemComponent, FilterItemModule, PaginationModule, PaginationBarModule, IconCollapseHandleModule, PopupModule, CoDialogWizardModule, InputScannerModule, CoreComponentsIcon } from '@colijnit/corecomponents_v12';
6
6
  import { TransactionInfo } from '@colijnit/transactionapi/build/model/transaction-info.bo';
7
7
  import { TransactionInfoResponse } from '@colijnit/transactionapi/build/model/transaction-info-response.bo';
8
8
  import { TransactionServiceInfo } from '@colijnit/transactionapi/build/model/transaction-service-info.bo';
@@ -355,8 +355,8 @@ import { DateField } from '@colijnit/ioneconnector/build/factory/decorators/date
355
355
  class Version {
356
356
  name = "@colijnit/transaction";
357
357
  description = "Colijn IT transaction package";
358
- symVer = "261.20.34";
359
- publishDate = "29-4-2026, 18:24:55";
358
+ symVer = "261.20.35";
359
+ publishDate = "5-5-2026, 18:02:14";
360
360
  }
361
361
 
362
362
  class CheckoutModuleService extends BaseModuleService {
@@ -15566,7 +15566,9 @@ class TransactionLineToolbarComponent {
15566
15566
  }
15567
15567
  async ngOnInit() {
15568
15568
  this._transactionKind = this._transactionService.currentTransaction.transactionInfo.transactionKind;
15569
- this.canCreateService = this._transactionKind === TransactionKind.SalesOrder;
15569
+ this.canCreateService = ((this._transactionKind === TransactionKind.SalesOrder)
15570
+ && (this.transactionLine && this.transactionLine.articleLineStatus
15571
+ && this.transactionLine.articleLineStatus.quantityDelivered && this.transactionLine.articleLineStatus.quantityDelivered > 0));
15570
15572
  this.canReopenExternalOrder = this._isReopenableExternalCatalogLine();
15571
15573
  this.conversionUnitsAvailable = await this._getConversionUnitsAvailable();
15572
15574
  this.areAllowedToChangeOrder = (this._transactionKind !== TransactionKind.SalesOrder || !(this._transactionService.invoiceCompleted && !this._transactionService.canChangeSalesOrderWhenFullyInvoiced));
@@ -28765,6 +28767,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
28765
28767
  class DiscountCodesPopupComponent {
28766
28768
  iconCacheService;
28767
28769
  transactionService;
28770
+ discountForm;
28768
28771
  transactionLine;
28769
28772
  discountType;
28770
28773
  showDiscountCodesPopup = new EventEmitter();
@@ -28784,10 +28787,12 @@ class DiscountCodesPopupComponent {
28784
28787
  this.showDiscountCodesPopup.emit(false);
28785
28788
  }
28786
28789
  updateDiscount() {
28787
- this.discountSet.emit({
28788
- newDiscountCode: this.selectedDiscountCode.discountCode,
28789
- newDiscountReason: this.discountRemark
28790
- });
28790
+ if (this.discountForm.submit()) {
28791
+ this.discountSet.emit({
28792
+ newDiscountCode: this.selectedDiscountCode.discountCode,
28793
+ newDiscountReason: this.discountRemark
28794
+ });
28795
+ }
28791
28796
  }
28792
28797
  _getDiscountCodes() {
28793
28798
  this.transactionService.getDiscountCodes().then((codes) => {
@@ -28815,7 +28820,7 @@ class DiscountCodesPopupComponent {
28815
28820
  });
28816
28821
  }
28817
28822
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DiscountCodesPopupComponent, deps: [{ token: IconCacheService }, { token: TransactionService }], target: i0.ɵɵFactoryTarget.Component });
28818
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: DiscountCodesPopupComponent, isStandalone: false, selector: "co-discount-codes-popup", inputs: { transactionLine: "transactionLine", discountType: "discountType" }, outputs: { showDiscountCodesPopup: "showDiscountCodesPopup", discountSet: "discountSet" }, ngImport: i0, template: `
28823
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: DiscountCodesPopupComponent, isStandalone: false, selector: "co-discount-codes-popup", inputs: { transactionLine: "transactionLine", discountType: "discountType" }, outputs: { showDiscountCodesPopup: "showDiscountCodesPopup", discountSet: "discountSet" }, viewQueries: [{ propertyName: "discountForm", first: true, predicate: FormComponent, descendants: true }], ngImport: i0, template: `
28819
28824
  <co-dialog
28820
28825
  class="discount-codes-modal"
28821
28826
  [showCloseIcon]="true"
@@ -28823,16 +28828,20 @@ class DiscountCodesPopupComponent {
28823
28828
  [headerTemplate]="headerTemplate"
28824
28829
  [footerTemplate]="footerTemplate"
28825
28830
  (closeClick)="hideModal()">
28826
- <co-list-of-values
28827
- [(model)]="selectedDiscountCode"
28828
- [collection]="discountCodes"
28829
- [displayField]="'description'"
28830
- [label]="'DISCOUNT_REASON' | localize">
28831
- </co-list-of-values>
28832
- <co-input-textarea
28833
- [placeholder]="'REMARK' | localize"
28834
- [(model)]="discountRemark">
28835
- </co-input-textarea>
28831
+ <co-form #discountForm>
28832
+ <co-list-of-values
28833
+ [(model)]="selectedDiscountCode"
28834
+ [collection]="discountCodes"
28835
+ [required]="true"
28836
+ [displayField]="'description'"
28837
+ [label]="'DISCOUNT_REASON' | localize">
28838
+ </co-list-of-values>
28839
+ <co-input-textarea
28840
+ [placeholder]="'REMARK' | localize"
28841
+ [required]="true"
28842
+ [(model)]="discountRemark">
28843
+ </co-input-textarea>
28844
+ </co-form>
28836
28845
  </co-dialog>
28837
28846
  <ng-template #headerTemplate>
28838
28847
  <co-icon [iconData]="iconCacheService.getIcon(icons.PercentSolid)"></co-icon>
@@ -28852,7 +28861,7 @@ class DiscountCodesPopupComponent {
28852
28861
  </co-button>
28853
28862
  </div>
28854
28863
  </ng-template>
28855
- `, isInline: true, dependencies: [{ kind: "component", type: i1$1.CoDialogComponent, selector: "co-dialog", inputs: ["customCssClass", "headerTemplate", "footerTemplate", "showCloseIcon", "modal", "borderless"], outputs: ["closeClick"] }, { kind: "component", type: i1$1.ButtonComponent, selector: "co-button", inputs: ["label", "iconData", "iconDataRight", "isToggleButton", "isToggled", "hidden", "disabled"], outputs: ["onClick", "clickedWhileDisabled", "isToggledChange"] }, { kind: "component", type: i1$1.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: i1$1.InputTextareaComponent, selector: "co-input-textarea", inputs: ["placeholder"] }, { kind: "component", type: i1$1.ListOfValuesComponent, selector: "co-list-of-values", inputs: ["model", "multiselect", "showToggleAll", "largeCollection", "displayField", "optionIcon", "collection", "collectionLoadFn", "collectionLoadFnProp", "leftIconData", "searchPlaceholder", "searchDisabled", "showChips"] }, { kind: "pipe", type: LocalizePipe, name: "localize" }], encapsulation: i0.ViewEncapsulation.None });
28864
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.CoDialogComponent, selector: "co-dialog", inputs: ["customCssClass", "headerTemplate", "footerTemplate", "showCloseIcon", "modal", "borderless"], outputs: ["closeClick"] }, { kind: "component", type: i1$1.FormComponent, selector: "co-form", inputs: ["readonly", "keepInView"], outputs: ["onChange", "validSubmit", "anySubmit", "validityChange", "readonlyChange", "invalidSubmit"] }, { kind: "component", type: i1$1.ButtonComponent, selector: "co-button", inputs: ["label", "iconData", "iconDataRight", "isToggleButton", "isToggled", "hidden", "disabled"], outputs: ["onClick", "clickedWhileDisabled", "isToggledChange"] }, { kind: "component", type: i1$1.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: i1$1.InputTextareaComponent, selector: "co-input-textarea", inputs: ["placeholder"] }, { kind: "component", type: i1$1.ListOfValuesComponent, selector: "co-list-of-values", inputs: ["model", "multiselect", "showToggleAll", "largeCollection", "displayField", "optionIcon", "collection", "collectionLoadFn", "collectionLoadFnProp", "leftIconData", "searchPlaceholder", "searchDisabled", "showChips"] }, { kind: "pipe", type: LocalizePipe, name: "localize" }], encapsulation: i0.ViewEncapsulation.None });
28856
28865
  }
28857
28866
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DiscountCodesPopupComponent, decorators: [{
28858
28867
  type: Component,
@@ -28866,16 +28875,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
28866
28875
  [headerTemplate]="headerTemplate"
28867
28876
  [footerTemplate]="footerTemplate"
28868
28877
  (closeClick)="hideModal()">
28869
- <co-list-of-values
28870
- [(model)]="selectedDiscountCode"
28871
- [collection]="discountCodes"
28872
- [displayField]="'description'"
28873
- [label]="'DISCOUNT_REASON' | localize">
28874
- </co-list-of-values>
28875
- <co-input-textarea
28876
- [placeholder]="'REMARK' | localize"
28877
- [(model)]="discountRemark">
28878
- </co-input-textarea>
28878
+ <co-form #discountForm>
28879
+ <co-list-of-values
28880
+ [(model)]="selectedDiscountCode"
28881
+ [collection]="discountCodes"
28882
+ [required]="true"
28883
+ [displayField]="'description'"
28884
+ [label]="'DISCOUNT_REASON' | localize">
28885
+ </co-list-of-values>
28886
+ <co-input-textarea
28887
+ [placeholder]="'REMARK' | localize"
28888
+ [required]="true"
28889
+ [(model)]="discountRemark">
28890
+ </co-input-textarea>
28891
+ </co-form>
28879
28892
  </co-dialog>
28880
28893
  <ng-template #headerTemplate>
28881
28894
  <co-icon [iconData]="iconCacheService.getIcon(icons.PercentSolid)"></co-icon>
@@ -28899,7 +28912,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
28899
28912
  encapsulation: ViewEncapsulation.None,
28900
28913
  standalone: false
28901
28914
  }]
28902
- }], ctorParameters: () => [{ type: IconCacheService }, { type: TransactionService }], propDecorators: { transactionLine: [{
28915
+ }], ctorParameters: () => [{ type: IconCacheService }, { type: TransactionService }], propDecorators: { discountForm: [{
28916
+ type: ViewChild,
28917
+ args: [FormComponent]
28918
+ }], transactionLine: [{
28903
28919
  type: Input
28904
28920
  }], discountType: [{
28905
28921
  type: Input
@@ -48514,10 +48530,14 @@ class TransactionLineImageAndDescriptionComponent extends TransactionLineBaseCom
48514
48530
  transactionLineSet() {
48515
48531
  super.transactionLineSet();
48516
48532
  this._loadLineImage();
48517
- if (this.transactionLine.configurationText) {
48533
+ if (this.transactionLine && this.transactionLine.configurationText) {
48518
48534
  // @ts-ignore
48519
48535
  this.transactionLine.configurationText = this.transactionLine.configurationText.replaceAll('\n', '<br>');
48520
48536
  }
48537
+ else if (this.transactionLine && this.transactionLine.configurationReadable) {
48538
+ // @ts-ignore
48539
+ this.transactionLine.configurationReadable = this.transactionLine.configurationReadable.replaceAll('\n', '<br>');
48540
+ }
48521
48541
  this._shouldCheckExpandable = true;
48522
48542
  }
48523
48543
  visibilitySet() {
@@ -48609,22 +48629,32 @@ class TransactionLineImageAndDescriptionComponent extends TransactionLineBaseCom
48609
48629
  }
48610
48630
 
48611
48631
  </div>
48612
- @if (!preview && !popUpView && (transactionLine.articleBoundConcatenatedText || transactionLine.configurationText)) {
48632
+
48633
+ @if (!preview && !popUpView && (transactionLine.articleBoundConcatenatedText || transactionLine.configurationText || transactionLine.configurationReadable)) {
48613
48634
  <div
48614
48635
  class="article-text-wrapper"
48615
48636
  [screenConfigurationObject]="imageAndDescriptionConfigNames?.articleText"
48616
48637
  [screenConfigNativeElement]="true">
48617
- <div #articleTextExpand [ngClass]="{'article-text-expand': true, 'large-article': !expanded && !customerPortal}" class="co-small-scrollbar">
48638
+ <div #articleTextExpand
48639
+ [ngClass]="{'article-text-expand': true, 'large-article': !expanded && !customerPortal}"
48640
+ class="co-small-scrollbar">
48618
48641
  @for (text of transactionLine.articleTextAsArray; track text) {
48642
+ @if (text && text.length > 0) {
48619
48643
  <div class="article-text">
48620
48644
  <div [innerHTML]="text | safeHtml" (click)="handleOpenArticleText()"></div>
48621
48645
  </div>
48646
+ }
48622
48647
  }
48623
48648
  @if (!popUpView && transactionLine.configurationText) {
48624
48649
  <div class="configuration-text">
48625
48650
  <div [innerHTML]="transactionLine.configurationText"></div>
48626
48651
  </div>
48627
48652
  }
48653
+ @if (!popUpView && !transactionLine.configurationText && transactionLine.configurationReadable) {
48654
+ <div class="configuration-text">
48655
+ <div [innerHTML]="transactionLine.configurationReadable"></div>
48656
+ </div>
48657
+ }
48628
48658
  </div>
48629
48659
  @if (!customerPortal && showExpandButton) {
48630
48660
  <div class="expand-wrapper" (click)="expandClicked()">
@@ -48696,22 +48726,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
48696
48726
  }
48697
48727
 
48698
48728
  </div>
48699
- @if (!preview && !popUpView && (transactionLine.articleBoundConcatenatedText || transactionLine.configurationText)) {
48729
+
48730
+ @if (!preview && !popUpView && (transactionLine.articleBoundConcatenatedText || transactionLine.configurationText || transactionLine.configurationReadable)) {
48700
48731
  <div
48701
48732
  class="article-text-wrapper"
48702
48733
  [screenConfigurationObject]="imageAndDescriptionConfigNames?.articleText"
48703
48734
  [screenConfigNativeElement]="true">
48704
- <div #articleTextExpand [ngClass]="{'article-text-expand': true, 'large-article': !expanded && !customerPortal}" class="co-small-scrollbar">
48735
+ <div #articleTextExpand
48736
+ [ngClass]="{'article-text-expand': true, 'large-article': !expanded && !customerPortal}"
48737
+ class="co-small-scrollbar">
48705
48738
  @for (text of transactionLine.articleTextAsArray; track text) {
48739
+ @if (text && text.length > 0) {
48706
48740
  <div class="article-text">
48707
48741
  <div [innerHTML]="text | safeHtml" (click)="handleOpenArticleText()"></div>
48708
48742
  </div>
48743
+ }
48709
48744
  }
48710
48745
  @if (!popUpView && transactionLine.configurationText) {
48711
48746
  <div class="configuration-text">
48712
48747
  <div [innerHTML]="transactionLine.configurationText"></div>
48713
48748
  </div>
48714
48749
  }
48750
+ @if (!popUpView && !transactionLine.configurationText && transactionLine.configurationReadable) {
48751
+ <div class="configuration-text">
48752
+ <div [innerHTML]="transactionLine.configurationReadable"></div>
48753
+ </div>
48754
+ }
48715
48755
  </div>
48716
48756
  @if (!customerPortal && showExpandButton) {
48717
48757
  <div class="expand-wrapper" (click)="expandClicked()">
@@ -49933,13 +49973,16 @@ class TransactionLineActionButtonsComponent {
49933
49973
  const canReopenExternalOrder = this._isReopenableExternalCatalogLine();
49934
49974
  const areAllowedToChangeOrder = (this.transactionKind !== TransactionKind.SalesOrder || !(this._transactionService.invoiceCompleted && !this._transactionService.canChangeSalesOrderWhenFullyInvoiced));
49935
49975
  const conversionUnitsAvailable = await this._getConversionUnitsAvailable();
49976
+ const canCreateService = ((this.transactionKind === TransactionKind.SalesOrder)
49977
+ && (this.transactionLine && this.transactionLine.articleLineStatus
49978
+ && this.transactionLine.articleLineStatus.quantityDelivered && this.transactionLine.articleLineStatus.quantityDelivered > 0));
49936
49979
  this._actionButtonsPopupComponentRef = this._overlayService.createComponent(TransactionLineActionButtonsPopupComponent, {
49937
49980
  parentForOverlay: this.elementRef,
49938
49981
  configNames: this.configNames,
49939
49982
  canReopenExternalOrder: canReopenExternalOrder,
49940
49983
  areAllowedToChangeOrder: areAllowedToChangeOrder,
49941
49984
  conversionUnitsAvailable: conversionUnitsAvailable,
49942
- canCreateService: (this.transactionKind === TransactionKind.SalesOrder)
49985
+ canCreateService: canCreateService
49943
49986
  }, {
49944
49987
  reopenExternalOrderClick: () => this.reopenExternalOrderClick(),
49945
49988
  addDocumentButtonClick: () => this.handleAddDocumentButtonClick(),
@@ -87301,19 +87344,10 @@ class TransactionInternalComponent {
87301
87344
  this.service.copyTransactionLine(copyRequest);
87302
87345
  }
87303
87346
  handleCreateServiceRequest(lineNr) {
87304
- if (lineNr && this.transaction) { /*
87305
- let request:CreateServiceOrderWithSourceTransactionLineRequest = new CreateServiceOrderWithSourceTransactionLineRequest();
87306
- request.sourceLineNr = line.lineNr;
87307
- request.sourceTransId = this.transaction.transactionInfo.id;
87308
- request.customerRelationId = this.transaction.transactionInfo.relation.relationId;
87309
- request.branchNr = this.transaction.transactionInfo.branch.relationNr;*/
87310
- /*this._transactionConnectorService.createServiceOrderWithSourceTransactionLine(request).then((result: TransactionInfoResponse) => {
87311
- if(result) {*/
87347
+ if (lineNr && this.transaction) {
87312
87348
  this._transactionEventService.requestCreateServiceOrderFromTransactionLine.next({ transaction: this.transaction, lineNr: lineNr });
87313
87349
  //added for bundle purposes so we can pass the value along without the event service. Use the event service in all other cases.
87314
87350
  this.serviceRequested.emit({ transactionNr: this.transaction.transactionInfo.transactionNr, transactionId: this.transaction.transactionInfo.id, lineNr: lineNr });
87315
- /* }
87316
- });*/
87317
87351
  }
87318
87352
  }
87319
87353
  handleViewStock(goodId) {