ordering-ui-react-native 0.14.14 → 0.14.18

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.14.14",
3
+ "version": "0.14.18",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -55,7 +55,7 @@
55
55
  "@types/styled-components": "^5.1.3",
56
56
  "axios": "^0.21.0",
57
57
  "moment": "^2.29.1",
58
- "ordering-components": "github:Ordering-Inc/ordering-components#development",
58
+ "ordering-components": "github:Ordering-Inc/ordering-components#release",
59
59
  "patch-package": "^6.4.7",
60
60
  "postinstall-postinstall": "^2.1.0",
61
61
  "prop-types": "^15.7.2",
@@ -26,6 +26,7 @@ const NewOrderNotificationUI = (props: any) => {
26
26
  const [messageOrderId, setMessageOrderId] = useState(null)
27
27
  const [soundTimeout, setSoundTimeout] = useState<any>(null)
28
28
  const [isFocused, setIsFocused] = useState(false)
29
+ const [currentChange, setCurrentChange] = useState(1)
29
30
 
30
31
  const notificationSound = new Sound(theme.sounds.notification, error => {
31
32
  if (error) {
@@ -64,6 +65,7 @@ const NewOrderNotificationUI = (props: any) => {
64
65
  const handleNotification = (order: any) => {
65
66
  setModalOpen(true)
66
67
  clearInterval(soundTimeout)
68
+ setCurrentChange(1)
67
69
  handlePlayNotificationSound()
68
70
  setNewOrderId(order.id)
69
71
  }
@@ -72,6 +74,7 @@ const NewOrderNotificationUI = (props: any) => {
72
74
  const { order_id: orderId } = message;
73
75
  if (!modalOpen) setModalOpen(true)
74
76
  clearInterval(soundTimeout)
77
+ setCurrentChange(2)
75
78
  handlePlayNotificationSound()
76
79
  setMessageOrderId(orderId)
77
80
  }
@@ -154,14 +157,14 @@ const NewOrderNotificationUI = (props: any) => {
154
157
  color={theme.colors.textGray}
155
158
  weight={600}
156
159
  >
157
- {t('NEW_ORDRES_RECEIVED', 'New orders have been received!')}
160
+ {currentChange === 1 ? t('NEW_ORDRES_RECEIVED', 'New orders have been received!') : t('NEW_MESSAGES_RECEIVED', 'New messages have been received!')}
158
161
  </OText>
159
162
  <OIcon
160
163
  src={theme.images.general.newOrder}
161
164
  width={250}
162
165
  height={200}
163
166
  />
164
- {newOrderId && (
167
+ {newOrderId !== null && (
165
168
  <OText
166
169
  color={theme.colors.textGray}
167
170
  mBottom={15}
@@ -170,7 +173,7 @@ const NewOrderNotificationUI = (props: any) => {
170
173
  </OText>
171
174
  )}
172
175
 
173
- {messageOrderId && (
176
+ {messageOrderId !== null && (
174
177
  <OText
175
178
  color={theme.colors.textGray}
176
179
  mBottom={15}
@@ -81,7 +81,7 @@ const BusinessMenuListUI = (props: BusinessMenuListParams) => {
81
81
  dropdownStyle={{
82
82
  borderRadius: 8,
83
83
  borderColor: theme.colors.lightGray,
84
- marginTop: Platform.OS === 'ios' ? 0 : -15,
84
+ marginTop: Platform.OS === 'ios' ? 12 : -15,
85
85
  maxHeight: 160
86
86
  }}
87
87
  rowStyle={{
@@ -335,7 +335,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
335
335
  dropdownStyle={{
336
336
  borderRadius: 8,
337
337
  borderColor: theme.colors.lightGray,
338
- marginTop: Platform.OS === 'ios' ? 0 : -15
338
+ marginTop: Platform.OS === 'ios' ? 12 : -15
339
339
  }}
340
340
  rowStyle={{
341
341
  borderBottomColor: theme.colors.backgroundGray100,
@@ -227,7 +227,7 @@ const BusinessReviewsUI = (props: BusinessReviewsParams) => {
227
227
  </PrincipalWrapView>
228
228
 
229
229
  {reviewsList?.reviews
230
- .filter((review: any) => searchReview !== '' ? review.comment?.toLowerCase()?.includes(searchReview) : true)
230
+ .filter((review: any) => searchReview !== '' ? review.comment?.toLowerCase()?.includes(searchReview?.toLowerCase()) : true)
231
231
  .map((review: any) => (
232
232
  <ReviewItem
233
233
  key={`review_key_${review.id}`}
@@ -266,7 +266,7 @@ const CartUI = (props: any) => {
266
266
  alignItems: 'flex-start',
267
267
  width: '100%',
268
268
  height: 100,
269
- borderColor: theme.colors.textSecondary,
269
+ borderColor: theme.colors.border,
270
270
  paddingRight: 50,
271
271
  marginTop: 10,
272
272
  borderRadius: 7.6
@@ -203,7 +203,7 @@ const OrderSummaryUI = (props: any) => {
203
203
  alignItems: 'flex-start',
204
204
  width: '100%',
205
205
  height: 100,
206
- borderColor: theme.colors.textSecondary,
206
+ borderColor: theme.colors.border,
207
207
  paddingRight: 50,
208
208
  marginTop: 10
209
209
  }}
@@ -213,7 +213,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
213
213
  {((isCartProduct && !isCartPending && product?.valid_menu && !product?.valid_quantity) ||
214
214
  (!product?.valid_menu && isCartProduct && !isCartPending)) && (
215
215
  <View style={{ alignItems: 'flex-end', width: '100%' }}>
216
- <OText size={18} color={theme.colors.red} style={{ textAlign: 'right', marginTop: 5 }}>
216
+ <OText size={14} color={theme.colors.red} style={{ textAlign: 'right', bottom: 20 }}>
217
217
  {t('NOT_AVAILABLE', 'Not available')}
218
218
  </OText>
219
219
  </View>