ordering-ui-react-native 0.12.37 → 0.12.38

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.12.37",
3
+ "version": "0.12.38",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -270,7 +270,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
270
270
  />
271
271
  </Pickup>
272
272
  )}
273
- {(order?.status === 3) && order?.delivery_type === 1 && (
273
+ {order?.status === 3 && order?.delivery_type === 1 && (
274
274
  <View style={{ paddingVertical: 20, marginBottom: 20 }}>
275
275
  <OButton
276
276
  style={styles.btnPickUp}
@@ -285,67 +285,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
285
285
  </View>
286
286
  )}
287
287
  </>
288
-
289
- <OModal
290
- open={openModalForBusiness}
291
- order={order}
292
- title={`${t('INVOICE_ORDER_NO', 'Order No.')} ${order.id}`}
293
- entireModal
294
- onClose={() => handleCloseModal()}>
295
- <Chat
296
- type={
297
- openModalForBusiness ? USER_TYPE.BUSINESS : USER_TYPE.DRIVER
298
- }
299
- orderId={order?.id}
300
- messages={messages}
301
- order={order}
302
- setMessages={setMessages}
303
- />
304
- </OModal>
305
-
306
- <OModal
307
- open={openModalForAccept}
308
- onClose={() => setOpenModalForAccept(false)}
309
- entireModal
310
- customClose>
311
- <AcceptOrRejectOrder
312
- handleUpdateOrder={handleChangeOrderStatus}
313
- closeModal={setOpenModalForAccept}
314
- customerCellphone={order?.customer?.cellphone}
315
- loading={props.order?.loading}
316
- action={actionOrder}
317
- orderId={order?.id}
318
- notShowCustomerPhone
319
- actions={actions}
320
- orderTitle={orderTitle}
321
- appTitle={appTitle}
322
- />
323
- </OModal>
324
-
325
- <OModal
326
- open={openModalForMapView}
327
- onClose={() => handleOpenMapView()}
328
- entireModal
329
- customClose>
330
- <DriverMap
331
- navigation={navigation}
332
- order={order}
333
- orderStatus={getOrderStatus(order?.status, t)?.value || ''}
334
- location={locationMarker}
335
- readOnly
336
- updateDriverPosition={updateDriverPosition}
337
- driverUpdateLocation={driverUpdateLocation}
338
- setDriverUpdateLocation={setDriverUpdateLocation}
339
- handleViewActionOrder={handleViewActionOrder}
340
- isBusinessMarker={isBusinessMarker}
341
- isToFollow={isToFollow}
342
- showAcceptOrReject={
343
- showFloatButtonsAcceptOrReject[order?.status]
344
- }
345
- handleOpenMapView={handleOpenMapView}
346
- />
347
- </OModal>
348
-
349
288
  <View
350
289
  style={{
351
290
  height:
@@ -458,6 +397,69 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
458
397
  )}
459
398
  </>
460
399
  )}
400
+ {openModalForMapView && (
401
+ <OModal
402
+ open={openModalForMapView}
403
+ onClose={() => handleOpenMapView()}
404
+ entireModal
405
+ customClose>
406
+ <DriverMap
407
+ navigation={navigation}
408
+ order={order}
409
+ orderStatus={getOrderStatus(order?.status, t)?.value || ''}
410
+ location={locationMarker}
411
+ readOnly
412
+ updateDriverPosition={updateDriverPosition}
413
+ driverUpdateLocation={driverUpdateLocation}
414
+ setDriverUpdateLocation={setDriverUpdateLocation}
415
+ handleViewActionOrder={handleViewActionOrder}
416
+ isBusinessMarker={isBusinessMarker}
417
+ isToFollow={isToFollow}
418
+ showAcceptOrReject={
419
+ showFloatButtonsAcceptOrReject[order?.status]
420
+ }
421
+ handleOpenMapView={handleOpenMapView}
422
+ />
423
+ </OModal>
424
+ )}
425
+ {openModalForBusiness && (
426
+ <OModal
427
+ open={openModalForBusiness}
428
+ order={order}
429
+ title={`${t('INVOICE_ORDER_NO', 'Order No.')} ${order.id}`}
430
+ entireModal
431
+ onClose={() => handleCloseModal()}>
432
+ <Chat
433
+ type={
434
+ openModalForBusiness ? USER_TYPE.BUSINESS : USER_TYPE.DRIVER
435
+ }
436
+ orderId={order?.id}
437
+ messages={messages}
438
+ order={order}
439
+ setMessages={setMessages}
440
+ />
441
+ </OModal>
442
+ )}
443
+ {openModalForAccept && (
444
+ <OModal
445
+ open={openModalForAccept}
446
+ onClose={() => setOpenModalForAccept(false)}
447
+ entireModal
448
+ customClose>
449
+ <AcceptOrRejectOrder
450
+ handleUpdateOrder={handleChangeOrderStatus}
451
+ closeModal={setOpenModalForAccept}
452
+ customerCellphone={order?.customer?.cellphone}
453
+ loading={props.order?.loading}
454
+ action={actionOrder}
455
+ orderId={order?.id}
456
+ notShowCustomerPhone
457
+ actions={actions}
458
+ orderTitle={orderTitle}
459
+ appTitle={appTitle}
460
+ />
461
+ </OModal>
462
+ )}
461
463
  </View>
462
464
  {alertState?.open && (
463
465
  <Alert
@@ -526,9 +526,9 @@ export interface TagsParams {
526
526
  interface actions {
527
527
  accept: string;
528
528
  reject: string;
529
- pickupFailed: string;
530
- deliveryFailed: string;
531
- notReady: string;
529
+ pickupFailed?: string;
530
+ deliveryFailed?: string;
531
+ notReady?: string;
532
532
  }
533
533
 
534
534
  interface textTranslate {