@colijnit/sharedcomponents 1.0.2 → 1.0.3

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 (135) hide show
  1. package/README.md +8 -11
  2. package/bundles/colijnit-sharedcomponents.umd.js +1825 -0
  3. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -0
  4. package/colijnit-sharedcomponents.d.ts +12 -0
  5. package/colijnit-sharedcomponents.metadata.json +1 -0
  6. package/esm2015/colijnit-sharedcomponents.js +13 -0
  7. package/esm2015/lib/components/docsign/component/signature/signature.component.js +75 -0
  8. package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +44 -0
  9. package/esm2015/lib/components/docsign/docsign.component.js +225 -0
  10. package/esm2015/lib/components/docsign/docsign.module.js +23 -0
  11. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +54 -0
  12. package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +255 -0
  13. package/esm2015/lib/components/stock/stock-location/stock-location.component.js +62 -0
  14. package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +71 -0
  15. package/esm2015/lib/components/stock/stock.component.js +61 -0
  16. package/esm2015/lib/components/stock/stock.module.js +42 -0
  17. package/esm2015/lib/factory/business-object-factory.js +120 -0
  18. package/esm2015/lib/factory/decorators/boolean.decorator.js +102 -0
  19. package/esm2015/lib/factory/decorators/complex-array.decorator.js +55 -0
  20. package/esm2015/lib/factory/decorators/complex-field.decorator.js +57 -0
  21. package/esm2015/lib/factory/decorators/date-field.decorator.js +36 -0
  22. package/esm2015/lib/factory/decorators/string-number.decorator.js +43 -0
  23. package/esm2015/lib/model/business-object.js +81 -0
  24. package/esm2015/lib/service/ione-connector-adapter.service.js +47 -0
  25. package/esm2015/lib/service/stock.service.js +40 -0
  26. package/esm2015/lib/utils/array-utils.js +183 -0
  27. package/esm2015/lib/utils/is-nill.function.js +5 -0
  28. package/esm2015/public-api.js +8 -0
  29. package/fesm2015/colijnit-sharedcomponents.js +1649 -0
  30. package/fesm2015/colijnit-sharedcomponents.js.map +1 -0
  31. package/lib/components/docsign/component/signature/signature.component.d.ts +16 -0
  32. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_layout.scss +0 -0
  33. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
  34. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/_theme.scss +0 -0
  35. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signature/style/material.scss +0 -0
  36. package/lib/components/docsign/component/signatures/signatures.component.d.ts +12 -0
  37. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
  38. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
  39. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
  40. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/component/signatures/style/material.scss +0 -0
  41. package/lib/components/docsign/docsign.component.d.ts +92 -0
  42. package/lib/components/docsign/docsign.module.d.ts +2 -0
  43. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_layout.scss +0 -0
  44. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_material-definition.scss +0 -0
  45. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/_theme.scss +0 -0
  46. package/{projects/sharedcomponents/src/lib → lib}/components/docsign/style/material.scss +0 -0
  47. package/lib/components/stock/stock-information/stock-information.component.d.ts +7 -0
  48. package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +44 -0
  49. package/lib/components/stock/stock-location/stock-location.component.d.ts +12 -0
  50. package/{projects/sharedcomponents/src/lib → lib}/components/stock/stock-location/style/_layout.scss +0 -0
  51. package/{projects/sharedcomponents/src/lib → lib}/components/stock/stock-location/style/_material-definition.scss +0 -0
  52. package/{projects/sharedcomponents/src/lib → lib}/components/stock/stock-location/style/_theme.scss +0 -0
  53. package/{projects/sharedcomponents/src/lib → lib}/components/stock/stock-location/style/material.scss +0 -0
  54. package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +9 -0
  55. package/{projects/sharedcomponents/src/lib → lib}/components/stock/stock-transfer/style/_layout.scss +13 -0
  56. package/{projects/sharedcomponents/src/lib → lib}/components/stock/stock-transfer/style/_material-definition.scss +0 -0
  57. package/{projects/sharedcomponents/src/lib → lib}/components/stock/stock-transfer/style/_theme.scss +0 -0
  58. package/{projects/sharedcomponents/src/lib → lib}/components/stock/stock-transfer/style/material.scss +0 -0
  59. package/lib/components/stock/stock.component.d.ts +18 -0
  60. package/lib/components/stock/stock.module.d.ts +2 -0
  61. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_layout.scss +0 -0
  62. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_material-definition.scss +0 -0
  63. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/_theme.scss +0 -0
  64. package/{projects/sharedcomponents/src/lib → lib}/components/stock/style/material.scss +0 -0
  65. package/lib/factory/business-object-factory.d.ts +23 -0
  66. package/lib/factory/decorators/boolean.decorator.d.ts +43 -0
  67. package/lib/factory/decorators/complex-array.decorator.d.ts +25 -0
  68. package/lib/factory/decorators/complex-field.decorator.d.ts +25 -0
  69. package/lib/factory/decorators/date-field.decorator.d.ts +17 -0
  70. package/lib/factory/decorators/string-number.decorator.d.ts +22 -0
  71. package/lib/model/business-object.d.ts +7 -0
  72. package/lib/service/ione-connector-adapter.service.d.ts +11 -0
  73. package/lib/service/stock.service.d.ts +9 -0
  74. package/{projects/sharedcomponents/src/lib → lib}/style/_mixin.scss +0 -0
  75. package/{projects/sharedcomponents/src/lib → lib}/style/_variables.scss +0 -0
  76. package/lib/utils/array-utils.d.ts +57 -0
  77. package/lib/utils/is-nill.function.d.ts +1 -0
  78. package/package.json +25 -66
  79. package/{projects/sharedcomponents/src/public-api.ts → public-api.d.ts} +2 -4
  80. package/.browserslistrc +0 -16
  81. package/.editorconfig +0 -16
  82. package/.vscode/extensions.json +0 -4
  83. package/.vscode/launch.json +0 -20
  84. package/.vscode/tasks.json +0 -42
  85. package/Sharedcomponents.iml +0 -11
  86. package/angular.json +0 -133
  87. package/colijnit-sharedcomponents-1.0.2.tgz +0 -0
  88. package/karma.conf.js +0 -44
  89. package/move-assets.js +0 -14
  90. package/projects/sharedcomponents/.browserslistrc +0 -16
  91. package/projects/sharedcomponents/README.md +0 -24
  92. package/projects/sharedcomponents/karma.conf.js +0 -44
  93. package/projects/sharedcomponents/ng-package.json +0 -17
  94. package/projects/sharedcomponents/package.json +0 -15
  95. package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +0 -82
  96. package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +0 -50
  97. package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +0 -252
  98. package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +0 -22
  99. package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +0 -56
  100. package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +0 -279
  101. package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +0 -82
  102. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +0 -52
  103. package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +0 -56
  104. package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +0 -45
  105. package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +0 -120
  106. package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +0 -113
  107. package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +0 -61
  108. package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +0 -63
  109. package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +0 -41
  110. package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +0 -48
  111. package/projects/sharedcomponents/src/lib/model/business-object.ts +0 -85
  112. package/projects/sharedcomponents/src/lib/service/ione-connector-adapter.service.ts +0 -49
  113. package/projects/sharedcomponents/src/lib/service/stock.service.ts +0 -40
  114. package/projects/sharedcomponents/src/lib/utils/array-utils.ts +0 -202
  115. package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +0 -4
  116. package/projects/sharedcomponents/src/test.ts +0 -27
  117. package/projects/sharedcomponents/tsconfig.lib.json +0 -18
  118. package/projects/sharedcomponents/tsconfig.lib.prod.json +0 -10
  119. package/projects/sharedcomponents/tsconfig.spec.json +0 -17
  120. package/src/app/app.component.scss +0 -8
  121. package/src/app/app.component.spec.ts +0 -31
  122. package/src/app/app.component.ts +0 -75
  123. package/src/app/app.module.ts +0 -22
  124. package/src/assets/.gitkeep +0 -0
  125. package/src/environments/environment.prod.ts +0 -3
  126. package/src/environments/environment.ts +0 -16
  127. package/src/favicon.ico +0 -0
  128. package/src/index.html +0 -13
  129. package/src/main.ts +0 -12
  130. package/src/polyfills.ts +0 -53
  131. package/src/styles.scss +0 -24
  132. package/src/test.ts +0 -26
  133. package/tsconfig.app.json +0 -15
  134. package/tsconfig.json +0 -65
  135. package/tsconfig.spec.json +0 -18
