ordering-ui-react-native 0.22.29 → 0.22.31

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.22.29",
3
+ "version": "0.22.31",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -165,14 +165,16 @@ const MapViewComponent = (props: MapViewParams) => {
165
165
  size={50}
166
166
  color={theme.colors.primary}
167
167
  />
168
- <View style={styles.view}>
169
- <OIcon
170
- style={styles.image}
171
- src={{ uri: customer ? marker?.customer?.photo : marker?.business?.logo }}
172
- width={25}
173
- height={25}
174
- />
175
- </View>
168
+ {(!!marker?.customer?.photo || !!marker?.business?.logo) && (
169
+ <View style={styles.view}>
170
+ <OIcon
171
+ style={styles.image}
172
+ src={{ uri: customer ? marker?.customer?.photo : marker?.business?.logo }}
173
+ width={25}
174
+ height={25}
175
+ />
176
+ </View>
177
+ )}
176
178
  <Callout
177
179
  onPress={() => !!orderIds && orderIds.toString().includes(',') ? onNavigationRedirect('Orders') : onNavigationRedirect('OrderDetails', { order: marker })}
178
180
  >
@@ -193,8 +195,8 @@ const MapViewComponent = (props: MapViewParams) => {
193
195
  {((customer && marker?.customer?.city?.address_notes) || !customer) && (
194
196
  <OText>{customer ? marker?.customer?.city?.address_notes : marker?.business?.city?.name}</OText>
195
197
  )}
196
- {((customer && marker?.business?.zipcode) || (!customer && marker?.business?.zipcode)) && (
197
- <OText>{customer ? marker?.customer?.zipcode : marker?.business?.zipcode}</OText>
198
+ {((customer && !!marker?.business?.zipcode) || (!customer && !!marker?.business?.zipcode)) && (
199
+ <OText>{customer ? marker?.customer?.zipcode ?? '' : marker?.business?.zipcode ?? ''}</OText>
198
200
  )}
199
201
  {customer && !!marker?.customer?.internal_number && (
200
202
  <OText>{marker?.customer?.internal_number}</OText>
@@ -121,7 +121,7 @@ export const OrderItem = React.memo((props: any) => {
121
121
  let restHours: string | number = Math.floor(restMinOfTargetedMin / 60)
122
122
  let restMins: string | number = restMinOfTargetedMin - 60 * restHours
123
123
  // make standard time format
124
- day = day === 0 ? '' : day + 'day '
124
+ day = day === 0 ? '' : `${day + ' ' + t('DAY', 'day') + ' '}`
125
125
  restHours = restHours < 10 ? '0' + restHours : restHours
126
126
  restMins = restMins < 10 ? '0' + restMins : restMins
127
127