@colijnit/transaction 254.1.17 → 254.1.18

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.
Files changed (28) hide show
  1. package/bundles/colijnit-transaction.umd.js +81 -15
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/component/core/base/transaction-payment-base.component.js +3 -3
  5. package/esm2015/lib/component/service-wizard-qa/question-answer-item/question-answer-item.component.js +24 -22
  6. package/esm2015/lib/component/service-wizard-qa/question-answer-item/question-answer-item.module.js +4 -3
  7. package/esm2015/lib/component/transaction-create-wizard/transaction-create-wizard.component.js +8 -2
  8. package/esm2015/lib/component/transaction-header/transaction-header-popup/transaction-header-popup-create-service.component.js +5 -2
  9. package/esm2015/lib/component/transaction-header/transaction-header-popup/transaction-header-popup-relation.component.js +64 -5
  10. package/esm2015/lib/component/transaction-header/transaction-header-popup/transaction-header-popup-service-fields.component.js +2 -2
  11. package/esm2015/lib/component/transaction-internal/transaction-internal.component.js +5 -3
  12. package/esm2015/lib/component/transaction-service-overview/transaction-service-overview.component.js +2 -1
  13. package/esm2015/lib/service/transaction-connector-adapter.service.js +13 -1
  14. package/esm2015/lib/service/transaction-connector.service.js +6 -1
  15. package/esm2015/lib/service/transaction.service.js +18 -1
  16. package/esm2015/lib/transaction-version.js +3 -3
  17. package/fesm2015/colijnit-transaction.js +144 -36
  18. package/fesm2015/colijnit-transaction.js.map +1 -1
  19. package/lib/component/payment/style/_layout.scss +1 -0
  20. package/lib/component/service-wizard-qa/question-answer-item/style/_layout.scss +14 -3
  21. package/lib/component/transaction-cash-register-order/transaction-cash-register-payment-dialog/style/_layout.scss +1 -0
  22. package/lib/component/transaction-create-wizard/transaction-create-wizard.component.d.ts +1 -1
  23. package/lib/component/transaction-header/transaction-header-popup/style/_layout.scss +96 -1
  24. package/lib/component/transaction-service-overview/style/_layout.scss +45 -19
  25. package/lib/service/transaction-connector-adapter.service.d.ts +2 -0
  26. package/lib/service/transaction-connector.service.d.ts +2 -0
  27. package/lib/service/transaction.service.d.ts +1 -0
  28. package/package.json +3 -3
@@ -3,8 +3,8 @@ export class Version {
3
3
  constructor() {
4
4
  this.name = "@colijnit/transaction";
5
5
  this.description = "Colijn IT transaction package";
6
- this.symVer = "254.1.17";
7
- this.publishDate = "9-7-2024 09:41:25";
6
+ this.symVer = "254.1.18";
7
+ this.publishDate = "9-7-2024 21:49:44";
8
8
  }
9
9
  }
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcsbUJBQW1CLENBQUM7SUFDM0MsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMjU0LjEuMTdcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCI5LTctMjAyNCAwOTo0MToyNVwiO1xufSJdfQ==
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcsbUJBQW1CLENBQUM7SUFDM0MsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMjU0LjEuMThcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCI5LTctMjAyNCAyMTo0OTo0NFwiO1xufSJdfQ==
@@ -1,6 +1,6 @@
1
1
  import { __awaiter } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, Component, ViewEncapsulation, Input, HostBinding, EventEmitter, ChangeDetectorRef, Output, Injector, ComponentFactoryResolver, ApplicationRef, Directive, ViewChild, ViewChildren, ElementRef, forwardRef, Pipe, NgModule, ContentChildren, HostListener, ChangeDetectionStrategy, Renderer2 } from '@angular/core';
3
+ import { Injectable, Component, ViewEncapsulation, Input, HostBinding, EventEmitter, ChangeDetectorRef, Output, Injector, ComponentFactoryResolver, ApplicationRef, Directive, ViewChild, ViewChildren, ElementRef, forwardRef, Pipe, NgModule, ContentChildren, HostListener, ChangeDetectionStrategy, Renderer2, SkipSelf } from '@angular/core';
4
4
  import { SequenceName } from '@colijnit/transactionapi/build/enum/sequence-name.enum';
