ordering-ui-react-native 0.17.74-release → 0.17.75-release
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/package.json
CHANGED
|
@@ -105,6 +105,7 @@ const BusinessInformationUI = (props: BusinessInformationParams) => {
|
|
|
105
105
|
readOnly
|
|
106
106
|
location={businessLocation.location}
|
|
107
107
|
markerTitle={businessState?.business?.name}
|
|
108
|
+
businessZones={businessState?.business?.zones}
|
|
108
109
|
/>
|
|
109
110
|
</WrapBusinessMap>
|
|
110
111
|
)}
|
|
@@ -158,12 +158,13 @@ const CheckoutUI = (props: any) => {
|
|
|
158
158
|
const [webviewPaymethod, setWebviewPaymethod] = useState<any>(null)
|
|
159
159
|
const [isOpen, setIsOpen] = useState(false)
|
|
160
160
|
const [requiredFields, setRequiredFields] = useState<any>([])
|
|
161
|
-
const [openModal, setOpenModal] = useState({ login: false, signup: false })
|
|
161
|
+
const [openModal, setOpenModal] = useState({ login: false, signup: false, isGuest: false })
|
|
162
162
|
const [allowedGuest, setAllowedGuest] = useState(false)
|
|
163
163
|
const [placeByMethodPay, setPlaceByMethodPay] = useState(false)
|
|
164
164
|
const [methodPaySupported, setMethodPaySupported] = useState({ enabled: false, message: null, loading: true })
|
|
165
165
|
const [cardList, setCardList] = useState<any>({ cards: [], loading: false, error: null })
|
|
166
166
|
const cardsMethods = ['credomatic']
|
|
167
|
+
const stripePaymethods: any = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
|
|
167
168
|
const placeSpotTypes = [3, 4, 5]
|
|
168
169
|
const placeSpotsEnabled = placeSpotTypes.includes(options?.type)
|
|
169
170
|
const isGiftCardCart = !cart?.business_id
|
|
@@ -237,7 +238,8 @@ const CheckoutUI = (props: any) => {
|
|
|
237
238
|
user,
|
|
238
239
|
token: user?.session?.access_token
|
|
239
240
|
})
|
|
240
|
-
|
|
241
|
+
openModal?.isGuest && handlePlaceOrderAsGuest()
|
|
242
|
+
setOpenModal({ ...openModal, signup: false, isGuest: false })
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
const handleSuccessLogin = (user: any) => {
|
|
@@ -245,6 +247,11 @@ const CheckoutUI = (props: any) => {
|
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
const handlePlaceOrder = (confirmPayment: any, forcePlace: boolean = false) => {
|
|
250
|
+
if (stripePaymethods.includes(paymethodSelected?.gateway) && user?.guest_id) {
|
|
251
|
+
setOpenModal({ ...openModal, signup: true, isGuest: true })
|
|
252
|
+
return
|
|
253
|
+
}
|
|
254
|
+
|
|
248
255
|
if (!userErrors.length && (!requiredFields?.length || allowedGuest) || forcePlace) {
|
|
249
256
|
vibrateApp()
|
|
250
257
|
handlerClickPlaceOrder && handlerClickPlaceOrder(null, { isNative: true }, confirmPayment)
|
|
@@ -917,7 +924,7 @@ const CheckoutUI = (props: any) => {
|
|
|
917
924
|
</OModal>
|
|
918
925
|
<OModal
|
|
919
926
|
open={openModal.signup}
|
|
920
|
-
onClose={() => setOpenModal({ ...openModal, signup: false })}
|
|
927
|
+
onClose={() => setOpenModal({ ...openModal, signup: false, isGuest: false })}
|
|
921
928
|
>
|
|
922
929
|
<ScrollView style={{ paddingHorizontal: 20, width: '100%' }}>
|
|
923
930
|
<SignupForm
|
|
@@ -448,8 +448,8 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
448
448
|
? t('UPDATING', 'Updating...')
|
|
449
449
|
: t('UPDATE', 'Update')
|
|
450
450
|
}
|
|
451
|
-
bgColor={theme.colors.
|
|
452
|
-
textStyle={{ color: theme.colors.
|
|
451
|
+
bgColor={theme.colors.primary}
|
|
452
|
+
textStyle={{ color: theme.colors.white, fontSize: 14 }}
|
|
453
453
|
borderColor={theme.colors.primary}
|
|
454
454
|
isDisabled={formState.loading}
|
|
455
455
|
imgRightSrc={null}
|
|
@@ -627,7 +627,8 @@ export interface GoogleMapsParams {
|
|
|
627
627
|
locations?: Array<any>,
|
|
628
628
|
setSaveLocation?: (val: boolean) => void,
|
|
629
629
|
handleToggleMap?: () => void,
|
|
630
|
-
isIntGeoCoder: boolean
|
|
630
|
+
isIntGeoCoder: boolean,
|
|
631
|
+
businessZones?: any
|
|
631
632
|
}
|
|
632
633
|
|
|
633
634
|
export interface HelpParams {
|