@open-tender/store 0.3.74 → 0.3.76
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.
|
@@ -76,6 +76,9 @@ export declare const resetPosCheckout: import("@reduxjs/toolkit").ActionCreatorW
|
|
|
76
76
|
export declare const selectPosCheckout: (state: AppState) => CheckoutState;
|
|
77
77
|
export declare const selectPosCheck: (state: AppState) => Order | null;
|
|
78
78
|
export declare const selectPosCustomer: (state: AppState) => CustomerCheckout | null;
|
|
79
|
+
export declare const selectPosCustomerProfile: (state: AppState) => import("../types").Customer | null;
|
|
80
|
+
export declare const selectPosCustomerName: (state: AppState) => string | null;
|
|
81
|
+
export declare const selectPosCustomerNameShort: (state: AppState) => string | null;
|
|
79
82
|
export declare const selectPosPendingDiscounts: (state: AppState) => boolean;
|
|
80
83
|
export declare const selectPosAmountDue: (state: AppState) => `${number}.${number}` | null | undefined;
|
|
81
84
|
export declare const selectPosCheckTotal: (state: AppState) => `${number}.${number}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.checkoutReducer = exports.selectPosCheckGiftCardCodes = exports.selectPosCheckTenders = exports.selectPosCheckTotal = exports.selectPosAmountDue = exports.selectPosPendingDiscounts = exports.selectPosCustomer = exports.selectPosCheck = exports.selectPosCheckout = exports.setPoints = exports.setPendingDiscounts = exports.removeCustomer = exports.addCustomer = exports.setTaxExempt = exports.removeTip = exports.addTip = exports.removeTax = exports.addTax = exports.removeDiscount = exports.addDiscount = exports.removeSurcharge = exports.addSurcharge = exports.removeGiftCard = exports.addGiftCard = exports.handleCheckoutError = exports.resetPosCheck = exports.resetPosCheckout = exports.activateGiftCards = exports.voidPosOrder = exports.submitPosOrder = exports.validatePosOrder = exports.completeChipDNA = exports.identifyCustomer = exports.updateCart = exports.updateTender = exports.removeTender = exports.addTender = exports.CheckoutActionType = void 0;
|
|
4
|
+
exports.checkoutReducer = exports.selectPosCheckGiftCardCodes = exports.selectPosCheckTenders = exports.selectPosCheckTotal = exports.selectPosAmountDue = exports.selectPosPendingDiscounts = exports.selectPosCustomerNameShort = exports.selectPosCustomerName = exports.selectPosCustomerProfile = exports.selectPosCustomer = exports.selectPosCheck = exports.selectPosCheckout = exports.setPoints = exports.setPendingDiscounts = exports.removeCustomer = exports.addCustomer = exports.setTaxExempt = exports.removeTip = exports.addTip = exports.removeTax = exports.addTax = exports.removeDiscount = exports.addDiscount = exports.removeSurcharge = exports.addSurcharge = exports.removeGiftCard = exports.addGiftCard = exports.handleCheckoutError = exports.resetPosCheck = exports.resetPosCheckout = exports.activateGiftCards = exports.voidPosOrder = exports.submitPosOrder = exports.validatePosOrder = exports.completeChipDNA = exports.identifyCustomer = exports.updateCart = exports.updateTender = exports.removeTender = exports.addTender = exports.CheckoutActionType = void 0;
|
|
5
5
|
var tslib_1 = require("tslib");
|
|
6
6
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
var uuid_1 = require("uuid");
|
|
@@ -643,6 +643,30 @@ var selectPosCheck = function (state) { return state.checkout.check; };
|
|
|
643
643
|
exports.selectPosCheck = selectPosCheck;
|
|
644
644
|
var selectPosCustomer = function (state) { return state.checkout.customer; };
|
|
645
645
|
exports.selectPosCustomer = selectPosCustomer;
|
|
646
|
+
var selectPosCustomerProfile = function (state) {
|
|
647
|
+
if (!state.checkout.customer)
|
|
648
|
+
return null;
|
|
649
|
+
var customer = state.checkout.customer.customer;
|
|
650
|
+
return customer;
|
|
651
|
+
};
|
|
652
|
+
exports.selectPosCustomerProfile = selectPosCustomerProfile;
|
|
653
|
+
var selectPosCustomerName = function (state) {
|
|
654
|
+
if (!state.checkout.customer)
|
|
655
|
+
return null;
|
|
656
|
+
var customer = state.checkout.customer.customer;
|
|
657
|
+
var first_name = customer.first_name, last_name = customer.last_name;
|
|
658
|
+
return "".concat(first_name, " ").concat(last_name);
|
|
659
|
+
};
|
|
660
|
+
exports.selectPosCustomerName = selectPosCustomerName;
|
|
661
|
+
var selectPosCustomerNameShort = function (state) {
|
|
662
|
+
if (!state.checkout.customer)
|
|
663
|
+
return null;
|
|
664
|
+
var customer = state.checkout.customer.customer;
|
|
665
|
+
var first_name = customer.first_name, last_name = customer.last_name;
|
|
666
|
+
var lastName = (last_name === null || last_name === void 0 ? void 0 : last_name.charAt(0)) || '';
|
|
667
|
+
return "".concat(first_name, " ").concat(lastName);
|
|
668
|
+
};
|
|
669
|
+
exports.selectPosCustomerNameShort = selectPosCustomerNameShort;
|
|
646
670
|
var selectPosPendingDiscounts = function (state) {
|
|
647
671
|
return state.checkout.pendingDiscounts;
|
|
648
672
|
};
|
|
@@ -76,6 +76,9 @@ export declare const resetPosCheckout: import("@reduxjs/toolkit").ActionCreatorW
|
|
|
76
76
|
export declare const selectPosCheckout: (state: AppState) => CheckoutState;
|
|
77
77
|
export declare const selectPosCheck: (state: AppState) => Order | null;
|
|
78
78
|
export declare const selectPosCustomer: (state: AppState) => CustomerCheckout | null;
|
|
79
|
+
export declare const selectPosCustomerProfile: (state: AppState) => import("../types").Customer | null;
|
|
80
|
+
export declare const selectPosCustomerName: (state: AppState) => string | null;
|
|
81
|
+
export declare const selectPosCustomerNameShort: (state: AppState) => string | null;
|
|
79
82
|
export declare const selectPosPendingDiscounts: (state: AppState) => boolean;
|
|
80
83
|
export declare const selectPosAmountDue: (state: AppState) => `${number}.${number}` | null | undefined;
|
|
81
84
|
export declare const selectPosCheckTotal: (state: AppState) => `${number}.${number}`;
|
|
@@ -637,6 +637,27 @@ export var resetPosCheckout = (_a = checkoutSlice.actions, _a.resetPosCheckout),
|
|
|
637
637
|
export var selectPosCheckout = function (state) { return state.checkout; };
|
|
638
638
|
export var selectPosCheck = function (state) { return state.checkout.check; };
|
|
639
639
|
export var selectPosCustomer = function (state) { return state.checkout.customer; };
|
|
640
|
+
export var selectPosCustomerProfile = function (state) {
|
|
641
|
+
if (!state.checkout.customer)
|
|
642
|
+
return null;
|
|
643
|
+
var customer = state.checkout.customer.customer;
|
|
644
|
+
return customer;
|
|
645
|
+
};
|
|
646
|
+
export var selectPosCustomerName = function (state) {
|
|
647
|
+
if (!state.checkout.customer)
|
|
648
|
+
return null;
|
|
649
|
+
var customer = state.checkout.customer.customer;
|
|
650
|
+
var first_name = customer.first_name, last_name = customer.last_name;
|
|
651
|
+
return "".concat(first_name, " ").concat(last_name);
|
|
652
|
+
};
|
|
653
|
+
export var selectPosCustomerNameShort = function (state) {
|
|
654
|
+
if (!state.checkout.customer)
|
|
655
|
+
return null;
|
|
656
|
+
var customer = state.checkout.customer.customer;
|
|
657
|
+
var first_name = customer.first_name, last_name = customer.last_name;
|
|
658
|
+
var lastName = (last_name === null || last_name === void 0 ? void 0 : last_name.charAt(0)) || '';
|
|
659
|
+
return "".concat(first_name, " ").concat(lastName);
|
|
660
|
+
};
|
|
640
661
|
export var selectPosPendingDiscounts = function (state) {
|
|
641
662
|
return state.checkout.pendingDiscounts;
|
|
642
663
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.76",
|
|
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",
|