@colijnit/transaction 12.1.74 → 12.1.76

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 (21) hide show
  1. package/bundles/colijnit-transaction.umd.js +45 -17
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/component/checkout/checkout-overview-relation-edit/checkout-overview-relation-edit.component.js +5 -4
  5. package/esm2015/lib/component/transaction/transaction.component.js +1 -1
  6. package/esm2015/lib/component/transaction-confirmation-details/transaction-confirmation-details.component.js +23 -4
  7. package/esm2015/lib/component/transaction-confirmation-history/transaction-confirmation-history.component.js +4 -2
  8. package/esm2015/lib/component/transaction-line-side-panel-purchase/transaction-line-side-panel-purchase.component.js +4 -1
  9. package/esm2015/lib/service/transaction-connector-adapter.service.js +3 -3
  10. package/esm2015/lib/service/transaction-connector.service.js +3 -3
  11. package/esm2015/lib/service/transaction-mapping.service.js +1 -1
  12. package/esm2015/lib/service/transaction.service.js +10 -6
  13. package/fesm2015/colijnit-transaction.js +44 -16
  14. package/fesm2015/colijnit-transaction.js.map +1 -1
  15. package/lib/component/transaction-confirmation-details/style/_layout.scss +16 -0
  16. package/lib/component/transaction-confirmation-details/transaction-confirmation-details.component.d.ts +4 -0
  17. package/lib/component/transaction-line-side-panel-purchase/transaction-line-side-panel-purchase.component.d.ts +1 -0
  18. package/lib/service/transaction-connector-adapter.service.d.ts +1 -1
  19. package/lib/service/transaction-connector.service.d.ts +1 -1
  20. package/lib/service/transaction.service.d.ts +1 -1
  21. package/package.json +2 -2
@@ -2823,10 +2823,10 @@ class TransactionConnectorAdapterService {
2823
2823
  });
2824
2824
  });
2825
2825
  }
