ordering-ui-react-native 0.21.1 → 0.21.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.21.1",
3
+ "version": "0.21.3",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -56,7 +56,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
56
56
  const [datesWhitelist, setDateWhitelist] = useState<any>([{ start: null, end: null }])
57
57
  const [isEnabled, setIsEnabled] = useState(false)
58
58
  const { top } = useSafeAreaInsets()
59
- const is12hours = configs?.dates_moment_format?.value?.includes('hh:mm')
59
+ const is12hours = configs?.general_hour_format?.value?.includes('hh:mm')
60
60
 
61
61
  const showOrderTime = (selectedPreorderType === 1 && Object.keys(menu)?.length > 0) || selectedPreorderType === 0
62
62
  const isPreOrderSetting = configs?.preorder_status_enabled?.value === '1'
@@ -155,7 +155,7 @@ const MomentOptionUI = (props: MomentOptionParams) => {
155
155
  });
156
156
  const { bottom } = useSafeAreaInsets();
157
157
 
158
- const is12hours = configs?.dates_moment_format?.value?.includes('hh:mm')
158
+ const is12hours = configs?.general_hour_format?.value?.includes('hh:mm')
159
159
 
160
160
  const [selectedTime, setSelectedTime] = useState(null);
161
161
  const [datesWhitelist, setDateWhitelist] = useState<any>([{ start: null, end: null }])
@@ -30,7 +30,7 @@ const MomentSelectorUI = (props: any) => {
30
30
  const [customizedDateList, setCustomizedDateList] = useState([])
31
31
  const [customizedTimeList, setCustomizedTimeList] = useState([])
32
32
 
33
- const is12hours = configs?.dates_moment_format?.value?.includes('hh:mm')
33
+ const is12hours = configs?.general_hour_format?.value?.includes('hh:mm')
34
34
 
35
35
  const styles = StyleSheet.create({
36
36
  selectOption: {
@@ -88,6 +88,8 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
88
88
  return theme.images.general.stripesb
89
89
  case 'global_apple_pay':
90
90
  return theme.images.general.applePayMark
91
+ case 'global_google_pay':
92
+ return theme.images.general.googlePayMark
91
93
  default:
92
94
  return theme.images.general.creditCard
93
95
  }
@@ -123,7 +125,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
123
125
  const renderPaymethods = ({ item }: any) => {
124
126
  return (
125
127
  <>
126
- {item?.gateway === 'global_apple_pay' ? (
128
+ {methodsPay.includes(item?.gateway) ? (
127
129
  <TouchableOpacity
128
130
  onPress={() => handleChangePaymethod({ ...item, paymethod: { gateway: item.gateway }, paymethod_id: item?.id })}
129
131
  >
@@ -94,6 +94,8 @@ const PaymentOptionsUI = (props: any) => {
94
94
  return theme.images.general.stripesb
95
95
  case 'apple_pay':
96
96
  return theme.images.general.applePayMark
97
+ case 'google_pay':
98
+ return theme.images.general.googlePayMark
97
99
  default:
98
100
  return theme.images.general.creditCard
99
101
  }
@@ -157,11 +159,11 @@ const PaymentOptionsUI = (props: any) => {
157
159
  handlePlaceOrder(confirmApplePayPayment)
158
160
  }
159
161
  }, [paymethodData, paymethodSelected])
160
-
162
+
161
163
  const renderPaymethods = ({ item }: any) => {
162
164
  return (
163
165
  <>
164
- {item?.gateway === 'apple_pay' ? (
166
+ {methodsPay.includes(item?.gateway) ? (
165
167
  <TouchableOpacity
166
168
  onPress={() => handlePaymentMethodClick(item)}
167
169
  >