ordering-ui-react-native 0.23.46 → 0.23.47

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.23.46",
3
+ "version": "0.23.47",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -177,7 +177,7 @@ const CheckoutUI = (props: any) => {
177
177
  const [isGiftCardCart, setIsGiftCardCart] = useState(!cart?.business_id)
178
178
  const containerRef = useRef<any>()
179
179
  const cardsMethods = ['credomatic']
180
- const stripePaymethods: any = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
180
+ const stripePaymethods: any = ['stripe', 'stripe_connect', 'stripe_redirect']
181
181
  const notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes', 'comments']
182
182
 
183
183
  const checkoutFields = useMemo(() => checkoutFieldsState?.fields?.filter((field: any) => field.order_type_id === options?.type), [checkoutFieldsState, options])
@@ -351,13 +351,13 @@ const CheckoutUI = (props: any) => {
351
351
  const checkGuestValidationFields = () => {
352
352
  const userSelected = user
353
353
  const _requiredFields = checkoutFieldsState?.fields
354
- .filter((field : any) => (field?.order_type_id === options?.type) && field?.enabled && field?.required_with_guest &&
354
+ .filter((field: any) => (field?.order_type_id === options?.type) && field?.enabled && field?.required_with_guest &&
355
355
  !notFields.includes(field?.validation_field?.code) &&
356
356
  field?.validation_field?.code !== 'email' &&
357
357
  userSelected && !userSelected[field?.validation_field?.code])
358
- const requiredFieldsCode = _requiredFields.map((item : any) => item?.validation_field?.code)
359
- const guestCheckoutCellPhone = checkoutFieldsState?.fields?.find((field : any) => field.order_type_id === options?.type && field?.validation_field?.code === 'mobile_phone')
360
- const guestCheckoutEmail = checkoutFieldsState?.fields?.find((field : any) => field.order_type_id === options?.type && field?.validation_field?.code === 'email')
358
+ const requiredFieldsCode = _requiredFields.map((item: any) => item?.validation_field?.code)
359
+ const guestCheckoutCellPhone = checkoutFieldsState?.fields?.find((field: any) => field.order_type_id === options?.type && field?.validation_field?.code === 'mobile_phone')
360
+ const guestCheckoutEmail = checkoutFieldsState?.fields?.find((field: any) => field.order_type_id === options?.type && field?.validation_field?.code === 'email')
361
361
  if (
362
362
  userSelected &&
363
363
  !userSelected?.guest_cellphone &&
@@ -185,7 +185,7 @@ export const UserFormDetailsUI = (props: any) => {
185
185
  formState.changes?.cellphone === null &&
186
186
  ((validationFields?.fields?.checkout?.cellphone?.enabled &&
187
187
  validationFields?.fields?.checkout?.cellphone?.required) ||
188
- configs?.verification_phone_required?.value === '1')
188
+ (configs?.verification_phone_required?.value === '1' && !user?.guest_id))
189
189
  ) {
190
190
  content = content + `${t('VALIDATION_ERROR_MOBILE_PHONE_REQUIRED', 'The field Phone Number is required.',)}\n`
191
191
  showToast(ToastType.Error, content);