@colijnit/sharedcomponents 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/.browserslistrc +16 -0
  2. package/.editorconfig +16 -0
  3. package/.vscode/extensions.json +4 -0
  4. package/.vscode/launch.json +20 -0
  5. package/.vscode/tasks.json +42 -0
  6. package/README.md +27 -24
  7. package/Sharedcomponents.iml +11 -0
  8. package/angular.json +133 -0
  9. package/colijnit-sharedcomponents-1.0.2.tgz +0 -0
  10. package/karma.conf.js +44 -0
  11. package/move-assets.js +14 -0
  12. package/package.json +66 -25
  13. package/projects/sharedcomponents/.browserslistrc +16 -0
  14. package/projects/sharedcomponents/README.md +24 -0
  15. package/projects/sharedcomponents/karma.conf.js +44 -0
  16. package/projects/sharedcomponents/ng-package.json +17 -0
  17. package/projects/sharedcomponents/package.json +15 -0
  18. package/projects/sharedcomponents/src/lib/components/docsign/component/signature/signature.component.ts +82 -0
  19. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_layout.scss +0 -0
  20. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_material-definition.scss +0 -0
  21. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/_theme.scss +0 -0
  22. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signature/style/material.scss +0 -0
  23. package/projects/sharedcomponents/src/lib/components/docsign/component/signatures/signatures.component.ts +50 -0
  24. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_layout.scss +0 -0
  25. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_material-definition.scss +0 -0
  26. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/_theme.scss +0 -0
  27. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/component/signatures/style/material.scss +0 -0
  28. package/projects/sharedcomponents/src/lib/components/docsign/docsign.component.ts +252 -0
  29. package/projects/sharedcomponents/src/lib/components/docsign/docsign.module.ts +22 -0
  30. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_layout.scss +0 -0
  31. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_material-definition.scss +0 -0
  32. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/_theme.scss +0 -0
  33. package/{lib → projects/sharedcomponents/src/lib}/components/docsign/style/material.scss +0 -0
  34. package/projects/sharedcomponents/src/lib/components/stock/stock-information/stock-information.component.ts +56 -0
  35. package/projects/sharedcomponents/src/lib/components/stock/stock-information-grid/stock-information-grid.component.ts +279 -0
  36. package/projects/sharedcomponents/src/lib/components/stock/stock-location/stock-location.component.ts +82 -0
  37. package/projects/sharedcomponents/src/lib/components/stock/stock-location/style/_layout.scss +11 -0
  38. package/projects/sharedcomponents/src/lib/components/stock/stock-location/style/_material-definition.scss +1 -0
  39. package/projects/sharedcomponents/src/lib/components/stock/stock-location/style/_theme.scss +18 -0
  40. package/projects/sharedcomponents/src/lib/components/stock/stock-location/style/material.scss +4 -0
  41. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/stock-transfer.component.ts +52 -0
  42. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/style/_layout.scss +18 -0
  43. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/style/_material-definition.scss +1 -0
  44. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/style/_theme.scss +6 -0
  45. package/projects/sharedcomponents/src/lib/components/stock/stock-transfer/style/material.scss +4 -0
  46. package/projects/sharedcomponents/src/lib/components/stock/stock.component.ts +56 -0
  47. package/projects/sharedcomponents/src/lib/components/stock/stock.module.ts +45 -0
  48. package/projects/sharedcomponents/src/lib/components/stock/style/_layout.scss +146 -0
  49. package/projects/sharedcomponents/src/lib/components/stock/style/_material-definition.scss +1 -0
  50. package/projects/sharedcomponents/src/lib/components/stock/style/_theme.scss +8 -0
  51. package/projects/sharedcomponents/src/lib/components/stock/style/material.scss +4 -0
  52. package/projects/sharedcomponents/src/lib/factory/business-object-factory.ts +120 -0
  53. package/projects/sharedcomponents/src/lib/factory/decorators/boolean.decorator.ts +113 -0
  54. package/projects/sharedcomponents/src/lib/factory/decorators/complex-array.decorator.ts +61 -0
  55. package/projects/sharedcomponents/src/lib/factory/decorators/complex-field.decorator.ts +63 -0
  56. package/projects/sharedcomponents/src/lib/factory/decorators/date-field.decorator.ts +41 -0
  57. package/projects/sharedcomponents/src/lib/factory/decorators/string-number.decorator.ts +48 -0
  58. package/projects/sharedcomponents/src/lib/model/business-object.ts +85 -0
  59. package/projects/sharedcomponents/src/lib/service/ione-connector-adapter.service.ts +49 -0
  60. package/projects/sharedcomponents/src/lib/service/stock.service.ts +40 -0
  61. package/{lib → projects/sharedcomponents/src/lib}/style/_mixin.scss +0 -0
  62. package/{lib → projects/sharedcomponents/src/lib}/style/_variables.scss +0 -0
  63. package/projects/sharedcomponents/src/lib/utils/array-utils.ts +202 -0
  64. package/projects/sharedcomponents/src/lib/utils/is-nill.function.ts +4 -0
  65. package/{public-api.d.ts → projects/sharedcomponents/src/public-api.ts} +4 -0
  66. package/projects/sharedcomponents/src/test.ts +27 -0
  67. package/projects/sharedcomponents/tsconfig.lib.json +18 -0
  68. package/projects/sharedcomponents/tsconfig.lib.prod.json +10 -0
  69. package/projects/sharedcomponents/tsconfig.spec.json +17 -0
  70. package/src/app/app.component.scss +8 -0
  71. package/src/app/app.component.spec.ts +31 -0
  72. package/src/app/app.component.ts +75 -0
  73. package/src/app/app.module.ts +22 -0
  74. package/src/assets/.gitkeep +0 -0
  75. package/src/environments/environment.prod.ts +3 -0
  76. package/src/environments/environment.ts +16 -0
  77. package/src/favicon.ico +0 -0
  78. package/src/index.html +13 -0
  79. package/src/main.ts +12 -0
  80. package/src/polyfills.ts +53 -0
  81. package/src/styles.scss +24 -0
  82. package/src/test.ts +26 -0
  83. package/tsconfig.app.json +15 -0
  84. package/tsconfig.json +65 -0
  85. package/tsconfig.spec.json +18 -0
  86. package/bundles/colijnit-sharedcomponents.umd.js +0 -737
  87. package/bundles/colijnit-sharedcomponents.umd.js.map +0 -1
  88. package/colijnit-sharedcomponents.d.ts +0 -6
  89. package/colijnit-sharedcomponents.metadata.json +0 -1
  90. package/esm2015/colijnit-sharedcomponents.js +0 -7
  91. package/esm2015/lib/components/docsign/component/signature/signature.component.js +0 -75
  92. package/esm2015/lib/components/docsign/component/signatures/signatures.component.js +0 -44
  93. package/esm2015/lib/components/docsign/docsign.component.js +0 -225
  94. package/esm2015/lib/components/docsign/docsign.module.js +0 -23
  95. package/esm2015/public-api.js +0 -6
  96. package/fesm2015/colijnit-sharedcomponents.js +0 -372
  97. package/fesm2015/colijnit-sharedcomponents.js.map +0 -1
  98. package/lib/components/docsign/component/signature/signature.component.d.ts +0 -16
  99. package/lib/components/docsign/component/signatures/signatures.component.d.ts +0 -12
  100. package/lib/components/docsign/docsign.component.d.ts +0 -92
  101. package/lib/components/docsign/docsign.module.d.ts +0 -2
