merchi_cart 0.0.2-e → 0.0.2-g
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.
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import { faTruck } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
-
import { ActiveFormShipmentAddressAndNotes } from '../forms/FormShipmentAddressAndNotes';
|
|
5
4
|
import { CheckoutContainer, InnerContainer, } from '../components/containers';
|
|
6
|
-
import { Alert, CartBody, CartTabPanel, LoadingTemplateSm,
|
|
5
|
+
import { Alert, CartBody, CartTabPanel, LoadingTemplateSm, Title, } from '../components';
|
|
7
6
|
import { tabIdShipment } from '../slices/sliceCart';
|
|
8
7
|
import CartNav from '../tabs/CartNav';
|
|
9
8
|
function PanelCartShipment() {
|
|
10
9
|
var _a = useSelector(function (s) { return s; }).stateCartShipment, fetchingShipmentGroups = _a.fetchingShipmentGroups, shipmentGroups = _a.shipmentGroups;
|
|
11
|
-
return (_jsxs(CartTabPanel, { tabId: tabIdShipment, children: [_jsx(CartNav, {}), _jsx(CartBody, { style: { paddingTop: '2rem' }, children: _jsxs("div", { className: 'merchi-cart-tab-content', children: [_jsx(CheckoutContainer, { textAlign: 'left', children: _jsx(InnerContainer, { width: 700, paddingBottom: '3rem', children: _jsx(
|
|
10
|
+
return (_jsxs(CartTabPanel, { tabId: tabIdShipment, children: [_jsx(CartNav, {}), _jsx(CartBody, { style: { paddingTop: '2rem' }, children: _jsxs("div", { className: 'merchi-cart-tab-content', children: [_jsx(CheckoutContainer, { textAlign: 'left', children: _jsx(InnerContainer, { width: 700, paddingBottom: '3rem', children: _jsx(_Fragment, {}) }) }), fetchingShipmentGroups ? (_jsx(CheckoutContainer, { children: _jsxs(InnerContainer, { width: 700, children: [_jsx(LoadingTemplateSm, {}), _jsx("p", { children: "Fetching shipping options." })] }) })) : (_jsxs(_Fragment, { children: [_jsx(CheckoutContainer, { textAlign: 'left', children: _jsx(InnerContainer, { paddingBottom: '1rem', width: 700, children: _jsx(Title, { icon: faTruck, title: shipmentGroups.length > 1 ?
|
|
12
11
|
'Select shipment methods'
|
|
13
12
|
: shipmentGroups.length ?
|
|
14
13
|
'Select a shipment method'
|
|
15
14
|
: '' }) }) }), _jsx(CheckoutContainer, { textAlign: 'left', children: _jsxs(InnerContainer, { paddingBottom: '1rem', width: 700, children: [shipmentGroups.length > 1 &&
|
|
16
|
-
_jsx(Alert, { alertType: 'warning', children: "Items within this cart are warehoused in different locations and will be shipped separately. Please select how you would like your items to be shipped." }),
|
|
17
|
-
return _jsx(ShipmentGroupCard, { group: group, groupIndex: index }, "".concat(index, "-shipment-group"));
|
|
18
|
-
})] }) })] }))] }) })] }));
|
|
15
|
+
_jsx(Alert, { alertType: 'warning', children: "Items within this cart are warehoused in different locations and will be shipped separately. Please select how you would like your items to be shipped." }), _jsx(_Fragment, {})] }) })] }))] }) })] }));
|
|
19
16
|
}
|
|
20
17
|
export default PanelCartShipment;
|
|
@@ -3,9 +3,8 @@ import { useSelector } from 'react-redux';
|
|
|
3
3
|
import { tabIdCheckout } from '../slices/sliceCart';
|
|
4
4
|
import CartNav from '../tabs/CartNav';
|
|
5
5
|
import { CheckoutContainer, InnerContainer, } from '../components/containers';
|
|
6
|
-
import CartClient from '../components/CartClient';
|
|
7
|
-
import CartShipment from '../components/CartShipment';
|
|
8
6
|
import { CartBody, CartTabPanel, Title, } from '../components';
|
|
7
|
+
import FormReturningCustomer from '../forms/FormReturningCustomer';
|
|
9
8
|
import FormSquarePayment from '../forms/FormSquarePayment';
|
|
10
9
|
import FormStripePayment from '../forms/FormStripePayment';
|
|
11
10
|
import { faUserPlus, faUserTag } from '@fortawesome/free-solid-svg-icons';
|
|
@@ -14,10 +13,10 @@ function PanelClientCheckout() {
|
|
|
14
13
|
var client = cart.client, domain = cart.domain;
|
|
15
14
|
var company = domain && domain.company;
|
|
16
15
|
return (_jsxs(CartTabPanel, { tabId: tabIdCheckout, children: [_jsx(CartNav, {}), _jsx(CartBody, { style: { paddingTop: '2rem' }, children: client && client.id > -1 ?
|
|
17
|
-
_jsxs(_Fragment, { children: [_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(
|
|
18
|
-
_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(
|
|
16
|
+
_jsxs(_Fragment, { children: [_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(_Fragment, {}) }) }), needsShipping &&
|
|
17
|
+
_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(_Fragment, {}) }) }), Boolean(company) && company.acceptSquare &&
|
|
19
18
|
_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(FormSquarePayment, {}) }) }), _jsx(CheckoutContainer, { children: _jsx(InnerContainer, { children: _jsx(FormStripePayment, {}) }) })] })
|
|
20
19
|
:
|
|
21
|
-
_jsxs(_Fragment, { children: [_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(Title, { icon: faUserPlus, Title: 'Checkout as new customer' }) }) }), _jsx(CheckoutContainer, { children:
|
|
20
|
+
_jsxs(_Fragment, { children: [_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(Title, { icon: faUserPlus, Title: 'Checkout as new customer' }) }) }), _jsx(CheckoutContainer, { children: _jsxs(InnerContainer, { paddingBottom: '3rem', children: [_jsx(Title, { icon: faUserTag, Title: 'Checkout as returning customer' }), _jsx(FormReturningCustomer, {})] }) })] }) })] }));
|
|
22
21
|
}
|
|
23
22
|
export default PanelClientCheckout;
|