@open-tender/store 0.3.21 → 0.3.22
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.
|
@@ -15,10 +15,11 @@ export interface PrepStation {
|
|
|
15
15
|
item_type_ids: number[] | null;
|
|
16
16
|
prep_type: KdsPrepType;
|
|
17
17
|
assembly_options: KdsAssemblyOptions;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
expo_show_print: boolean;
|
|
19
|
+
expo_show_reset: boolean;
|
|
20
|
+
expo_done_only: boolean;
|
|
21
|
+
expo_complete: boolean;
|
|
22
|
+
expo_complete_all: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare type PrepStations = PrepStation[];
|
|
24
25
|
export interface KdsTerminal {
|
package/dist/cjs/utils/orders.js
CHANGED
|
@@ -126,7 +126,7 @@ var filterOrdersByItemType = function (orders, itemTypeIds) {
|
|
|
126
126
|
};
|
|
127
127
|
exports.filterOrdersByItemType = filterOrdersByItemType;
|
|
128
128
|
var makeOrdersForPrepStation = function (orders, prepStation, orderType) {
|
|
129
|
-
var item_type_ids = prepStation.item_type_ids, prep_type = prepStation.prep_type,
|
|
129
|
+
var item_type_ids = prepStation.item_type_ids, prep_type = prepStation.prep_type, expo_done_only = prepStation.expo_done_only;
|
|
130
130
|
var ordersOfType = (0, exports.makeOrdersOfType)(orders, orderType);
|
|
131
131
|
if (orderType === 'COMPLETED') {
|
|
132
132
|
return (0, exports.filterOrdersByItemType)(ordersOfType, item_type_ids);
|
|
@@ -134,7 +134,9 @@ var makeOrdersForPrepStation = function (orders, prepStation, orderType) {
|
|
|
134
134
|
var filteredOrders = prep_type === 'ASSEMBLY'
|
|
135
135
|
? ordersOfType.filter(function (i) { return (0, exports.notDone)(i.prep_status); })
|
|
136
136
|
: ordersOfType.filter(function (i) {
|
|
137
|
-
return
|
|
137
|
+
return expo_done_only
|
|
138
|
+
? i.prep_status === 'DONE'
|
|
139
|
+
: (0, exports.notCompleted)(i.prep_status);
|
|
138
140
|
});
|
|
139
141
|
var filtered = (0, exports.filterOrdersByItemType)(filteredOrders, item_type_ids);
|
|
140
142
|
return prep_type === 'EXPO'
|
|
@@ -232,13 +234,13 @@ var makeKdsStationCounts = function (orders, prepStations) {
|
|
|
232
234
|
var _a;
|
|
233
235
|
var currentFiltered = i.prep_type === 'ASSEMBLY'
|
|
234
236
|
? currentAssembly
|
|
235
|
-
: i.
|
|
237
|
+
: i.expo_done_only
|
|
236
238
|
? currentExpoDone
|
|
237
239
|
: currentExpo;
|
|
238
240
|
var current = (0, exports.makeKdsStationCount)(currentFiltered, i.item_type_ids);
|
|
239
241
|
var futureFiltered = i.prep_type === 'ASSEMBLY'
|
|
240
242
|
? futureAssembly
|
|
241
|
-
: i.
|
|
243
|
+
: i.expo_done_only
|
|
242
244
|
? futureExpoDone
|
|
243
245
|
: futureExpo;
|
|
244
246
|
var future = (0, exports.makeKdsStationCount)(futureFiltered, i.item_type_ids);
|
|
@@ -15,10 +15,11 @@ export interface PrepStation {
|
|
|
15
15
|
item_type_ids: number[] | null;
|
|
16
16
|
prep_type: KdsPrepType;
|
|
17
17
|
assembly_options: KdsAssemblyOptions;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
expo_show_print: boolean;
|
|
19
|
+
expo_show_reset: boolean;
|
|
20
|
+
expo_done_only: boolean;
|
|
21
|
+
expo_complete: boolean;
|
|
22
|
+
expo_complete_all: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare type PrepStations = PrepStation[];
|
|
24
25
|
export interface KdsTerminal {
|
package/dist/esm/utils/orders.js
CHANGED
|
@@ -112,7 +112,7 @@ export var filterOrdersByItemType = function (orders, itemTypeIds) {
|
|
|
112
112
|
.filter(function (i) { return i.tickets.length; });
|
|
113
113
|
};
|
|
114
114
|
export var makeOrdersForPrepStation = function (orders, prepStation, orderType) {
|
|
115
|
-
var item_type_ids = prepStation.item_type_ids, prep_type = prepStation.prep_type,
|
|
115
|
+
var item_type_ids = prepStation.item_type_ids, prep_type = prepStation.prep_type, expo_done_only = prepStation.expo_done_only;
|
|
116
116
|
var ordersOfType = makeOrdersOfType(orders, orderType);
|
|
117
117
|
if (orderType === 'COMPLETED') {
|
|
118
118
|
return filterOrdersByItemType(ordersOfType, item_type_ids);
|
|
@@ -120,7 +120,9 @@ export var makeOrdersForPrepStation = function (orders, prepStation, orderType)
|
|
|
120
120
|
var filteredOrders = prep_type === 'ASSEMBLY'
|
|
121
121
|
? ordersOfType.filter(function (i) { return notDone(i.prep_status); })
|
|
122
122
|
: ordersOfType.filter(function (i) {
|
|
123
|
-
return
|
|
123
|
+
return expo_done_only
|
|
124
|
+
? i.prep_status === 'DONE'
|
|
125
|
+
: notCompleted(i.prep_status);
|
|
124
126
|
});
|
|
125
127
|
var filtered = filterOrdersByItemType(filteredOrders, item_type_ids);
|
|
126
128
|
return prep_type === 'EXPO'
|
|
@@ -214,13 +216,13 @@ export var makeKdsStationCounts = function (orders, prepStations) {
|
|
|
214
216
|
var _a;
|
|
215
217
|
var currentFiltered = i.prep_type === 'ASSEMBLY'
|
|
216
218
|
? currentAssembly
|
|
217
|
-
: i.
|
|
219
|
+
: i.expo_done_only
|
|
218
220
|
? currentExpoDone
|
|
219
221
|
: currentExpo;
|
|
220
222
|
var current = makeKdsStationCount(currentFiltered, i.item_type_ids);
|
|
221
223
|
var futureFiltered = i.prep_type === 'ASSEMBLY'
|
|
222
224
|
? futureAssembly
|
|
223
|
-
: i.
|
|
225
|
+
: i.expo_done_only
|
|
224
226
|
? futureExpoDone
|
|
225
227
|
: futureExpo;
|
|
226
228
|
var future = makeKdsStationCount(futureFiltered, i.item_type_ids);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.22",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|