@open-tender/store 0.3.17 → 0.3.18
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/slices/kds.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import { DateString, FetchOrdersArgs, ItemTypes, KdsFontSize, KdsOrderType, KdsStationCounts, KdsView, OrderCounts, OrderKds, OrdersAndStationCounts, OrdersKds, OrderUpdate, PrepStations, RequestError, RequestErrorAPI, RequestStatus, TicketStatus, TicketStatusUpdate } from '../types';
|
|
2
|
+
import { DateString, FetchOrdersArgs, ItemTypes, KdsFontSize, KdsOrderType, KdsStationCounts, KdsView, OrderCounts, OrderKds, OrdersAndStationCounts, OrdersKds, OrderUpdate, PrepStation, PrepStations, RequestError, RequestErrorAPI, RequestStatus, TicketStatus, TicketStatusUpdate } from '../types';
|
|
3
3
|
import { ReducerType } from './types';
|
|
4
4
|
export interface KdsState {
|
|
5
5
|
itemTypes: ItemTypes | null;
|
|
@@ -171,7 +171,7 @@ export declare const kdsSlice: import("@reduxjs/toolkit").Slice<KdsState, {
|
|
|
171
171
|
order: OrderKds | null;
|
|
172
172
|
stationCounts: KdsStationCounts;
|
|
173
173
|
itemTypes: import("immer/dist/internal").WritableDraft<import("../types").ItemType>[] | null;
|
|
174
|
-
prepStations: import("immer/dist/internal").WritableDraft<
|
|
174
|
+
prepStations: import("immer/dist/internal").WritableDraft<PrepStation>[];
|
|
175
175
|
prepStationId: number | null;
|
|
176
176
|
orderType: KdsOrderType;
|
|
177
177
|
columns: number;
|
|
@@ -193,7 +193,7 @@ export declare const selectKds: (state: AppState) => KdsState;
|
|
|
193
193
|
export declare const selectKdsItemTypes: (state: AppState) => ItemTypes | null;
|
|
194
194
|
export declare const selectKdsPrepStations: (state: AppState) => PrepStations;
|
|
195
195
|
export declare const selectKdsPrepStationId: (state: AppState) => number | null;
|
|
196
|
-
export declare const selectKdsPrepStation: (state: AppState) =>
|
|
196
|
+
export declare const selectKdsPrepStation: (state: AppState) => PrepStation | null;
|
|
197
197
|
export declare const selectKdsOrderType: (state: AppState) => KdsOrderType;
|
|
198
198
|
export declare const selectKdsColumns: (state: AppState) => number;
|
|
199
199
|
export declare const selectKdsBoxes: (state: AppState) => number;
|
package/dist/cjs/slices/kds.js
CHANGED
|
@@ -370,8 +370,9 @@ var selectKdsPrepStationId = function (state) {
|
|
|
370
370
|
};
|
|
371
371
|
exports.selectKdsPrepStationId = selectKdsPrepStationId;
|
|
372
372
|
var selectKdsPrepStation = function (state) {
|
|
373
|
-
var _a
|
|
374
|
-
|
|
373
|
+
var _a;
|
|
374
|
+
var _b = state.kds, prepStations = _b.prepStations, prepStationId = _b.prepStationId;
|
|
375
|
+
return (_a = prepStations.find(function (i) { return i.prep_station_id === prepStationId; })) !== null && _a !== void 0 ? _a : null;
|
|
375
376
|
};
|
|
376
377
|
exports.selectKdsPrepStation = selectKdsPrepStation;
|
|
377
378
|
var selectKdsOrderType = function (state) { return state.kds.orderType; };
|
package/dist/cjs/utils/orders.js
CHANGED
|
@@ -134,7 +134,10 @@ 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) { return i.prep_status === 'DONE'; });
|
|
137
|
-
|
|
137
|
+
var filtered = (0, exports.filterOrdersByItemType)(filteredOrders, item_type_ids);
|
|
138
|
+
return prep_type === 'EXPO'
|
|
139
|
+
? filtered
|
|
140
|
+
: filtered.filter(function (i) { return i.tickets.filter(function (t) { return (0, exports.notDone)(t.ticket_status); }).length; });
|
|
138
141
|
};
|
|
139
142
|
exports.makeOrdersForPrepStation = makeOrdersForPrepStation;
|
|
140
143
|
var updateCounts = function (counts, ticketCounts) {
|
package/dist/esm/slices/kds.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import { DateString, FetchOrdersArgs, ItemTypes, KdsFontSize, KdsOrderType, KdsStationCounts, KdsView, OrderCounts, OrderKds, OrdersAndStationCounts, OrdersKds, OrderUpdate, PrepStations, RequestError, RequestErrorAPI, RequestStatus, TicketStatus, TicketStatusUpdate } from '../types';
|
|
2
|
+
import { DateString, FetchOrdersArgs, ItemTypes, KdsFontSize, KdsOrderType, KdsStationCounts, KdsView, OrderCounts, OrderKds, OrdersAndStationCounts, OrdersKds, OrderUpdate, PrepStation, PrepStations, RequestError, RequestErrorAPI, RequestStatus, TicketStatus, TicketStatusUpdate } from '../types';
|
|
3
3
|
import { ReducerType } from './types';
|
|
4
4
|
export interface KdsState {
|
|
5
5
|
itemTypes: ItemTypes | null;
|
|
@@ -171,7 +171,7 @@ export declare const kdsSlice: import("@reduxjs/toolkit").Slice<KdsState, {
|
|
|
171
171
|
order: OrderKds | null;
|
|
172
172
|
stationCounts: KdsStationCounts;
|
|
173
173
|
itemTypes: import("immer/dist/internal").WritableDraft<import("../types").ItemType>[] | null;
|
|
174
|
-
prepStations: import("immer/dist/internal").WritableDraft<
|
|
174
|
+
prepStations: import("immer/dist/internal").WritableDraft<PrepStation>[];
|
|
175
175
|
prepStationId: number | null;
|
|
176
176
|
orderType: KdsOrderType;
|
|
177
177
|
columns: number;
|
|
@@ -193,7 +193,7 @@ export declare const selectKds: (state: AppState) => KdsState;
|
|
|
193
193
|
export declare const selectKdsItemTypes: (state: AppState) => ItemTypes | null;
|
|
194
194
|
export declare const selectKdsPrepStations: (state: AppState) => PrepStations;
|
|
195
195
|
export declare const selectKdsPrepStationId: (state: AppState) => number | null;
|
|
196
|
-
export declare const selectKdsPrepStation: (state: AppState) =>
|
|
196
|
+
export declare const selectKdsPrepStation: (state: AppState) => PrepStation | null;
|
|
197
197
|
export declare const selectKdsOrderType: (state: AppState) => KdsOrderType;
|
|
198
198
|
export declare const selectKdsColumns: (state: AppState) => number;
|
|
199
199
|
export declare const selectKdsBoxes: (state: AppState) => number;
|
package/dist/esm/slices/kds.js
CHANGED
|
@@ -363,8 +363,9 @@ export var selectKdsPrepStationId = function (state) {
|
|
|
363
363
|
return state.kds.prepStationId;
|
|
364
364
|
};
|
|
365
365
|
export var selectKdsPrepStation = function (state) {
|
|
366
|
-
var _a
|
|
367
|
-
|
|
366
|
+
var _a;
|
|
367
|
+
var _b = state.kds, prepStations = _b.prepStations, prepStationId = _b.prepStationId;
|
|
368
|
+
return (_a = prepStations.find(function (i) { return i.prep_station_id === prepStationId; })) !== null && _a !== void 0 ? _a : null;
|
|
368
369
|
};
|
|
369
370
|
export var selectKdsOrderType = function (state) { return state.kds.orderType; };
|
|
370
371
|
export var selectKdsColumns = function (state) { return state.kds.columns; };
|
package/dist/esm/utils/orders.js
CHANGED
|
@@ -120,7 +120,10 @@ 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) { return i.prep_status === 'DONE'; });
|
|
123
|
-
|
|
123
|
+
var filtered = filterOrdersByItemType(filteredOrders, item_type_ids);
|
|
124
|
+
return prep_type === 'EXPO'
|
|
125
|
+
? filtered
|
|
126
|
+
: filtered.filter(function (i) { return i.tickets.filter(function (t) { return notDone(t.ticket_status); }).length; });
|
|
124
127
|
};
|
|
125
128
|
var updateCounts = function (counts, ticketCounts) {
|
|
126
129
|
// console.log('BEFORE', counts, ticketCounts)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
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",
|