@colijnit/transaction 12.1.15 → 12.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/bundles/colijnit-transaction.umd.js +1755 -518
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.d.ts +146 -136
  4. package/colijnit-transaction.metadata.json +1 -1
  5. package/esm2015/colijnit-transaction.js +147 -137
  6. package/esm2015/lib/assets/dictionary/text.properties.js +37 -2
  7. package/esm2015/lib/component/avatar/avatar.component.js +9 -6
  8. package/esm2015/lib/component/checkout/checkout.component.js +8 -7
  9. package/esm2015/lib/component/core/base/transaction-grid-base.component.js +5 -2
  10. package/esm2015/lib/component/core/relation/customer-groups.component.js +3 -3
  11. package/esm2015/lib/component/payment/payment.component.js +112 -30
  12. package/esm2015/lib/component/payment/payment.module.js +7 -3
  13. package/esm2015/lib/component/payment-tile/payment-tile.component.js +4 -2
  14. package/esm2015/lib/component/relation-address/relation-address.component.js +3 -3
  15. package/esm2015/lib/component/transaction/transaction.component.js +7 -3
  16. package/esm2015/lib/component/transaction-confirmation-history/transaction-confirmation-history.component.js +2 -2
  17. package/esm2015/lib/component/transaction-grid/transaction-base-grid/transaction-base-grid.component.js +7 -2
  18. package/esm2015/lib/component/transaction-grid/transaction-grid/transaction-grid.component.js +3 -1
  19. package/esm2015/lib/component/transaction-grid/transaction-history-grid/transaction-history-grid.component.js +31 -14
  20. package/esm2015/lib/component/transaction-grid/transaction-history-grid/transaction-history-grid.module.js +4 -3
  21. package/esm2015/lib/component/transaction-grid/transaction-received-goods-grid/transaction-received-goods-grid.component.js +131 -17
  22. package/esm2015/lib/component/transaction-grid/transaction-received-goods-grid/transaction-received-goods-grid.module.js +5 -3
  23. package/esm2015/lib/component/transaction-header/transaction-header-delivery/transaction-header-delivery.component.js +2 -2
  24. package/esm2015/lib/component/transaction-header/transaction-header-order/transaction-header-order.component.js +6 -2
  25. package/esm2015/lib/component/transaction-header/transaction-header-payment/transaction-header-payment.component.js +19 -2
  26. package/esm2015/lib/component/transaction-header/transaction-header-payment/transaction-header-payment.module.js +6 -3
  27. package/esm2015/lib/component/transaction-history-grid-status/transaction-history-grid-status.component.js +16 -3
  28. package/esm2015/lib/component/transaction-line-side-panel/transaction-line-side-panel.component.js +20 -8
  29. package/esm2015/lib/component/transaction-line-side-panel-purchase/transaction-line-side-panel-purchase.component.js +49 -6
  30. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access/transaction-quick-access.component.js +1 -1
  31. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-received-goods/transaction-quick-access-received-goods.component.js +48 -10
  32. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-received-goods/transaction-quick-access-received-goods.module.js +4 -3
  33. package/esm2015/lib/component/transaction-receiving-goods-details/transaction-receiving-goods-details.component.js +131 -19
  34. package/esm2015/lib/component/transaction-receiving-goods-details/transaction-receiving-goods-details.module.js +5 -2
  35. package/esm2015/lib/component/transaction-receiving-goods-history/transaction-receiving-goods-history.component.js +57 -11
  36. package/esm2015/lib/component/transaction-receiving-goods-history/transaction-receiving-goods-history.module.js +6 -3
  37. package/esm2015/lib/component/transaction-search/service/filter-request.service.js +65 -22
  38. package/esm2015/lib/component/transaction-search/service/transaction-search.service.js +1 -1
  39. package/esm2015/lib/component/transaction-search/transaction-filter/transaction-filter.component.js +4 -7
  40. package/esm2015/lib/component/transaction-search/transaction-filter-content-article/transaction-filter-content-article.component.js +83 -44
  41. package/esm2015/lib/component/transaction-search/transaction-filter-content-logistics/transaction-filter-content-logistics.component.js +101 -112
  42. package/esm2015/lib/component/transaction-search/transaction-filter-content-logistics/transaction-filter-content-logistics.module.js +6 -3
  43. package/esm2015/lib/component/transaction-search/transaction-filter-content-order/transaction-filter-content-order.component.js +86 -70
  44. package/esm2015/lib/component/transaction-search/transaction-filter-historic-state/transaction-filter-historic-state.component.js +60 -0
  45. package/esm2015/lib/component/transaction-search/transaction-filter-historic-state/transaction-filter-historic-state.module.js +24 -0
  46. package/esm2015/lib/component/transaction-search/transaction-search-result/transaction-search-result.component.js +16 -6
  47. package/esm2015/lib/component/transaction-search/transaction-search-result/transaction-search-result.module.js +4 -2
  48. package/esm2015/lib/component/transaction-search/transaction-search.component.js +5 -6
  49. package/esm2015/lib/component/transaction-search/transaction-tile/transaction-tile.component.js +2 -5
  50. package/esm2015/lib/component/transaction-search-grid/transaction-search-grid.component.js +86 -0
  51. package/esm2015/lib/component/transaction-search-grid/transaction-search-grid.module.js +26 -0
  52. package/esm2015/lib/component/view-mode-buttons/view-mode-buttons.component.js +5 -3
  53. package/esm2015/lib/enum/icon.enum.js +4 -1
  54. package/esm2015/lib/enum/position-grid-row.enum.js +6 -0
  55. package/esm2015/lib/enum/status-type.enum.js +3 -1
  56. package/esm2015/lib/model/icon-svg.js +4 -1
  57. package/esm2015/lib/model/payment.viewmodel.js +6 -0
  58. package/esm2015/lib/model/received-goods-view-model.js +11 -0
  59. package/esm2015/lib/service/article-connector.service.js +113 -0
  60. package/esm2015/lib/service/article.service.js +25 -0
  61. package/esm2015/lib/service/options.service.js +3 -1
  62. package/esm2015/lib/service/payment.service.js +51 -0
  63. package/esm2015/lib/service/pending-reason.service.js +10 -6
  64. package/esm2015/lib/service/shared-connector.service.js +53 -0
  65. package/esm2015/lib/service/shared.service.js +38 -0
  66. package/esm2015/lib/service/transaction-connector.service.js +1051 -0
  67. package/esm2015/lib/service/transaction-event.service.js +29 -0
  68. package/esm2015/lib/service/transaction-image.service.js +5 -5
  69. package/esm2015/lib/service/transaction-mapping.service.js +2 -2
  70. package/esm2015/lib/service/transaction.service.js +36 -8
  71. package/fesm2015/colijnit-transaction.js +1707 -492
  72. package/fesm2015/colijnit-transaction.js.map +1 -1
  73. package/lib/component/avatar/avatar.component.d.ts +4 -2
  74. package/lib/component/core/base/components/transaction-header-block/style/_layout.scss +3 -3
  75. package/lib/component/core/base/components/transaction-header-block/style/_material-definition.scss +2 -2
  76. package/lib/component/core/base/transaction-grid-base.component.d.ts +2 -0
  77. package/lib/component/core/relation/customer-groups.component.d.ts +2 -2
  78. package/lib/component/payment/payment.component.d.ts +22 -5
  79. package/lib/component/payment/style/_layout.scss +23 -1
  80. package/lib/component/payment/style/_material-definition.scss +0 -1
  81. package/lib/component/payment/style/_theme.scss +24 -0
  82. package/lib/component/payment-tile/payment-tile.component.d.ts +1 -0
  83. package/lib/component/payment-tile/style/_layout.scss +2 -1
  84. package/lib/component/relation-address/relation-address.component.d.ts +2 -2
  85. package/lib/component/transaction/style/_material-definition.scss +1 -1
  86. package/lib/component/transaction/transaction.component.d.ts +2 -2
  87. package/lib/component/transaction-button-bar/style/_layout.scss +6 -3
  88. package/lib/component/transaction-button-bar/style/_material-definition.scss +4 -3
  89. package/lib/component/transaction-grid/transaction-base-grid/style/_theme.scss +6 -0
  90. package/lib/component/transaction-grid/transaction-grid/transaction-grid.component.d.ts +1 -0
  91. package/lib/component/transaction-grid/transaction-history-grid/style/_layout.scss +8 -0
  92. package/lib/component/transaction-grid/transaction-history-grid/style/_material-definition.scss +1 -0
  93. package/lib/component/transaction-grid/transaction-history-grid/transaction-history-grid.component.d.ts +10 -5
  94. package/lib/component/transaction-grid/transaction-received-goods-grid/transaction-received-goods-grid.component.d.ts +34 -1
  95. package/lib/component/transaction-header/transaction-header-delivery/style/_layout.scss +5 -0
  96. package/lib/component/transaction-header/transaction-header-delivery/style/_material-definition.scss +1 -0
  97. package/lib/component/transaction-header/transaction-header-delivery/style/_theme.scss +8 -0
  98. package/lib/component/transaction-header/transaction-header-order/style/_layout.scss +5 -0
  99. package/lib/component/transaction-header/transaction-header-payment/style/_layout.scss +1 -0
  100. package/lib/component/transaction-header/transaction-header-payment/transaction-header-payment.component.d.ts +2 -0
  101. package/lib/component/transaction-history-grid-status/style/_layout.scss +7 -7
  102. package/lib/component/transaction-history-grid-status/style/_material-definition.scss +8 -0
  103. package/lib/component/transaction-history-grid-status/transaction-history-grid-status.component.d.ts +2 -0
  104. package/lib/component/transaction-line/style/_layout.scss +2 -1
  105. package/lib/component/transaction-line/style/_material-definition.scss +4 -3
  106. package/lib/component/transaction-line/style/_theme.scss +5 -0
  107. package/lib/component/transaction-line-side-panel/style/_layout.scss +7 -4
  108. package/lib/component/transaction-line-side-panel/style/_material-definition.scss +1 -1
  109. package/lib/component/transaction-line-side-panel/transaction-line-side-panel.component.d.ts +8 -3
  110. package/lib/component/transaction-line-side-panel-default/style/_layout.scss +3 -0
  111. package/lib/component/transaction-line-side-panel-purchase/transaction-line-side-panel-purchase.component.d.ts +14 -1
  112. package/lib/component/transaction-quick-access/transaction-quick-access-received-goods/transaction-quick-access-received-goods.component.d.ts +24 -1
  113. package/lib/component/transaction-receiving-goods-details/style/_layout.scss +4 -4
  114. package/lib/component/transaction-receiving-goods-details/style/_material-definition.scss +3 -1
  115. package/lib/component/transaction-receiving-goods-details/transaction-receiving-goods-details.component.d.ts +27 -3
  116. package/lib/component/transaction-receiving-goods-history/transaction-receiving-goods-history.component.d.ts +14 -1
  117. package/lib/component/transaction-search/service/filter-request.service.d.ts +15 -5
  118. package/lib/component/transaction-search/style/_material-definition.scss +3 -1
  119. package/lib/component/transaction-search/transaction-filter-content-article/transaction-filter-content-article.component.d.ts +32 -9
  120. package/lib/component/transaction-search/transaction-filter-content-logistics/style/material.scss +1 -0
  121. package/lib/component/transaction-search/transaction-filter-content-logistics/transaction-filter-content-logistics.component.d.ts +11 -12
  122. package/lib/component/transaction-search/transaction-filter-content-order/transaction-filter-content-order.component.d.ts +17 -19
  123. package/lib/component/transaction-search/transaction-filter-historic-state/style/_layout.scss +9 -0
  124. package/lib/component/transaction-search/transaction-filter-historic-state/style/_material-definition.scss +0 -0
  125. package/lib/component/transaction-search/transaction-filter-historic-state/style/_theme.scss +4 -0
  126. package/lib/component/transaction-search/transaction-filter-historic-state/style/material.scss +4 -0
  127. package/lib/component/transaction-search/transaction-filter-historic-state/transaction-filter-historic-state.component.d.ts +22 -0
  128. package/lib/component/transaction-search/transaction-filter-historic-state/transaction-filter-historic-state.module.d.ts +2 -0
  129. package/lib/component/transaction-search/transaction-search-result/style/_layout.scss +6 -2
  130. package/lib/component/transaction-search/transaction-search-result/style/_theme.scss +4 -0
  131. package/lib/component/transaction-search/transaction-search-result/transaction-search-result.component.d.ts +6 -2
  132. package/lib/component/transaction-search-grid/style/_layout.scss +6 -0
  133. package/lib/component/transaction-search-grid/style/_material-definition.scss +1 -0
  134. package/lib/component/transaction-search-grid/style/_theme.scss +6 -0
  135. package/lib/component/transaction-search-grid/style/material.scss +7 -0
  136. package/lib/component/transaction-search-grid/transaction-search-grid.component.d.ts +13 -0
  137. package/lib/component/transaction-search-grid/transaction-search-grid.module.d.ts +2 -0
  138. package/lib/component/view-mode-buttons/style/_material-definition.scss +1 -1
  139. package/lib/component/view-mode-buttons/view-mode-buttons.component.d.ts +4 -3
  140. package/lib/enum/icon.enum.d.ts +3 -0
  141. package/lib/enum/position-grid-row.enum.d.ts +4 -0
  142. package/lib/enum/status-type.enum.d.ts +3 -1
  143. package/lib/model/payment.viewmodel.d.ts +6 -0
  144. package/lib/model/received-goods-view-model.d.ts +10 -0
  145. package/lib/service/article-connector.service.d.ts +20 -0
  146. package/lib/service/article.service.d.ts +6 -0
  147. package/lib/service/options.service.d.ts +1 -0
  148. package/lib/service/payment.service.d.ts +9 -0
  149. package/lib/service/pending-reason.service.d.ts +5 -3
  150. package/lib/service/shared-connector.service.d.ts +12 -0
  151. package/lib/service/shared.service.d.ts +13 -0
  152. package/lib/service/{ione-connector-adapter.service.d.ts → transaction-connector.service.d.ts} +12 -2
  153. package/lib/service/transaction-event.service.d.ts +65 -0
  154. package/lib/service/transaction-image.service.d.ts +2 -2
  155. package/lib/service/transaction.service.d.ts +15 -2
  156. package/lib/style/_variables.scss +2 -0
  157. package/lib/style/transaction-globals.scss +2 -0
  158. package/package.json +3 -3
  159. package/esm2015/lib/enum/tab-category.enum.js +0 -10
  160. package/esm2015/lib/service/ione-connector-adapter.service.js +0 -970
  161. package/lib/enum/tab-category.enum.d.ts +0 -8
@@ -7,7 +7,7 @@ import { SequenceName } from '@colijnit/transactionapi/build/enum/sequence-name.
7
7
  import { TransactionKind } from '@colijnit/transactionapi/build/enum/transaction-kind.enum';
8
8
  import { TransactionLineType } from '@colijnit/transactionapi/build/enum/transaction-line-type.enum';
9
9
  import { NULL_CUSTOMER_FULL_OBJECT, NULL_RELATION_OBJECT, NULL_RELATION_LIST_OBJECT } from '@colijnit/transactionapi/build/model/nul-relation-object';
10
- import { BehaviorSubject, throwError } from 'rxjs';
10
+ import { BehaviorSubject, throwError, Subject } from 'rxjs';
11
11
  import { TransactionInfoResponse } from '@colijnit/transactionapi/build/model/transaction-info-response.bo';
12
12
  import { CustomerFullObject } from '@colijnit/transactionapi/build/model/customer-full-object.bo';
13
13
  import { RelationPrivacySetting } from '@colijnit/transactionapi/build/model/relation-privacy-setting.bo';
@@ -42,9 +42,16 @@ import { Tag } from '@colijnit/transactionapi/build/model/tag';
42
42
  import { OnHoldCode } from '@colijnit/transactionapi/build/model/on-hold-code.bo';
43
43
  import { Warehouse } from '@colijnit/transactionapi/build/model/warehouse.bo';
44
44
  import { CodeDescription } from '@colijnit/transactionapi/build/model/code-description';
45
+ import { GoodsReceiptStatusWithHistory } from '@colijnit/transactionapi/build/model/goods-receipt-status-with-history.bo';
46
+ import { PaymentMethod } from '@colijnit/transactionapi/build/model/payment-method.bo';
45
47
  import { RelationStatus } from '@colijnit/transactionapi/build/enum/relation-status.enum';
46
48
  import { ResolveLinePendingReasonRequest } from '@colijnit/transactionapi/build/model/resolve-pending-reason-request.bo';
47
- import { FormMasterService, FormComponent, CoDialogModule, ButtonModule, InputComboBoxModule, InputTextModule, FormModule, InputRadioButtonModule, IconModule, InputCheckboxModule, InputListboxModule, DropDownModule, InputNumberPickerModule, PriceDisplayPipeModule, InputDatePickerModule, CoDialogPromptModule, MultiSelectListModule, PopupModule, CoSidebarModule, CoGridModule, CoRichTextEditorModule, Carousel3dModule, InputTextareaModule, CollapsibleModule, ColumnAlign, SimpleGridColumnDirective, InputTextComponent, SimpleGridModule, InputSearchModule, FilterItemModule, InputDateRangePickerModule } from '@colijnit/corecomponents_v12';
49
+ import { Articles } from '@colijnit/articleapi/build/articles';
50
+ import { StockLocation } from '@colijnit/articleapi/build/model/stock-location.bo';
51
+ import { ArticleLight } from '@colijnit/articleapi/build/model/article-light.bo';
52
+ import { TurnoverGroupImage } from '@colijnit/articleapi/build/model/turnover-group-image.bo';
53
+ import { MainArticle } from '@colijnit/articleapi/build/model/main-article.bo';
54
+ import { FormMasterService, FormComponent, CoDialogModule, ButtonModule, InputComboBoxModule, InputTextModule, FormModule, InputRadioButtonModule, IconModule, InputCheckboxModule, InputListboxModule, DropDownModule, InputNumberPickerModule, PriceDisplayPipeModule, InputDatePickerModule, CoDialogPromptModule, MultiSelectListModule, PopupModule, CoSidebarModule, CoGridModule, CoRichTextEditorModule, Carousel3dModule, InputTextareaModule, CollapsibleModule, ColumnAlign, SimpleGridColumnDirective, InputTextComponent, SimpleGridModule, GridToolbarButtonModule, InputSearchModule, FilterItemModule, InputDateRangePickerModule } from '@colijnit/corecomponents_v12';
48
55
  import { FlexModule } from '@angular/flex-layout';
49
56
  import { CommunicationType } from '@colijnit/transactionapi/build/enum/communication-type.enum';
50
57
  import { ContactOption } from '@colijnit/transactionapi/build/model/contact-option.bo';
@@ -56,14 +63,25 @@ import { Address } from '@colijnit/transactionapi/build/model/address.bo';
56
63
  import { trigger, state, style, transition, animate } from '@angular/animations';
57
64
  import * as i1 from '@angular/platform-browser';
58
65
  import { DomSanitizer } from '@angular/platform-browser';
59
- import { CommonModule } from '@angular/common';
66
+ import { CommonModule, DatePipe } from '@angular/common';
60
67
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
61
68
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
62
69
  import { TransactionAddTextLineRequest } from '@colijnit/transactionapi/build/model/transaction-add-text-line-request.bo';
63
70
  import { StockStatus } from '@colijnit/transactionapi/build/enum/refcode/stock-status.enum';
64
71
  import { RelationRequest } from '@colijnit/transactionapi/build/model/relation-request';
72
+ import { Sharedapi } from '@colijnit/sharedapi/build/sharedapi';
73
+ import { CoDocument } from '@colijnit/sharedapi/build/model/co-document.bo';
74
+ import { KeyPadModule } from '@colijnit/sharedcomponents';
65
75
  import { DiscountType } from '@colijnit/transactionapi/build/enum/discount-type.enum';
76
+ import { ReceiveGoodsForPurchaseOrderCorrectionRequest } from '@colijnit/transactionapi/build/model/receive-goods-for-purchase-order-correction-request.bo';
77
+ import { PurchaseOrderLineReceiptCorrectionDetails } from '@colijnit/transactionapi/build/model/purchase-order-line-receipt-correction-details.bo';
78
+ import { PurchaseOrderLineReceiptDetails } from '@colijnit/transactionapi/build/model/purchase-order-line-receipt-details.bo';
79
+ import { ReceiveGoodsForPurchaseOrderRequest } from '@colijnit/transactionapi/build/model/receive-goods-for-purchase-order-request.bo';
80
+ import { GoodsReceiptStatus } from '@colijnit/transactionapi/build/model/goods-receipt-status.bo';
66
81
  import { TransactionSearchViewRequest } from '@colijnit/transactionapi/build/model/transaction-search-view-request';
82
+ import { RelationKind } from '@colijnit/transactionapi/build/enum/relation-kind.enum';
83
+ import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article-extended-request';
84
+ import { QuantityInHistoricState } from '@colijnit/transactionapi/build/enum/quantity-in-historic-state.enum';
67
85
 
68
86
  var LanguageCode;
