@open-tender/store 0.3.47 → 0.3.49
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/services/api.d.ts +2 -1
- package/dist/cjs/services/api.js +3 -0
- package/dist/cjs/slices/config.d.ts +3 -1
- package/dist/cjs/slices/config.js +20 -12
- package/dist/cjs/types/api/menuPages.d.ts +5 -0
- package/dist/esm/services/api.d.ts +2 -1
- package/dist/esm/services/api.js +3 -0
- package/dist/esm/slices/config.d.ts +3 -1
- package/dist/esm/slices/config.js +18 -11
- package/dist/esm/types/api/menuPages.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Arrivals, CashEvent, CashSummary, Config, CustomerCheckout, CustomerIdentifier, DeviceRead, Discount, Discounts, Employee, Employees, EntityType, ErrorAlert, ErrorAlerts, FetchOrdersAPIArgs, GiftCardBalance, GiftCardCredit, InternalSettings, ItemTypes, LevelUp, Menu, MenuPages, OfflineAuths, OfflineAuthsResult, Order, OrderCreate, Orders, OrderTender, OrderType, OrderUpdate, Punch, Refund, RequestedAt, RevenueCenter, SelectOptions, ServiceType, Settings, Store, Surcharges, Taxes, Tender, TicketStatusUpdate, TicketsUpdate, TicketUpdate } from '../types';
|
|
1
|
+
import { Arrivals, CashEvent, CashSummary, Config, CustomerCheckout, CustomerIdentifier, DeviceRead, Discount, Discounts, Employee, Employees, EntityType, ErrorAlert, ErrorAlerts, FetchOrdersAPIArgs, GiftCardBalance, GiftCardCredit, InternalSettings, ItemTypes, LevelUp, Menu, MenuColors, MenuPages, OfflineAuths, OfflineAuthsResult, Order, OrderCreate, Orders, OrderTender, OrderType, OrderUpdate, Punch, Refund, RequestedAt, RevenueCenter, SelectOptions, ServiceType, Settings, Store, Surcharges, Taxes, Tender, TicketStatusUpdate, TicketsUpdate, TicketUpdate } from '../types';
|
|
2
2
|
interface ConfigAPI {
|
|
3
3
|
apiUrl: string;
|
|
4
4
|
}
|
|
@@ -38,6 +38,7 @@ declare class PosAPI {
|
|
|
38
38
|
getOfflineAuths(): Promise<OfflineAuths | null | undefined>;
|
|
39
39
|
postOfflineAuths(): Promise<OfflineAuthsResult | null | undefined>;
|
|
40
40
|
getMenu(revenueCenterId: number, serviceType: ServiceType, requestedAt: RequestedAt): Promise<Menu | null | undefined>;
|
|
41
|
+
getMenuColors(): Promise<MenuColors | null | undefined>;
|
|
41
42
|
getMenuPages(): Promise<MenuPages | null | undefined>;
|
|
42
43
|
getSurcharges(serviceType: ServiceType): Promise<Surcharges | null | undefined>;
|
|
43
44
|
getDiscounts(serviceType: ServiceType, orderType: OrderType): Promise<Discounts | null | undefined>;
|
package/dist/cjs/services/api.js
CHANGED
|
@@ -195,6 +195,9 @@ var PosAPI = /** @class */ (function () {
|
|
|
195
195
|
var params = "revenue_center_id=".concat(revenueCenterId, "&service_type=").concat(serviceType, "&requested_at=").concat(requestedAt);
|
|
196
196
|
return this.request("/menus?".concat(params));
|
|
197
197
|
};
|
|
198
|
+
PosAPI.prototype.getMenuColors = function () {
|
|
199
|
+
return this.request("/menu-colors");
|
|
200
|
+
};
|
|
198
201
|
PosAPI.prototype.getMenuPages = function () {
|
|
199
202
|
return this.request("/menu-pages");
|
|
200
203
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IpAddress, LevelUp, RequestError, RequestStatus, SelectOptions, Store, Timezone } from '../types';
|
|
1
|
+
import { IpAddress, LevelUp, MenuColors, RequestError, RequestStatus, SelectOptions, Store, Timezone } from '../types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
3
|
export interface ConfigApp {
|
|
4
4
|
apiUrl: string;
|
|
@@ -14,6 +14,7 @@ export interface ConfigState {
|
|
|
14
14
|
store: Store | null;
|
|
15
15
|
revenueCenterId: number | null;
|
|
16
16
|
selectOptions: SelectOptions | null;
|
|
17
|
+
menuColors: MenuColors | null;
|
|
17
18
|
levelup: LevelUp | null;
|
|
18
19
|
loading: RequestStatus;
|
|
19
20
|
error: RequestError | null;
|
|
@@ -38,6 +39,7 @@ export declare const selectCashDrawer: (state: AppState) => boolean;
|
|
|
38
39
|
export declare const selectRevenueCenterId: (state: AppState) => number | null;
|
|
39
40
|
export declare const selectStore: (state: AppState) => Store | null;
|
|
40
41
|
export declare const selectSelectOptions: (state: AppState) => SelectOptions;
|
|
42
|
+
export declare const selectMenuColors: (state: AppState) => MenuColors;
|
|
41
43
|
export declare const selectTimezone: (state: AppState) => Timezone;
|
|
42
44
|
export declare const selectLoyalty: (state: AppState) => boolean;
|
|
43
45
|
export declare const configReducer: import("redux").Reducer<ConfigState, import("redux").AnyAction>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.configReducer = exports.selectLoyalty = exports.selectTimezone = exports.selectSelectOptions = exports.selectStore = exports.selectRevenueCenterId = exports.selectCashDrawer = exports.selectPinpad = exports.selectVersion = exports.selectApi = exports.selectConfig = exports.incrementRetries = exports.resetRetries = exports.resetConfig = exports.fetchConfig = exports.ConfigActionType = void 0;
|
|
4
|
+
exports.configReducer = exports.selectLoyalty = exports.selectTimezone = exports.selectMenuColors = exports.selectSelectOptions = exports.selectStore = exports.selectRevenueCenterId = exports.selectCashDrawer = exports.selectPinpad = exports.selectVersion = exports.selectApi = exports.selectConfig = exports.incrementRetries = exports.resetRetries = exports.resetConfig = exports.fetchConfig = exports.ConfigActionType = void 0;
|
|
5
5
|
var tslib_1 = require("tslib");
|
|
6
6
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
var services_1 = require("../services");
|
|
@@ -21,6 +21,7 @@ var initialState = {
|
|
|
21
21
|
store: null,
|
|
22
22
|
revenueCenterId: null,
|
|
23
23
|
selectOptions: null,
|
|
24
|
+
menuColors: null,
|
|
24
25
|
levelup: null,
|
|
25
26
|
loading: 'idle',
|
|
26
27
|
error: null,
|
|
@@ -34,40 +35,41 @@ exports.fetchConfig = (0, toolkit_1.createAsyncThunk)(ConfigActionType.FetchConf
|
|
|
34
35
|
var apiUrl = _a.apiUrl, version = _a.version;
|
|
35
36
|
var dispatch = _b.dispatch, getState = _b.getState, rejectWithValue = _b.rejectWithValue;
|
|
36
37
|
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
37
|
-
var app, api, _c, config, store, _d, selectOptions, _e,
|
|
38
|
-
return tslib_1.__generator(this, function (
|
|
39
|
-
switch (
|
|
38
|
+
var app, api, _c, config, store, _d, selectOptions, _e, menuColors, _f, itemTypes, _g, levelup, err, cashier, employee, tz, businessDate, err_1, revenueCenterId, name_1, ipAddress, hasPinpad, hasCashDrawer, prep_stations, err_2;
|
|
39
|
+
return tslib_1.__generator(this, function (_h) {
|
|
40
|
+
switch (_h.label) {
|
|
40
41
|
case 0:
|
|
41
|
-
|
|
42
|
+
_h.trys.push([0, 6, , 7]);
|
|
42
43
|
app = { apiUrl: apiUrl };
|
|
43
44
|
api = new services_1.PosAPI(app);
|
|
44
45
|
return [4 /*yield*/, Promise.all([
|
|
45
46
|
api.getConfig(),
|
|
46
47
|
api.getStore(),
|
|
47
48
|
api.getSelectOptions(),
|
|
49
|
+
api.getMenuColors(),
|
|
48
50
|
api.getItemTypes(),
|
|
49
51
|
api.getLevelUpSettings()
|
|
50
52
|
])];
|
|
51
53
|
case 1:
|
|
52
|
-
_c =
|
|
54
|
+
_c = _h.sent(), config = _c[0], store = _c[1], _d = _c[2], selectOptions = _d === void 0 ? null : _d, _e = _c[3], menuColors = _e === void 0 ? null : _e, _f = _c[4], itemTypes = _f === void 0 ? null : _f, _g = _c[5], levelup = _g === void 0 ? null : _g;
|
|
53
55
|
if (!config || !store) {
|
|
54
56
|
err = errors_1.errorsApi.internalServerError;
|
|
55
57
|
return [2 /*return*/, rejectWithValue(err)];
|
|
56
58
|
}
|
|
57
59
|
cashier = getState().pos.cashier;
|
|
58
60
|
if (!!cashier) return [3 /*break*/, 5];
|
|
59
|
-
|
|
61
|
+
_h.label = 2;
|
|
60
62
|
case 2:
|
|
61
|
-
|
|
63
|
+
_h.trys.push([2, 4, , 5]);
|
|
62
64
|
return [4 /*yield*/, api.getCashier()];
|
|
63
65
|
case 3:
|
|
64
|
-
employee =
|
|
66
|
+
employee = _h.sent();
|
|
65
67
|
tz = utils_1.timezoneMap[store.timezone];
|
|
66
68
|
businessDate = (0, utils_1.currentLocalDateStr)(tz);
|
|
67
69
|
dispatch((0, pos_1.setCashier)(tslib_1.__assign(tslib_1.__assign({}, employee), { businessDate: businessDate })));
|
|
68
70
|
return [3 /*break*/, 5];
|
|
69
71
|
case 4:
|
|
70
|
-
err_1 =
|
|
72
|
+
err_1 = _h.sent();
|
|
71
73
|
return [3 /*break*/, 5];
|
|
72
74
|
case 5:
|
|
73
75
|
revenueCenterId = store.revenue_center_id;
|
|
@@ -85,13 +87,14 @@ exports.fetchConfig = (0, toolkit_1.createAsyncThunk)(ConfigActionType.FetchConf
|
|
|
85
87
|
hasPinpad: hasPinpad,
|
|
86
88
|
hasCashDrawer: hasCashDrawer,
|
|
87
89
|
selectOptions: selectOptions,
|
|
90
|
+
menuColors: menuColors,
|
|
88
91
|
levelup: levelup,
|
|
89
92
|
error: null,
|
|
90
93
|
loading: 'idle',
|
|
91
94
|
retries: 0
|
|
92
95
|
}];
|
|
93
96
|
case 6:
|
|
94
|
-
err_2 =
|
|
97
|
+
err_2 = _h.sent();
|
|
95
98
|
return [2 /*return*/, rejectWithValue(err_2)];
|
|
96
99
|
case 7: return [2 /*return*/];
|
|
97
100
|
}
|
|
@@ -113,7 +116,7 @@ var configSlice = (0, toolkit_1.createSlice)({
|
|
|
113
116
|
extraReducers: function (builder) {
|
|
114
117
|
builder
|
|
115
118
|
.addCase(exports.fetchConfig.fulfilled, function (state, action) {
|
|
116
|
-
var _a = action.payload, api = _a.api, app = _a.app, version = _a.version, store = _a.store, revenueCenterId = _a.revenueCenterId, name = _a.name, ipAddress = _a.ipAddress, hasPinpad = _a.hasPinpad, hasCashDrawer = _a.hasCashDrawer, selectOptions = _a.selectOptions, levelup = _a.levelup;
|
|
119
|
+
var _a = action.payload, api = _a.api, app = _a.app, version = _a.version, store = _a.store, revenueCenterId = _a.revenueCenterId, name = _a.name, ipAddress = _a.ipAddress, hasPinpad = _a.hasPinpad, hasCashDrawer = _a.hasCashDrawer, selectOptions = _a.selectOptions, menuColors = _a.menuColors, levelup = _a.levelup;
|
|
117
120
|
state.api = api;
|
|
118
121
|
state.app = app;
|
|
119
122
|
state.version = version;
|
|
@@ -124,6 +127,7 @@ var configSlice = (0, toolkit_1.createSlice)({
|
|
|
124
127
|
state.store = store;
|
|
125
128
|
state.revenueCenterId = revenueCenterId;
|
|
126
129
|
state.selectOptions = selectOptions;
|
|
130
|
+
state.menuColors = menuColors;
|
|
127
131
|
state.levelup = levelup;
|
|
128
132
|
state.loading = 'idle';
|
|
129
133
|
state.retries = 0;
|
|
@@ -159,6 +163,10 @@ var selectSelectOptions = function (state) {
|
|
|
159
163
|
return state.config.selectOptions || [];
|
|
160
164
|
};
|
|
161
165
|
exports.selectSelectOptions = selectSelectOptions;
|
|
166
|
+
var selectMenuColors = function (state) {
|
|
167
|
+
return state.config.menuColors || [];
|
|
168
|
+
};
|
|
169
|
+
exports.selectMenuColors = selectMenuColors;
|
|
162
170
|
var selectTimezone = function (state) {
|
|
163
171
|
return state.config.store
|
|
164
172
|
? utils_1.timezoneMap[state.config.store.timezone]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Arrivals, CashEvent, CashSummary, Config, CustomerCheckout, CustomerIdentifier, DeviceRead, Discount, Discounts, Employee, Employees, EntityType, ErrorAlert, ErrorAlerts, FetchOrdersAPIArgs, GiftCardBalance, GiftCardCredit, InternalSettings, ItemTypes, LevelUp, Menu, MenuPages, OfflineAuths, OfflineAuthsResult, Order, OrderCreate, Orders, OrderTender, OrderType, OrderUpdate, Punch, Refund, RequestedAt, RevenueCenter, SelectOptions, ServiceType, Settings, Store, Surcharges, Taxes, Tender, TicketStatusUpdate, TicketsUpdate, TicketUpdate } from '../types';
|
|
1
|
+
import { Arrivals, CashEvent, CashSummary, Config, CustomerCheckout, CustomerIdentifier, DeviceRead, Discount, Discounts, Employee, Employees, EntityType, ErrorAlert, ErrorAlerts, FetchOrdersAPIArgs, GiftCardBalance, GiftCardCredit, InternalSettings, ItemTypes, LevelUp, Menu, MenuColors, MenuPages, OfflineAuths, OfflineAuthsResult, Order, OrderCreate, Orders, OrderTender, OrderType, OrderUpdate, Punch, Refund, RequestedAt, RevenueCenter, SelectOptions, ServiceType, Settings, Store, Surcharges, Taxes, Tender, TicketStatusUpdate, TicketsUpdate, TicketUpdate } from '../types';
|
|
2
2
|
interface ConfigAPI {
|
|
3
3
|
apiUrl: string;
|
|
4
4
|
}
|
|
@@ -38,6 +38,7 @@ declare class PosAPI {
|
|
|
38
38
|
getOfflineAuths(): Promise<OfflineAuths | null | undefined>;
|
|
39
39
|
postOfflineAuths(): Promise<OfflineAuthsResult | null | undefined>;
|
|
40
40
|
getMenu(revenueCenterId: number, serviceType: ServiceType, requestedAt: RequestedAt): Promise<Menu | null | undefined>;
|
|
41
|
+
getMenuColors(): Promise<MenuColors | null | undefined>;
|
|
41
42
|
getMenuPages(): Promise<MenuPages | null | undefined>;
|
|
42
43
|
getSurcharges(serviceType: ServiceType): Promise<Surcharges | null | undefined>;
|
|
43
44
|
getDiscounts(serviceType: ServiceType, orderType: OrderType): Promise<Discounts | null | undefined>;
|
package/dist/esm/services/api.js
CHANGED
|
@@ -193,6 +193,9 @@ var PosAPI = /** @class */ (function () {
|
|
|
193
193
|
var params = "revenue_center_id=".concat(revenueCenterId, "&service_type=").concat(serviceType, "&requested_at=").concat(requestedAt);
|
|
194
194
|
return this.request("/menus?".concat(params));
|
|
195
195
|
};
|
|
196
|
+
PosAPI.prototype.getMenuColors = function () {
|
|
197
|
+
return this.request("/menu-colors");
|
|
198
|
+
};
|
|
196
199
|
PosAPI.prototype.getMenuPages = function () {
|
|
197
200
|
return this.request("/menu-pages");
|
|
198
201
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IpAddress, LevelUp, RequestError, RequestStatus, SelectOptions, Store, Timezone } from '../types';
|
|
1
|
+
import { IpAddress, LevelUp, MenuColors, RequestError, RequestStatus, SelectOptions, Store, Timezone } from '../types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
3
|
export interface ConfigApp {
|
|
4
4
|
apiUrl: string;
|
|
@@ -14,6 +14,7 @@ export interface ConfigState {
|
|
|
14
14
|
store: Store | null;
|
|
15
15
|
revenueCenterId: number | null;
|
|
16
16
|
selectOptions: SelectOptions | null;
|
|
17
|
+
menuColors: MenuColors | null;
|
|
17
18
|
levelup: LevelUp | null;
|
|
18
19
|
loading: RequestStatus;
|
|
19
20
|
error: RequestError | null;
|
|
@@ -38,6 +39,7 @@ export declare const selectCashDrawer: (state: AppState) => boolean;
|
|
|
38
39
|
export declare const selectRevenueCenterId: (state: AppState) => number | null;
|
|
39
40
|
export declare const selectStore: (state: AppState) => Store | null;
|
|
40
41
|
export declare const selectSelectOptions: (state: AppState) => SelectOptions;
|
|
42
|
+
export declare const selectMenuColors: (state: AppState) => MenuColors;
|
|
41
43
|
export declare const selectTimezone: (state: AppState) => Timezone;
|
|
42
44
|
export declare const selectLoyalty: (state: AppState) => boolean;
|
|
43
45
|
export declare const configReducer: import("redux").Reducer<ConfigState, import("redux").AnyAction>;
|
|
@@ -18,6 +18,7 @@ var initialState = {
|
|
|
18
18
|
store: null,
|
|
19
19
|
revenueCenterId: null,
|
|
20
20
|
selectOptions: null,
|
|
21
|
+
menuColors: null,
|
|
21
22
|
levelup: null,
|
|
22
23
|
loading: 'idle',
|
|
23
24
|
error: null,
|
|
@@ -31,40 +32,41 @@ export var fetchConfig = createAsyncThunk(ConfigActionType.FetchConfig, function
|
|
|
31
32
|
var apiUrl = _a.apiUrl, version = _a.version;
|
|
32
33
|
var dispatch = _b.dispatch, getState = _b.getState, rejectWithValue = _b.rejectWithValue;
|
|
33
34
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
34
|
-
var app, api, _c, config, store, _d, selectOptions, _e,
|
|
35
|
-
return __generator(this, function (
|
|
36
|
-
switch (
|
|
35
|
+
var app, api, _c, config, store, _d, selectOptions, _e, menuColors, _f, itemTypes, _g, levelup, err, cashier, employee, tz, businessDate, err_1, revenueCenterId, name_1, ipAddress, hasPinpad, hasCashDrawer, prep_stations, err_2;
|
|
36
|
+
return __generator(this, function (_h) {
|
|
37
|
+
switch (_h.label) {
|
|
37
38
|
case 0:
|
|
38
|
-
|
|
39
|
+
_h.trys.push([0, 6, , 7]);
|
|
39
40
|
app = { apiUrl: apiUrl };
|
|
40
41
|
api = new PosAPI(app);
|
|
41
42
|
return [4 /*yield*/, Promise.all([
|
|
42
43
|
api.getConfig(),
|
|
43
44
|
api.getStore(),
|
|
44
45
|
api.getSelectOptions(),
|
|
46
|
+
api.getMenuColors(),
|
|
45
47
|
api.getItemTypes(),
|
|
46
48
|
api.getLevelUpSettings()
|
|
47
49
|
])];
|
|
48
50
|
case 1:
|
|
49
|
-
_c =
|
|
51
|
+
_c = _h.sent(), config = _c[0], store = _c[1], _d = _c[2], selectOptions = _d === void 0 ? null : _d, _e = _c[3], menuColors = _e === void 0 ? null : _e, _f = _c[4], itemTypes = _f === void 0 ? null : _f, _g = _c[5], levelup = _g === void 0 ? null : _g;
|
|
50
52
|
if (!config || !store) {
|
|
51
53
|
err = errorsApi.internalServerError;
|
|
52
54
|
return [2 /*return*/, rejectWithValue(err)];
|
|
53
55
|
}
|
|
54
56
|
cashier = getState().pos.cashier;
|
|
55
57
|
if (!!cashier) return [3 /*break*/, 5];
|
|
56
|
-
|
|
58
|
+
_h.label = 2;
|
|
57
59
|
case 2:
|
|
58
|
-
|
|
60
|
+
_h.trys.push([2, 4, , 5]);
|
|
59
61
|
return [4 /*yield*/, api.getCashier()];
|
|
60
62
|
case 3:
|
|
61
|
-
employee =
|
|
63
|
+
employee = _h.sent();
|
|
62
64
|
tz = timezoneMap[store.timezone];
|
|
63
65
|
businessDate = currentLocalDateStr(tz);
|
|
64
66
|
dispatch(setCashier(__assign(__assign({}, employee), { businessDate: businessDate })));
|
|
65
67
|
return [3 /*break*/, 5];
|
|
66
68
|
case 4:
|
|
67
|
-
err_1 =
|
|
69
|
+
err_1 = _h.sent();
|
|
68
70
|
return [3 /*break*/, 5];
|
|
69
71
|
case 5:
|
|
70
72
|
revenueCenterId = store.revenue_center_id;
|
|
@@ -82,13 +84,14 @@ export var fetchConfig = createAsyncThunk(ConfigActionType.FetchConfig, function
|
|
|
82
84
|
hasPinpad: hasPinpad,
|
|
83
85
|
hasCashDrawer: hasCashDrawer,
|
|
84
86
|
selectOptions: selectOptions,
|
|
87
|
+
menuColors: menuColors,
|
|
85
88
|
levelup: levelup,
|
|
86
89
|
error: null,
|
|
87
90
|
loading: 'idle',
|
|
88
91
|
retries: 0
|
|
89
92
|
}];
|
|
90
93
|
case 6:
|
|
91
|
-
err_2 =
|
|
94
|
+
err_2 = _h.sent();
|
|
92
95
|
return [2 /*return*/, rejectWithValue(err_2)];
|
|
93
96
|
case 7: return [2 /*return*/];
|
|
94
97
|
}
|
|
@@ -110,7 +113,7 @@ var configSlice = createSlice({
|
|
|
110
113
|
extraReducers: function (builder) {
|
|
111
114
|
builder
|
|
112
115
|
.addCase(fetchConfig.fulfilled, function (state, action) {
|
|
113
|
-
var _a = action.payload, api = _a.api, app = _a.app, version = _a.version, store = _a.store, revenueCenterId = _a.revenueCenterId, name = _a.name, ipAddress = _a.ipAddress, hasPinpad = _a.hasPinpad, hasCashDrawer = _a.hasCashDrawer, selectOptions = _a.selectOptions, levelup = _a.levelup;
|
|
116
|
+
var _a = action.payload, api = _a.api, app = _a.app, version = _a.version, store = _a.store, revenueCenterId = _a.revenueCenterId, name = _a.name, ipAddress = _a.ipAddress, hasPinpad = _a.hasPinpad, hasCashDrawer = _a.hasCashDrawer, selectOptions = _a.selectOptions, menuColors = _a.menuColors, levelup = _a.levelup;
|
|
114
117
|
state.api = api;
|
|
115
118
|
state.app = app;
|
|
116
119
|
state.version = version;
|
|
@@ -121,6 +124,7 @@ var configSlice = createSlice({
|
|
|
121
124
|
state.store = store;
|
|
122
125
|
state.revenueCenterId = revenueCenterId;
|
|
123
126
|
state.selectOptions = selectOptions;
|
|
127
|
+
state.menuColors = menuColors;
|
|
124
128
|
state.levelup = levelup;
|
|
125
129
|
state.loading = 'idle';
|
|
126
130
|
state.retries = 0;
|
|
@@ -148,6 +152,9 @@ export var selectStore = function (state) { return state.config.store; };
|
|
|
148
152
|
export var selectSelectOptions = function (state) {
|
|
149
153
|
return state.config.selectOptions || [];
|
|
150
154
|
};
|
|
155
|
+
export var selectMenuColors = function (state) {
|
|
156
|
+
return state.config.menuColors || [];
|
|
157
|
+
};
|
|
151
158
|
export var selectTimezone = function (state) {
|
|
152
159
|
return state.config.store
|
|
153
160
|
? timezoneMap[state.config.store.timezone]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.49",
|
|
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",
|