ordering-ui-external 5.0.5 → 6.0.0
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/_bundles/{7.ordering-ui.28307d37127e6161004f.js → 7.ordering-ui.a0ed9167dd88195da796.js} +1 -1
- package/_bundles/{ordering-ui.28307d37127e6161004f.js → ordering-ui.a0ed9167dd88195da796.js} +2 -2
- package/_modules/themes/five/src/components/AddressList/index.js +2 -2
- package/_modules/themes/five/src/components/BusinessController/index.js +11 -3
- package/_modules/themes/five/src/components/BusinessController/styles.js +26 -29
- package/_modules/themes/five/src/components/BusinessInformation/index.js +10 -1
- package/_modules/themes/five/src/components/BusinessInformation/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +2 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +5 -2
- package/_modules/themes/five/src/components/Checkout/index.js +17 -4
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +1 -1
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/index.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/styles.js +1 -1
- package/_modules/themes/five/src/components/ProductForm/index.js +5 -5
- package/_modules/themes/five/src/components/ProductForm/styles.js +5 -3
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +5 -0
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/_modules/themes/five/src/components/SearchProducts/styles.js +1 -1
- package/_modules/themes/five/src/components/UserFormDetails/index.js +3 -2
- package/package.json +2 -2
- package/src/themes/five/src/components/AddressList/index.js +2 -2
- package/src/themes/five/src/components/BusinessController/index.js +15 -19
- package/src/themes/five/src/components/BusinessController/styles.js +8 -7
- package/src/themes/five/src/components/BusinessInformation/index.js +14 -4
- package/src/themes/five/src/components/BusinessInformation/styles.js +1 -1
- package/src/themes/five/src/components/BusinessProductsList/index.js +1 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +5 -3
- package/src/themes/five/src/components/Checkout/index.js +13 -4
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +1 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +0 -1
- package/src/themes/five/src/components/OrderDetails/index.js +1 -1
- package/src/themes/five/src/components/OrderDetails/styles.js +1 -0
- package/src/themes/five/src/components/ProductForm/index.js +102 -93
- package/src/themes/five/src/components/ProductForm/styles.js +6 -0
- package/src/themes/five/src/components/ProductItemAccordion/index.js +9 -1
- package/src/themes/five/src/components/RenderProductsLayout/index.js +1 -1
- package/src/themes/five/src/components/SearchProducts/styles.js +0 -1
- package/src/themes/five/src/components/UserFormDetails/index.js +9 -6
- /package/_bundles/{0.ordering-ui.28307d37127e6161004f.js → 0.ordering-ui.a0ed9167dd88195da796.js} +0 -0
- /package/_bundles/{1.ordering-ui.28307d37127e6161004f.js → 1.ordering-ui.a0ed9167dd88195da796.js} +0 -0
- /package/_bundles/{2.ordering-ui.28307d37127e6161004f.js → 2.ordering-ui.a0ed9167dd88195da796.js} +0 -0
- /package/_bundles/{4.ordering-ui.28307d37127e6161004f.js → 4.ordering-ui.a0ed9167dd88195da796.js} +0 -0
- /package/_bundles/{5.ordering-ui.28307d37127e6161004f.js → 5.ordering-ui.a0ed9167dd88195da796.js} +0 -0
- /package/_bundles/{6.ordering-ui.28307d37127e6161004f.js → 6.ordering-ui.a0ed9167dd88195da796.js} +0 -0
- /package/_bundles/{7.ordering-ui.28307d37127e6161004f.js.LICENSE.txt → 7.ordering-ui.a0ed9167dd88195da796.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.28307d37127e6161004f.js → 8.ordering-ui.a0ed9167dd88195da796.js} +0 -0
- /package/_bundles/{9.ordering-ui.28307d37127e6161004f.js → 9.ordering-ui.a0ed9167dd88195da796.js} +0 -0
- /package/_bundles/{ordering-ui.28307d37127e6161004f.js.LICENSE.txt → ordering-ui.a0ed9167dd88195da796.js.LICENSE.txt} +0 -0
|
@@ -342,6 +342,11 @@ export const Medadata = styled.div`
|
|
|
342
342
|
export const CallCenterInformation = styled.div`
|
|
343
343
|
display: flex;
|
|
344
344
|
flex-direction: column;
|
|
345
|
+
position: absolute;
|
|
346
|
+
right: 0;
|
|
347
|
+
bottom: 43px;
|
|
348
|
+
margin-right: 10px;
|
|
349
|
+
margin-bottom: 10px;
|
|
345
350
|
div{
|
|
346
351
|
justify-content: space-evenly;
|
|
347
352
|
}
|
|
@@ -352,16 +357,12 @@ export const CallCenterInformationBullet = styled.div`
|
|
|
352
357
|
padding: 2px;
|
|
353
358
|
margin-bottom: 2px;
|
|
354
359
|
border-radius: 16px;
|
|
360
|
+
background: ${({ bgcolor }) => bgcolor};
|
|
361
|
+
width: 50px;
|
|
362
|
+
color: #fff;
|
|
355
363
|
svg{
|
|
356
364
|
font-size: 18px;
|
|
357
365
|
}
|
|
358
|
-
${({ isCustomerMode }) => isCustomerMode ? css`
|
|
359
|
-
flex-direction: column;
|
|
360
|
-
` : css`
|
|
361
|
-
width: 50px;
|
|
362
|
-
background: ${({ bgcolor }) => bgcolor};
|
|
363
|
-
color: #fff;
|
|
364
|
-
`}
|
|
365
366
|
`
|
|
366
367
|
|
|
367
368
|
export const BusinessLogoWrapper = styled.div`
|
|
@@ -57,10 +57,18 @@ export const BusinessInformationUI = (props) => {
|
|
|
57
57
|
const hideAddress = theme?.business_view?.components?.information?.components?.address?.hidden
|
|
58
58
|
const formatTime = configs?.general_hour_format?.value
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
const fillStyle = {
|
|
61
|
+
fillColor: theme.colors.primary,
|
|
62
|
+
strokeColor: theme.colors.darkPrimaryColor,
|
|
63
|
+
fillOpacity: 0.2,
|
|
64
|
+
strokeWeight: 2,
|
|
65
|
+
editable: false
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const checkTime = (val) => (val < 10 ? `0${val}` : val)
|
|
69
|
+
const timeFormated = (time) => {
|
|
70
|
+
return moment(`1900-01-01 ${checkTime(time.hour)}:${checkTime(time.minute)}`).format(formatTime)
|
|
71
|
+
}
|
|
64
72
|
|
|
65
73
|
const handleModalImage = (src) => {
|
|
66
74
|
setImage(src)
|
|
@@ -105,6 +113,8 @@ export const BusinessInformationUI = (props) => {
|
|
|
105
113
|
apiKey={configs?.google_maps_api_key?.value}
|
|
106
114
|
location={businessLocation.location}
|
|
107
115
|
mapControls={businessLocation.googleMapsControls || business.googleMapsControls}
|
|
116
|
+
businessZones={business?.zones}
|
|
117
|
+
fillStyle={fillStyle}
|
|
108
118
|
/>
|
|
109
119
|
</Map>
|
|
110
120
|
)}
|
|
@@ -377,7 +377,7 @@ const BusinessProductsListUI = (props) => {
|
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
{
|
|
380
|
-
!categoryState
|
|
380
|
+
!categoryState?.loading && !isBusinessLoading && categoryState?.products?.length === 0 && !((!searchValue && !errorQuantityProducts)) && (
|
|
381
381
|
<WrapperNotFound>
|
|
382
382
|
<NotFoundSource
|
|
383
383
|
content={!searchValue ? t('ERROR_NOT_FOUND_PRODUCTS_TIME', 'No products found at this time') : t('ERROR_NOT_FOUND_PRODUCTS', 'No products found, please change filters.')}
|
|
@@ -85,7 +85,9 @@ const BusinessProductsListingUI = (props) => {
|
|
|
85
85
|
priceFilterValues,
|
|
86
86
|
handleUpdateProfessionals,
|
|
87
87
|
isCustomerMode,
|
|
88
|
-
isCustomLayout
|
|
88
|
+
isCustomLayout,
|
|
89
|
+
notFound,
|
|
90
|
+
setNotFound
|
|
89
91
|
} = props
|
|
90
92
|
|
|
91
93
|
const { business, loading, error } = businessState
|
|
@@ -187,6 +189,7 @@ const BusinessProductsListingUI = (props) => {
|
|
|
187
189
|
handleUpdateInitialRender(false)
|
|
188
190
|
updateProductModal(null)
|
|
189
191
|
setCurProduct(null)
|
|
192
|
+
setNotFound(false)
|
|
190
193
|
onProductRedirect({
|
|
191
194
|
slug: business?.slug
|
|
192
195
|
})
|
|
@@ -513,8 +516,7 @@ const BusinessProductsListingUI = (props) => {
|
|
|
513
516
|
content={productModal.error[0]?.message || productModal.error[0]}
|
|
514
517
|
/>
|
|
515
518
|
)}
|
|
516
|
-
|
|
517
|
-
{isInitialRender && !productModal.loading && !productModal.error && !productModal.product && (
|
|
519
|
+
{isInitialRender && !productModal.loading && !productModal.error && !productModal.product && notFound && (
|
|
518
520
|
<NotFoundSource
|
|
519
521
|
content={t('ERROR_GET_PRODUCT', theme?.defaultLanguages?.ERROR_GET_PRODUCT || 'Sorry, we couldn\'t find the requested product.')}
|
|
520
522
|
/>
|
|
@@ -125,10 +125,11 @@ const CheckoutUI = (props) => {
|
|
|
125
125
|
const [isOpen, setIsOpen] = useState(false)
|
|
126
126
|
const [requiredFields, setRequiredFields] = useState([])
|
|
127
127
|
const [isSuccess, setIsSuccess] = useState(false)
|
|
128
|
-
const [openModal, setOpenModal] = useState({ login: false, signup: false })
|
|
128
|
+
const [openModal, setOpenModal] = useState({ login: false, signup: false, isGuest: false })
|
|
129
129
|
const [allowedGuest, setAllowedGuest] = useState(false)
|
|
130
130
|
const [cardList, setCardList] = useState([])
|
|
131
131
|
const cardsMethods = ['stripe', 'credomatic']
|
|
132
|
+
const stripePaymethods = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
|
|
132
133
|
const businessConfigs = businessDetails?.business?.configs ?? []
|
|
133
134
|
const isTableNumberEnabled = configs?.table_numer_enabled?.value
|
|
134
135
|
const isWalletCashEnabled = businessConfigs.find(config => config.key === 'wallet_cash_enabled')?.value === '1'
|
|
@@ -180,7 +181,13 @@ const CheckoutUI = (props) => {
|
|
|
180
181
|
const creditPointPlanOnBusiness = creditPointPlan?.businesses?.find(b => b.business_id === cart?.business_id && b.accumulates)
|
|
181
182
|
|
|
182
183
|
const handlePlaceOrder = () => {
|
|
183
|
-
if (
|
|
184
|
+
if (stripePaymethods.includes(paymethodSelected?.gateway) && user?.guest_id) {
|
|
185
|
+
setOpenModal({ ...openModal, signup: true, isGuest: true })
|
|
186
|
+
return
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (!userErrors.length && (!requiredFields?.length ||
|
|
190
|
+
(allowedGuest && (paymethodSelected?.gateway === 'cash' || paymethodSelected?.gateway === 'card_delivery')))) {
|
|
184
191
|
const body = {}
|
|
185
192
|
if (behalfName) {
|
|
186
193
|
body.on_behalf_of = behalfName
|
|
@@ -263,7 +270,8 @@ const CheckoutUI = (props) => {
|
|
|
263
270
|
user,
|
|
264
271
|
token: user?.session?.access_token
|
|
265
272
|
})
|
|
266
|
-
|
|
273
|
+
openModal?.isGuest && handlePlaceOrderAsGuest()
|
|
274
|
+
setOpenModal({ ...openModal, signup: false, isGuest: false })
|
|
267
275
|
}
|
|
268
276
|
|
|
269
277
|
const handleSuccessLogin = (user) => {
|
|
@@ -711,6 +719,7 @@ const CheckoutUI = (props) => {
|
|
|
711
719
|
isEdit
|
|
712
720
|
isModal
|
|
713
721
|
handlePlaceOrderAsGuest={handlePlaceOrderAsGuest}
|
|
722
|
+
isAllowGuest={paymethodSelected?.gateway === 'cash' || paymethodSelected?.gateway === 'card_delivery'}
|
|
714
723
|
onClose={() => {
|
|
715
724
|
setIsOpen(false)
|
|
716
725
|
handlePlaceOrder()
|
|
@@ -721,7 +730,7 @@ const CheckoutUI = (props) => {
|
|
|
721
730
|
open={openModal.signup}
|
|
722
731
|
width='760px'
|
|
723
732
|
padding='30px'
|
|
724
|
-
onClose={() => setOpenModal({ ...openModal, signup: false })}
|
|
733
|
+
onClose={() => setOpenModal({ ...openModal, signup: false, isGuest: false })}
|
|
725
734
|
>
|
|
726
735
|
<SignUpForm
|
|
727
736
|
useLoginByCellphone
|
|
@@ -144,7 +144,7 @@ export const OriginalHomeHero = (props) => {
|
|
|
144
144
|
<PoweredByOrdering>
|
|
145
145
|
{t('POWERED_BY', 'Powered by')}
|
|
146
146
|
<a href='https://www.ordering.co'>
|
|
147
|
-
{
|
|
147
|
+
{t('ORDERING_CO', 'Ordering.co')}
|
|
148
148
|
</a>
|
|
149
149
|
</PoweredByOrdering>
|
|
150
150
|
)}
|
|
@@ -390,7 +390,7 @@ const OrderDetailsUI = (props) => {
|
|
|
390
390
|
<PoweredByOrdering>
|
|
391
391
|
{t('POWERED_BY', 'Powered by')}
|
|
392
392
|
<a href='https://www.ordering.co'>
|
|
393
|
-
{
|
|
393
|
+
{t('ORDERING_CO', 'Ordering.co')}
|
|
394
394
|
</a>
|
|
395
395
|
</PoweredByOrdering>
|
|
396
396
|
)}
|
|
@@ -64,7 +64,8 @@ import {
|
|
|
64
64
|
ProductTagWrapper,
|
|
65
65
|
VideoGalleryWrapper,
|
|
66
66
|
TitleWrapper,
|
|
67
|
-
GuestUserLink
|
|
67
|
+
GuestUserLink,
|
|
68
|
+
LoadingWrapper
|
|
68
69
|
} from './styles'
|
|
69
70
|
import { useTheme } from 'styled-components'
|
|
70
71
|
import { Input, TextArea } from '../../styles/Inputs'
|
|
@@ -683,103 +684,111 @@ const ProductOptionsUI = (props) => {
|
|
|
683
684
|
}
|
|
684
685
|
</ProductEdition>
|
|
685
686
|
<ProductActions isColumn={(auth && !(orderState.options?.address_id || unaddressedTypes.includes(orderState?.options?.type)))}>
|
|
686
|
-
|
|
687
|
-
<
|
|
688
|
-
<
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
<
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
<
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
onChange={e => onChangeProductCartQuantity(parseInt(e.target.value))}
|
|
705
|
-
onKeyPress={(e) => {
|
|
706
|
-
if (!/^[0-9.]$/.test(e.key)) {
|
|
707
|
-
e.preventDefault()
|
|
708
|
-
}
|
|
709
|
-
}}
|
|
687
|
+
{(actionStatus?.loading || orderState.loading) ? (
|
|
688
|
+
<LoadingWrapper>
|
|
689
|
+
<Skeleton height={35} width={150} />
|
|
690
|
+
</LoadingWrapper>
|
|
691
|
+
) : (
|
|
692
|
+
<>
|
|
693
|
+
<div className='price-amount-block'>
|
|
694
|
+
<div className='price'>
|
|
695
|
+
<h4>{productCart.total && parsePrice(productCart.total)}</h4>
|
|
696
|
+
{product?.minimum_per_order && (productCart?.quantity + productAddedToCartLength) <= product?.minimum_per_order && productCart?.quantity !== 1 && <span>{t('MINIMUM_TO_ORDER', 'Minimum _number_ to order').replace('_number_', product?.minimum_per_order)}</span>}
|
|
697
|
+
{product?.maximum_per_order && (productCart?.quantity + productAddedToCartLength) >= product?.maximum_per_order && <span>{t('MAXIMUM_TO_ORDER', 'Max. _number_ to order'.replace('_number_', product?.maximum_per_order))}</span>}
|
|
698
|
+
</div>
|
|
699
|
+
{
|
|
700
|
+
productCart && !isSoldOut && maxProductQuantity > 0 && (
|
|
701
|
+
<div className={isHaveWeight ? 'incdec-control show-weight-unit' : 'incdec-control'}>
|
|
702
|
+
<FiMinusCircle
|
|
703
|
+
onClick={decrement}
|
|
704
|
+
className={`${productCart.quantity === 1 || !productCart.quantity || isSoldOut || ((productCart?.quantity + productAddedToCartLength) <= product?.minimum_per_order) ? 'disabled' : ''}`}
|
|
710
705
|
/>
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
706
|
+
{
|
|
707
|
+
qtyBy?.pieces && (
|
|
708
|
+
<Input
|
|
709
|
+
className='qty'
|
|
710
|
+
value={productCart?.quantity || ''}
|
|
711
|
+
onChange={e => onChangeProductCartQuantity(parseInt(e.target.value))}
|
|
712
|
+
onKeyPress={(e) => {
|
|
713
|
+
if (!/^[0-9.]$/.test(e.key)) {
|
|
714
|
+
e.preventDefault()
|
|
715
|
+
}
|
|
716
|
+
}}
|
|
717
|
+
/>
|
|
718
|
+
)
|
|
719
|
+
}
|
|
720
|
+
{qtyBy?.weight_unit && (
|
|
721
|
+
<Input className='qty' value={(productCart.quantity * product?.weight).toFixed(2)} />
|
|
722
|
+
)}
|
|
723
|
+
<FiPlusCircle
|
|
724
|
+
onClick={increment}
|
|
725
|
+
className={`${maxProductQuantity <= 0 || (productCart?.quantity + productAddedToCartLength) >= maxProductQuantity || ((productCart?.quantity + productAddedToCartLength) >= product?.maximum_per_order && product?.maximum_per_order) || isSoldOut ? 'disabled' : ''}`}
|
|
726
|
+
/>
|
|
727
|
+
{isHaveWeight && (
|
|
728
|
+
<WeightUnitSwitch>
|
|
729
|
+
<WeightUnitItem onClick={() => handleSwitchQtyUnit('pieces')} active={qtyBy?.pieces}>{t('PIECES', 'pcs')}</WeightUnitItem>
|
|
730
|
+
<WeightUnitItem onClick={() => handleSwitchQtyUnit('weight_unit')} active={qtyBy?.weight_unit}>{product?.weight_unit}</WeightUnitItem>
|
|
731
|
+
</WeightUnitSwitch>
|
|
732
|
+
)}
|
|
733
|
+
</div>
|
|
734
|
+
)
|
|
735
|
+
}
|
|
736
|
+
</div>
|
|
737
|
+
|
|
738
|
+
{productCart && !isSoldOut && maxProductQuantity > 0 && auth && (orderState.options?.address_id || unaddressedTypes.includes(orderState?.options?.type)) && (
|
|
739
|
+
<Button
|
|
740
|
+
className={`add ${(maxProductQuantity === 0 || Object.keys(errors).length > 0) ? 'disabled' : ''}`}
|
|
741
|
+
color='primary'
|
|
742
|
+
onClick={() => handleSaveProduct()}
|
|
743
|
+
disabled={orderState.loading || productCart?.quantity === 0 || (product?.minimum_per_order && ((productCart?.quantity + productAddedToCartLength) < product?.minimum_per_order)) || (product?.maximum_per_order && ((productCart?.quantity + productAddedToCartLength) > product?.maximum_per_order))}
|
|
744
|
+
>
|
|
745
|
+
{orderState.loading ? (
|
|
746
|
+
<span>{t('LOADING', theme?.defaultLanguages?.LOADING || 'Loading')}</span>
|
|
747
|
+
) : (
|
|
748
|
+
<span>
|
|
749
|
+
{editMode ? t('UPDATE', theme?.defaultLanguages?.UPDATE || 'Update') : t('ADD', theme?.defaultLanguages?.ADD || 'Add')}
|
|
750
|
+
</span>
|
|
725
751
|
)}
|
|
726
|
-
</
|
|
727
|
-
)
|
|
728
|
-
}
|
|
729
|
-
</div>
|
|
730
|
-
|
|
731
|
-
{productCart && !isSoldOut && maxProductQuantity > 0 && auth && (orderState.options?.address_id || unaddressedTypes.includes(orderState?.options?.type)) && (
|
|
732
|
-
<Button
|
|
733
|
-
className={`add ${(maxProductQuantity === 0 || Object.keys(errors).length > 0) ? 'disabled' : ''}`}
|
|
734
|
-
color='primary'
|
|
735
|
-
onClick={() => handleSaveProduct()}
|
|
736
|
-
disabled={orderState.loading || productCart?.quantity === 0 || (product?.minimum_per_order && ((productCart?.quantity + productAddedToCartLength) < product?.minimum_per_order)) || (product?.maximum_per_order && ((productCart?.quantity + productAddedToCartLength) > product?.maximum_per_order))}
|
|
737
|
-
>
|
|
738
|
-
{orderState.loading ? (
|
|
739
|
-
<span>{t('LOADING', theme?.defaultLanguages?.LOADING || 'Loading')}</span>
|
|
740
|
-
) : (
|
|
741
|
-
<span>
|
|
742
|
-
{editMode ? t('UPDATE', theme?.defaultLanguages?.UPDATE || 'Update') : t('ADD', theme?.defaultLanguages?.ADD || 'Add')}
|
|
743
|
-
</span>
|
|
752
|
+
</Button>
|
|
744
753
|
)}
|
|
745
|
-
</Button>
|
|
746
|
-
)}
|
|
747
754
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
755
|
+
{auth && !(orderState.options?.address_id || unaddressedTypes.includes(orderState?.options?.type)) && (
|
|
756
|
+
orderState.loading ? (
|
|
757
|
+
<Button
|
|
758
|
+
className='add'
|
|
759
|
+
color='primary'
|
|
760
|
+
disabled
|
|
761
|
+
>
|
|
762
|
+
{t('LOADING', theme?.defaultLanguages?.LOADING || 'Loading')}
|
|
763
|
+
</Button>
|
|
764
|
+
) : (
|
|
765
|
+
<AddressList
|
|
766
|
+
isModal
|
|
767
|
+
isProfile
|
|
768
|
+
userId={isNaN(userCustomer?.id) ? null : userCustomer?.id}
|
|
769
|
+
addressList={isNaN(userCustomer?.id) ? user.addresses : null}
|
|
770
|
+
isProductForm
|
|
771
|
+
/>
|
|
772
|
+
)
|
|
773
|
+
)}
|
|
767
774
|
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
775
|
+
{(!auth || isSoldOut || maxProductQuantity <= 0) && (
|
|
776
|
+
<Button
|
|
777
|
+
className={`add ${!(productCart && !isSoldOut && maxProductQuantity > 0) ? 'soldout' : ''}`}
|
|
778
|
+
color='primary'
|
|
779
|
+
outline
|
|
780
|
+
disabled={isSoldOut || maxProductQuantity <= 0}
|
|
781
|
+
onClick={() => setModalIsOpen(true)}
|
|
782
|
+
>
|
|
783
|
+
{isSoldOut || maxProductQuantity <= 0 ? t('SOLD_OUT', theme?.defaultLanguages?.SOLD_OUT || 'Sold out') : t('LOGIN_SIGNUP', theme?.defaultLanguages?.LOGIN_SIGNUP || 'Login / Sign Up')}
|
|
784
|
+
</Button>
|
|
785
|
+
)}
|
|
786
|
+
{!auth && guestCheckoutEnabled && orderTypeEnabled && (
|
|
787
|
+
<GuestUserLink onClick={handleUpdateGuest}>
|
|
788
|
+
{t('WITH_GUEST_USER', 'With Guest user')}
|
|
789
|
+
</GuestUserLink>
|
|
790
|
+
)}
|
|
791
|
+
</>
|
|
783
792
|
)}
|
|
784
793
|
</ProductActions>
|
|
785
794
|
</ProductInfo>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useRef } from 'react'
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react'
|
|
2
2
|
import IosArrowDown from '@meronex/icons/ios/IosArrowDown'
|
|
3
3
|
import {
|
|
4
4
|
Pencil,
|
|
@@ -108,6 +108,14 @@ export const ProductItemAccordion = (props) => {
|
|
|
108
108
|
return `${quantity} x ${name} ${pos} +${price}`
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
if (setActive === 'active') {
|
|
113
|
+
setHeightState(
|
|
114
|
+
`${content.current.scrollHeight}px`
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
}, [product, setActive])
|
|
118
|
+
|
|
111
119
|
return (
|
|
112
120
|
<>
|
|
113
121
|
{props.beforeElements?.map((BeforeElement, i) => (
|
|
@@ -213,7 +213,7 @@ export const RenderProductsLayout = (props) => {
|
|
|
213
213
|
</WrapperSearch>
|
|
214
214
|
</>
|
|
215
215
|
)}
|
|
216
|
-
{!business?.loading && business?.previously_products?.length > 0 && !hidePreviousOrdered && !categoryClicked && (
|
|
216
|
+
{!business?.loading && business?.previously_products?.length > 0 && !hidePreviousOrdered && windowSize.width < 993 && !categoryClicked && (
|
|
217
217
|
<OrderItAgain
|
|
218
218
|
onProductClick={onProductClick}
|
|
219
219
|
productList={business?.previously_products}
|
|
@@ -50,7 +50,8 @@ export const UserFormDetailsUI = (props) => {
|
|
|
50
50
|
isOldLayout,
|
|
51
51
|
requiredFields,
|
|
52
52
|
handleChangeNotifications,
|
|
53
|
-
handlePlaceOrderAsGuest
|
|
53
|
+
handlePlaceOrderAsGuest,
|
|
54
|
+
isAllowGuest
|
|
54
55
|
} = props
|
|
55
56
|
|
|
56
57
|
const formMethods = useForm()
|
|
@@ -488,11 +489,13 @@ export const UserFormDetailsUI = (props) => {
|
|
|
488
489
|
>
|
|
489
490
|
{formState.loading ? t('UPDATING', 'Updating...') : t('SIGN_UP_AND_PLACE_ORDER', 'Sign up and place order')}
|
|
490
491
|
</Button>
|
|
491
|
-
|
|
492
|
-
<
|
|
493
|
-
{
|
|
494
|
-
|
|
495
|
-
|
|
492
|
+
{isAllowGuest && (
|
|
493
|
+
<TextLinkWrapper>
|
|
494
|
+
<span onClick={() => handlePlaceOrderAsGuest()}>
|
|
495
|
+
{t('PLACE_ORDER_AS_GUEST', 'Place order as guest')}
|
|
496
|
+
</span>
|
|
497
|
+
</TextLinkWrapper>
|
|
498
|
+
)}
|
|
496
499
|
</>
|
|
497
500
|
)}
|
|
498
501
|
</>
|
/package/_bundles/{0.ordering-ui.28307d37127e6161004f.js → 0.ordering-ui.a0ed9167dd88195da796.js}
RENAMED
|
File without changes
|
/package/_bundles/{1.ordering-ui.28307d37127e6161004f.js → 1.ordering-ui.a0ed9167dd88195da796.js}
RENAMED
|
File without changes
|
/package/_bundles/{2.ordering-ui.28307d37127e6161004f.js → 2.ordering-ui.a0ed9167dd88195da796.js}
RENAMED
|
File without changes
|
/package/_bundles/{4.ordering-ui.28307d37127e6161004f.js → 4.ordering-ui.a0ed9167dd88195da796.js}
RENAMED
|
File without changes
|
/package/_bundles/{5.ordering-ui.28307d37127e6161004f.js → 5.ordering-ui.a0ed9167dd88195da796.js}
RENAMED
|
File without changes
|
/package/_bundles/{6.ordering-ui.28307d37127e6161004f.js → 6.ordering-ui.a0ed9167dd88195da796.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/_bundles/{8.ordering-ui.28307d37127e6161004f.js → 8.ordering-ui.a0ed9167dd88195da796.js}
RENAMED
|
File without changes
|
/package/_bundles/{9.ordering-ui.28307d37127e6161004f.js → 9.ordering-ui.a0ed9167dd88195da796.js}
RENAMED
|
File without changes
|