@colijnit/transaction 12.0.4 → 12.1.2

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 (72) hide show
  1. package/app/component/core/base/default-ok-cancel-buttons.component.d.ts +13 -0
  2. package/app/component/core/base/transaction-base.component.d.ts +38 -0
  3. package/app/component/core/directive/template-wrapper.directive.d.ts +13 -0
  4. package/app/component/{shopping-cart → core}/stock-status-indicator/stock-status-indicator.component.d.ts +0 -0
  5. package/app/component/service-order/ione-service-order-module.d.ts +2 -0
  6. package/app/component/service-order/ione-service-order.component.d.ts +25 -0
  7. package/app/component/service-order/service-order.component.d.ts +48 -0
  8. package/app/component/service-order/summary/transaction-article-summary.component.d.ts +17 -0
  9. package/app/component/service-order/summary/transaction-delivery-summary.component.d.ts +20 -0
  10. package/app/component/service-order/summary/transaction-order-summary.component.d.ts +16 -0
  11. package/app/component/service-order/summary/transaction-payment-info.component.d.ts +14 -0
  12. package/app/component/service-order/summary/transaction-product-contract-summary.component.d.ts +7 -0
  13. package/app/component/service-order/summary/transaction-product-summary.component.d.ts +15 -0
  14. package/app/component/service-order/summary/transaction-service-status.component.d.ts +15 -0
  15. package/app/component/service-order/summary/transaction-service-summary.component.d.ts +15 -0
  16. package/app/component/service-order/summary/transaction-summary-block.component.d.ts +16 -0
  17. package/app/component/service-order/transaction-article-text/transaction-article-text.component.d.ts +24 -0
  18. package/app/component/service-order/transaction-header-block/transaction-header-block.component.d.ts +15 -0
  19. package/app/component/service-order/transaction-order-line-view/transaction-order-line-view.component.d.ts +16 -0
  20. package/app/component/service-order/transaction-order-lines/transaction-order-lines.component.d.ts +25 -0
  21. package/app/component/service-order/transaction-order-totals/transaction-order-totals.component.d.ts +6 -0
  22. package/app/component/service-order/transaction-relation/transaction-relation-address.component.d.ts +22 -0
  23. package/app/component/service-order/transaction-relation/transaction-relation-edit.component.d.ts +29 -0
  24. package/app/component/service-order/transaction-sidebar/transaction-line-accordion.component.d.ts +11 -0
  25. package/app/component/service-order/transaction-sidebar/transaction-sidebar-right.component.d.ts +26 -0
  26. package/app/service/ione-connector-adapter.service.d.ts +2 -0
  27. package/app/service/transaction-event.service.d.ts +5 -0
  28. package/app/service/transaction.service.d.ts +5 -0
  29. package/bundles/colijnit-transaction.umd.js +1656 -47
  30. package/bundles/colijnit-transaction.umd.js.map +1 -1
  31. package/colijnit-transaction.d.ts +23 -1
  32. package/colijnit-transaction.metadata.json +1 -1
  33. package/esm2015/app/component/checkout/checkout-overview/checkout-overview.component.js +2 -2
  34. package/esm2015/app/component/checkout/ione-checkout.module.js +3 -5
  35. package/esm2015/app/component/common/icon/icon.component.js +2 -1
  36. package/esm2015/app/component/core/base/default-ok-cancel-buttons.component.js +39 -0
  37. package/esm2015/app/component/core/base/transaction-base.component.js +123 -0
  38. package/esm2015/app/component/core/directive/template-wrapper.directive.js +69 -0
  39. package/esm2015/app/component/{shopping-cart → core}/stock-status-indicator/stock-status-indicator.component.js +1 -1
  40. package/esm2015/app/component/service-order/ione-service-order-module.js +103 -0
  41. package/esm2015/app/component/service-order/ione-service-order.component.js +96 -0
  42. package/esm2015/app/component/service-order/service-order.component.js +166 -0
  43. package/esm2015/app/component/service-order/summary/transaction-article-summary.component.js +55 -0
  44. package/esm2015/app/component/service-order/summary/transaction-delivery-summary.component.js +59 -0
  45. package/esm2015/app/component/service-order/summary/transaction-order-summary.component.js +43 -0
  46. package/esm2015/app/component/service-order/summary/transaction-payment-info.component.js +35 -0
  47. package/esm2015/app/component/service-order/summary/transaction-product-contract-summary.component.js +38 -0
  48. package/esm2015/app/component/service-order/summary/transaction-product-summary.component.js +41 -0
  49. package/esm2015/app/component/service-order/summary/transaction-service-status.component.js +37 -0
  50. package/esm2015/app/component/service-order/summary/transaction-service-summary.component.js +38 -0
  51. package/esm2015/app/component/service-order/summary/transaction-summary-block.component.js +53 -0
  52. package/esm2015/app/component/service-order/transaction-article-text/transaction-article-text.component.js +183 -0
  53. package/esm2015/app/component/service-order/transaction-header-block/transaction-header-block.component.js +83 -0
  54. package/esm2015/app/component/service-order/transaction-order-line-view/transaction-order-line-view.component.js +76 -0
  55. package/esm2015/app/component/service-order/transaction-order-lines/transaction-order-lines.component.js +71 -0
  56. package/esm2015/app/component/service-order/transaction-order-totals/transaction-order-totals.component.js +36 -0
  57. package/esm2015/app/component/service-order/transaction-relation/transaction-relation-address.component.js +116 -0
  58. package/esm2015/app/component/service-order/transaction-relation/transaction-relation-edit.component.js +225 -0
  59. package/esm2015/app/component/service-order/transaction-sidebar/transaction-line-accordion.component.js +172 -0
  60. package/esm2015/app/component/service-order/transaction-sidebar/transaction-sidebar-right.component.js +120 -0
  61. package/esm2015/app/component/shopping-cart/ione-shopping-cart.module.js +3 -7
  62. package/esm2015/app/component/shopping-cart/shopping-cart-line/shopping-cart-line.component.js +1 -1
  63. package/esm2015/app/service/ione-connector-adapter.service.js +39 -10
  64. package/esm2015/app/service/transaction-event.service.js +4 -1
  65. package/esm2015/app/service/transaction.service.js +51 -15
  66. package/esm2015/assets/dictionary/text.properties.js +33 -1
  67. package/esm2015/colijnit-transaction.js +24 -2
  68. package/esm2015/public_api.js +3 -1
  69. package/fesm2015/colijnit-transaction.js +2077 -33
  70. package/fesm2015/colijnit-transaction.js.map +1 -1
  71. package/package.json +3 -3
  72. package/public_api.d.ts +2 -0
@@ -1,12 +1,13 @@
1
1
  import { __awaiter } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, EventEmitter, Component, Input, Output, ChangeDetectorRef, ViewChild, Pipe, HostBinding, NgModule } from '@angular/core';
3
+ import { Injectable, EventEmitter, Component, Input, Output, ChangeDetectorRef, ViewChild, Pipe, HostBinding, NgModule, Directive, ContentChild, ViewContainerRef } from '@angular/core';
4
4
  import { BehaviorSubject, Subject, throwError } from 'rxjs';
5
5
  import { Options } from '@colijnit/ioneconnector/build/model/options';
6
6
  import { CustomerFullObject } from '@colijnit/transactionapi/build/model/customer-full-object.bo';
7
7
  import { TransactionInfoResponse } from '@colijnit/transactionapi/build/model/transaction-info-response.bo';
8
8
  import { RelationPrivacySetting } from '@colijnit/transactionapi/build/model/relation-privacy-setting.bo';
9
9
  import { GetPostalCodeRetrievalOutputParams } from '@colijnit/transactionapi/build/model/get-postal-code-retrieval-output-params';
10
+ import { RelationListObject } from '@colijnit/transactionapi/build/model/relation-list-object.bo';
10
11
  import { ArticleFullObject } from '@colijnit/transactionapi/build/model/article-full-object';
11
12
  import { LineOperationResponse } from '@colijnit/transactionapi/build/model/line-operation-response.bo';
12
13
  import { Transaction } from '@colijnit/transactionapi/build/transaction';
@@ -24,7 +25,7 @@ import { BooleanTextDecorator as BooleanTextDecorator$1 } from '@colijnit/transa
24
25
  import { JsonFieldFieldDecorator } from '@colijnit/transactionapi/build/factory/decorators/json.decorator';
25
26
  import { ComplexArrayDecorator as ComplexArrayDecorator$1 } from '@colijnit/transactionapi/build/factory/decorators/complex-array.decorator';
26
27
  import { ImageUtils } from '@colijnit/transactionapi/build/utils/image-utils';
27
- import { NULL_RELATION_OBJECT } from '@colijnit/transactionapi/build/model/nul-relation-object';
28
+ import { NULL_RELATION_OBJECT, NULL_CUSTOMER_FULL_OBJECT, NULL_RELATION_LIST_OBJECT } from '@colijnit/transactionapi/build/model/nul-relation-object';
28
29
  import { TransactionKind } from '@colijnit/transactionapi/build/enum/transaction-kind.enum';
29
30
  import { SequenceName } from '@colijnit/transactionapi/build/enum/sequence-name.enum';
30
31
  import { ArrayUtils as ArrayUtils$1 } from '@colijnit/transactionapi/build/utils/array-utils';
@@ -43,7 +44,6 @@ import { BusinessObjectUtils } from '@colijnit/transactionapi/build/utils/busine
43
44
  import { FormComponent, CoSidebarComponent, PromptService, CoreComponentsIcon, IconCacheService, IconModule, InputTextModule, InputCheckboxModule, InputRadioButtonModule, FormModule, InputComboBoxModule, InputDatePickerModule, InputNumberPickerModule, CoDialogModule, CoDialogPromptModule, ButtonModule, MultiSelectListModule, DropDownModule, PopupModule, CoSidebarModule, CoGridModule } from '@colijnit/corecomponents_v12';
44
45
  import { FunctionUtils } from '@colijnit/transactionapi/build/utils/function-utils';
45
46
  import { Address } from '@colijnit/transactionapi/build/model/address.bo';
46
- import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
47
47
  import { FlexModule } from '@angular/flex-layout';
48
48
  import { MatStepperModule } from '@angular/material/stepper';
49
49
  import { CommonModule } from '@angular/common';
@@ -52,6 +52,14 @@ import { ResolvePendingLineReasonRequest } from '@colijnit/transactionapi/build/
52
52
  import { SortDirection } from '@colijnit/transactionapi/build/enum/sort-direction';
53
53
  import { SortType } from '@colijnit/transactionapi/build/enum/sort-type.enum';
54
54
  import { StockStatus } from '@colijnit/transactionapi/build/enum/refcode/stock-status.enum';
55
+ import { trigger, state, style, transition, animate } from '@angular/animations';
56
+ import { RelationRequest } from '@colijnit/transactionapi/build/model/relation-request';
57
+ import { DropDownButtonModule } from '@syncfusion/ej2-angular-splitbuttons';
58
+ import { ChipListModule, CheckBoxModule } from '@syncfusion/ej2-angular-buttons';
59
+ import { DropDownListModule } from '@syncfusion/ej2-angular-dropdowns';
60
+ import { Sidebar, Accordion } from '@syncfusion/ej2-navigations';
61
+ import { TabModule } from '@syncfusion/ej2-angular-navigations';
62
+ import { TransactionLineInfo } from '@colijnit/transactionapi/build/model/transaction-line-info.bo';
55
63
 
