@open-tender/cloud 0.1.0 → 0.1.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.
- package/dist/cjs/app/hooks.d.ts +1 -2
- package/dist/cjs/app/store.d.ts +3 -6
- package/dist/cjs/app/store.js +0 -1
- package/dist/cjs/slices/announcements.d.ts +5 -5
- package/dist/cjs/slices/checkout.d.ts +7 -7
- package/dist/cjs/slices/checkout.js +59 -52
- package/dist/cjs/slices/customer/groupOrders.d.ts +2 -2
- package/dist/cjs/slices/donations.d.ts +2 -2
- package/dist/cjs/slices/groupOrder.d.ts +1 -1
- package/dist/cjs/slices/groupOrder.js +1 -2
- package/dist/cjs/slices/index.d.ts +24 -25
- package/dist/cjs/slices/index.js +24 -25
- package/dist/cjs/slices/{modalSlice.d.ts → modal.d.ts} +3 -7
- package/dist/cjs/slices/{modalSlice.js → modal.js} +1 -1
- package/dist/cjs/slices/order.d.ts +23 -27
- package/dist/cjs/slices/order.js +16 -16
- package/dist/cjs/slices/revenueCenters.d.ts +4 -16
- package/dist/esm/app/hooks.d.ts +1 -2
- package/dist/esm/app/store.d.ts +3 -6
- package/dist/esm/app/store.js +1 -2
- package/dist/esm/slices/announcements.d.ts +5 -5
- package/dist/esm/slices/checkout.d.ts +7 -7
- package/dist/esm/slices/checkout.js +59 -52
- package/dist/esm/slices/customer/groupOrders.d.ts +2 -2
- package/dist/esm/slices/donations.d.ts +2 -2
- package/dist/esm/slices/groupOrder.d.ts +1 -1
- package/dist/esm/slices/groupOrder.js +1 -2
- package/dist/esm/slices/index.d.ts +24 -25
- package/dist/esm/slices/index.js +24 -25
- package/dist/esm/slices/{modalSlice.d.ts → modal.d.ts} +3 -7
- package/dist/esm/slices/{modalSlice.js → modal.js} +1 -1
- package/dist/esm/slices/order.d.ts +23 -27
- package/dist/esm/slices/order.js +16 -16
- package/dist/esm/slices/revenueCenters.d.ts +4 -16
- package/package.json +3 -3
- package/dist/cjs/slices/orders.d.ts +0 -128
- package/dist/cjs/slices/orders.js +0 -311
- package/dist/esm/slices/orders.d.ts +0 -128
- package/dist/esm/slices/orders.js +0 -302
- /package/dist/cjs/slices/{navSlice.d.ts → nav.d.ts} +0 -0
- /package/dist/cjs/slices/{navSlice.js → nav.js} +0 -0
- /package/dist/cjs/slices/{navSiteSlice.d.ts → navSite.d.ts} +0 -0
- /package/dist/cjs/slices/{navSiteSlice.js → navSite.js} +0 -0
- /package/dist/cjs/slices/{postsSlice.d.ts → posts.d.ts} +0 -0
- /package/dist/cjs/slices/{postsSlice.js → posts.js} +0 -0
- /package/dist/cjs/slices/{sidebarSlice.d.ts → sidebar.d.ts} +0 -0
- /package/dist/cjs/slices/{sidebarSlice.js → sidebar.js} +0 -0
- /package/dist/cjs/slices/{sidebarModalSlice.d.ts → sidebarModal.d.ts} +0 -0
- /package/dist/cjs/slices/{sidebarModalSlice.js → sidebarModal.js} +0 -0
- /package/dist/esm/slices/{navSlice.d.ts → nav.d.ts} +0 -0
- /package/dist/esm/slices/{navSlice.js → nav.js} +0 -0
- /package/dist/esm/slices/{navSiteSlice.d.ts → navSite.d.ts} +0 -0
- /package/dist/esm/slices/{navSiteSlice.js → navSite.js} +0 -0
- /package/dist/esm/slices/{postsSlice.d.ts → posts.d.ts} +0 -0
- /package/dist/esm/slices/{postsSlice.js → posts.js} +0 -0
- /package/dist/esm/slices/{sidebarSlice.d.ts → sidebar.d.ts} +0 -0
- /package/dist/esm/slices/{sidebarSlice.js → sidebar.js} +0 -0
- /package/dist/esm/slices/{sidebarModalSlice.d.ts → sidebarModal.d.ts} +0 -0
- /package/dist/esm/slices/{sidebarModalSlice.js → sidebarModal.js} +0 -0
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
export * from './alerts';
|
|
2
|
-
export * from './notifications';
|
|
3
2
|
export * from './allergens';
|
|
4
3
|
export * from './announcements';
|
|
5
|
-
export * from './customer';
|
|
6
|
-
export * from './signUp';
|
|
7
|
-
export * from './revenueCenters';
|
|
8
4
|
export * from './checkout';
|
|
9
5
|
export * from './completedOrders';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './orderFulfillment';
|
|
12
|
-
export * from './orderRating';
|
|
13
|
-
export * from './orders';
|
|
14
|
-
export * from './deals';
|
|
6
|
+
export * from './config';
|
|
15
7
|
export * from './confirmation';
|
|
8
|
+
export * from './customer';
|
|
9
|
+
export * from './deals';
|
|
16
10
|
export * from './donations';
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './verifyAccount';
|
|
19
|
-
export * from './menu';
|
|
20
|
-
export * from './resetPassword';
|
|
21
|
-
export * from './validTimes';
|
|
22
|
-
export * from './menuItems';
|
|
23
|
-
export * from './menuDisplay';
|
|
11
|
+
export * from './geolocation';
|
|
24
12
|
export * from './giftCards';
|
|
25
13
|
export * from './groupOrder';
|
|
14
|
+
export * from './guest';
|
|
26
15
|
export * from './levelup';
|
|
27
|
-
export * from './config';
|
|
28
|
-
export * from './geolocation';
|
|
29
16
|
export * from './loader';
|
|
30
|
-
export * from './
|
|
17
|
+
export * from './menu';
|
|
18
|
+
export * from './menuDisplay';
|
|
19
|
+
export * from './menuItems';
|
|
31
20
|
export * from './misc';
|
|
32
|
-
export * from './
|
|
33
|
-
export * from './
|
|
34
|
-
export * from './
|
|
35
|
-
export * from './
|
|
36
|
-
export * from './
|
|
37
|
-
export * from './
|
|
21
|
+
export * from './modal';
|
|
22
|
+
export * from './nav';
|
|
23
|
+
export * from './navSite';
|
|
24
|
+
export * from './notifications';
|
|
25
|
+
export * from './order';
|
|
26
|
+
export * from './orderFulfillment';
|
|
27
|
+
export * from './orderRating';
|
|
28
|
+
export * from './posts';
|
|
29
|
+
export * from './qr';
|
|
30
|
+
export * from './resetPassword';
|
|
31
|
+
export * from './revenueCenters';
|
|
32
|
+
export * from './sidebar';
|
|
33
|
+
export * from './sidebarModal';
|
|
34
|
+
export * from './signUp';
|
|
35
|
+
export * from './validTimes';
|
|
36
|
+
export * from './verifyAccount';
|
package/dist/esm/slices/index.js
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
export * from './alerts';
|
|
2
|
-
export * from './notifications';
|
|
3
2
|
export * from './allergens';
|
|
4
3
|
export * from './announcements';
|
|
5
|
-
export * from './customer';
|
|
6
|
-
export * from './signUp';
|
|
7
|
-
export * from './revenueCenters';
|
|
8
4
|
export * from './checkout';
|
|
9
5
|
export * from './completedOrders';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './orderFulfillment';
|
|
12
|
-
export * from './orderRating';
|
|
13
|
-
export * from './orders';
|
|
14
|
-
export * from './deals';
|
|
6
|
+
export * from './config';
|
|
15
7
|
export * from './confirmation';
|
|
8
|
+
export * from './customer';
|
|
9
|
+
export * from './deals';
|
|
16
10
|
export * from './donations';
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './verifyAccount';
|
|
19
|
-
export * from './menu';
|
|
20
|
-
export * from './resetPassword';
|
|
21
|
-
export * from './validTimes';
|
|
22
|
-
export * from './menuItems';
|
|
23
|
-
export * from './menuDisplay';
|
|
11
|
+
export * from './geolocation';
|
|
24
12
|
export * from './giftCards';
|
|
25
13
|
export * from './groupOrder';
|
|
14
|
+
export * from './guest';
|
|
26
15
|
export * from './levelup';
|
|
27
|
-
export * from './config';
|
|
28
|
-
export * from './geolocation';
|
|
29
16
|
export * from './loader';
|
|
30
|
-
export * from './
|
|
17
|
+
export * from './menu';
|
|
18
|
+
export * from './menuDisplay';
|
|
19
|
+
export * from './menuItems';
|
|
31
20
|
export * from './misc';
|
|
32
|
-
export * from './
|
|
33
|
-
export * from './
|
|
34
|
-
export * from './
|
|
35
|
-
export * from './
|
|
36
|
-
export * from './
|
|
37
|
-
export * from './
|
|
21
|
+
export * from './modal';
|
|
22
|
+
export * from './nav';
|
|
23
|
+
export * from './navSite';
|
|
24
|
+
export * from './notifications';
|
|
25
|
+
export * from './order';
|
|
26
|
+
export * from './orderFulfillment';
|
|
27
|
+
export * from './orderRating';
|
|
28
|
+
export * from './posts';
|
|
29
|
+
export * from './qr';
|
|
30
|
+
export * from './resetPassword';
|
|
31
|
+
export * from './revenueCenters';
|
|
32
|
+
export * from './sidebar';
|
|
33
|
+
export * from './sidebarModal';
|
|
34
|
+
export * from './signUp';
|
|
35
|
+
export * from './validTimes';
|
|
36
|
+
export * from './verifyAccount';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import { Modal } from '@open-tender/types';
|
|
1
2
|
import { AppState } from '../app';
|
|
2
|
-
export interface ModalState {
|
|
3
|
-
loading: string | null;
|
|
4
|
-
type: string | null;
|
|
5
|
-
args: any;
|
|
6
|
-
}
|
|
7
3
|
export declare const openModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "modal/openModal">, closeModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"modal/closeModal">;
|
|
8
|
-
export declare const selectModal: (state: AppState) =>
|
|
9
|
-
export declare const modalReducer: import("redux").Reducer<
|
|
4
|
+
export declare const selectModal: (state: AppState) => Modal;
|
|
5
|
+
export declare const modalReducer: import("redux").Reducer<Modal, import("redux").AnyAction>;
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import { Address, MenuCategory,
|
|
2
|
+
import { Address, Cart, CartCounts, CartItem, DeviceType, MenuCategory, MenuRevenueCenter, Messages, Modal, Order, OrderType, PrepType, RequestedAt, RequestError, RequestStatus, RevenueCenter, ServiceType, SimpleCart } from '@open-tender/types';
|
|
3
3
|
export interface OrderState {
|
|
4
|
-
error: RequestError | string;
|
|
5
|
-
loading: RequestStatus;
|
|
6
4
|
address: Address | null;
|
|
7
|
-
alert:
|
|
5
|
+
alert: Modal | null;
|
|
8
6
|
cart: Cart | null;
|
|
9
|
-
cartCounts:
|
|
10
|
-
[key: number]: number;
|
|
11
|
-
} | null;
|
|
7
|
+
cartCounts: CartCounts | null;
|
|
12
8
|
currentCategory: MenuCategory | null;
|
|
13
|
-
currentItem:
|
|
14
|
-
currentVendor:
|
|
15
|
-
deviceType:
|
|
9
|
+
currentItem: CartItem | null;
|
|
10
|
+
currentVendor: MenuRevenueCenter | null;
|
|
11
|
+
deviceType: DeviceType | null;
|
|
12
|
+
error: RequestError | string;
|
|
16
13
|
isCurbside: boolean;
|
|
17
14
|
isOutpost: boolean;
|
|
18
|
-
|
|
15
|
+
loading: RequestStatus;
|
|
16
|
+
messages: Messages;
|
|
19
17
|
orderId: number | null;
|
|
20
18
|
orderType: OrderType | null;
|
|
21
|
-
prepType:
|
|
22
|
-
requestedAt:
|
|
23
|
-
revenueCenter:
|
|
19
|
+
prepType: PrepType | null;
|
|
20
|
+
requestedAt: RequestedAt | null;
|
|
21
|
+
revenueCenter: RevenueCenter | null;
|
|
24
22
|
serviceType: ServiceType | null;
|
|
25
|
-
table:
|
|
23
|
+
table: string | null;
|
|
26
24
|
}
|
|
27
25
|
export declare enum OrderActionType {
|
|
28
26
|
FetchRevenueCenter = "order/fetchRevenueCenter",
|
|
@@ -55,7 +53,7 @@ export declare const fetchLocation: import("@reduxjs/toolkit").AsyncThunk<void,
|
|
|
55
53
|
fulfilledMeta?: unknown;
|
|
56
54
|
rejectedMeta?: unknown;
|
|
57
55
|
}>;
|
|
58
|
-
export declare const revertMenu: import("@reduxjs/toolkit").AsyncThunk<void |
|
|
56
|
+
export declare const revertMenu: import("@reduxjs/toolkit").AsyncThunk<void | RevenueCenter, {
|
|
59
57
|
revenueCenterId: number;
|
|
60
58
|
serviceType: ServiceType;
|
|
61
59
|
requestedAt: string;
|
|
@@ -84,7 +82,7 @@ export declare const refreshRevenueCenter: import("@reduxjs/toolkit").AsyncThunk
|
|
|
84
82
|
fulfilledMeta?: unknown;
|
|
85
83
|
rejectedMeta?: unknown;
|
|
86
84
|
}>;
|
|
87
|
-
export declare const editOrder: import("@reduxjs/toolkit").AsyncThunk<void | Partial<OrderState>,
|
|
85
|
+
export declare const editOrder: import("@reduxjs/toolkit").AsyncThunk<void | Partial<OrderState>, Order, {
|
|
88
86
|
state: AppState;
|
|
89
87
|
rejectValue: RequestError;
|
|
90
88
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -113,26 +111,24 @@ export declare const resetOrder: import("@reduxjs/toolkit").ActionCreatorWithout
|
|
|
113
111
|
serviceType: ServiceType;
|
|
114
112
|
isOutpost?: boolean | undefined;
|
|
115
113
|
}, "order/setOrderServiceType">, setOrderType: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setOrderType">, setPrepType: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setPrepType">, setRequestedAt: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setRequestedAt">, setRevenueCenter: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setRevenueCenter">, setServiceType: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setServiceType">, setTable: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setTable">, checkout: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"order/checkout">, setCurrentVendor: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "order/setCurrentVendor">;
|
|
116
|
-
export declare const selectAlert: (state: AppState) =>
|
|
114
|
+
export declare const selectAlert: (state: AppState) => Modal | null;
|
|
117
115
|
export declare const selectTimezone: (state: AppState) => string;
|
|
118
116
|
export declare const selectOrder: (state: AppState) => OrderState;
|
|
119
117
|
export declare const selectCartQuantity: (state: AppState) => number;
|
|
120
118
|
export declare const selectCartTotal: (state: AppState) => number;
|
|
121
|
-
export declare const selectCartCounts: (state: AppState) =>
|
|
122
|
-
|
|
123
|
-
};
|
|
124
|
-
export declare const selectCanOrder: (state: AppState) => string | null;
|
|
119
|
+
export declare const selectCartCounts: (state: AppState) => CartCounts;
|
|
120
|
+
export declare const selectCanOrder: (state: AppState) => RequestedAt | null;
|
|
125
121
|
export declare const selectOrderLimits: (state: AppState) => {
|
|
126
122
|
orderMinimum: number | null;
|
|
127
123
|
orderMaximum: number | null;
|
|
128
124
|
};
|
|
129
125
|
export declare const selectCartIds: (state: AppState) => number[];
|
|
130
126
|
export declare const selectMenuSlug: (state: AppState) => string;
|
|
131
|
-
export declare const selectRevenueCenter: (state: AppState) =>
|
|
127
|
+
export declare const selectRevenueCenter: (state: AppState) => RevenueCenter | null;
|
|
132
128
|
export declare const selectCart: (state: AppState) => Cart | null;
|
|
133
|
-
export declare const selectCurrentVendor: (state: AppState) =>
|
|
134
|
-
export declare const selectMessages: (state: AppState) =>
|
|
135
|
-
export declare const selectCurrentItem: (state: AppState) =>
|
|
129
|
+
export declare const selectCurrentVendor: (state: AppState) => MenuRevenueCenter | null;
|
|
130
|
+
export declare const selectMessages: (state: AppState) => Messages;
|
|
131
|
+
export declare const selectCurrentItem: (state: AppState) => CartItem | null;
|
|
136
132
|
export declare const selectMenuVars: (state: AppState) => {
|
|
137
133
|
revenueCenterId?: undefined;
|
|
138
134
|
serviceType?: undefined;
|
|
@@ -140,7 +136,7 @@ export declare const selectMenuVars: (state: AppState) => {
|
|
|
140
136
|
} | {
|
|
141
137
|
revenueCenterId: number;
|
|
142
138
|
serviceType: ServiceType | null;
|
|
143
|
-
requestedAt:
|
|
139
|
+
requestedAt: RequestedAt | null;
|
|
144
140
|
};
|
|
145
141
|
export declare const selectAutoSelect: (state: AppState) => boolean | undefined;
|
|
146
142
|
export declare const selectCurrentCategory: (state: AppState) => MenuCategory | null;
|
package/dist/esm/slices/order.js
CHANGED
|
@@ -6,26 +6,26 @@ import { updateForm } from './checkout';
|
|
|
6
6
|
import { resetMenuVars } from './menu';
|
|
7
7
|
import { setMenuItems } from './menuItems';
|
|
8
8
|
const initialState = {
|
|
9
|
-
orderId: null,
|
|
10
|
-
orderType: null,
|
|
11
|
-
serviceType: null,
|
|
12
|
-
deviceType: null,
|
|
13
|
-
isOutpost: false,
|
|
14
|
-
isCurbside: false,
|
|
15
|
-
revenueCenter: null,
|
|
16
|
-
table: null,
|
|
17
|
-
prepType: null,
|
|
18
|
-
requestedAt: 'asap',
|
|
19
9
|
address: null,
|
|
20
|
-
|
|
21
|
-
currentItem: null,
|
|
10
|
+
alert: null,
|
|
22
11
|
cart: [],
|
|
23
12
|
cartCounts: {},
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
currentCategory: null,
|
|
14
|
+
currentItem: null,
|
|
15
|
+
currentVendor: null,
|
|
16
|
+
deviceType: null,
|
|
26
17
|
error: null,
|
|
18
|
+
isCurbside: false,
|
|
19
|
+
isOutpost: false,
|
|
27
20
|
loading: 'idle',
|
|
28
|
-
|
|
21
|
+
messages: [],
|
|
22
|
+
orderId: null,
|
|
23
|
+
prepType: null,
|
|
24
|
+
orderType: null,
|
|
25
|
+
requestedAt: 'asap',
|
|
26
|
+
revenueCenter: null,
|
|
27
|
+
serviceType: null,
|
|
28
|
+
table: null
|
|
29
29
|
};
|
|
30
30
|
export var OrderActionType;
|
|
31
31
|
(function (OrderActionType) {
|
|
@@ -449,7 +449,7 @@ export const selectOrderLimits = (state) => {
|
|
|
449
449
|
return { orderMinimum: null, orderMaximum: null };
|
|
450
450
|
}
|
|
451
451
|
const { cartGuest, spendingLimit } = state.groupOrder;
|
|
452
|
-
const { order_maximum, order_minimum } = revenueCenter
|
|
452
|
+
const { order_maximum, order_minimum } = revenueCenter;
|
|
453
453
|
const orderMax = cartGuest && spendingLimit
|
|
454
454
|
? parseFloat(spendingLimit)
|
|
455
455
|
: order_maximum
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppState } from '../app';
|
|
2
|
-
import {
|
|
2
|
+
import { RevenueCenters, RevenueCenterParams, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
3
|
export interface RevenueCentersState {
|
|
4
|
-
revenueCenters:
|
|
4
|
+
revenueCenters: RevenueCenters;
|
|
5
5
|
error: RequestError;
|
|
6
6
|
loading: RequestStatus;
|
|
7
7
|
}
|
|
@@ -9,13 +9,7 @@ export declare enum RevenueCentersActionType {
|
|
|
9
9
|
FetchRevenueCenters = "revenueCenters/fetchRevenueCenters",
|
|
10
10
|
FetchLocations = "revenueCenters/fetchLocations"
|
|
11
11
|
}
|
|
12
|
-
export declare const fetchRevenueCenters: import("@reduxjs/toolkit").AsyncThunk<
|
|
13
|
-
type: string;
|
|
14
|
-
is_outpost: boolean;
|
|
15
|
-
lat: number;
|
|
16
|
-
lng: number;
|
|
17
|
-
requestedAt: string;
|
|
18
|
-
}, {
|
|
12
|
+
export declare const fetchRevenueCenters: import("@reduxjs/toolkit").AsyncThunk<RevenueCenters, RevenueCenterParams, {
|
|
19
13
|
state: AppState;
|
|
20
14
|
rejectValue: RequestError;
|
|
21
15
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -25,13 +19,7 @@ export declare const fetchRevenueCenters: import("@reduxjs/toolkit").AsyncThunk<
|
|
|
25
19
|
fulfilledMeta?: unknown;
|
|
26
20
|
rejectedMeta?: unknown;
|
|
27
21
|
}>;
|
|
28
|
-
export declare const fetchLocations: import("@reduxjs/toolkit").AsyncThunk<
|
|
29
|
-
type: string;
|
|
30
|
-
is_outpost: boolean;
|
|
31
|
-
lat: number;
|
|
32
|
-
lng: number;
|
|
33
|
-
requestedAt: string;
|
|
34
|
-
}, {
|
|
22
|
+
export declare const fetchLocations: import("@reduxjs/toolkit").AsyncThunk<RevenueCenters, RevenueCenterParams, {
|
|
35
23
|
state: AppState;
|
|
36
24
|
rejectValue: RequestError;
|
|
37
25
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"typescript": "^4.8.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@open-tender/types": "^0.
|
|
53
|
-
"@open-tender/utils": "^0.
|
|
52
|
+
"@open-tender/types": "^0.1.8",
|
|
53
|
+
"@open-tender/utils": "^0.1.11",
|
|
54
54
|
"@reduxjs/toolkit": "^1.8.5",
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
},
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { AppState } from '../app';
|
|
2
|
-
import { Order, Orders, OrdersCount, RequestError, RequestStatus } from '@open-tender/types';
|
|
3
|
-
export interface OrdersState {
|
|
4
|
-
entities: Orders;
|
|
5
|
-
error: RequestError;
|
|
6
|
-
loading: RequestStatus;
|
|
7
|
-
skipped: number;
|
|
8
|
-
currentOrder: Order | null;
|
|
9
|
-
counts: OrdersCount;
|
|
10
|
-
}
|
|
11
|
-
export declare enum OrdersActionType {
|
|
12
|
-
FetchOrders = "orders/fetchOrders",
|
|
13
|
-
FetchOrdersToday = "orders/fetchOrdersToday",
|
|
14
|
-
PrintTicket = "order/printTicket",
|
|
15
|
-
UpdateOrders = "orders/updateOrders",
|
|
16
|
-
UpdateTicket = "orders/updateTicket",
|
|
17
|
-
PrintTickets = "orders/printTickets",
|
|
18
|
-
ResetTickets = "orders/resetTickets",
|
|
19
|
-
UpdateOrderPrep = "orders/updateOrderPrep",
|
|
20
|
-
PrintReceipt = "orders/printReceipt"
|
|
21
|
-
}
|
|
22
|
-
export declare const fetchOrders: import("@reduxjs/toolkit").AsyncThunk<any, any, {
|
|
23
|
-
state: AppState;
|
|
24
|
-
rejectValue: RequestError;
|
|
25
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
26
|
-
extra?: unknown;
|
|
27
|
-
serializedErrorType?: unknown;
|
|
28
|
-
pendingMeta?: unknown;
|
|
29
|
-
fulfilledMeta?: unknown;
|
|
30
|
-
rejectedMeta?: unknown;
|
|
31
|
-
}>;
|
|
32
|
-
export declare const printTicket: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
33
|
-
order_uuid: number;
|
|
34
|
-
ticket_no: number;
|
|
35
|
-
status: any;
|
|
36
|
-
}, {
|
|
37
|
-
state: AppState;
|
|
38
|
-
rejectValue: RequestError;
|
|
39
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
40
|
-
extra?: unknown;
|
|
41
|
-
serializedErrorType?: unknown;
|
|
42
|
-
pendingMeta?: unknown;
|
|
43
|
-
fulfilledMeta?: unknown;
|
|
44
|
-
rejectedMeta?: unknown;
|
|
45
|
-
}>;
|
|
46
|
-
export declare const updateTicket: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
47
|
-
order_uuid: number;
|
|
48
|
-
ticket_no: number;
|
|
49
|
-
status: any;
|
|
50
|
-
}, {
|
|
51
|
-
state: AppState;
|
|
52
|
-
rejectValue: RequestError;
|
|
53
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
54
|
-
extra?: unknown;
|
|
55
|
-
serializedErrorType?: unknown;
|
|
56
|
-
pendingMeta?: unknown;
|
|
57
|
-
fulfilledMeta?: unknown;
|
|
58
|
-
rejectedMeta?: unknown;
|
|
59
|
-
}>;
|
|
60
|
-
export declare const printTickets: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
61
|
-
order_uuid: number;
|
|
62
|
-
status: any;
|
|
63
|
-
}, {
|
|
64
|
-
state: AppState;
|
|
65
|
-
rejectValue: RequestError;
|
|
66
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
67
|
-
extra?: unknown;
|
|
68
|
-
serializedErrorType?: unknown;
|
|
69
|
-
pendingMeta?: unknown;
|
|
70
|
-
fulfilledMeta?: unknown;
|
|
71
|
-
rejectedMeta?: unknown;
|
|
72
|
-
}>;
|
|
73
|
-
export declare const resetTickets: import("@reduxjs/toolkit").AsyncThunk<void, number, {
|
|
74
|
-
state: AppState;
|
|
75
|
-
rejectValue: RequestError;
|
|
76
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
77
|
-
extra?: unknown;
|
|
78
|
-
serializedErrorType?: unknown;
|
|
79
|
-
pendingMeta?: unknown;
|
|
80
|
-
fulfilledMeta?: unknown;
|
|
81
|
-
rejectedMeta?: unknown;
|
|
82
|
-
}>;
|
|
83
|
-
export declare const updateOrderPrep: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
84
|
-
order_uuid: number;
|
|
85
|
-
data: any;
|
|
86
|
-
}, {
|
|
87
|
-
state: AppState;
|
|
88
|
-
rejectValue: RequestError;
|
|
89
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
90
|
-
extra?: unknown;
|
|
91
|
-
serializedErrorType?: unknown;
|
|
92
|
-
pendingMeta?: unknown;
|
|
93
|
-
fulfilledMeta?: unknown;
|
|
94
|
-
rejectedMeta?: unknown;
|
|
95
|
-
}>;
|
|
96
|
-
export declare const printReceipt: import("@reduxjs/toolkit").AsyncThunk<void, number, {
|
|
97
|
-
state: AppState;
|
|
98
|
-
rejectValue: RequestError;
|
|
99
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
100
|
-
extra?: unknown;
|
|
101
|
-
serializedErrorType?: unknown;
|
|
102
|
-
pendingMeta?: unknown;
|
|
103
|
-
fulfilledMeta?: unknown;
|
|
104
|
-
rejectedMeta?: unknown;
|
|
105
|
-
}>;
|
|
106
|
-
export declare const resetOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orders/resetOrders">, setCurrentOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "orders/setCurrentOrder">, skipFetchOrders: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"orders/skipFetchOrders">, updateOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "orders/updateOrder">;
|
|
107
|
-
export declare const selectOrders: (state: AppState) => {
|
|
108
|
-
orders: Orders;
|
|
109
|
-
loading: RequestStatus;
|
|
110
|
-
error: RequestError;
|
|
111
|
-
};
|
|
112
|
-
export declare const selectCurrentOrder: (state: AppState) => Order | null;
|
|
113
|
-
export declare const selectCurrentOrders: (state: AppState) => {
|
|
114
|
-
orders: Order[];
|
|
115
|
-
loading: RequestStatus;
|
|
116
|
-
error: RequestError;
|
|
117
|
-
};
|
|
118
|
-
export declare const selectFutureOrders: (state: AppState) => {
|
|
119
|
-
orders: Order[];
|
|
120
|
-
loading: RequestStatus;
|
|
121
|
-
error: RequestError;
|
|
122
|
-
};
|
|
123
|
-
export declare const selectOrdersCounts: (state: AppState) => {
|
|
124
|
-
current: any;
|
|
125
|
-
future: any;
|
|
126
|
-
qa: any;
|
|
127
|
-
};
|
|
128
|
-
export declare const ordersReducer: import("redux").Reducer<OrdersState, import("redux").AnyAction>;
|