@vita-mojo/print 0.0.23 → 0.0.24
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.
- package/package.json +1 -1
- package/src/lib/contexts/base.d.ts +1 -0
- package/src/lib/contexts/base.js +1 -0
- package/src/lib/contexts/base.js.map +1 -1
- package/src/lib/contexts/order.d.ts +118 -41
- package/src/lib/contexts/order.js +31 -3
- package/src/lib/contexts/order.js.map +1 -1
- package/src/lib/types/base-context.d.ts +2 -1
- package/src/lib/types/sorted-grouped-bundles.d.ts +2 -0
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ export declare class PrintContextBase implements BasePrintContextProps {
|
|
|
13
13
|
fiscalTicket: BasePrintContextProps['fiscalTicket'];
|
|
14
14
|
kitchenScreenConfigName: BasePrintContextProps['kitchenScreenConfigName'];
|
|
15
15
|
timeFormatter: BasePrintContextProps['timeFormatter'];
|
|
16
|
+
allergens: BasePrintContextProps['allergens'];
|
|
16
17
|
constructor(props: BasePrintContextProps);
|
|
17
18
|
serialize(classImpl?: any): this;
|
|
18
19
|
}
|
package/src/lib/contexts/base.js
CHANGED
|
@@ -17,6 +17,7 @@ class PrintContextBase {
|
|
|
17
17
|
this.fiscalTicket = props === null || props === void 0 ? void 0 : props.fiscalTicket;
|
|
18
18
|
this.kitchenScreenConfigName = props === null || props === void 0 ? void 0 : props.kitchenScreenConfigName;
|
|
19
19
|
this.timeFormatter = props === null || props === void 0 ? void 0 : props.timeFormatter;
|
|
20
|
+
this.allergens = props.allergens;
|
|
20
21
|
}
|
|
21
22
|
serialize(classImpl = {}) {
|
|
22
23
|
const allGetterKeys = Object.entries(Object.getOwnPropertyDescriptors(classImpl.prototype))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../../packages/print/src/lib/contexts/base.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":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,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,CAAC;IAED,SAAS,CAAC,YAAiB,EAAE;QAC3B,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAClC,MAAM,CAAC,yBAAyB,CAAC,SAAS,CAAC,SAAS,CAAC,CACtD;aACE,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,OAAO,UAAU,CAAC,GAAG,KAAK,UAAU,CAAC;aACnE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;QAEvB,MAAM,GAAG,qBACJ,IAAI,CACR,CAAC;QAEkB,aAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACjD,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;QAEpC,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AApDD,4CAoDC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Order } from '@vita-mojo/types';
|
|
1
2
|
import { PrintContextBase } from './base';
|
|
2
3
|
/**
|
|
3
4
|
* This class is used to generate the data that is used to render the print template.
|
|
@@ -9,20 +10,29 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
9
10
|
get groupedBundles(): {
|
|
10
11
|
price: number;
|
|
11
12
|
unitPrice: number;
|
|
13
|
+
allergens: import("@vita-mojo/types").Allergen[];
|
|
12
14
|
totalBasePrice: number;
|
|
15
|
+
kitchenZones: {
|
|
16
|
+
name: string;
|
|
17
|
+
items: Order.Item.Item[];
|
|
18
|
+
uuid?: string | undefined;
|
|
19
|
+
slug?: string | undefined;
|
|
20
|
+
sortOrderOnPrint?: number | undefined;
|
|
21
|
+
capacity?: number | undefined;
|
|
22
|
+
}[];
|
|
13
23
|
regular: {
|
|
14
24
|
totalPrice: number;
|
|
15
25
|
quantity: number;
|
|
16
26
|
name: string;
|
|
17
27
|
uuid: string;
|
|
18
28
|
kitchenTicketName?: string | null | undefined;
|
|
19
|
-
kitchenZone?:
|
|
29
|
+
kitchenZone?: Order.Item.KitchenZone | null | undefined;
|
|
20
30
|
itemUUID: string;
|
|
21
31
|
straightToPickup: boolean;
|
|
22
32
|
price: number;
|
|
23
33
|
priceEatIn: number;
|
|
24
34
|
hasEatInPrice: boolean;
|
|
25
|
-
appStraightToPickup:
|
|
35
|
+
appStraightToPickup: Order.Item.AppStraightToPickup;
|
|
26
36
|
refund?: number | undefined;
|
|
27
37
|
totalAmountBeforeRefund?: number | undefined;
|
|
28
38
|
refundIncludingTax?: number | undefined;
|
|
@@ -34,26 +44,30 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
34
44
|
finalPrice: number;
|
|
35
45
|
totalAmount: number;
|
|
36
46
|
subtotalAmount: number;
|
|
37
|
-
customizations:
|
|
47
|
+
customizations: Order.Item.Customization[];
|
|
38
48
|
vatAmount: number;
|
|
39
49
|
discount: number;
|
|
40
50
|
taxExempt: number;
|
|
41
51
|
vatRateEatIn: number;
|
|
42
52
|
vatRateTakeaway: number;
|
|
43
|
-
promotion?:
|
|
53
|
+
promotion?: Order.Promotion | undefined;
|
|
44
54
|
type: string;
|
|
45
55
|
dealPriceOverrideDiff?: {
|
|
46
56
|
priceEatIn?: number | undefined;
|
|
47
57
|
price?: number | undefined;
|
|
48
58
|
} | undefined;
|
|
49
|
-
|
|
59
|
+
allergens: string[];
|
|
60
|
+
itemRaw: Order.Item.Item;
|
|
50
61
|
itemNameWithUnits: string;
|
|
51
|
-
itemName: any;
|
|
62
|
+
itemName: any; /**
|
|
63
|
+
* This class is used to generate the data that is used to render the print template.
|
|
64
|
+
* Just add new getters and they will be available in the template.
|
|
65
|
+
*/
|
|
52
66
|
kitchenName: any;
|
|
53
67
|
units: number | null;
|
|
54
68
|
unitsName: string;
|
|
55
69
|
}[];
|
|
56
|
-
bundle: Omit<
|
|
70
|
+
bundle: Omit<Order.Bundle.Bundle, "itemTypes"> & {
|
|
57
71
|
itemTypes: string[];
|
|
58
72
|
};
|
|
59
73
|
bundleName: string;
|
|
@@ -61,13 +75,21 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
61
75
|
singleBasePrice: number;
|
|
62
76
|
quantity: number;
|
|
63
77
|
isLast: boolean;
|
|
64
|
-
base:
|
|
78
|
+
base: Order.Item.Item;
|
|
65
79
|
bundleSize: string;
|
|
66
80
|
bundleBasketUUIDs: string[];
|
|
67
81
|
VATRate: number;
|
|
68
82
|
}[];
|
|
69
83
|
get groupedDeals(): {
|
|
70
84
|
bundles: {
|
|
85
|
+
kitchenZones: {
|
|
86
|
+
name: string;
|
|
87
|
+
items: Order.Item.Item[];
|
|
88
|
+
uuid?: string | undefined;
|
|
89
|
+
slug?: string | undefined;
|
|
90
|
+
sortOrderOnPrint?: number | undefined;
|
|
91
|
+
capacity?: number | undefined;
|
|
92
|
+
}[];
|
|
71
93
|
unitPrice: number;
|
|
72
94
|
price: number;
|
|
73
95
|
quantity: number;
|
|
@@ -79,13 +101,13 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
79
101
|
name: string;
|
|
80
102
|
uuid: string;
|
|
81
103
|
kitchenTicketName?: string | null | undefined;
|
|
82
|
-
kitchenZone?:
|
|
104
|
+
kitchenZone?: Order.Item.KitchenZone | null | undefined;
|
|
83
105
|
itemUUID: string;
|
|
84
106
|
straightToPickup: boolean;
|
|
85
107
|
price: number;
|
|
86
108
|
priceEatIn: number;
|
|
87
109
|
hasEatInPrice: boolean;
|
|
88
|
-
appStraightToPickup:
|
|
110
|
+
appStraightToPickup: Order.Item.AppStraightToPickup;
|
|
89
111
|
refund?: number | undefined;
|
|
90
112
|
totalAmountBeforeRefund?: number | undefined;
|
|
91
113
|
refundIncludingTax?: number | undefined;
|
|
@@ -97,36 +119,41 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
97
119
|
finalPrice: number;
|
|
98
120
|
totalAmount: number;
|
|
99
121
|
subtotalAmount: number;
|
|
100
|
-
customizations:
|
|
122
|
+
customizations: Order.Item.Customization[];
|
|
101
123
|
vatAmount: number;
|
|
102
124
|
discount: number;
|
|
103
125
|
taxExempt: number;
|
|
104
126
|
vatRateEatIn: number;
|
|
105
127
|
vatRateTakeaway: number;
|
|
106
|
-
promotion?:
|
|
128
|
+
promotion?: Order.Promotion | undefined;
|
|
107
129
|
type: string;
|
|
108
130
|
dealPriceOverrideDiff?: {
|
|
109
131
|
priceEatIn?: number | undefined;
|
|
110
132
|
price?: number | undefined;
|
|
111
133
|
} | undefined;
|
|
112
|
-
|
|
134
|
+
allergens: string[];
|
|
135
|
+
itemRaw: Order.Item.Item;
|
|
113
136
|
itemNameWithUnits: string;
|
|
114
|
-
itemName: any;
|
|
137
|
+
itemName: any; /**
|
|
138
|
+
* This class is used to generate the data that is used to render the print template.
|
|
139
|
+
* Just add new getters and they will be available in the template.
|
|
140
|
+
*/
|
|
115
141
|
kitchenName: any;
|
|
116
142
|
units: number | null;
|
|
117
143
|
unitsName: string;
|
|
118
144
|
}[];
|
|
119
|
-
bundle: Omit<
|
|
145
|
+
bundle: Omit<Order.Bundle.Bundle, "itemTypes"> & {
|
|
120
146
|
itemTypes: string[];
|
|
121
147
|
};
|
|
122
148
|
bundleName: string;
|
|
123
149
|
bundleNameWithSize: string;
|
|
124
150
|
singleBasePrice: number;
|
|
125
151
|
isLast: boolean;
|
|
126
|
-
base:
|
|
152
|
+
base: Order.Item.Item;
|
|
127
153
|
bundleSize: string;
|
|
128
154
|
bundleBasketUUIDs: string[];
|
|
129
155
|
VATRate: number;
|
|
156
|
+
allergens?: import("@vita-mojo/types").Allergen[] | undefined;
|
|
130
157
|
}[];
|
|
131
158
|
price: number;
|
|
132
159
|
totalPrice: number;
|
|
@@ -142,20 +169,29 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
142
169
|
bundles: {
|
|
143
170
|
price: number;
|
|
144
171
|
unitPrice: number;
|
|
172
|
+
allergens: import("@vita-mojo/types").Allergen[];
|
|
145
173
|
totalBasePrice: number;
|
|
174
|
+
kitchenZones: {
|
|
175
|
+
name: string;
|
|
176
|
+
items: Order.Item.Item[];
|
|
177
|
+
uuid?: string | undefined;
|
|
178
|
+
slug?: string | undefined;
|
|
179
|
+
sortOrderOnPrint?: number | undefined;
|
|
180
|
+
capacity?: number | undefined;
|
|
181
|
+
}[];
|
|
146
182
|
regular: {
|
|
147
183
|
totalPrice: number;
|
|
148
184
|
quantity: number;
|
|
149
185
|
name: string;
|
|
150
186
|
uuid: string;
|
|
151
187
|
kitchenTicketName?: string | null | undefined;
|
|
152
|
-
kitchenZone?:
|
|
188
|
+
kitchenZone?: Order.Item.KitchenZone | null | undefined;
|
|
153
189
|
itemUUID: string;
|
|
154
190
|
straightToPickup: boolean;
|
|
155
191
|
price: number;
|
|
156
192
|
priceEatIn: number;
|
|
157
193
|
hasEatInPrice: boolean;
|
|
158
|
-
appStraightToPickup:
|
|
194
|
+
appStraightToPickup: Order.Item.AppStraightToPickup;
|
|
159
195
|
refund?: number | undefined;
|
|
160
196
|
totalAmountBeforeRefund?: number | undefined;
|
|
161
197
|
refundIncludingTax?: number | undefined;
|
|
@@ -167,26 +203,30 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
167
203
|
finalPrice: number;
|
|
168
204
|
totalAmount: number;
|
|
169
205
|
subtotalAmount: number;
|
|
170
|
-
customizations:
|
|
206
|
+
customizations: Order.Item.Customization[];
|
|
171
207
|
vatAmount: number;
|
|
172
208
|
discount: number;
|
|
173
209
|
taxExempt: number;
|
|
174
210
|
vatRateEatIn: number;
|
|
175
211
|
vatRateTakeaway: number;
|
|
176
|
-
promotion?:
|
|
212
|
+
promotion?: Order.Promotion | undefined;
|
|
177
213
|
type: string;
|
|
178
214
|
dealPriceOverrideDiff?: {
|
|
179
215
|
priceEatIn?: number | undefined;
|
|
180
216
|
price?: number | undefined;
|
|
181
217
|
} | undefined;
|
|
182
|
-
|
|
218
|
+
allergens: string[];
|
|
219
|
+
itemRaw: Order.Item.Item;
|
|
183
220
|
itemNameWithUnits: string;
|
|
184
|
-
itemName: any;
|
|
221
|
+
itemName: any; /**
|
|
222
|
+
* This class is used to generate the data that is used to render the print template.
|
|
223
|
+
* Just add new getters and they will be available in the template.
|
|
224
|
+
*/
|
|
185
225
|
kitchenName: any;
|
|
186
226
|
units: number | null;
|
|
187
227
|
unitsName: string;
|
|
188
228
|
}[];
|
|
189
|
-
bundle: Omit<
|
|
229
|
+
bundle: Omit<Order.Bundle.Bundle, "itemTypes"> & {
|
|
190
230
|
itemTypes: string[];
|
|
191
231
|
};
|
|
192
232
|
bundleName: string;
|
|
@@ -194,13 +234,21 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
194
234
|
singleBasePrice: number;
|
|
195
235
|
quantity: number;
|
|
196
236
|
isLast: boolean;
|
|
197
|
-
base:
|
|
237
|
+
base: Order.Item.Item;
|
|
198
238
|
bundleSize: string;
|
|
199
239
|
bundleBasketUUIDs: string[];
|
|
200
240
|
VATRate: number;
|
|
201
241
|
}[];
|
|
202
242
|
deals: ({
|
|
203
243
|
bundles: {
|
|
244
|
+
kitchenZones: {
|
|
245
|
+
name: string;
|
|
246
|
+
items: Order.Item.Item[];
|
|
247
|
+
uuid?: string | undefined;
|
|
248
|
+
slug?: string | undefined;
|
|
249
|
+
sortOrderOnPrint?: number | undefined;
|
|
250
|
+
capacity?: number | undefined;
|
|
251
|
+
}[];
|
|
204
252
|
unitPrice: number;
|
|
205
253
|
price: number;
|
|
206
254
|
quantity: number;
|
|
@@ -212,13 +260,13 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
212
260
|
name: string;
|
|
213
261
|
uuid: string;
|
|
214
262
|
kitchenTicketName?: string | null | undefined;
|
|
215
|
-
kitchenZone?:
|
|
263
|
+
kitchenZone?: Order.Item.KitchenZone | null | undefined;
|
|
216
264
|
itemUUID: string;
|
|
217
265
|
straightToPickup: boolean;
|
|
218
266
|
price: number;
|
|
219
267
|
priceEatIn: number;
|
|
220
268
|
hasEatInPrice: boolean;
|
|
221
|
-
appStraightToPickup:
|
|
269
|
+
appStraightToPickup: Order.Item.AppStraightToPickup;
|
|
222
270
|
refund?: number | undefined;
|
|
223
271
|
totalAmountBeforeRefund?: number | undefined;
|
|
224
272
|
refundIncludingTax?: number | undefined;
|
|
@@ -230,36 +278,41 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
230
278
|
finalPrice: number;
|
|
231
279
|
totalAmount: number;
|
|
232
280
|
subtotalAmount: number;
|
|
233
|
-
customizations:
|
|
281
|
+
customizations: Order.Item.Customization[];
|
|
234
282
|
vatAmount: number;
|
|
235
283
|
discount: number;
|
|
236
284
|
taxExempt: number;
|
|
237
285
|
vatRateEatIn: number;
|
|
238
286
|
vatRateTakeaway: number;
|
|
239
|
-
promotion?:
|
|
287
|
+
promotion?: Order.Promotion | undefined;
|
|
240
288
|
type: string;
|
|
241
289
|
dealPriceOverrideDiff?: {
|
|
242
290
|
priceEatIn?: number | undefined;
|
|
243
291
|
price?: number | undefined;
|
|
244
292
|
} | undefined;
|
|
245
|
-
|
|
293
|
+
allergens: string[];
|
|
294
|
+
itemRaw: Order.Item.Item;
|
|
246
295
|
itemNameWithUnits: string;
|
|
247
|
-
itemName: any;
|
|
296
|
+
itemName: any; /**
|
|
297
|
+
* This class is used to generate the data that is used to render the print template.
|
|
298
|
+
* Just add new getters and they will be available in the template.
|
|
299
|
+
*/
|
|
248
300
|
kitchenName: any;
|
|
249
301
|
units: number | null;
|
|
250
302
|
unitsName: string;
|
|
251
303
|
}[];
|
|
252
|
-
bundle: Omit<
|
|
304
|
+
bundle: Omit<Order.Bundle.Bundle, "itemTypes"> & {
|
|
253
305
|
itemTypes: string[];
|
|
254
306
|
};
|
|
255
307
|
bundleName: string;
|
|
256
308
|
bundleNameWithSize: string;
|
|
257
309
|
singleBasePrice: number;
|
|
258
310
|
isLast: boolean;
|
|
259
|
-
base:
|
|
311
|
+
base: Order.Item.Item;
|
|
260
312
|
bundleSize: string;
|
|
261
313
|
bundleBasketUUIDs: string[];
|
|
262
314
|
VATRate: number;
|
|
315
|
+
allergens?: import("@vita-mojo/types").Allergen[] | undefined;
|
|
263
316
|
}[];
|
|
264
317
|
price: number;
|
|
265
318
|
totalPrice: number;
|
|
@@ -290,19 +343,27 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
290
343
|
name: string;
|
|
291
344
|
size: string;
|
|
292
345
|
nameWithSize: string;
|
|
293
|
-
bundle: Omit<
|
|
346
|
+
bundle: Omit<Order.Bundle.Bundle, "itemTypes"> & {
|
|
294
347
|
itemTypes: string[];
|
|
295
348
|
};
|
|
296
|
-
base:
|
|
349
|
+
base: Order.Item.Item;
|
|
297
350
|
regular: {
|
|
298
351
|
name: string;
|
|
299
352
|
kitchenName: any;
|
|
300
353
|
units: number;
|
|
301
354
|
unitsName: string;
|
|
302
355
|
totalPrice: number;
|
|
303
|
-
item:
|
|
356
|
+
item: Order.Item.Item;
|
|
304
357
|
quantity: number;
|
|
305
358
|
}[];
|
|
359
|
+
kitchenZones: {
|
|
360
|
+
name: string;
|
|
361
|
+
items: Order.Item.Item[];
|
|
362
|
+
uuid?: string | undefined;
|
|
363
|
+
slug?: string | undefined;
|
|
364
|
+
sortOrderOnPrint?: number | undefined;
|
|
365
|
+
capacity?: number | undefined;
|
|
366
|
+
}[];
|
|
306
367
|
}[];
|
|
307
368
|
groupedDeals: {
|
|
308
369
|
bundles: {
|
|
@@ -315,19 +376,27 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
315
376
|
name: string;
|
|
316
377
|
size: string;
|
|
317
378
|
nameWithSize: string;
|
|
318
|
-
bundle: Omit<
|
|
379
|
+
bundle: Omit<Order.Bundle.Bundle, "itemTypes"> & {
|
|
319
380
|
itemTypes: string[];
|
|
320
381
|
};
|
|
321
|
-
base:
|
|
382
|
+
base: Order.Item.Item;
|
|
322
383
|
regular: {
|
|
323
384
|
name: string;
|
|
324
385
|
kitchenName: any;
|
|
325
386
|
units: number;
|
|
326
387
|
unitsName: string;
|
|
327
388
|
totalPrice: number;
|
|
328
|
-
item:
|
|
389
|
+
item: Order.Item.Item;
|
|
329
390
|
quantity: number;
|
|
330
391
|
}[];
|
|
392
|
+
kitchenZones: {
|
|
393
|
+
name: string;
|
|
394
|
+
items: Order.Item.Item[];
|
|
395
|
+
uuid?: string | undefined;
|
|
396
|
+
slug?: string | undefined;
|
|
397
|
+
sortOrderOnPrint?: number | undefined;
|
|
398
|
+
capacity?: number | undefined;
|
|
399
|
+
}[];
|
|
331
400
|
}[] | undefined;
|
|
332
401
|
price?: number | undefined;
|
|
333
402
|
totalPrice?: number | undefined;
|
|
@@ -347,19 +416,27 @@ export declare class OrderPrintContext extends PrintContextBase {
|
|
|
347
416
|
name: string;
|
|
348
417
|
size: string;
|
|
349
418
|
nameWithSize: string;
|
|
350
|
-
bundle: Omit<
|
|
419
|
+
bundle: Omit<Order.Bundle.Bundle, "itemTypes"> & {
|
|
351
420
|
itemTypes: string[];
|
|
352
421
|
};
|
|
353
|
-
base:
|
|
422
|
+
base: Order.Item.Item;
|
|
354
423
|
regular: {
|
|
355
424
|
name: string;
|
|
356
425
|
kitchenName: any;
|
|
357
426
|
units: number;
|
|
358
427
|
unitsName: string;
|
|
359
428
|
totalPrice: number;
|
|
360
|
-
item:
|
|
429
|
+
item: Order.Item.Item;
|
|
361
430
|
quantity: number;
|
|
362
431
|
}[];
|
|
432
|
+
kitchenZones: {
|
|
433
|
+
name: string;
|
|
434
|
+
items: Order.Item.Item[];
|
|
435
|
+
uuid?: string | undefined;
|
|
436
|
+
slug?: string | undefined;
|
|
437
|
+
sortOrderOnPrint?: number | undefined;
|
|
438
|
+
capacity?: number | undefined;
|
|
439
|
+
}[];
|
|
363
440
|
}[];
|
|
364
441
|
}[];
|
|
365
442
|
serialize(): this;
|
|
@@ -37,14 +37,25 @@ class OrderPrintContext extends base_1.PrintContextBase {
|
|
|
37
37
|
get groupedBundles() {
|
|
38
38
|
var _a;
|
|
39
39
|
return ((_a = this.sortedGroupedBundles) !== null && _a !== void 0 ? _a : []).map((bundleForKds) => {
|
|
40
|
-
var _a, _b, _c, _d;
|
|
40
|
+
var _a, _b, _c, _d, _e, _f;
|
|
41
41
|
const unitPrice = (_b = (_a = bundleForKds.bundle) === null || _a === void 0 ? void 0 : _a.finalPrice) !== null && _b !== void 0 ? _b : 0;
|
|
42
42
|
const quantity = (_c = bundleForKds.quantity) !== null && _c !== void 0 ? _c : 1;
|
|
43
43
|
const price = unitPrice * quantity;
|
|
44
44
|
const totalBasePrice = bundleForKds.singleBasePrice * quantity;
|
|
45
|
+
const allergens = (_e = (_d = this.allergens) === null || _d === void 0 ? void 0 : _d.filter((allergen) => { var _a, _b; return (_b = (_a = bundleForKds.bundle) === null || _a === void 0 ? void 0 : _a.allergens) === null || _b === void 0 ? void 0 : _b.includes(allergen.uuid); })) !== null && _e !== void 0 ? _e : [];
|
|
46
|
+
const groupedZones = (0, utils_1.groupBy)(bundleForKds === null || bundleForKds === void 0 ? void 0 : bundleForKds.regular, (item) => { var _a, _b; return (_b = (_a = item.kitchenZone) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : ''; });
|
|
47
|
+
const kitchenZones = Object.keys(groupedZones)
|
|
48
|
+
.map((zone) => {
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
const kitchenZone = (_b = (_a = groupedZones[zone]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.kitchenZone;
|
|
51
|
+
return Object.assign(Object.assign({}, (kitchenZone !== null && kitchenZone !== void 0 ? kitchenZone : {})), { name: (_c = kitchenZone === null || kitchenZone === void 0 ? void 0 : kitchenZone.name) !== null && _c !== void 0 ? _c : '', items: groupedZones === null || groupedZones === void 0 ? void 0 : groupedZones[zone] });
|
|
52
|
+
})
|
|
53
|
+
.sort((a, b) => { var _a, _b; return ((_a = a.sortOrderOnPrint) !== null && _a !== void 0 ? _a : 0) - ((_b = b.sortOrderOnPrint) !== null && _b !== void 0 ? _b : 0); });
|
|
45
54
|
return Object.assign(Object.assign({}, bundleForKds), { price,
|
|
46
55
|
unitPrice,
|
|
47
|
-
|
|
56
|
+
allergens,
|
|
57
|
+
totalBasePrice,
|
|
58
|
+
kitchenZones, regular: ((_f = bundleForKds.regular) !== null && _f !== void 0 ? _f : []).map((item) => (Object.assign(Object.assign({}, item), { totalPrice: item.finalPrice * quantity, quantity: (item.units || 1) * quantity }))) });
|
|
48
59
|
});
|
|
49
60
|
}
|
|
50
61
|
get groupedDeals() {
|
|
@@ -54,7 +65,15 @@ class OrderPrintContext extends base_1.PrintContextBase {
|
|
|
54
65
|
const bundleQuantity = (_a = deal.quantity) !== null && _a !== void 0 ? _a : 1;
|
|
55
66
|
const bundles = (_b = deal.bundles) === null || _b === void 0 ? void 0 : _b.map((dealBundle) => {
|
|
56
67
|
var _a, _b, _c, _d;
|
|
57
|
-
|
|
68
|
+
const groupedZones = (0, utils_1.groupBy)(dealBundle === null || dealBundle === void 0 ? void 0 : dealBundle.regular, (item) => { var _a, _b; return (_b = (_a = item.kitchenZone) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : ''; });
|
|
69
|
+
const kitchenZones = Object.keys(groupedZones)
|
|
70
|
+
.map((zone) => {
|
|
71
|
+
var _a, _b, _c;
|
|
72
|
+
const kitchenZone = (_b = (_a = groupedZones[zone]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.kitchenZone;
|
|
73
|
+
return Object.assign(Object.assign({}, (kitchenZone !== null && kitchenZone !== void 0 ? kitchenZone : {})), { name: (_c = kitchenZone === null || kitchenZone === void 0 ? void 0 : kitchenZone.name) !== null && _c !== void 0 ? _c : '', items: groupedZones === null || groupedZones === void 0 ? void 0 : groupedZones[zone] });
|
|
74
|
+
})
|
|
75
|
+
.sort((a, b) => { var _a, _b; return ((_a = a.sortOrderOnPrint) !== null && _a !== void 0 ? _a : 0) - ((_b = b.sortOrderOnPrint) !== null && _b !== void 0 ? _b : 0); });
|
|
76
|
+
return Object.assign(Object.assign({}, dealBundle), { kitchenZones, unitPrice: (_b = (_a = dealBundle.bundle) === null || _a === void 0 ? void 0 : _a.finalPrice) !== null && _b !== void 0 ? _b : 0, price: ((_c = dealBundle.bundle) === null || _c === void 0 ? void 0 : _c.finalPrice) * (bundleQuantity !== null && bundleQuantity !== void 0 ? bundleQuantity : 1), quantity: bundleQuantity, units: 1, totalBasePrice: dealBundle.singleBasePrice * bundleQuantity, regular: ((_d = dealBundle.regular) !== null && _d !== void 0 ? _d : []).map((item) => (Object.assign(Object.assign({}, item), { totalPrice: item.finalPrice * bundleQuantity, quantity: (item.units || 1) * bundleQuantity }))) });
|
|
58
77
|
});
|
|
59
78
|
const dealPrice = bundles.reduce((price, bundle) => price + bundle.unitPrice, 0);
|
|
60
79
|
const dealSingleBasePrice = bundles.reduce((price, bundle) => price + bundle.singleBasePrice, 0);
|
|
@@ -143,6 +162,14 @@ class OrderPrintContext extends base_1.PrintContextBase {
|
|
|
143
162
|
quantity: (item.units || 1) * bundle.quantity,
|
|
144
163
|
};
|
|
145
164
|
});
|
|
165
|
+
const groupedZones = (0, utils_1.groupBy)(bundle.regular, (item) => { var _a, _b; return (_b = (_a = item.kitchenZone) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : ''; });
|
|
166
|
+
const kitchenZones = Object.keys(groupedZones)
|
|
167
|
+
.map((zone) => {
|
|
168
|
+
var _a, _b, _c;
|
|
169
|
+
const kitchenZone = (_b = (_a = groupedZones[zone]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.kitchenZone;
|
|
170
|
+
return Object.assign(Object.assign({}, (kitchenZone !== null && kitchenZone !== void 0 ? kitchenZone : {})), { name: (_c = kitchenZone === null || kitchenZone === void 0 ? void 0 : kitchenZone.name) !== null && _c !== void 0 ? _c : '', items: groupedZones === null || groupedZones === void 0 ? void 0 : groupedZones[zone] });
|
|
171
|
+
})
|
|
172
|
+
.sort((a, b) => { var _a, _b; return ((_a = a.sortOrderOnPrint) !== null && _a !== void 0 ? _a : 0) - ((_b = b.sortOrderOnPrint) !== null && _b !== void 0 ? _b : 0); });
|
|
146
173
|
return {
|
|
147
174
|
kitchenName: ((_b = bundle.bundle) === null || _b === void 0 ? void 0 : _b.kitchenTicketName) || bundle.bundleName || '',
|
|
148
175
|
name: bundle.bundleName,
|
|
@@ -151,6 +178,7 @@ class OrderPrintContext extends base_1.PrintContextBase {
|
|
|
151
178
|
bundle: bundle.bundle,
|
|
152
179
|
base: bundle.base,
|
|
153
180
|
regular,
|
|
181
|
+
kitchenZones,
|
|
154
182
|
};
|
|
155
183
|
};
|
|
156
184
|
return this.groupedByKitchenStationName.map(({ bundles, kitchenStationName, deals }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../../../packages/print/src/lib/contexts/order.ts"],"names":[],"mappings":";;;AACA,oCAA6C;AAC7C,iCAA0C;AAE1C;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,uBAAgB;IACrD,IAAI,eAAe;;QACjB,MAAM,eAAe,GAAG,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI,0CAAE,OAAO,CAAC;QAElD,IAAI,CAAC,eAAe,EAAE;YACpB,OAAO,EAAE,CAAC;SACX;QAED,MAAM,WAAW,GAAkC;YACjD,UAAU;YACV,UAAU;YACV,MAAM;YACN,UAAU;SACX,CAAC;QACF,MAAM,OAAO,GAAG,WAAW;aACxB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;aAClC,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,OAAO,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IAED,IAAI,oB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,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAC9D;gBACJ,CAAC,CAAC;aACH,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;IAED,0GAA0G;IACjG,SAAS;QAChB,OAAO,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC5C,CAAC;CACF;AAlTD,8CAkTC"}
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../../../packages/print/src/lib/contexts/order.ts"],"names":[],"mappings":";;;AAGA,oCAA6C;AAC7C,iCAA0C;AAE1C;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,uBAAgB;IACrD,IAAI,eAAe;;QACjB,MAAM,eAAe,GAAG,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI,0CAAE,OAAO,CAAC;QAElD,IAAI,CAAC,eAAe,EAAE;YACpB,OAAO,EAAE,CAAC;SACX;QAED,MAAM,WAAW,GAAkC;YACjD,UAAU;YACV,UAAU;YACV,MAAM;YACN,UAAU;SACX,CAAC;QACF,MAAM,OAAO,GAAG,WAAW;aACxB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;aAClC,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,OAAO,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IAED,IAAI,oBAAoB;;QACtB,MAAM,eAAe,GAAG,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI,0CAAE,OAAO,CAAC;QAElD,IAAI,CAAC,eAAe,EAAE;YACpB,OAAO,EAAE,CAAC;SACX;QAED,OAAO,IAAA,gBAAQ,EAAC,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,YAAY,KAAI,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,cAAc;;QAChB,OAAO,CAAC,MAAA,IAAI,CAAC,oBA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C,EAC1B,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAC9D;gBACJ,CAAC,CAAC;aACH,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;IAED,0GAA0G;IACjG,SAAS;QAChB,OAAO,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC5C,CAAC;CACF;AAjXD,8CAiXC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Store, Tenant } from '@vita-mojo/types';
|
|
1
|
+
import { Allergen, Store, Tenant } from '@vita-mojo/types';
|
|
2
2
|
import { FiscalResponse } from './fiscal-response';
|
|
3
3
|
import { PrintOrder } from './order';
|
|
4
4
|
import { Settings } from './settings';
|
|
@@ -24,4 +24,5 @@ export interface BasePrintContextProps {
|
|
|
24
24
|
fiscalTicket?: FiscalResponse;
|
|
25
25
|
debugPrint?: boolean;
|
|
26
26
|
timeFormatter: (date: Date | number, formatStr: string, options?: Record<string, unknown>) => string;
|
|
27
|
+
allergens: Array<Allergen>;
|
|
27
28
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Allergen } from '@vita-mojo/types';
|
|
1
2
|
import { Bundle, BundleItem } from './order';
|
|
2
3
|
type RegularItem = BundleItem & {
|
|
3
4
|
itemRaw: BundleItem;
|
|
@@ -22,5 +23,6 @@ export type SortedGroupedBundles = {
|
|
|
22
23
|
bundleSize: string;
|
|
23
24
|
bundleBasketUUIDs: Array<string>;
|
|
24
25
|
VATRate: number;
|
|
26
|
+
allergens?: Array<Allergen>;
|
|
25
27
|
};
|
|
26
28
|
export {};
|