@@ -0,0 +1,279 @@
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
+ }
@@ -0,0 +1,82 @@
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
+ }
@@ -0,0 +1,11 @@
1
+ @import "../../../../../style/mixin";
2
+
3
+ @include export-module('co-stock-location-layout') {
4
+ .co-stock {
5
+ font-family: $tp-stock-font-family;
6
+
7
+ .button-wrapper {
8
+ display: flex;
9
+ }
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ $tp-stock-font-family: $tp-font-family !default;
@@ -0,0 +1,18 @@
1
+ @import "../../../../style/mixin";
2
+ @import "./material-definition";
3
+
4
+ @include export-module('co-stock-location-theme') {
5
+ .co-stock {
6
+
7
+ }
8
+ .stock-grid {
9
+ margin-top: 50px;
10
+ }
11
+ .buttons-wrapper {
12
+ display: flex;
13
+ }
14
+ .dropdown-wrapper {
15
+ float: right;
16
+ max-width: 20%;
17
+ }
18
+ }
@@ -0,0 +1,4 @@
1
+ @import "../../../../../style/variables";
2
+ @import "./material-definition";
3
+ @import "./layout";
4
+ @import "./theme";
@@ -0,0 +1,52 @@
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
+ }
@@ -0,0 +1,18 @@
1
+ @import "../../../../style/mixin";
2
+
3
+ @include export-module('co-stock-transfer-layout') {
4
+
5
+ .stock-transfer-right-column {
6
+ display: flex;
7
+ flex-direction: column;
8
+ width: 25%;
9
+ float: right;
10
+ }
11
+
12
+ .stock-transfer-left-column {
13
+ display: flex;
14
+ flex-direction: column;
15
+ width: 25%;
16
+ float: left;
17
+ }
18
+ }
@@ -0,0 +1,6 @@
1
+ @import "../../../../style/mixin";
2
+ @import "./material-definition";
3
+
4
+ @include export-module('co-stock-location-theme') {
5
+
6
+ }
@@ -0,0 +1,4 @@
1
+ @import "../../../../style/variables";
2
+ @import "./material-definition";
3
+ @import "./layout";
4
+ @import "./theme";
@@ -0,0 +1,56 @@
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
+ }
@@ -0,0 +1,45 @@
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 {}