5
5
  import { BehaviorSubject, Subject, throwError } from 'rxjs';
6
6
  import { PendingReasonType } from '@colijnit/transactionapi/build/enum/pending-reason-type.enum';
@@ -149,6 +149,7 @@ import { ChangeServiceHeaderReportMessageRequest } from '@colijnit/transactionap
149
149
  import { CreateServiceOrderWithSourceTransactionLineRequest } from '@colijnit/transactionapi/build/model/create-service-order-with-source-transaction-line-request';
150
150
  import { AddHeaderImageRequest } from '@colijnit/transactionapi/build/model/add-header-image-request';
151
151
  import { DeleteHeaderImageRequest } from '@colijnit/transactionapi/build/model/delete-header-image-request';
152
+ import { ChangeServiceHeaderCauseCodeRequest } from '@colijnit/transactionapi/build/model/change-service-headercause-code-request';
152
153
  import { FlexModule } from '@angular/flex-layout';
153
154
  import { AddressType } from '@colijnit/relationapi/build/enum/address-type.enum';
154
155
  import { RelationKind as RelationKind$2 } from '@colijnit/transactionapi/build/enum/relation-kind.enum';
@@ -258,8 +259,8 @@ class Version {
258
259
  constructor() {
259
260
  this.name = "@colijnit/transaction";
260
261
  this.description = "Colijn IT transaction package";
261
- this.symVer = "254.1.17";
262
- this.publishDate = "9-7-2024 09:41:25";
262
+ this.symVer = "254.1.18";
263
+ this.publishDate = "9-7-2024 21:49:44";
263
264
  }
264
265
  }
265
266
 
@@ -3850,6 +3851,18 @@ class TransactionConnectorAdapterService {
3850
3851
  }
3851
3852
  });
3852
3853
  }