69
87
  (function (LanguageCode) {
@@ -144,6 +162,7 @@ class Dictionary {
144
162
  "ACCOUNT_DETAILS": "Accountgegevens",
145
163
  "ACCOUNT_EXPLANATION": "Het e-mailadres en wachtwoord zijn nodig om toegang te krijgen tot de gegevens. " +
146
164
  "Ook zullen we je via dit e-mailadres op de hoogte houden van de status van bestellingen.",
165
+ "ACTIVE": "Actief",
147
166
  "ADD_ARTICLE_LINE_UP": "Artikelregel boven toevoegen",
148
167
  "ADD_ARTICLE_LINE_DOWN": "Artikelregel onder toevoegen",
149
168
  "ADD_ARTICLE_TEXT_LINE_UP": "Tekstregel boven toevoegen",
@@ -206,6 +225,7 @@ class Dictionary {
206
225
  "CUSTOMER_NAME": "Klantnaam",
207
226
  "DATE": "Datum",
208
227
  "DATE_OF_BIRTH": "Geboortedatum",
228
+ "DEFINITIVE": "Definitief",
209
229
  "DELETE_TRANSACTION_LINE": "verwijderen",
210
230
  "DELETE_TRANSACTION_LINE_HINT": "Verwijderen transactieregel",
211
231
  "DELETE_TRANSACTION_LINE_FAILED": "Het verwijderen van de transactieregel is mislukt",
@@ -218,6 +238,7 @@ class Dictionary {
218
238
  "DELIVERY_COSTS": "Bezorgkosten",
219
239
  "DELIVERY_DATA": "Levergegevens",
220
240
  "DELIVERY_DATE": "Leverdatum",
241
+ "DELIVERY_DATE_DEFINITIVE": "Leverdatum definitief",
221
242
  "DELIVERY_DATE_FINAL": "Definitieve leverdatum",
222
243
  "DELIVERY_DIRECT": "Direct leverbaar",
223
244
  "DELIVERY_LOCATION": "Bezorgingslocatie",
@@ -250,6 +271,12 @@ class Dictionary {
250
271
  "FABRICATION_COST_LINE_TOTAL": "Fabricageprijs regeltotaal",
251
272
  "FEMALE": "Vrouw",
252
273
  "FIRST_NAME": "Voornaam",
274
+ "FREE": "Gratis",
275
+ "FULLY_ALLOCATED": "Volledig toegewezen",
276
+ "FULLY_DELIVERED": "Volledig geleverd",
277
+ "FULLY_INVOICED": "Volledig gefactureerd",
278
+ "FULLY_TO_BE_PICKED": "Volledig te picken",
279
+ "FULLY_PICKED": "Volledig gepickt",
253
280
  "GROSS_PRICE": "Bruto prijs",
254
281
  "GOOD_DESCRIPTION": "Artikelomschrijving",
255
282
  "HANDLED_BY": "Verkoper",
@@ -289,6 +316,11 @@ class Dictionary {
289
316
  "NO_IMAGE": "Geen afbeelding",
290
317
  "NOT_AFTER": "Niet later dan",
291
318
  "NOT_BEFORE": "Niet eerder dan",
319
+ "NOTHING_ALLOCATED": "Niets toegewezen",
320
+ "NOTHING_DELIVERED": "Niets geleverd",
321
+ "NOTHING_INVOICED": "Niets gefactureerd",
322
+ "NOTHING_TO_BE_PICKED": "Niets te picken",
323
+ "NOTHING_PICKED": "Niets gepickt",
292
324
  "NR": "Nummer",
293
325
  "NUMBER": "Aantal",
294
326
  "ON_DATE": "Op datum",
@@ -305,6 +337,7 @@ class Dictionary {
305
337
  "ORDER_RULESET": "Orderregelset",
306
338
  "ORDER_TOTAL": "Ordertotaal",
307
339
  "ORDER_TYPE": "Type bestelling",
340
+ "ORDERED": "Besteld",
308
341
  "OTHER": "Overig",
309
342
  "OVERVIEW": "Overzicht",
310
343
  "OWN_REFERENCE": "Eigen referentie",
@@ -312,9 +345,15 @@ class Dictionary {
312
345
  "PAID_DOWN2": "Aanbetaald",
313
346
  "PART_DELIVERY": "Deellevering",
314
347
  "PART_DELIVERIES": "Deelleveringen",
348
+ "PARTLY_ALLOCATED": "Gedeeltelijk toegewezen",
349
+ "PARTLY_DELIVERED": "Gedeeltelijk geleverd",
350
+ "PARTLY_INVOICED": "Gedeeltelijk gefactureerd",
351
+ "PARTLY_TO_BE_PICKED": "Gedeeltelijk te picken",
352
+ "PARTLY_PICKED": "Gedeeltelijk gepickt",
315
353
  "PASSWORD": "Wachtwoord",
316
354
  "PAY": "Betalen",
317
355
  "PAYMENT": "Betaling",
356
+ "PAYMENT_METHOD": "Betaalmethode",
318
357
  "PERSONAL_DATA": "Basisgegevens",
319
358
  "PICKED": "Gepickt",
320
359
  "PHONE_NO": "Telefoonnummer",
@@ -354,6 +393,8 @@ class Dictionary {
354
393
  "SEARCH_IN_COLLECTION": "Zoek binnen collectie...",
355
394
  "SEARCH_ADD_ARTICLE": "Zoeken en toevoegen artikel",
356
395
  "SELECT": "Selecteren",
396
+ "SELECT_A": "Selecteer een",
397
+ "SELECT_CASH_REGISTER": "Selecteer kassa",
357
398
  "SELECT_DATE": "Selecteer een start- en einddatum",
358
399
  "SERIAL_NUMBER": "Serienummer",
359
400
  "SERVICE_NUMBER": "Servicenummer",
@@ -378,13 +419,15 @@ class Dictionary {
378
419
  "STREET": "Straatnaam",
379
420
  "TAGS": "Tags",
380
421
  "TEXT_ARTICLE_BOUND": "Text bij artikel |~",
422
+ "TO_REPORT_IN": 'Binnen te melden',
381
423
  "TO_BE_PICKED": "Te picken",
382
424
  "TO_DELIVER": "Te leveren",
425
+ "TO_PAY": "Te betalen",
383
426
  "TOTAL_AMOUNT": "Totaalbedrag",
384
427
  "TOTAL_ASSEMBLY_TIME": "Totale montagetijd",
385
428
  "TOTAL_GROSS": "Totaal bruto",
386
429
  "TOTAL_LINE_DISCOUNT": "Totale regelkorting",
387
- "TRANSACTION_DATE": "Transactiedatum",
430
+ "TRANSACTION_DATE": "Orderdatum",
388
431
  "TRANSACTION_DISCOUNT": "Totale transactie korting",
389
432
  "TRANSACTION_DISCOUNT_PERC": "% Trans. korting",
390
433
  "TRANSACTION_PRICE_DECLARATION": "Order prijsverklaring",
@@ -414,6 +457,7 @@ class Dictionary {
414
457
  "en": {
415
458
  "ACCOUNT_DETAILS": "Account details",
416
459
  "ACCOUNT_EXPLANATION": "E-mailaddress and password are needed to gain access to the data. We also notify you on this e-mailaddress about the order status",
460
+ "ACTIVE": "Active",
417
461
  "ADD_ARTICLE_LINE_UP": "Add article line up",
418
462
  "ADD_ARTICLE_LINE_DOWN": "Add article line down",
419
463
  "ADD_ARTICLE_TEXT_LINE_UP": "Add text line up",
@@ -474,6 +518,7 @@ class Dictionary {
474
518
  "CUSTOMER_NAME": "Customer name",
475
519
  "DATE": "Date",
476
520
  "DATE_OF_BIRTH": "Date of birth",
521
+ "DEFINITIVE": "Definitive",
477
522
  "DELETE_TRANSACTION_LINE": "Delete transaction line verwijderen?",
478
523
  "DELETE_TRANSACTION_LINE_HINT": "Delete transaction line",
479
524
  "DELETE_TRANSACTION_LINE_FAILED": "Deletion of transaction line has failed",
@@ -485,6 +530,7 @@ class Dictionary {
485
530
  "DELIVERY_COSTS": "Delivery costs",
486
531
  "DELIVERY_DATA": "Deliverydata",
487
532
  "DELIVERY_DATE": "Delivery date",
533
+ "DELIVERY_DATE_DEFINITIVE": "Delivery date definitive",
488
534
  "DELIVERY_DATE_FINAL": "Final delivery date",
489
535
  "DELIVERY_DIRECT": "Direct delivery",
490
536
  "DELIVERY_LOCATION": "Delivery location",
@@ -516,6 +562,7 @@ class Dictionary {
516
562
  "FABRICATION_COST_LINE_TOTAL": "Fabricationcost linetotal",
517
563
  "FEMALE": "Female",
518
564
  "FIRST_NAME": "First name",
565
+ "FREE": "Free",
519
566
  "GOOD_DESCRIPTION": "Article description",
520
567
  "GROSS_PRICE": "Gross price",
521
568
  "HANDLED_BY": "Handled by",
@@ -571,6 +618,7 @@ class Dictionary {
571
618
  "ORDER_RULESET": "Orderruleset",
572
619
  "ORDER_TOTAAL": "Order total",
573
620
  "ORDER_TYPE": "Order type",
621
+ "ORDERED": "Ordered",
574
622
  "OTHER": "Other",
575
623
  "OVERVIEW": "Overview",
576
624
  "OWN_REFERENCE": "Own reference",
@@ -581,6 +629,7 @@ class Dictionary {
581
629
  "PASSWORD": "Password",
582
630
  "PAY": "Pay",
583
631
  "PAYMENT": "Payment",
632
+ "PAYMENT_METHOD": "Payment method",
584
633
  "PERSONAL_DATA": "Personal data",
585
634
  "PHONE_NO": "Telephone number",
586
635
  "PLANNING": "Planning",
@@ -611,6 +660,8 @@ class Dictionary {
611
660
  "SEARCH_ADD_ARTICLE": "Search and add article",
612
661
  "SEARCH_IN_COLLECTION": "Search in collection...",
613
662
  "SELECT": "Select",
663
+ "SELECT_A": "Select a",
664
+ "SELECT_CASH_REGISTER": "Select cash register",
614
665
  "SELECT_DATE_RANGE": "Select a date range",
615
666
  "SERIAL_NUMBER": "Serial number",
616
667
  "SERVICE_NUMBER": "Service number",
@@ -634,8 +685,10 @@ class Dictionary {
634
685
  "STATE": "STATUS",
635
686
  "STREET": "Streetname",
636
687
  "TAGS": "Tags",
688
+ "TO_REPORT_IN": 'To report in',
637
689
  "TO_BE_PICKED": "Te be picked",
638
690
  "TO_DELIVER": "To deliver",
691
+ "TO_PAY": "To pay",
639
692
  "TOTAL_AMOUNT": "Total amount",
640
693
  "TOTAL_ASSEMBLY_TIME": "Total assembly time",
641
694
  "TOTAL_GROSS": "Gross total",
@@ -742,6 +795,7 @@ DictionaryService.ctorParameters = () => [];
742
795
  class OptionsService {
743
796
  constructor(_dictionary) {
744
797
  this._dictionary = _dictionary;
798
+ this.optionsInitialized = new BehaviorSubject(false);
745
799
  this.optionsLoaded = new BehaviorSubject(false);
746
800
  }
747
801
  set options(value) {
@@ -788,6 +842,7 @@ class OptionsService {
788
842
  if (options) {
789
843
  yield this.createSettingsFromObject(options);
790
844
  yield this._dictionary.setDictionary(this.options.languageCode);
845
+ this.optionsInitialized.next(true);
791
846
  }
792
847
  });
793
848
  }
@@ -1497,7 +1552,7 @@ CollectionCacheService.decorators = [
1497
1552
  },] }
1498
1553
  ];
1499
1554
 
1500
- class IOneConnectorAdapterService {
1555
+ class TransactionConnectorService {
1501
1556
  constructor(_optionsService, _collectionService) {
1502
1557
  this._optionsService = _optionsService;
1503
1558
  this._collectionService = _collectionService;
@@ -1507,6 +1562,7 @@ class IOneConnectorAdapterService {
1507
1562
  connect() {
1508
1563
  return __awaiter(this, void 0, void 0, function* () {
1509
1564
  this.connector = new Transaction(this._optionsService.options);
1565
+ this._optionsService.options.session = this.connector.session;
1510
1566
  });
1511
1567
  }
1512
1568
  getArticleFullObject(goodId) {
@@ -1562,18 +1618,6 @@ class IOneConnectorAdapterService {
1562
1618
  });
1563
1619
  });
1564
1620
  }
1565
- getDocumentContent(id, thumbnail = true) {
1566
- return new Promise((resolve, reject) => {
1567
- return this.connector.getDocumentContent(id, thumbnail).then((result) => {
1568
- if (result.validationResult && result.validationResult.success) {
1569
- resolve(result.resultObject.documentContent);
1570
- }
1571
- else {
1572
- reject(result.validationMessagesAsString);
1573
- }
1574
- });
1575
- });
1576
- }
1577
1621
  getCountries() {
1578
1622
  if (this._countryList.length > 0) {
1579
1623
  return new Promise((resolve) => {
@@ -2199,6 +2243,19 @@ class IOneConnectorAdapterService {
2199
2243
  });
2200
2244
  });
2201
2245
  }
2246
+ getPaymentMethods() {
2247
+ return __awaiter(this, void 0, void 0, function* () {
2248
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
2249
+ const result = yield this.connector.getPaymentMethods();
2250
+ if (result.validationResult && result.validationResult.success) {
2251
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(PaymentMethod, result.resultObjects));
2252
+ }
2253
+ else {
2254
+ reject(result.validationMessagesAsString);
2255
+ }
2256
+ }));
2257
+ });
2258
+ }
2202
2259
  changeTransactionLineCommissionCode(uuid, lineUuid, code) {
2203
2260
  return __awaiter(this, void 0, void 0, function* () {
2204
2261
  const request = {
@@ -2425,14 +2482,91 @@ class IOneConnectorAdapterService {
2425
2482
  }
2426
2483
  });
2427
2484
  }
2485
+ createOutstandingEntry(uuid, amount) {
2486
+ return __awaiter(this, void 0, void 0, function* () {
2487
+ const request = {
2488
+ transUUID: uuid,
2489
+ amount: amount
2490
+ };
2491
+ const response = yield this.connector.createOutstandingEntry(request);
2492
+ if (response && response.validationResult && response.validationResult.success) {
2493
+ console.log(response);
2494
+ }
2495
+ else {
2496
+ return Promise.reject(response.validationMessagesAsString);
2497
+ }
2498
+ });
2499
+ }
2500
+ registerSalesOrderPayment(uuid, amount, currencyCode, paymentMethod, cashRegisterGroupId) {
2501
+ return __awaiter(this, void 0, void 0, function* () {
2502
+ const request = {
2503
+ transUUID: uuid,
2504
+ amount: amount,
2505
+ currencyCode: currencyCode,
2506
+ paymentMethodCode: paymentMethod,
2507
+ cashRegisterGroupId: cashRegisterGroupId
2508
+ };
2509
+ const response = yield this.connector.registerSalesOrderPayment(request);
2510
+ if (response && response.validationResult && response.validationResult.success) {
2511
+ console.log(response);
2512
+ }
2513
+ else {
2514
+ return Promise.reject(response.validationMessagesAsString);
2515
+ }
2516
+ });
2517
+ }
2518
+ getGoodsReceiptStatus(transId, lineNr) {
2519
+ return __awaiter(this, void 0, void 0, function* () {
2520
+ const response = yield this.connector.getGoodsReceiptStatus(transId, lineNr);
2521
+ if (response && response.validationResult && response.validationResult.success) {
2522
+ return this._boFactory.makeWithRawBackendData(GoodsReceiptStatusWithHistory, response.resultObject);
2523
+ }
2524
+ else {
2525
+ return Promise.reject(response.validationMessagesAsString);
2526
+ }
2527
+ });
2528
+ }
2529
+ getGoodsReceiptStatusWithHistory(transId, lineNr) {
2530
+ return __awaiter(this, void 0, void 0, function* () {
2531
+ const response = yield this.connector.getGoodsReceiptStatusWithHistory(transId, lineNr);
2532
+ if (response && response.validationResult && response.validationResult.success) {
2533
+ return this._boFactory.makeWithRawBackendData(GoodsReceiptStatusWithHistory, response.resultObject);
2534
+ }
2535
+ else {
2536
+ return Promise.reject(response.validationMessagesAsString);
2537
+ }
2538
+ });
2539
+ }
2540
+ receiveGoodsForPurchaseOrder(request) {
2541
+ return __awaiter(this, void 0, void 0, function* () {
2542
+ const response = yield this.connector.receiveGoodsForPurchaseOrder(request);
2543
+ if (response && response.validationResult && response.validationResult.success) {
2544
+ return this._boFactory.makeWithRawBackendData(TransactionInfoResponse, response.resultObject);
2545
+ }
2546
+ else {
2547
+ return Promise.reject(response.validationMessagesAsString);
2548
+ }
2549
+ });
2550
+ }
2551
+ receiveGoodsForPurchaseOrderCorrection(request) {
2552
+ return __awaiter(this, void 0, void 0, function* () {
2553
+ const response = yield this.connector.receiveGoodsForPurchaseOrderCorrection(request);
2554
+ if (response && response.validationResult && response.validationResult.success) {
2555
+ return this._boFactory.makeWithRawBackendData(TransactionInfoResponse, response.resultObject);
2556
+ }
2557
+ else {
2558
+ return Promise.reject(response.validationMessagesAsString);
2559
+ }
2560
+ });
2561
+ }
2428
2562
  }
2429
- IOneConnectorAdapterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IOneConnectorAdapterService_Factory() { return new IOneConnectorAdapterService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(CollectionCacheService)); }, token: IOneConnectorAdapterService, providedIn: "root" });
2430
- IOneConnectorAdapterService.decorators = [
2563
+ TransactionConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionConnectorService_Factory() { return new TransactionConnectorService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(CollectionCacheService)); }, token: TransactionConnectorService, providedIn: "root" });
2564
+ TransactionConnectorService.decorators = [
2431
2565
  { type: Injectable, args: [{
2432
2566
  providedIn: "root"
2433
2567
  },] }
2434
2568
  ];
2435
- IOneConnectorAdapterService.ctorParameters = () => [
2569
+ TransactionConnectorService.ctorParameters = () => [
2436
2570
  { type: OptionsService },
2437
2571
  { type: CollectionCacheService }
2438
2572
  ];
@@ -2580,11 +2714,112 @@ DialogService.ctorParameters = () => [
2580
2714
  { type: Injector }
2581
2715
  ];
2582
2716
 
2717
+ class ArticleConnectorService {
2718
+ constructor(_optionsService, _collectionService) {
2719
+ this._optionsService = _optionsService;
2720
+ this._collectionService = _collectionService;
2721
+ this._boFactory = new BusinessObjectFactory();
2722
+ this._optionsService.optionsInitialized.subscribe((initialized) => {
2723
+ if (initialized) {
2724
+ this.connect();
2725
+ }
2726
+ });
2727
+ }
2728
+ connect() {
2729
+ return __awaiter(this, void 0, void 0, function* () {
2730
+ this.connector = new Articles(this._optionsService.options);
2731
+ });
2732
+ }
2733
+ getWarehouseLocations(warehouseNr) {
2734
+ return __awaiter(this, void 0, void 0, function* () {
2735
+ return new Promise((resolve, reject) => {
2736
+ const collection = this._collectionService.getCollection(StockLocation.name, [warehouseNr]);
2737
+ if (collection) {
2738
+ resolve(collection);
2739
+ }
2740
+ else {
2741
+ return this.connector.getStockManagementLocations(warehouseNr).then((response) => {
2742
+ if (response && response.validationResult && response.validationResult.success) {
2743
+ const collection = this._boFactory.makeBOArrayFromRawBackendDataArray(StockLocation, response.resultObjects);
2744
+ this._collectionService.cacheCollection(StockLocation.name, collection, [warehouseNr]);
2745
+ resolve(collection);
2746
+ }
2747
+ else {
2748
+ reject(response.validationMessagesAsString);
2749
+ }
2750
+ });
2751
+ }
2752
+ });
2753
+ });
2754
+ }
2755
+ searchArticles(request) {
2756
+ return __awaiter(this, void 0, void 0, function* () {
2757
+ return new Promise((resolve, reject) => {
2758
+ return this.connector.searchArticlesLight(request).then((response) => {
2759
+ if (response && response.validationResult && response.validationResult.success) {
2760
+ const collection = this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleLight, response.resultObjects);
2761
+ resolve(collection);
2762
+ }
2763
+ else {
2764
+ reject(response.validationMessagesAsString);
2765
+ }
2766
+ });
2767
+ });
2768
+ });
2769
+ }
2770
+ getMainArticles() {
2771
+ return __awaiter(this, void 0, void 0, function* () {
2772
+ return new Promise((resolve, reject) => {
2773
+ return this.connector.getMainArticles().then((response) => {
2774
+ if (response && response.validationResult && response.validationResult.success) {
2775
+ const collection = this._boFactory.makeBOArrayFromRawBackendDataArray(MainArticle, response.resultObjects);
2776
+ resolve(collection);
2777
+ }
2778
+ else {
2779
+ reject(response.validationMessagesAsString);
2780
+ }
2781
+ });
2782
+ });
2783
+ });
2784
+ }
2785
+ getTurnoverGroups(category) {
2786
+ return __awaiter(this, void 0, void 0, function* () {
2787
+ return new Promise((resolve, reject) => {
2788
+ const collection = this._collectionService.getCollection(TurnoverGroupImage.name);
2789
+ if (collection) {
2790
+ return resolve(collection);
2791
+ }
2792
+ return this.connector.getTurnoverGroups(category).then((result) => {
2793
+ if (result.validationResult && result.validationResult.success) {
2794
+ const collection = this._boFactory.makeBOArrayFromRawBackendDataArray(TurnoverGroupImage, result.resultObjects);
2795
+ this._collectionService.cacheCollection(TurnoverGroupImage.name, collection);
2796
+ resolve(collection);
2797
+ }
2798
+ else {
2799
+ reject(result.validationMessagesAsString);
2800
+ }
2801
+ });
2802
+ });
2803
+ });
2804
+ }
2805
+ }
2806
+ ArticleConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ArticleConnectorService_Factory() { return new ArticleConnectorService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(CollectionCacheService)); }, token: ArticleConnectorService, providedIn: "root" });
2807
+ ArticleConnectorService.decorators = [
2808
+ { type: Injectable, args: [{
2809
+ providedIn: "root"
2810
+ },] }
2811
+ ];
2812
+ ArticleConnectorService.ctorParameters = () => [
2813
+ { type: OptionsService },
2814
+ { type: CollectionCacheService }
2815
+ ];
2816
+
2583
2817
  class PendingReasonService {
2584
- constructor(dialogService, options, connector) {
2818
+ constructor(dialogService, options, connector, articleConnector) {
2585
2819
  this.dialogService = dialogService;
2586
2820
  this.options = options;
2587
2821
  this.connector = connector;
2822
+ this.articleConnector = articleConnector;
2588
2823
  this.transactionUpdated = new BehaviorSubject(undefined);
2589
2824
  this.applicationUser = false;
2590
2825
  this.currentTransaction = new TransactionInfoResponse();
@@ -2715,7 +2950,7 @@ class PendingReasonService {
2715
2950
  });
2716
2951
  }
2717
2952
  }
2718
- PendingReasonService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PendingReasonService_Factory() { return new PendingReasonService(i0.ɵɵinject(DialogService), i0.ɵɵinject(OptionsService), i0.ɵɵinject(IOneConnectorAdapterService)); }, token: PendingReasonService, providedIn: "root" });
2953
+ PendingReasonService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PendingReasonService_Factory() { return new PendingReasonService(i0.ɵɵinject(DialogService), i0.ɵɵinject(OptionsService), i0.ɵɵinject(TransactionConnectorService), i0.ɵɵinject(ArticleConnectorService)); }, token: PendingReasonService, providedIn: "root" });
2719
2954
  PendingReasonService.decorators = [
2720
2955
  { type: Injectable, args: [{
2721
2956
  providedIn: "root"
@@ -2724,7 +2959,8 @@ PendingReasonService.decorators = [
2724
2959
  PendingReasonService.ctorParameters = () => [
2725
2960
  { type: DialogService },
2726
2961
  { type: OptionsService },
2727
- { type: IOneConnectorAdapterService }
2962
+ { type: TransactionConnectorService },
2963
+ { type: ArticleConnectorService }
2728
2964
  ];
2729
2965
 
2730
2966
  class TransactionService extends PendingReasonService {
@@ -3027,12 +3263,21 @@ class TransactionService extends PendingReasonService {
3027
3263
  getInOutCollection(languageCode) {
3028
3264
  return this.connector.getInOutCollection(languageCode);
3029
3265
  }
3266
+ getTurnoverGroups() {
3267
+ return this.articleConnector.getTurnoverGroups();
3268
+ }
3030
3269
  getTransactionArticleWarehouses(goodId) {
3031
3270
  return this.connector.getTransactionArticleWarehouses(goodId);
3032
3271
  }
3033
3272
  getMarketingCodes() {
3034
3273
  return this.connector.getMarketingCodes();
3035
3274
  }
3275
+ getArticles(request) {
3276
+ return this.articleConnector.searchArticles(request);
3277
+ }
3278
+ getMainArticles() {
3279
+ return this.articleConnector.getMainArticles();
3280
+ }
3036
3281
  insertCustomer(relation) {
3037
3282
  return this.connector.insertCustomer(relation);
3038
3283
  }
@@ -3055,6 +3300,7 @@ class TransactionService extends PendingReasonService {
3055
3300
  getDeliveryOptions() {
3056
3301
  return this.connector.getDeliveryOptions();
3057
3302
  }
3303
+ // todo: move to relation api?
3058
3304
  getRelationListObjects(relationRequest) {
3059
3305
  return this.connector.getRelationListObjects(relationRequest);
3060
3306
  }
@@ -3207,6 +3453,26 @@ class TransactionService extends PendingReasonService {
3207
3453
  // const response: boolean = await this.connector.setRelationByUser(this.currentTransaction.uuid, username, password);
3208
3454
  // return response;
3209
3455
  // }
3456
+ getGoodsReceiptStatus(transId, lineNr) {
3457
+ return __awaiter(this, void 0, void 0, function* () {
3458
+ return yield this.connector.getGoodsReceiptStatus(transId, lineNr);
3459
+ });
3460
+ }
3461
+ getGoodsReceiptStatusWithHistory(transId, lineNr) {
3462
+ return __awaiter(this, void 0, void 0, function* () {
3463
+ return yield this.connector.getGoodsReceiptStatusWithHistory(transId, lineNr);
3464
+ });
3465
+ }
3466
+ receiveGoodsForPurchaseOrder(request) {
3467
+ return __awaiter(this, void 0, void 0, function* () {
3468
+ return yield this.connector.receiveGoodsForPurchaseOrder(request);
3469
+ });
3470
+ }
3471
+ receiveGoodsForPurchaseOrderCorrection(request) {
3472
+ return __awaiter(this, void 0, void 0, function* () {
3473
+ return yield this.connector.receiveGoodsForPurchaseOrderCorrection(request);
3474
+ });
3475
+ }
3210
3476
  getTextTypes(languageCode) {
3211
3477
  return this.connector.getTextTypes(languageCode);
3212
3478
  }
@@ -3216,17 +3482,14 @@ class TransactionService extends PendingReasonService {
3216
3482
  getArticleFullObject(goodId) {
3217
3483
  return this.connector.getArticleFullObject(goodId);
3218
3484
  }
3219
- getDocumentContent(id) {
3220
- return this.connector.getDocumentContent(id);
3221
- }
3222
3485
  getGoodIdFromArticleNr(sku) {
3223
3486
  return this.connector.getGoodIdFromArticleNr(sku);
3224
3487
  }
3225
3488
  getCountry(countryCode) {
3226
3489
  return this.connector.getCountry(countryCode);
3227
3490
  }
3228
- getCashRegisters() {
3229
- return this.connector.getCashRegisters(undefined, 1);
3491
+ getCashRegisters(branch, group) {
3492
+ return this.connector.getCashRegisters(branch, group);
3230
3493
  }
3231
3494
  getRelationNumber(relationId) {
3232
3495
  return this.connector.getRelationNumber(relationId);
@@ -3285,7 +3548,7 @@ class TransactionService extends PendingReasonService {
3285
3548
  });
3286
3549
  }
3287
3550
  }
3288
- TransactionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionService_Factory() { return new TransactionService(i0.ɵɵinject(DialogService), i0.ɵɵinject(OptionsService), i0.ɵɵinject(IOneConnectorAdapterService)); }, token: TransactionService, providedIn: "root" });
3551
+ TransactionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionService_Factory() { return new TransactionService(i0.ɵɵinject(DialogService), i0.ɵɵinject(OptionsService), i0.ɵɵinject(TransactionConnectorService), i0.ɵɵinject(ArticleConnectorService)); }, token: TransactionService, providedIn: "root" });
3289
3552
  TransactionService.decorators = [
3290
3553
  { type: Injectable, args: [{
3291
3554
  providedIn: "root"
@@ -3313,7 +3576,7 @@ class CheckoutComponent {
3313
3576
  return __awaiter(this, void 0, void 0, function* () {
3314
3577
  if (this.checkoutRelation && this.stepRelation) {
3315
3578
  const valid = this.checkoutRelation.submit();
3316
- this.stepRelation.completed = yield this.saveRelation();
3579
+ this.stepRelation.completed = true; // await this.saveRelation();
3317
3580
  // if (valid) {
3318
3581
  // this.saveRelation();
3319
3582
  // }
@@ -3324,7 +3587,7 @@ class CheckoutComponent {
3324
3587
  return __awaiter(this, void 0, void 0, function* () {
3325
3588
  if (this.checkoutDelivery && this.stepDelivery) {
3326
3589
  const valid = this.checkoutDelivery.submit();
3327
- this.stepDelivery.completed = yield this.handleSaveDelivery();
3590
+ this.stepDelivery.completed = true; // await this.handleSaveDelivery();
3328
3591
  // if (valid) {
3329
3592
  // this.handleSaveDelivery();
3330
3593
  // }
@@ -3382,12 +3645,13 @@ CheckoutComponent.decorators = [
3382
3645
  [transaction]="service.currentTransaction"
3383
3646
  ></co-checkout-overview-delivery-edit>
3384
3647
  </co-stepper-step>
3385
- <co-stepper-step #stepPayment [index]="3" [label]="'PAYMENT' | localize" (validateStep)="handlePaymentValidation()">
3386
- <co-payment #checkoutPayment *ngIf="stepPayment.show" [amount]="service.currentTransaction.transactionTotal.netAmount"></co-payment>
3387
- </co-stepper-step>
3388
3648
  <co-stepper-step #stepOverview [index]="4" [label]="'OVERVIEW' | localize" (validateStep)="handleOverviewValidation()">
3389
3649
  </co-stepper-step>
3390
- <co-stepper-step #stepPay [index]="5" [label]="'PAY' | localize">
3650
+ <co-stepper-step #stepPayment [index]="3" [label]="'PAYMENT' | localize" (validateStep)="handlePaymentValidation()">
3651
+ <co-payment #checkoutPayment *ngIf="stepPayment.show"
3652
+ [transactionUuid]="service.currentTransaction.transactionInfo.uuid"
3653
+ [amount]="service.currentTransaction.transactionTotal.netAmount"
3654
+ ></co-payment>
3391
3655
  </co-stepper-step>
3392
3656
  <div class="co-checkout-right-panel">
3393
3657
  <div class="co-checkout-right-panel-relation">
@@ -3428,8 +3692,10 @@ var Icon;
3428
3692
  Icon["Article"] = "article";
3429
3693
  Icon["Barcode"] = "barcode";
3430
3694
  Icon["BarcodeSolid"] = "barcode_solid";
3695
+ Icon["BarsFilter"] = "bars_filter";
3431
3696
  Icon["CalendarDay"] = "calendar_day";
3432
3697
  Icon["Cancel"] = "cancel";
3698
+ Icon["CartCheck"] = "cart_check";
3433
3699
  Icon["CartFlatbedBoxesSolid"] = "cart_flatbed_boxes_solid";
3434
3700
  Icon["CartShoppingSolid"] = "cart_shopping_solid";
3435
3701
  Icon["CashRegister"] = "cash_register";
@@ -3452,6 +3718,7 @@ var Icon;
3452
3718
  Icon["Tag"] = "tag";
3453
3719
  Icon["ThickLines"] = "thick_lines";
3454
3720
  Icon["ThinLines"] = "thin_lines";
3721
+ Icon["TrashBin"] = "trash_bin";
3455
3722
  Icon["TriangleDown"] = "triangle_down";
3456
3723
  Icon["TriangleUp"] = "triangle_up";
3457
3724
  Icon["Truck"] = "truck";
@@ -3989,8 +4256,10 @@ const IconSvg = {
3989
4256
  "article": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M37.43,15.14H12.57A2.57,2.57,0,0,0,10,17.71V32.29a2.57,2.57,0,0,0,2.57,2.57H37.43A2.57,2.57,0,0,0,40,32.29V17.71A2.57,2.57,0,0,0,37.43,15.14ZM14.29,32.71H12.15V17.29h2.14Zm2,0H15V17.29h1.29Zm2.57,0H17.54V17.29h1.29Zm3.52,0H20.2V17.29h2.15Zm2,0H23.11V17.29H24.4Zm2.06,0H25.17V17.29h1.29Zm2.66,0H27.83V17.29h1.29Zm3.51,0H31.34V17.29h1.29Zm3.34,0H33.4V17.29H36Zm2.32,0H37V17.29h1.29Z\" fill=\"#484f60\"/></svg>",
3990
4257
  "barcode": "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M2,6H4V18H2V6M5,6H6V18H5V6M7,6H10V18H7V6M11,6H12V18H11V6M14,6H16V18H14V6M17,6H20V18H17V6M21,6H22V18H21V6Z\" /></svg>",
3991
4258
  "barcode_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M40 32C53.25 32 64 42.75 64 56V456C64 469.3 53.25 480 40 480H24C10.75 480 0 469.3 0 456V56C0 42.75 10.75 32 24 32H40zM128 48V464C128 472.8 120.8 480 112 480C103.2 480 96 472.8 96 464V48C96 39.16 103.2 32 112 32C120.8 32 128 39.16 128 48zM200 32C213.3 32 224 42.75 224 56V456C224 469.3 213.3 480 200 480H184C170.7 480 160 469.3 160 456V56C160 42.75 170.7 32 184 32H200zM296 32C309.3 32 320 42.75 320 56V456C320 469.3 309.3 480 296 480H280C266.7 480 256 469.3 256 456V56C256 42.75 266.7 32 280 32H296zM448 56C448 42.75 458.7 32 472 32H488C501.3 32 512 42.75 512 56V456C512 469.3 501.3 480 488 480H472C458.7 480 448 469.3 448 456V56zM384 48C384 39.16 391.2 32 400 32C408.8 32 416 39.16 416 48V464C416 472.8 408.8 480 400 480C391.2 480 384 472.8 384 464V48z\"/></svg>",
4259
+ "bars_filter": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path d=\"M264 392H183.1C170.8 392 160 402.8 160 415.1C160 429.2 170.8 440 183.1 440h80C277.2 440 288 429.2 288 416C288 402.8 277.2 392 264 392zM424 72H23.1C10.8 72 0 82.8 0 95.1S10.8 120 23.1 120H424c13.2 0 24-10.8 24-23.1S437.2 72 424 72zM360 232H87.1C74.8 232 64 242.8 64 255.1C64 269.2 74.8 280 87.1 280h272C373.2 280 384 269.2 384 256C384 242.8 373.2 232 360 232z\"/></svg>",
3992
4260
  "calendar_day": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 50\" enable-background=\"new 0 0 50 50\" ><g><path fill=\"#022D42\" d=\"M35.4,13.7H14.6c-0.6,0-1,0.5-1,1V20h22.9v-5.2C36.4,14.2,36,13.7,35.4,13.7z M19,18.8c-1,0-1.8-0.8-1.8-1.8c0-1,0.8-1.8,1.8-1.8c1,0,1.8,0.8,1.8,1.8C20.8,18,20,18.8,19,18.8z M31,18.8c-1,0-1.8-0.8-1.8-1.8c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8C32.7,18,32,18.8,31,18.8z\"/><path fill=\"#022D42\" d=\"M35.4,22.3v12.6L31.3,39H14.6c0,0,0,0,0,0V22.3H35.4 M36.4,21.3H13.6V39c0,0.6,0.5,1,1,1h17.2l4.7-4.7V21.3L36.4,21.3z\"/><rect x=\"18.2\" y=\"10\" fill=\"#022D42\" width=\"1.6\" height=\"5.2\"/><rect x=\"30.2\" y=\"10\" fill=\"#022D42\" width=\"1.6\" height=\"5.2\"/><rect x=\"18.6\" y=\"30.5\" fill=\"#022D42\" width=\"3.4\" height=\"3.4\"/><rect x=\"19.1\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"19.1\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"19.1\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/></g></svg>",
3993
4261
  "cancel": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"36 35.16 30.45 35.16 14 14.84 19.55 14.84 36 35.16\" fill=\"#484f60\"/><polygon points=\"14 35.16 19.55 35.16 36 14.84 30.45 14.84 14 35.16\" fill=\"#484f60\"/></svg>",
4262
+ "cart_check": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><g ><g ><g><g opacity=\".75\"><path d=\"M16.58,29.12c-.99,0-1.8,.81-1.8,1.8s.81,1.8,1.8,1.8,1.8-.81,1.8-1.8-.81-1.8-1.8-1.8Z\" fill=\"#484f60\"/><path d=\"M16.51,24.98c-.67,0-1.38-.52-1.57-1.16l-2.31-5.61c-.19-.64,.19-1.22,.86-1.28l19.71-2.51c.67-.06,1.12,.42,1,1.08l-.89,3.99c.66,.15,1.3,.36,1.91,.63l1.38-6.84c.12-.66-.34-1.15-1-1.08l-24.68,2.93c-.67,.06-1.06,.64-.87,1.28l3.34,9.44c.19,.64,.89,1.17,1.56,1.17h5.92c.19-.71,.45-1.38,.77-2.02h-5.13Z\" fill=\"#484f60\"/><path d=\"M39.01,11.31c-.66,.14-1.27,.79-1.37,1.46l-.42,2.9c-.1,.66,.31,.98,.9,.7,.59-.28,1.19-1.04,1.33-1.7l.51-2.42c.14-.66-.28-1.08-.94-.94h-.02Z\" fill=\"#484f60\"/></g><g><path d=\"M31,21.72c4.41,0,8,3.59,8,8s-3.59,8-8,8-8-3.59-8-8,3.59-8,8-8m0-1c-4.97,0-9,4.03-9,9s4.03,9,9,9,9-4.03,9-9-4.03-9-9-9h0Z\" fill=\"#484f60\"/><polygon points=\"30.63 34.72 26.79 29.33 28.31 28.25 30.34 31.11 33.54 24.72 35.21 25.55 30.63 34.72\" fill=\"#484f60\"/></g></g></g></g><g /></svg>",
3994
4263
  "cart_flatbed_boxes_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path d=\"M448 160h64c17.6 0 32-14.4 32-32V64c0-17.6-14.4-32-32-32h-64c-17.6 0-32 14.4-32 32v64C416 145.6 430.4 160 448 160zM448 320h128c17.6 0 32-14.4 32-32V224c0-17.6-14.4-32-32-32h-128c-17.6 0-32 14.4-32 32v64C416 305.6 430.4 320 448 320zM224 320h128c17.6 0 32-14.4 32-32V64c0-17.6-14.4-32-32-32H224C206.4 32 192 46.4 192 64v224C192 305.6 206.4 320 224 320zM640 415.1c0 17.6-14.4 32-32 31.1l-66.88-.0011c1.787 5.027 2.907 10.36 2.907 16c0 26.51-21.5 48-48.01 48c-26.51 0-47.99-21.49-47.99-48c0-5.641 1.141-10.97 2.928-16H253.1C254.9 453 256 458.4 256 464C256 490.5 234.5 512 208 512S160 490.5 160 464c0-5.641 1.13-10.97 2.917-16l-66.92 .0011C78.4 448 64 433.6 64 415.1V80C64 71.16 56.84 64 48 64H31.1C14.4 64 0 49.6 0 32S14.4 0 31.1 0H64c35.2 0 64 28.8 64 64v320h480C625.6 384 640 398.4 640 415.1z\"/></svg>",
3995
4264
  "cart_shopping_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M96 0C107.5 0 117.4 8.19 119.6 19.51L121.1 32H541.8C562.1 32 578.3 52.25 572.6 72.66L518.6 264.7C514.7 278.5 502.1 288 487.8 288H170.7L179.9 336H488C501.3 336 512 346.7 512 360C512 373.3 501.3 384 488 384H159.1C148.5 384 138.6 375.8 136.4 364.5L76.14 48H24C10.75 48 0 37.25 0 24C0 10.75 10.75 0 24 0H96zM128 464C128 437.5 149.5 416 176 416C202.5 416 224 437.5 224 464C224 490.5 202.5 512 176 512C149.5 512 128 490.5 128 464zM512 464C512 490.5 490.5 512 464 512C437.5 512 416 490.5 416 464C416 437.5 437.5 416 464 416C490.5 416 512 437.5 512 464z\"/></svg>",
3996
4265
  "cash_register": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M35.39,18.12H14.62L10,29.66H40ZM23,19.29H27l.1,1.6H22.87Zm-.13,2h4.32l.12,1.81H22.72Zm-.15,2.3h4.62l.14,2.08h-4.9ZM17.9,19.29H22l-.16,1.6H17.54Zm-.46,2h4.32l-.18,1.81H17Zm-.53,2.3h4.62l-.2,2.08h-4.9Zm-1.16,5.06.55-2.42H27.49l.16,2.42ZM28,19.29H32.1l.36,1.6H28.2Zm.2,2h4.32L33,23.12H28.42Zm.23,2.3h4.62l.48,2.08h-4.9Zm.5,5.06-.24-2.42h5l.55,2.42Z\" fill=\"#484f60\"/><path d=\"M10,29.66v9.23H40V29.66Zm27.69,6.92H12.31V32H37.69Z\" fill=\"#484f60\"/><path d=\"M15.63,11.11v7.58H34.37V11.11Zm17.31,6.15H17.06V12.54H32.94Z\" fill=\"#484f60\"/></svg>",
@@ -4013,6 +4282,7 @@ const IconSvg = {
4013
4282
  "tag": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M40,29.15v-.68a5.28,5.28,0,0,0-1.34-3.25L24.78,11.34A5.34,5.34,0,0,0,21.53,10H11.9A1.91,1.91,0,0,0,10,11.9v9.63a5.28,5.28,0,0,0,1.34,3.25L25.22,38.66A5.28,5.28,0,0,0,28.47,40h.68a5.28,5.28,0,0,0,3.24-1.34l6.27-6.27A5.28,5.28,0,0,0,40,29.15ZM13.13,16.72a2.54,2.54,0,1,1,3.59,0A2.55,2.55,0,0,1,13.13,16.72Zm15.9,19L17.84,24.55l1.34-1.34L30.37,34.4Zm2.69-2.69L20.52,21.87l1.35-1.35,11.19,11.2Zm2.68-2.69L23.21,19.18l1.34-1.34L35.75,29Z\" fill=\"#484f60\"/></svg>",
4014
4283
  "thick_lines": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"12.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/><rect x=\"10\" y=\"21.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/><rect x=\"10\" y=\"30.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/></svg>",
4015
4284
  "thin_lines": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"14.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"20.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"26.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"32.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/></svg>",
4285
+ "trash_bin": "<svg preserveAspectRatio=\"none\" version=\"1.1\" viewBox=\"0 0 50 50\" x=\"0px\" xmlns=\"http://www.w3.org/2000/svg\" y=\"0px\"><g transform=\" translate(14 10)\"><path d=\"M 0 0 L 0 18.215 C 0 19.99 1.439 21.429 3.215 21.429 L 15 21.429 C 16.775 21.429 18.215 19.99 18.215 18.215 L 18.215 0 L 0 0 Z M 4.287 19.286 L 2.143 19.286 L 2.143 2.143 L 4.287 2.143 L 4.287 19.286 Z M 10.18 19.286 L 8.037 19.286 L 8.037 2.143 L 10.18 2.143 L 10.18 19.286 Z M 16.072 19.286 L 13.93 19.286 L 13.93 2.143 L 16.072 2.143 L 16.072 19.286 Z\" fill=\"#1E2930\" transform=\" translate(1.891 8.571)\" /><path d=\"M 18.213 2.143 L 10.713 2.143 C 11.305 2.143 11.785 1.664 11.785 1.071 C 11.785 0.479 11.305 0 10.713 0 L 9.643 0 C 9.051 0 8.57 0.479 8.57 1.071 C 8.57 1.664 9.051 2.143 9.643 2.143 L 2.143 2.143 C 0.959 2.143 0 3.103 0 4.286 L 0 5.357 C 0 6.541 0.959 6.429 2.143 6.429 L 18.213 6.429 C 19.397 6.429 20.357 6.541 20.357 5.357 L 20.357 4.286 C 20.357 3.103 19.397 2.143 18.213 2.143 Z\" fill=\"#1E2930\" transform=\" translate(0.821 0)\" /></g></svg>",
4016
4286
  "triangle_down": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"29.06 18.75 37.5 18.75 25 31.25 12.5 18.75 20.95 18.75 29.06 18.75\" fill=\"#484f60\"/></svg>",
4017
4287
  "triangle_up": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"20.94 31.25 12.5 31.25 25 18.75 37.5 31.25 29.05 31.25 20.94 31.25\" fill=\"#484f60\"/></svg>",
4018
4288
  "truck": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"14.75\" width=\"17.47\" height=\"12.62\" fill=\"#484f60\"/><path d=\"M37,18.11h-8V28.84H20.22a4.42,4.42,0,0,1,1.41,2.73H30a4.41,4.41,0,0,1,8.76,0H40V24.63Zm-.26,6.73H32.25a.57.57,0,0,1-.57-.57V20a.57.57,0,0,1,.57-.58h2.63a.58.58,0,0,1,.52.35L37.31,24A.58.58,0,0,1,36.78,24.84Z\" fill=\"#484f60\"/><path d=\"M14.28,28.84a4.39,4.39,0,0,0-1.42,2.73H12l-2-1.26V28.84Z\" fill=\"#484f60\"/><path d=\"M31.25,32.1a3.16,3.16,0,1,0,3.16-3.16A3.16,3.16,0,0,0,31.25,32.1Z\" fill=\"#484f60\"/><path d=\"M14.09,32.1a3.16,3.16,0,1,0,3.16-3.16A3.15,3.15,0,0,0,14.09,32.1Z\" fill=\"#484f60\"/></svg>",
@@ -4629,7 +4899,7 @@ CustomerGroupsComponent.decorators = [
4629
4899
  },] }
4630
4900
  ];
4631
4901
  CustomerGroupsComponent.ctorParameters = () => [
4632
- { type: IOneConnectorAdapterService }
4902
+ { type: TransactionConnectorService }
4633
4903
  ];
4634
4904
  CustomerGroupsComponent.propDecorators = {
4635
4905
  required: [{ type: Input }],
@@ -5193,7 +5463,7 @@ RelationAddressComponent.decorators = [
5193
5463
  ];
5194
5464
  RelationAddressComponent.ctorParameters = () => [
5195
5465
  { type: DictionaryService },
5196
- { type: IOneConnectorAdapterService },
5466
+ { type: TransactionConnectorService },
5197
5467
  { type: FormMasterService }
5198
5468
  ];
5199
5469
  RelationAddressComponent.propDecorators = {
@@ -5801,14 +6071,14 @@ class TransactionImageService {
5801
6071
  });
5802
6072
  }
5803
6073
  }
5804
- TransactionImageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionImageService_Factory() { return new TransactionImageService(i0.ɵɵinject(IOneConnectorAdapterService)); }, token: TransactionImageService, providedIn: "root" });
6074
+ TransactionImageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionImageService_Factory() { return new TransactionImageService(i0.ɵɵinject(TransactionConnectorService)); }, token: TransactionImageService, providedIn: "root" });
5805
6075
  TransactionImageService.decorators = [
5806
6076
  { type: Injectable, args: [{
5807
6077
  providedIn: "root"
5808
6078
  },] }
5809
6079
  ];
5810
6080
  TransactionImageService.ctorParameters = () => [
5811
- { type: IOneConnectorAdapterService }
6081
+ { type: TransactionConnectorService }
5812
6082
  ];
5813
6083
 
5814
6084
  class TransactionLineComponent {
@@ -6471,9 +6741,87 @@ ShoppingCartPreviewModule.decorators = [
6471
6741
  },] }
6472
6742
  ];
6473
6743
 
6744
+ class SharedConnectorService {
6745
+ constructor(_optionsService) {
6746
+ this._optionsService = _optionsService;
6747
+ this._boFactory = new BusinessObjectFactory();
6748
+ }
6749
+ connect() {
6750
+ return __awaiter(this, void 0, void 0, function* () {
6751
+ this.connector = new Sharedapi(this._optionsService.options);
6752
+ });
6753
+ }
6754
+ selectDocsByTableKey(table, key) {
6755
+ return new Promise((resolve, reject) => {
6756
+ return this.connector.selectDocsByTableKey(table, key).then((result) => {
6757
+ if (result.validationResult && result.validationResult.success) {
6758
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(CoDocument, result.resultObjects));
6759
+ }
6760
+ else {
6761
+ reject(result.validationMessagesAsString);
6762
+ }
6763
+ });
6764
+ });
6765
+ }
6766
+ getDocumentContent(id, thumbnail = true) {
6767
+ return new Promise((resolve, reject) => {
6768
+ return this.connector.getDocumentContent(id, thumbnail).then((result) => {
6769
+ if (result.validationResult && result.validationResult.success) {
6770
+ resolve(result.resultObject.documentContent);
6771
+ }
6772
+ else {
6773
+ reject(result.validationMessagesAsString);
6774
+ }
6775
+ });
6776
+ });
6777
+ }
6778
+ }
6779
+ SharedConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedConnectorService_Factory() { return new SharedConnectorService(i0.ɵɵinject(OptionsService)); }, token: SharedConnectorService, providedIn: "root" });
6780
+ SharedConnectorService.decorators = [
6781
+ { type: Injectable, args: [{
6782
+ providedIn: "root"
6783
+ },] }
6784
+ ];
6785
+ SharedConnectorService.ctorParameters = () => [
6786
+ { type: OptionsService }
6787
+ ];
6788
+
6789
+ class SharedService {
6790
+ constructor(_optionsService, _connector) {
6791
+ this._optionsService = _optionsService;
6792
+ this._connector = _connector;
6793
+ this._subs = [];
6794
+ this._subs.push(this._optionsService.optionsLoaded.subscribe((loaded) => {
6795
+ if (loaded) {
6796
+ this._connector.connect();
6797
+ }
6798
+ }));
6799
+ }
6800
+ ngOnDestroy() {
6801
+ this._subs.forEach(s => s.unsubscribe());
6802
+ }
6803
+ selectDocsByTableKey(table, key) {
6804
+ return this._connector.selectDocsByTableKey(table, key);
6805
+ }
6806
+ getDocumentContent(docId, thumbnail = true) {
6807
+ return this._connector.getDocumentContent(docId, thumbnail);
6808
+ }
6809
+ }
6810
+ SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
6811
+ SharedService.decorators = [
6812
+ { type: Injectable, args: [{
6813
+ providedIn: "root"
6814
+ },] }
6815
+ ];
6816
+ SharedService.ctorParameters = () => [
6817
+ { type: OptionsService },
6818
+ { type: SharedConnectorService }
6819
+ ];
6820
+
6474
6821
  class AvatarComponent {
6475
- constructor(_service) {
6476
- this._service = _service;
6822
+ constructor(_transactionService, _sharedService) {
6823
+ this._transactionService = _transactionService;
6824
+ this._sharedService = _sharedService;
6477
6825
  }
6478
6826
  set relationId(value) {
6479
6827
  this._relationId = value;
@@ -6489,11 +6837,11 @@ class AvatarComponent {
6489
6837
  if (!isNaN(this._relationId)) {
6490
6838
  const request = new RelationRequest();
6491
6839
  request.relationId = this._relationId;
6492
- this._service.getRelationListObjects(request).then((data) => {
6840
+ this._transactionService.getRelationListObjects(request).then((data) => {
6493
6841
  if (data && data.length > 0) {
6494
6842
  this.relation = data[0];
6495
6843
  if (this.relation && this.relation.image && this.relation.image.documentId) {
6496
- this._service.getDocumentContent(this.relation.image.documentId)
6844
+ this._sharedService.getDocumentContent(this.relation.image.documentId)
6497
6845
  .then((content) => {
6498
6846
  this.image = content;
6499
6847
  })
@@ -6521,7 +6869,8 @@ AvatarComponent.decorators = [
6521
6869
  },] }
6522
6870
  ];
6523
6871
  AvatarComponent.ctorParameters = () => [
6524
- { type: TransactionService }
6872
+ { type: TransactionService },
6873
+ { type: SharedService }
6525
6874
  ];
6526
6875
  AvatarComponent.propDecorators = {
6527
6876
  relationId: [{ type: Input }],
@@ -6602,29 +6951,140 @@ DeliveryTypeTileModule.decorators = [
6602
6951
  },] }
6603
6952
  ];
6604
6953
 
6954
+ class PaymentService {
6955
+ constructor(_connector) {
6956
+ this._connector = _connector;
6957
+ }
6958
+ createOutstandingEntry(uuid, amount) {
6959
+ return __awaiter(this, void 0, void 0, function* () {
6960
+ const response = yield this._connector.createOutstandingEntry(uuid, amount)
6961
+ .catch((error) => {
6962
+ // todo: do something with the error
6963
+ return false;
6964
+ });
6965
+ if (response) {
6966
+ return true;
6967
+ }
6968
+ return false;
6969
+ });
6970
+ }
6971
+ registerSalesOrderPayment(uuid, amount, currencyCode, paymentMethod, cashRegisterGroupId) {
6972
+ return __awaiter(this, void 0, void 0, function* () {
6973
+ const response = yield this._connector.registerSalesOrderPayment(uuid, amount, currencyCode, paymentMethod, cashRegisterGroupId);
6974
+ // .catch((error) => {
6975
+ // // todo: do something with the error
6976
+ // // return;
6977
+ // });
6978
+ if (response) {
6979
+ return true;
6980
+ }
6981
+ return false;
6982
+ });
6983
+ }
6984
+ getPaymentMethods() {
6985
+ return __awaiter(this, void 0, void 0, function* () {
6986
+ return this._connector.getPaymentMethods();
6987
+ });
6988
+ }
6989
+ }
6990
+ PaymentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PaymentService_Factory() { return new PaymentService(i0.ɵɵinject(TransactionConnectorService)); }, token: PaymentService, providedIn: "root" });
6991
+ PaymentService.decorators = [
6992
+ { type: Injectable, args: [{
6993
+ providedIn: "root"
6994
+ },] }
6995
+ ];
6996
+ PaymentService.ctorParameters = () => [
6997
+ { type: TransactionConnectorService }
6998
+ ];
6999
+
7000
+ class PaymentViewmodel {
7001
+ constructor(method) {
7002
+ this.payment = method;
7003
+ }
7004
+ }
7005
+
6605
7006
  class PaymentComponent {
6606
- constructor(_transactionService) {
7007
+ constructor(_transactionService, _sharedService, _paymentService) {
6607
7008
  this._transactionService = _transactionService;
7009
+ this._sharedService = _sharedService;
7010
+ this._paymentService = _paymentService;
6608
7011
  this.icons = Icon;
6609
7012
  this.amount = 0;
6610
7013
  this.paymentMethodIdx = 0;
6611
- this.paymentMethods = [
6612
- { icon: this.icons.Truck, description: 'Contant' },
6613
- { icon: this.icons.IdealLogo, description: 'iDeal' },
6614
- { icon: this.icons.Truck, description: 'Creditcard' },
6615
- { icon: this.icons.Truck, description: 'Overschrijving' }
6616
- ];
7014
+ this.cashRegisterIdx = 0;
7015
+ this.paymentMethods = [];
6617
7016
  this.cashRegisters = [];
7017
+ this.showCashRegisters = false;
7018
+ this.showKeyPad = false;
6618
7019
  }
6619
7020
  showClass() {
6620
7021
  return true;
6621
7022
  }
6622
7023
  ngOnInit() {
6623
- this._getCashRegisters();
7024
+ this._paymentService.createOutstandingEntry(this.transactionUuid, this.amount).then(() => {
7025
+ this._getPaymentMethods().then(() => {
7026
+ this._prepareCashRegisters();
7027
+ });
7028
+ });
7029
+ }
7030
+ paymentMethodSelected(method, index) {
7031
+ this.paymentMethodIdx = index;
7032
+ this._prepareCashRegisters();
7033
+ }
7034
+ handlePayment() {
7035
+ const currentPaymentMethod = this.paymentMethods[this.paymentMethodIdx];
7036
+ const currentCashRegister = this.cashRegisters[this.cashRegisterIdx];
7037
+ this._paymentService.registerSalesOrderPayment(this.transactionUuid, this.amount, this.currencyCode, currentPaymentMethod.payment.code, currentCashRegister.group).then(() => {
7038
+ this.showKeyPad = false;
7039
+ });
7040
+ }
7041
+ handleKeyPadModelChange(model) {
7042
+ this.amount = model;
7043
+ console.log(model);
7044
+ }
7045
+ /**
7046
+ *
7047
+ * @private
7048
+ */
7049
+ _prepareCashRegisters() {
7050
+ const paymentMethod = this.paymentMethods[this.paymentMethodIdx].payment;
7051
+ if (paymentMethod && !paymentMethod.externalSourceId) {
7052
+ this.cashRegisters.length = 0;
7053
+ paymentMethod.posGroups.forEach(crg => {
7054
+ this._getCashRegisters(crg.branchNo, crg.id);
7055
+ });
7056
+ this.showCashRegisters = true;
7057
+ }
7058
+ else {
7059
+ this.showCashRegisters = false;
7060
+ }
7061
+ }
7062
+ _getCashRegisters(branch, group) {
7063
+ this._transactionService.getCashRegisters(branch, group).then((cashRegisters) => {
7064
+ this.cashRegisters.push(...cashRegisters);
7065
+ });
6624
7066
  }
6625
- _getCashRegisters() {
6626
- this._transactionService.getCashRegisters().then((cashRegisters) => {
6627
- this.cashRegisters = cashRegisters;
7067
+ _getPaymentMethods() {
7068
+ this.paymentMethods.length = 0;
7069
+ return this._paymentService.getPaymentMethods().then((methods) => {
7070
+ methods.forEach((m) => __awaiter(this, void 0, void 0, function* () {
7071
+ const paymentViewModel = new PaymentViewmodel(m);
7072
+ const imageDocs = m.documents.filter(d => d.isImageDocument());
7073
+ if (imageDocs && imageDocs.length) {
7074
+ const image = imageDocs[0];
7075
+ if (image.filePath) {
7076
+ paymentViewModel.image = image.filePath;
7077
+ }
7078
+ else {
7079
+ if (!image.thumbnailBody) {
7080
+ const content = yield this._sharedService.getDocumentContent(image.documentId);
7081
+ image.thumbnailBody = content;
7082
+ }
7083
+ paymentViewModel.image = image.thumbnailBodyAsDataUri;
7084
+ }
7085
+ }
7086
+ this.paymentMethods.push(paymentViewModel);
7087
+ }));
6628
7088
  });
6629
7089
  }
6630
7090
  }
@@ -6634,30 +7094,45 @@ PaymentComponent.decorators = [
6634
7094
  template: `
6635
7095
  <div class="payment-wrapper">
6636
7096
  <div class="payment-methods-header">
6637
- <span class="payment-header-title" [textContent]="'Selecteer een' | localize"></span>
6638
- <span class="payment-header-title extra" [textContent]="'gratis' | localize:false"></span>
6639
- <span class="payment-header-title" [textContent]="'betaalmethode' | localize:false"></span>
7097
+ <span class="payment-header-title" [textContent]="'SELECT_A' | localize"></span>
7098
+ <span class="payment-header-title extra" [textContent]="'FREE' | localize:false"></span>
7099
+ <span class="payment-header-title" [textContent]="'PAYMENT_METHOD' | localize:false"></span>
6640
7100
  </div>
6641
7101
  <div class="payment-methods">
6642
7102
  <co-payment-tile *ngFor="let paymentMethod of paymentMethods; let index = index"
6643
- [icon]="paymentMethod.icon"
6644
- [description]="paymentMethod.description"
7103
+ [image]="paymentMethod.image"
7104
+ [description]="paymentMethod.payment.description"
6645
7105
  [selected]="paymentMethodIdx === index"
6646
- (selectedChange)="paymentMethodIdx = index"
7106
+ (selectedChange)="paymentMethodSelected(paymentMethod.payment, index)"
6647
7107
  ></co-payment-tile>
6648
7108
  </div>
6649
- <div class="payment-cash-register-header">
6650
- <span class="payment-header-title" [textContent]="'Selecteer kassa' | localize"></span>
6651
- </div>
6652
- <div class="payment-methods">
6653
- <co-payment-tile *ngFor="let cashRegister of cashRegisters"
6654
- [icon]="cashRegister.icon"
6655
- [description]="cashRegister.description"
6656
- ></co-payment-tile>
7109
+ <div class="payment-cash-register-wrapper" *ngIf="showCashRegisters">
7110
+ <div class="payment-cash-register-header">
7111
+ <span class="payment-header-title" [textContent]="'SELECT_CASH_REGISTER' | localize"></span>
7112
+ </div>
7113
+ <div class="payment-methods">
7114
+ <co-payment-tile *ngFor="let cashRegister of cashRegisters; let index = index"
7115
+ [icon]="cashRegister.icon"
7116
+ [description]="cashRegister.description"
7117
+ [selected]="cashRegisterIdx === index"
7118
+ ></co-payment-tile>
7119
+ </div>
6657
7120
  </div>
6658
- <div class="payment-to-pay">
6659
- <div [textContent]="'Te betalen' | localize"></div>
6660
- <div class="payment-amount" [textContent]="amount | priceDisplay"></div>
7121
+ <div class="payment-to-pay-wrapper">
7122
+ <div class="payment-to-pay">
7123
+ <div [textContent]="'TO_PAY' | localize"></div>
7124
+ <div class="payment-amount" [textContent]="amount | priceDisplay"></div>
7125
+ </div>
7126
+ <div class="payment-to-pay-button">
7127
+ <co-button [label]="'PAY' | localize" (click)="handlePayment()"></co-button>
7128
+ </div>
7129
+ <co-key-pad class="payment-to-pay-keypad"
7130
+ [showValue]="false"
7131
+ [emitModelChangeOnEnter]="false"
7132
+ [model]="amount"
7133
+ (modelChange)="handleKeyPadModelChange($event)"
7134
+ (enterClick)="handlePayment()"
7135
+ ></co-key-pad>
6661
7136
  </div>
6662
7137
  </div>
6663
7138
  `,
@@ -6665,10 +7140,14 @@ PaymentComponent.decorators = [
6665
7140
  },] }
6666
7141
  ];
6667
7142
  PaymentComponent.ctorParameters = () => [
6668
- { type: TransactionService }
7143
+ { type: TransactionService },
7144
+ { type: SharedService },
7145
+ { type: PaymentService }
6669
7146
  ];
6670
7147
  PaymentComponent.propDecorators = {
7148
+ transactionUuid: [{ type: Input }],
6671
7149
  amount: [{ type: Input }],
7150
+ currencyCode: [{ type: Input }],
6672
7151
  showClass: [{ type: HostBinding, args: ["class.co-payment",] }]
6673
7152
  };
6674
7153
 
@@ -6687,7 +7166,8 @@ PaymentTileComponent.decorators = [
6687
7166
  template: `
6688
7167
  <co-tile [selected]="selected" (selectedChange)="selectedChange.emit($event)">
6689
7168
  <div class="payment-tile-wrapper">
6690
- <icon class="payment-tile-icon" [icon]="icon"></icon>
7169
+ <icon *ngIf="icon" class="payment-tile-icon" [icon]="icon"></icon>
7170
+ <img *ngIf="image" class="payment-tile-image" [src]="image"/>
6691
7171
  <span class="payment-tile-description" [textContent]="description | localize"></span>
6692
7172
  </div>
6693
7173
  </co-tile>
@@ -6698,6 +7178,7 @@ PaymentTileComponent.decorators = [
6698
7178
  PaymentTileComponent.propDecorators = {
6699
7179
  selected: [{ type: Input }],
6700
7180
  icon: [{ type: Input }],
7181
+ image: [{ type: Input }],
6701
7182
  description: [{ type: Input }],
6702
7183
  selectedChange: [{ type: Output }],
6703
7184
  showClass: [{ type: HostBinding, args: ["class.co-payment-tile",] }]
@@ -6731,7 +7212,10 @@ PaymentModule.decorators = [
6731
7212
  CoreModule,
6732
7213
  PipeModule,
6733
7214
  PaymentTileModule,
6734
- PriceDisplayPipeModule
7215
+ PriceDisplayPipeModule,
7216
+ KeyPadModule,
7217
+ CoDialogModule,
7218
+ ButtonModule
6735
7219
  ],
6736
7220
  declarations: [
6737
7221
  PaymentComponent
@@ -6873,22 +7357,11 @@ var ContentViewMode;
6873
7357
  ContentViewMode[ContentViewMode["Tiles"] = 5] = "Tiles";
6874
7358
  })(ContentViewMode || (ContentViewMode = {}));
6875
7359
 
6876
- var TabCategory;
6877
- (function (TabCategory) {
6878
- TabCategory[TabCategory["Overview"] = 0] = "Overview";
6879
- TabCategory[TabCategory["OrderConfirmation"] = 1] = "OrderConfirmation";
6880
- TabCategory[TabCategory["Transport"] = 2] = "Transport";
6881
- TabCategory[TabCategory["ReceivedGoods"] = 3] = "ReceivedGoods";
6882
- TabCategory[TabCategory["InvoiceCheck"] = 4] = "InvoiceCheck";
6883
- TabCategory[TabCategory["Menu"] = 5] = "Menu";
6884
- })(TabCategory || (TabCategory = {}));
6885
-
6886
7360
  class TransactionComponent {
6887
7361
  constructor(iconCacheService, _service) {
6888
7362
  this.iconCacheService = iconCacheService;
6889
7363
  this._service = _service;
6890
7364
  this.viewModes = ContentViewMode;
6891
- this.tabCategory = TabCategory;
6892
7365
  this.icons = Icon;
6893
7366
  this.showHeader = true;
6894
7367
  this.showQuickAccess = true;
@@ -6912,9 +7385,13 @@ class TransactionComponent {
6912
7385
  }
6913
7386
  set transactionId(value) {
6914
7387
  if (value) {
7388
+ this._transactionId = value;
6915
7389
  this._service.getTransactionById(value).catch(() => { });
6916
7390
  }
6917
7391
  }
7392
+ get transactionId() {
7393
+ return this._transactionId;
7394
+ }
6918
7395
  showClass() {
6919
7396
  return true;
6920
7397
  }
@@ -6978,6 +7455,7 @@ TransactionComponent.decorators = [
6978
7455
  <div class="transaction-lines-grid-wrapper" *ngIf="activeViewMode === viewModes.Grid">
6979
7456
  <co-transaction-grid
6980
7457
  [transactionLines]="transaction.transactionLines"
7458
+ [transactionId]="transactionId"
6981
7459
  [transactionType]="transaction.transactionInfo.transactionKind"
6982
7460
  [activeCategory]="activeCategory"
6983
7461
  (sidePanelClicked)="handleShowSidePanel($event)"
@@ -7000,6 +7478,7 @@ TransactionComponent.decorators = [
7000
7478
  [transactionType]="transaction.transactionInfo.transactionKind"
7001
7479
  [activeCategory]="activeCategory"
7002
7480
  [transactionLine]="sidePanelTransactionLine"
7481
+ [transactionId]="transactionId"
7003
7482
  (cancelClick)="handleCloseSidePanel($event)"
7004
7483
  ></co-transaction-line-side-panel>
7005
7484
  `,
@@ -7290,7 +7769,7 @@ TransactionHeaderDeliveryComponent.decorators = [
7290
7769
  </co-transaction-header-block>
7291
7770
  <ng-template #headerBlock>
7292
7771
  <div class="header-delivery-method">
7293
- <co-icon [iconData]="iconService.getIcon(icons.DeliveryTruck)"></co-icon>
7772
+ <co-icon class="header-delivery-truck-icon" [iconData]="iconService.getIcon(icons.DeliveryTruck)"></co-icon>
7294
7773
  <span [textContent]="deliveryMethod?.description"></span>
7295
7774
  </div>
7296
7775
  <co-icon class="planning-request-button" [class.co-transaction-check]="transactionInfo.deliveryDateDefinitive"
@@ -7358,11 +7837,11 @@ TransactionHeaderOrderComponent.decorators = [
7358
7837
  [headerBlockTemplate]="headerBlock"
7359
7838
  [firstBlockTemplate]="firstBlock"
7360
7839
  [secondBlockTemplate]="secondBlock"
7840
+ [thirdBlockTemplate]="thirdBlock"
7361
7841
  >
7362
7842
  </co-transaction-header-block>
7363
7843
  <ng-template #headerBlock>
7364
7844
  <div class="header-block-label" [textContent]="transactionInfo.branch?.familyName"></div>
7365
- <co-input-checkbox [model]="true"></co-input-checkbox>
7366
7845
  </ng-template>
7367
7846
  <ng-template #firstBlock>
7368
7847
  <span class="header-order-total-label co-transaction-label" [textContent]="'ORDER_TOTAL' | localize"></span>
@@ -7372,6 +7851,10 @@ TransactionHeaderOrderComponent.decorators = [
7372
7851
  <span class="header-order-line-amount-label co-transaction-label" [textContent]="'ORDER_LINES' | localize"></span>
7373
7852
  <div class="header-order-line-amount" [textContent]="transactionLines.length"></div>
7374
7853
  </ng-template>
7854
+ <ng-template #thirdBlock>
7855
+ <div class="header-order-definitive-label co-transaction-label" [textContent]="'DEFINITIVE' | localize"></div>
7856
+ <co-input-checkbox [model]="true"></co-input-checkbox>
7857
+ </ng-template>
7375
7858
  `,
7376
7859
  encapsulation: ViewEncapsulation.None
7377
7860
  },] }
@@ -7401,9 +7884,16 @@ TransactionHeaderOrderModule.decorators = [
7401
7884
  ];
7402
7885
 
7403
7886
  class TransactionHeaderPaymentComponent extends TransactionBaseComponent {
7887
+ constructor() {
7888
+ super(...arguments);
7889
+ this.showPaymentDialog = false;
7890
+ }
7404
7891
  showClass() {
7405
7892
  return true;
7406
7893
  }
7894
+ openPayment() {
7895
+ this.showPaymentDialog = true;
7896
+ }
7407
7897
  }
7408
7898
  TransactionHeaderPaymentComponent.decorators = [
7409
7899
  { type: Component, args: [{
@@ -7417,7 +7907,7 @@ TransactionHeaderPaymentComponent.decorators = [
7417
7907
  </co-transaction-header-block>
7418
7908
  <ng-template #headerBlock>
7419
7909
  <div class="header-block-label" [textContent]="'BALANCE' | localize"></div>
7420
- <div class="header-block-balance">
7910
+ <div class="header-block-balance" (click)="openPayment()">
7421
7911
  <span class="payment-paid" [textContent]="200 | priceDisplay"></span>
7422
7912
  <span class="payment-divider" [textContent]="'/'"></span>
7423
7913
  <span class="payment-to-pay" [textContent]="100 | priceDisplay"></span>
@@ -7431,6 +7921,16 @@ TransactionHeaderPaymentComponent.decorators = [
7431
7921
  <div class="header-downpayment-label co-transaction-label" [textContent]="'DOWNPAYMENT_AMOUNT' | localize"></div>
7432
7922
  <div class="header-downpayment" [textContent]="'NOT_IMPLEMENTED'"></div>
7433
7923
  </ng-template>
7924
+ <co-dialog class="payment-dialog" *ngIf="showPaymentDialog"
7925
+ [modal]="true"
7926
+ (closeClick)="showPaymentDialog = false"
7927
+ >
7928
+ <co-payment
7929
+ [transactionUuid]="transactionInfo.uuid"
7930
+ [amount]="transactionTotal.netAmount"
7931
+ [currencyCode]="transactionInfo.currencyId"
7932
+ ></co-payment>
7933
+ </co-dialog>
7434
7934
  `,
7435
7935
  encapsulation: ViewEncapsulation.None
7436
7936
  },] }
@@ -7447,7 +7947,9 @@ TransactionHeaderPaymentModule.decorators = [
7447
7947
  CommonModule,
7448
7948
  TransactionHeaderBlockModule,
7449
7949
  PipeModule,
7450
- PriceDisplayPipeModule
7950
+ PriceDisplayPipeModule,
7951
+ CoDialogModule,
7952
+ PaymentModule
7451
7953
  ],
7452
7954
  declarations: [
7453
7955
  TransactionHeaderPaymentComponent
@@ -7485,6 +7987,7 @@ class TransactionGridBaseComponent {
7485
7987
  this.icons = Icon;
7486
7988
  this.align = ColumnAlign;
7487
7989
  this.sidePanelClicked = new EventEmitter();
7990
+ this.rowVisible = new EventEmitter();
7488
7991
  this.extraColumns = [];
7489
7992
  this._transactionLines = [];
7490
7993
  }
@@ -7521,8 +8024,10 @@ TransactionGridBaseComponent.ctorParameters = () => [
7521
8024
  ];
7522
8025
  TransactionGridBaseComponent.propDecorators = {
7523
8026
  content: [{ type: ContentChildren, args: [SimpleGridColumnDirective,] }],
8027
+ transactionId: [{ type: Input }],
7524
8028
  transactionLines: [{ type: Input }],
7525
- sidePanelClicked: [{ type: Output }]
8029
+ sidePanelClicked: [{ type: Output }],
8030
+ rowVisible: [{ type: Output }]
7526
8031
  };
7527
8032
 
7528
8033
  class TransactionLinesGridComponent extends TransactionGridBaseComponent {
@@ -7609,7 +8114,12 @@ TransactionBaseGridComponent.decorators = [
7609
8114
  { type: Component, args: [{
7610
8115
  selector: "co-transaction-base-grid",
7611
8116
  template: `
7612
- <co-simple-grid [data]="transactionLines" [extraColumns]="extraColumns" [dragDropEnabled]="true" [emitDragDrop]="true" (onDrop)="handleDrop($event)">
8117
+ <co-simple-grid [data]="transactionLines"
8118
+ [extraColumns]="extraColumns"
8119
+ [dragDropEnabled]="true"
8120
+ [emitDragDrop]="true"
8121
+ (onDrop)="handleDrop($event)"
8122
+ (rowVisible)="rowVisible.next($event)">
7613
8123
  <co-simple-grid-column [headerText]="'DESCRIPTION' | localize" [width]="300" [order]="10">
7614
8124
  <ng-template #template let-row = "row">
7615
8125
  <div class="transaction-grid-article-description" [textContent]="row.goodDescription"></div>
@@ -7640,11 +8150,55 @@ TransactionBaseGridComponent.propDecorators = {
7640
8150
  showClass: [{ type: HostBinding, args: ['class.co-transaction-base-grid',] }]
7641
8151
  };
7642
8152
 
8153
+ var TransactionTypeCategory;
8154
+ (function (TransactionTypeCategory) {
8155
+ TransactionTypeCategory["PurchaseOrderOverview"] = "purchaseOrderOverview";
8156
+ TransactionTypeCategory["PurchaseOrderOrderConfirmation"] = "purchaseOrderOrderConfirmation";
8157
+ TransactionTypeCategory["PurchaseOrderTransport"] = "purchaseOrderTransport";
8158
+ TransactionTypeCategory["PurchaseOrderReceivedGoods"] = "purchaseOrderReceivedGoods";
8159
+ TransactionTypeCategory["PurchaseOrderInvoiceCheck"] = "purchaseOrderInvoiceCheck";
8160
+ TransactionTypeCategory["PurchaseOrderMenu"] = "purchaseOrderMenu";
8161
+ TransactionTypeCategory["SalesOrderOverview"] = "salesOrderOverview";
8162
+ TransactionTypeCategory["SalesOrderPurchase"] = "salesOrderPurchase";
8163
+ TransactionTypeCategory["SalesOrderLogistics"] = "salesOrderLogistics";
8164
+ TransactionTypeCategory["SalesOrderPlanning"] = "salesOrderPlanning";
8165
+ TransactionTypeCategory["SalesOrderDeliveryNote"] = "salesOrderDeliveryNote";
8166
+ TransactionTypeCategory["SalesOrderInvoice"] = "salesOrderInvoice";
8167
+ })(TransactionTypeCategory || (TransactionTypeCategory = {}));
8168
+
8169
+ class TransactionEventService {
8170
+ constructor() {
8171
+ this.addToCartBySku = new Subject();
8172
+ this.addToCartBySelectorResult = new Subject();
8173
+ this.openShoppingCartModule = new Subject();
8174
+ this.loggedIn = new Subject();
8175
+ this.addNewUserToShoppingCartModule = new Subject();
8176
+ this.addUserRelationShoppingCartModule = new Subject();
8177
+ this.addArticleLine = new Subject();
8178
+ this.addTextLine = new Subject();
8179
+ this.addArticleLineAt = new Subject();
8180
+ this.addTextLineAt = new Subject();
8181
+ this.changeLineSequence = new Subject();
8182
+ this.transactionLineClicked = new Subject();
8183
+ this.rightSidebarClose = new Subject();
8184
+ this.scrollContent = new Subject();
8185
+ this.receivedPurchaseOrderCommit = new Subject();
8186
+ this.commitReceivePurchaseOrders = new Subject();
8187
+ this.transactionLineChanged = new Subject();
8188
+ }
8189
+ }
8190
+ TransactionEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionEventService_Factory() { return new TransactionEventService(); }, token: TransactionEventService, providedIn: "root" });
8191
+ TransactionEventService.decorators = [
8192
+ { type: Injectable, args: [{ providedIn: "root" },] }
8193
+ ];
8194
+
7643
8195
  class TransactionLineSidePanelComponent {
7644
- constructor(iconService) {
8196
+ constructor(iconService, _service, _transactionEventService) {
7645
8197
  this.iconService = iconService;
8198
+ this._service = _service;
8199
+ this._transactionEventService = _transactionEventService;
7646
8200
  this.icons = Icon;
7647
- this.tabCategory = TabCategory;
8201
+ this.categories = TransactionTypeCategory;
7648
8202
  this.transactionTypes = TransactionKind;
7649
8203
  this.transactionLine = new TransactionLineInfo();
7650
8204
  this.cancelClick = new EventEmitter();
@@ -7660,6 +8214,7 @@ TransactionLineSidePanelComponent.decorators = [
7660
8214
  { type: Component, args: [{
7661
8215
  selector: "co-transaction-line-side-panel",
7662
8216
  template: `
8217
+ <icon (click)="handleCancelClick($event)" [icon]="icons.Cancel" class="close-button"></icon>
7663
8218
  <div class="transaction-line-side-panel-header">
7664
8219
  <div class="transaction-line-side-panel-header-item">
7665
8220
  <span class="side-panel-header-label" [textContent]="'ARTICLE_NR'| localize"></span>
@@ -7677,10 +8232,11 @@ TransactionLineSidePanelComponent.decorators = [
7677
8232
  </div>
7678
8233
  <div class="side-panel-header-divider"></div>
7679
8234
  <div class="transaction-line-side-panel-header-item">
7680
- <span class="side-panel-header-label" [textContent]="'PRICE'| localize"></span>
7681
- <span class="side-panel-header-field" [textContent]="transactionLine.price | priceDisplay"></span>
8235
+ <span class="side-panel-header-label"
8236
+ [textContent]="activeCategory === categories.PurchaseOrderReceivedGoods ? ('TO_REPORT_IN' | localize) : ('PRICE' | localize)"></span>
8237
+ <span class="side-panel-header-field"
8238
+ [textContent]="activeCategory === categories.PurchaseOrderReceivedGoods ? quantityToReceive : (transactionLine.price | priceDisplay)"></span>
7682
8239
  </div>
7683
- <icon (click)="handleCancelClick($event)" [icon]="icons.Cancel" class="close-button"></icon>
7684
8240
  </div>
7685
8241
  <div class="transaction-line-side-panel-nav-bar">
7686
8242
  <co-transaction-button-bar
@@ -7692,7 +8248,10 @@ TransactionLineSidePanelComponent.decorators = [
7692
8248
  <ng-container [ngSwitch]="transactionType">
7693
8249
  <ng-container *ngSwitchCase="transactionTypes.PurchaseOrder">
7694
8250
  <co-transaction-line-side-panel-purchase
8251
+ [transactionLine]="transactionLine"
8252
+ [transactionId]="transactionId"
7695
8253
  [category]="activeCategory"
8254
+ (quantityToReceiveChange)="quantityToReceive = $event"
7696
8255
  ></co-transaction-line-side-panel-purchase>
7697
8256
  </ng-container>
7698
8257
  <ng-container *ngSwitchDefault>
@@ -7707,11 +8266,14 @@ TransactionLineSidePanelComponent.decorators = [
7707
8266
  },] }
7708
8267
  ];
7709
8268
  TransactionLineSidePanelComponent.ctorParameters = () => [
7710
- { type: IconCacheService }
8269
+ { type: IconCacheService },
8270
+ { type: TransactionService },
8271
+ { type: TransactionEventService }
7711
8272
  ];
7712
8273
  TransactionLineSidePanelComponent.propDecorators = {
7713
8274
  transactionType: [{ type: Input }],
7714
8275
  transactionLine: [{ type: Input }],
8276
+ transactionId: [{ type: Input }],
7715
8277
  activeCategory: [{ type: Input }],
7716
8278
  cancelClick: [{ type: Output }],
7717
8279
  showClass: [{ type: HostBinding, args: ["class.co-transaction-line-side-panel",] }]
@@ -8694,42 +9256,19 @@ TransactionLineSidePanelDefaultModule.decorators = [
8694
9256
  },] }
8695
9257
  ];
8696
9258
 
8697
- class TransactionReceivingGoodsHistoryComponent {
8698
- constructor() {
8699
- this.transactionLines = [];
8700
- }
8701
- showClass() {
8702
- return true;
8703
- }
8704
- }
8705
- TransactionReceivingGoodsHistoryComponent.decorators = [
8706
- { type: Component, args: [{
8707
- selector: "co-transaction-receiving-goods-history",
8708
- template: `
8709
- <div class="history-grid-wrapper">
8710
- <co-transaction-history-grid [transactionLines]="transactionLines">
8711
- <co-simple-grid-column [headerText]="'WAREHOUSE' | localize" [field]="'warehouseNumber'" [order]="40"></co-simple-grid-column>
8712
- <co-simple-grid-column [headerText]="'LOCATION' | localize" [field]="'warehouseLocation'" [order]="60"></co-simple-grid-column>
8713
- </co-transaction-history-grid>
8714
- </div>
8715
- `,
8716
- encapsulation: ViewEncapsulation.None
8717
- },] }
8718
- ];
8719
- TransactionReceivingGoodsHistoryComponent.propDecorators = {
8720
- transactionLines: [{ type: Input }],
8721
- showClass: [{ type: HostBinding, args: ["class.co-transaction-receiving-goods-history",] }]
8722
- };
8723
-
8724
9259
  var StatusType;
8725
9260
  (function (StatusType) {
8726
9261
  StatusType["Unknown"] = "UNKNOWN";
9262
+ StatusType["BG"] = "RECEIVED";
9263
+ StatusType["BT"] = "ORDERED";
8727
9264
  })(StatusType || (StatusType = {}));
8728
9265
 
8729
9266
  class TransactionHistoryGridComponent {
8730
- constructor() {
8731
- this.tabCategory = TabCategory;
9267
+ constructor(iconsService) {
9268
+ this.iconsService = iconsService;
8732
9269
  this.statusType = StatusType;
9270
+ this.icons = Icon;
9271
+ this.deleteSelectedRow = new EventEmitter();
8733
9272
  this.extraColumns = [];
8734
9273
  }
8735
9274
  set content(columnComponents) {
@@ -8739,7 +9278,10 @@ class TransactionHistoryGridComponent {
8739
9278
  return true;
8740
9279
  }
8741
9280
  handleSelectRow(row) {
8742
- //
9281
+ this.selectedRow = row;
9282
+ }
9283
+ handleDeleteClick() {
9284
+ this.deleteSelectedRow.next(this.selectedRow);
8743
9285
  }
8744
9286
  }
8745
9287
  TransactionHistoryGridComponent.decorators = [
@@ -8747,36 +9289,59 @@ TransactionHistoryGridComponent.decorators = [
8747
9289
  selector: "co-transaction-history-grid",
8748
9290
  template: `
8749
9291
  <div class="history-grid-wrapper">
8750
- <co-simple-grid [data]="transactionLines" [extraColumns]="extraColumns" (selectRow)="handleSelectRow($event)">
8751
- <co-simple-grid-column [headerText]="'STATE' | localize" [field]="'status'" [order]="10">
9292
+ <div class="delete-button-wrapper">
9293
+ <co-grid-toolbar-button
9294
+ (buttonClick)="handleDeleteClick()"
9295
+ [iconData]="iconsService.getIcon(icons.TrashBin)"
9296
+ [disabled]="!selectedRow"
9297
+ ></co-grid-toolbar-button>
9298
+ </div>
9299
+ <co-simple-grid [data]="collection" [extraColumns]="extraColumns" (selectRow)="handleSelectRow($event)">
9300
+ <co-simple-grid-column [headerText]="'STATE' | localize" [field]="'status'" [order]="10" [width]="150">
8752
9301
  <ng-template #template let-row="row">
8753
- <co-transaction-history-grid-status [statusType]="statusType.Unknown"></co-transaction-history-grid-status>
9302
+ <co-transaction-history-grid-status [statusType]="row.status" [subType]="row.type"></co-transaction-history-grid-status>
8754
9303
  </ng-template>
8755
9304
  </co-simple-grid-column>
8756
- <co-simple-grid-column [headerText]="'DELIVERY_DATE' | localize" [field]="'deliveryDate'" [order]="20"></co-simple-grid-column>
8757
- <co-simple-grid-column [headerText]="'AMOUNT' | localize" [field]="'amount'" [order]="30"></co-simple-grid-column>
8758
- <co-simple-grid-column [headerText]="'REFERENCE' | localize" [field]="'referenceNumber'" [order]="50"></co-simple-grid-column>
8759
- <co-simple-grid-column [headerText]="'USER' | localize" [field]="'user'" [order]="70"></co-simple-grid-column>
9305
+ <co-simple-grid-column [headerText]="'DELIVERY_DATE' | localize" [field]="'receiptDate'" [order]="20" [width]="100"></co-simple-grid-column>
9306
+ <co-simple-grid-column [headerText]="'AMOUNT' | localize" [field]="'quantity'" [order]="30" [width]="70"></co-simple-grid-column>
9307
+ <co-simple-grid-column [headerText]="'REFERENCE' | localize" [field]="'reference'" [order]="50"></co-simple-grid-column>
9308
+ <co-simple-grid-column [headerText]="'USER' | localize" [field]="'username'" [order]="70"></co-simple-grid-column>
8760
9309
  </co-simple-grid>
8761
9310
  </div>
8762
9311
  `,
8763
9312
  encapsulation: ViewEncapsulation.None
8764
9313
  },] }
8765
9314
  ];
9315
+ TransactionHistoryGridComponent.ctorParameters = () => [
9316
+ { type: IconCacheService }
9317
+ ];
8766
9318
  TransactionHistoryGridComponent.propDecorators = {
8767
9319
  content: [{ type: ContentChildren, args: [SimpleGridColumnDirective,] }],
8768
- transactionLines: [{ type: Input }],
9320
+ collection: [{ type: Input }],
9321
+ deleteSelectedRow: [{ type: Output }],
8769
9322
  showClass: [{ type: HostBinding, args: ["class.co-transaction-history-grid",] }]
8770
9323
  };
8771
9324
 
8772
9325
  class TransactionHistoryGridStatusComponent {
9326
+ constructor() {
9327
+ this.type = StatusType;
9328
+ }
8773
9329
  showClass() {
8774
9330
  return true;
8775
9331
  }
8776
9332
  _getStatusIndicatorColor() {
8777
- switch (this.statusType) {
9333
+ switch (this.type[this.statusType]) {
8778
9334
  case StatusType.Unknown:
8779
9335
  return '#dce4ea';
9336
+ case StatusType.BG:
9337
+ if (this.subType && this.subType === 'correction') {
9338
+ return '#f19826';
9339
+ }
9340
+ else {
9341
+ return '#48d521';
9342
+ }
9343
+ case StatusType.BT:
9344
+ return '#f19826';
8780
9345
  }
8781
9346
  }
8782
9347
  ngAfterViewInit() {
@@ -8791,7 +9356,7 @@ TransactionHistoryGridStatusComponent.decorators = [
8791
9356
  template: `
8792
9357
  <div class="transaction-status-indication">
8793
9358
  <div #statusIndicator class="status-color-circle"></div>
8794
- <span class="status-text" [textContent]="statusType | localize"></span>
9359
+ <span class="status-text" [textContent]="type[statusType] | localize"></span>
8795
9360
  </div>
8796
9361
  `,
8797
9362
  encapsulation: ViewEncapsulation.None
@@ -8799,6 +9364,7 @@ TransactionHistoryGridStatusComponent.decorators = [
8799
9364
  ];
8800
9365
  TransactionHistoryGridStatusComponent.propDecorators = {
8801
9366
  statusType: [{ type: Input }],
9367
+ subType: [{ type: Input }],
8802
9368
  statusIndicator: [{ type: ViewChild, args: ["statusIndicator", { read: ElementRef },] }],
8803
9369
  showClass: [{ type: HostBinding, args: ["class.co-transaction-history-grid-status",] }]
8804
9370
  };
@@ -8830,7 +9396,8 @@ TransactionHistoryGridModule.decorators = [
8830
9396
  CoreModule,
8831
9397
  SimpleGridModule,
8832
9398
  PipeModule,
8833
- TransactionHistoryGridStatusModule
9399
+ TransactionHistoryGridStatusModule,
9400
+ GridToolbarButtonModule
8834
9401
  ],
8835
9402
  declarations: [
8836
9403
  TransactionHistoryGridComponent
@@ -8841,6 +9408,74 @@ TransactionHistoryGridModule.decorators = [
8841
9408
  },] }
8842
9409
  ];
8843
9410
 
9411
+ class TransactionReceivingGoodsHistoryComponent {
9412
+ constructor(_service, _datePipe) {
9413
+ this._service = _service;
9414
+ this._datePipe = _datePipe;
9415
+ this.reloadReceivingGoodsHistory = new EventEmitter();
9416
+ }
9417
+ set goodsReceiptHistory(value) {
9418
+ if (value) {
9419
+ this._goodsReceiptHistory = value.reverse();
9420
+ }
9421
+ }
9422
+ get goodsReceiptHistory() {
9423
+ return this._goodsReceiptHistory.map((receipt) => {
9424
+ receipt.receiptDate = this._datePipe.transform(receipt.receiptDate);
9425
+ return receipt;
9426
+ });
9427
+ }
9428
+ showClass() {
9429
+ return true;
9430
+ }
9431
+ handleDeleteSelectedRow(row) {
9432
+ return __awaiter(this, void 0, void 0, function* () {
9433
+ if (row && row.type !== 'correction') {
9434
+ const request = new ReceiveGoodsForPurchaseOrderCorrectionRequest();
9435
+ const correctionDetails = new PurchaseOrderLineReceiptCorrectionDetails();
9436
+ request.allowedToRemovePickedAllocations = false;
9437
+ request.transId = this.transactionId;
9438
+ request.purchaseOrderLineReceiptCorrectionDetailsDTOS = [correctionDetails];
9439
+ correctionDetails.lineNr = this.transactionLine.lineNr;
9440
+ correctionDetails.quantityToCorrect = row.quantity;
9441
+ correctionDetails.documentId = row.documentId;
9442
+ correctionDetails.documentLineNr = row.lineNumber;
9443
+ yield this._service.receiveGoodsForPurchaseOrderCorrection(request).then(() => {
9444
+ this.reloadReceivingGoodsHistory.next();
9445
+ });
9446
+ }
9447
+ });
9448
+ }
9449
+ }
9450
+ TransactionReceivingGoodsHistoryComponent.decorators = [
9451
+ { type: Component, args: [{
9452
+ selector: "co-transaction-receiving-goods-history",
9453
+ template: `
9454
+ <co-transaction-history-grid
9455
+ [collection]="goodsReceiptHistory"
9456
+ (deleteSelectedRow)="handleDeleteSelectedRow($event)"
9457
+ >
9458
+ <co-simple-grid-column [headerText]="'WAREHOUSE' | localize" [field]="'warehouseNumber'"
9459
+ [order]="40"></co-simple-grid-column>
9460
+ <co-simple-grid-column [headerText]="'LOCATION' | localize" [field]="'locationNumber'"
9461
+ [order]="60"></co-simple-grid-column>
9462
+ </co-transaction-history-grid>
9463
+ `,
9464
+ encapsulation: ViewEncapsulation.None
9465
+ },] }
9466
+ ];
9467
+ TransactionReceivingGoodsHistoryComponent.ctorParameters = () => [
9468
+ { type: TransactionService },
9469
+ { type: DatePipe }
9470
+ ];
9471
+ TransactionReceivingGoodsHistoryComponent.propDecorators = {
9472
+ goodsReceiptHistory: [{ type: Input }],
9473
+ transactionLine: [{ type: Input }],
9474
+ transactionId: [{ type: Input }],
9475
+ reloadReceivingGoodsHistory: [{ type: Output }],
9476
+ showClass: [{ type: HostBinding, args: ["class.co-transaction-receiving-goods-history",] }]
9477
+ };
9478
+
8844
9479
  class TransactionReceivingGoodsHistoryModule {
8845
9480
  }
8846
9481
  TransactionReceivingGoodsHistoryModule.decorators = [
@@ -8857,20 +9492,100 @@ TransactionReceivingGoodsHistoryModule.decorators = [
8857
9492
  ],
8858
9493
  exports: [
8859
9494
  TransactionReceivingGoodsHistoryComponent
9495
+ ],
9496
+ providers: [
9497
+ DatePipe
8860
9498
  ]
8861
9499
  },] }
8862
9500
  ];
8863
9501
 
9502
+ class ArticleService {
9503
+ constructor(_articleConnectorService) {
9504
+ this._articleConnectorService = _articleConnectorService;
9505
+ }
9506
+ getWarehouseLocations(warehouseNr) {
9507
+ return __awaiter(this, void 0, void 0, function* () {
9508
+ return yield this._articleConnectorService.getWarehouseLocations(warehouseNr);
9509
+ });
9510
+ }
9511
+ }
9512
+ ArticleService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ArticleService_Factory() { return new ArticleService(i0.ɵɵinject(ArticleConnectorService)); }, token: ArticleService, providedIn: "root" });
9513
+ ArticleService.decorators = [
9514
+ { type: Injectable, args: [{
9515
+ providedIn: "root"
9516
+ },] }
9517
+ ];
9518
+ ArticleService.ctorParameters = () => [
9519
+ { type: ArticleConnectorService }
9520
+ ];
9521
+
8864
9522
  class TransactionReceivingGoodsDetailsComponent {
8865
- constructor() {
8866
- this.transactionLineInfo = new TransactionLineInfo();
9523
+ constructor(_formMaster, _service, _articleService) {
9524
+ this._formMaster = _formMaster;
9525
+ this._service = _service;
9526
+ this._articleService = _articleService;
9527
+ this.reloadReceivingGoodsHistory = new EventEmitter();
9528
+ this.receiptDetails = new PurchaseOrderLineReceiptDetails();
9529
+ this.request = new ReceiveGoodsForPurchaseOrderRequest();
9530
+ this.saveButtonDisabled = false;
9531
+ this.locationDropdownFields = { text: "locationNo", value: "locationNo" };
9532
+ this.request.purchaseOrderLineReceiptDetailsDTOS = [this.receiptDetails];
9533
+ const timeElapsed = Date.now();
9534
+ this.request.receivedDate = new Date(timeElapsed);
9535
+ }
9536
+ set amountLeftToReceive(value) {
9537
+ this._amountLeftToReceive = value;
9538
+ this.receiptDetails.quantityToReceive = value;
9539
+ }
9540
+ set transactionLine(value) {
9541
+ this._transactionLine = value;
9542
+ this.receiptDetails.warehouseNr = value.warehouseNumber;
9543
+ this.receiptDetails.lineNr = value.lineNr;
8867
9544
  }
8868
9545
  showClass() {
8869
9546
  return true;
8870
9547
  }
9548
+ get amountLeftToReceive() {
9549
+ return this._amountLeftToReceive;
9550
+ }
9551
+ get transactionLine() {
9552
+ return this._transactionLine;
9553
+ }
9554
+ submit() {
9555
+ return this._formMaster.submitSlaves();
9556
+ }
9557
+ locationRequired() {
9558
+ return this._transactionLine.isLocationRequired ||
9559
+ this._transactionLine.isBatchNrRequired ||
9560
+ this._transactionLine.isSerialNrRequired;
9561
+ }
8871
9562
  handleSaveDetailsEdit() {
9563
+ return __awaiter(this, void 0, void 0, function* () {
9564
+ const valid = this.submit();
9565
+ if (valid) {
9566
+ this.saveButtonDisabled = true;
9567
+ const request = this.request;
9568
+ request.transId = this.transactionId;
9569
+ yield this._service.receiveGoodsForPurchaseOrder(request).then((result) => __awaiter(this, void 0, void 0, function* () {
9570
+ this.reloadReceivingGoodsHistory.next();
9571
+ })).catch((e) => {
9572
+ this.saveButtonDisabled = false;
9573
+ });
9574
+ this.saveButtonDisabled = false;
9575
+ }
9576
+ });
8872
9577
  }
8873
9578
  handleCancelDetailsEdit() {
9579
+ // Velden resetten
9580
+ }
9581
+ handleDropDownSelected(warehouseNr) {
9582
+ return __awaiter(this, void 0, void 0, function* () {
9583
+ if (!this.locations) {
9584
+ yield this._articleService.getWarehouseLocations(warehouseNr).then((result) => {
9585
+ this.locations = result;
9586
+ });
9587
+ }
9588
+ });
8874
9589
  }
8875
9590
  }
8876
9591
  TransactionReceivingGoodsDetailsComponent.decorators = [
@@ -8878,20 +9593,62 @@ TransactionReceivingGoodsDetailsComponent.decorators = [
8878
9593
  selector: 'co-transaction-receiving-goods-details',
8879
9594
  template: `
8880
9595
  <div class="receipt-details-wrapper">
8881
- <span class="details-header" [textContent]="'RECEIPT_DETAILS' | localize | uppercase"></span>
8882
- <div class="columns-wrapper">
8883
- <div class="details-column">
8884
- <co-input-text class="details-input" [(model)]="transactionLineInfo.amount" [placeholder]="'AMOUNT' | localize"></co-input-text>
8885
- <co-input-text class="details-input" [(model)]="transactionLineInfo.warehouseNumber" [placeholder]="'WAREHOUSE' | localize"></co-input-text>
8886
- <co-input-text class="details-input" [(model)]="valuePlaceholder" [placeholder]="'LOCATION' | localize"></co-input-text>
8887
- </div>
8888
- <div class="divider-wrapper"><div class="divider"></div></div>
8889
- <div class="details-column">
8890
- <co-input-text class="details-input" [(model)]="valuePlaceholder" [placeholder]="'BATCH_NUMBER' | localize"></co-input-text>
8891
- <co-input-text class="details-input" [(model)]="valuePlaceholder" [placeholder]="'SERIAL_NUMBER' | localize"></co-input-text>
8892
- <co-input-text class="details-input" [(model)]="transactionLineInfo.refLineNr" [placeholder]="'REFERENCE_ID' | localize"></co-input-text>
9596
+ <co-form>
9597
+ <div class="details-header" [textContent]="'RECEIPT_DETAILS' | localize | uppercase"></div>
9598
+ <div class="columns-wrapper">
9599
+ <div class="details-column">
9600
+ <co-input-text class="details-input"
9601
+ [max]="amountLeftToReceive"
9602
+ [(model)]="receiptDetails.serialNr ? 1 : receiptDetails.quantityToReceive"
9603
+ [disabled]="!!receiptDetails.serialNr || receiptDetails.quantityToReceive === 0"
9604
+ [readonly]="!!receiptDetails.serialNr || receiptDetails.quantityToReceive === 0"
9605
+ [required]="true"
9606
+ [type]="'number'"
9607
+ [min]="1"
9608
+ [placeholder]="'AMOUNT' | localize"></co-input-text>
9609
+ <co-input-text class="details-input" [(model)]="receiptDetails.warehouseNr"
9610
+ [type]="'number'"
9611
+ [hideArrowButtons]="true"
9612
+ [readonly]="transactionLine.warehouseNumber !== undefined"
9613
+ [disabled]="transactionLine.warehouseNumber !== undefined"
9614
+ [required]="transactionLine.isWarehouseRequired"
9615
+ [placeholder]="'WAREHOUSE' | localize"></co-input-text>
9616
+ <co-drop-down-list class="details-input"
9617
+ noTriangleGraphic
9618
+ (focus)="handleDropDownSelected(receiptDetails.warehouseNr)"
9619
+ [collection]="locations"
9620
+ [fields]="locationDropdownFields"
9621
+ [(model)]="receiptDetails.locationNr"
9622
+ [required]="locationRequired()"
9623
+ [readonly]="receiptDetails.quantityToReceive === 0"
9624
+ [disabled]="receiptDetails.quantityToReceive === 0"
9625
+ [placeholder]="'LOCATION' | localize"
9626
+ ></co-drop-down-list>
9627
+ <co-input-text class="details-input" [(model)]="request.packingSlipNr"
9628
+ [placeholder]="'PACKING_SLIP' | localize"></co-input-text>
9629
+ </div>
9630
+ <div class="divider-wrapper">
9631
+ <div class="divider"></div>
9632
+ </div>
9633
+ <div class="details-column">
9634
+ <co-input-date class="details-input" [(model)]="request.receivedDate"
9635
+ ></co-input-date>
9636
+ <co-input-text class="details-input" [(model)]="receiptDetails.batchNr"
9637
+ [type]="'number'"
9638
+ [hideArrowButtons]="true"
9639
+ [required]="transactionLine.isBatchNrRequired"
9640
+ [placeholder]="'BATCH_NUMBER' | localize"></co-input-text>
9641
+ <co-input-text class="details-input" [(model)]="receiptDetails.serialNr"
9642
+ [type]="'number'"
9643
+ [hideArrowButtons]="true"
9644
+ [required]="transactionLine.isSerialNrRequired"
9645
+ [placeholder]="'SERIAL_NUMBER' | localize"></co-input-text>
9646
+ <!-- <co-input-text class="details-input" [(model)]="receiptDetails.refLineNr"-->
9647
+ <!-- [placeholder]="'REFERENCE_ID' | localize"></co-input-text>-->
9648
+ </div>
8893
9649
  </div>
8894
- </div>
9650
+ </co-form>
9651
+
8895
9652
  <div class="save-cancel-wrapper">
8896
9653
  <co-button class="button-wrapper" [label]="'SAVE' | localize" (click)="handleSaveDetailsEdit()"></co-button>
8897
9654
  <co-button class="button-wrapper" [label]="'CANCEL' | localize" (click)="handleCancelDetailsEdit()"></co-button>
@@ -8901,8 +9658,16 @@ TransactionReceivingGoodsDetailsComponent.decorators = [
8901
9658
  encapsulation: ViewEncapsulation.None
8902
9659
  },] }
8903
9660
  ];
9661
+ TransactionReceivingGoodsDetailsComponent.ctorParameters = () => [
9662
+ { type: FormMasterService },
9663
+ { type: TransactionService },
9664
+ { type: ArticleService }
9665
+ ];
8904
9666
  TransactionReceivingGoodsDetailsComponent.propDecorators = {
8905
- transactionLineInfo: [{ type: Input }],
9667
+ amountLeftToReceive: [{ type: Input }],
9668
+ transactionId: [{ type: Input }],
9669
+ transactionLine: [{ type: Input }],
9670
+ reloadReceivingGoodsHistory: [{ type: Output }],
8906
9671
  showClass: [{ type: HostBinding, args: ["class.co-transaction-receiving-goods-details",] }]
8907
9672
  };
8908
9673
 
@@ -8915,7 +9680,10 @@ TransactionReceivingGoodsDetailsModule.decorators = [
8915
9680
  CoreModule,
8916
9681
  PipeModule,
8917
9682
  InputTextModule,
9683
+ FormModule,
9684
+ InputDatePickerModule,
8918
9685
  ButtonModule,
9686
+ DropDownModule,
8919
9687
  ],
8920
9688
  declarations: [
8921
9689
  TransactionReceivingGoodsDetailsComponent
@@ -8926,22 +9694,6 @@ TransactionReceivingGoodsDetailsModule.decorators = [
8926
9694
  },] }
8927
9695
  ];
8928
9696
 
8929
- var TransactionTypeCategory;
8930
- (function (TransactionTypeCategory) {
8931
- TransactionTypeCategory["PurchaseOrderOverview"] = "purchaseOrderOverview";
8932
- TransactionTypeCategory["PurchaseOrderOrderConfirmation"] = "purchaseOrderOrderConfirmation";
8933
- TransactionTypeCategory["PurchaseOrderTransport"] = "purchaseOrderTransport";
8934
- TransactionTypeCategory["PurchaseOrderReceivedGoods"] = "purchaseOrderReceivedGoods";
8935
- TransactionTypeCategory["PurchaseOrderInvoiceCheck"] = "purchaseOrderInvoiceCheck";
8936
- TransactionTypeCategory["PurchaseOrderMenu"] = "purchaseOrderMenu";
8937
- TransactionTypeCategory["SalesOrderOverview"] = "salesOrderOverview";
8938
- TransactionTypeCategory["SalesOrderPurchase"] = "salesOrderPurchase";
8939
- TransactionTypeCategory["SalesOrderLogistics"] = "salesOrderLogistics";
8940
- TransactionTypeCategory["SalesOrderPlanning"] = "salesOrderPlanning";
8941
- TransactionTypeCategory["SalesOrderDeliveryNote"] = "salesOrderDeliveryNote";
8942
- TransactionTypeCategory["SalesOrderInvoice"] = "salesOrderInvoice";
8943
- })(TransactionTypeCategory || (TransactionTypeCategory = {}));
8944
-
8945
9697
  class TransactionQuickAccessOrderConfirmationComponent extends TransactionBaseComponent {
8946
9698
  showClass() {
8947
9699
  return true;
@@ -8969,27 +9721,63 @@ TransactionQuickAccessOrderConfirmationComponent.propDecorators = {
8969
9721
  };
8970
9722
 
8971
9723
  class TransactionQuickAccessReceivedGoodsComponent extends TransactionBaseComponent {
9724
+ constructor(_transactionService, _transactionEventService) {
9725
+ super(_transactionService);
9726
+ this._transactionService = _transactionService;
9727
+ this._transactionEventService = _transactionEventService;
9728
+ // Route through event service instead
9729
+ this.checkboxValueChanged = new EventEmitter();
9730
+ this.commitCheckboxState = false;
9731
+ this._subscriptions = [];
9732
+ }
8972
9733
  showClass() {
8973
9734
  return true;
8974
9735
  }
9736
+ ngOnInit() {
9737
+ const timeElapsed = Date.now();
9738
+ this.commitDate = new Date(timeElapsed);
9739
+ this._subscriptions.push(this._transactionEventService.receivedPurchaseOrderCommit.subscribe((value) => {
9740
+ this.commitCheckboxState = value;
9741
+ }));
9742
+ }
9743
+ ngOnDestroy() {
9744
+ this._subscriptions.forEach((subscription) => subscription.unsubscribe());
9745
+ }
9746
+ handleCommitEvent(value) {
9747
+ this._transactionEventService.commitReceivePurchaseOrders.next(value);
9748
+ }
8975
9749
  }
8976
9750
  TransactionQuickAccessReceivedGoodsComponent.decorators = [
8977
9751
  { type: Component, args: [{
8978
9752
  selector: "co-transaction-quick-access-received-goods",
8979
9753
  template: `
8980
- <co-input-text
8981
- [placeholder]="'RECEIVED_DATE' | localize"
8982
- ></co-input-text>
8983
- <co-input-text
8984
- [placeholder]="'PACKING_SLIP' | localize"
8985
- ></co-input-text>
8986
- <co-input-checkbox
8987
- ></co-input-checkbox>
9754
+ <co-input-date
9755
+ [placeholder]="'CONFIRMED_DATE' | localize"
9756
+ [(model)]="this.commitDate"
9757
+ ></co-input-date>
9758
+ <co-input-text
9759
+ [placeholder]="'PACKING_SLIP' | localize"
9760
+ [(model)]="this.commitReferenceId"
9761
+ ></co-input-text>
9762
+ <co-input-checkbox
9763
+ class="checkbox-wrapper"
9764
+ [(model)]="commitCheckboxState"
9765
+ [disabled]="commitCheckboxState"
9766
+ (modelChange)="handleCommitEvent({checkboxValue: $event, date: this.commitDate, id: this.commitReferenceId})"
9767
+ ></co-input-checkbox>
8988
9768
  `,
8989
9769
  encapsulation: ViewEncapsulation.None
8990
9770
  },] }
8991
9771
  ];
9772
+ TransactionQuickAccessReceivedGoodsComponent.ctorParameters = () => [
9773
+ { type: TransactionService },
9774
+ { type: TransactionEventService }
9775
+ ];
8992
9776
  TransactionQuickAccessReceivedGoodsComponent.propDecorators = {
9777
+ commitDate: [{ type: Input }],
9778
+ commitReferenceId: [{ type: Input }],
9779
+ packingSlipId: [{ type: Input }],
9780
+ checkboxValueChanged: [{ type: Output }],
8993
9781
  showClass: [{ type: HostBinding, args: ["class.co-transaction-quick-access-received-goods",] }]
8994
9782
  };
8995
9783
 
@@ -9063,42 +9851,158 @@ TransactionOrderConfirmationGridComponent.propDecorators = {
9063
9851
  showClass: [{ type: HostBinding, args: ["class.co-transaction-order-confirmation-grid",] }]
9064
9852
  };
9065
9853
 
9854
+ class ReceiveGoodsViewModel {
9855
+ constructor(transactionLine, goodsReceiptStatus, selected, toReceive) {
9856
+ this.toReceive = 0;
9857
+ this.location = '';
9858
+ this.transactionLine = transactionLine;
9859
+ this.goodsReceiptStatus = goodsReceiptStatus;
9860
+ this.selected = selected;
9861
+ this.toReceive = toReceive;
9862
+ }
9863
+ }
9864
+
9066
9865
  class TransactionReceivedGoodsGridComponent extends TransactionGridBaseComponent {
9866
+ constructor(_imageService, _transactionService, _transactionEventService, _articleService) {
9867
+ super(_imageService);
9868
+ this._imageService = _imageService;
9869
+ this._transactionService = _transactionService;
9870
+ this._transactionEventService = _transactionEventService;
9871
+ this._articleService = _articleService;
9872
+ this.locationDropdownFields = { text: "locationNo", value: "locationNo" };
9873
+ this.rowViewModels = new Map();
9874
+ this._subscriptions = [];
9875
+ this._subscriptions.push(this._transactionEventService.commitReceivePurchaseOrders.subscribe((value => {
9876
+ this.handleReceiveSelectedPurchaseOrders(value);
9877
+ })), this._transactionEventService.transactionLineChanged.subscribe((value) => {
9878
+ this.handleTransactionLineChanged(value);
9879
+ }));
9880
+ }
9067
9881
  showClass() {
9068
9882
  return true;
9069
9883
  }
9070
- }
9071
- TransactionReceivedGoodsGridComponent.decorators = [
9072
- { type: Component, args: [{
9073
- selector: "co-transaction-received-goods-grid",
9074
- template: `
9075
- <co-transaction-base-grid [transactionLines]="transactionLines" (sidePanelClicked)="openSidePanel($event)">
9076
- <co-simple-grid-column [width]="100" [field]="'warehouseNumber'" [textAlign]="align.Center" [order]="40">
9077
- <ng-template #headerTemplate let-row="row">
9078
- <icon class="transaction-grid-header-icon" [icon]="icons.Warehouse"></icon>
9079
- </ng-template>
9080
- </co-simple-grid-column>
9081
- <co-simple-grid-column [field]="'location'" [order]="50">
9082
- <ng-template #headerTemplate let-row="row">
9083
- <icon class="transaction-grid-header-icon" [icon]="icons.LocationDotSolid"></icon>
9084
- </ng-template>
9085
- </co-simple-grid-column>
9086
- <co-simple-grid-column [headerText]="'IN_ORDER' | localize" [field]="'amount'" [order]="51"></co-simple-grid-column>
9087
- <co-simple-grid-column [headerText]="'RECEIVED' | localize" [field]="'amount'" [order]="52"></co-simple-grid-column>
9088
- <co-simple-grid-column [headerText]="'BATCH' | localize" [field]="'nettoPrice'" [order]="53"></co-simple-grid-column>
9089
- <co-simple-grid-column [field]="'commitButton'" [order]="55" [textAlign]="align.Center">
9090
- <ng-template #headerTemplate let-row="row">
9091
- <co-input-checkbox></co-input-checkbox>
9092
- </ng-template>
9093
- <ng-template #template let-row="row">
9094
- <co-input-checkbox></co-input-checkbox>
9095
- </ng-template>
9096
- </co-simple-grid-column>
9097
- </co-transaction-base-grid>
9884
+ ngOnInit() {
9885
+ this.transactionLines.forEach((line) => {
9886
+ this.rowViewModels.set(line, new ReceiveGoodsViewModel(line, new GoodsReceiptStatus(), false));
9887
+ });
9888
+ }
9889
+ ngOnDestroy() {
9890
+ this._subscriptions.forEach((subscription) => subscription.unsubscribe());
9891
+ }
9892
+ handleRowVisible(row) {
9893
+ return __awaiter(this, void 0, void 0, function* () {
9894
+ yield this._transactionService.getGoodsReceiptStatus(this.transactionId, row.lineNr)
9895
+ .then((result) => {
9896
+ this.rowViewModels.set(row, new ReceiveGoodsViewModel(row, result, result.quantityToReceive === 0, result.quantityToReceive));
9897
+ });
9898
+ });
9899
+ }
9900
+ locationRequired(row) {
9901
+ return row.isLocationRequired || row.isBatchNrRequired || row.isSerialNrRequired;
9902
+ }
9903
+ handleDropDownSelected(warehouseNr) {
9904
+ return __awaiter(this, void 0, void 0, function* () {
9905
+ if (!this.locations) {
9906
+ yield this._articleService.getWarehouseLocations(warehouseNr).then((result) => {
9907
+ this.locations = result;
9908
+ });
9909
+ }
9910
+ });
9911
+ }
9912
+ getRowViewModel(row) {
9913
+ return this.rowViewModels.get(row);
9914
+ }
9915
+ handleReceiveSelectedPurchaseOrders(value) {
9916
+ return __awaiter(this, void 0, void 0, function* () {
9917
+ const selectedRows = [...this.rowViewModels.values()]
9918
+ .filter((row) => row.selected && row.toReceive !== 0);
9919
+ if (value.checkboxValue && selectedRows.length > 0) {
9920
+ const receivedGoodsRequest = new ReceiveGoodsForPurchaseOrderRequest();
9921
+ receivedGoodsRequest.transId = this.transactionId;
9922
+ receivedGoodsRequest.receivedDate = value.date;
9923
+ receivedGoodsRequest.packingSlipNr = value.id;
9924
+ receivedGoodsRequest.purchaseOrderLineReceiptDetailsDTOS = [];
9925
+ selectedRows.forEach((row) => {
9926
+ const detail = new PurchaseOrderLineReceiptDetails();
9927
+ detail.lineNr = row.transactionLine.lineNr;
9928
+ detail.quantityToReceive = row.toReceive;
9929
+ detail.warehouseNr = row.transactionLine.warehouseNumber;
9930
+ detail.locationNr = row.location;
9931
+ receivedGoodsRequest.purchaseOrderLineReceiptDetailsDTOS.push(detail);
9932
+ });
9933
+ yield this._transactionService.receiveGoodsForPurchaseOrder(receivedGoodsRequest).then(() => {
9934
+ this._handleAfterCommitReceivedOrders(selectedRows);
9935
+ });
9936
+ }
9937
+ });
9938
+ }
9939
+ _handleAfterCommitReceivedOrders(selectedRows) {
9940
+ selectedRows.forEach((row) => {
9941
+ row.goodsReceiptStatus.quantityToReceive = row.goodsReceiptStatus.quantityToReceive -= row.toReceive;
9942
+ row.toReceive = row.goodsReceiptStatus.quantityToReceive;
9943
+ if (row.goodsReceiptStatus.quantityToReceive !== 0) {
9944
+ row.selected = false;
9945
+ }
9946
+ });
9947
+ this._transactionEventService.receivedPurchaseOrderCommit.next(false);
9948
+ }
9949
+ handleTransactionLineChanged(change) {
9950
+ const receiveGoodsViewModel = this.rowViewModels.get(change.transactionLine);
9951
+ receiveGoodsViewModel.goodsReceiptStatus.quantityToReceive = change.goodsReceiptStatus.quantityToReceive;
9952
+ receiveGoodsViewModel.toReceive = change.goodsReceiptStatus.quantityToReceive;
9953
+ }
9954
+ }
9955
+ TransactionReceivedGoodsGridComponent.decorators = [
9956
+ { type: Component, args: [{
9957
+ selector: "co-transaction-received-goods-grid",
9958
+ template: `
9959
+ <co-transaction-base-grid [transactionLines]="transactionLines" (sidePanelClicked)="openSidePanel($event)" (rowVisible)="handleRowVisible($event)">
9960
+ <co-simple-grid-column [headerText]="'WAREHOUSE' | localize" [field]="'warehouseNumber'" [order]="40"></co-simple-grid-column>
9961
+ <co-simple-grid-column [headerText]="'LOCATION' | localize" [order]="45">
9962
+ <ng-template #template let-row = "row">
9963
+ <co-drop-down-list
9964
+ noTriangleGraphic
9965
+ (focus)="handleDropDownSelected(row.warehouseNumber)"
9966
+ [required]="locationRequired(row) && getRowViewModel(row).goodsReceiptStatus.quantityToReceive > 0"
9967
+ [collection]="locations"
9968
+ [fields]="locationDropdownFields"
9969
+ [(model)]="getRowViewModel(row).location"
9970
+ [disabled]="getRowViewModel(row).goodsReceiptStatus.quantityToReceive === 0"
9971
+ ></co-drop-down-list>
9972
+ </ng-template>
9973
+ </co-simple-grid-column>
9974
+ <co-simple-grid-column [headerText]="'IN_ORDER' | localize" [field]="'amount'" [order]="50"></co-simple-grid-column>
9975
+ <co-simple-grid-column [headerText]="'RECEIVED' | localize" [order]="51">
9976
+ <ng-template #template let-row = "row">
9977
+ <co-input-number-picker
9978
+ [min]="getRowViewModel(row).goodsReceiptStatus.quantityToReceive > 0 ? 1 : 0"
9979
+ [max]="getRowViewModel(row).goodsReceiptStatus.quantityToReceive"
9980
+ [(model)]="getRowViewModel(row).toReceive"
9981
+ [disabled]="getRowViewModel(row).goodsReceiptStatus.quantityToReceive === 0"
9982
+ [readonly]="getRowViewModel(row).goodsReceiptStatus.quantityToReceive === 0"
9983
+ ></co-input-number-picker>
9984
+ </ng-template>
9985
+ </co-simple-grid-column>
9986
+ <co-simple-grid-column [headerText]="'BATCH' | localize" [field]="'inOrder'" [order]="52"></co-simple-grid-column>
9987
+ <co-simple-grid-column [headerText]="'Commit button'" [field]="'commitButton'" [order]="55">
9988
+ <ng-template #template let-row = "row">
9989
+ <co-input-checkbox
9990
+ [(model)]="getRowViewModel(row).selected"
9991
+ [disabled]="getRowViewModel(row).goodsReceiptStatus.quantityToReceive === 0"
9992
+ ></co-input-checkbox>
9993
+ </ng-template>
9994
+ </co-simple-grid-column>
9995
+ </co-transaction-base-grid>
9098
9996
  `,
9099
9997
  encapsulation: ViewEncapsulation.None
9100
9998
  },] }
9101
9999
  ];
10000
+ TransactionReceivedGoodsGridComponent.ctorParameters = () => [
10001
+ { type: TransactionImageService },
10002
+ { type: TransactionService },
10003
+ { type: TransactionEventService },
10004
+ { type: ArticleService }
10005
+ ];
9102
10006
  TransactionReceivedGoodsGridComponent.propDecorators = {
9103
10007
  showClass: [{ type: HostBinding, args: ["class.co-transaction-received-goods-grid",] }]
9104
10008
  };
@@ -9120,7 +10024,7 @@ class TransactionMappingService {
9120
10024
  { title: 'LOGISTICS', icon: Icon.ShelvesSolid, category: TransactionTypeCategory.SalesOrderLogistics },
9121
10025
  { title: 'PLANNING', icon: Icon.TruckArrowRightSolid, category: TransactionTypeCategory.SalesOrderPlanning },
9122
10026
  { title: 'DELIVERY_NOTE', icon: Icon.MemoCircleCheckSolid, category: TransactionTypeCategory.SalesOrderDeliveryNote },
9123
- { title: 'INVOICE', icon: Icon.CartShoppingSolid, category: TransactionTypeCategory.SalesOrderInvoice }
10027
+ { title: 'INVOICE', icon: Icon.CartCheck, category: TransactionTypeCategory.SalesOrderInvoice }
9124
10028
  ]],
9125
10029
  ]);
9126
10030
  this._quickAccessComponent = new Map([
@@ -9289,7 +10193,7 @@ TransactionConfirmationHistoryComponent.decorators = [
9289
10193
  selector: "co-transaction-confirmation-history",
9290
10194
  template: `
9291
10195
  <div class="history-grid-wrapper">
9292
- <co-transaction-history-grid [transactionLines]="transactionLines">
10196
+ <co-transaction-history-grid [collection]="transactionLines">
9293
10197
  <co-simple-grid-column [headerText]="'PRICE' | localize" [field]="'price'" [order]="40"></co-simple-grid-column>
9294
10198
  <co-simple-grid-column [headerText]="'DATE' | localize" [field]="'date'" [order]="60"></co-simple-grid-column>
9295
10199
  </co-transaction-history-grid>
@@ -9324,13 +10228,36 @@ TransactionConfirmationHistoryModule.decorators = [
9324
10228
  ];
9325
10229
 
9326
10230
  class TransactionLineSidePanelPurchaseComponent {
9327
- constructor() {
10231
+ constructor(_service, _transactionEventService) {
10232
+ this._service = _service;
10233
+ this._transactionEventService = _transactionEventService;
9328
10234
  this.categories = TransactionTypeCategory;
9329
10235
  this.transactionLine = new TransactionLineInfo();
10236
+ this.quantityToReceiveChange = new EventEmitter();
10237
+ this.goodsReceiptStatus = new GoodsReceiptStatusWithHistory();
10238
+ }
10239
+ set transactionId(value) {
10240
+ if (value) {
10241
+ this._transactionId = value;
10242
+ this.getGoodsReceiptStatusWithHistory();
10243
+ }
10244
+ }
10245
+ get transactionId() {
10246
+ return this._transactionId;
9330
10247
  }
9331
10248
  showClass() {
9332
10249
  return true;
9333
10250
  }
10251
+ getGoodsReceiptStatusWithHistory() {
10252
+ return __awaiter(this, void 0, void 0, function* () {
10253
+ yield this._service.getGoodsReceiptStatusWithHistory(this._transactionId, this.transactionLine.lineNr)
10254
+ .then((result) => {
10255
+ this.goodsReceiptStatus = result;
10256
+ this._transactionEventService.transactionLineChanged.next({ transactionLine: this.transactionLine, goodsReceiptStatus: result });
10257
+ this.quantityToReceiveChange.next(result.quantityToReceive);
10258
+ });
10259
+ });
10260
+ }
9334
10261
  }
9335
10262
  TransactionLineSidePanelPurchaseComponent.decorators = [
9336
10263
  { type: Component, args: [{
@@ -9344,8 +10271,18 @@ TransactionLineSidePanelPurchaseComponent.decorators = [
9344
10271
  </ng-container>
9345
10272
 
9346
10273
  <ng-container *ngSwitchCase="categories.PurchaseOrderReceivedGoods">
9347
- <co-transaction-receiving-goods-details></co-transaction-receiving-goods-details>
9348
- <co-transaction-receiving-goods-history></co-transaction-receiving-goods-history>
10274
+ <co-transaction-receiving-goods-details
10275
+ [transactionId]="transactionId"
10276
+ [transactionLine]="transactionLine"
10277
+ [amountLeftToReceive]="goodsReceiptStatus.quantityToReceive"
10278
+ (reloadReceivingGoodsHistory)="getGoodsReceiptStatusWithHistory()"
10279
+ ></co-transaction-receiving-goods-details>
10280
+ <co-transaction-receiving-goods-history
10281
+ [transactionId]="transactionId"
10282
+ [transactionLine]="transactionLine"
10283
+ [goodsReceiptHistory]="goodsReceiptStatus.goodsReceiptHistory"
10284
+ (reloadReceivingGoodsHistory)="getGoodsReceiptStatusWithHistory()"
10285
+ ></co-transaction-receiving-goods-history>
9349
10286
  </ng-container>
9350
10287
 
9351
10288
  <ng-container *ngSwitchDefault>
@@ -9358,9 +10295,15 @@ TransactionLineSidePanelPurchaseComponent.decorators = [
9358
10295
  encapsulation: ViewEncapsulation.None
9359
10296
  },] }
9360
10297
  ];
10298
+ TransactionLineSidePanelPurchaseComponent.ctorParameters = () => [
10299
+ { type: TransactionService },
10300
+ { type: TransactionEventService }
10301
+ ];
9361
10302
  TransactionLineSidePanelPurchaseComponent.propDecorators = {
9362
- category: [{ type: Input }],
9363
10303
  transactionLine: [{ type: Input }],
10304
+ transactionId: [{ type: Input }],
10305
+ category: [{ type: Input }],
10306
+ quantityToReceiveChange: [{ type: Output }],
9364
10307
  showClass: [{ type: HostBinding, args: ["class.co-transaction-line-side-panel-purchase",] }]
9365
10308
  };
9366
10309
 
@@ -9688,7 +10631,8 @@ TransactionQuickAccessReceivedGoodsModule.decorators = [
9688
10631
  CommonModule,
9689
10632
  InputTextModule,
9690
10633
  PipeModule,
9691
- InputCheckboxModule
10634
+ InputCheckboxModule,
10635
+ InputDatePickerModule
9692
10636
  ],
9693
10637
  declarations: [
9694
10638
  TransactionQuickAccessReceivedGoodsComponent
@@ -9770,7 +10714,6 @@ class ViewModeButtonsComponent {
9770
10714
  this.viewModes = ContentViewMode;
9771
10715
  this.showViewModes = [this.viewModes.List, this.viewModes.Grid, this.viewModes.Tiles];
9772
10716
  this.viewModeChange = new EventEmitter();
9773
- this._activeViewMode = ContentViewMode.List;
9774
10717
  }
9775
10718
  showClass() {
9776
10719
  return true;
@@ -9782,6 +10725,9 @@ class ViewModeButtonsComponent {
9782
10725
  get activeViewMode() {
9783
10726
  return this._activeViewMode;
9784
10727
  }
10728
+ ngOnInit() {
10729
+ this.activeViewMode = this.showViewModes.includes(ContentViewMode.List) ? ContentViewMode.List : this.showViewModes[0];
10730
+ }
9785
10731
  }
9786
10732
  ViewModeButtonsComponent.decorators = [
9787
10733
  { type: Component, args: [{
@@ -9883,6 +10829,7 @@ class TransactionGridComponent {
9883
10829
  .create(this.injector);
9884
10830
  this.appRef.attachView(this._componentRef.hostView);
9885
10831
  this._componentRef.instance.transactionLines = this.transactionLines;
10832
+ this._componentRef.instance.transactionId = this.transactionId;
9886
10833
  this._componentRef.instance.sidePanelClicked = this.sidePanelClicked;
9887
10834
  const domElem = this._componentRef.hostView
9888
10835
  .rootNodes[0];
@@ -9912,6 +10859,7 @@ TransactionGridComponent.propDecorators = {
9912
10859
  container: [{ type: ViewChild, args: ['transactionGrid', { read: ElementRef },] }],
9913
10860
  transactionType: [{ type: Input }],
9914
10861
  activeCategory: [{ type: Input }],
10862
+ transactionId: [{ type: Input }],
9915
10863
  transactionLines: [{ type: Input }],
9916
10864
  sidePanelClicked: [{ type: Output }],
9917
10865
  showClass: [{ type: HostBinding, args: ["class.co-transaction-grid",] }]
@@ -9943,7 +10891,9 @@ TransactionReceivedGoodsGridModule.decorators = [
9943
10891
  TransactionBaseGridModule,
9944
10892
  SimpleGridModule,
9945
10893
  PipeModule,
9946
- InputCheckboxModule
10894
+ InputCheckboxModule,
10895
+ DropDownModule,
10896
+ InputNumberPickerModule
9947
10897
  ],
9948
10898
  declarations: [
9949
10899
  TransactionReceivedGoodsGridComponent
@@ -10024,10 +10974,8 @@ class TransactionSearchComponent {
10024
10974
  this.showFilterSidebar = false;
10025
10975
  }
10026
10976
  handleResetFilter() {
10027
- this.handleHideFilter();
10028
- setTimeout(() => {
10029
- this.handleShowFilter();
10030
- }, 10);
10977
+ this.showFilterSidebar = false;
10978
+ setTimeout(() => { this.showFilterSidebar = true; }, 10);
10031
10979
  }
10032
10980
  onTransactionClick(transaction) {
10033
10981
  this.transactionClick.emit(transaction);
@@ -10043,7 +10991,8 @@ TransactionSearchComponent.decorators = [
10043
10991
  (resetFilterClick)="handleResetFilter()"></co-transaction-filter>
10044
10992
  </div>
10045
10993
  <div class="transaction-search-result-wrapper">
10046
- <co-transaction-search-result (filterButtonClick)="handleShowFilter()" (transactionClick)="onTransactionClick($event)"></co-transaction-search-result>
10994
+ <co-transaction-search-result (filterButtonClick)="handleShowFilter()"
10995
+ (transactionClick)="onTransactionClick($event)"></co-transaction-search-result>
10047
10996
  </div>
10048
10997
  </div>
10049
10998
  `,
@@ -10063,6 +11012,110 @@ TransactionSearchComponent.propDecorators = {
10063
11012
  showClass: [{ type: HostBinding, args: ["class.co-transaction-search",] }]
10064
11013
  };
10065
11014
 
11015
+ class TransactionSearchGridComponent {
11016
+ constructor() {
11017
+ this.align = ColumnAlign;
11018
+ this.transactions = [];
11019
+ this.transactionClick = new EventEmitter();
11020
+ this.extraColumns = [];
11021
+ }
11022
+ set content(columnComponents) {
11023
+ this.extraColumns = columnComponents.toArray();
11024
+ }
11025
+ showClass() {
11026
+ return true;
11027
+ }
11028
+ onTransactionClick(transaction) {
11029
+ this.transactionClick.emit(transaction);
11030
+ }
11031
+ }
11032
+ TransactionSearchGridComponent.decorators = [
11033
+ { type: Component, args: [{
11034
+ selector: "co-transaction-search-grid",
11035
+ template: `
11036
+ <div>
11037
+ <co-simple-grid [data]="transactions" [extraColumns]="extraColumns" [dragDropEnabled]="true" [emitDragDrop]="false"
11038
+ (selectRow)="onTransactionClick($event)">
11039
+ <co-simple-grid-column [headerText]="'ACTIVE' | localize"
11040
+ [order]="10" [textAlign]="align.Center">
11041
+ <ng-template #template let-row= "row">
11042
+ <co-input-checkbox [model]="row.active" readonly></co-input-checkbox>
11043
+ </ng-template>
11044
+ </co-simple-grid-column>
11045
+ <co-simple-grid-column [headerText]="'NR' | localize" [field]="'transNr'" [order]="20"></co-simple-grid-column>
11046
+ <co-simple-grid-column [headerText]="'NAME' | localize" [field]="'relationName'"
11047
+ [order]="30"></co-simple-grid-column>
11048
+ <co-simple-grid-column [headerText]="'RELATION_NUMBER' | localize" [field]="'relationNr'"
11049
+ [order]="40"></co-simple-grid-column>
11050
+ <co-simple-grid-column [headerText]="'BRANCH' | localize" [field]="'brancheName'"
11051
+ [order]="50"></co-simple-grid-column>
11052
+ <co-simple-grid-column [headerText]="'ADDRESS' | localize" [field]="'adres'"
11053
+ [order]="70"></co-simple-grid-column>
11054
+ <co-simple-grid-column [headerText]="'REFERENCE_RELATION' | localize" [field]="'relationReference'" [order]="80"></co-simple-grid-column>
11055
+ <co-simple-grid-column [headerText]="'PREFERRED_DATE' | localize"
11056
+ [order]="90" [textAlign]="align.Right" [resizable]="false">
11057
+ <ng-template #template let-row = "row">
11058
+ <div [textContent]=""></div> <!--todo: wachten op aanpassing api-->
11059
+ </ng-template>
11060
+ </co-simple-grid-column>
11061
+ <co-simple-grid-column [headerText]="'TRANSACTION_DATE' | localize"
11062
+ [order]="100" [textAlign]="align.Right" [resizable]="false">
11063
+ <ng-template #template let-row = "row">
11064
+ <div [textContent]="row.transDate | date:'dd MMM yyyy'"></div>
11065
+ </ng-template>
11066
+ </co-simple-grid-column>
11067
+ <co-simple-grid-column [headerText]="'ORDER_DEFINITIVE' | localize"
11068
+ [order]="105" [textAlign]="align.Center">
11069
+ <ng-template #template let-row= "row">
11070
+ <co-input-checkbox [model]="row.transactionDefinitive" readonly></co-input-checkbox>
11071
+ </ng-template>
11072
+ </co-simple-grid-column>
11073
+ <co-simple-grid-column [headerText]="'DELIVERY_DATE' | localize"
11074
+ [order]="110" [textAlign]="align.Right" [resizable]="false" >
11075
+ <ng-template #template let-row = "row">
11076
+ <div [textContent]="row.deliveryDate | date:'dd MMM yyyy'"></div>
11077
+ </ng-template>
11078
+ </co-simple-grid-column>
11079
+ <co-simple-grid-column [headerText]="'DELIVERY_DATE_DEFINITIVE' | localize"
11080
+ [order]="115" [textAlign]="align.Center">
11081
+ <ng-template #template let-row= "row">
11082
+ <co-input-checkbox [model]="row.deliveryDateDefinitive" readonly></co-input-checkbox>
11083
+ </ng-template>
11084
+ </co-simple-grid-column>
11085
+ </co-simple-grid>
11086
+ </div>
11087
+ `,
11088
+ encapsulation: ViewEncapsulation.None
11089
+ },] }
11090
+ ];
11091
+ TransactionSearchGridComponent.ctorParameters = () => [];
11092
+ TransactionSearchGridComponent.propDecorators = {
11093
+ content: [{ type: ContentChildren, args: [SimpleGridColumnDirective,] }],
11094
+ showClass: [{ type: HostBinding, args: ["class.co-transaction-search-grid",] }],
11095
+ transactions: [{ type: Input }],
11096
+ transactionClick: [{ type: Output }]
11097
+ };
11098
+
11099
+ class TransactionSearchGridModule {
11100
+ }
11101
+ TransactionSearchGridModule.decorators = [
11102
+ { type: NgModule, args: [{
11103
+ imports: [
11104
+ CommonModule,
11105
+ CoreModule,
11106
+ PipeModule,
11107
+ SimpleGridModule,
11108
+ InputCheckboxModule
11109
+ ],
11110
+ declarations: [
11111
+ TransactionSearchGridComponent
11112
+ ],
11113
+ exports: [
11114
+ TransactionSearchGridComponent
11115
+ ]
11116
+ },] }
11117
+ ];
11118
+
10066
11119
  class TransactionTileComponent {
10067
11120
  constructor(iconCacheService) {
10068
11121
  this.iconCacheService = iconCacheService;
@@ -10095,10 +11148,7 @@ TransactionTileComponent.decorators = [
10095
11148
  </div>
10096
11149
  </div>
10097
11150
  <div class="transaction-tile-order-summary">
10098
- <div class="header"><span [textContent]="'€32.519'"></span></div>
10099
- <div>
10100
- <co-button [textContent]="'Besteld'"></co-button>
10101
- </div>
11151
+ <div class="header"><span [textContent]="'€12.345'"></span></div> <!--todo: vullen als api aanpassing gedaan is-->
10102
11152
  </div>
10103
11153
  </div>
10104
11154
  <div class="transaction-tile-footer">
@@ -10190,8 +11240,10 @@ TransactionSearchService.ctorParameters = () => [
10190
11240
  ];
10191
11241
 
10192
11242
  class TransactionSearchResultComponent {
10193
- constructor(searchService) {
11243
+ constructor(searchService, iconCacheService) {
10194
11244
  this.searchService = searchService;
11245
+ this.iconCacheService = iconCacheService;
11246
+ this.icon = Icon;
10195
11247
  this.viewModes = ContentViewMode;
10196
11248
  this.filterButtonClick = new EventEmitter();
10197
11249
  this.transactionClick = new EventEmitter();
@@ -10202,7 +11254,7 @@ class TransactionSearchResultComponent {
10202
11254
  }
10203
11255
  ngOnInit() {
10204
11256
  }
10205
- onTileClick(transaction) {
11257
+ onTransactionClick(transaction) {
10206
11258
  this.transactionClick.emit(transaction);
10207
11259
  }
10208
11260
  }
@@ -10215,22 +11267,28 @@ TransactionSearchResultComponent.decorators = [
10215
11267
  [(model)]="searchService.searchRequest.general"
10216
11268
  [placeholder]="'Waar ben je naar op zoek?'"
10217
11269
  (search)="searchService.searchTransactions()"></co-input-search>
10218
- <co-button class="transaction-search-filter-button" [label]="'Filter'"
11270
+ <co-button class="transaction-search-filter-button" [iconData]="iconCacheService.getIcon(icon.BarsFilter)"
10219
11271
  (click)="filterButtonClick.emit()"></co-button>
10220
11272
  </div>
10221
11273
  <co-view-mode-buttons [showViewModes]="[viewModes.Tiles, viewModes.Grid]"
10222
11274
  (viewModeChange)="activeViewMode = $event"></co-view-mode-buttons>
10223
11275
  <div class="transaction-search-result-content-tiles-wrapper" *ngIf="activeViewMode === viewModes.Tiles">
10224
11276
  <div class="transaction-tile" *ngFor="let transaction of searchService.transactions">
10225
- <co-transaction-tile [transaction]="transaction" (tileClick)="onTileClick(transaction)"></co-transaction-tile>
11277
+ <co-transaction-tile [transaction]="transaction"
11278
+ (tileClick)="onTransactionClick(transaction)"></co-transaction-tile>
10226
11279
  </div>
10227
11280
  </div>
11281
+ <div class="transaction-search-result-content-grid-wrapper" *ngIf="activeViewMode === viewModes.Grid">
11282
+ <co-transaction-search-grid [transactions]="searchService.transactions"
11283
+ (transactionClick)="onTransactionClick($event)"></co-transaction-search-grid>
11284
+ </div>
10228
11285
  `,
10229
11286
  encapsulation: ViewEncapsulation.None
10230
11287
  },] }
10231
11288
  ];
10232
11289
  TransactionSearchResultComponent.ctorParameters = () => [
10233
- { type: TransactionSearchService }
11290
+ { type: TransactionSearchService },
11291
+ { type: IconCacheService }
10234
11292
  ];
10235
11293
  TransactionSearchResultComponent.propDecorators = {
10236
11294
  filterButtonClick: [{ type: Output }],
@@ -10248,7 +11306,8 @@ TransactionSearchResultModule.decorators = [
10248
11306
  ButtonModule,
10249
11307
  ViewModeButtonsModule,
10250
11308
  AvatarModule,
10251
- TransactionTileModule
11309
+ TransactionTileModule,
11310
+ TransactionSearchGridModule
10252
11311
  ],
10253
11312
  declarations: [
10254
11313
  TransactionSearchResultComponent
@@ -10259,11 +11318,70 @@ TransactionSearchResultModule.decorators = [
10259
11318
  },] }
10260
11319
  ];
10261
11320
 
11321
+ class FilterItemViewmodel {
11322
+ constructor(code, description, checked, count) {
11323
+ this.checked = false;
11324
+ this.code = code;
11325
+ this.description = description === null || description === void 0 ? void 0 : description.toString();
11326
+ this.count = count;
11327
+ }
11328
+ }
11329
+
11330
+ class FilterViewmodel {
11331
+ constructor(collection, fields) {
11332
+ this.filterItems = [];
11333
+ collection.forEach((item) => {
11334
+ var _a, _b;
11335
+ this.filterItems.push(new FilterItemViewmodel(item[fields.value], item[fields.text], (_a = item.checked) !== null && _a !== void 0 ? _a : false, (_b = item.count) !== null && _b !== void 0 ? _b : null));
11336
+ });
11337
+ }
11338
+ }
11339
+
10262
11340
  class FilterRequestService {
10263
- constructor(_transactionService) {
11341
+ constructor(searchService, _transactionService) {
11342
+ this.searchService = searchService;
10264
11343
  this._transactionService = _transactionService;
10265
11344
  }
10266
- getFilterRequestForCollectionRange(collection) {
11345
+ handleCollectionChangeForRange(collection, modelName) {
11346
+ this.searchService.searchRequest[modelName] = this._getFilterRequestForCollectionRange(collection);
11347
+ }
11348
+ handleCollectionChangeForArray(collection, modelName) {
11349
+ this.searchService.searchRequest[modelName] = this._getFilterRequestForCollectionArray(collection);
11350
+ }
11351
+ //todo: tijdelijk totdat filter-item single select ondersteunt
11352
+ handleCollectionChangeForSingleValue(value, modelName) {
11353
+ this.searchService.searchRequest[modelName] = value;
11354
+ }
11355
+ //todo: tijdelijk totdat filter-item single select ondersteunt
11356
+ handleCollectionChangeForSingleNumber(value, modelName) {
11357
+ this.searchService.searchRequest[modelName] = value;
11358
+ }
11359
+ handleCheckboxValueChangeForString(value, modelName) {
11360
+ this.searchService.searchRequest[modelName] = this._getFilterRequestForBooleanToString(value);
11361
+ }
11362
+ handleCheckboxValueChangeForNumber(value, modelName) {
11363
+ this.searchService.searchRequest[modelName] = value ? 1 : 0;
11364
+ }
11365
+ handleDateRangeChange(dates, modelName) {
11366
+ if (dates) {
11367
+ let startDate = dates[0];
11368
+ let endDate = dates[1];
11369
+ this.searchService.searchRequest[modelName] = this._getFilterRequestForDateRange(startDate, endDate);
11370
+ }
11371
+ }
11372
+ getDateFromFilterRequestRange(filterRequestRange, index) {
11373
+ if (filterRequestRange) {
11374
+ const datePattern = new RegExp('\\d{2}\\-\\d{2}\\-\\d{4}');
11375
+ let dateString = filterRequestRange
11376
+ .split(',')[index]
11377
+ .match(datePattern)[0];
11378
+ const day = Number(dateString.match('^\\d{2}')[0]);
11379
+ const month = Number(dateString.match('(?<=\\-)(\\d{2})(?=\\-)')[0]) - 1;
11380
+ const year = Number(dateString.match('\\d{4}')[0]);
11381
+ return new Date(year, month, day);
11382
+ }
11383
+ }
11384
+ _getFilterRequestForCollectionRange(collection) {
10267
11385
  let filterRequest = '';
10268
11386
  collection === null || collection === void 0 ? void 0 : collection.forEach(item => {
10269
11387
  if (item.checked) {
@@ -10273,78 +11391,107 @@ class FilterRequestService {
10273
11391
  });
10274
11392
  return filterRequest;
10275
11393
  }
10276
- getFilterRequestForCollectionArray(collection) {
11394
+ _getFilterRequestForBooleanToString(value) {
11395
+ let filterRequest = '';
11396
+ if (value) {
11397
+ filterRequest = "?='J'";
11398
+ }
11399
+ else {
11400
+ filterRequest = "?='N'";
11401
+ }
11402
+ return filterRequest;
11403
+ }
11404
+ _getFilterRequestForCollectionArray(collection) {
10277
11405
  let filterRequest = [];
10278
11406
  collection === null || collection === void 0 ? void 0 : collection.forEach(item => {
10279
11407
  if (item.checked) {
11408
+ filterRequest.push(item.code.toString());
10280
11409
  }
10281
- filterRequest.push(item.code.toString());
10282
11410
  });
10283
11411
  return filterRequest;
10284
11412
  }
10285
- getFilterRequestForDateRange(startDate, endDate) {
10286
- const startDateRequest = startDate ? this.formatDate(startDate) : '';
10287
- const endDateRequest = endDate ? this.formatDate(endDate) : '';
10288
- return `?=\'${startDateRequest}\',\'${endDateRequest}\'`;
10289
- }
10290
- getDateFromFilterRequestRange(filterRequestRange, index) {
10291
- if (filterRequestRange) {
10292
- let dateRange = filterRequestRange.replace("?=", "");
10293
- let date = Number(dateRange
10294
- .split(",")[index]
10295
- .replace("'", "")
10296
- .replace("'", ""));
10297
- return new Date(date);
10298
- }
11413
+ _getFilterRequestForDateRange(startDate, endDate) {
11414
+ const startDateRequest = startDate ? this._formatDateToString(startDate) : '';
11415
+ const endDateRequest = endDate ? this._formatDateToString(endDate) : '';
11416
+ return `?>=\'${startDateRequest}\'& ?<=\'${endDateRequest}\'`;
10299
11417
  }
10300
- formatDate(date) {
11418
+ _formatDateToString(date) {
10301
11419
  let day = date.getDate().toString().padStart(2, '0');
10302
11420
  let month = (date.getMonth() + 1).toString().padStart(2, '0');
10303
11421
  let year = date.getFullYear();
10304
11422
  return `${day}-${month}-${year}`;
10305
11423
  }
10306
11424
  }
10307
- FilterRequestService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FilterRequestService_Factory() { return new FilterRequestService(i0.ɵɵinject(TransactionService)); }, token: FilterRequestService, providedIn: "root" });
11425
+ FilterRequestService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FilterRequestService_Factory() { return new FilterRequestService(i0.ɵɵinject(TransactionSearchService), i0.ɵɵinject(TransactionService)); }, token: FilterRequestService, providedIn: "root" });
10308
11426
  FilterRequestService.decorators = [
10309
11427
  { type: Injectable, args: [{
10310
11428
  providedIn: "root"
10311
11429
  },] }
10312
11430
  ];
10313
11431
  FilterRequestService.ctorParameters = () => [
11432
+ { type: TransactionSearchService },
10314
11433
  { type: TransactionService }
10315
11434
  ];
10316
11435
 
10317
11436
  class TransactionFilterContentArticleComponent {
10318
- constructor(searchService, _transactionService, _filterRequestService) {
11437
+ constructor(searchService, filterRequestService, _transactionService) {
10319
11438
  this.searchService = searchService;
11439
+ this.filterRequestService = filterRequestService;
10320
11440
  this._transactionService = _transactionService;
10321
- this._filterRequestService = _filterRequestService;
10322
- this.searchRequestChange = new EventEmitter();
11441
+ this.searchRequest = this.searchService.searchRequest;
10323
11442
  this.searchPlaceholder = "SEARCH_IN_COLLECTION";
11443
+ this.showMoreLabel = "SHOW_MORE";
11444
+ this.showLessLabel = "SHOW_LESS";
10324
11445
  this.articleNumberFields = { text: "description", value: "code" };
11446
+ this.exceedanceCodeFields = { text: "description", value: "code" };
11447
+ this.turnoverGroupFields = { text: "description", value: "turnovergroupNr" };
11448
+ this.mainArticleFields = { text: "description", value: "articlenumber" };
11449
+ this.supplierFields = { text: "displayName", value: "relationId" };
11450
+ this.getArticles = (text) => {
11451
+ const request = new ArticleExtendedRequest();
11452
+ request.articleNumber = text;
11453
+ return this._transactionService.getArticles(request).then((articles) => {
11454
+ return new FilterViewmodel(articles, { text: 'articleNumber', value: 'articleNumber' }).filterItems;
11455
+ });
11456
+ };
10325
11457
  }
10326
11458
  showClass() {
10327
11459
  return true;
10328
11460
  }
10329
11461
  ngOnInit() {
10330
- this._getArticleNumbers();
11462
+ this._setExceedanceCodes();
11463
+ this._setSuppliers();
11464
+ this._setTurnoverGroups();
11465
+ this._setMainArticles();
11466
+ }
11467
+ onFilterButtonClick() {
11468
+ this.searchService.searchTransactions();
10331
11469
  }
10332
- //Artikelnummer
10333
- _getArticleNumbers() {
11470
+ handleCollectionChangeArticleNumber(collection) {
11471
+ const checkedItem = collection.find(c => c.checked);
11472
+ this.filterRequestService.handleCollectionChangeForSingleValue(checkedItem ? checkedItem.code + "" : "", 'articleNr');
10334
11473
  }
10335
- handleCollectionChangeForRange(collection, model) {
10336
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForCollectionRange(collection);
11474
+ _setExceedanceCodes() {
11475
+ this._transactionService.getInOutCollection("NL").then((exceedanceCodes) => {
11476
+ this.exceedanceCodes = new FilterViewmodel(exceedanceCodes, this.exceedanceCodeFields).filterItems;
11477
+ });
10337
11478
  }
10338
- handleCollectionChangeForArray(collection, model) {
10339
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForCollectionArray(collection);
11479
+ _setTurnoverGroups() {
11480
+ this._transactionService.getTurnoverGroups().then((turnoverGroups) => {
11481
+ this.turnoverGroups = new FilterViewmodel(turnoverGroups, this.turnoverGroupFields).filterItems;
11482
+ });
10340
11483
  }
10341
- handleDateRangeChange(dates, model) {
10342
- let startDate = dates[0];
10343
- let endDate = dates[1];
10344
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForDateRange(startDate, endDate);
11484
+ _setMainArticles() {
11485
+ this._transactionService.getMainArticles().then((articles) => {
11486
+ this.mainArticles = new FilterViewmodel(articles, this.mainArticleFields).filterItems;
11487
+ });
10345
11488
  }
10346
- onFilterButtonClick() {
10347
- this.searchService.searchTransactions();
11489
+ _setSuppliers() {
11490
+ const request = new RelationRequest();
11491
+ request.relationType = RelationKind.Supplier;
11492
+ this._transactionService.getRelationListObjects(request).then((relationListObjects) => {
11493
+ this.suppliers = new FilterViewmodel(relationListObjects, this.supplierFields).filterItems;
11494
+ });
10348
11495
  }
10349
11496
  }
10350
11497
  TransactionFilterContentArticleComponent.decorators = [
@@ -10353,48 +11500,57 @@ TransactionFilterContentArticleComponent.decorators = [
10353
11500
  template: `
10354
11501
  <div class="transaction-filter-content-article-wrapper">
10355
11502
 
10356
- <!--Artikelnummer: nog geen call in de API? -->
11503
+ <!--Artikelnummer-->
10357
11504
  <co-filter-item
10358
11505
  [placeholder]="'ARTICLE_NR' | localize"
10359
11506
  [expanded]="true"
11507
+ [singleSelect]="true"
11508
+ [minSearchCharsToLoadCollection]="3"
11509
+ [collectionLoadFn]="getArticles"
11510
+ (collectionChange)="handleCollectionChangeArticleNumber($event)"
10360
11511
  >
10361
-
10362
11512
  </co-filter-item>
10363
11513
 
10364
- <!--Omzetgroep: nog geen call in de API? -->
11514
+ <!--Omzetgroep-->
10365
11515
  <co-filter-item
10366
11516
  [placeholder]="'TURNOVER_GROUP' | localize"
10367
- [customContent]="true"
10368
- [expanded]="true">
10369
- <co-input-text [(model)]="searchRequest.rangeTurnoverGroup"
10370
- [placeholder]="'TURNOVER_GROUP' | localize"></co-input-text>
11517
+ [expanded]="true"
11518
+ [collection]="turnoverGroups"
11519
+ (collectionChange)="filterRequestService.handleCollectionChangeForRange($event, 'rangeTurnoverGroup')"
11520
+ >
10371
11521
  </co-filter-item>
10372
11522
 
10373
- <!--Hoofdartikel: nog geen call in de API? -->
11523
+ <!--Hoofdartikel-->
10374
11524
  <co-filter-item
10375
11525
  [placeholder]="'MAIN_ARTICLE' | localize"
10376
- [customContent]="true"
10377
- [expanded]="true">
10378
- <co-input-text [(model)]="searchRequest.mainArticleNrRange"
10379
- [placeholder]="'MAIN_ARTICLE' | localize"></co-input-text>
11526
+ [expanded]="true"
11527
+ [collection]="mainArticles"
11528
+ (collectionChange)="filterRequestService.handleCollectionChangeForRange($event, 'mainArticleNrRange')"
11529
+ >
10380
11530
  </co-filter-item>
10381
11531
 
10382
- <!--Uitloopcode: nog geen call in de API? -->
11532
+ <!--Uitloopcode -->
10383
11533
  <co-filter-item
10384
11534
  [placeholder]="'EXCEEDENCE_CODE' | localize"
10385
- [customContent]="true"
10386
- [expanded]="true">
10387
- <co-input-text [(model)]="searchRequest.exceedanceCodes"
10388
- [placeholder]="'EXCEEDENCE_CODE' | localize"></co-input-text>
11535
+ [expanded]="true"
11536
+ [collection]="exceedanceCodes"
11537
+ [searchPlaceholder]="searchPlaceholder | localize"
11538
+ [showMoreLabel]="showMoreLabel | localize"
11539
+ [showLessLabel]="showLessLabel | localize"
11540
+ (collectionChange)="filterRequestService.handleCollectionChangeForArray($event, 'exceedanceCodes')"
11541
+ >
10389
11542
  </co-filter-item>
10390
11543
 
10391
- <!--Leverancier: nog geen call in de API? -->
11544
+ <!--Leverancier-->
10392
11545
  <co-filter-item
10393
11546
  [placeholder]="'SUPPLIER' | localize"
10394
- [customContent]="true"
10395
- [expanded]="true">
10396
- <co-input-text [(model)]="searchRequest.rangeSupplier"
10397
- [placeholder]="'SUPPLIER' | localize"></co-input-text>
11547
+ [expanded]="true"
11548
+ [collection]="suppliers"
11549
+ [searchPlaceholder]="searchPlaceholder | localize"
11550
+ [showMoreLabel]="showMoreLabel | localize"
11551
+ [showLessLabel]="showLessLabel | localize"
11552
+ (collectionChange)="filterRequestService.handleCollectionChangeForRange($event, 'rangeSupplier')"
11553
+ >
10398
11554
  </co-filter-item>
10399
11555
  <div class="filter-button-container">
10400
11556
  <co-button class="clickable" [label]="'Filter'" (click)="onFilterButtonClick()"></co-button>
@@ -10405,12 +11561,10 @@ TransactionFilterContentArticleComponent.decorators = [
10405
11561
  ];
10406
11562
  TransactionFilterContentArticleComponent.ctorParameters = () => [
10407
11563
  { type: TransactionSearchService },
10408
- { type: TransactionService },
10409
- { type: FilterRequestService }
11564
+ { type: FilterRequestService },
11565
+ { type: TransactionService }
10410
11566
  ];
10411
11567
  TransactionFilterContentArticleComponent.propDecorators = {
10412
- searchRequest: [{ type: Input }],
10413
- searchRequestChange: [{ type: Output }],
10414
11568
  showClass: [{ type: HostBinding, args: ["class.co-transaction-filter-content-article",] }]
10415
11569
  };
10416
11570
 
@@ -10434,35 +11588,17 @@ TransactionFilterContentArticleModule.decorators = [
10434
11588
  },] }
10435
11589
  ];
10436
11590
 
10437
- class FilterItemViewmodel {
10438
- constructor(code, description, checked, count) {
10439
- this.checked = false;
10440
- this.code = code;
10441
- this.description = description === null || description === void 0 ? void 0 : description.toString();
10442
- this.count = count;
10443
- }
10444
- }
10445
-
10446
- class FilterViewmodel {
10447
- constructor(collection, fields) {
10448
- this.filterItems = [];
10449
- collection.forEach((item) => {
10450
- var _a, _b;
10451
- this.filterItems.push(new FilterItemViewmodel(item[fields.value], item[fields.text], (_a = item.checked) !== null && _a !== void 0 ? _a : false, (_b = item.count) !== null && _b !== void 0 ? _b : null));
10452
- });
10453
- }
10454
- }
10455
-
10456
11591
  class TransactionFilterContentLogisticsComponent {
10457
- constructor(searchService, _transactionService, _filterRequestService) {
11592
+ constructor(searchService, filterRequestService, _transactionService) {
10458
11593
  this.searchService = searchService;
11594
+ this.filterRequestService = filterRequestService;
10459
11595
  this._transactionService = _transactionService;
10460
- this._filterRequestService = _filterRequestService;
10461
- this.searchRequestChange = new EventEmitter();
11596
+ this.searchRequest = this.searchService.searchRequest;
10462
11597
  this.searchPlaceholder = "SEARCH_IN_COLLECTION";
11598
+ this.showMoreLabel = "SHOW_MORE";
11599
+ this.showLessLabel = "SHOW_LESS";
10463
11600
  this.deliveryMethods = [];
10464
11601
  this.deliveryMethodFields = { text: "description", value: "code" };
10465
- this.warehouses = [];
10466
11602
  this.warehouseFields = { text: "description", value: "warehouseNo" };
10467
11603
  }
10468
11604
  showClass() {
@@ -10470,41 +11606,33 @@ class TransactionFilterContentLogisticsComponent {
10470
11606
  }
10471
11607
  ngOnInit() {
10472
11608
  this._setRangeDates();
10473
- this._getDeliveryMethods();
10474
- this._getWarehouses();
11609
+ this._setDeliveryMethods();
11610
+ this._setWarehouses();
11611
+ }
11612
+ onFilterButtonClick() {
11613
+ this.searchService.searchTransactions();
11614
+ }
11615
+ handleAllocatedChange(value) {
11616
+ console.log(value);
10475
11617
  }
10476
11618
  _setRangeDates() {
10477
- this.confirmedDeliveryStartDate = this._filterRequestService.getDateFromFilterRequestRange(this.searchRequest.confirmedDeliveryDateRange, 0);
10478
- this.confirmedDeliveryEndDate = this._filterRequestService.getDateFromFilterRequestRange(this.searchRequest.confirmedDeliveryDateRange, 1);
10479
- this.arrivalStartDate = this._filterRequestService.getDateFromFilterRequestRange(this.searchRequest.arrivalDateRange, 0);
10480
- this.arrivalEndDate = this._filterRequestService.getDateFromFilterRequestRange(this.searchRequest.arrivalDateRange, 1);
11619
+ this.confirmedDeliveryStartDate = this.filterRequestService.getDateFromFilterRequestRange(this.searchRequest.confirmedDeliveryDateRange, 0);
11620
+ this.confirmedDeliveryEndDate = this.filterRequestService.getDateFromFilterRequestRange(this.searchRequest.confirmedDeliveryDateRange, 1);
11621
+ this.arrivalStartDate = this.filterRequestService.getDateFromFilterRequestRange(this.searchRequest.arrivalDateRange, 0);
11622
+ this.arrivalEndDate = this.filterRequestService.getDateFromFilterRequestRange(this.searchRequest.arrivalDateRange, 1);
10481
11623
  }
10482
11624
  //Delivery Methods
10483
- _getDeliveryMethods() {
11625
+ _setDeliveryMethods() {
10484
11626
  this._transactionService.getDeliveryMethods().then((deliveryMethods) => {
10485
11627
  this.deliveryMethods = new FilterViewmodel(deliveryMethods, this.deliveryMethodFields).filterItems;
10486
11628
  });
10487
11629
  }
10488
11630
  //Warehouses
10489
- _getWarehouses() {
11631
+ _setWarehouses() {
10490
11632
  this._transactionService.getWarehouses().then((warehouses) => {
10491
- this.warehouses = warehouses;
11633
+ this.warehouses = new FilterViewmodel(warehouses, this.warehouseFields).filterItems;
10492
11634
  });
10493
11635
  }
10494
- handleCollectionChangeForRange(collection, model) {
10495
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForCollectionRange(collection);
10496
- }
10497
- handleCollectionChangeForArray(collection, model) {
10498
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForCollectionArray(collection);
10499
- }
10500
- handleDateRangeChange(dates, model) {
10501
- let startDate = dates[0];
10502
- let endDate = dates[1];
10503
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForDateRange(startDate, endDate);
10504
- }
10505
- onFilterButtonClick() {
10506
- this.searchService.searchTransactions();
10507
- }
10508
11636
  }
10509
11637
  TransactionFilterContentLogisticsComponent.decorators = [
10510
11638
  { type: Component, args: [{
@@ -10512,70 +11640,60 @@ TransactionFilterContentLogisticsComponent.decorators = [
10512
11640
  template: `
10513
11641
  <div class="transaction-filter-content-logistics-wrapper">
10514
11642
 
10515
- <!--Levermethode (werkt)-->
11643
+ <!--Levermethode-->
10516
11644
  <co-filter-item
10517
11645
  [placeholder]="'DELIVERY_METHOD' | localize"
10518
11646
  [expanded]="true"
10519
11647
  [collection]="deliveryMethods"
10520
11648
  [searchPlaceholder]="searchPlaceholder | localize"
10521
- (collectionChange)="handleCollectionChangeForRange($event, 'rangeDeliveryMethod')">
11649
+ [showMoreLabel]="showMoreLabel | localize"
11650
+ [showLessLabel]="showLessLabel | localize"
11651
+ (collectionChange)="filterRequestService.handleCollectionChangeForRange($event, 'rangeDeliveryMethod')">
10522
11652
  </co-filter-item>
10523
11653
 
10524
11654
 
10525
- <!--Leverdatum definitief: werkt nog niet: waarde uit domein moet boolean zijn?-->
11655
+ <!--Leverdatum definitief-->
10526
11656
  <co-filter-item
10527
11657
  [placeholder]="'DELIVERY_DATE_FINAL' | localize"
10528
11658
  [customContent]="true"
10529
11659
  [expanded]="true">
10530
11660
  <co-input-checkbox
10531
- [(model)]="!!searchRequest.deliveryDateDefinitive"
11661
+ [model]="searchRequest.deliveryDateDefinitive === 'J'"
11662
+ (modelChange)="filterRequestService.handleCheckboxValueChangeForString($event, 'deliveryDateDefinitive')"
10532
11663
  [label]="'DELIVERY_DATE_FINAL' | localize"></co-input-checkbox>
10533
11664
  </co-filter-item>
10534
11665
 
10535
- <!--Toegewezen: dit is een quantity in het domain. Zoeken met range oid?-->
10536
- <co-filter-item
10537
- [placeholder]="'ALLOCATED' | localize"
10538
- [customContent]="true"
10539
- [expanded]="true">
10540
- <co-input-text [(model)]="searchRequest.quantityAllocated"
10541
- [placeholder]="'ALLOCATED' | localize"></co-input-text>
10542
- </co-filter-item>
11666
+ <!--Toegewezen-->
11667
+ <co-transaction-filter-historic-state
11668
+ [label]="'ALLOCATED'"
11669
+ (filterClicked)="filterRequestService.handleCollectionChangeForSingleNumber($event, 'quantityAllocated')"
11670
+ ></co-transaction-filter-historic-state>
10543
11671
 
10544
- <!--Geleverd: dit is een quantity in het domain. Zoeken met range oid?-->
10545
- <co-filter-item
10546
- [placeholder]="'DELIVERED' | localize"
10547
- [customContent]="true"
10548
- [expanded]="true">
10549
- <co-input-text [(model)]="searchRequest.quantityDelivered"
10550
- [placeholder]="'DELIVERED' | localize"></co-input-text>
10551
- </co-filter-item>
11672
+ <!--Geleverd-->
11673
+ <co-transaction-filter-historic-state
11674
+ [label]="'DELIVERED'"
11675
+ (filterClicked)="filterRequestService.handleCollectionChangeForSingleNumber($event, 'quantityDelivered')"
11676
+ ></co-transaction-filter-historic-state>
10552
11677
 
10553
- <!--Gefactureerd: dit is een quantity in het domain. Zoeken met range oid?-->
10554
- <co-filter-item
10555
- [placeholder]="'INVOICED' | localize"
10556
- [customContent]="true"
10557
- [expanded]="true">
10558
- <co-input-text [(model)]="searchRequest.quantityInvoiced" [placeholder]="'INVOICED' | localize"></co-input-text>
10559
- </co-filter-item>
11678
+ <!--Gefactureerd-->
11679
+ <co-transaction-filter-historic-state
11680
+ [label]="'INVOICED'"
11681
+ (filterClicked)="filterRequestService.handleCollectionChangeForSingleNumber($event, 'quantityInvoiced')"
11682
+ ></co-transaction-filter-historic-state>
10560
11683
 
10561
- <!--Te picken: dit is een quantity in het domain. Zoeken met range oid?-->
10562
- <co-filter-item
10563
- [placeholder]="'TO_BE_PICKED' | localize"
10564
- [customContent]="true"
10565
- [expanded]="true">
10566
- <co-input-text [(model)]="searchRequest.quantityToBePicked"
10567
- [placeholder]="'TO_BE_PICKED' | localize"></co-input-text>
10568
- </co-filter-item>
11684
+ <!--Te picken-->
11685
+ <co-transaction-filter-historic-state
11686
+ [label]="'TO_BE_PICKED'"
11687
+ (filterClicked)="filterRequestService.handleCollectionChangeForSingleNumber($event, 'quantityToBePicked')"
11688
+ ></co-transaction-filter-historic-state>
10569
11689
 
10570
- <!--Gepicked: dit is een quantity in het domain. Zoeken met range oid?-->
10571
- <co-filter-item
10572
- [placeholder]="'PICKED' | localize"
10573
- [customContent]="true"
10574
- [expanded]="true">
10575
- <co-input-text [(model)]="searchRequest.quantityPicked" [placeholder]="'PICED' | localize"></co-input-text>
10576
- </co-filter-item>
11690
+ <!--Gepicked-->
11691
+ <co-transaction-filter-historic-state
11692
+ [label]="'PICKED'"
11693
+ (filterClicked)="filterRequestService.handleCollectionChangeForSingleNumber($event, 'quantityPicked')"
11694
+ ></co-transaction-filter-historic-state>
10577
11695
 
10578
- <!--Bevestigde leverdatum: range picker werkt, alleen output filter niet goed? -->
11696
+ <!--Bevestigde leverdatum-->
10579
11697
  <co-filter-item
10580
11698
  [placeholder]="'CONFIRMED_DELIVERY_DATE' | localize"
10581
11699
  [customContent]="true"
@@ -10583,12 +11701,12 @@ TransactionFilterContentLogisticsComponent.decorators = [
10583
11701
  <co-input-date-range
10584
11702
  [startDate]="confirmedDeliveryStartDate"
10585
11703
  [endDate]="confirmedDeliveryEndDate"
10586
- (dateRangeChange)="handleDateRangeChange($event, 'confirmedDeliveryDateRange')"
11704
+ (dateRangeChange)="filterRequestService.handleDateRangeChange($event, 'confirmedDeliveryDateRange')"
10587
11705
  [placeholder]="'SELECT_DATE' | localize">
10588
11706
  </co-input-date-range>
10589
11707
  </co-filter-item>
10590
11708
 
10591
- <!--Aankomstdatum: range picker werkt, alleen output filter niet goed? -->
11709
+ <!--Aankomstdatum-->
10592
11710
  <co-filter-item
10593
11711
  [placeholder]="'ARRIVAL_DATE' | localize"
10594
11712
  [customContent]="true"
@@ -10596,39 +11714,46 @@ TransactionFilterContentLogisticsComponent.decorators = [
10596
11714
  <co-input-date-range
10597
11715
  [startDate]="arrivalStartDate"
10598
11716
  [endDate]="arrivalEndDate"
10599
- (dateRangeChange)="handleDateRangeChange($event, 'arrivalDateRange')"
11717
+ (dateRangeChange)="filterRequestService.handleDateRangeChange($event, 'arrivalDateRange')"
10600
11718
  [placeholder]="'SELECT_DATE' | localize">
10601
11719
  </co-input-date-range>
10602
11720
  </co-filter-item>
10603
11721
 
10604
- <!--Deellevering: Kan ik niet vinden in de transaction service. Zit dat in deliveryoptions???-->
11722
+ <!--Deellevering-->
10605
11723
  <co-filter-item
10606
11724
  [placeholder]="'PART_DELIVERY' | localize"
10607
11725
  [customContent]="true"
10608
11726
  [expanded]="true">
10609
- <co-input-text [(model)]="searchRequest.partialDelivery"
10610
- [placeholder]="'PART_DELIVERY' | localize"></co-input-text>
11727
+ <co-input-checkbox
11728
+ [model]="searchRequest.partialDelivery === 'J'"
11729
+ (modelChange)="filterRequestService.handleCheckboxValueChangeForString($event, 'partialDelivery')"
11730
+ [label]="'PART_DELIVERY' | localize">
11731
+ </co-input-checkbox>
10611
11732
  </co-filter-item>
10612
11733
 
10613
11734
  <!--Magazijn -->
10614
- <!--<co-filter-item
11735
+ <co-filter-item
10615
11736
  [placeholder]="'WAREHOUSE' | localize"
10616
11737
  [expanded]="true"
10617
11738
  [collection]="warehouses"
10618
-
10619
11739
  [searchPlaceholder]="searchPlaceholder | localize"
10620
- (collectionChange)="handlecollectionChange($event, 'deliveryMethod', warehouseFields)">
10621
- </co-filter-item>-->
11740
+ [showMoreLabel]="showMoreLabel | localize"
11741
+ [showLessLabel]="showLessLabel | localize"
11742
+ (collectionChange)="filterRequestService.handleCollectionChangeForSingleNumber($event, 'warehouse')">
11743
+ </co-filter-item>
10622
11744
 
10623
11745
 
10624
- <!--Bron magazijn: collectie zelfde als warehouses? -->
10625
- <!-- <co-filter-item
10626
- [placeholder]="'SOURCE_WAREHOUSE' | localize"
10627
- [expanded]="true"
10628
- [collection]="warehouses"
10629
- [searchPlaceholder]="searchPlaceholder | localize"
10630
- (collectionChange)="handlecollectionChanged($event, 'sourceWarehouse', warehouseFields)">
10631
- </co-filter-item>-->
11746
+ <!--Bron magazijn-->
11747
+ <co-filter-item
11748
+ [placeholder]="'SOURCE_WAREHOUSE' | localize"
11749
+ [expanded]="true"
11750
+ [collection]="warehouses"
11751
+ [searchPlaceholder]="searchPlaceholder | localize"
11752
+ [showMoreLabel]="showMoreLabel | localize"
11753
+ [showLessLabel]="showLessLabel | localize"
11754
+ (collectionChange)="filterRequestService.handleCollectionChangeForSingleNumber($event, 'sourceWarehouse')">
11755
+ </co-filter-item>
11756
+
10632
11757
 
10633
11758
  <!--Serienummer -->
10634
11759
  <co-filter-item
@@ -10647,46 +11772,122 @@ TransactionFilterContentLogisticsComponent.decorators = [
10647
11772
  <co-input-text [(model)]="searchRequest.batchNumber" [placeholder]="'BATCH_NUMBER' | localize"></co-input-text>
10648
11773
  </co-filter-item>
10649
11774
 
10650
- <!--Inclusief retouren: is een number in het domein, moet boolean zijn?-->
11775
+ <!--Inclusief retouren-->
10651
11776
  <co-filter-item
10652
11777
  [placeholder]="'INCLUDING_RETURNS' | localize"
10653
11778
  [customContent]="true"
10654
11779
  [expanded]="true">
10655
11780
  <co-input-checkbox
10656
11781
  [label]="'INCLUDING_RETURNS' | localize"
10657
- ><!--[(model)]="searchRequest.includingReturns"-->
10658
- </co-input-checkbox>
10659
- </co-filter-item>
10660
-
10661
- <!--Levermethode op (regel/header): waar moet hier precies op gefilterd worden?-->
10662
- <co-filter-item
10663
- [placeholder]="'Levermethode op regel/header'"
10664
- [customContent]="true"
10665
- [expanded]="true">
10666
- <co-input-checkbox
10667
- [label]="'Levermethode op regel/header'"
11782
+ [model]="searchRequest.includingReturns === 1"
11783
+ (modelChange)="filterRequestService.handleCheckboxValueChangeForNumber($event, 'includingReturns')"
10668
11784
  >
10669
11785
  </co-input-checkbox>
10670
11786
  </co-filter-item>
11787
+
11788
+ <!--Levermethode op (regel/header): todo: nog uitzoeken welke filter dit is-->
11789
+ <!-- <co-filter-item
11790
+ [placeholder]="'Levermethode op regel/header'"
11791
+ [customContent]="true"
11792
+ [expanded]="true">
11793
+ <co-input-checkbox
11794
+ [label]="'Levermethode op regel/header'"
11795
+ >
11796
+ </co-input-checkbox>
11797
+ </co-filter-item>-->
10671
11798
  <div class="filter-button-container">
10672
11799
  <co-button class="clickable" [label]="'Filter'" (click)="onFilterButtonClick()"></co-button>
10673
11800
  </div>
10674
11801
  </div>
10675
-
10676
11802
  `
10677
11803
  },] }
10678
11804
  ];
10679
11805
  TransactionFilterContentLogisticsComponent.ctorParameters = () => [
10680
11806
  { type: TransactionSearchService },
10681
- { type: TransactionService },
10682
- { type: FilterRequestService }
11807
+ { type: FilterRequestService },
11808
+ { type: TransactionService }
10683
11809
  ];
10684
11810
  TransactionFilterContentLogisticsComponent.propDecorators = {
10685
- searchRequest: [{ type: Input }],
10686
- searchRequestChange: [{ type: Output }],
10687
11811
  showClass: [{ type: HostBinding, args: ["class.co-transaction-filter-content-logistics",] }]
10688
11812
  };
10689
11813
 
11814
+ class TransactionFilterHistoricStateComponent {
11815
+ constructor() {
11816
+ this.expanded = true;
11817
+ this.filterClicked = new EventEmitter();
11818
+ this.states = [];
11819
+ }
11820
+ set label(value) {
11821
+ this._label = value;
11822
+ this.groupName = this._label.toLowerCase() + "_group";
11823
+ this.labelNothing = "NOTHING_" + this._label.toUpperCase();
11824
+ this.labelPartly = "PARTLY_" + this._label.toUpperCase();
11825
+ this.labelFully = "FULLY_" + this._label.toUpperCase();
11826
+ this._setStates();
11827
+ }
11828
+ get label() {
11829
+ return this._label;
11830
+ }
11831
+ showClass() {
11832
+ return true;
11833
+ }
11834
+ handleStateChange(value) {
11835
+ this.filterClicked.emit(value);
11836
+ }
11837
+ _setStates() {
11838
+ this.states = [
11839
+ { label: this.labelNothing, value: QuantityInHistoricState.Nothing, checked: false },
11840
+ { label: this.labelPartly, value: QuantityInHistoricState.Partly, checked: false },
11841
+ { label: this.labelFully, value: QuantityInHistoricState.Fully, checked: false }
11842
+ ];
11843
+ }
11844
+ }
11845
+ TransactionFilterHistoricStateComponent.decorators = [
11846
+ { type: Component, args: [{
11847
+ selector: "co-transaction-filter-historic-state",
11848
+ template: `
11849
+ <co-filter-item
11850
+ [placeholder]="label | localize"
11851
+ [customContent]="true"
11852
+ [expanded]="expanded">
11853
+ <co-input-radio-button *ngFor="let state of states"
11854
+ [name]="groupName"
11855
+ [value]="state.value"
11856
+ [model]="state.checked"
11857
+ [label]="state.label | localize"
11858
+ (modelChange)="handleStateChange($event)"
11859
+ ></co-input-radio-button>
11860
+ </co-filter-item>
11861
+ `,
11862
+ encapsulation: ViewEncapsulation.None
11863
+ },] }
11864
+ ];
11865
+ TransactionFilterHistoricStateComponent.propDecorators = {
11866
+ label: [{ type: Input }],
11867
+ expanded: [{ type: Input }],
11868
+ filterClicked: [{ type: Output }],
11869
+ showClass: [{ type: HostBinding, args: ["class.co-transaction-filter-historic-state",] }]
11870
+ };
11871
+
11872
+ class TransactionFilterHistoricStateModule {
11873
+ }
11874
+ TransactionFilterHistoricStateModule.decorators = [
11875
+ { type: NgModule, args: [{
11876
+ imports: [
11877
+ CommonModule,
11878
+ FilterItemModule,
11879
+ PipeModule,
11880
+ InputRadioButtonModule
11881
+ ],
11882
+ declarations: [
11883
+ TransactionFilterHistoricStateComponent
11884
+ ],
11885
+ exports: [
11886
+ TransactionFilterHistoricStateComponent
11887
+ ]
11888
+ },] }
11889
+ ];
11890
+
10690
11891
  class TransactionFilterContentLogisticsModule {
10691
11892
  }
10692
11893
  TransactionFilterContentLogisticsModule.decorators = [
@@ -10699,7 +11900,9 @@ TransactionFilterContentLogisticsModule.decorators = [
10699
11900
  PipeModule,
10700
11901
  InputDatePickerModule,
10701
11902
  ButtonModule,
10702
- InputCheckboxModule
11903
+ InputCheckboxModule,
11904
+ InputRadioButtonModule,
11905
+ TransactionFilterHistoricStateModule
10703
11906
  ],
10704
11907
  declarations: [
10705
11908
  TransactionFilterContentLogisticsComponent
@@ -10711,88 +11914,89 @@ TransactionFilterContentLogisticsModule.decorators = [
10711
11914
  ];
10712
11915
 
10713
11916
  class TransactionFilterContentOrderComponent {
10714
- constructor(_transactionService, searchService, _filterRequestService) {
10715
- this._transactionService = _transactionService;
11917
+ constructor(searchService, filterRequestService, _transactionService) {
10716
11918
  this.searchService = searchService;
10717
- this._filterRequestService = _filterRequestService;
10718
- this.searchRequestChange = new EventEmitter();
10719
- this.booleanTextDecorator = BooleanTextDecorator;
11919
+ this.filterRequestService = filterRequestService;
11920
+ this._transactionService = _transactionService;
11921
+ this.searchRequest = this.searchService.searchRequest;
10720
11922
  this.searchPlaceholder = "SEARCH_IN_COLLECTION";
11923
+ this.showMoreLabel = "SHOW_MORE";
11924
+ this.showLessLabel = "SHOW_LESS";
10721
11925
  this.salesPersonsFields = { text: "name", value: "relationId" };
10722
11926
  this.tagsFields = { text: "description", value: "tagValueId" };
10723
11927
  this.branchFields = { text: "description", value: "relationId" };
10724
11928
  this.onHoldCodeFields = { text: "description", value: "onHoldCode" };
10725
11929
  this.commissionCodeFields = { text: "description", value: "code" };
10726
11930
  this.customerGroupFields = { text: "naam", value: "groepsnummer" };
11931
+ this.loadCustomers = (nameFilter) => __awaiter(this, void 0, void 0, function* () {
11932
+ const request = new RelationRequest();
11933
+ request.familyName = nameFilter;
11934
+ return this._transactionService.getRelationListObjects(request).then((relations) => {
11935
+ return new FilterViewmodel(relations, { text: 'familyName', value: 'familyName' }).filterItems;
11936
+ });
11937
+ });
10727
11938
  }
10728
11939
  showClass() {
10729
11940
  return true;
10730
11941
  }
10731
11942
  ngOnInit() {
10732
11943
  this._setRangeDates();
10733
- this._getSalesPersons();
10734
- this._getTags();
10735
- this._getBranches();
10736
- this._getOnHoldCodes();
10737
- this._getCommissionCodes();
10738
- this._getCustomerGroups();
11944
+ this._setSalesPersons();
11945
+ this._setTags();
11946
+ this._setBranches();
11947
+ this._setOnHoldCodes();
11948
+ this._setCommissionCodes();
11949
+ this._setCustomerGroups();
11950
+ }
11951
+ onFilterButtonClick() {
11952
+ this.searchService.searchTransactions();
11953
+ }
11954
+ handleCollectionChangeCustomerName(collection) {
11955
+ const checkedItem = collection.find(c => c.checked);
11956
+ this.filterRequestService.handleCollectionChangeForSingleValue(checkedItem ? checkedItem.code + "" : "", 'relationName');
10739
11957
  }
10740
11958
  _setRangeDates() {
10741
- this.transStartDate = this._filterRequestService.getDateFromFilterRequestRange(this.searchRequest.rangeTransDate, 0);
10742
- this.transEndDate = this._filterRequestService.getDateFromFilterRequestRange(this.searchRequest.rangeTransDate, 1);
10743
- this.deliveryStartDate = this._filterRequestService.getDateFromFilterRequestRange(this.searchRequest.deliveryDateRange, 0);
10744
- this.deliveryEndDate = this._filterRequestService.getDateFromFilterRequestRange(this.searchRequest.deliveryDateRange, 1);
11959
+ this.transStartDate = this.filterRequestService.getDateFromFilterRequestRange(this.searchRequest.rangeTransDate, 0);
11960
+ this.transEndDate = this.filterRequestService.getDateFromFilterRequestRange(this.searchRequest.rangeTransDate, 1);
11961
+ this.deliveryStartDate = this.filterRequestService.getDateFromFilterRequestRange(this.searchRequest.deliveryDateRange, 0);
11962
+ this.deliveryEndDate = this.filterRequestService.getDateFromFilterRequestRange(this.searchRequest.deliveryDateRange, 1);
10745
11963
  }
10746
11964
  //Verkoper
10747
- _getSalesPersons() {
11965
+ _setSalesPersons() {
10748
11966
  this._transactionService.getSalesPersons().then((salesPersons) => {
10749
11967
  this.salesPersons = new FilterViewmodel(salesPersons, this.salesPersonsFields).filterItems;
10750
11968
  });
10751
11969
  }
10752
11970
  // Tags
10753
- _getTags() {
11971
+ _setTags() {
10754
11972
  this._transactionService.getTags(1).then((tags) => {
10755
11973
  this.tags = new FilterViewmodel(tags, this.tagsFields).filterItems;
10756
11974
  });
10757
11975
  }
10758
11976
  //Branches
10759
- _getBranches() {
11977
+ _setBranches() {
10760
11978
  this._transactionService.getBranches().then((branches) => {
10761
11979
  this.branches = new FilterViewmodel(branches, this.branchFields).filterItems;
10762
11980
  });
10763
11981
  }
10764
11982
  //OnHoldCodes
10765
- _getOnHoldCodes() {
11983
+ _setOnHoldCodes() {
10766
11984
  this._transactionService.getOnHoldCodes().then((onHoldCodes) => {
10767
11985
  this.onHoldCodes = new FilterViewmodel(onHoldCodes, this.onHoldCodeFields).filterItems;
10768
11986
  });
10769
11987
  }
10770
11988
  //CommissionCodes
10771
- _getCommissionCodes() {
11989
+ _setCommissionCodes() {
10772
11990
  this._transactionService.getCommissionCodes("NL").then((commissionCodes) => {
10773
11991
  this.commissionCodes = new FilterViewmodel(commissionCodes, this.commissionCodeFields).filterItems;
10774
11992
  });
10775
11993
  }
10776
11994
  //CustomerGroups
10777
- _getCustomerGroups() {
11995
+ _setCustomerGroups() {
10778
11996
  this._transactionService.getCustomerGroups().then((customerGroups) => {
10779
11997
  this.customerGroups = new FilterViewmodel(customerGroups, this.customerGroupFields).filterItems;
10780
11998
  });
10781
11999
  }
10782
- handleCollectionChangeForRange(collection, model) {
10783
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForCollectionRange(collection);
10784
- }
10785
- handleCollectionChangeForArray(collection, model) {
10786
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForCollectionArray(collection);
10787
- }
10788
- handleDateRangeChange(dates, model) {
10789
- let startDate = dates[0];
10790
- let endDate = dates[1];
10791
- this.searchRequest[model] = this._filterRequestService.getFilterRequestForDateRange(startDate, endDate);
10792
- }
10793
- onFilterButtonClick() {
10794
- this.searchService.searchTransactions();
10795
- }
10796
12000
  }
10797
12001
  TransactionFilterContentOrderComponent.decorators = [
10798
12002
  { type: Component, args: [{
@@ -10800,7 +12004,7 @@ TransactionFilterContentOrderComponent.decorators = [
10800
12004
  template: `
10801
12005
  <div class="transaction-filter-content-order-wrapper">
10802
12006
 
10803
- <!--Orderdatum: range picker werkt, alleen output filter niet goed?-->
12007
+ <!--Orderdatum-->
10804
12008
  <co-filter-item
10805
12009
  [placeholder]="'ORDER_DATE' | localize"
10806
12010
  [expanded]="true"
@@ -10808,45 +12012,49 @@ TransactionFilterContentOrderComponent.decorators = [
10808
12012
  <co-input-date-range
10809
12013
  [startDate]="transStartDate"
10810
12014
  [endDate]="transEndDate"
10811
- (dateRangeChange)="handleDateRangeChange($event, 'rangeTransDate')"
12015
+ (dateRangeChange)="filterRequestService.handleDateRangeChange($event, 'rangeTransDate')"
10812
12016
  [placeholder]="'SELECT_DATE' | localize">
10813
12017
  </co-input-date-range>
10814
12018
  </co-filter-item>
10815
12019
 
10816
- <!--Leverdatum: range picker werkt, alleen output filter niet goed?-->
12020
+ <!--Leverdatum-->
10817
12021
  <co-filter-item
10818
12022
  [placeholder]="'DELIVERY_DATE' | localize"
10819
12023
  [expanded]="true"
10820
12024
  [customContent]="true">
10821
12025
  <co-input-date-range
10822
- [startDate]="transStartDate"
10823
- [endDate]="transEndDate"
10824
- (dateRangeChange)="handleDateRangeChange($event, 'deliveryDateRange')"
12026
+ [startDate]="deliveryStartDate"
12027
+ [endDate]="deliveryEndDate"
12028
+ (dateRangeChange)="filterRequestService.handleDateRangeChange($event, 'deliveryDateRange')"
10825
12029
  [placeholder]="'SELECT_DATE' | localize">
10826
12030
  </co-input-date-range>
10827
12031
  </co-filter-item>
10828
12032
 
10829
- <!--Filiaal (werkt)-->
12033
+ <!--Filiaal-->
10830
12034
  <co-filter-item
10831
12035
  [placeholder]="'BRANCH' | localize"
10832
12036
  [expanded]="true"
10833
12037
  [collection]="branches"
10834
12038
  [searchPlaceholder]="searchPlaceholder | localize"
10835
- (collectionChange)="handleCollectionChangeForRange($event, 'rangeBranchId')"
12039
+ [showMoreLabel]="showMoreLabel | localize"
12040
+ [showLessLabel]="showLessLabel | localize"
12041
+ (collectionChange)="filterRequestService.handleCollectionChangeForRange($event, 'rangeBranchId')"
10836
12042
  >
10837
12043
  </co-filter-item>
10838
12044
 
10839
- <!--Verkoper (werkt)-->
12045
+ <!--Verkoper-->
10840
12046
  <co-filter-item
10841
12047
  [placeholder]="'HANDLED_BY' | localize"
10842
12048
  [expanded]="true"
10843
12049
  [collection]="salesPersons"
10844
12050
  [searchPlaceholder]="searchPlaceholder | localize"
10845
- (collectionChange)="handleCollectionChangeForRange($event, 'rangeSalesPerson')"
12051
+ [showMoreLabel]="showMoreLabel | localize"
12052
+ [showLessLabel]="showLessLabel | localize"
12053
+ (collectionChange)="filterRequestService.handleCollectionChangeForRange($event, 'rangeSalesPerson')"
10846
12054
  >
10847
12055
  </co-filter-item>
10848
12056
 
10849
- <!--Eigen referentie (werkt)-->
12057
+ <!--Eigen referentie-->
10850
12058
  <co-filter-item
10851
12059
  [placeholder]="'OWN_REFERENCE' | localize"
10852
12060
  [customContent]="true"
@@ -10855,75 +12063,87 @@ TransactionFilterContentOrderComponent.decorators = [
10855
12063
  [placeholder]="'OWN_REFERENCE' | localize"></co-input-text>
10856
12064
  </co-filter-item>
10857
12065
 
10858
- <!--Tags (kan niet testen, geen data met tags)-->
12066
+ <!--Tags-->
10859
12067
  <co-filter-item
10860
12068
  [placeholder]="'TAGS' | localize"
10861
12069
  [expanded]="true"
10862
12070
  [collection]="tags"
10863
12071
  [searchPlaceholder]="searchPlaceholder | localize"
10864
- (collectionChange)="handleCollectionChangeForRange($event, 'tagRange')"
12072
+ [showMoreLabel]="showMoreLabel | localize"
12073
+ [showLessLabel]="showLessLabel | localize"
12074
+ (collectionChange)="filterRequestService.handleCollectionChangeForRange($event, 'tagRange')"
10865
12075
  >
10866
12076
  <co-input-text [(model)]="searchRequest.tagRange" [placeholder]="'TAGS' | localize"></co-input-text>
10867
12077
  </co-filter-item>
10868
12078
 
10869
- <!--On hold codes (kan niet testen. kan niet terugvinden in API output)-->
12079
+ <!--On hold codes-->
10870
12080
  <co-filter-item
10871
12081
  [placeholder]="'ON_HOLD' | localize"
10872
12082
  [expanded]="true"
10873
12083
  [collection]="onHoldCodes"
10874
12084
  [searchPlaceholder]="searchPlaceholder | localize"
10875
- (collectionChange)="handleCollectionChangeForRange($event,'rangeOnHoldCodes')"
12085
+ [showMoreLabel]="showMoreLabel | localize"
12086
+ [showLessLabel]="showLessLabel | localize"
12087
+ (collectionChange)="filterRequestService.handleCollectionChangeForRange($event,'rangeOnHoldCodes')"
10876
12088
  >
10877
12089
  <co-input-text [(model)]="searchRequest.tagRange" [placeholder]="'TAGS' | localize"></co-input-text>
10878
12090
  </co-filter-item>
10879
12091
 
10880
- <!--Order definitief (werkt nog niet. aanpassen wanneer domain een boolean heeft)-->
12092
+ <!--Order definitief-->
10881
12093
  <co-filter-item
10882
12094
  [placeholder]="'ORDER_DEFINITIVE' | localize"
10883
12095
  [customContent]="true"
10884
12096
  [expanded]="true">
10885
12097
  <co-input-checkbox
10886
- [(model)]="!!searchRequest.transactionDefinitive"
12098
+ [model]="searchRequest.transactionDefinitive === 'J'"
12099
+ (modelChange)="filterRequestService.handleCheckboxValueChangeForString($event, 'transactionDefinitive')"
10887
12100
  [label]="'ORDER_DEFINITIVE' | localize"></co-input-checkbox>
10888
12101
  </co-filter-item>
10889
12102
 
10890
- <!--Commissiecode (kan niet testen, commissiecode niet terug te vinden in data)-->
12103
+ <!--Commissiecode-->
10891
12104
  <co-filter-item
10892
12105
  [placeholder]="'COMMISSION_CODE' | localize"
10893
12106
  [expanded]="true"
10894
12107
  [collection]="commissionCodes"
10895
12108
  [searchPlaceholder]="searchPlaceholder | localize"
10896
- (collectionChange)="handleCollectionChangeForArray($event, 'commissionCodes')"
12109
+ [showMoreLabel]="showMoreLabel | localize"
12110
+ [showLessLabel]="showLessLabel | localize"
12111
+ (collectionChange)="filterRequestService.handleCollectionChangeForArray($event, 'commissionCodes')"
10897
12112
  >
10898
12113
  </co-filter-item>
10899
12114
 
10900
- <!--Inactieve transacties (kan niet testen. geen inactieve transacties in data)-->
12115
+ <!--Inactieve transacties-->
10901
12116
  <co-filter-item
10902
12117
  [placeholder]="'INACTIVE_TRANSACTIONS' | localize"
10903
12118
  [customContent]="true"
10904
12119
  [expanded]="true">
10905
12120
  <co-input-checkbox
10906
- [(model)]="searchRequest.transactionShowInactive"
12121
+ [model]="searchRequest.active === false"
12122
+ (modelChange)="searchRequest.active = !$event"
10907
12123
  [label]="'INACTIVE_TRANSACTIONS' | localize"
10908
12124
  ></co-input-checkbox>
10909
12125
  </co-filter-item>
10910
12126
 
10911
- <!--Klantnaam: nog niet af: geen API call?-->
12127
+ <!--Klantnaam-->
10912
12128
  <co-filter-item
10913
12129
  [placeholder]="'CUSTOMER_NAME' | localize"
10914
- [customContent]="true"
10915
- [expanded]="true">
10916
- <co-input-text [(model)]="searchRequest.relationName"
10917
- [placeholder]="'CUSTOMER_NAME' | localize"></co-input-text>
12130
+ [expanded]="true"
12131
+ [singleSelect]="true"
12132
+ [minSearchCharsToLoadCollection]="3"
12133
+ [collectionLoadFn]="loadCustomers"
12134
+ (collectionChange)="handleCollectionChangeCustomerName($event)"
12135
+ >
10918
12136
  </co-filter-item>
10919
12137
 
10920
- <!--Klantgroep: (werkt nog niet, customergroups niet terug te vinden in data)-->
12138
+ <!--Klantgroep-->
10921
12139
  <co-filter-item
10922
12140
  [placeholder]="'CUSTOMER_GROUP' | localize"
10923
12141
  [expanded]="true"
10924
12142
  [collection]="customerGroups"
10925
12143
  [searchPlaceholder]="searchPlaceholder | localize"
10926
- (collectionChange)="handleCollectionChangeForRange($event, 'customerGroupId')">
12144
+ [showMoreLabel]="showMoreLabel | localize"
12145
+ [showLessLabel]="showLessLabel | localize"
12146
+ (collectionChange)="filterRequestService.handleCollectionChangeForSingleValue($event, 'customerGroupId')">
10927
12147
  </co-filter-item>
10928
12148
  <div class="filter-button-container">
10929
12149
  <co-button class="clickable" [label]="'Filter'" (click)="onFilterButtonClick()"></co-button>
@@ -10933,13 +12153,11 @@ TransactionFilterContentOrderComponent.decorators = [
10933
12153
  },] }
10934
12154
  ];
10935
12155
  TransactionFilterContentOrderComponent.ctorParameters = () => [
10936
- { type: TransactionService },
10937
12156
  { type: TransactionSearchService },
10938
- { type: FilterRequestService }
12157
+ { type: FilterRequestService },
12158
+ { type: TransactionService }
10939
12159
  ];
10940
12160
  TransactionFilterContentOrderComponent.propDecorators = {
10941
- searchRequest: [{ type: Input }],
10942
- searchRequestChange: [{ type: Output }],
10943
12161
  showClass: [{ type: HostBinding, args: ["class.co-transaction-filter-content-order",] }]
10944
12162
  };
10945
12163
 
@@ -11024,16 +12242,13 @@ TransactionFilterComponent.decorators = [
11024
12242
  </div>
11025
12243
  <div #filterItems class="transaction-category-filter-wrapper" data-ride="carousel">
11026
12244
  <div #orderFilter class="transaction-filter-category-content">
11027
- <co-transaction-filter-content-order [(searchRequest)]="searchService.searchRequest"
11028
- (searchRequestChange)="searchService.searchRequest = $event"></co-transaction-filter-content-order>
12245
+ <co-transaction-filter-content-order></co-transaction-filter-content-order>
11029
12246
  </div>
11030
12247
  <div #logisticsFilter class="transaction-filter-category-content">
11031
- <co-transaction-filter-content-logistics [(searchRequest)]="searchService.searchRequest"
11032
- (searchRequestChange)="searchService.searchRequest = $event"></co-transaction-filter-content-logistics>
12248
+ <co-transaction-filter-content-logistics></co-transaction-filter-content-logistics>
11033
12249
  </div>
11034
12250
  <div #articleFilter class="transaction-filter-category-content">
11035
- <co-transaction-filter-content-article [(searchRequest)]="searchService.searchRequest"
11036
- (searchRequestChange)="searchService.searchRequest = $event"></co-transaction-filter-content-article>
12251
+ <co-transaction-filter-content-article></co-transaction-filter-content-article>
11037
12252
  </div>
11038
12253
  </div>
11039
12254
  `,
@@ -11257,5 +12472,5 @@ TransactionLineGridModule.decorators = [
11257
12472
  * Generated bundle index. Do not edit.
11258
12473
  */
11259
12474
 
11260
- export { CheckoutComponent, CheckoutModule, ShoppingCartComponent, ShoppingCartModule, ShoppingCartPreviewComponent, ShoppingCartPreviewModule, TransactionComponent, TransactionHeaderComponent, TransactionHeaderDeliveryComponent, TransactionHeaderDeliveryModule, TransactionHeaderModule, TransactionHeaderOrderComponent, TransactionHeaderOrderModule, TransactionHeaderRelationComponent, TransactionHeaderRelationModule, TransactionLineComponent, TransactionLineGridComponent, TransactionLineGridModule, TransactionLineModule, TransactionLinesComponent, TransactionLinesModule, TransactionModule, TransactionQuickAccessComponent, TransactionQuickAccessModule, TransactionQuickAccessOrderConfirmationComponent, TransactionQuickAccessOrderConfirmationModule, TransactionQuickAccessReceivedGoodsComponent, TransactionQuickAccessReceivedGoodsModule, TransactionSearchComponent, TransactionSearchModule, TransactionService, TransactionTotalsComponent, TransactionTotalsModule, PendingReasonService as ɵa, DialogService as ɵb, RelationAddressTileModule as ɵba, TileModule as ɵbb, TileComponent as ɵbc, RelationAddressTileComponent as ɵbd, RelationAddressSelectComponent as ɵbe, BusinessObjectFactory as ɵbf, StepperModule as ɵbg, StepperComponent as ɵbh, StepperStepComponent as ɵbi, TransactionArticleTextModule as ɵbj, TransactionArticleTextComponent as ɵbk, TransactionArticleTextOverviewModule as ɵbl, TransactionArticleTextOverviewComponent as ɵbm, TransactionImageService as ɵbn, AvatarModule as ɵbo, AvatarComponent as ɵbp, DeliveryTypeTileModule as ɵbq, DeliveryTypeTileComponent as ɵbr, PaymentModule as ɵbs, PaymentTileModule as ɵbt, PaymentTileComponent as ɵbu, PaymentComponent as ɵbv, CheckoutOverviewRelationEditComponent as ɵbw, CheckoutOverviewDeliveryEditComponent as ɵbx, CheckoutOverviewDeliveryAddressComponent as ɵby, CheckOutRelationSuggestionsListComponent as ɵbz, OptionsService as ɵc, CheckOutRelationSuggestionsListItemComponent as ɵca, CheckoutLoginComponent as ɵcb, TransactionHeaderModule$1 as ɵcc, TransactionHeaderBlockModule as ɵcd, TransactionHeaderBlockComponent as ɵce, TransactionBaseComponent as ɵcf, TransactionHeaderPaymentModule as ɵcg, TransactionHeaderPaymentComponent as ɵch, TransactionHeaderComponent$1 as ɵci, TransactionLinesGridModule as ɵcj, TransactionBaseGridModule as ɵck, TransactionLineSidePanelModule as ɵcl, TransactionLineSidePanelDefaultModule as ɵcm, TransactionLinePriceModule as ɵcn, TransactionLinePriceComponent as ɵco, TransactionLineFieldsBaseComponent as ɵcp, TransactionLinePriceListModule as ɵcq, TransactionLinePriceListComponent as ɵcr, TransactionLineVatModule as ɵcs, TransactionLineVatComponent as ɵct, TransactionLineQuantityModule as ɵcu, TransactionLineQuantityComponent as ɵcv, TransactionLineLineDiscountModule as ɵcw, TransactionLineLineDiscountComponent as ɵcx, TransactionLineDeliveryMethodModule as ɵcy, TransactionLineDeliveryMethodComponent as ɵcz, DictionaryService as ɵd, TransactionLineDeliveryDateModule as ɵda, TransactionLineDeliveryDateComponent as ɵdb, TransactionLineReferenceModule as ɵdc, TransactionLineReferenceComponent as ɵdd, TransactionLineCommissionCodeModule as ɵde, TransactionLineCommissionCodeComponent as ɵdf, TransactionLineWarehouseModule as ɵdg, TransactionLineWarehouseComponent as ɵdh, TransactionLineDiscountAmountModule as ɵdi, TransactionLineDiscountAmountComponent as ɵdj, TransactionLineQuantumDiscountModule as ɵdk, TransactionLineQuantumDiscountComponent as ɵdl, TransactionLineSpecialDiscountModule as ɵdm, TransactionLineSpecialDiscountComponent as ɵdn, TransactionLineSidePanelDefaultComponent as ɵdo, TransactionReceivingGoodsHistoryModule as ɵdp, TransactionHistoryGridModule as ɵdq, TransactionHistoryGridStatusModule as ɵdr, TransactionHistoryGridStatusComponent as ɵds, TransactionHistoryGridComponent as ɵdt, TransactionReceivingGoodsHistoryComponent as ɵdu, TransactionReceivingGoodsDetailsModule as ɵdv, TransactionReceivingGoodsDetailsComponent as ɵdw, TransactionButtonBarModule as ɵdx, TransactionButtonBarComponent as ɵdy, TransactionMappingService as ɵdz, IOneConnectorAdapterService as ɵe, TransactionButtonBarButtonComponent as ɵea, TransactionConfirmationHistoryModule as ɵeb, TransactionConfirmationHistoryComponent as ɵec, TransactionLineSidePanelPurchaseModule as ɵed, TransactionLineSidePanelPurchaseComponent as ɵee, TransactionLineSidePanelComponent as ɵef, TransactionBaseGridComponent as ɵeg, TransactionGridBaseComponent as ɵeh, TransactionLinesGridComponent as ɵei, DiscountModule as ɵej, DiscountComponent as ɵek, TransactionQuickAccessOverviewModule as ɵel, TransactionQuickAccessOverviewComponent as ɵem, TransactionOrderConfirmationGridModule as ɵen, TransactionOrderConfirmationGridComponent as ɵeo, TransactionReceivedGoodsGridModule as ɵep, TransactionReceivedGoodsGridComponent as ɵeq, ViewModeButtonsModule as ɵer, ViewModeButtonsComponent as ɵes, TransactionGridModule as ɵet, TransactionGridComponent as ɵeu, TransactionSearchResultModule as ɵev, TransactionTileModule as ɵew, TransactionTileComponent as ɵex, TransactionSearchResultComponent as ɵey, TransactionSearchService as ɵez, CollectionCacheService as ɵf, TransactionFilterModule as ɵfa, TransactionFilterCategoriesModule as ɵfb, TransactionFilterCategoriesComponent as ɵfc, TransactionFilterContentOrderModule as ɵfd, TransactionFilterContentOrderComponent as ɵfe, FilterRequestService as ɵff, TransactionFilterContentLogisticsModule as ɵfg, TransactionFilterContentLogisticsComponent as ɵfh, TransactionFilterContentArticleModule as ɵfi, TransactionFilterContentArticleComponent as ɵfj, TransactionFilterComponent as ɵfk, CoreModule as ɵg, ConfirmationDialogModule as ɵh, PipeModule as ɵi, AppendPipe as ɵj, DeliveryTimePipe as ɵk, DateDurationPipe as ɵl, LocalizePipe as ɵm, CoCurrencyPipe as ɵn, SafeStylePipe as ɵo, SafeHtmlPipe as ɵp, ConfirmationDialogComponent as ɵq, DialogBaseComponent as ɵr, ImageDisplayComponent as ɵs, IconComponent as ɵt, IconCacheService as ɵu, CustomerGroupsComponent as ɵv, StockStatusIndicatorComponent as ɵw, RelationAddressModule as ɵx, RelationAddressComponent as ɵy, RelationAddressSelectModule as ɵz };
12475
+ export { CheckoutComponent, CheckoutModule, ShoppingCartComponent, ShoppingCartModule, ShoppingCartPreviewComponent, ShoppingCartPreviewModule, TransactionComponent, TransactionHeaderComponent, TransactionHeaderDeliveryComponent, TransactionHeaderDeliveryModule, TransactionHeaderModule, TransactionHeaderOrderComponent, TransactionHeaderOrderModule, TransactionHeaderRelationComponent, TransactionHeaderRelationModule, TransactionLineComponent, TransactionLineGridComponent, TransactionLineGridModule, TransactionLineModule, TransactionLinesComponent, TransactionLinesModule, TransactionModule, TransactionQuickAccessComponent, TransactionQuickAccessModule, TransactionQuickAccessOrderConfirmationComponent, TransactionQuickAccessOrderConfirmationModule, TransactionQuickAccessReceivedGoodsComponent, TransactionQuickAccessReceivedGoodsModule, TransactionSearchComponent, TransactionSearchModule, TransactionService, TransactionTotalsComponent, TransactionTotalsModule, PendingReasonService as ɵa, DialogService as ɵb, RelationAddressSelectModule as ɵba, RelationAddressTileModule as ɵbb, TileModule as ɵbc, TileComponent as ɵbd, RelationAddressTileComponent as ɵbe, RelationAddressSelectComponent as ɵbf, BusinessObjectFactory as ɵbg, StepperModule as ɵbh, StepperComponent as ɵbi, StepperStepComponent as ɵbj, TransactionArticleTextModule as ɵbk, TransactionArticleTextComponent as ɵbl, TransactionArticleTextOverviewModule as ɵbm, TransactionArticleTextOverviewComponent as ɵbn, TransactionImageService as ɵbo, AvatarModule as ɵbp, AvatarComponent as ɵbq, SharedService as ɵbr, SharedConnectorService as ɵbs, DeliveryTypeTileModule as ɵbt, DeliveryTypeTileComponent as ɵbu, PaymentModule as ɵbv, PaymentTileModule as ɵbw, PaymentTileComponent as ɵbx, PaymentComponent as ɵby, PaymentService as ɵbz, OptionsService as ɵc, CheckoutOverviewRelationEditComponent as ɵca, CheckoutOverviewDeliveryEditComponent as ɵcb, CheckoutOverviewDeliveryAddressComponent as ɵcc, CheckOutRelationSuggestionsListComponent as ɵcd, CheckOutRelationSuggestionsListItemComponent as ɵce, CheckoutLoginComponent as ɵcf, TransactionHeaderModule$1 as ɵcg, TransactionHeaderBlockModule as ɵch, TransactionHeaderBlockComponent as ɵci, TransactionBaseComponent as ɵcj, TransactionHeaderPaymentModule as ɵck, TransactionHeaderPaymentComponent as ɵcl, TransactionHeaderComponent$1 as ɵcm, TransactionLinesGridModule as ɵcn, TransactionBaseGridModule as ɵco, TransactionLineSidePanelModule as ɵcp, TransactionLineSidePanelDefaultModule as ɵcq, TransactionLinePriceModule as ɵcr, TransactionLinePriceComponent as ɵcs, TransactionLineFieldsBaseComponent as ɵct, TransactionLinePriceListModule as ɵcu, TransactionLinePriceListComponent as ɵcv, TransactionLineVatModule as ɵcw, TransactionLineVatComponent as ɵcx, TransactionLineQuantityModule as ɵcy, TransactionLineQuantityComponent as ɵcz, DictionaryService as ɵd, TransactionLineLineDiscountModule as ɵda, TransactionLineLineDiscountComponent as ɵdb, TransactionLineDeliveryMethodModule as ɵdc, TransactionLineDeliveryMethodComponent as ɵdd, TransactionLineDeliveryDateModule as ɵde, TransactionLineDeliveryDateComponent as ɵdf, TransactionLineReferenceModule as ɵdg, TransactionLineReferenceComponent as ɵdh, TransactionLineCommissionCodeModule as ɵdi, TransactionLineCommissionCodeComponent as ɵdj, TransactionLineWarehouseModule as ɵdk, TransactionLineWarehouseComponent as ɵdl, TransactionLineDiscountAmountModule as ɵdm, TransactionLineDiscountAmountComponent as ɵdn, TransactionLineQuantumDiscountModule as ɵdo, TransactionLineQuantumDiscountComponent as ɵdp, TransactionLineSpecialDiscountModule as ɵdq, TransactionLineSpecialDiscountComponent as ɵdr, TransactionLineSidePanelDefaultComponent as ɵds, TransactionReceivingGoodsHistoryModule as ɵdt, TransactionHistoryGridModule as ɵdu, TransactionHistoryGridStatusModule as ɵdv, TransactionHistoryGridStatusComponent as ɵdw, TransactionHistoryGridComponent as ɵdx, TransactionReceivingGoodsHistoryComponent as ɵdy, TransactionReceivingGoodsDetailsModule as ɵdz, TransactionConnectorService as ɵe, TransactionReceivingGoodsDetailsComponent as ɵea, ArticleService as ɵeb, TransactionButtonBarModule as ɵec, TransactionButtonBarComponent as ɵed, TransactionMappingService as ɵee, TransactionButtonBarButtonComponent as ɵef, TransactionConfirmationHistoryModule as ɵeg, TransactionConfirmationHistoryComponent as ɵeh, TransactionLineSidePanelPurchaseModule as ɵei, TransactionLineSidePanelPurchaseComponent as ɵej, TransactionEventService as ɵek, TransactionLineSidePanelComponent as ɵel, TransactionBaseGridComponent as ɵem, TransactionGridBaseComponent as ɵen, TransactionLinesGridComponent as ɵeo, DiscountModule as ɵep, DiscountComponent as ɵeq, TransactionQuickAccessOverviewModule as ɵer, TransactionQuickAccessOverviewComponent as ɵes, TransactionOrderConfirmationGridModule as ɵet, TransactionOrderConfirmationGridComponent as ɵeu, TransactionReceivedGoodsGridModule as ɵev, TransactionReceivedGoodsGridComponent as ɵew, ViewModeButtonsModule as ɵex, ViewModeButtonsComponent as ɵey, TransactionGridModule as ɵez, CollectionCacheService as ɵf, TransactionGridComponent as ɵfa, TransactionSearchResultModule as ɵfb, TransactionTileModule as ɵfc, TransactionTileComponent as ɵfd, TransactionSearchGridModule as ɵfe, TransactionSearchGridComponent as ɵff, TransactionSearchResultComponent as ɵfg, TransactionSearchService as ɵfh, TransactionFilterModule as ɵfi, TransactionFilterCategoriesModule as ɵfj, TransactionFilterCategoriesComponent as ɵfk, TransactionFilterContentOrderModule as ɵfl, TransactionFilterContentOrderComponent as ɵfm, FilterRequestService as ɵfn, TransactionFilterContentLogisticsModule as ɵfo, TransactionFilterHistoricStateModule as ɵfp, TransactionFilterHistoricStateComponent as ɵfq, TransactionFilterContentLogisticsComponent as ɵfr, TransactionFilterContentArticleModule as ɵfs, TransactionFilterContentArticleComponent as ɵft, TransactionFilterComponent as ɵfu, ArticleConnectorService as ɵg, CoreModule as ɵh, ConfirmationDialogModule as ɵi, PipeModule as ɵj, AppendPipe as ɵk, DeliveryTimePipe as ɵl, DateDurationPipe as ɵm, LocalizePipe as ɵn, CoCurrencyPipe as ɵo, SafeStylePipe as ɵp, SafeHtmlPipe as ɵq, ConfirmationDialogComponent as ɵr, DialogBaseComponent as ɵs, ImageDisplayComponent as ɵt, IconComponent as ɵu, IconCacheService as ɵv, CustomerGroupsComponent as ɵw, StockStatusIndicatorComponent as ɵx, RelationAddressModule as ɵy, RelationAddressComponent as ɵz };
11261
12476
  //# sourceMappingURL=colijnit-transaction.js.map