ordering-ui-react-native 0.17.79-release → 0.17.80-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
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
useLanguage,
|
|
12
12
|
ToastType,
|
|
13
13
|
useToast,
|
|
14
|
+
useSession
|
|
14
15
|
} from 'ordering-components/native';
|
|
15
16
|
import { useTheme } from 'styled-components/native';
|
|
16
17
|
import { PaymentOptionCash } from '../PaymentOptionCash';
|
|
@@ -78,6 +79,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
78
79
|
|
|
79
80
|
const theme = useTheme();
|
|
80
81
|
const [, { showToast }] = useToast();
|
|
82
|
+
const [{ user }] = useSession()
|
|
81
83
|
const { confirmApplePayPayment } = useApplePay()
|
|
82
84
|
|
|
83
85
|
const getPayIcon = (method: string) => {
|
|
@@ -120,7 +122,7 @@ const PaymentOptionsUI = (props: any) => {
|
|
|
120
122
|
const paymethodsFieldRequired = ['paypal', 'apple_pay', 'global_apple_pay']
|
|
121
123
|
|
|
122
124
|
const handlePaymentMethodClick = (paymethod: any) => {
|
|
123
|
-
if (cart?.balance > 0) {
|
|
125
|
+
if (cart?.balance > 0 || !!user?.guest_id) {
|
|
124
126
|
if (paymethodsFieldRequired.includes(paymethod?.gateway) && requiredFields.length > 0) {
|
|
125
127
|
openUserModal && openUserModal(true)
|
|
126
128
|
setPaymethodClicked({
|
|
@@ -505,10 +505,10 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
505
505
|
<TouchableOpacity style={{ marginTop: 10 }} onPress={handleUpdateGuest}>
|
|
506
506
|
{actionStatus?.loading ? (
|
|
507
507
|
<Placeholder Animation={Fade}>
|
|
508
|
-
<PlaceholderLine
|
|
508
|
+
<PlaceholderLine height={20} />
|
|
509
509
|
</Placeholder>
|
|
510
510
|
) : (
|
|
511
|
-
<OText color={theme.colors.primary} size={13} style={{ textAlign: 'center' }}>{t('
|
|
511
|
+
<OText color={theme.colors.primary} size={13} style={{ textAlign: 'center' }}>{t('AS_GUEST_USER', 'As guest user')}</OText>
|
|
512
512
|
)}
|
|
513
513
|
</TouchableOpacity>
|
|
514
514
|
)}
|
|
@@ -602,7 +602,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
602
602
|
<PlaceholderLine width={60} height={20} />
|
|
603
603
|
</Placeholder>
|
|
604
604
|
) : (
|
|
605
|
-
<OText color={theme.colors.primary} size={13}>{t('
|
|
605
|
+
<OText color={theme.colors.primary} size={13}>{t('AS_GUEST_USER', 'As guest user')}</OText>
|
|
606
606
|
)}
|
|
607
607
|
</TouchableOpacity>
|
|
608
608
|
)}
|