ordering-ui-react-native 0.15.53 → 0.15.54

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.15.53",
3
+ "version": "0.15.54",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -101,9 +101,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
101
101
  };
102
102
 
103
103
  const handleOpenMapView = async () => {
104
- if (permissions.locationStatus === 'granted') {
104
+ if (permissions?.locationStatus === 'granted') {
105
105
  setOpenModalForMapView(!openModalForMapView);
106
- } else if (permissions.locationStatus === 'blocked') {
106
+ } else if (permissions?.locationStatus === 'blocked') {
107
107
  // redirectToSettings();
108
108
  showToast(
109
109
  ToastType.Error,
@@ -141,9 +141,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
141
141
  handleArrowBack()
142
142
  }
143
143
 
144
- const handleAcceptLogisticOrder = (order : any) => {
144
+ const handleAcceptLogisticOrder = (order: any) => {
145
145
  handleClickLogisticOrder?.(1, order?.logistic_order_id)
146
- if(order?.order_group){
146
+ if (order?.order_group) {
147
147
  handleArrowBack()
148
148
  }
149
149
  }
@@ -166,10 +166,10 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
166
166
  ];
167
167
 
168
168
  useEffect(() => {
169
- if (permissions.locationStatus !== 'granted' && openModalForMapView) {
169
+ if (permissions?.locationStatus !== 'granted' && openModalForMapView) {
170
170
  setOpenModalForMapView(false);
171
171
  }
172
- }, [permissions.locationStatus]);
172
+ }, [permissions?.locationStatus]);
173
173
 
174
174
  useEffect(() => {
175
175
  if (openModalForAccept) {
@@ -215,8 +215,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
215
215
  }, [messagesReadList]);
216
216
 
217
217
  useEffect(() => {
218
- forceUpdate && handleViewActionOrder && handleViewActionOrder(forceUpdate === 9 ? 'forcePickUp': 'forceDelivery')
219
- },[forceUpdate])
218
+ forceUpdate && handleViewActionOrder && handleViewActionOrder(forceUpdate === 9 ? 'forcePickUp' : 'forceDelivery')
219
+ }, [forceUpdate])
220
220
 
221
221
  const styles = StyleSheet.create({
222
222
  btnPickUp: {
@@ -254,7 +254,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
254
254
  );
255
255
  }
256
256
 
257
- const OrderDetailsInformation = (props : {order: any, isOrderGroup?: boolean, lastOrder?: boolean}) => {
257
+ const OrderDetailsInformation = (props: { order: any, isOrderGroup?: boolean, lastOrder?: boolean }) => {
258
258
  const {
259
259
  order,
260
260
  isOrderGroup,
@@ -248,7 +248,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
248
248
  style={{ borderRadius: 7.6 }}
249
249
  />
250
250
  )}
251
- <OText>{openDescription?.description}</OText>
251
+ <OText mBottom={40}>{openDescription?.description}</OText>
252
252
  </ScrollView>
253
253
  </OModal>
254
254
  </ProductsContainer>
@@ -112,7 +112,7 @@ const OrderSummaryUI = (props: any) => {
112
112
  {cart?.products?.length > 0 && (
113
113
  <>
114
114
  <OSProductList>
115
- {cart?.products.map((product: any) => (
115
+ {cart?.products?.map((product: any) => (
116
116
  <ProductItemAccordion
117
117
  key={product.code}
118
118
  product={product}