56
64
  class OptionsService {
57
65
  constructor() {
@@ -804,9 +812,16 @@ class IOneConnectorAdapterService {
804
812
  }
805
813
  connect(options) {
806
814
  return __awaiter(this, void 0, void 0, function* () {
807
- this.options = options;
808
- this.connector = new Transaction(options);
809
- this.options.session = this.connector.session;
815
+ if (this.options === undefined) {
816
+ this.options = options;
817
+ this.connector = new Transaction(options);
818
+ this.options.session = this.connector.session;
819
+ }
820
+ });
821
+ }
822
+ disconnect() {
823
+ return __awaiter(this, void 0, void 0, function* () {
824
+ this.options = undefined;
810
825
  });
811
826
  }
812
827
  getArticleFullObject(goodId) {
@@ -841,14 +856,19 @@ class IOneConnectorAdapterService {
841
856
  return new Promise((resolve, reject) => {
842
857
  return this.connector.getSingleImage(nodeId, publication, includeMimetype, thumb).then((result) => {
843
858
  if (result.validationResult && result.validationResult.success) {
844
- if (result.resultObject.filePath !== null && result.resultObject.filePath !== "") {
859
+ if (result.resultObject && result.resultObject.filePath !== null && result.resultObject.filePath !== "") {
845
860
  return resolve(ImageUtils.getFixedImageFilepathUrl(result.resultObject.filePath));
846
861
  }
847
862
  else {
848
- if (includeMimetype) {
849
- return resolve(ImageUtils.getDocBodyWithMimeTypeDefinition(result.resultObject.fileName, thumb ? result.resultObject.thumbnailBody : result.resultObject.documentBody));
863
+ if (result.resultObject) {
864
+ if (includeMimetype) {
865
+ return resolve(ImageUtils.getDocBodyWithMimeTypeDefinition(result.resultObject.fileName, thumb ? result.resultObject.thumbnailBody : result.resultObject.documentBody));
866
+ }
867
+ return resolve(thumb ? result.resultObject.thumbnailBody : result.resultObject.documentBody);
868
+ }
869
+ else {
870
+ reject(result.validationMessagesAsString);
850
871
  }
851
- return resolve(thumb ? result.resultObject.thumbnailBody : result.resultObject.documentBody);
852
872
  }
853
873
  }
854
874
  else {
@@ -952,6 +972,18 @@ class IOneConnectorAdapterService {
952
972
  });
953
973
  });
954
974
  }
975
+ getTransactionById(transactionId) {
976
+ return new Promise((resolve, reject) => {
977
+ return this.connector.getTransactionById(transactionId).then((result) => {
978
+ if (result.validationResult && result.validationResult.success) {
979
+ resolve(this._boFactory.makeWithRawBackendData(TransactionInfoResponse, result.resultObject));
980
+ }
981
+ else {
982
+ reject(result.validationMessagesAsString);
983
+ }
984
+ });
985
+ });
986
+ }
955
987
  saveTransaction(uuid) {
956
988
  return new Promise((resolve, reject) => {
957
989
  return this.connector.saveTransaction(uuid).then((result) => {
@@ -1112,7 +1144,7 @@ class IOneConnectorAdapterService {
1112
1144
  return new Promise((resolve, reject) => {
1113
1145
  return this.connector.getRelationListObjects(relationRequest).then((result) => {
1114
1146
  if (result.validationResult && result.validationResult.success) {
1115
- resolve(result.resultObjects);
1147
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(RelationListObject, result.resultObjects));
1116
1148
  }
1117
1149
  else {
1118
1150
  reject(result.validationMessagesAsString);
@@ -1276,8 +1308,11 @@ class IOneConnectorAdapterService {
1276
1308
  });
1277
1309
  }
1278
1310
  }
1311
+ IOneConnectorAdapterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IOneConnectorAdapterService_Factory() { return new IOneConnectorAdapterService(); }, token: IOneConnectorAdapterService, providedIn: "root" });
1279
1312
  IOneConnectorAdapterService.decorators = [
1280
- { type: Injectable }
1313
+ { type: Injectable, args: [{
1314
+ providedIn: "root"
1315
+ },] }
1281
1316
  ];
1282
1317
  IOneConnectorAdapterService.ctorParameters = () => [];
1283
1318
 
@@ -1285,6 +1320,7 @@ class TransactionService {
1285
1320
  constructor(_connector) {
1286
1321
  this._connector = _connector;
1287
1322
  this.transactionUpdated = new EventEmitter();
1323
+ this.transactionLoaded = new EventEmitter();
1288
1324
  this.applicationUser = false;
1289
1325
  this.articleAmount = 0;
1290
1326
  this._currentLines = [];
@@ -1428,8 +1464,25 @@ class TransactionService {
1428
1464
  return new Promise((resolve, reject) => {
1429
1465
  this._connector.getTransactionByNrAndKind(kind, transactionNr)
1430
1466
  .then((response) => __awaiter(this, void 0, void 0, function* () {
1431
- this._rememberCurrentTransaction(response);
1432
1467
  if (response.isSuccess) {
1468
+ this.transactionLoaded.emit(response);
1469
+ resolve(true);
1470
+ }
1471
+ else {
1472
+ reject(false);
1473
+ }
1474
+ }))
1475
+ .catch((reason) => {
1476
+ reject(false);
1477
+ });
1478
+ });
1479
+ }
1480
+ getTransactionById(transactionId) {
1481
+ return new Promise((resolve, reject) => {
1482
+ this._connector.getTransactionById(transactionId)
1483
+ .then((response) => __awaiter(this, void 0, void 0, function* () {
1484
+ if (response.isSuccess) {
1485
+ this.transactionLoaded.emit(response);
1433
1486
  resolve(true);
1434
1487
  }
1435
1488
  else {
@@ -1528,7 +1581,17 @@ class TransactionService {
1528
1581
  }
1529
1582
  retrieveLineImage(line) {
1530
1583
  return __awaiter(this, void 0, void 0, function* () {
1531
- const goodId = yield this._connector.getGoodIdFromArticleNr(line.articleNumber);
1584
+ return yield this.getArticleImageByArticleNumber(line.articleNumber);
1585
+ });
1586
+ }
1587
+ getArticleImageByArticleNumber(articleNumber) {
1588
+ return __awaiter(this, void 0, void 0, function* () {
1589
+ const goodId = yield this._connector.getGoodIdFromArticleNr(articleNumber);
1590
+ return this.getArticleImageByGoodId(goodId);
1591
+ });
1592
+ }
1593
+ getArticleImageByGoodId(goodId) {
1594
+ return __awaiter(this, void 0, void 0, function* () {
1532
1595
  if (!isNaN(goodId)) {
1533
1596
  return this._connector.getSingleImage(goodId, 1, true, true);
1534
1597
  }
@@ -1668,6 +1731,15 @@ class TransactionService {
1668
1731
  });
1669
1732
  });
1670
1733
  }
1734
+ getCustomerFulObjectByRelationId(relationId) {
1735
+ return __awaiter(this, void 0, void 0, function* () {
1736
+ const relationNr = yield this._connector.getRelationNumber(relationId);
1737
+ if (relationNr) {
1738
+ return yield this._connector.getCustomerFullObject(Number(relationNr));
1739
+ }
1740
+ return NULL_CUSTOMER_FULL_OBJECT;
1741
+ });
1742
+ }
1671
1743
  // public async setRelationByUser(username: string, password: string): Promise<boolean> {
1672
1744
  // const response: boolean = await this._connector.setRelationByUser(this.currentTransaction.uuid, username, password);
1673
1745
  // return response;
@@ -1678,13 +1750,15 @@ class TransactionService {
1678
1750
  }
1679
1751
  }
1680
1752
  _rememberCurrentTransaction(value) {
1681
- this._currentTransaction = value.transactionInfo;
1682
- this._initializeTransaction();
1683
- this.currentLines = value.transactionLines;
1684
- this.currentTotals = value.transactionTotal;
1685
- this.currentLineOperationStatuses = value.lineOperationStatuses;
1686
- this._updateRelation();
1687
- this.transactionUpdated.emit();
1753
+ return __awaiter(this, void 0, void 0, function* () {
1754
+ this._currentTransaction = value.transactionInfo;
1755
+ this._initializeTransaction();
1756
+ this.currentLines = value.transactionLines;
1757
+ this.currentTotals = value.transactionTotal;
1758
+ this.currentLineOperationStatuses = value.lineOperationStatuses;
1759
+ yield this._updateRelation();
1760
+ this.transactionUpdated.emit();
1761
+ });
1688
1762
  }
1689
1763
  _rememberCurrentTransactionLineStatus(value) {
1690
1764
  // this._currentLineOperationStatus.uuid = value.lineUuid;
@@ -1695,10 +1769,7 @@ class TransactionService {
1695
1769
  return __awaiter(this, void 0, void 0, function* () {
1696
1770
  if (this.currentTransaction && this.currentTransaction.relation && this.currentTransaction.relation.relationId) {
1697
1771
  if (!this._currentRelation || this._currentRelation.relationId !== this.currentTransaction.relation.relationId) {
1698
- const relationNr = yield this._connector.getRelationNumber(this.currentTransaction.relation.relationId);
1699
- if (relationNr) {
1700
- this._currentRelation = yield this._connector.getCustomerFullObject(Number(relationNr));
1701
- }
1772
+ this._currentRelation = yield this.getCustomerFulObjectByRelationId(this.currentTransaction.relation.relationId);
1702
1773
  }
1703
1774
  }
1704
1775
  });
@@ -1818,6 +1889,7 @@ class Dictionary {
1818
1889
  "ADDRESS_CHANGE": "Adres wijzigen",
1819
1890
  "ALWAYS_SHOW_LOGISTICS_POPUP": "Controleer magazijn en commissiecode",
1820
1891
  "ARTICLE": "Artikel",
1892
+ "ARTICLE_DESCRIPTION": "Artikelomschrijving",
1821
1893
  "ARTICLE_IN_OUT_COLLECTION": "Status van artikel is '|~'. Weet u zeker dat u door wilt gaan?",
1822
1894
  "ARTICLE_NR": "Artikelnummer",
1823
1895
  "ASSEMBLY_COSTS": "Montagekosten",
@@ -1858,12 +1930,15 @@ class Dictionary {
1858
1930
  "DELIVERY_OPTARTICLE_NRIONS": "Bezorgopties",
1859
1931
  "DELIVERY_TIME_PERIOD": "Levertijd",
1860
1932
  "DESCRIPTION": "Omschrijving",
1933
+ "DETAILS": "Details",
1861
1934
  "DISCOUNT": "Korting",
1862
1935
  "DISCOUNT_AMOUNT": "Kortingsbedrag",
1863
1936
  "DISCOUNT_PERCENTAGE": "Kortings %",
1864
1937
  "DROPSHIPMENT": "Dropshipment",
1865
1938
  "EMAIL_ADDRESS": "E-mailadres",
1866
1939
  "EXISTING_CUSTOMERS": "Bestaande klanten",
1940
+ "EXPECTED_DELIVERY_DATE": "Verwachte bezorgdatum",
1941
+ "EXPECTED_DELIVERY_WEEK": "Verwachte leverweek",
1867
1942
  "FEMALE": "Vrouw",
1868
1943
  "FIRST_NAME": "Voornaam",
1869
1944
  "GOOD_DESCRIPTION": "Artikelomschrijving",
@@ -1890,11 +1965,14 @@ class Dictionary {
1890
1965
  "NUMBER": "Aantal",
1891
1966
  "ON_DATE": "Op datum",
1892
1967
  "OPEN_SHOPPING_CART": "Open winkelwagen",
1968
+ "ORDER_DATE": "Orderdatum",
1893
1969
  "ORDER_GROSS": "Ordertotaal bruto",
1894
1970
  "ORDER_NET": "Ordertotaal netto",
1971
+ "ORDER_NUMBER": "Ordernummer",
1895
1972
  "ORDER_TYPE": "Type bestelling",
1896
1973
  "OVERVIEW": "Overzicht",
1897
1974
  "OWN_REFERENCE": "Eigen referentie",
1975
+ "PAID_DOWN2": "Aanbetaald",
1898
1976
  "PART_DELIVERIES": "Deelleveringen",
1899
1977
  "PASSWORD": "Wachtwoord",
1900
1978
  "PAYMENT": "Betaling",
@@ -1907,6 +1985,8 @@ class Dictionary {
1907
1985
  "PRICE_LIST": "Prijslijst",
1908
1986
  "PRIVACY_PREFERENCES": "Privacyvoorkeuren",
1909
1987
  "PRIVATE_PERSON": "Particulier",
1988
+ "PRODUCT": "Product",
1989
+ "PRODUCT_TYPE": "Productsoort",
1910
1990
  "QUANTITY_CANNOT_BE_ZERO_OR_EMPTY": "Het aantal mag geen 0 zijn.",
1911
1991
  "QUANTITY_CANNOT_BE_LESS_THAN_DELIVERED": "Het aantal moet gelijk zijn aan het geleverde aantal",
1912
1992
  "QUANTITY_CANNOT_BE_MORE_THAN_DELIVERED": "Het aantal moet gelijk zijn aan het geleverde aantal",
@@ -1922,6 +2002,9 @@ class Dictionary {
1922
2002
  "SALUTATION": "Aanhef",
1923
2003
  "SAVE": "Opslaan",
1924
2004
  "SELECT": "Selecteren",
2005
+ "SERVICE_NUMBER": "Servicenummer",
2006
+ "SERVICE_REQUEST_DATE": "Datum aanvraag",
2007
+ "SERVICE_STATE": "Service status",
1925
2008
  "SHOPPING_CART": "Winkelwagen",
1926
2009
  "SHOPPING_CART_CHECKOUT": "Bestellen",
1927
2010
  "SHOPPING_CART_OVERVIEW": "Overzicht van uw bestelling",
@@ -1933,16 +2016,20 @@ class Dictionary {
1933
2016
  "SUBTOTAL": "Subtotaal",
1934
2017
  "SUGGESTIONS": "Suggesties",
1935
2018
  "SURCHARGE_AMOUNT": "Toeslag",
2019
+ "STATE": "Status",
1936
2020
  "STREET": "Straatnaam",
2021
+ "TOTAL_AMOUNT": "Totaalbedrag",
1937
2022
  "TOTAL_GROSS": "Totaal bruto",
1938
2023
  "TOTAL_ASSEMBLY_TIME": "Totale montagetijd",
1939
2024
  "TRANSACTION_DISCOUNT": "Totale transactie korting",
1940
2025
  "TRANSACTION_DISCOUNT_PERC": "% Trans. korting",
1941
2026
  "TRANSACTION_PRICE_DECLARATION": "Order prijsverklaring",
2027
+ "TRANSACTION_SUM_I": "Ordertotaal incl. BTW",
1942
2028
  "TRANSACTION_TOTAL": "Transactie totaal",
1943
2029
  "UNKNOWN": "Onbekend",
1944
2030
  "UNKNOWN_ADDRESS_CHECK_IT": "Onbekend adres",
1945
2031
  "VAT": "Btw",
2032
+ "VAT_AMOUNT": "BTW-bedrag",
1946
2033
  "VALUE": "Waarde",
1947
2034
  "WAREHOUSE": "Magazijn",
1948
2035
  "YOUR_DATA": "Uw gegevens",
@@ -1963,6 +2050,7 @@ class Dictionary {
1963
2050
  "ADDRESS_CHANGE": "Change address",
1964
2051
  "ALWAYS_SHOW_LOGISTICS_POPUP": "Check warehouse and commissioncode",
1965
2052
  "ARTICLE": "Article",
2053
+ "ARTICLE_DESCRIPTION": "Article description",
1966
2054
  "ARTICLE_IN_OUT_COLLECTION": "Status of article is '|~'. Are you sure to proceed?",
1967
2055
  "ARTICLE_NR": "Article number",
1968
2056
  "ASSEMBLY_COSTS": "Assembly costs",
@@ -2003,12 +2091,15 @@ class Dictionary {
2003
2091
  "DELIVERY_OPTARTICLE_NRIONS": "Delivery options",
2004
2092
  "DELIVERY_TIME_PERIOD": "Delivery time period",
2005
2093
  "DESCRIPTION": "Description",
2094
+ "DETAILS": "Details",
2006
2095
  "DISCOUNT": "Discount",
2007
2096
  "DISCOUNT_AMOUNT": "Discount amount",
2008
2097
  "DISCOUNT_PERCENTAGE": "Discount %",
2009
2098
  "DROPSHIPMENT": "Dropshipment",
2010
2099
  "EMAIL_ADDRESS": "E-mailadres",
2011
2100
  "EXISTING_CUSTOMERS": "Existing customers",
2101
+ "EXPECTED_DELIVERY_DATE": "Expected delivery date",
2102
+ "EXPECTED_DELIVERY_WEEK": "Expected delivery week",
2012
2103
  "FEMALE": "Female",
2013
2104
  "FIRST_NAME": "First name",
2014
2105
  "GOOD_DESCRIPTION": "Article description",
@@ -2035,11 +2126,14 @@ class Dictionary {
2035
2126
  "NUMBER": "Amount",
2036
2127
  "ON_DATE": "On date",
2037
2128
  "OPEN_SHOPPING_CART": "Open shopping cart",
2129
+ "ORDER_DATE": "Order date",
2038
2130
  "ORDER_GROSS": "Total gross amount",
2039
2131
  "ORDER_NET": "Total net amount",
2132
+ "ORDER_NUMBER": "Order number",
2040
2133
  "ORDER_TYPE": "Order type",
2041
2134
  "OVERVIEW": "Overview",
2042
2135
  "OWN_REFERENCE": "Own reference",
2136
+ "PAID_DOWN2": "Prepaid",
2043
2137
  "PART_DELIVERIES": "Partial deliveries",
2044
2138
  "PASSWORD": "Password",
2045
2139
  "PAYMENT": "Payment",
@@ -2052,6 +2146,8 @@ class Dictionary {
2052
2146
  "PRICE_LIST": "Pricelist",
2053
2147
  "PRIVACY_PREFERENCES": "Privacy preferences",
2054
2148
  "PRIVATE_PERSON": "Private",
2149
+ "PRODUCT": "Product",
2150
+ "PRODUCT_TYPE": "Product type",
2055
2151
  "QUANTITY_CANNOT_BE_ZERO_OR_EMPTY": "Quantity cannot be zero or empty",
2056
2152
  "QUANTUM_DISCOUNT": "Quantum discount",
2057
2153
  "REFERENCE_RELATION": "Ref. relation",
@@ -2059,6 +2155,9 @@ class Dictionary {
2059
2155
  "SALUTATION": "Salutation",
2060
2156
  "SAVE": "Save",
2061
2157
  "SELECT": "Select",
2158
+ "SERVICE_NUMBER": "Service number",
2159
+ "SERVICE_REQUEST_DATE": "Service request data",
2160
+ "SERVICE_STATE": "Service state",
2062
2161
  "SHOPPING_CART": "Shopping cart",
2063
2162
  "SHOPPING_CART_CHECKOUT": "Checkout",
2064
2163
  "SHOPPING_CART_OVERVIEW": "Order overview",
@@ -2070,17 +2169,21 @@ class Dictionary {
2070
2169
  "SUBTOTAL": "Subtotal",
2071
2170
  "SUGGESTIONS": "Suggestions",
2072
2171
  "SURCHARGE_AMOUNT": "Surcharge",
2172
+ "STATE": "STATUS",
2073
2173
  "STREET": "Streetname",
2174
+ "TOTAL_AMOUNT": "Total amount",
2074
2175
  "TOTAL_GROSS": "Gross total",
2075
2176
  "TOTAL_ASSEMBLY_TIME": "Total assembly time",
2076
2177
  "TRANSACTION_DISCOUNT": "Total transaction discount",
2077
2178
  "TRANSACTION_DISCOUNT_PERC": "% Trans. discount",
2078
2179
  "TRANSACTION_PRICE_DECLARATION": "Transaction price declaration",
2180
+ "TRANSACTION_SUM_I": "Ordertotal incl VAT",
2079
2181
  "TRANSACTION_TOTAL": "Transaction total",
2080
2182
  "UNKNOWN": "unknown",
2081
2183
  "UNKNOWN_ADDRESS_CHECK_IT": "Unknown address",
2082
2184
  "VALUE": "Value",
2083
2185
  "VAT": "VAT",
2186
+ "VAT_AMOUNT": "VAT amount",
2084
2187
  "WAREHOUSE": "Warehouse",
2085
2188
  "YOUR_DATA": "Your data",
2086
2189
  },
@@ -2161,6 +2264,9 @@ class TransactionEventService {
2161
2264
  this.addArticleLineAt = new Subject();
2162
2265
  this.addTextLineAt = new Subject();
2163
2266
  this.changeLineSequence = new Subject();
2267
+ this.transactionLineClicked = new Subject();
2268
+ this.rightSidebarClose = new Subject();
2269
+ this.scrollContent = new Subject();
2164
2270
  }
2165
2271
  }
2166
2272
  TransactionEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionEventService_Factory() { return new TransactionEventService(); }, token: TransactionEventService, providedIn: "root" });
@@ -3156,7 +3262,7 @@ CheckoutOverviewComponent.decorators = [
3156
3262
  (editModeChange)="handleEditChangeRelation($event)">
3157
3263
  <ng-container edit-mode-content>
3158
3264
  <checkout-overview-relation-edit #relationForm
3159
- *ngIf="currentStep == steps.Relation && editMode"
3265
+ *ngIf="currentStep === steps.Relation && editMode"
3160
3266
  [relation]="relation"
3161
3267
  [transaction]="transaction"
3162
3268
  (validSubmit)="onRelationValid()"
@@ -4137,6 +4243,7 @@ class IconComponent {
4137
4243
  }
4138
4244
  IconComponent.decorators = [
4139
4245
  { type: Component, args: [{
4246
+ // eslint-disable-next-line @angular-eslint/component-selector
4140
4247
  selector: "icon",
4141
4248
  template: "",
4142
4249
  styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.circle:host{border-radius:50%}.flex-center{display:flex}:host{display:inline-flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.no-shrink:host{flex-shrink:0}:host.action ::ng-deep{cursor:pointer}:host ::ng-deep svg{width:100%}:host ::ng-deep svg{height:100%}.massive:host{width:100px;height:100px}.humongous:host{width:70px;height:70px}.very-big:host{width:45px;height:45px}.big:host{width:40px;height:40px}:host{width:30px;height:30px}.small:host{width:25px;height:25px}.nano:host{width:18px;height:18px}.pico:host{width:14px;height:14px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host.dark ::ng-deep [fill]{fill:#22313c}:host.light ::ng-deep [fill]{fill:#fff}:host.red ::ng-deep [fill]{fill:#c1002a}:host.grey ::ng-deep [fill]{fill:#dad9d9}:host.action-color ::ng-deep [fill]{fill:#2b60a7}:host.inactive{opacity:.25}:host.disabled{opacity:.25!important}:host:hover.action ::ng-deep [fill]{fill:#2b60a7}\n"]
@@ -4187,7 +4294,6 @@ class IoneCheckoutModule {
4187
4294
  IoneCheckoutModule.decorators = [
4188
4295
  { type: NgModule, args: [{
4189
4296
  imports: [
4190
- BrowserAnimationsModule,
4191
4297
  IconModule,
4192
4298
  InputTextModule,
4193
4299
  InputCheckboxModule,
@@ -4207,6 +4313,7 @@ IoneCheckoutModule.decorators = [
4207
4313
  CoSidebarModule,
4208
4314
  CoGridModule,
4209
4315
  CoreModule,
4316
+ CommonModule,
4210
4317
  ],
4211
4318
  declarations: [
4212
4319
  CheckoutComponent,
@@ -4223,7 +4330,6 @@ IoneCheckoutModule.decorators = [
4223
4330
  IoneCheckoutComponent,
4224
4331
  ],
4225
4332
  providers: [
4226
- IOneConnectorAdapterService,
4227
4333
  DictionaryService,
4228
4334
  TransactionService,
4229
4335
  OptionsService
@@ -5302,7 +5408,7 @@ ShoppingCartLineComponent.decorators = [
5302
5408
  [textContent]="line.text">
5303
5409
  </div>
5304
5410
  `,
5305
- styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.cart-line-r .cart-line-description .cart-line-description-artnr{font-size:10px}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}:host{padding-bottom:20px}:host{padding-top:20px}.cart-line-r .cart-line-description,.cart-line-r .cart-line-right .cart-line-amount,.cart-line-r .cart-line-image,.cart-line-r .cart-line-right .cart-line-stock,.cart-line-r .cart-line-right .cart-line-totals{margin-top:20px}.cart-line-r .cart-line-description,.cart-line-r .cart-line-right .cart-line-amount,.cart-line-r .cart-line-image,.cart-line-r .cart-line-right .cart-line-stock,.cart-line-r .cart-line-right .cart-line-totals{margin-bottom:20px}.cart-line-r .cart-line-description,.cart-line-r .cart-line-right .cart-line-amount,.cart-line-t,.cart-line-r .cart-line-right .cart-line-totals{margin-left:20px}.cart-line-r .cart-line-description,.cart-line-r .cart-line-right .cart-line-amount,.cart-line-t{margin-right:20px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host{display:flex;flex-wrap:wrap;border-bottom:1px solid #DBE3E8;width:100%}:host.overlayed.is-text{display:none!important}:host.overlayed.is-selected{background-color:#add8e6}:host.overview.is-text{display:none!important}:host.overview.is-selected{background-color:#add8e6}.cart-line-r{display:flex;justify-content:stretch;flex-direction:row}@media (max-width: 800px){.cart-line-r{flex-direction:column}}.cart-line-r co-button{border:0;padding:0}.cart-line-r .cart-line-image{display:flex;flex:1 0 auto!important;flex-direction:column;align-items:center;justify-content:center}.cart-line-r .cart-line-image image-display{width:6em;height:6em}.cart-line-r .cart-line-description{display:flex;flex-direction:column;width:100%}.cart-line-r .cart-line-description .cart-line-description-main{font-weight:bold}.cart-line-r .cart-line-right{justify-content:flex-end}.cart-line-r .cart-line-right .cart-line-stock{width:10em}.cart-line-r .cart-line-right .cart-line-amount{width:10em}.cart-line-r .cart-line-right .cart-line-totals{display:flex;justify-content:flex-end;min-width:100px;font-weight:bold}.cart-line-r .cart-line-right .cart-line-totals span{text-align:right}.cart-line-t.article-text{padding-left:10em}\n"]
5411
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.cart-line-r .cart-line-description .cart-line-description-artnr{font-size:10px}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}:host{padding-bottom:20px}:host{padding-top:20px}.cart-line-r .cart-line-description,.cart-line-r .cart-line-right .cart-line-amount,.cart-line-r .cart-line-image,.cart-line-r .cart-line-right .cart-line-stock,.cart-line-r .cart-line-right .cart-line-totals{margin-top:20px}.cart-line-r .cart-line-description,.cart-line-r .cart-line-right .cart-line-amount,.cart-line-r .cart-line-image,.cart-line-r .cart-line-right .cart-line-stock,.cart-line-r .cart-line-right .cart-line-totals{margin-bottom:20px}.cart-line-r .cart-line-description,.cart-line-r .cart-line-right .cart-line-amount,.cart-line-t,.cart-line-r .cart-line-right .cart-line-totals{margin-left:20px}.cart-line-r .cart-line-description,.cart-line-r .cart-line-right .cart-line-amount,.cart-line-t{margin-right:20px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host{display:flex;flex-wrap:wrap;border-bottom:1px solid #DBE3E8;width:100%}:host.overlayed.is-text{display:none!important}:host.overlayed.is-selected{background-color:#add8e6}:host.overview.is-text{display:none!important}:host.overview.is-selected{background-color:#add8e6}.horizontal{display:flex;flex-direction:row}.cart-line-r{display:flex;justify-content:stretch;flex-direction:row}@media (max-width: 800px){.cart-line-r{flex-direction:column}}.cart-line-r co-button{border:0;padding:0}.cart-line-r .cart-line-image{display:flex;flex:1 0 auto!important;flex-direction:column;align-items:center;justify-content:center}.cart-line-r .cart-line-image image-display{width:6em;height:6em}.cart-line-r .cart-line-description{display:flex;flex-direction:column;width:100%}.cart-line-r .cart-line-description .cart-line-description-main{font-weight:bold}.cart-line-r .cart-line-right{justify-content:flex-end}.cart-line-r .cart-line-right .cart-line-stock{width:10em}.cart-line-r .cart-line-right .cart-line-amount{width:10em}.cart-line-r .cart-line-right .cart-line-totals{display:flex;justify-content:flex-end;min-width:100px;font-weight:bold}.cart-line-r .cart-line-right .cart-line-totals span{text-align:right}.cart-line-t.article-text{padding-left:10em}\n"]
5306
5412
  },] }
5307
5413
  ];
5308
5414
  ShoppingCartLineComponent.ctorParameters = () => [
@@ -5452,7 +5558,6 @@ IoneShoppingCartModule.decorators = [
5452
5558
  CharacteristicAnswerComponent,
5453
5559
  ],
5454
5560
  imports: [
5455
- BrowserAnimationsModule,
5456
5561
  CommonModule,
5457
5562
  IconModule,
5458
5563
  InputTextModule,
@@ -5475,7 +5580,6 @@ IoneShoppingCartModule.decorators = [
5475
5580
  CoreModule
5476
5581
  ],
5477
5582
  providers: [
5478
- IOneConnectorAdapterService,
5479
5583
  DictionaryService,
5480
5584
  TransactionService,
5481
5585
  OptionsService
@@ -5483,16 +5587,1956 @@ IoneShoppingCartModule.decorators = [
5483
5587
  entryComponents: [
5484
5588
  IoneShoppingCartComponent
5485
5589
  ],
5486
- exports: [IoneShoppingCartComponent],
5590
+ exports: [IoneShoppingCartComponent, StockStatusIndicatorComponent],
5487
5591
  bootstrap: [IoneShoppingCartComponent]
5488
5592
  },] }
5489
5593
  ];
5490
5594
 
5595
+ class IoneServiceOrderComponent {
5596
+ constructor(_changeDetector, _optionsService, _connector, _dictionary, _service) {
5597
+ this._changeDetector = _changeDetector;
5598
+ this._optionsService = _optionsService;
5599
+ this._connector = _connector;
5600
+ this._dictionary = _dictionary;
5601
+ this._service = _service;
5602
+ this.upAndLoaded = false;
5603
+ this._subscriptions = [];
5604
+ this._remoteOptions = true;
5605
+ this._publicOptions = true;
5606
+ this._orderId = 0;
5607
+ this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)));
5608
+ }
5609
+ set orderId(value) {
5610
+ this._orderId = value;
5611
+ this._getTransactionById(this._orderId);
5612
+ }
5613
+ ;
5614
+ set options(value) {
5615
+ if (value) {
5616
+ let options;
5617
+ if (typeof value === "string") {
5618
+ options = JSON.parse(value);
5619
+ }
5620
+ else {
5621
+ options = value;
5622
+ }
5623
+ this._publicOptions = true;
5624
+ this._optionsService.initialize(options).then();
5625
+ }
5626
+ }
5627
+ ngOnInit() {
5628
+ if (!this._publicOptions) {
5629
+ this._optionsService.initializeDevelopmentOptions(this._remoteOptions);
5630
+ }
5631
+ }
5632
+ ngOnDestroy() {
5633
+ this._subscriptions.forEach(subscription => subscription.unsubscribe());
5634
+ }
5635
+ _handleSettingsLoaded(loaded) {
5636
+ return __awaiter(this, void 0, void 0, function* () {
5637
+ if (loaded) {
5638
+ yield this._initConnection().then();
5639
+ this.upAndLoaded = true;
5640
+ }
5641
+ });
5642
+ }
5643
+ _initConnection() {
5644
+ return __awaiter(this, void 0, void 0, function* () {
5645
+ yield this._connector.connect(this._optionsService.options);
5646
+ if (this._optionsService.options.url) {
5647
+ this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
5648
+ }
5649
+ yield this._dictionary.setDictionary(this._optionsService.options.languageCode);
5650
+ setTimeout(() => {
5651
+ this._changeDetector.detectChanges();
5652
+ });
5653
+ });
5654
+ }
5655
+ _getTransactionById(orderId) {
5656
+ return __awaiter(this, void 0, void 0, function* () {
5657
+ yield this._service.getTransactionById(orderId);
5658
+ });
5659
+ }
5660
+ }
5661
+ IoneServiceOrderComponent.decorators = [
5662
+ { type: Component, args: [{
5663
+ // eslint-disable-next-line @angular-eslint/component-selector
5664
+ selector: "ione-service-order",
5665
+ template: `
5666
+ <div>
5667
+ <service-order></service-order>
5668
+ </div>
5669
+ <transaction-sidebar-right></transaction-sidebar-right>
5670
+ `
5671
+ },] }
5672
+ ];
5673
+ IoneServiceOrderComponent.ctorParameters = () => [
5674
+ { type: ChangeDetectorRef },
5675
+ { type: OptionsService },
5676
+ { type: IOneConnectorAdapterService },
5677
+ { type: DictionaryService },
5678
+ { type: TransactionService }
5679
+ ];
5680
+ IoneServiceOrderComponent.propDecorators = {
5681
+ orderId: [{ type: Input }],
5682
+ options: [{ type: Input }]
5683
+ };
5684
+
5685
+ class TransactionBaseComponent {
5686
+ constructor(service) {
5687
+ this.service = service;
5688
+ this.relation = NULL_RELATION_LIST_OBJECT;
5689
+ this.customer = NULL_CUSTOMER_FULL_OBJECT;
5690
+ this._isService = false;
5691
+ this.basedOnProduct = false;
5692
+ }
5693
+ set transaction(value) {
5694
+ this._transaction = value;
5695
+ if (this._transaction && this._transaction.transactionInfo) {
5696
+ this._isService = this._transaction.transactionInfo.transactionKind === TransactionKind.ServiceOrder;
5697
+ }
5698
+ }
5699
+ get transaction() {
5700
+ return this._transaction;
5701
+ }
5702
+ get transactionInfo() {
5703
+ if (this._transaction) {
5704
+ return this._transaction.transactionInfo;
5705
+ }
5706
+ }
5707
+ get transactionLines() {
5708
+ if (this._transaction) {
5709
+ return this._transaction.transactionLines;
5710
+ }
5711
+ }
5712
+ get transactionTotal() {
5713
+ if (this._transaction) {
5714
+ return this._transaction.transactionTotal;
5715
+ }
5716
+ }
5717
+ get isService() {
5718
+ return this._isService;
5719
+ }
5720
+ set relationId(value) {
5721
+ if (value === undefined) {
5722
+ return;
5723
+ }
5724
+ this._relationId = value;
5725
+ this._retrieveRelation();
5726
+ }
5727
+ get relationId() {
5728
+ return this._relationId;
5729
+ }
5730
+ set customerId(value) {
5731
+ if (value === undefined) {
5732
+ return;
5733
+ }
5734
+ this._customerId = value;
5735
+ this._retrieveCustomer();
5736
+ }
5737
+ get customerId() {
5738
+ return this._customerId;
5739
+ }
5740
+ set product(value) {
5741
+ this._product = value;
5742
+ this.productSet();
5743
+ this._setBasedOnProduct();
5744
+ }
5745
+ get product() {
5746
+ return this._product;
5747
+ }
5748
+ get isNew() {
5749
+ return isNill$1(this.transaction) || isNill$1(this.transactionInfo.transactionNr);
5750
+ }
5751
+ transactionSet() {
5752
+ // overridden by descendents
5753
+ }
5754
+ productSet() {
5755
+ // overridden by descendents
5756
+ }
5757
+ _retrieveCustomer() {
5758
+ return __awaiter(this, void 0, void 0, function* () {
5759
+ this.customer = yield this.service.getCustomerFulObjectByRelationId(this._customerId);
5760
+ });
5761
+ }
5762
+ _retrieveRelation() {
5763
+ return __awaiter(this, void 0, void 0, function* () {
5764
+ const relationRequest = new RelationRequest();
5765
+ let relations = [];
5766
+ relationRequest.relationId = this.relationId;
5767
+ relations = yield this.service.getRelationListObjects(relationRequest);
5768
+ if (relations && relations.length) {
5769
+ this.relation = relations[0];
5770
+ }
5771
+ });
5772
+ }
5773
+ _setBasedOnProduct() {
5774
+ if (this.product) {
5775
+ this.basedOnProduct = true;
5776
+ }
5777
+ else { //check transaction (service) for product
5778
+ // TODO: assProduct is not a property of transaction right now.
5779
+ // this.basedOnProduct = notNill(this._transaction.assProduct);
5780
+ // if (this.basedOnProduct) {
5781
+ // this._product = this.transaction.assProduct;
5782
+ // }
5783
+ }
5784
+ }
5785
+ }
5786
+ TransactionBaseComponent.decorators = [
5787
+ { type: Directive }
5788
+ ];
5789
+ TransactionBaseComponent.ctorParameters = () => [
5790
+ { type: TransactionService }
5791
+ ];
5792
+ TransactionBaseComponent.propDecorators = {
5793
+ transaction: [{ type: Input }],
5794
+ relationId: [{ type: Input }],
5795
+ customerId: [{ type: Input }],
5796
+ product: [{ type: Input }],
5797
+ relation: [{ type: Input }],
5798
+ customer: [{ type: Input }]
5799
+ };
5800
+
5801
+ class TransactionArticleTextComponent extends TransactionBaseComponent {
5802
+ constructor(service) {
5803
+ super(service);
5804
+ this.service = service;
5805
+ this.visible = false;
5806
+ this.floatButtonSelected = false;
5807
+ this.overviewSelected = false;
5808
+ this.editArtikelText = false;
5809
+ this.collection = [
5810
+ { id: 1, name: "Standaardtekst 1" },
5811
+ { id: 2, name: "Standaardtekst 1" },
5812
+ { id: 3, name: "Standaardtekst 1" },
5813
+ { id: 4, name: "Standaardtekst 1" },
5814
+ { id: 5, name: "Standaardtekst 1" }
5815
+ ];
5816
+ this.articleTexts = [
5817
+ { title: "title 1", description: "Omschrijving 1" },
5818
+ { title: "title 2", description: "Omschrijving 2" },
5819
+ { title: "title 3", description: "Omschrijving 3" },
5820
+ { title: "title 4", description: "Omschrijving 4" },
5821
+ { title: "title 5", description: "Omschrijving 5" },
5822
+ ];
5823
+ this.fields = { text: "name", value: "id" };
5824
+ }
5825
+ onOkClick() {
5826
+ this.hide();
5827
+ }
5828
+ onPopupClose() {
5829
+ this.hide();
5830
+ this.hideOverview();
5831
+ this.hideEditArtikelText();
5832
+ }
5833
+ hide() {
5834
+ // TODO: throw hide event
5835
+ this.visible = false;
5836
+ }
5837
+ onOverview() {
5838
+ this.overviewSelected = true;
5839
+ }
5840
+ onOkOverviewClick() {
5841
+ this.hideOverview();
5842
+ }
5843
+ hideOverview() {
5844
+ this.overviewSelected = false;
5845
+ }
5846
+ onDetailLinkClick(bo) {
5847
+ this.editArtikelText = true;
5848
+ }
5849
+ hideEditArtikelText() {
5850
+ this.editArtikelText = false;
5851
+ }
5852
+ onOkEditArtikelTextClick() {
5853
+ this.editArtikelText = false;
5854
+ }
5855
+ }
5856
+ TransactionArticleTextComponent.decorators = [
5857
+ { type: Component, args: [{
5858
+ // eslint-disable-next-line @angular-eslint/component-selector
5859
+ selector: "transaction-article-text",
5860
+ template: `
5861
+ <co-dialog [visible]="visible" (close)="onPopupClose()">
5862
+ <ng-container header>{{ subHeader }}</ng-container>
5863
+ <ng-container content>
5864
+ <div class="tags-join-content" fxLayout fxLayoutGap="10px">
5865
+ <div class="column-separator">
5866
+ <co-input-text placeholder="Titel"></co-input-text>
5867
+ <!--transactiontransaction-->
5868
+ <!-- label="Artikeltekst"-->
5869
+ <!-- ></co-text-editor>-->
5870
+ </div>
5871
+ <div style="margin-left:5px;">
5872
+ <div style="margin-top:16px;">
5873
+ <ejs-dropdownlist
5874
+ [dataSource]="collection"
5875
+ [fields]="fields"
5876
+ placeholder="Standaardteksten"
5877
+ ></ejs-dropdownlist>
5878
+ </div>
5879
+ <div style="margin-top:20px;">
5880
+ <co-input-checkbox
5881
+ label="Artikelgebonden tekst"
5882
+ name="articleBoundText">
5883
+ </co-input-checkbox>
5884
+ </div>
5885
+ <div style="margin-top:20px;">
5886
+ <label>Bestemd voor documenten</label>
5887
+ <ejs-chiplist id="chip-default">
5888
+ <e-chips>
5889
+ <e-chip text="Apple" cssClass="e-primary"></e-chip>
5890
+ <e-chip text="Microsoft" cssClass="e-info"></e-chip>
5891
+ <e-chip text="Google" cssClass="e-success"></e-chip>
5892
+ <e-chip text="Tesla" cssClass="e-warning"></e-chip>
5893
+ <e-chip text="Intel" cssClass="e-danger"></e-chip>
5894
+ </e-chips>
5895
+ </ejs-chiplist>
5896
+ </div>
5897
+ </div>
5898
+ </div>
5899
+ </ng-container>
5900
+ <ng-container footer>
5901
+ <div class="footer" fxLayout fxLayoutAlign="center center" fxLayoutGap="10px" style="margin-top:30px;">
5902
+ <co-button label="OK" (click)="onOkClick()"></co-button>
5903
+ <co-button label="CANCEL" (click)="hide()"></co-button>
5904
+ <co-button label="OVERVIEW" (click)="onOverview()"></co-button>
5905
+ </div>
5906
+ </ng-container>
5907
+ </co-dialog>
5908
+
5909
+ <co-dialog [visible]="overviewSelected" (close)="hideOverview()">
5910
+ <ng-container header>Artikelgebonden teksten {{ subHeader }}</ng-container>
5911
+ <ng-container content>
5912
+ <div class="tags-join-content" fxLayout fxLayoutGap="10px">
5913
+ <div class="column-separator" style="width:75%">
5914
+ <!-- <grid [data]="articleTexts" detailLink (detailLinkClick)="onDetailLinkClick($event)">-->
5915
+ <!-- <grid-column key="title" header="TITLE" width="100px;"></grid-column>-->
5916
+ <!-- <grid-column key="description" header="DESCRIPTION" width="200px"></grid-column>-->
5917
+ <!-- </grid>-->
5918
+ </div>
5919
+ <div style="margin-left:5px;">
5920
+ <div style="margin-top:20px;">
5921
+
5922
+ <co-input-checkbox
5923
+ label="Artikelgebonden tekst"
5924
+ name="articleBoundText"
5925
+ value="true"
5926
+ ></co-input-checkbox>
5927
+ </div>
5928
+ <div style="margin-top:20px;">
5929
+ <label>Bestemd voor documenten</label>
5930
+ <ejs-chiplist id="chip-default">
5931
+ <e-chips>
5932
+ <e-chip text="Apple" cssClass="e-primary"></e-chip>
5933
+ <e-chip text="Microsoft" cssClass="e-info"></e-chip>
5934
+ <e-chip text="Google" cssClass="e-success"></e-chip>
5935
+ <e-chip text="Tesla" cssClass="e-warning"></e-chip>
5936
+ <e-chip text="Intel" cssClass="e-danger"></e-chip>
5937
+ </e-chips>
5938
+ </ejs-chiplist>
5939
+ </div>
5940
+ </div>
5941
+ </div>
5942
+ </ng-container>
5943
+ <ng-container footer>
5944
+ <div class="footer" fxLayout fxPosition="row" fxLayoutAlign="center center" fxLayoutGap="10px" style="margin-top:30px;">
5945
+ <co-button label="OK" (click)="onOkOverviewClick()"></co-button>
5946
+ <co-button label="CANCEL" (click)="hideOverview()"></co-button>
5947
+ </div>
5948
+ </ng-container>
5949
+ </co-dialog>
5950
+
5951
+ <co-dialog [visible]="editArtikelText" (close)="hideEditArtikelText()">
5952
+ <ng-container header>{{ subHeader }}</ng-container>
5953
+ <ng-container content>
5954
+ <div class="tags-join-content" fxLayout fxLayoutGap="10px">
5955
+ <div class="column-separator">
5956
+ <co-input-text placeholder="Titel"></co-input-text>
5957
+ <!-- <co-text-editor-->
5958
+ <!-- label="Artikeltekst"-->
5959
+ <!-- ></co-text-editor>-->
5960
+ </div>
5961
+ </div>
5962
+ </ng-container>
5963
+ <ng-container footer>
5964
+ <div class="footer" fxLayout fxLayoutAlign="center center" fxLayoutGap="10px" style="margin-top:30px;">
5965
+ <co-button label="OK" (click)="onOkEditArtikelTextClick()"></co-button>
5966
+ <co-button label="CANCEL" (click)="hideEditArtikelText()"></co-button>
5967
+ </div>
5968
+ </ng-container>
5969
+ </co-dialog>
5970
+ `,
5971
+ styles: [""]
5972
+ },] }
5973
+ ];
5974
+ TransactionArticleTextComponent.ctorParameters = () => [
5975
+ { type: TransactionService }
5976
+ ];
5977
+ TransactionArticleTextComponent.propDecorators = {
5978
+ subHeader: [{ type: Input }]
5979
+ };
5980
+
5981
+ class ServiceOrderComponent extends TransactionBaseComponent {
5982
+ constructor(service, transactionEvents, iconCacheService) {
5983
+ super(service);
5984
+ this.service = service;
5985
+ this.transactionEvents = transactionEvents;
5986
+ this.iconCacheService = iconCacheService;
5987
+ this.iconThickLines = CoreComponentsIcon.ThickLines;
5988
+ this.iconThinLines = CoreComponentsIcon.ThinLines;
5989
+ this.iconOrder = CoreComponentsIcon.Order;
5990
+ this.viewModes = ContentViewMode;
5991
+ this.canPlanDelivery = false;
5992
+ this.showTotals = true;
5993
+ this.contextMenuItems = [];
5994
+ this.isRouteOptimizationConfigured = false;
5995
+ this.activeViewMode = ContentViewMode.List;
5996
+ this.floatButtonSelected = false;
5997
+ this._subs = [];
5998
+ }
5999
+ get inListView() {
6000
+ return this.activeViewMode === ContentViewMode.List;
6001
+ }
6002
+ get inGridView() {
6003
+ return this.activeViewMode === ContentViewMode.Grid;
6004
+ }
6005
+ ngOnInit() {
6006
+ return __awaiter(this, void 0, void 0, function* () {
6007
+ this._subs.push(this.service.transactionLoaded.subscribe((transactionInfoResponse) => {
6008
+ if (transactionInfoResponse.isSuccess) {
6009
+ this.transaction = transactionInfoResponse;
6010
+ if (this.transaction && this.transaction.transactionInfo) {
6011
+ this.customerId = Number(this.transaction.transactionInfo.relation.relationNr);
6012
+ this.relationId = this.transaction.transactionInfo.relation.relationId;
6013
+ }
6014
+ }
6015
+ }), this.transactionEvents.rightSidebarClose.subscribe(() => {
6016
+ this.moveFloatingButtonToRight();
6017
+ }), this.transactionEvents.transactionLineClicked.subscribe((transactionLine) => {
6018
+ this._selectedTransLine = transactionLine;
6019
+ this.moveFloatingButtonToLeft();
6020
+ }), this.transactionEvents.scrollContent.subscribe((event) => {
6021
+ this.hideOrderTotals(event);
6022
+ }));
6023
+ });
6024
+ }
6025
+ ngOnDestroy() {
6026
+ this._subs.forEach(sub => sub.unsubscribe());
6027
+ }
6028
+ animationFn() {
6029
+ return trigger("showPopup", [
6030
+ state("void", style({ transform: "translate3d(0, 0, 0)" })),
6031
+ state("*", style({ transform: "translate3d(100%, 0, 0)" })),
6032
+ transition("void <=> *", [
6033
+ animate("200ms ease-in-out")
6034
+ ])
6035
+ ]);
6036
+ }
6037
+ trackByFn(index, line) {
6038
+ return line.lineNr;
6039
+ }
6040
+ handleRowsSelected(rows) {
6041
+ this._selectedTransLine = rows.find(x => x !== undefined);
6042
+ }
6043
+ handlePlanningRequest(event) {
6044
+ // TODO: handlePlanningRequest... from new Planning package
6045
+ }
6046
+ moveFloatingButtonToLeft() {
6047
+ if (this.floatButtonRightPosition === ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITHOUT_SIDEBAR) {
6048
+ this.floatButtonRightPosition = ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITH_SIDEBAR;
6049
+ }
6050
+ }
6051
+ moveFloatingButtonToRight() {
6052
+ if (this.floatButtonRightPosition === ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITH_SIDEBAR) {
6053
+ this.floatButtonRightPosition = ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITHOUT_SIDEBAR;
6054
+ }
6055
+ }
6056
+ onOkClick() {
6057
+ this.hide();
6058
+ }
6059
+ hide() {
6060
+ this.floatButtonSelected = false;
6061
+ }
6062
+ floatButtonClick() {
6063
+ this.floatButtonSelected = true;
6064
+ this._transactionArticleTextComponent.visible = this.floatButtonSelected;
6065
+ }
6066
+ get subHeader() {
6067
+ if (this._selectedTransLine && this._selectedTransLine !== undefined) {
6068
+ return this._selectedTransLine.goodDescription;
6069
+ }
6070
+ return "";
6071
+ }
6072
+ hideOrderTotals(event) {
6073
+ this.showTotals = false;
6074
+ }
6075
+ }
6076
+ ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITHOUT_SIDEBAR = 50;
6077
+ ServiceOrderComponent.FLOAT_BUTTON_RIGHT_POSITION_WITH_SIDEBAR = 350;
6078
+ ServiceOrderComponent.decorators = [
6079
+ { type: Component, args: [{
6080
+ // eslint-disable-next-line @angular-eslint/component-selector
6081
+ selector: "service-order",
6082
+ template: `
6083
+ <div id="transaction-general-tab" style="height:100%;">
6084
+ <transaction-header-block
6085
+ [relationId]="relationId"
6086
+ [transaction]="transaction"
6087
+ [canPlanDelivery]="canPlanDelivery"
6088
+ (planningRequestButtonClick)="handlePlanningRequest($event)"
6089
+ ></transaction-header-block>
6090
+ <div *ngIf="!isService">
6091
+ <div class="transaction-view" fxLayout="row" fxLayoutGap="1px" fxLayoutAlign="flex-end">
6092
+ <div class="view-mode-buttons">
6093
+ <co-button [iconData]="iconCacheService.getIcon(iconThickLines)"
6094
+ [title]="'LIST_VIEW' | localize"
6095
+ (click)="this.activeViewMode = viewModes.List"
6096
+ class="triangle white"
6097
+ iconClass="medium light"></co-button>
6098
+ <co-button [iconData]="iconCacheService.getIcon(iconThinLines)"
6099
+ [title]="'GRID_VIEW' | localize"
6100
+ (click)="this.activeViewMode = viewModes.Grid"
6101
+ class="triangle white"
6102
+ iconClass="medium light"></co-button>
6103
+ </div>
6104
+ </div>
6105
+ <div *ngIf="this.activeViewMode === viewModes.List">
6106
+ <transaction-order-line-view *ngFor="let line of transactionLines; trackBy:trackByFn;"
6107
+ [line]="line"
6108
+ ></transaction-order-line-view>
6109
+ </div>
6110
+ <div *ngIf="this.activeViewMode === viewModes.Grid">
6111
+ <transaction-order-lines [transaction]="transaction"></transaction-order-lines>
6112
+ </div>
6113
+ <div class="floating-icon-wrapper" [style.right.px]="floatButtonRightPosition">
6114
+ <icon [icon]="iconOrder"
6115
+ class="light"
6116
+ (click)="floatButtonClick()" id="floatingIcon"
6117
+ [style.right.px]="floatButtonRightPosition"></icon>
6118
+ </div>
6119
+ </div>
6120
+ <transaction-order-totals *ngIf="!isService"
6121
+ [ngClass]="showTotals ? 'transaction-totals-show' : 'transaction-totals-hide'"></transaction-order-totals>
6122
+ </div>
6123
+
6124
+ <transaction-article-text></transaction-article-text>
6125
+ `,
6126
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center,:host :host{display:flex}.flex-center{flex-direction:row}:host :host{flex-direction:column}.flex-center{align-items:center!important;justify-content:center!important}.transaction-view .view-mode-buttons{margin-left:11px}:host :host{width:100%}:host :host{overflow:hidden}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host :host{padding-bottom:60px}.page-wrapper :host{padding:20px;margin-bottom:60px}:host transaction-order-totals{display:flex;flex-direction:column;align-items:flex-end}:host .transaction-totals-show{padding:20px}:host .transaction-totals-hide{position:relative;bottom:0;right:0}::ng-deep #transaction_planning_agenda{top:160px!important;width:calc(100vw - 80px)!important}::ng-deep #transaction_planning_agenda .popup-card-title{padding:10px 20px;background:#74B77F;color:#fff}::ng-deep #transaction_planning_agenda .popup-card-title .header-wrapper{align-items:center!important}::ng-deep #transaction_planning_agenda .popup-card-title .separator{border-color:#fff!important}::ng-deep #transaction_planning_agenda .popup-card-title .header{font-size:15px;font-weight:normal}::ng-deep #transaction_planning_agenda .popup-card-title .sub-header{font-size:18px;color:#fff!important;font-weight:bold!important}::ng-deep #transaction_planning_agenda .popup-card-title button-select icon [fill]{fill:#fff}::ng-deep #transaction_planning_agenda .popup-card-content{overflow:hidden}@media only screen and (max-width: 599px){::ng-deep #transaction_planning_agenda{width:100vw!important}::ng-deep #transaction_planning_agenda .popup-card-content{padding:0}}.column-separator{padding-right:25px;border-right:1px solid #0000001c}.floating-icon-wrapper{position:fixed;bottom:50px;right:50px;display:flex;flex-shrink:0;align-items:center;justify-content:center;background:#475060;height:50px;width:50px;opacity:.5;transition:opacity .4s ease-in-out;border-radius:50%;overflow:hidden;box-shadow:0 0 6px #0009;-webkit-box-shadow:0px 0px 6px 0px rgba(0,0,0,.6);-moz-box-shadow:0px 0px 6px 0px rgba(0,0,0,.6);cursor:pointer}.floating-icon-wrapper:hover{opacity:1;transition:opacity .4s ease-in-out}.floating-icon-wrapper ::ng-deep icon{height:44px!important;width:44px!important;color:#fff!important;flex-shrink:0}.transaction-wrapper{padding:0 20px}.view-mode-buttons co-button{padding:0}.transaction-view{display:flex;margin-top:10px;justify-content:stretch}.transaction-view .view-mode-buttons{display:flex;flex-direction:row}.transaction-view .view-mode-buttons button-select ::ng-deep button-colijn{border-radius:0}.transaction-view .view-mode-buttons button-select:first-child{margin-right:5px}.transaction-view .view-mode-buttons button-select:first-child ::ng-deep button-colijn{border-radius:3px}.transaction-view .view-mode-buttons button-select:nth-child(2) ::ng-deep button-colijn{border-top-left-radius:3px;border-bottom-left-radius:3px}.transaction-view .view-mode-buttons button-select:last-child ::ng-deep button-colijn{border-top-right-radius:3px;border-bottom-right-radius:3px}\n"]
6127
+ },] }
6128
+ ];
6129
+ ServiceOrderComponent.ctorParameters = () => [
6130
+ { type: TransactionService },
6131
+ { type: TransactionEventService },
6132
+ { type: IconCacheService }
6133
+ ];
6134
+ ServiceOrderComponent.propDecorators = {
6135
+ _transactionArticleTextComponent: [{ type: ViewChild, args: [TransactionArticleTextComponent, { static: false },] }]
6136
+ };
6137
+
6138
+ class TransactionOrderTotalsComponent extends TransactionBaseComponent {
6139
+ constructor(service) {
6140
+ super(service);
6141
+ this.service = service;
6142
+ }
6143
+ }
6144
+ TransactionOrderTotalsComponent.decorators = [
6145
+ { type: Component, args: [{
6146
+ // eslint-disable-next-line @angular-eslint/component-selector
6147
+ selector: "transaction-order-totals",
6148
+ template: `
6149
+ <div class="totals-wrapper">
6150
+ <div class="totals-item">
6151
+ <div class="totals-item-description" [textContent]="'SUBTOTAL' | localize"></div>
6152
+ <div class="totals-item-value" [textContent]="transactionTotal?.grossAmount | coCurrency | coCurrency"></div>
6153
+ </div>
6154
+ <div class="totals-item">
6155
+ <div class="totals-item-description" [textContent]="'VAT_AMOUNT' | localize"></div>
6156
+ <div class="totals-item-value" [textContent]="transactionTotal?.surchargeAmount | coCurrency"></div>
6157
+ </div>
6158
+ <div class="totals-item total">
6159
+ <div class="totals-item-description" [textContent]="'TRANSACTION_SUM_I' | localize"></div>
6160
+ <div class="totals-item-value" [textContent]="transactionTotal?.netAmount | coCurrency"></div>
6161
+ </div>
6162
+ </div>
6163
+ `,
6164
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host .totals-wrapper{width:310px;font-size:13px}:host .totals-item{display:flex;flex-direction:row;height:25px;align-items:center}:host .totals-item>div{text-align:end;width:50%}:host .totals-item.total{font-weight:bold;height:30px;border-top:1px solid #DCE4EA}\n"]
6165
+ },] }
6166
+ ];
6167
+ TransactionOrderTotalsComponent.ctorParameters = () => [
6168
+ { type: TransactionService }
6169
+ ];
6170
+
6171
+ class TransactionOrderLineViewComponent {
6172
+ constructor(_service, _eventService) {
6173
+ this._service = _service;
6174
+ this._eventService = _eventService;
6175
+ this.stock = StockStatus.Low;
6176
+ }
6177
+ ngOnInit() {
6178
+ this._loadArticleImage();
6179
+ }
6180
+ _loadArticleImage() {
6181
+ return __awaiter(this, void 0, void 0, function* () {
6182
+ if (this.line) {
6183
+ this.image = this.line ? yield this._service.retrieveLineImage(this.line) : undefined;
6184
+ }
6185
+ });
6186
+ }
6187
+ transactionLineClick(line) {
6188
+ this._eventService.transactionLineClicked.next(this.line);
6189
+ }
6190
+ }
6191
+ TransactionOrderLineViewComponent.decorators = [
6192
+ { type: Component, args: [{
6193
+ // eslint-disable-next-line @angular-eslint/component-selector
6194
+ selector: "transaction-order-line-view",
6195
+ template: `
6196
+ <div class="transaction-order-line-r" fxFlex (click)="transactionLineClick(line)">
6197
+ <div fxLayout="row" class="full-width">
6198
+ <div fxLayout="column" class="transaction-order-line-description" fxLayoutGap="20px">
6199
+ <div fxLayout="row" fxLayoutGap="10px">
6200
+ <span [textContent]="line.goodDescription" class="cart-line-description-main"></span>
6201
+ <span *ngIf="line.goodDescription && line.articleNumber">|</span>
6202
+ <span [textContent]="line.articleNumber" class="cart-line-description-artnr"></span>
6203
+ </div>
6204
+ <div>
6205
+ <span [innerHTML]="line.configurationReadable" class="cart-line-description-detail"></span>
6206
+ </div>
6207
+ </div>
6208
+ <div fxLayout="column" class="transaction-order-line-image">
6209
+ <image-display [model]="image"></image-display>
6210
+ </div>
6211
+ </div>
6212
+ <div fxLayout="row" class="transaction-order-line-right">
6213
+ <div fxLayout="column" class="transaction-order-line-stock">
6214
+ <span [textContent]="'STOCK' | localize" class="small-font"></span>
6215
+ <stock-status-indicator [model]="stock"></stock-status-indicator>
6216
+ <span [textContent]="'DELIVERY_TIME_PERIOD' | localize" class="small-font"></span>
6217
+ <span [textContent]="line.deliveryDate | deliveryTime"></span>
6218
+ </div>
6219
+ <div class="transaction-order-line-amount">
6220
+ <co-input-number-picker
6221
+ class="horizontal"
6222
+ [(model)]="line.amount" [min]="0" [buttonShowMode]="'always'"
6223
+ [readonly]="true"></co-input-number-picker>
6224
+ </div>
6225
+ <div class="transaction-order-line-totals">
6226
+ <span [textContent]="line.netLineTotal | coCurrency: true"></span>
6227
+ </div>
6228
+ </div>
6229
+ </div>
6230
+ `,
6231
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.transaction-order-line-r .transaction-order-line-description .cart-line-description-artnr{font-size:10px}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.transaction-order-line-r .transaction-order-line-description,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount,.transaction-order-line-r .transaction-order-line-image,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-stock,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals{margin-top:20px}.transaction-order-line-r .transaction-order-line-description,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount,.transaction-order-line-r .transaction-order-line-image,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-stock,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals{margin-bottom:20px}.transaction-order-line-r .transaction-order-line-description,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals{margin-left:20px}.transaction-order-line-r .transaction-order-line-description,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount{margin-right:20px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host{display:block;padding:20px}:host ::ng-deep collapseable{width:100%!important}.horizontal{display:flex;flex-direction:row}.service-request-button-wrapper{display:flex;justify-content:center;margin-top:20px}.transaction-order-line-r{display:flex;justify-content:stretch;flex-direction:row}@media (max-width: 800px){.transaction-order-line-r{flex-direction:column}}.transaction-order-line-r .transaction-order-line-image{display:flex;flex:1 0 auto!important;flex-direction:column;align-items:center;justify-content:center;padding-right:10px}.transaction-order-line-r .transaction-order-line-image image-display{width:6em;height:6em}.transaction-order-line-r .transaction-order-line-image ::ng-deep no-image-display{display:none}.transaction-order-line-r .transaction-order-line-description{display:flex;flex-direction:column;width:auto;max-width:355px;margin-left:10px}.transaction-order-line-r .transaction-order-line-description .cart-line-description-main{font-weight:bold}.transaction-order-line-r .transaction-order-line-right{justify-content:flex-end;align-items:center}.transaction-order-line-r .transaction-order-line-right .transaction-order-line-stock{width:10em}.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount{width:15em}.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals{display:flex;justify-content:flex-end;min-width:100px;font-weight:bold}.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals span{text-align:right}\n"]
6232
+ },] }
6233
+ ];
6234
+ TransactionOrderLineViewComponent.ctorParameters = () => [
6235
+ { type: TransactionService },
6236
+ { type: TransactionEventService }
6237
+ ];
6238
+ TransactionOrderLineViewComponent.propDecorators = {
6239
+ line: [{ type: Input }]
6240
+ };
6241
+
6242
+ class TransactionOrderLinesComponent extends TransactionBaseComponent {
6243
+ constructor(service, _eventService, _dictionaryService) {
6244
+ super(service);
6245
+ this.service = service;
6246
+ this._eventService = _eventService;
6247
+ this._dictionaryService = _dictionaryService;
6248
+ this.createServiceClick = new EventEmitter();
6249
+ this.nothingSelected = true;
6250
+ this.columns = [];
6251
+ this.columns.push({ field: "articleNumber", headerText: this._dictionaryService.get("ARTICLE_NR"), allowFiltering: false }, { field: "goodDescription", headerText: this._dictionaryService.get("DESCRIPTION") }, { field: "detailsAsString", headerText: this._dictionaryService.get("DETAILS") }, { field: "price", headerText: this._dictionaryService.get("PRICE") }, { field: "amount", headerText: this._dictionaryService.get("NUMBER") }, { field: "lineTotal", headerText: this._dictionaryService.get("SUBTOTAL") }, { field: "logisticState", headerText: this._dictionaryService.get("STATE") }, { field: "expectedDeliveryDate", headerText: this._dictionaryService.get("EXPECTED_DELIVERY_DATE") });
6252
+ }
6253
+ get pagingEnabled() {
6254
+ if (this.transactionLines) {
6255
+ return this.transactionLines.length >= TransactionOrderLinesComponent.MAX_TRANSACTION_LINES;
6256
+ }
6257
+ return false;
6258
+ }
6259
+ set selectedTransLine(value) {
6260
+ this._selectedTransLine = value;
6261
+ this.nothingSelected = this._selectedTransLine === null;
6262
+ }
6263
+ get selectedTransLine() {
6264
+ return this._selectedTransLine;
6265
+ }
6266
+ onRowClick(row) {
6267
+ this.selectedTransLine = row;
6268
+ this._eventService.transactionLineClicked.next(this.selectedTransLine);
6269
+ }
6270
+ onRowDeselect(event) {
6271
+ this.selectedTransLine = null;
6272
+ }
6273
+ // TODO: navragen wat de bedoeling is, zie originele source iOneJS
6274
+ newServiceRequestClick() {
6275
+ if (this.nothingSelected) {
6276
+ return;
6277
+ }
6278
+ this.createServiceClick.emit(this._selectedTransLine);
6279
+ }
6280
+ }
6281
+ TransactionOrderLinesComponent.MAX_TRANSACTION_LINES = 20;
6282
+ TransactionOrderLinesComponent.decorators = [
6283
+ { type: Component, args: [{
6284
+ // eslint-disable-next-line @angular-eslint/component-selector
6285
+ selector: "transaction-order-lines",
6286
+ template: `
6287
+ <co-grid #transactionGrid
6288
+ [data]="transactionLines"
6289
+ [columns]="columns"
6290
+ [pagingEnabled]="pagingEnabled"
6291
+ [maxNumberOfRows]="'20'"
6292
+ (rowsSelected)="onRowClick($event)"
6293
+ ></co-grid>
6294
+ `,
6295
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.transaction-order-line-r .transaction-order-line-description .cart-line-description-artnr{font-size:10px}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.transaction-order-line-r .transaction-order-line-description,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount,.transaction-order-line-r .transaction-order-line-image,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-stock,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals{margin-top:20px}.transaction-order-line-r .transaction-order-line-description,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount,.transaction-order-line-r .transaction-order-line-image,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-stock,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals{margin-bottom:20px}.transaction-order-line-r .transaction-order-line-description,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals{margin-left:20px}.transaction-order-line-r .transaction-order-line-description,.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount{margin-right:20px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host{display:block;padding:20px}:host ::ng-deep collapseable{width:100%!important}.service-request-button-wrapper{display:flex;justify-content:center;margin-top:20px}.transaction-order-line-r{display:flex;justify-content:stretch;flex-direction:row}@media (max-width: 800px){.transaction-order-line-r{flex-direction:column}}.transaction-order-line-r .transaction-order-line-image{display:flex;flex:1 0 auto!important;flex-direction:column;align-items:center;justify-content:center;padding-right:10px}.transaction-order-line-r .transaction-order-line-image image-display{width:6em;height:6em}.transaction-order-line-r .transaction-order-line-image ::ng-deep no-image-display{display:none}.transaction-order-line-r .transaction-order-line-description{display:flex;flex-direction:column;width:auto;max-width:355px;margin-left:10px}.transaction-order-line-r .transaction-order-line-description .cart-line-description-main{font-weight:bold}.transaction-order-line-r .transaction-order-line-right{justify-content:flex-end;align-items:center}.transaction-order-line-r .transaction-order-line-right .transaction-order-line-stock{width:10em}.transaction-order-line-r .transaction-order-line-right .transaction-order-line-amount{width:15em}.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals{display:flex;justify-content:flex-end;min-width:100px;font-weight:bold}.transaction-order-line-r .transaction-order-line-right .transaction-order-line-totals span{text-align:right}\n"]
6296
+ },] }
6297
+ ];
6298
+ TransactionOrderLinesComponent.ctorParameters = () => [
6299
+ { type: TransactionService },
6300
+ { type: TransactionEventService },
6301
+ { type: DictionaryService }
6302
+ ];
6303
+ TransactionOrderLinesComponent.propDecorators = {
6304
+ transactionGrid: [{ type: ViewChild, args: ["transactionGrid",] }],
6305
+ createServiceClick: [{ type: Output }]
6306
+ };
6307
+
6308
+ class TransactionRelationAddressComponent {
6309
+ constructor(_dictionary, _connector) {
6310
+ this._dictionary = _dictionary;
6311
+ this._connector = _connector;
6312
+ this.countries = [];
6313
+ this.fields = { text: "description", value: "code" };
6314
+ this.postalCodeCheckErrorMessage = "";
6315
+ this._prevPostalCodeForCheck = "";
6316
+ }
6317
+ set address(address) {
6318
+ this._address = address;
6319
+ }
6320
+ get address() {
6321
+ if (this._address === undefined) {
6322
+ this._address = new Address();
6323
+ }
6324
+ return this._address;
6325
+ }
6326
+ ngOnInit() {
6327
+ return __awaiter(this, void 0, void 0, function* () {
6328
+ this.countries = yield this._connector.getCountries();
6329
+ });
6330
+ }
6331
+ checkForPostalCodeCheckError() {
6332
+ return __awaiter(this, void 0, void 0, function* () {
6333
+ if (!this.address.postalCode || isNill$1(this.address.houseNo)) {
6334
+ this.postalCodeCheckErrorMessage = "";
6335
+ return;
6336
+ }
6337
+ if (this._prevPostalCodeForCheck !== this.address.postalCode || this._prevHouseNoForCheck !== this.address.houseNo) {
6338
+ this._prevPostalCodeForCheck = this.address.postalCode;
6339
+ this._prevHouseNoForCheck = this.address.houseNo;
6340
+ const postalCodeResponse = yield this._connector.getPostalCodeRetrieval((this.address.postalCode ? this.address.postalCode : ""), StringUtils.ParseString(this.address.houseNo));
6341
+ if (postalCodeResponse && postalCodeResponse.isBadAddress) {
6342
+ this.postalCodeCheckErrorMessage = this._dictionary.get("UNKNOWN_ADDRESS_CHECK_IT");
6343
+ }
6344
+ else {
6345
+ this.postalCodeCheckErrorMessage = "";
6346
+ this.address.streetName = postalCodeResponse.street;
6347
+ this.address.city = postalCodeResponse.city;
6348
+ }
6349
+ }
6350
+ });
6351
+ }
6352
+ changeHouseNo() {
6353
+ this.address.houseNo = Number(this.address.houseNo);
6354
+ }
6355
+ }
6356
+ TransactionRelationAddressComponent.decorators = [
6357
+ { type: Component, args: [{
6358
+ // eslint-disable-next-line @angular-eslint/component-selector
6359
+ selector: "transaction-relation-address",
6360
+ template: `
6361
+ <label [textContent]="label | localize"
6362
+ class="transaction-relation-label-h3"
6363
+ ></label>
6364
+ <div class="default-flex-row">
6365
+ <div class="default-flex-column">
6366
+ <co-input-text [(model)]="address.postalCode"
6367
+ [placeholder]="'POSTAL_CODE' | localize"
6368
+ (blur)="checkForPostalCodeCheckError()"
6369
+ required
6370
+ ></co-input-text>
6371
+ </div>
6372
+ <div class="default-flex-column">
6373
+ <co-input-text [(model)]="address.houseNo"
6374
+ [placeholder]="'HOUSE_NO' | localize"
6375
+ (blur)="checkForPostalCodeCheckError()"
6376
+ (modelChange) = "changeHouseNo()"
6377
+ required
6378
+ ></co-input-text>
6379
+ </div>
6380
+ <div class="default-flex-column">
6381
+ <co-input-text [(model)]="address.houseNoAddition"
6382
+ [placeholder]="'HOUSE_NO_ADDITION' | localize"
6383
+ ></co-input-text>
6384
+ </div>
6385
+ </div>
6386
+ <div>
6387
+ <div class="default-flex-row">
6388
+ <div class="default-flex-column">
6389
+ <co-input-text [(model)]="address.streetName" [placeholder]="'STREET' | localize" required></co-input-text>
6390
+ </div>
6391
+ <div class="default-flex-column">
6392
+ <co-input-text [(model)]="address.city" [placeholder]="'CITY' | localize" required></co-input-text>
6393
+ </div>
6394
+ <div class="default-flex-column">
6395
+ <co-input-combo-box [(model)]="address.countryId"
6396
+ [source]="countries"
6397
+ [fields]="fields"
6398
+ [placeholder]="'COUNTRY'| localize"
6399
+ [required]="true"
6400
+ ></co-input-combo-box>
6401
+ </div>
6402
+ </div>
6403
+ </div>
6404
+ `,
6405
+ styles: [".button-wrapper{margin-top:10px;justify-content:center}co-input-radio-button{margin-left:16px}.transaction-relation-label-h2{display:block;margin-top:1em;margin-bottom:1em;font-size:18px;font-weight:bold}.transaction-relation-label-h3{display:block;margin-top:1em;margin-bottom:1em;font-size:14px;font-weight:bold}\n"]
6406
+ },] }
6407
+ ];
6408
+ TransactionRelationAddressComponent.ctorParameters = () => [
6409
+ { type: DictionaryService },
6410
+ { type: IOneConnectorAdapterService }
6411
+ ];
6412
+ TransactionRelationAddressComponent.propDecorators = {
6413
+ label: [{ type: Input }],
6414
+ address: [{ type: Input }]
6415
+ };
6416
+
6417
+ class TransactionSidebarRightComponent extends TransactionBaseComponent {
6418
+ constructor(service, iconCacheService, _eventService, changeDetector) {
6419
+ super(service);
6420
+ this.service = service;
6421
+ this.iconCacheService = iconCacheService;
6422
+ this._eventService = _eventService;
6423
+ this.changeDetector = changeDetector;
6424
+ this.iconDetailView = CoreComponentsIcon.DetailView;
6425
+ this.iconArrowPointRight = CoreComponentsIcon.ArrowPointRight;
6426
+ this.iconStock = CoreComponentsIcon.Stock;
6427
+ this.iconDocuments = CoreComponentsIcon.Documents;
6428
+ this.test = "";
6429
+ this.defaultSidebar = new Sidebar({
6430
+ width: "320px",
6431
+ type: "Auto",
6432
+ isOpen: false,
6433
+ position: "Right",
6434
+ target: "#app-module-sidebar-right"
6435
+ });
6436
+ this._subscriptions = [];
6437
+ this._subscriptions.push(this._eventService.transactionLineClicked.subscribe((transactionLine) => {
6438
+ this.transactionLine = transactionLine;
6439
+ this.defaultSidebar.show();
6440
+ }));
6441
+ }
6442
+ ngOnInit() {
6443
+ setTimeout(() => {
6444
+ this.defaultSidebar.appendTo("#default-sidebar");
6445
+ this.sidebarCloseClick();
6446
+ this.changeDetector.detectChanges();
6447
+ });
6448
+ }
6449
+ ngOnDestroy() {
6450
+ this._subscriptions.forEach(sub => sub.unsubscribe());
6451
+ }
6452
+ sidebarCloseClick() {
6453
+ this.defaultSidebar.hide();
6454
+ this._eventService.rightSidebarClose.next();
6455
+ }
6456
+ }
6457
+ TransactionSidebarRightComponent.decorators = [
6458
+ { type: Component, args: [{
6459
+ // eslint-disable-next-line @angular-eslint/component-selector
6460
+ selector: "transaction-sidebar-right",
6461
+ template: `
6462
+ <div id="default-sidebar">
6463
+ <div>
6464
+ <icon [icon]="iconArrowPointRight" (click)="sidebarCloseClick()"></icon>
6465
+ <label [textContent]="transactionLine?.goodDescription"></label>
6466
+ </div>
6467
+ <div>
6468
+ <ejs-tab id="element2">
6469
+ <e-tabitems>
6470
+ <e-tabitem>
6471
+ <ng-template #headerText>
6472
+ <icon [icon]="iconDetailView" title="Regeldetails"></icon>
6473
+ </ng-template>
6474
+ <ng-template #content>
6475
+ <transaction-line-accordion [transactionLine]="transactionLine"></transaction-line-accordion>
6476
+ </ng-template>
6477
+ </e-tabitem>
6478
+ <e-tabitem>
6479
+ <ng-template #headerText>
6480
+ <icon [icon]="iconStock" title="Voorraad"></icon>
6481
+ </ng-template>
6482
+ <ng-template #content>
6483
+ <div style="margin: 10px;">
6484
+ <div fxLayout="row" fxLayoutGap="10px">
6485
+ <co-input-text placeholder="In voorraad"></co-input-text>
6486
+ <co-input-text placeholder="In order voorraad"></co-input-text>
6487
+ </div>
6488
+
6489
+ <div fxLayout="row" fxLayoutGap="10px">
6490
+ <co-input-text placeholder="In order commissie"></co-input-text>
6491
+ <co-input-text placeholder="Beschikbaar"></co-input-text>
6492
+ </div>
6493
+
6494
+ <div fxLayout="row" fxLayoutGap="10px">
6495
+ <co-input-text placeholder="In bestelling"></co-input-text>
6496
+ <co-input-text placeholder="Later beschikbaar"></co-input-text>
6497
+ </div>
6498
+
6499
+ <div fxLayout="row" fxLayoutGap="10px">
6500
+ <co-input-text placeholder="Toegewezen" [model]="transactionLine?.amount"></co-input-text>
6501
+ <co-input-text placeholder="Vrije voorraad"></co-input-text>
6502
+ </div>
6503
+ </div>
6504
+ </ng-template>
6505
+ </e-tabitem>
6506
+ <e-tabitem>
6507
+ <ng-template #headerText>
6508
+ <icon [icon]="iconDocuments" title="Documenten en notities"></icon>
6509
+ </ng-template>
6510
+ <ng-template #content>
6511
+ <div>
6512
+ Documenten en notities
6513
+ </div>
6514
+ </ng-template>
6515
+ </e-tabitem>
6516
+ </e-tabitems>
6517
+ </ejs-tab>
6518
+ </div>
6519
+ </div>
6520
+ `,
6521
+ styles: [":host{display:block;width:100%}.e-accordion{border:none}.e-accordion .e-acrdn-item .e-acrdn-header .e-toggle-icon .e-icons{color:#add8e6}.e-tab .e-toolbar-items{display:flex;justify-content:center}\n"]
6522
+ },] }
6523
+ ];
6524
+ TransactionSidebarRightComponent.ctorParameters = () => [
6525
+ { type: TransactionService },
6526
+ { type: IconCacheService },
6527
+ { type: TransactionEventService },
6528
+ { type: ChangeDetectorRef }
6529
+ ];
6530
+
6531
+ class TransactionLineAccordionComponent {
6532
+ constructor(changeDetector) {
6533
+ this.changeDetector = changeDetector;
6534
+ this.transactionLine = new TransactionLineInfo;
6535
+ this.accordion = new Accordion({});
6536
+ this._subscriptions = [];
6537
+ }
6538
+ ngOnInit() {
6539
+ setTimeout(() => {
6540
+ this.accordion.appendTo("#accordion_html_markup");
6541
+ this.changeDetector.detectChanges();
6542
+ });
6543
+ }
6544
+ }
6545
+ TransactionLineAccordionComponent.decorators = [
6546
+ { type: Component, args: [{
6547
+ // eslint-disable-next-line @angular-eslint/component-selector
6548
+ selector: "transaction-line-accordion",
6549
+ template: `
6550
+ <div id='container'>
6551
+ <div id='accordion_html_markup'>
6552
+ <div>
6553
+ <div>Prijsdetails</div>
6554
+ <div>
6555
+ <div style="margin-left:10px;">
6556
+ <div fxLayout="row" fxLayoutGap="10px">
6557
+ <co-input-text placeholder="Aantal" [model]="transactionLine?.amount"></co-input-text>
6558
+ <co-input-text placeholder="Verkoopprijs" [model]="transactionLine?.price"></co-input-text>
6559
+ </div>
6560
+ <div fxLayout="row" fxLayoutGap="10px">
6561
+ <co-input-text placeholder="Adviesprijs"></co-input-text>
6562
+ <co-input-text placeholder="Totaal korting"></co-input-text>
6563
+ </div>
6564
+ <div fxLayout="row" fxLayoutGap="10px">
6565
+ <co-input-text placeholder="Koritngspercentage"></co-input-text>
6566
+ <co-input-text placeholder="Kortingsbedrag" [model]="transactionLine?.discountAmount"></co-input-text>
6567
+ </div>
6568
+
6569
+ <div fxLayout="row" fxLayoutGap="10px">
6570
+ <co-input-text placeholder="Speciale korting"></co-input-text>
6571
+ <co-input-text placeholder="Transactiekorting"></co-input-text>
6572
+ </div>
6573
+
6574
+ <div fxLayout="row" fxLayoutGap="10px">
6575
+ <co-input-text placeholder="Business rule korting"></co-input-text>
6576
+ <co-input-text placeholder="Kwantumkorting"></co-input-text>
6577
+ </div>
6578
+
6579
+ <div fxLayout="row" fxLayoutGap="10px">
6580
+ <co-input-text placeholder="Toeslag"></co-input-text>
6581
+ <co-input-text placeholder="BTW"></co-input-text>
6582
+ </div>
6583
+
6584
+ <div fxLayout="row" fxLayoutGap="10px">
6585
+ <co-input-text placeholder="Prijslijst"></co-input-text>
6586
+ </div>
6587
+ </div>
6588
+ </div>
6589
+ </div>
6590
+ <div>
6591
+ <div>Logistiek</div>
6592
+ <div>
6593
+ <div style="margin-left:10px;">
6594
+ <div fxLayout="row" fxLayoutGap="10px">
6595
+ <co-input-text placeholder="Commissiecode"></co-input-text>
6596
+ <co-input-text placeholder="Levermethode"></co-input-text>
6597
+ </div>
6598
+ <div fxLayout="row" fxLayoutGap="10px">
6599
+ <co-input-text placeholder="Montagetijd"></co-input-text>
6600
+ <co-input-text placeholder="Bewerkingstijd"></co-input-text>
6601
+ </div>
6602
+ <div fxLayout="row" fxLayoutGap="10px">
6603
+ <co-input-text placeholder="Leverancier"></co-input-text>
6604
+ <co-input-text placeholder="Artikelnummer leverancier"></co-input-text>
6605
+ </div>
6606
+
6607
+ <div fxLayout="row" fxLayoutGap="10px">
6608
+ <co-input-text placeholder="In/uit collectie"></co-input-text>
6609
+ <co-input-text placeholder="Dropshipment"></co-input-text>
6610
+ </div>
6611
+
6612
+ <div fxLayout="row" fxLayoutGap="10px">
6613
+ <co-input-text placeholder="Leverdatum"></co-input-text>
6614
+ <co-input-text placeholder="Referentie"></co-input-text>
6615
+ </div>
6616
+ </div>
6617
+ </div>
6618
+
6619
+ </div>
6620
+ <div>
6621
+ <div id="header">Opmaak</div>
6622
+ <div id="opmaak">
6623
+ <div style="margin-left:10px;">
6624
+ <div fxLayout="row" fxLayoutGap="10px">
6625
+ <co-input-text placeholder="Orderregelset"></co-input-text>
6626
+ <co-input-text placeholder="Hoofdstuk"></co-input-text>
6627
+ </div>
6628
+ <div>
6629
+ <co-input-text placeholder="Laatste wijziging Door"></co-input-text>
6630
+ </div>
6631
+ <div>
6632
+ <co-input-text placeholder="Zichtbaar op documenten"></co-input-text>
6633
+ </div>
6634
+ </div>
6635
+ </div>
6636
+ </div>
6637
+ <div>
6638
+ <div>Artikelkenmerken</div>
6639
+ <div>
6640
+ <div style="margin-left:10px;">
6641
+ <div fxLayout="row" fxLayoutGap="10px">
6642
+ <co-input-text placeholder="Breedte"></co-input-text>
6643
+ <co-input-text placeholder="Lengte"></co-input-text>
6644
+ </div>
6645
+ <div fxLayout="row" fxLayoutGap="10px">
6646
+ <co-input-text placeholder="Hoogte"></co-input-text>
6647
+ <co-input-text placeholder="Zitdiepte"></co-input-text>
6648
+ </div>
6649
+ <div fxLayout="row" fxLayoutGap="10px">
6650
+ <co-input-text placeholder="Zithoogte"></co-input-text>
6651
+ <co-input-text placeholder="Volume"></co-input-text>
6652
+ </div>
6653
+ <div fxLayout="row" fxLayoutGap="10px">
6654
+ <co-input-text placeholder="Stopmaat"></co-input-text>
6655
+ <co-input-text placeholder="Patroonhoogte"></co-input-text>
6656
+ </div>
6657
+ <br>
6658
+ <div fxLayout="row" fxLayoutGap="10px">
6659
+ <co-input-text placeholder="Standaard levertijd"></co-input-text>
6660
+ <co-input-text placeholder="Standaard levertijd verkoop"></co-input-text>
6661
+ </div>
6662
+ <div fxLayout="row" fxLayoutGap="10px">
6663
+ <co-input-text placeholder="Eenheid verkoop"></co-input-text>
6664
+ <co-input-text placeholder="Verkoophoeveelheid"></co-input-text>
6665
+ </div>
6666
+ <div fxLayout="row" fxLayoutGap="10px">
6667
+ <co-input-text placeholder="Aantal"></co-input-text>
6668
+ <co-input-text placeholder="Colli"></co-input-text>
6669
+ </div>
6670
+ <br>
6671
+ <div fxLayout="row" fxLayoutGap="10px">
6672
+ <co-input-text placeholder="Omzetgroep"></co-input-text>
6673
+ <co-input-text placeholder="Artikelgroep"></co-input-text>
6674
+ </div>
6675
+ <div fxLayout="row" fxLayoutGap="10px">
6676
+ <co-input-text placeholder="Hoofdartikel"></co-input-text>
6677
+ <co-input-text placeholder="Sfeer"></co-input-text>
6678
+ </div>
6679
+ <div fxLayout="row" fxLayoutGap="10px">
6680
+ <co-input-text placeholder="Concept"></co-input-text>
6681
+ <co-input-text placeholder="Afdeling"></co-input-text>
6682
+ </div>
6683
+ </div>
6684
+ </div>
6685
+ </div>
6686
+
6687
+ </div>
6688
+ </div>
6689
+ `,
6690
+ styles: [""]
6691
+ },] }
6692
+ ];
6693
+ TransactionLineAccordionComponent.ctorParameters = () => [
6694
+ { type: ChangeDetectorRef }
6695
+ ];
6696
+ TransactionLineAccordionComponent.propDecorators = {
6697
+ transactionLine: [{ type: Input }]
6698
+ };
6699
+
6700
+ class TransactionRelationEditComponent extends TransactionBaseComponent {
6701
+ constructor(service) {
6702
+ super(service);
6703
+ this.service = service;
6704
+ this.showPopup = false;
6705
+ this.relType = RelationNameKind;
6706
+ this.genderType = GenderType;
6707
+ this.validSubmit = new EventEmitter();
6708
+ this.invalidSubmit = new EventEmitter();
6709
+ this.dateOfBirth = new Date();
6710
+ this.phoneNumber = new ContactOption();
6711
+ }
6712
+ get readonly() {
6713
+ return false;
6714
+ }
6715
+ get subHeader() {
6716
+ return "";
6717
+ }
6718
+ get editFirstAddress() {
6719
+ if (this.firstAddress) {
6720
+ return this.firstAddress;
6721
+ }
6722
+ else if (this.customer) {
6723
+ const address = new Address();
6724
+ address.addressType = AddressType.DeliveryAddress;
6725
+ address.startDate = new Date();
6726
+ address.sequence = this.customer.getNextAddressSequence();
6727
+ this.customer.addresses.push(address);
6728
+ return address;
6729
+ }
6730
+ }
6731
+ get firstAddress() {
6732
+ if (!this.relation || !this.customer.addresses.length) {
6733
+ return;
6734
+ }
6735
+ return this.customer.getFirstAvailableAddress([
6736
+ AddressType.DeliveryAddress,
6737
+ AddressType.BillingAddress,
6738
+ AddressType.VisitingAddress,
6739
+ AddressType.MailingAddress,
6740
+ AddressType.NursingAddress
6741
+ ]);
6742
+ }
6743
+ onPopupClose() {
6744
+ this.showPopup = false;
6745
+ }
6746
+ changeRelationType(relationType) {
6747
+ if (this.customer) {
6748
+ this.customer.type = relationType;
6749
+ }
6750
+ }
6751
+ changeGenderType(genderType) {
6752
+ if (this.customer) {
6753
+ this.customer.gender = genderType;
6754
+ }
6755
+ }
6756
+ firstNameChange(firstName) {
6757
+ if (this.customer) {
6758
+ this.customer.firstName = firstName;
6759
+ }
6760
+ }
6761
+ familyNameChange(familyName) {
6762
+ if (this.customer) {
6763
+ this.customer.familyName = familyName;
6764
+ }
6765
+ }
6766
+ }
6767
+ TransactionRelationEditComponent.decorators = [
6768
+ { type: Component, args: [{
6769
+ // eslint-disable-next-line @angular-eslint/component-selector
6770
+ selector: "transaction-relation-edit",
6771
+ template: `
6772
+ <co-dialog [visible]="showPopup" header="ACCOUNT_DETAILS" (close)="onPopupClose()"
6773
+ noClickOutside contentSize>
6774
+ <ng-container content>
6775
+ <co-form #transactionRelationEditForm (validSubmit)="validSubmit.emit()" (invalidSubmit)="invalidSubmit.emit()">
6776
+ <div style="min-width: 500px;">
6777
+ <div>
6778
+ <label [textContent]="'PERSONAL_DATA' | localize"
6779
+ class="transaction-relation-label-h3"
6780
+ ></label>
6781
+ </div>
6782
+ <div>
6783
+ <div>
6784
+ <label [textContent]="'ORDER_TYPE' | localize "
6785
+ class="transaction-relation-label-h3"
6786
+ ></label>
6787
+ </div>
6788
+ <div *ngIf="customer?.type">
6789
+ <co-input-radio-button [name]="'type'"
6790
+ [label]="'PRIVATE_PERSON' | localize"
6791
+ [value]="relType.Private"
6792
+ [checked]="customer.type === relType.Private"
6793
+ (modelChange)="changeRelationType(relType.Private)"
6794
+ ></co-input-radio-button>
6795
+ <co-input-radio-button [name]="'type'"
6796
+ [label]="'COMPANY' | localize"
6797
+ [value]="relType.Company"
6798
+ [checked]="customer.type === relType.Company"
6799
+ (modelChange)="changeRelationType(relType.Company)"
6800
+ ></co-input-radio-button>
6801
+ </div>
6802
+ </div>
6803
+ <div *ngIf="customer?.type === relType.Private">
6804
+ <label [textContent]="'SALUTATION' | localize"
6805
+ class="transaction-relation-label-h3"
6806
+ ></label>
6807
+ <div *ngIf="customer?.gender">
6808
+ <co-input-radio-button [name]="'gender'"
6809
+ [label]="'MALE' | localize"
6810
+ [value]="genderType.Male"
6811
+ [checked]="customer.gender === genderType.Male"
6812
+ (modelChange)="changeGenderType(genderType.Male)"
6813
+ ></co-input-radio-button>
6814
+ <co-input-radio-button [name]="'gender'"
6815
+ [label]="'FEMALE' | localize "
6816
+ [value]="genderType.Female"
6817
+ [checked]="customer.gender === genderType.Female"
6818
+ (modelChange)="changeGenderType(genderType.Female)"
6819
+ ></co-input-radio-button>
6820
+ <co-input-radio-button [name]="'gender'"
6821
+ [label]="'UNKNOWN' | localize"
6822
+ [value]="genderType.Unspecified"
6823
+ [checked]="customer.gender === genderType.Unspecified"
6824
+ (modelChange)="changeGenderType(genderType.Unspecified)"
6825
+ ></co-input-radio-button>
6826
+ </div>
6827
+ </div>
6828
+ <div *ngIf="customer?.type === relType.Private">
6829
+ <div>
6830
+ <label [textContent]="'NAME' | localize "
6831
+ class="transaction-relation-label-h3"
6832
+ ></label>
6833
+ <div class="default-flex-row">
6834
+ <div class="default-flex-column">
6835
+ <co-input-text
6836
+ [(model)]="customer.firstName"
6837
+ [placeholder]="'FIRST_NAME' | localize "
6838
+ (modelChange)="firstNameChange($event)"
6839
+ required
6840
+ ></co-input-text>
6841
+ </div>
6842
+ <div class="default-flex-column">
6843
+ <co-input-text
6844
+ [(model)]="customer.prefix"
6845
+ [placeholder]="'PREFIX' | localize "
6846
+ ></co-input-text>
6847
+ </div>
6848
+ <div class="default-flex-column">
6849
+ <co-input-text
6850
+ [(model)]="customer.familyName"
6851
+ [placeholder]="'LAST_NAME' | localize"
6852
+ (modelChange)="familyNameChange($event)"
6853
+ required
6854
+ ></co-input-text>
6855
+ </div>
6856
+ <div class="default-flex-column">
6857
+ <co-input-date
6858
+ [placeholder]="'DATE_OF_BIRTH' | localize "
6859
+ [(model)]="dateOfBirth"
6860
+ required
6861
+ ></co-input-date>
6862
+ </div>
6863
+ <div class="default-flex-column">
6864
+ <co-input-text
6865
+ [(model)]="phoneNumber.value"
6866
+ [placeholder]="'PHONE_NO' | localize "
6867
+ required
6868
+ ></co-input-text>
6869
+ </div>
6870
+ </div>
6871
+ </div>
6872
+ </div>
6873
+ <div>
6874
+ <div *ngIf="customer?.type === relType.Company" class="default-flex-column">
6875
+ <label [textContent]="'COMPANY_NAME' | localize "
6876
+ class="transaction-relation-label-h3"
6877
+ ></label>
6878
+ <co-input-text
6879
+ [(model)]="customer.familyName"
6880
+ [label]="'COMPANY_NAME'"
6881
+ required
6882
+ ></co-input-text>
6883
+ </div>
6884
+ </div>
6885
+
6886
+ <div>
6887
+ <transaction-relation-address
6888
+ label="DELIVERY_ADDRESS" [address]="editFirstAddress"
6889
+ ></transaction-relation-address>
6890
+ </div>
6891
+
6892
+ <div fxLayout="row" fxLayoutGap="10px" class="button-wrapper">
6893
+ <default-ok-cancel-buttons
6894
+ [okDisabled]="readonly"
6895
+ (okClick)="transactionRelationEditForm.submit()"
6896
+ (cancelClick)="onPopupClose()"
6897
+ ></default-ok-cancel-buttons>
6898
+ </div>
6899
+ </div>
6900
+ </co-form>
6901
+ </ng-container>
6902
+ </co-dialog>
6903
+ `,
6904
+ styles: [".button-wrapper{margin-top:10px;justify-content:center}co-input-radio-button{margin-left:16px}.transaction-relation-label-h2{display:block;margin-top:1em;margin-bottom:1em;font-size:18px;font-weight:bold}.transaction-relation-label-h3{display:block;margin-top:1em;margin-bottom:1em;font-size:14px;font-weight:bold}\n"]
6905
+ },] }
6906
+ ];
6907
+ TransactionRelationEditComponent.ctorParameters = () => [
6908
+ { type: TransactionService }
6909
+ ];
6910
+ TransactionRelationEditComponent.propDecorators = {
6911
+ transactionRelationEditForm: [{ type: ViewChild, args: ["transactionRelationEditForm", { read: FormComponent },] }],
6912
+ showPopup: [{ type: Input }],
6913
+ validSubmit: [{ type: Output }]
6914
+ };
6915
+
6916
+ class TransactionHeaderBlockComponent extends TransactionBaseComponent {
6917
+ constructor(service) {
6918
+ super(service);
6919
+ this.service = service;
6920
+ this.planningRequestButtonClick = new EventEmitter();
6921
+ }
6922
+ showPopupTab(index) {
6923
+ this.selectedTab = index;
6924
+ }
6925
+ tabClick() {
6926
+ this.relationPopup.showPopup = true;
6927
+ }
6928
+ transactionEditClose() {
6929
+ this.relationPopup.showPopup = false;
6930
+ }
6931
+ }
6932
+ TransactionHeaderBlockComponent.decorators = [
6933
+ { type: Component, args: [{
6934
+ // eslint-disable-next-line @angular-eslint/component-selector
6935
+ selector: "transaction-header-block",
6936
+ template: `
6937
+ <div fxLayout="row wrap" fxLayout.xs="column">
6938
+ <div class="summary-block" (click)="tabClick()">
6939
+ <div class="block-wrapper">
6940
+ <div class="content-wrapper">
6941
+ <div class="name"
6942
+ [textContent]="relation?.displayName"></div>
6943
+ <div class="address link pointer"
6944
+ [textContent]="relation?.displayAddressFull"></div>
6945
+ <div class="phone link pointer"
6946
+ [textContent]="relation?.tel1"></div>
6947
+ <div [textContent]="relation?.email"
6948
+ class="email link pointer"
6949
+ ></div>
6950
+ </div>
6951
+ </div>
6952
+ </div>
6953
+
6954
+ <transaction-service-info class="summary-block"
6955
+ [transaction]="transaction"
6956
+ ></transaction-service-info>
6957
+ <transaction-service-status class="summary-block"
6958
+ [transaction]="transaction"
6959
+ ></transaction-service-status>
6960
+ <transaction-order-info class="summary-block"
6961
+ [transaction]="transaction"
6962
+ ></transaction-order-info>
6963
+ <transaction-payment-info class="summary-block"
6964
+ [transaction]="transaction"
6965
+ ></transaction-payment-info>
6966
+ <transaction-delivery-summary class="summary-block"
6967
+ [transaction]="transaction"
6968
+ [canPlanDelivery]="!isService && canPlanDelivery"
6969
+ (planningRequestButtonClick)="planningRequestButtonClick.emit($event)"
6970
+ (click)="showPopupTab(1)"
6971
+ ></transaction-delivery-summary>
6972
+ <transaction-article-info class="summary-block"
6973
+ [transaction]="transaction"
6974
+ ></transaction-article-info>
6975
+ <transaction-product-summary class="summary-block"
6976
+ [transaction]="transaction"
6977
+ [product]="product"
6978
+ ></transaction-product-summary>
6979
+ </div>
6980
+
6981
+ <transaction-relation-edit [customerId]="relationId" (validSubmit)="transactionEditClose()"></transaction-relation-edit>
6982
+ `,
6983
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host{display:block;padding:15px 0 30px}.name{font-size:13px;font-weight:bold;color:#22313c;margin-bottom:5px}.address,.phone,.email{font-size:13px;line-height:16px;color:#5b6875}.pointer{cursor:pointer}.link{color:#2b60a7}.summary-block{width:calc(25% - 15px);border:2px dashed #DCE4EA;margin:7px;border-radius:15px;position:relative}.summary-block .block-wrapper{position:relative;display:flex;align-items:center;padding:30px 20px}.summary-block:after{content:\"\";position:absolute;left:-1px;top:-1px;right:-1px;bottom:-1px;border:1px solid #FFF;pointer-events:none;border-radius:15px}@media only screen and (min-width: 960px) and (max-width: 1279px){.summary-block{width:calc(50% - 15px)}}@media only screen and (max-width: 599px){.summary-block{width:calc(100%);margin:7px 0}}\n"]
6984
+ },] }
6985
+ ];
6986
+ TransactionHeaderBlockComponent.ctorParameters = () => [
6987
+ { type: TransactionService }
6988
+ ];
6989
+ TransactionHeaderBlockComponent.propDecorators = {
6990
+ relationPopup: [{ type: ViewChild, args: [TransactionRelationEditComponent, { static: true },] }],
6991
+ canPlanDelivery: [{ type: Input }],
6992
+ planningRequestButtonClick: [{ type: Output }]
6993
+ };
6994
+
6995
+ class TransactionServiceSummaryComponent extends TransactionBaseComponent {
6996
+ constructor(service, iconCacheService) {
6997
+ super(service);
6998
+ this.service = service;
6999
+ this.iconCacheService = iconCacheService;
7000
+ this.iconWrench = CoreComponentsIcon.Wrench;
7001
+ }
7002
+ }
7003
+ TransactionServiceSummaryComponent.decorators = [
7004
+ { type: Component, args: [{
7005
+ // eslint-disable-next-line @angular-eslint/component-selector
7006
+ selector: "transaction-service-info",
7007
+ template: `
7008
+ <transaction-summary-block
7009
+ [hideAvatar]="true"
7010
+ [class.disabled]="!isNew"
7011
+ label="SERVICE"
7012
+ [icon]="iconWrench"
7013
+ headerLabel="SERVICE_NUMBER"
7014
+ [headerValue]="transactionInfo?.transactionNr"
7015
+ subHeaderLabel="SERVICE_REQUEST_DATE"
7016
+ [subHeaderValue]="transactionInfo?.transactionDate | date:'shortDate'"
7017
+ ></transaction-summary-block>
7018
+ `
7019
+ },] }
7020
+ ];
7021
+ TransactionServiceSummaryComponent.ctorParameters = () => [
7022
+ { type: TransactionService },
7023
+ { type: IconCacheService }
7024
+ ];
7025
+ TransactionServiceSummaryComponent.propDecorators = {
7026
+ hidden: [{ type: HostBinding, args: ["class.hidden",] }]
7027
+ };
7028
+
7029
+ class TransactionSummaryBlockComponent {
7030
+ constructor() {
7031
+ this.Icon = CoreComponentsIcon;
7032
+ this.hideAvatar = false;
7033
+ this.label = "";
7034
+ this.headerLabel = "";
7035
+ this.subHeaderLabel = "";
7036
+ }
7037
+ ngOnDestroy() {
7038
+ this.subHeaderTemplate = undefined;
7039
+ }
7040
+ }
7041
+ TransactionSummaryBlockComponent.decorators = [
7042
+ { type: Component, args: [{
7043
+ // eslint-disable-next-line @angular-eslint/component-selector
7044
+ selector: "transaction-summary-block",
7045
+ template: `
7046
+ <div class="block-wrapper">
7047
+ <div *ngIf="hideAvatar" class="icon-wrapper">
7048
+ <icon *ngIf="icon" [icon]="icon" class="dark"></icon>
7049
+ <image-display *ngIf="!icon" [model]="image"></image-display>
7050
+ </div>
7051
+ <div class="content-wrapper">
7052
+ <div class="value-block">
7053
+ <div class="header-label" [textContent]="headerLabel | localize"></div>
7054
+ <div class="header" [textContent]="headerValue"></div>
7055
+ </div>
7056
+ <div class="value-block">
7057
+ <div class="subheader-label" [textContent]="subHeaderLabel | localize"></div>
7058
+ <ng-container *ngIf="subHeaderTemplate" [templateWrapper]="subHeaderTemplate"></ng-container>
7059
+ <div *ngIf="!subHeaderTemplate" class="subheader" [textContent]="subHeaderValue"></div>
7060
+ </div>
7061
+ </div>
7062
+ </div>
7063
+ `,
7064
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host{width:368px;min-height:130px;height:auto;display:flex;flex-direction:column;margin-top:1px;margin-left:1px;padding:30px 20px}:host .content-wrapper .value-block{margin-bottom:10px}:host .content-wrapper .value-block ::ng-deep .planning-wrapper{justify-content:flex-start}:host .content-wrapper .value-block ::ng-deep .planning-wrapper arrow-link{margin-right:10px}:host .disabled-indicator{position:absolute;top:0;left:0;display:none}:host.disabled .disabled-indicator{display:block}:host ::ng-deep image-display{height:60px;width:60px;flex-shrink:0}:host ::ng-deep image-display span{display:none}:host .icon-wrapper{display:flex;flex-shrink:0;align-items:center;justify-content:center;background:#F8FBFA;height:60px;width:60px;border-radius:50%;border:1px solid #DCE4EA;overflow:hidden}:host .icon-wrapper ::ng-deep icon{height:60px!important;width:60px!important;flex-shrink:0}:host .title{font-size:13px;color:#22313c}:host .block-wrapper{position:relative;display:flex;align-items:center}:host .border{border-radius:3px;padding:15px;background:white;border:1px solid #DCE4EA}:host .content-wrapper{display:flex;flex-direction:column;justify-content:center;margin-left:10px;min-height:60px;height:auto;width:100%}:host .header-label,:host .subheader-label{font-size:11px;line-height:13px;color:#5b6875}:host .header,:host .subheader{font-size:13px;font-weight:bold;color:#22313c}\n"]
7065
+ },] }
7066
+ ];
7067
+ TransactionSummaryBlockComponent.ctorParameters = () => [];
7068
+ TransactionSummaryBlockComponent.propDecorators = {
7069
+ hideAvatar: [{ type: Input }],
7070
+ label: [{ type: Input }],
7071
+ icon: [{ type: Input }],
7072
+ image: [{ type: Input }],
7073
+ headerLabel: [{ type: Input }],
7074
+ headerValue: [{ type: Input }],
7075
+ subHeaderLabel: [{ type: Input }],
7076
+ subHeaderValue: [{ type: Input }],
7077
+ subHeaderTemplate: [{ type: ContentChild, args: ["subHeaderTemplate", { static: false },] }]
7078
+ };
7079
+
7080
+ class TransactionServiceStatusComponent extends TransactionBaseComponent {
7081
+ constructor(service) {
7082
+ super(service);
7083
+ this.service = service;
7084
+ this.iconPin = CoreComponentsIcon.Pin;
7085
+ }
7086
+ get serviceStatus() {
7087
+ // TODO: transaction.serviceStatus
7088
+ return "serviceStatus";
7089
+ }
7090
+ }
7091
+ TransactionServiceStatusComponent.decorators = [
7092
+ { type: Component, args: [{
7093
+ // eslint-disable-next-line @angular-eslint/component-selector
7094
+ selector: "transaction-service-status",
7095
+ template: `
7096
+ <transaction-summary-block
7097
+ [class.disabled]="!isNew"
7098
+ label="STATUS"
7099
+ [icon]="iconPin"
7100
+ headerLabel="SERVICE_STATE"
7101
+ [headerValue]="serviceStatus"
7102
+ ></transaction-summary-block>
7103
+ `
7104
+ },] }
7105
+ ];
7106
+ TransactionServiceStatusComponent.ctorParameters = () => [
7107
+ { type: TransactionService }
7108
+ ];
7109
+ TransactionServiceStatusComponent.propDecorators = {
7110
+ hidden: [{ type: HostBinding, args: ["class.hidden",] }]
7111
+ };
7112
+
7113
+ class TransactionOrderSummaryComponent extends TransactionBaseComponent {
7114
+ constructor(service) {
7115
+ super(service);
7116
+ this.service = service;
7117
+ this.iconOrder = CoreComponentsIcon.Order;
7118
+ }
7119
+ get sourceTransactionNr() {
7120
+ // TODO: transaction.sourceTransactionNr
7121
+ return 0;
7122
+ }
7123
+ get sourceTransactionDate() {
7124
+ // TODO: transaction.sourceTransactionDate
7125
+ return new Date();
7126
+ }
7127
+ }
7128
+ TransactionOrderSummaryComponent.decorators = [
7129
+ { type: Component, args: [{
7130
+ // eslint-disable-next-line @angular-eslint/component-selector
7131
+ selector: "transaction-order-info",
7132
+ template: `
7133
+ <transaction-summary-block
7134
+ [class.disabled]="!isNew"
7135
+ label="ORDER_INFO"
7136
+ [icon]="iconOrder"
7137
+ headerLabel="ORDER_NUMBER"
7138
+ [headerValue]="isService ? sourceTransactionNr : transactionInfo?.transactionNr"
7139
+ subHeaderLabel="ORDER_DATE"
7140
+ [subHeaderValue]="(isService ? sourceTransactionDate : this.transactionInfo?.transactionDate) | date:'shortDate'"
7141
+ ></transaction-summary-block>
7142
+ `
7143
+ },] }
7144
+ ];
7145
+ TransactionOrderSummaryComponent.ctorParameters = () => [
7146
+ { type: TransactionService }
7147
+ ];
7148
+ TransactionOrderSummaryComponent.propDecorators = {
7149
+ hidden: [{ type: HostBinding, args: ["class.hidden",] }]
7150
+ };
7151
+
7152
+ class TransactionPaymentInfoComponent extends TransactionBaseComponent {
7153
+ constructor(service) {
7154
+ super(service);
7155
+ this.service = service;
7156
+ this.euro = CoreComponentsIcon.Information;
7157
+ }
7158
+ }
7159
+ TransactionPaymentInfoComponent.decorators = [
7160
+ { type: Component, args: [{
7161
+ // eslint-disable-next-line @angular-eslint/component-selector
7162
+ selector: "transaction-payment-info",
7163
+ template: `
7164
+ <transaction-summary-block
7165
+ [class.disabled]="!isNew"
7166
+ label="PAYMENT"
7167
+ [icon]="euro"
7168
+ headerLabel="TOTAL_AMOUNT"
7169
+ [headerValue]="transactionTotal?.netAmount | coCurrency"
7170
+ subHeaderLabel="PAID_DOWN2"
7171
+ [subHeaderValue]="transactionTotal?.transactionDiscountAmount | coCurrency"
7172
+ ></transaction-summary-block>
7173
+ `
7174
+ },] }
7175
+ ];
7176
+ TransactionPaymentInfoComponent.ctorParameters = () => [
7177
+ { type: TransactionService }
7178
+ ];
7179
+ TransactionPaymentInfoComponent.propDecorators = {
7180
+ hidden: [{ type: HostBinding, args: ["class.hidden",] }]
7181
+ };
7182
+
7183
+ class TransactionArticleSummaryComponent extends TransactionBaseComponent {
7184
+ constructor(service) {
7185
+ super(service);
7186
+ this.service = service;
7187
+ this.imageDataUri = "";
7188
+ }
7189
+ get sourceArticleDescription() {
7190
+ // TODO: transaction.sourceArticleDescription
7191
+ return "sourceArticleDescription";
7192
+ }
7193
+ get sourceArticleNr() {
7194
+ // TODO: transaction.sourceArticleNr
7195
+ return "sourceArticleNr";
7196
+ }
7197
+ _getArticleImage() {
7198
+ return __awaiter(this, void 0, void 0, function* () {
7199
+ // TODO: Add to TransactionAPI?
7200
+ // if (this.transaction.sourceGoodId) {
7201
+ // this.imageDataUri =
7202
+ // (await this._articleDalRepo.getThumbnailImageContentTableGoods(
7203
+ // this.transaction.sourceGoodId + "", DocumentPublication.None, false, true));
7204
+ // }
7205
+ });
7206
+ }
7207
+ transactionSet() {
7208
+ this._getArticleImage();
7209
+ }
7210
+ }
7211
+ TransactionArticleSummaryComponent.decorators = [
7212
+ { type: Component, args: [{
7213
+ // eslint-disable-next-line @angular-eslint/component-selector
7214
+ selector: "transaction-article-info",
7215
+ template: `
7216
+ <transaction-summary-block
7217
+ [class.disabled]="!isNew"
7218
+ headerLabel="ARTICLE_DESCRIPTION"
7219
+ [image]="imageDataUri"
7220
+ [headerValue]="sourceArticleDescription"
7221
+ subHeaderLabel="ARTICLE_NR"
7222
+ [subHeaderValue]="sourceArticleNr"
7223
+ ></transaction-summary-block>
7224
+ `
7225
+ },] }
7226
+ ];
7227
+ TransactionArticleSummaryComponent.ctorParameters = () => [
7228
+ { type: TransactionService }
7229
+ ];
7230
+ TransactionArticleSummaryComponent.propDecorators = {
7231
+ hidden: [{ type: HostBinding, args: ["class.hidden",] }]
7232
+ };
7233
+
7234
+ class TransactionDeliverySummaryComponent extends TransactionBaseComponent {
7235
+ constructor(service) {
7236
+ super(service);
7237
+ this.service = service;
7238
+ this.deliveryTruck = CoreComponentsIcon.DeliveryTruck;
7239
+ this.calendarRoundOpen = CoreComponentsIcon.CalendarRoundOpen;
7240
+ this.deliveryMethodDescription = "";
7241
+ this.canPlanDelivery = false;
7242
+ this.planningRequestButtonClick = new EventEmitter();
7243
+ }
7244
+ transactionSet() {
7245
+ return __awaiter(this, void 0, void 0, function* () {
7246
+ // TODO: move call to TransactionAPI?
7247
+ //this.deliveryMethodDescription = await this._lookupService.lookup(DeliveryMethod, this.transaction.deliveryMethod);
7248
+ });
7249
+ }
7250
+ }
7251
+ TransactionDeliverySummaryComponent.decorators = [
7252
+ { type: Component, args: [{
7253
+ // eslint-disable-next-line @angular-eslint/component-selector
7254
+ selector: "transaction-delivery-summary",
7255
+ template: `
7256
+ <transaction-summary-block
7257
+ label="DELIVERY"
7258
+ [icon]="deliveryTruck"
7259
+ headerLabel="DELIVERY_METHOD2"
7260
+ [headerValue]="deliveryMethodDescription"
7261
+ [subHeaderLabel]="transactionInfo?.preferredDeliveryDate ? 'DELIVERY_DATE' : !canPlanDelivery ? 'EXPECTED_DELIVERY_WEEK' : 'EXPECTED_DELIVERY'"
7262
+ [subHeaderValue]="transactionInfo?.preferredDeliveryDate ? (transactionInfo?.deliveryDate | date:'shortDate') : 'WEEK' | localize | append:(' ') | append:(transactionInfo?.deliveryDate | date:'w')">
7263
+ <ng-template #subHeaderTemplate *ngIf="canPlanDelivery">
7264
+ <div class="planning-wrapper">
7265
+ <span class="subheader" *ngIf="transactionInfo?.preferredDeliveryDate"
7266
+ [textContent]="(transactionInfo?.preferredDeliveryDate | date:'shortDate') + ', ' + transactionInfo?.preferredDeliveryDate | date: 'time' "></span>
7267
+ <!-- <arrow-link *ngIf="!transactionInfo.preferredDeliveryDate"-->
7268
+ <!-- label="PLAN_YOUR_DELIVERY"-->
7269
+ <!-- (click)="planningRequestButtonClick.emit($event)"-->
7270
+ <!-- ></arrow-link>-->
7271
+ <icon [icon]="calendarRoundOpen" (click)="planningRequestButtonClick.emit($event)"></icon>
7272
+ </div>
7273
+ </ng-template>
7274
+ </transaction-summary-block>
7275
+ `,
7276
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host .planning-wrapper{display:flex;justify-content:space-between;align-items:center;flex-direction:row;color:#2b60a7;margin-top:-10px;font-size:13px}:host .planning-wrapper ::ng-deep icon{cursor:pointer}:host .planning-wrapper ::ng-deep icon [fill]{fill:#2b60a7}\n"]
7277
+ },] }
7278
+ ];
7279
+ TransactionDeliverySummaryComponent.ctorParameters = () => [
7280
+ { type: TransactionService }
7281
+ ];
7282
+ TransactionDeliverySummaryComponent.propDecorators = {
7283
+ hidden: [{ type: HostBinding, args: ["class.hidden",] }],
7284
+ canPlanDelivery: [{ type: Input }],
7285
+ planningRequestButtonClick: [{ type: Output }]
7286
+ };
7287
+
7288
+ class TransactionProductContractSummaryComponent extends TransactionBaseComponent {
7289
+ constructor(service) {
7290
+ super(service);
7291
+ this.service = service;
7292
+ }
7293
+ productSet() {
7294
+ // TODO: add to TransactionAPI?
7295
+ if (!this.product.imageAsDataUri) {
7296
+ // this._generalRepo.getDocument(this.product.image.documentId).then((doc: CoDocument) => {
7297
+ // this.product.imageAsDataUri = doc.thumbnailBodyAsDataUri;
7298
+ // });
7299
+ }
7300
+ }
7301
+ }
7302
+ TransactionProductContractSummaryComponent.decorators = [
7303
+ { type: Component, args: [{
7304
+ // eslint-disable-next-line @angular-eslint/component-selector
7305
+ selector: "transaction-product-contract-summary",
7306
+ template: `
7307
+ <transaction-summary-block
7308
+ [class.disabled]="!isNew"
7309
+ label="CONTRACT"
7310
+ [image]="product?.imageAsDataUri"
7311
+ headerLabel="PRODUCT"
7312
+ [headerValue]="product?.product"
7313
+ subHeaderLabel="REFERENCE"
7314
+ [subHeaderValue]="product?.productReference"
7315
+ ></transaction-summary-block>
7316
+ `
7317
+ },] }
7318
+ ];
7319
+ TransactionProductContractSummaryComponent.ctorParameters = () => [
7320
+ { type: TransactionService }
7321
+ ];
7322
+
7323
+ class TransactionProductSummaryComponent extends TransactionBaseComponent {
7324
+ constructor(service) {
7325
+ super(service);
7326
+ this.service = service;
7327
+ }
7328
+ productSet() {
7329
+ // TODO: Add to TransactionAPI?
7330
+ if (this.product && !this.product.imageAsDataUri && this.product.image && this.product.image.documentId) {
7331
+ // this._generalRepo.getDocument(this.product.image.documentId).then((doc: CoDocument) => {
7332
+ // this.product.imageAsDataUri = doc.thumbnailBodyAsDataUri;
7333
+ // });
7334
+ }
7335
+ }
7336
+ }
7337
+ TransactionProductSummaryComponent.decorators = [
7338
+ { type: Component, args: [{
7339
+ // eslint-disable-next-line @angular-eslint/component-selector
7340
+ selector: "transaction-product-summary",
7341
+ template: `
7342
+ <transaction-summary-block
7343
+ [class.disabled]="!isNew"
7344
+ label="PRODUCT"
7345
+ [image]="product?.imageAsDataUri"
7346
+ headerLabel="PRODUCT_TYPE"
7347
+ [headerValue]="product?.productReference"
7348
+ subHeaderLabel="PRODUCT"
7349
+ [subHeaderValue]="product?.product"
7350
+ ></transaction-summary-block>
7351
+ `
7352
+ },] }
7353
+ ];
7354
+ TransactionProductSummaryComponent.ctorParameters = () => [
7355
+ { type: TransactionService }
7356
+ ];
7357
+ TransactionProductSummaryComponent.propDecorators = {
7358
+ hidden: [{ type: HostBinding, args: ["class.hidden",] }]
7359
+ };
7360
+
7361
+ class TemplateWrapperDirective {
7362
+ constructor(viewContainer) {
7363
+ this.viewContainer = viewContainer;
7364
+ this.templateWrapper = null;
7365
+ this.templateWrapperContext = null;
7366
+ }
7367
+ ngOnChanges(changes) {
7368
+ const recreateView = this._shouldRecreateView(changes);
7369
+ if (recreateView) {
7370
+ if (this._viewRef) {
7371
+ this.viewContainer.remove(this.viewContainer.indexOf(this._viewRef));
7372
+ }
7373
+ if (this.templateWrapper) {
7374
+ this._viewRef = this.viewContainer.createEmbeddedView(this.templateWrapper, this.templateWrapperContext);
7375
+ }
7376
+ }
7377
+ else {
7378
+ if (this._viewRef && this.templateWrapperContext) {
7379
+ this._updateExistingContext(this.templateWrapperContext);
7380
+ }
7381
+ }
7382
+ }
7383
+ ngOnDestroy() {
7384
+ if (this._viewRef) {
7385
+ this.viewContainer.remove(this.viewContainer.indexOf(this._viewRef));
7386
+ this._viewRef = undefined;
7387
+ }
7388
+ this.templateWrapper = undefined;
7389
+ }
7390
+ _shouldRecreateView(changes) {
7391
+ const ctxChange = changes["templateWrapperContext"];
7392
+ return !!changes["templateWrapper"] || (ctxChange && this._hasContextShapeChanged(ctxChange));
7393
+ }
7394
+ _hasContextShapeChanged(ctxChange) {
7395
+ const prevCtxKeys = Object.keys(ctxChange.previousValue || {});
7396
+ const currCtxKeys = Object.keys(ctxChange.currentValue || {});
7397
+ if (prevCtxKeys.length === currCtxKeys.length) {
7398
+ for (const propName of currCtxKeys) {
7399
+ if (prevCtxKeys.indexOf(propName) === -1) {
7400
+ return true;
7401
+ }
7402
+ }
7403
+ return false;
7404
+ }
7405
+ else {
7406
+ return true;
7407
+ }
7408
+ }
7409
+ _updateExistingContext(ctx) {
7410
+ for (const propName of Object.keys(ctx)) {
7411
+ this._viewRef.context[propName] = this.templateWrapperContext[propName];
7412
+ }
7413
+ }
7414
+ }
7415
+ TemplateWrapperDirective.decorators = [
7416
+ { type: Directive, args: [{
7417
+ // eslint-disable-next-line @angular-eslint/directive-selector
7418
+ selector: "[templateWrapper]"
7419
+ },] }
7420
+ ];
7421
+ TemplateWrapperDirective.ctorParameters = () => [
7422
+ { type: ViewContainerRef }
7423
+ ];
7424
+ TemplateWrapperDirective.propDecorators = {
7425
+ templateWrapper: [{ type: Input }],
7426
+ templateWrapperContext: [{ type: Input }]
7427
+ };
7428
+
7429
+ class DefaultOkCancelButtonsComponent {
7430
+ constructor() {
7431
+ this.hideCancel = false;
7432
+ this.hideOk = false;
7433
+ this.okLabel = "OK";
7434
+ // only emits when ok button was not disabled when it was clicked
7435
+ this.okClick = new EventEmitter();
7436
+ this.cancelClick = new EventEmitter();
7437
+ }
7438
+ onOkClick(event) {
7439
+ if (this.okButtonComp && !this.okButtonComp.disabled) {
7440
+ this.okClick.emit(event);
7441
+ }
7442
+ }
7443
+ }
7444
+ DefaultOkCancelButtonsComponent.decorators = [
7445
+ { type: Component, args: [{
7446
+ // eslint-disable-next-line @angular-eslint/component-selector
7447
+ selector: "default-ok-cancel-buttons",
7448
+ template: `
7449
+ <co-button *ngIf="!hideOk" [label]="okLabel" [disabled]="okDisabled" class="ok" #okButton (click)="onOkClick($event)"></co-button>
7450
+ <co-button *ngIf="!hideCancel" label="CANCEL" (click)="cancelClick.emit($event)"></co-button>
7451
+ <ng-content></ng-content>
7452
+ `,
7453
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center,:host{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.margin-popup:host{margin-top:20px}.margin-popup:host{margin-bottom:20px}.margin-popup:host{margin-left:20px}.margin-popup:host{margin-right:20px}.margin-top:host{margin-top:11px}:host button-colijn:not(:last-child){margin-right:11px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host.justify-center{justify-content:center}\n"]
7454
+ },] }
7455
+ ];
7456
+ DefaultOkCancelButtonsComponent.ctorParameters = () => [];
7457
+ DefaultOkCancelButtonsComponent.propDecorators = {
7458
+ okDisabled: [{ type: Input }],
7459
+ hideCancel: [{ type: Input }],
7460
+ hideOk: [{ type: Input }],
7461
+ okLabel: [{ type: Input }],
7462
+ okClick: [{ type: Output }],
7463
+ cancelClick: [{ type: Output }],
7464
+ okButtonComp: [{ type: ViewChild, args: ["okButton",] }]
7465
+ };
7466
+
7467
+ class IoneServiceOrderModule {
7468
+ }
7469
+ IoneServiceOrderModule.decorators = [
7470
+ { type: NgModule, args: [{
7471
+ imports: [
7472
+ IconModule,
7473
+ InputTextModule,
7474
+ InputCheckboxModule,
7475
+ InputRadioButtonModule,
7476
+ FormModule,
7477
+ InputComboBoxModule,
7478
+ InputDatePickerModule,
7479
+ InputNumberPickerModule,
7480
+ CoDialogModule,
7481
+ CoDialogPromptModule,
7482
+ ButtonModule,
7483
+ FlexModule,
7484
+ MultiSelectListModule,
7485
+ DropDownModule,
7486
+ PopupModule.forRoot(),
7487
+ CoSidebarModule,
7488
+ CoGridModule,
7489
+ CoreModule,
7490
+ ChipListModule,
7491
+ DropDownButtonModule,
7492
+ CheckBoxModule,
7493
+ DropDownListModule,
7494
+ IoneShoppingCartModule,
7495
+ TabModule,
7496
+ CommonModule,
7497
+ ],
7498
+ declarations: [
7499
+ TemplateWrapperDirective,
7500
+ DefaultOkCancelButtonsComponent,
7501
+ IoneServiceOrderComponent,
7502
+ ServiceOrderComponent,
7503
+ TransactionOrderTotalsComponent,
7504
+ TransactionOrderLineViewComponent,
7505
+ TransactionOrderLinesComponent,
7506
+ TransactionRelationAddressComponent,
7507
+ TransactionArticleTextComponent,
7508
+ TransactionSidebarRightComponent,
7509
+ TransactionLineAccordionComponent,
7510
+ TransactionHeaderBlockComponent,
7511
+ TransactionServiceSummaryComponent,
7512
+ TransactionSummaryBlockComponent,
7513
+ TransactionServiceStatusComponent,
7514
+ TransactionOrderSummaryComponent,
7515
+ TransactionPaymentInfoComponent,
7516
+ TransactionRelationEditComponent,
7517
+ TransactionArticleSummaryComponent,
7518
+ TransactionDeliverySummaryComponent,
7519
+ TransactionProductContractSummaryComponent,
7520
+ TransactionProductSummaryComponent,
7521
+ ],
7522
+ providers: [
7523
+ DictionaryService,
7524
+ TransactionService,
7525
+ OptionsService
7526
+ ],
7527
+ entryComponents: [
7528
+ IoneServiceOrderComponent
7529
+ ],
7530
+ exports: [IoneServiceOrderComponent],
7531
+ bootstrap: [IoneServiceOrderComponent]
7532
+ },] }
7533
+ ];
7534
+
5491
7535
  //export * from "./app/component/ione-transaction.module";
5492
7536
 
5493
7537
  /**
5494
7538
  * Generated bundle index. Do not edit.
5495
7539
  */
5496
7540
 
5497
- export { IoneCheckoutComponent, IoneCheckoutModule, IoneShoppingCartComponent, IoneShoppingCartModule, RetailTransactionCheckoutComponent as ɵa, CheckoutComponent as ɵb, ShoppingCartManagerComponent as ɵba, ShoppingCartComponent as ɵbb, ShoppingCartLineComponent as ɵbc, StockStatusIndicatorComponent as ɵbd, CharacteristicAnswerComponent as ɵbe, CheckoutOverviewComponent as ɵc, CheckoutOverviewBlockComponent as ɵd, CheckoutOverviewRelationEditComponent as ɵe, TransactionService as ɵf, IOneConnectorAdapterService as ɵg, CheckoutOverviewDeliveryEditComponent as ɵh, DictionaryService as ɵi, CheckoutLoginComponent as ɵj, OptionsService as ɵk, TransactionEventService as ɵl, CoreModule as ɵm, AppendPipe as ɵn, DeliveryTimePipe as ɵo, DateDurationPipe as ɵp, LocalizePipe as ɵq, CoCurrencyPipe as ɵr, SafeStylePipe as ɵs, ImageDisplayComponent as ɵt, NoImageDisplayComponent as ɵu, IconComponent as ɵv, CheckoutOverviewRelationAddressComponent as ɵw, CheckoutOverviewDeliveryAddressComponent as ɵx, CheckOutRelationSuggestionsListComponent as ɵy, CheckOutRelationSuggestionsListItemComponent as ɵz };
7541
+ export { IoneCheckoutComponent, IoneCheckoutModule, IoneServiceOrderComponent, IoneServiceOrderModule, IoneShoppingCartComponent, IoneShoppingCartModule, RetailTransactionCheckoutComponent as ɵa, CheckoutComponent as ɵb, ShoppingCartManagerComponent as ɵba, ShoppingCartComponent as ɵbb, ShoppingCartLineComponent as ɵbc, StockStatusIndicatorComponent as ɵbd, CharacteristicAnswerComponent as ɵbe, TemplateWrapperDirective as ɵbf, DefaultOkCancelButtonsComponent as ɵbg, ServiceOrderComponent as ɵbh, TransactionBaseComponent as ɵbi, TransactionArticleTextComponent as ɵbj, TransactionOrderTotalsComponent as ɵbk, TransactionOrderLineViewComponent as ɵbl, TransactionOrderLinesComponent as ɵbm, TransactionRelationAddressComponent as ɵbn, TransactionSidebarRightComponent as ɵbo, TransactionLineAccordionComponent as ɵbp, TransactionHeaderBlockComponent as ɵbq, TransactionRelationEditComponent as ɵbr, TransactionServiceSummaryComponent as ɵbs, TransactionSummaryBlockComponent as ɵbt, TransactionServiceStatusComponent as ɵbu, TransactionOrderSummaryComponent as ɵbv, TransactionPaymentInfoComponent as ɵbw, TransactionArticleSummaryComponent as ɵbx, TransactionDeliverySummaryComponent as ɵby, TransactionProductContractSummaryComponent as ɵbz, CheckoutOverviewComponent as ɵc, TransactionProductSummaryComponent as ɵca, CheckoutOverviewBlockComponent as ɵd, CheckoutOverviewRelationEditComponent as ɵe, TransactionService as ɵf, IOneConnectorAdapterService as ɵg, CheckoutOverviewDeliveryEditComponent as ɵh, DictionaryService as ɵi, CheckoutLoginComponent as ɵj, OptionsService as ɵk, TransactionEventService as ɵl, CoreModule as ɵm, AppendPipe as ɵn, DeliveryTimePipe as ɵo, DateDurationPipe as ɵp, LocalizePipe as ɵq, CoCurrencyPipe as ɵr, SafeStylePipe as ɵs, ImageDisplayComponent as ɵt, NoImageDisplayComponent as ɵu, IconComponent as ɵv, CheckoutOverviewRelationAddressComponent as ɵw, CheckoutOverviewDeliveryAddressComponent as ɵx, CheckOutRelationSuggestionsListComponent as ɵy, CheckOutRelationSuggestionsListItemComponent as ɵz };
5498
7542
  //# sourceMappingURL=colijnit-transaction.js.map