3854
+ changeServiceHeaderCauseCode(request) {
3855
+ return __awaiter(this, void 0, void 0, function* () {
3856
+ const response = yield this.connector.changeServiceHeaderCauseCode(request);
3857
+ if (response && response.validationResult && response.validationResult.success) {
3858
+ return this._boFactory.makeWithRawBackendData(TransactionInfoResponse, response.resultObject);
3859
+ }
3860
+ else {
3861
+ this._handleExceptionFromResponse(response);
3862
+ return null;
3863
+ }
3864
+ });
3865
+ }
3853
3866
  addHeaderImage(request) {
3854
3867
  return __awaiter(this, void 0, void 0, function* () {
3855
3868
  const response = yield this.connector.addHeaderImage(request);
@@ -6612,6 +6625,11 @@ class TransactionConnectorService {
6612
6625
  return this._adapterService.changeServiceHeaderReportMessage(request);
6613
6626
  });
6614
6627
  }
6628
+ changeServiceHeaderCauseCode(request) {
6629
+ return __awaiter(this, void 0, void 0, function* () {
6630
+ return this._adapterService.changeServiceHeaderCauseCode(request);
6631
+ });
6632
+ }
6615
6633
  addHeaderImage(request) {
6616
6634
  return __awaiter(this, void 0, void 0, function* () {
6617
6635
  return this._adapterService.addHeaderImage(request);
@@ -10098,6 +10116,22 @@ class TransactionService extends PendingReasonService {
10098
10116
  }
10099
10117
  });
10100
10118
  }
10119
+ updateServiceHeaderCauseCode(code, saveTransaction) {
10120
+ return __awaiter(this, void 0, void 0, function* () {
10121
+ const lockSuccess = yield this.tryToLockTransaction(this.currentTransaction.transactionInfo.id, this.currentTransaction.transactionInfo.version);
10122
+ if (lockSuccess) {
10123
+ let request = new ChangeServiceHeaderCauseCodeRequest();
10124
+ request.transactionUuid = this.currentTransaction.transactionInfo.uuid;
10125
+ request.newCauseCode = code;
10126
+ const response = yield this.connector.changeServiceHeaderCauseCode(request);
10127
+ this.transactionDirty = true;
10128
+ return this.handleHeaderOperationStatuses(response, saveTransaction);
10129
+ }
10130
+ else {
10131
+ return false;
10132
+ }
10133
+ });
10134
+ }
10101
10135
  addHeaderImage(image, saveTransaction) {
10102
10136
  return __awaiter(this, void 0, void 0, function* () {
10103
10137
  const lockSuccess = yield this.tryToLockTransaction(this.currentTransaction.transactionInfo.id, this.currentTransaction.transactionInfo.version);
@@ -30077,7 +30111,7 @@ TransactionPaymentBaseComponent.ctorParameters = () => [
30077
30111
  { type: TransactionPaymentConnectorService },
30078
30112
  { type: TransactionEventService },
30079
30113
  { type: ChangeDetectorRef },
30080
- { type: TransactionPaymentService },
30114
+ { type: TransactionPaymentService, decorators: [{ type: SkipSelf }] },
30081
30115
  { type: IconCacheService }
30082
30116
  ];
30083
30117
  TransactionPaymentBaseComponent.propDecorators = {
@@ -32657,11 +32691,70 @@ TransactionHeaderPopupRelationComponent.decorators = [
32657
32691
  <co-form>
32658
32692
  <div class="header-relation-content">
32659
32693
  <div class="transaction-header-popup-section general">
32660
- <div class="transaction-header-popup-section-label">
32661
- <span [textContent]="'01'"></span>
32662
- <span class="label-description" [textContent]="'PERSONAL_DATA' | localize"></span>
32694
+ <div class="transaction-header-popup-section-label">
32695
+ <span [textContent]="'01'"></span>
32696
+ <span class="label-description" [textContent]="'PERSONAL_DATA' | localize"></span>
32697
+ </div>
32698
+ <div class="service-read-only-wrapper" *ngIf="readonly || forceReadonly">
32699
+ <div class="service-data-read-only">
32700
+ <div class="service-data-header">
32701
+ <span class="data-description" [textContent]="'NAME_AND_ADDRESS' | localize"></span>
32702
+ <span class="toggle-change" [textContent]="'CHANGE' | localize" (click)="readonly = false; forceReadonly = false"></span>
32703
+ </div>
32704
+ <div class="service-relation-data row">
32705
+ <div class="double-column">
32706
+ <div class="column">
32707
+ <label class="label" [textContent]="'FIRST_NAME' | localize"></label>
32708
+ <span class="value" [textContent]="relation.firstName"></span>
32709
+ </div>
32710
+ <div class="column">
32711
+ <label class="label" [textContent]="'PREFIX' | localize"></label>
32712
+ <span class="value" [textContent]="relation.prefix"></span>
32713
+ </div>
32714
+ </div>
32715
+ <div class="column">
32716
+ <label class="label" [textContent]="'LAST_NAME' | localize"></label>
32717
+ <span class="value" [textContent]="relation.familyName"></span>
32718
+ </div>
32719
+ </div>
32720
+ <div class="service-address-data row">
32721
+ <div class="column">
32722
+ <label class="label" [textContent]="'ADDRESS' | localize"></label>
32723
+ <span class="value" [textContent]="relation.primaryInvoiceAddress.streetName + ' ' + relation.primaryInvoiceAddress.houseNo"></span>
32724
+ </div>
32725
+ <div class="column">
32726
+ <label class="label" [textContent]="'POSTAL_CODE' | localize"></label>
32727
+ <span class="value" [textContent]="relation.primaryInvoiceAddress.postalCode"></span>
32728
+ </div>
32729
+ </div>
32730
+ <div class="service-address-data row">
32731
+ <div class="column">
32732
+ <label class="label" [textContent]="'CITY' | localize"></label>
32733
+ <span class="value" [textContent]="relation.primaryInvoiceAddress.city"></span>
32734
+ </div>
32735
+ <div class="column">
32736
+ <label class="label" [textContent]="'COUNTRY' | localize"></label>
32737
+ <span class="value" [textContent]="relation.primaryInvoiceAddress.countryId"></span>
32738
+ </div>
32739
+ </div>
32663
32740
  </div>
32664
- <div class="service-data-column">
32741
+ <div class="service-data-read-only">
32742
+ <div class="service-data-header">
32743
+ <span class="data-description" [textContent]="'CONTACT_OPTIONS' | localize"></span>
32744
+ </div>
32745
+ <div class="service-relation-data row">
32746
+ <div class="column">
32747
+ <label class="label" [textContent]="'EMAIL' | localize"></label>
32748
+ <span class="value" [textContent]="relation.primaryEmail"></span>
32749
+ </div>
32750
+ <div class="column">
32751
+ <label class="label" [textContent]="'PHONE' | localize"></label>
32752
+ <span class="value" [textContent]="relation.primaryPhoneNumber"></span>
32753
+ </div>
32754
+ </div>
32755
+ </div>
32756
+ </div>
32757
+ <div class="service-data-column" *ngIf="!readonly && !forceReadonly">
32665
32758
  <co-relation-type *ngIf="relationKind === relKind.Customer"
32666
32759
  [screenConfigurationObject]="cfgNames.RelationType"
32667
32760
  [readonly]="readonly || forceReadonly"
@@ -35358,7 +35451,10 @@ TransactionHeaderPopupCreateServiceComponent.decorators = [
35358
35451
  <!--
35359
35452
  <co-input-search [useLeftIcon]="false" [useRightIcon]="true" [label]="'TRANSACTION' | localize" (rightIconClick)="searchTransactionClicked_handler()"></co-input-search>
35360
35453
  -->
35361
- <span [textContent]="existingTransactionTitleText"></span>
35454
+ <div class="service-data-header">
35455
+ <span class="data-description" [textContent]="existingTransactionTitleText"></span>
35456
+ <span class="toggle-change" [textContent]="'CHANGE' | localize" (click)="createOrderFromSLAClicked(); forceReadonly = false"></span>
35457
+ </div>
35362
35458
  <div class="create-via-transaction-result-display">
35363
35459
  <co-image-display [model]="existingTransactionLine?.articleImageData"></co-image-display>
35364
35460
  <span [textContent]="existingTransactionLine?.goodDescription"></span>
@@ -35550,7 +35646,7 @@ TransactionHeaderPopupServiceFieldsComponent.decorators = [
35550
35646
  <co-input-textarea [(model)]="serviceMessage"></co-input-textarea>
35551
35647
  </div>
35552
35648
  <div class="files-upload" >
35553
- <co-files-upload (documentChangeEvent)="upsertDocument($event)" (documentDeleted)="deleteDocument($event)" [documents]="documents"></co-files-upload>
35649
+ <co-files-upload [label]="'ADD_IMAGES' | localize" (documentChangeEvent)="upsertDocument($event)" (documentDeleted)="deleteDocument($event)" [documents]="documents"></co-files-upload>
35554
35650
  </div>
35555
35651
  </co-form>
35556
35652
  </div>
@@ -35963,29 +36059,31 @@ QuestionAnswerComponent.decorators = [
35963
36059
  <section class="question-item">
35964
36060
  <h4 class="question">{{ question }}</h4>
35965
36061
  <br>
35966
- <ng-container *ngFor="let answer of answers">
35967
- <co-input-radio-button
35968
- *ngIf="!questionAnswered"
35969
- class="default-width"
35970
- [label]="answer.answer"
35971
- [model]="selectedAnswer === answer.answer"
35972
- (modelChange)="onSelectAnswer(answer)">
35973
- </co-input-radio-button>
35974
-
35975
- <div *ngIf="selectedAnswer === answer.answer" class="answer-item">
35976
- <span>{{ answer.answer }}</span>
35977
- <span class="link" (click)="onChangeAnswer(answer)">Change</span>
35978
- </div>
36062
+ <div class="answer-items-wrapper">
36063
+ <ng-container *ngFor="let answer of answers">
36064
+ <co-input-checkbox
36065
+ *ngIf="!questionAnswered"
36066
+ class="default-width"
36067
+ [label]="answer.answer"
36068
+ [model]="selectedAnswer === answer.answer"
36069
+ (modelChange)="onSelectAnswer(answer)">
36070
+ </co-input-checkbox>
36071
+
36072
+ <div *ngIf="selectedAnswer === answer.answer" class="answer-item">
36073
+ <span>{{ answer.answer }}</span>
36074
+ <span class="link" [textContent]="'CHANGE' | localize" (click)="onChangeAnswer(answer)"></span>
36075
+ </div>
35979
36076
 
35980
- <div *ngIf="answer.goToQuestion && selectedAnswer === answer.answer">
35981
- <co-question-answer-item
35982
- [question]="answer.goToQuestion.question"
35983
- [answers]="answer.goToQuestion.serviceWizardAnswerDTOList"
35984
- (wizardFinished)="onWizardFinished($event)"
35985
- (qaResultChange)="onQaResultChange($event)">
35986
- </co-question-answer-item>
35987
- </div>
35988
- </ng-container>
36077
+ <div *ngIf="answer.goToQuestion && selectedAnswer === answer.answer">
36078
+ <co-question-answer-item
36079
+ [question]="answer.goToQuestion.question"
36080
+ [answers]="answer.goToQuestion.serviceWizardAnswerDTOList"
36081
+ (wizardFinished)="onWizardFinished($event)"
36082
+ (qaResultChange)="onQaResultChange($event)">
36083
+ </co-question-answer-item>
36084
+ </div>
36085
+ </ng-container>
36086
+ </div>
35989
36087
  </section>
35990
36088
  `,
35991
36089
  encapsulation: ViewEncapsulation.None
@@ -36006,7 +36104,8 @@ QuestionAnswerModule.decorators = [
36006
36104
  imports: [
36007
36105
  CommonModule,
36008
36106
  InputRadioButtonModule,
36009
- PipeModule
36107
+ PipeModule,
36108
+ InputCheckboxModule
36010
36109
  ],
36011
36110
  declarations: [
36012
36111
  QuestionAnswerComponent
@@ -37641,10 +37740,12 @@ TransactionInternalComponent.decorators = [
37641
37740
  *ngIf="activeCategory === categories.SalesOrderCashRegister ||
37642
37741
  activeCategory === categories.SalesOrderOverview ||
37643
37742
  activeCategory === categories.PurchaseOrderOverview ||
37644
- activeCategory === categories.SalesOrderQuotation">
37743
+ activeCategory === categories.SalesOrderQuotation ||
37744
+ activeCategory === categories.ServiceOrderOverview">
37645
37745
  </co-add-product>
37646
37746
  <co-transaction-button
37647
37747
  class="custom-width text-rule"
37748
+ *ngIf="activeCategory !== categories.ServiceOrderService"
37648
37749
  [iconData]="iconCacheService.getIcon(icons.TextSolid)"
37649
37750
  (click)="handleTransactionText()">
37650
37751
  </co-transaction-button>
@@ -37670,7 +37771,7 @@ TransactionInternalComponent.decorators = [
37670
37771
  *ngIf="
37671
37772
  transaction &&
37672
37773
  ((transaction.transactionInfo.transactionKind === transactionKind.CashDesk && !fullyInvoiced()) ||
37673
- transaction.transactionInfo.transactionKind === transactionKind.ServiceOrder)"
37774
+ (transaction.transactionInfo.transactionKind === transactionKind.ServiceOrder && activeCategory === category.ServiceOrderService))"
37674
37775
  [class.higher-max-width]="transaction.transactionInfo.transactionKind === transactionKind.ServiceOrder"
37675
37776
  [posOrderData]="posOrderData"
37676
37777
  [transaction]="transaction">
@@ -50109,6 +50210,7 @@ TransactionServiceOverviewComponent.decorators = [
50109
50210
  </div>
50110
50211
  <co-files-upload (documentChangeEvent)="upsertDocument($event)"
50111
50212
  (documentDeleted)="deleteDocument($event)"
50213
+ [label]="'ADD_IMAGES' | localize"
50112
50214
  [documents]="documents"></co-files-upload>
50113
50215
  </div>
50114
50216
  <co-activity-list [activities]="activities"></co-activity-list>
@@ -52962,7 +53064,13 @@ class TransactionCreateWizardComponent {
52962
53064
  });
52963
53065
  }
52964
53066
  wizardFinished() {
52965
- this.stepper.continueRequested();
53067
+ return __awaiter(this, void 0, void 0, function* () {
53068
+ let qaResult = this.wizardSection.getQuaResult();
53069
+ if (qaResult && qaResult.length > 0) {
53070
+ yield this.createService.updateServiceHeaderCauseCode(qaResult[0].causeCode, true);
53071
+ }
53072
+ this.stepper.continueRequested();
53073
+ });
52966
53074
  }
52967
53075
  _validateForArticleTransaction() {
52968
53076
  return __awaiter(this, void 0, void 0, function* () {