2826
- addTransactionLine(uuid, articleLine, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr) {
2826
+ addTransactionLine(uuid, articleLine, articleNo, amount, isReturn, aboveLineNr, belowLineNr) {
2827
2827
  return __awaiter(this, void 0, void 0, function* () {
2828
2828
  return new Promise((resolve, reject) => {
2829
- return this.connector.addTransactionLine(uuid, articleLine, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr).then((result) => {
2829
+ return this.connector.addTransactionLine(uuid, articleLine, articleNo, amount, isReturn, aboveLineNr, belowLineNr).then((result) => {
2830
2830
  if (result.validationResult && result.validationResult.success) {
2831
2831
  resolve(this._boFactory.makeWithRawBackendData(TransactionInfoResponse, result.resultObject));
2832
2832
  }
@@ -4198,9 +4198,9 @@ class TransactionConnectorService {
4198
4198
  return this._adapterService.getPostalCodeRetrieval(postcalCode, houseNo);
4199
4199
  });
4200
4200
  }
4201
- addTransactionLine(uuid, articleLine, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr) {
4201
+ addTransactionLine(uuid, articleLine, articleNo, amount, isReturn, aboveLineNr, belowLineNr) {
4202
4202
  return __awaiter(this, void 0, void 0, function* () {
4203
- return this._adapterService.addTransactionLine(uuid, articleLine, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr);
4203
+ return this._adapterService.addTransactionLine(uuid, articleLine, articleNo, amount, isReturn, aboveLineNr, belowLineNr);
4204
4204
  });
4205
4205
  }
4206
4206
  addTextLineToTransaction(uuid, showOnDocuments, text, amount, articleBound, refArticleLineNr, aboveLineNr, belowLineNr) {
@@ -5754,6 +5754,8 @@ class TransactionService extends PendingReasonService {
5754
5754
  createSalesOrder(request) {
5755
5755
  return __awaiter(this, void 0, void 0, function* () {
5756
5756
  return new Promise((resolve) => {
5757
+ // todo fix this
5758
+ request.branchNr = "1";
5757
5759
  this.connector.createSalesOrder(request).then((response) => {
5758
5760
  this.rememberCurrentTransaction(response);
5759
5761
  resolve(true);
@@ -5774,6 +5776,8 @@ class TransactionService extends PendingReasonService {
5774
5776
  createPurchaseOrder(request) {
5775
5777
  return __awaiter(this, void 0, void 0, function* () {
5776
5778
  return new Promise((resolve) => {
5779
+ // todo fix this
5780
+ request.branchNr = "1";
5777
5781
  this.connector.createPurchaseOrder(request).then((response) => {
5778
5782
  this.rememberCurrentTransaction(response);
5779
5783
  resolve(true);
@@ -5784,6 +5788,8 @@ class TransactionService extends PendingReasonService {
5784
5788
  createServiceOrder(request) {
5785
5789
  return __awaiter(this, void 0, void 0, function* () {
5786
5790
  return new Promise((resolve) => {
5791
+ // todo fix this
5792
+ request.branchNr = "1";
5787
5793
  this.connector.createServiceOrder(request).then((response) => {
5788
5794
  this.rememberCurrentTransaction(response);
5789
5795
  resolve(true);
@@ -5892,7 +5898,7 @@ class TransactionService extends PendingReasonService {
5892
5898
  addArticle(articleNo, isReturn = false, aboveLineNr = 0, belowLineNr = 0) {
5893
5899
  return __awaiter(this, void 0, void 0, function* () {
5894
5900
  yield this._checkAndCreateTransaction();
5895
- const response = yield this.connector.addTransactionLine(this.currentTransaction.transactionInfo.uuid, TransactionLineType.ArticleLine, articleNo, null, null, null, isReturn, aboveLineNr, belowLineNr);
5901
+ const response = yield this.connector.addTransactionLine(this.currentTransaction.transactionInfo.uuid, TransactionLineType.ArticleLine, articleNo, null, isReturn, aboveLineNr, belowLineNr);
5896
5902
  return this.handleLineOperationStatuses(response);
5897
5903
  });
5898
5904
  }
@@ -5912,11 +5918,11 @@ class TransactionService extends PendingReasonService {
5912
5918
  // });
5913
5919
  // });
5914
5920
  // }
5915
- addTransactionLine(lineType, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr, remember = true) {
5921
+ addTransactionLine(lineType, articleNo, amount, isReturn, aboveLineNr, belowLineNr, remember = true) {
5916
5922
  return __awaiter(this, void 0, void 0, function* () {
5917
5923
  yield this._checkAndCreateTransaction();
5918
5924
  return new Promise((resolve, reject) => {
5919
- this.connector.addTransactionLine(this.currentTransaction.transactionInfo.uuid, lineType, articleNo, amount, warehouseNo, commissionCode, isReturn, aboveLineNr, belowLineNr)
5925
+ this.connector.addTransactionLine(this.currentTransaction.transactionInfo.uuid, lineType, articleNo, amount, isReturn, aboveLineNr, belowLineNr)
5920
5926
  .then((response) => __awaiter(this, void 0, void 0, function* () {
5921
5927
  this.rememberCurrentTransaction(response);
5922
5928
  resolve(response);
@@ -6228,8 +6234,6 @@ class TransactionService extends PendingReasonService {
6228
6234
  const createMethod = this._createTransactionMethods.get(this.transactionKind);
6229
6235
  if (createMethod) {
6230
6236
  const request = new CreateTransactionRequest();
6231
- // todo fix this
6232
- request.branchNr = "1";
6233
6237
  return createMethod.call(this, request);
6234
6238
  }
6235
6239
  else {
@@ -6436,12 +6440,12 @@ class CheckoutOverviewRelationEditComponent {
6436
6440
  set relation(value) {
6437
6441
  this._relation = value;
6438
6442
  if (this._relation) {
6443
+ if (this._relation instanceof SupplierFullObject) {
6444
+ this._relation.type = RelationNameKind.Company;
6445
+ }
6439
6446
  if (this._relation instanceof CustomerFullObject) {
6440
6447
  this.customerGroup = this._relation.customerGroup;
6441
6448
  }
6442
- else {
6443
- this._relation.type = RelationNameKind.Company;
6444
- }
6445
6449
  this.address = this._relation.getFirstAddressOrCreateNew();
6446
6450
  const firstActiveAddress = this._relation.activeAddresses.length > 0 ? this._relation.activeAddresses[0] : undefined;
6447
6451
  this.deliveryAddressNawNr = firstActiveAddress ? firstActiveAddress.nawNr : 0;
@@ -18655,7 +18659,9 @@ class TransactionConfirmationHistoryComponent {
18655
18659
  this.getPurchasePortalLine.filterObject = this.purchasePortalFilter;
18656
18660
  this.transactionService.getPurchasePortalLines(this.getPurchasePortalLine).then((result) => {
18657
18661
  this.transactionService.purchasePortalLine = result;
18658
- this.filteredDocBatchArray = this.transactionService.purchasePortalLine[0].docBatchArray.filter(value => value.historical === 'G');
18662
+ this.transactionService.purchasePortalLine.forEach((element) => {
18663
+ this.filteredDocBatchArray = element.docBatchArray.filter(value => value.historical === 'G');
18664
+ });
18659
18665
  });
18660
18666
  });
18661
18667
  }
@@ -18758,20 +18764,31 @@ class TransactionConfirmationDetailsComponent {
18758
18764
  this.showAddOrder = false;
18759
18765
  this.newDocBatchArray = new DocDeliveryBatch();
18760
18766
  this.docBatchSaved = new EventEmitter();
18767
+ this.isEditMode = false;
18761
18768
  }
18762
18769
  showClass() {
18763
18770
  return true;
18764
18771
  }
18772
+ set isEditing(value) {
18773
+ this.isEditMode = value;
18774
+ console.log(this.isEditMode);
18775
+ console.log(this.isEditing);
18776
+ }
18777
+ get isEditing() {
18778
+ return this.isEditMode;
18779
+ }
18765
18780
  addButtonClicked() {
18766
18781
  this.showAddOrder = !this.showAddOrder;
18767
18782
  }
18768
18783
  handleOkClick() {
18769
18784
  return __awaiter(this, void 0, void 0, function* () {
18770
18785
  if (this.newDocBatchArray.docAmount && this.newDocBatchArray.confirmedPrice) {
18771
- this.newDocBatchArray.docDateOrg = new Date();
18772
18786
  this.newDocBatchArray.deleteLine = "F";
18773
18787
  this.newDocBatchArray.historical = "G";
18774
- this.transactionService.purchasePortalLine[0].docBatchArray.push(this.newDocBatchArray);
18788
+ if (!this.newDocBatchArray.docDateOrg) {
18789
+ this.newDocBatchArray.docDateOrg = this.newDocBatchArray.docDate;
18790
+ this.transactionService.purchasePortalLine[0].docBatchArray.push(this.newDocBatchArray);
18791
+ }
18775
18792
  this.transactionService.purchasePortalLine[0].docKind = "IB";
18776
18793
  yield this.transactionService.updatePurchasePortalLines(this.transactionService.purchasePortalLine[0]);
18777
18794
  this.docBatchSaved.emit(true);
@@ -18782,6 +18799,10 @@ class TransactionConfirmationDetailsComponent {
18782
18799
  }
18783
18800
  });
18784
18801
  }
18802
+ handleCancelClick() {
18803
+ this.newDocBatchArray = new DocDeliveryBatch();
18804
+ this.isEditing = false;
18805
+ }
18785
18806
  }
18786
18807
  TransactionConfirmationDetailsComponent.decorators = [
18787
18808
  { type: Component, args: [{
@@ -18799,6 +18820,9 @@ TransactionConfirmationDetailsComponent.decorators = [
18799
18820
  <span class="header-right-text" [textContent]="transactionLines.deliveryDate | date:'dd-MM-YYYY'"></span>
18800
18821
  </div>
18801
18822
  </div>
18823
+ <div class="header-inform-user" *ngIf="isEditing">
18824
+ <span class="header-inform-user editting" [textContent]="'EDITING_DATA_ROW' | localize"></span>
18825
+ </div>
18802
18826
  <div *ngIf="showAddOrder" class="columns-wrapper">
18803
18827
  <div class="details-column">
18804
18828
  <co-input-text class="details-input"
@@ -18839,7 +18863,7 @@ TransactionConfirmationDetailsComponent.decorators = [
18839
18863
  </co-form>
18840
18864
 
18841
18865
  <div *ngIf="showAddOrder" class="save-cancel-wrapper">
18842
- <co-default-ok-cancel-buttons (okClick)="handleOkClick()"></co-default-ok-cancel-buttons>
18866
+ <co-default-ok-cancel-buttons (okClick)="handleOkClick()" (cancelClick)="handleCancelClick()"></co-default-ok-cancel-buttons>
18843
18867
  </div>
18844
18868
  </div>
18845
18869
  `,
@@ -18858,6 +18882,7 @@ TransactionConfirmationDetailsComponent.propDecorators = {
18858
18882
  transactionInfoNr: [{ type: Input }],
18859
18883
  showClass: [{ type: HostBinding, args: ["class.co-transaction-confirmation-details",] }],
18860
18884
  newDocBatchArray: [{ type: Input }],
18885
+ isEditing: [{ type: Input }],
18861
18886
  docBatchSaved: [{ type: Output }]
18862
18887
  };
18863
18888
 
@@ -18954,6 +18979,7 @@ class TransactionLineSidePanelPurchaseComponent {
18954
18979
  this.goodsReceiptStatus = new GoodsReceiptStatusWithHistory();
18955
18980
  this.selectedLineDocBatchArray = new DocDeliveryBatch();
18956
18981
  this.isDocBatchSaved = false;
18982
+ this.editingMode = false;
18957
18983
  this._transactionInfo = new TransactionInfo();
18958
18984
  }
18959
18985
  set transactionInfo(value) {
@@ -18980,6 +19006,7 @@ class TransactionLineSidePanelPurchaseComponent {
18980
19006
  }
18981
19007
  fillInputOnClick(data) {
18982
19008
  this.selectedLineDocBatchArray = data;
19009
+ this.editingMode = true;
18983
19010
  }
18984
19011
  docBatchSaved(data) {
18985
19012
  this.isDocBatchSaved = data;
@@ -18995,6 +19022,7 @@ TransactionLineSidePanelPurchaseComponent.decorators = [
18995
19022
  [transactionInfoNr]="transactionInfo.transactionNr"
18996
19023
  [transactionLines]="transactionLine"
18997
19024
  [newDocBatchArray]="selectedLineDocBatchArray"
19025
+ [isEditing]="editingMode"
18998
19026
  (docBatchSaved)="docBatchSaved($event)"
18999
19027
  ></co-transaction-confirmation-details>
19000
19028
  <co-transaction-confirmation-history