@@ -1,279 +0,0 @@
1
- import {Component, Output, ViewChild, ViewEncapsulation, EventEmitter} from "@angular/core";
2
- import {StockService} from "../../../service/stock.service";
3
-
4
- @Component({
5
- selector: "co-stock-information-grid",
6
- template: `
7
- <div class="tab-link" [ngClass]="hideOrShowTabs">
8
- <co-input-radio-button *ngFor="let tab of tabs"
9
- (click)="handleTabClick(tab)"
10
- [textContent]="tab"
11
- ></co-input-radio-button>
12
- </div>
13
-
14
- <div class="stock-line">
15
- <div [textContent]="activeTabText"></div>
16
-
17
- </div>
18
-
19
- <div class="stock-grid">
20
- <co-simple-grid *ngIf="activeTab === tabs[0] && hideOrShowTabs === 'show'"
21
- [data]="stockInformation"
22
- >
23
- <co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'warehouseNumber'"></co-simple-grid-column>
24
- <co-simple-grid-column [headerText]="'DESCRIPTION'" [field]="'warehouseDescription'"></co-simple-grid-column>
25
- <co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
26
- <co-simple-grid-column [headerText]="'AVAILABLE_STOCK'" [field]="'amountAvailable'"></co-simple-grid-column>
27
- <co-simple-grid-column [headerText]="'ECONOMICAL_STOCK'" [field]="'amountLaterAvailable'"></co-simple-grid-column>
28
- <co-simple-grid-column [headerText]="'LOCATION'" [field]="'location'">
29
- <ng-template let-row="row">
30
- <a [textContent]="'bekijken'" (click)="onLocationClick($event)"></a>
31
- </ng-template>
32
- </co-simple-grid-column>
33
- </co-simple-grid>
34
-
35
- <co-simple-grid *ngIf="activeTab === tabs[1]"
36
- [data]="inOrderInformation"
37
- >
38
- <co-simple-grid-column [headerText]="'IN_ORDER2'" [field]="'inOrder'"></co-simple-grid-column>
39
- <co-simple-grid-column [headerText]="'CUSTOMER'" [field]="'customer'"></co-simple-grid-column>
40
- <co-simple-grid-column [headerText]="'DATE'" [field]="'orderDate'"></co-simple-grid-column>
41
- <co-simple-grid-column [headerText]="'AMOUNT'" [field]="'orderAmount'"></co-simple-grid-column>
42
- <co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'warehouseNumber'"></co-simple-grid-column>
43
- <co-simple-grid-column [headerText]="'DESCRIPTION'" [field]="'warehouseDescription'"></co-simple-grid-column>
44
- <co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
45
- <co-simple-grid-column [headerText]="'COMMISSION2'" [field]="'commission'"></co-simple-grid-column>
46
- <co-simple-grid-column [headerText]="'TRANSFER'" [field]="'transfer'">
47
- <ng-template let-row="row">
48
-
49
- </ng-template>
50
- </co-simple-grid-column>
51
- <co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
52
- <ng-template let-row="row">
53
-
54
- </ng-template>
55
- </co-simple-grid-column>
56
- </co-simple-grid>
57
-
58
- <co-simple-grid *ngIf="activeTab === tabs[2]"
59
- [data]="orderInformation"
60
- >
61
- <co-simple-grid-column [headerText]="'PURCHASE_ORDER_NR'" [field]="'purchaseOrderNo'"></co-simple-grid-column>
62
- <co-simple-grid-column [headerText]="'DATE'" [field]="'orderDate'"></co-simple-grid-column>
63
- <co-simple-grid-column [headerText]="'AMOUNT'" [field]="'orderAmount'"></co-simple-grid-column>
64
- <co-simple-grid-column [headerText]="'RESERVED'" [field]="'reserved'"></co-simple-grid-column>
65
- <co-simple-grid-column [headerText]="'FREE_STOCK'" [field]="'freeStock'"></co-simple-grid-column>
66
- <co-simple-grid-column [headerText]="'DELIVERY_DATE1'" [field]="'deliveryDate'"></co-simple-grid-column>
67
- <co-simple-grid-column [headerText]="'RESERVE'" [field]="'reservation'"></co-simple-grid-column>
68
- </co-simple-grid>
69
- </div>
70
-
71
- <div class="stock-grid" *ngIf="hideOrShowLocationTab">
72
- <div class="stock-location-group">
73
- <div class="stock-location-left-group">
74
- <co-button class="stock-lines-button" [textContent]="'BACK_TO_STOCK_LINES'" (click)="handleBackToStockClick()"></co-button>
75
- </div>
76
- <div class="stock-location-right-group">
77
- <co-input-combo-box [(model)]="dataWareHouseCode"
78
- [source]=""
79
- [fields]="dataWareHouseFields"
80
- [placeholder]="'WAREHOUSE'"
81
- [required]="true"
82
- ></co-input-combo-box>
83
- </div>
84
- </div>
85
-
86
- <co-simple-grid [data]="stockLocationInformation"
87
- >
88
- <div class="stock-location-group">
89
- <div class="stock-location-left-group">
90
- <co-button class="stock-lines-button" [textContent]="'BACK_TO_STOCK_LINES'" (click)="handleBackToStockClick()"></co-button>
91
- </div>
92
- </div>
93
- <co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'location'"></co-simple-grid-column>
94
- <co-simple-grid-column [headerText]="'BATCH'" [field]="'batch'"></co-simple-grid-column>
95
- <co-simple-grid-column [headerText]="'SERIAL_NO'" [field]="'serialNo'"></co-simple-grid-column>
96
- <co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
97
- <co-simple-grid-column [headerText]="'ALLOCATED'" [field]="'allocated'"></co-simple-grid-column>
98
- <co-simple-grid-column [headerText]="'AVAILABLE_STOCK'" [field]="'amountAvailable'"></co-simple-grid-column>
99
- <co-simple-grid-column [headerText]="'TRANSFER'" [field]="'transfer'">
100
- <ng-template let-row="row">
101
- <span [textContent]="'Transfer'" (click)="handleStockTransferClick($event)"></span>
102
- </ng-template>
103
- </co-simple-grid-column>
104
- <co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
105
- <ng-template let-row="row">
106
-
107
- </ng-template>
108
- </co-simple-grid-column>
109
- </co-simple-grid>
110
- </div>
111
-
112
- <div class="stock-grid" *ngIf="showStockHistory">
113
- <co-simple-grid [data]="stockHistoryInformation"
114
- >
115
- <co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'location'"></co-simple-grid-column>
116
- <co-simple-grid-column [headerText]="'BATCH'" [field]="'batch'"></co-simple-grid-column>
117
- <co-simple-grid-column [headerText]="'SERIAL_NO'" [field]="'serialNo'"></co-simple-grid-column>
118
- <co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
119
- <co-simple-grid-column [headerText]="'ALLOCATED'" [field]="'allocated'"></co-simple-grid-column>
120
- <co-simple-grid-column [headerText]="'AVAILABLE_STOCK'" [field]="'amountAvailable'"></co-simple-grid-column>
121
- <co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
122
- <ng-template let-row="row">
123
-
124
- </ng-template>
125
- </co-simple-grid-column>
126
- </co-simple-grid>
127
- </div>
128
-
129
- <div class="stock-button-toolbar">
130
- <div class="stock-button-left-group">
131
- <co-button [label]="'HISTORY'" (click)="handleHistoryClick()"></co-button>
132
- </div>
133
- <div class="stock-button-middle-group">
134
- <div class="button-left">
135
- <co-button (click)="onOkClick()"></co-button>
136
- </div>
137
- <div class="button-right">
138
- <co-button (click)="onCancelClick()"></co-button>
139
- </div>
140
- </div>
141
- </div>
142
- `,
143
- encapsulation: ViewEncapsulation.None
144
- })
145
- export class StockInformationGridComponent {
146
-
147
- @ViewChild(StockInformationGridComponent)
148
- public stock: StockInformationGridComponent;
149
-
150
- @Output()
151
- public readonly locationLineClicked: EventEmitter<[]> = new EventEmitter();
152
-
153
- @Output()
154
- public readonly transferIconClicked: EventEmitter<[]> = new EventEmitter();
155
-
156
- public readonly MAX_GRID_ROWS: number = 10;
157
-
158
- public stockStatus: string = "medium";
159
- public image: string;
160
- public show: boolean = false;
161
- public hideOrShowLocationTab: boolean = false;
162
- public showStockHistory: boolean = false;
163
-
164
- public data: any[] = [
165
- {test: "test"}
166
- ];
167
-
168
- public stockInformation: Object[] = [
169
- {warehouseNumber: "1", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "test"},
170
- {warehouseNumber: "2", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "Test nummer 2"},
171
- {warehouseNumber: "3", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "Amundsenweg"},
172
- ];
173
- public stockLocationInformation: Object[] = [
174
- {location: "title 1", batch: "1", serialNo: "1", amountInStock: "1", allocated: "1", amountAvailable: "1"},
175
- {location: "title 2", amountInStock: "2"},
176
- {location: "title 3", amountInStock: "3"},
177
- {location: "title 4", amountInStock: "4"},
178
- {location: "title 5", amountInStock: "5"},
179
- ];
180
- public inOrderInformation: Object[] = [
181
- {inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321"},
182
- {inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321"},
183
- {inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321"},
184
- {inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321"},
185
- {inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321"},
186
- ];
187
- public stockHistoryInformation: Object[] = [
188
-
189
- ];
190
- public orderInformation: any[] = [];
191
-
192
- public stockColumns: any[] = [];
193
- public stockLocationColumns: any[] = [];
194
- public inOrderColumns: any[] = [];
195
- public orderColumns: any[] = [];
196
-
197
- public hideOrShowTabs: string = "show";
198
- public hideOrShowStockLocation: string = "hide";
199
-
200
- public dataWareHouseCode: number = 0;
201
- public dataWareHouseFields: Object = { text: "warehouseDescription", value: "warehouseNumber" };
202
-
203
- public tabs: string[] = [
204
- "STOCK",
205
- "IN_ORDER2",
206
- "ORDERS1"
207
- ];
208
- public activeTab: string = this.tabs[0];
209
-
210
- public get activeTabText(): string {
211
- switch (this.activeTab) {
212
- case this.tabs[0]:
213
- return "Voorraadregels";
214
- case this.tabs[1]:
215
- return "Gevonden in order(s)";
216
- case this.tabs[2]:
217
- return "Gevonden in bestellingen";
218
- default:
219
- return "Voorraadlocatie regels";
220
- }
221
- }
222
-
223
- constructor(
224
- private _stockService: StockService
225
- ) {
226
- }
227
-
228
- public handleTabClick(tabData): void {
229
- this.activeTab = tabData;
230
- }
231
-
232
- public onLocationClick(event): void {
233
- // this.locationLineClicked.emit(event[0].location);
234
- this.activeTab = "";
235
- this.hideOrShowLocationTab = true;
236
- }
237
-
238
- public onRowClick(args: any): void {
239
- }
240
-
241
- public onPopupClose(): void {
242
- this.show = false;
243
- }
244
-
245
- public handleHistoryClick(): void {
246
- this.showStockHistory = true;
247
- }
248
-
249
- public handleCloseClick(): void {
250
- this.onPopupClose();
251
- }
252
-
253
- public handleStockTransferClick(event): void {
254
- this.transferIconClicked.emit(event);
255
- }
256
-
257
- public async handleBackToStockClick(): Promise<void> {
258
- this.activeTab = this.tabs[0];
259
- this.hideOrShowTabs = "show";
260
- this.hideOrShowStockLocation = "hide";
261
- this.hideOrShowLocationTab = false;
262
- }
263
-
264
- public handleStickerClick(): void {
265
-
266
- }
267
-
268
- public handleTransferClick(): void {
269
-
270
- }
271
-
272
- public onOkClick(): void {
273
-
274
- }
275
-
276
- public onCancelClick(): void {
277
-
278
- }
279
- }
@@ -1,82 +0,0 @@
1
- import {Component, EventEmitter,Output, ViewEncapsulation} from "@angular/core";
2
-
3
- @Component({
4
- selector: "co-stock-location",
5
- template: `
6
- <div class="stock-location-wrapper">
7
- <div class="buttons-wrapper">
8
- <div class="stock-button-left-group">
9
- <co-button [textContent]="'BACK_TO_STOCK_LINES'" (onClick)="backToStockInformation()"></co-button>
10
- </div>
11
- <div class="dropdown-wrapper">
12
- <co-drop-down-list></co-drop-down-list>
13
- </div>
14
- </div>
15
-
16
- <div class="stock-grid">
17
-
18
- </div>
19
- <div class="button-wrapper">
20
- <div class="button-left">
21
- <co-button (click)="onOkClick()"></co-button>
22
- </div>
23
- <div class="button-right">
24
- <co-button (click)="onCancelClick()"></co-button>
25
- </div>
26
- </div>
27
- </div>
28
-
29
- `,
30
- encapsulation: ViewEncapsulation.None
31
- })
32
- export class StockLocationComponent {
33
-
34
- @Output()
35
- public backToStockLines: EventEmitter<any> = new EventEmitter();
36
-
37
- public readonly MAX_GRID_ROWS: number = 10;
38
-
39
- public stockLocationColumns: any[] = [];
40
-
41
- public stockLocation: Object[] = [
42
- {location: "title 1", batch: "1", serieNo: "1", amountInStock: "1", allocated: "1", amountAvailable: "1"},
43
- {location: "title 2", amountInStock: "2"},
44
- {location: "title 3", amountInStock: "3"},
45
- {location: "title 4", amountInStock: "4"},
46
- {location: "title 5", amountInStock: "5"},
47
- ];
48
-
49
- constructor(
50
- ) {
51
- this.stockLocationColumns.push(
52
- {field: "location", headerText: "WAREHOUSE", editType: "none"},
53
- {field: "batch", headerText: "BATCH"},
54
- {field: "serieNo", headerText: "SERIAL_NO"},
55
- {field: "amountInStock", headerText: "STOCK", textAlign: "Right", editType: "numericEdit"},
56
- {field: "allocated", headerText: "ALLOCATED", textAlign: "Right"},
57
- {field: "amountAvailable", headerText: "AVAILABLE_STOCK", textAlign: "Right"},
58
- {field: "PhysicalStock", headerText: "PHYSICAL_STOCK", textAlign: "Right"},
59
- {field: "Valuta", headerText: "VALUTA", textAlign: "Right"},
60
- {field: "PurchasePrice", headerText: "PURSCHASE_PRICE", textAlign: "Right"},
61
- {field: "SupplierNo", headerText: "SUPPLIER_NO", textAlign: "Right"},
62
- {field: "Transfer", headerText: "TRANSFER"},
63
- {field: "sticker", headerText: "STICKER"},
64
- );
65
- }
66
-
67
- public backToStockInformation(): void {
68
- this.backToStockLines.emit();
69
- }
70
-
71
- public onStickerClick(event): void {
72
- console.log('test');
73
- }
74
-
75
- public onOkClick(): void {
76
-
77
- }
78
-
79
- public onCancelClick(): void {
80
-
81
- }
82
- }
@@ -1,52 +0,0 @@
1
- import {Component, ViewEncapsulation} from "@angular/core";
2
-
3
- @Component({
4
- selector: "co-stock-transfer",
5
- template: `
6
- <div class="stock-transfer">
7
- <div class="stock-transfer-left-column">
8
- <co-input-text [placeholder]="'Standaard magazijn'">
9
-
10
- </co-input-text>
11
- <co-input-text>
12
-
13
- </co-input-text>
14
- <co-input-text >
15
-
16
- </co-input-text>
17
- <co-input-text >
18
-
19
- </co-input-text>
20
- <co-input-text >
21
-
22
- </co-input-text>
23
- </div>
24
-
25
- <div class="stock-transfer-right-column">
26
- <co-input-text [placeholder]="'Standaard magazijn'">
27
-
28
- </co-input-text>
29
- <co-input-text>
30
-
31
- </co-input-text>
32
- <co-input-text >
33
-
34
- </co-input-text>
35
- <co-input-text >
36
-
37
- </co-input-text>
38
- <co-input-text >
39
-
40
- </co-input-text>
41
- </div>
42
- </div>
43
- `,
44
- encapsulation: ViewEncapsulation.None
45
- })
46
- export class StockTransferComponent {
47
-
48
- constructor(
49
- ) {
50
- }
51
-
52
- }
@@ -1,56 +0,0 @@
1
- import {Component, HostBinding, Input, ViewChild, ViewEncapsulation} from "@angular/core";
2
- import {StockService} from "../../service/stock.service";
3
-
4
- @Component({
5
- selector: "co-stock",
6
- template: `
7
- <div class="stock-info-container">
8
- <co-stock-information></co-stock-information>
9
- <hr>
10
- <co-stock-information-grid *ngIf="showStockInformationGrid" (transferIconClicked)="handleStockTransferClick($event)"></co-stock-information-grid>
11
- <co-stock-location *ngIf="showStockLocation" (backToStockLines)="backToStockLinesClicked()"></co-stock-location>
12
- <co-stock-transfer *ngIf="showStockTransfer"></co-stock-transfer>
13
- <co-button (click)="handleStockLocationClick()"></co-button>
14
- </div>
15
- `,
16
- encapsulation: ViewEncapsulation.None
17
- })
18
- export class StockComponent {
19
-
20
- @ViewChild(StockComponent)
21
- public stock: StockComponent;
22
-
23
- @Input()
24
- public set options(value: any) {
25
- this._stockService.connectConnector(value);
26
- }
27
-
28
- @HostBinding("class.co-stock")
29
- public showClass() {
30
- return true;
31
- }
32
-
33
- public showStockInformationGrid: boolean = true;
34
- public showStockLocation: boolean = false;
35
- public showStockTransfer: boolean = false;
36
-
37
- constructor(
38
- private _stockService: StockService
39
- ) {
40
- }
41
-
42
- public backToStockLinesClicked(): void {
43
- this.showStockLocation = false;
44
- this.showStockInformationGrid = true;
45
- }
46
-
47
- public handleStockTransferClick(event): void {
48
- this.showStockTransfer = !this.showStockTransfer;
49
- this.showStockInformationGrid = !this.showStockInformationGrid;
50
- }
51
-
52
- public async handleStockLocationClick(): Promise<void> {
53
- await this._stockService.loadStockLocations(10);
54
- }
55
-
56
- }
@@ -1,45 +0,0 @@
1
- import {NgModule} from "@angular/core";
2
- import {StockComponent} from "./stock.component";
3
- import {
4
- ButtonModule,
5
- CoGridModule,
6
- DropDownModule, ImageModule,
7
- InputComboBoxModule,
8
- InputRadioButtonModule, InputTextModule, SimpleGridModule
9
- } from "@colijnit/corecomponents_v12";
10
- import {CommonModule} from "@angular/common";
11
- import {StockInformationComponent} from "./stock-information/stock-information.component";
12
- import {StockInformationGridComponent} from "./stock-information-grid/stock-information-grid.component";
13
- import {StockLocationComponent} from "./stock-location/stock-location.component";
14
- import {StockService} from "../../service/stock.service";
15
- import {IoneConnectorAdapterService} from "../../service/ione-connector-adapter.service";
16
- import {StockTransferComponent} from "./stock-transfer/stock-transfer.component";
17
-
18
- @NgModule({
19
- imports: [
20
- InputComboBoxModule,
21
- CoGridModule,
22
- ButtonModule,
23
- CommonModule,
24
- InputRadioButtonModule,
25
- DropDownModule,
26
- SimpleGridModule,
27
- ImageModule,
28
- InputTextModule
29
- ],
30
- declarations: [
31
- StockComponent,
32
- StockInformationComponent,
33
- StockInformationGridComponent,
34
- StockLocationComponent,
35
- StockTransferComponent
36
- ],
37
- exports: [
38
- StockComponent
39
- ],
40
- providers: [
41
- StockService,
42
- IoneConnectorAdapterService
43
- ]
44
- })
45
- export class StockModule {}
@@ -1,120 +0,0 @@
1
- import {ComplexFieldDecorator} from "./decorators/complex-field.decorator";
2
- import {ComplexArrayDecorator} from "./decorators/complex-array.decorator";
3
- import {BooleanTextDecorator} from "./decorators/boolean.decorator";
4
- import {DateFieldFieldDecorator} from "./decorators/date-field.decorator";
5
- import {StringNumberDecorator} from "./decorators/string-number.decorator";
6
- import {isNill} from "../utils/is-nill.function";
7
- import {ArrayUtils} from "../utils/array-utils";
8
- import {BusinessObject} from "../model/business-object";
9
-
10
- // Factory service creates businessobjects, using their decorators in the process.
11
- export class BusinessObjectFactory {
12
- constructor() {
13
- }
14
-
15
- /**
16
- * Creates and returns a new business data object instance of given class, with all given data properties applied to it in a
17
- * complex-aware style. That is, all properties on given class that are decorated with @ComplexField(..) or @ComplexArray(..) decorators
18
- * become strongly typed business objects, with methods that are usable and such.
19
- *
20
- * @param modelClass
21
- * @param {Object} rawData The object with all (possibly raw/flat/not alive) data to be applied to the created model object
22
- */
23
- public makeWithRawBackendData(modelClass: any, rawData: Object): BusinessObject {
24
- if (!modelClass) {
25
- return undefined;
26
- }
27
- if (typeof modelClass !== typeof BusinessObject) {
28
- return undefined;
29
- }
30
-
31
- const model: BusinessObject = new modelClass();
32
- this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
33
- return model;
34
- }
35
-
36
- // see makeWithRawBackendData, this is a loop-wrapper around that method
37
- public makeBOArrayFromRawBackendDataArray(modelClass: any, arrayOfRawDatas: Object[]): BusinessObject[] {
38
- if (!modelClass) {
39
- return undefined;
40
- }
41
-
42
- const trueClientBos: BusinessObject[] = [];
43
- if (arrayOfRawDatas) {
44
- for (let i: number = 0, len: number = arrayOfRawDatas.length; i < len; i++) {
45
- trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
46
- }
47
- }
48
- return trueClientBos;
49
- }
50
-
51
- public instantiateNewBo(modelClass: any): BusinessObject {
52
- return this.makeWithRawBackendData(modelClass, {});
53
- }
54
-
55
- /**
56
- * Applies all properties of given 'source' object to the given 'destination' businessobject, if destination has that property.
57
- * Works with the @ComplexField(), @ComplexArray, @BooleanText, @CoInject and @DateField annotations of given destination model.
58
- *
59
- * @param sourceData Raw data to copy to destination model
60
- * @param {BusinessObject} destinationModel InOut: The annotated businessobject to apply source properties to
61
- */
62
- private _copyAllPropertiesDecoratorProcessedFrom(sourceData: any, destinationModel: BusinessObject): void {
63
- if (!sourceData || !destinationModel) {
64
- return;
65
- }
66
-
67
- // process all source data into destinationModel
68
- for (const srcPropKey in sourceData) {
69
- if (!sourceData.hasOwnProperty(srcPropKey)) {
70
- continue;
71
- }
72
-
73
- const srcPropVal: any = sourceData[srcPropKey];
74
-
75
- if (ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
76
- const classOfField: any = ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
77
- destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
78
- } else if (ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
79
- const sourceArray: any[] = srcPropVal;
80
- if (!sourceArray) {
81
- continue;
82
- }
83
- const classOfArrayItems: any = ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
84
- const tempArray: any[] = [];
85
- for (let i: number = 0, len: number = sourceArray.length; i < len; i++) {
86
- tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
87
- }
88
- destinationModel[srcPropKey] = tempArray;
89
- } else if (BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
90
- // logical 'true' and 'false' also allowed as incoming values for @BooleanText() properties: then just copy their value
91
- if (typeof srcPropVal === "boolean") {
92
- destinationModel[srcPropKey] = srcPropVal;
93
- // here, it should be a 'J' or 'N' (or 'T' or 'F'): assign the associated boolean value
94
- } else {
95
- destinationModel[srcPropKey] = BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
96
- }
97
- } else if (DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
98
- destinationModel[srcPropKey] = DateFieldFieldDecorator.StringAsDate(srcPropVal);
99
- } else if (StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
100
- destinationModel[srcPropKey] = StringNumberDecorator.StringAsNumber(srcPropVal);
101
- }
102
- // non-decorated prop
103
- else {
104
- if (isNill(srcPropVal)) {
105
- destinationModel[srcPropKey] = undefined;
106
- } else if (Array.isArray(srcPropVal)) {
107
- destinationModel[srcPropKey] = ArrayUtils.CloneArray(srcPropVal);
108
- } else if (typeof srcPropVal === "object") {
109
- if (srcPropVal instanceof Map) { //just copy the value in case of maps
110
- destinationModel[srcPropKey] = srcPropVal;
111
- } else {
112
- destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
113
- }
114
- } else {
115
- destinationModel[srcPropKey] = srcPropVal;
116
- }
117
- }
118
- }
119
- }
120
- }