@open-tender/store 0.3.11 → 0.3.12
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/dist/cjs/utils/orders.js
CHANGED
|
@@ -215,10 +215,16 @@ var makeKdsStationCount = function (orders, itemTypeIds) {
|
|
|
215
215
|
exports.makeKdsStationCount = makeKdsStationCount;
|
|
216
216
|
var makeKdsStationCounts = function (orders, prepStations) {
|
|
217
217
|
var _a = (0, exports.makeCurrentAndFutureOrders)(orders), currentOrders = _a.current, futureOrders = _a.future;
|
|
218
|
+
var currentAssembly = currentOrders.filter(function (i) { return (0, exports.notDone)(i.prep_status); });
|
|
219
|
+
var currentExpo = currentOrders.filter(function (i) { return i.prep_status === 'DONE'; });
|
|
220
|
+
var futureAssembly = futureOrders.filter(function (i) { return (0, exports.notDone)(i.prep_status); });
|
|
221
|
+
var futureExpo = futureOrders.filter(function (i) { return i.prep_status === 'DONE'; });
|
|
218
222
|
return prepStations.reduce(function (obj, i) {
|
|
219
223
|
var _a;
|
|
220
|
-
var
|
|
221
|
-
var
|
|
224
|
+
var currentFiltered = i.prep_type === 'ASSEMBLY' ? currentAssembly : currentExpo;
|
|
225
|
+
var current = (0, exports.makeKdsStationCount)(currentFiltered, i.item_type_ids);
|
|
226
|
+
var futureFiltered = i.prep_type === 'ASSEMBLY' ? futureAssembly : futureExpo;
|
|
227
|
+
var future = (0, exports.makeKdsStationCount)(futureFiltered, i.item_type_ids);
|
|
222
228
|
return tslib_1.__assign(tslib_1.__assign({}, obj), (_a = {}, _a[i.prep_station_id] = { CURRENT: current, FUTURE: future }, _a));
|
|
223
229
|
}, {});
|
|
224
230
|
};
|
package/dist/esm/utils/orders.js
CHANGED
|
@@ -197,10 +197,16 @@ export var makeKdsStationCount = function (orders, itemTypeIds) {
|
|
|
197
197
|
};
|
|
198
198
|
export var makeKdsStationCounts = function (orders, prepStations) {
|
|
199
199
|
var _a = makeCurrentAndFutureOrders(orders), currentOrders = _a.current, futureOrders = _a.future;
|
|
200
|
+
var currentAssembly = currentOrders.filter(function (i) { return notDone(i.prep_status); });
|
|
201
|
+
var currentExpo = currentOrders.filter(function (i) { return i.prep_status === 'DONE'; });
|
|
202
|
+
var futureAssembly = futureOrders.filter(function (i) { return notDone(i.prep_status); });
|
|
203
|
+
var futureExpo = futureOrders.filter(function (i) { return i.prep_status === 'DONE'; });
|
|
200
204
|
return prepStations.reduce(function (obj, i) {
|
|
201
205
|
var _a;
|
|
202
|
-
var
|
|
203
|
-
var
|
|
206
|
+
var currentFiltered = i.prep_type === 'ASSEMBLY' ? currentAssembly : currentExpo;
|
|
207
|
+
var current = makeKdsStationCount(currentFiltered, i.item_type_ids);
|
|
208
|
+
var futureFiltered = i.prep_type === 'ASSEMBLY' ? futureAssembly : futureExpo;
|
|
209
|
+
var future = makeKdsStationCount(futureFiltered, i.item_type_ids);
|
|
204
210
|
return __assign(__assign({}, obj), (_a = {}, _a[i.prep_station_id] = { CURRENT: current, FUTURE: future }, _a));
|
|
205
211
|
}, {});
|
|
206
212
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
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",
|