ordering-ui-external 14.0.6 → 14.0.7
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/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +5 -4
- package/_modules/themes/five/src/components/OrderDetails/index.js +32 -8
- package/_modules/themes/five/src/components/OrderDetails/layouts/Starbucks/HeaderContent.js +157 -0
- package/_modules/themes/five/src/components/OrderDetails/layouts/Starbucks/index.js +12 -0
- package/_modules/themes/five/src/components/OrderDetails/layouts/Starbucks/styles.js +37 -0
- package/_modules/themes/five/src/components/ReviewDriver/layouts/Simple/index.js +240 -0
- package/_modules/themes/five/src/components/ReviewDriver/layouts/Simple/styles.js +58 -0
- package/_modules/themes/five/src/components/ReviewOrder/layouts/Simple/index.js +247 -0
- package/_modules/themes/five/src/components/ReviewOrder/layouts/Simple/styles.js +59 -0
- package/index-template.js +11 -1
- package/package.json +1 -1
- package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +190 -185
- package/src/themes/five/src/components/OrderDetails/index.js +257 -216
- package/src/themes/five/src/components/OrderDetails/layouts/Starbucks/HeaderContent.js +168 -0
- package/src/themes/five/src/components/OrderDetails/layouts/Starbucks/index.js +7 -0
- package/src/themes/five/src/components/OrderDetails/layouts/Starbucks/styles.js +148 -0
- package/src/themes/five/src/components/ReviewDriver/layouts/Simple/index.js +205 -0
- package/src/themes/five/src/components/ReviewDriver/layouts/Simple/styles.js +163 -0
- package/src/themes/five/src/components/ReviewOrder/layouts/Simple/index.js +211 -0
- package/src/themes/five/src/components/ReviewOrder/layouts/Simple/styles.js +173 -0
- package/template/assets/icons/delivered.png +0 -0
- package/template/assets/icons/driver.png +0 -0
- package/template/assets/icons/home.png +0 -0
- package/template/assets/icons/store.png +0 -0
|
@@ -31,6 +31,7 @@ import { PlaceSpot } from '../PlaceSpot'
|
|
|
31
31
|
import { SendGiftCard } from '../GiftCard/SendGiftCard'
|
|
32
32
|
import { Confirm } from '../Confirm'
|
|
33
33
|
import { OrderEta } from './OrderEta'
|
|
34
|
+
import { HeaderContent as HeaderContentTwo } from './layouts/Starbucks'
|
|
34
35
|
|
|
35
36
|
import {
|
|
36
37
|
Container,
|
|
@@ -132,6 +133,7 @@ const OrderDetailsUI = (props) => {
|
|
|
132
133
|
const preorderStatus = [0, 13]
|
|
133
134
|
const googleMapsApiKey = configs?.google_maps_api_key?.value
|
|
134
135
|
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
136
|
+
const showStarbucksHeader = configs?.alternative_confirmation_page?.value === '1'
|
|
135
137
|
const changeIdToExternalId = configs?.change_order_id?.value === '1'
|
|
136
138
|
const cateringTypes = [7, 8]
|
|
137
139
|
const deliveryTypes = [1, 7]
|
|
@@ -398,227 +400,252 @@ const OrderDetailsUI = (props) => {
|
|
|
398
400
|
{!loading && order && Object.keys(order).length > 0 && !(openMessages.driver || openMessages.business) && (
|
|
399
401
|
<WrapperContainer>
|
|
400
402
|
<WrapperLeftContainer>
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
<
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
{
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
<
|
|
416
|
-
<
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
{
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
{!hideDeliveryDate && (
|
|
438
|
-
<>
|
|
439
|
-
{cateringTypes.includes(order?.delivery_type) && (
|
|
440
|
-
<p className='date'>
|
|
441
|
-
{t('CREATED_AT', 'Created at')}: {parseDate(order?.created_at)}
|
|
403
|
+
{!showStarbucksHeader && (
|
|
404
|
+
<>
|
|
405
|
+
<OrderInfo>
|
|
406
|
+
<TitleContainer>
|
|
407
|
+
<OrderIdSec>{isService ? t('APPOINTMENT', 'Appointment') : t('ORDER', theme?.defaultLanguages?.ORDER || 'Order')} {(changeIdToExternalId && order?.external_id) || `#${order?.id}`}</OrderIdSec>
|
|
408
|
+
{enabledPoweredByOrdering && (
|
|
409
|
+
<PoweredByOrdering>
|
|
410
|
+
{t('POWERED_BY', 'Powered by')}
|
|
411
|
+
<a href='https://www.ordering.co'>
|
|
412
|
+
{t('ORDERING_CO', 'Ordering.co')}
|
|
413
|
+
</a>
|
|
414
|
+
</PoweredByOrdering>
|
|
415
|
+
)}
|
|
416
|
+
{parseInt(configs?.guest_uuid_access?.value, 10) && order?.hash_key && (
|
|
417
|
+
<Content className='order-content'>
|
|
418
|
+
<ShareOrder>
|
|
419
|
+
<div className='wrap'>
|
|
420
|
+
<ProductShare
|
|
421
|
+
defaultUrl={urlToShare(order?.hash_key)}
|
|
422
|
+
product={{
|
|
423
|
+
images: order.business?.logo,
|
|
424
|
+
name: order.business?.name
|
|
425
|
+
}}
|
|
426
|
+
/>
|
|
427
|
+
</div>
|
|
428
|
+
</ShareOrder>
|
|
429
|
+
</Content>
|
|
430
|
+
)}
|
|
431
|
+
{!!order?.integration_id && (
|
|
432
|
+
<h1>{t('TICKET', 'Ticket')}: {order?.integration_id}</h1>
|
|
433
|
+
)}
|
|
434
|
+
{!hideDeliveryType && (
|
|
435
|
+
<p className='types'>
|
|
436
|
+
{isService
|
|
437
|
+
? t('SERVICE_AT_HOME', 'Service at home')
|
|
438
|
+
: orderTypes?.find(type => order?.delivery_type === type?.value)?.text}
|
|
442
439
|
</p>
|
|
443
440
|
)}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
) : (
|
|
450
|
-
parseDate(order?.reporting_data?.at[`status:${order.status}`], { outputFormat: `YYYY-MM-DD ${configs?.general_hour_format?.value}` })
|
|
451
|
-
)}
|
|
452
|
-
</p>
|
|
453
|
-
</>
|
|
454
|
-
)}
|
|
455
|
-
{(acceptedStatus.includes(parseInt(order?.status, 10)) ||
|
|
456
|
-
!isOriginalLayout
|
|
457
|
-
) && !isGiftCardOrder &&
|
|
458
|
-
(
|
|
459
|
-
<ReOrder>
|
|
460
|
-
<Button
|
|
461
|
-
color='primary'
|
|
462
|
-
outline
|
|
463
|
-
onClick={() => handleStartNewOrder(order.id)}
|
|
464
|
-
disabled={reorderState?.loading}
|
|
465
|
-
>
|
|
466
|
-
{t('START_NEW_ORDER', 'Start new order')}
|
|
467
|
-
</Button>
|
|
468
|
-
{completedStatus.includes(parseInt(order?.status, 10)) && (
|
|
469
|
-
<Button
|
|
470
|
-
color='primary'
|
|
471
|
-
outline
|
|
472
|
-
onClick={() => handleClickReorder(order)}
|
|
473
|
-
disabled={reorderState?.loading}
|
|
474
|
-
>
|
|
475
|
-
{reorderState?.loading
|
|
476
|
-
? t('LOADING', 'Loading...')
|
|
477
|
-
: t('REORDER', 'Reorder')}
|
|
478
|
-
</Button>
|
|
479
|
-
)}
|
|
480
|
-
</ReOrder>
|
|
481
|
-
)}
|
|
482
|
-
</TitleContainer>
|
|
483
|
-
{props.isCustomerMode && !!order?.debug_payment_response?.message && (
|
|
484
|
-
<div id='error-subs'>
|
|
485
|
-
<ValidationText>
|
|
486
|
-
<ExclamationTriangleIcon />
|
|
487
|
-
<span>{order?.debug_payment_response?.message}</span>
|
|
488
|
-
</ValidationText>
|
|
489
|
-
</div>
|
|
490
|
-
)}
|
|
491
|
-
{!hideDeliveryProgress && !isGiftCardOrder && (
|
|
492
|
-
<>
|
|
493
|
-
<StatusBar percentage={progressBarObjt(order?.status)?.percentage} />
|
|
494
|
-
<OrderStatusAndLinkContainer>
|
|
495
|
-
<p className='order-status'>{progressBarObjt(order?.status)?.value}</p>
|
|
496
|
-
<LinkWrapper>
|
|
497
|
-
<ReviewOrderLink
|
|
498
|
-
active
|
|
499
|
-
isMargin
|
|
500
|
-
>
|
|
501
|
-
<span onClick={() => setIsOrderHistory(true)}>{t('VIEW_DETAILS', 'View details')}</span>
|
|
502
|
-
</ReviewOrderLink>
|
|
503
|
-
{(!props.isCustomerMode || (props.isCustomerMode && !!props.hashKey && !token)) && (
|
|
504
|
-
<ReviewOrderLink
|
|
505
|
-
className='Review-order'
|
|
506
|
-
active={
|
|
507
|
-
[...acceptedStatus, 16].includes(parseInt(order?.status, 10)) &&
|
|
508
|
-
(!order?.review || (order.driver && !order?.user_review)) &&
|
|
509
|
-
(!isOrderReviewed || !isProductReviewed || (isService && !isProReviewed) || !isDriverReviewed)
|
|
510
|
-
}
|
|
511
|
-
>
|
|
512
|
-
<span onClick={handleOpenReview}>{t('REVIEW_ORDER', theme?.defaultLanguages?.REVIEW_ORDER || 'Review your Order')}</span>
|
|
513
|
-
</ReviewOrderLink>
|
|
514
|
-
)}
|
|
515
|
-
</LinkWrapper>
|
|
516
|
-
</OrderStatusAndLinkContainer>
|
|
517
|
-
</>
|
|
518
|
-
)}
|
|
519
|
-
</OrderInfo>
|
|
520
|
-
{!isGiftCardOrder && (
|
|
521
|
-
<OrderBusiness>
|
|
522
|
-
<BusinessExternalWrapper>
|
|
523
|
-
<BusinessWrapper
|
|
524
|
-
w='calc(100% - 20px)'
|
|
525
|
-
borderTop={!hideDeliveryType && placeSpotTypes.includes(order?.delivery_type)}
|
|
526
|
-
>
|
|
527
|
-
{isShowBusinessLogo && <img src={order?.business?.logo} />}
|
|
528
|
-
<BusinessInfo>
|
|
529
|
-
<h2>{order?.business?.name}</h2>
|
|
530
|
-
<ActionsSection
|
|
531
|
-
{...ActionsSectionProps}
|
|
532
|
-
actionType='business'
|
|
533
|
-
showPhone={!hideBusinessPhone}
|
|
534
|
-
showMessages={!hideBusinessMessages}
|
|
535
|
-
/>
|
|
536
|
-
{!hideBusinessEmail && (
|
|
537
|
-
<p>{order?.business?.email}</p>
|
|
538
|
-
)}
|
|
539
|
-
{!hideBusinessPhone && (
|
|
540
|
-
<p>{order?.business?.cellphone}</p>
|
|
541
|
-
)}
|
|
542
|
-
{!hideBusinessAddress && (
|
|
543
|
-
<p>{order?.business?.address}</p>
|
|
544
|
-
)}
|
|
545
|
-
{order?.place?.name && (
|
|
546
|
-
<PlaceSpotSection>
|
|
547
|
-
<p>
|
|
548
|
-
{yourSpotString}: {order?.place?.name}
|
|
441
|
+
{!hideDeliveryDate && (
|
|
442
|
+
<>
|
|
443
|
+
{cateringTypes.includes(order?.delivery_type) && (
|
|
444
|
+
<p className='date'>
|
|
445
|
+
{t('CREATED_AT', 'Created at')}: {parseDate(order?.created_at)}
|
|
549
446
|
</p>
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
447
|
+
)}
|
|
448
|
+
<p className='date'>
|
|
449
|
+
{activeStatus.includes(order?.status) ? (
|
|
450
|
+
<>
|
|
451
|
+
{cateringTypes.includes(order?.delivery_type) ? `${t('PLACED_TO', 'Placed to')}:` : ''} <OrderEta order={order} outputFormat={`YYYY-MM-DD ${configs?.general_hour_format?.value}`} />
|
|
452
|
+
</>
|
|
453
|
+
) : (
|
|
454
|
+
parseDate(order?.reporting_data?.at[`status:${order.status}`], { outputFormat: `YYYY-MM-DD ${configs?.general_hour_format?.value}` })
|
|
455
|
+
)}
|
|
456
|
+
</p>
|
|
457
|
+
</>
|
|
458
|
+
)}
|
|
459
|
+
{(acceptedStatus.includes(parseInt(order?.status, 10)) ||
|
|
460
|
+
!isOriginalLayout
|
|
461
|
+
) && !isGiftCardOrder &&
|
|
462
|
+
(
|
|
463
|
+
<ReOrder>
|
|
554
464
|
<Button
|
|
555
465
|
color='primary'
|
|
556
|
-
|
|
466
|
+
outline
|
|
467
|
+
onClick={() => handleStartNewOrder(order.id)}
|
|
468
|
+
disabled={reorderState?.loading}
|
|
557
469
|
>
|
|
558
|
-
{t('
|
|
470
|
+
{t('START_NEW_ORDER', 'Start new order')}
|
|
559
471
|
</Button>
|
|
560
|
-
|
|
472
|
+
{completedStatus.includes(parseInt(order?.status, 10)) && (
|
|
473
|
+
<Button
|
|
474
|
+
color='primary'
|
|
475
|
+
outline
|
|
476
|
+
onClick={() => handleClickReorder(order)}
|
|
477
|
+
disabled={reorderState?.loading}
|
|
478
|
+
>
|
|
479
|
+
{reorderState?.loading
|
|
480
|
+
? t('LOADING', 'Loading...')
|
|
481
|
+
: t('REORDER', 'Reorder')}
|
|
482
|
+
</Button>
|
|
483
|
+
)}
|
|
484
|
+
</ReOrder>
|
|
561
485
|
)}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
<
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
onClick={() => handleChangeOrderStatus(21)}
|
|
486
|
+
</TitleContainer>
|
|
487
|
+
{props.isCustomerMode && !!order?.debug_payment_response?.message && (
|
|
488
|
+
<div id='error-subs'>
|
|
489
|
+
<ValidationText>
|
|
490
|
+
<ExclamationTriangleIcon />
|
|
491
|
+
<span>{order?.debug_payment_response?.message}</span>
|
|
492
|
+
</ValidationText>
|
|
493
|
+
</div>
|
|
494
|
+
)}
|
|
495
|
+
{!hideDeliveryProgress && !isGiftCardOrder && (
|
|
496
|
+
<>
|
|
497
|
+
<StatusBar percentage={progressBarObjt(order?.status)?.percentage} />
|
|
498
|
+
<OrderStatusAndLinkContainer>
|
|
499
|
+
<p className='order-status'>{progressBarObjt(order?.status)?.value}</p>
|
|
500
|
+
<LinkWrapper>
|
|
501
|
+
<ReviewOrderLink
|
|
502
|
+
active
|
|
503
|
+
isMargin
|
|
581
504
|
>
|
|
582
|
-
{
|
|
583
|
-
</
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
505
|
+
<span onClick={() => setIsOrderHistory(true)}>{t('VIEW_DETAILS', 'View details')}</span>
|
|
506
|
+
</ReviewOrderLink>
|
|
507
|
+
{(!props.isCustomerMode || (props.isCustomerMode && !!props.hashKey && !token)) && (
|
|
508
|
+
<ReviewOrderLink
|
|
509
|
+
className='Review-order'
|
|
510
|
+
active={
|
|
511
|
+
[...acceptedStatus, 16].includes(parseInt(order?.status, 10)) &&
|
|
512
|
+
(!order?.review || (order.driver && !order?.user_review)) &&
|
|
513
|
+
(!isOrderReviewed || !isProductReviewed || (isService && !isProReviewed) || !isDriverReviewed)
|
|
514
|
+
}
|
|
515
|
+
>
|
|
516
|
+
<span onClick={handleOpenReview}>{t('REVIEW_ORDER', theme?.defaultLanguages?.REVIEW_ORDER || 'Review your Order')}</span>
|
|
517
|
+
</ReviewOrderLink>
|
|
518
|
+
)}
|
|
519
|
+
</LinkWrapper>
|
|
520
|
+
</OrderStatusAndLinkContainer>
|
|
521
|
+
</>
|
|
598
522
|
)}
|
|
599
|
-
</
|
|
600
|
-
{
|
|
601
|
-
<
|
|
602
|
-
<
|
|
603
|
-
<
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
523
|
+
</OrderInfo>
|
|
524
|
+
{!isGiftCardOrder && (
|
|
525
|
+
<OrderBusiness>
|
|
526
|
+
<BusinessExternalWrapper>
|
|
527
|
+
<BusinessWrapper
|
|
528
|
+
w='calc(100% - 20px)'
|
|
529
|
+
borderTop={!hideDeliveryType && placeSpotTypes.includes(order?.delivery_type)}
|
|
530
|
+
>
|
|
531
|
+
{isShowBusinessLogo && <img src={order?.business?.logo} />}
|
|
532
|
+
<BusinessInfo>
|
|
533
|
+
<h2>{order?.business?.name}</h2>
|
|
534
|
+
<ActionsSection
|
|
535
|
+
{...ActionsSectionProps}
|
|
536
|
+
actionType='business'
|
|
537
|
+
showPhone={!hideBusinessPhone}
|
|
538
|
+
showMessages={!hideBusinessMessages}
|
|
539
|
+
/>
|
|
540
|
+
{!hideBusinessEmail && (
|
|
541
|
+
<p>{order?.business?.email}</p>
|
|
542
|
+
)}
|
|
543
|
+
{!hideBusinessPhone && (
|
|
544
|
+
<p>{order?.business?.cellphone}</p>
|
|
545
|
+
)}
|
|
546
|
+
{!hideBusinessAddress && (
|
|
547
|
+
<p>{order?.business?.address}</p>
|
|
548
|
+
)}
|
|
549
|
+
{order?.place?.name && (
|
|
550
|
+
<PlaceSpotSection>
|
|
551
|
+
<p>
|
|
552
|
+
{yourSpotString}: {order?.place?.name}
|
|
553
|
+
</p>
|
|
554
|
+
</PlaceSpotSection>
|
|
555
|
+
)}
|
|
556
|
+
{!hideOrderActions && (
|
|
557
|
+
<DirectionButtonWrapper>
|
|
558
|
+
<Button
|
|
559
|
+
color='primary'
|
|
560
|
+
onClick={() => window.open(`http://maps.google.com/?q=${order?.business?.address}`)}
|
|
561
|
+
>
|
|
562
|
+
{t('GET_DIRECTIONS', 'Get Directions')}
|
|
563
|
+
</Button>
|
|
564
|
+
</DirectionButtonWrapper>
|
|
565
|
+
)}
|
|
566
|
+
</BusinessInfo>
|
|
567
|
+
{!hideOrderActions && !preorderStatus.includes(order?.status) && (
|
|
568
|
+
<BtsOrderStatus>
|
|
569
|
+
<div>
|
|
570
|
+
<Button
|
|
571
|
+
style={{ fontSize: 14 }}
|
|
572
|
+
color={order?.status === 20 ? 'secundary' : 'primary'}
|
|
573
|
+
onClick={() => handleChangeOrderStatus(20)}
|
|
574
|
+
disabled={disableLeftButton.includes(order?.status)}
|
|
575
|
+
>
|
|
576
|
+
{progressBarObjt(20)?.value}
|
|
577
|
+
</Button>
|
|
578
|
+
</div>
|
|
579
|
+
<div>
|
|
580
|
+
<Button
|
|
581
|
+
style={{ fontSize: 14 }}
|
|
582
|
+
color={order?.status === 20 ? 'primary' : 'secundary'}
|
|
583
|
+
disabled={disableRightButton.includes(order?.status)}
|
|
584
|
+
onClick={() => handleChangeOrderStatus(21)}
|
|
585
|
+
>
|
|
586
|
+
{progressBarObjt(21)?.value}
|
|
587
|
+
</Button>
|
|
588
|
+
</div>
|
|
589
|
+
</BtsOrderStatus>
|
|
590
|
+
)}
|
|
591
|
+
</BusinessWrapper>
|
|
592
|
+
|
|
593
|
+
{!hideDeliveryType && placeSpotTypes.includes(order?.delivery_type) && (
|
|
594
|
+
<PlaceSpotWrapper>
|
|
595
|
+
<PlaceSpot
|
|
596
|
+
isInputMode
|
|
597
|
+
cart={order}
|
|
598
|
+
spotNumberDefault={order?.spot_number}
|
|
599
|
+
vehicleDefault={order?.vehicle}
|
|
600
|
+
/>
|
|
601
|
+
</PlaceSpotWrapper>
|
|
602
|
+
)}
|
|
603
|
+
</BusinessExternalWrapper>
|
|
604
|
+
{googleMapsApiKey && !hideBusinessMap && (
|
|
605
|
+
<MapWrapper>
|
|
606
|
+
<Map style={{ width: '100%' }}>
|
|
607
|
+
<img
|
|
608
|
+
src={getGoogleMapImage(order?.business?.location, googleMapsApiKey, mapConfigs)}
|
|
609
|
+
id='google-maps-image'
|
|
610
|
+
alt='google-maps-location'
|
|
611
|
+
width='100%'
|
|
612
|
+
height='100%'
|
|
613
|
+
loading='lazy'
|
|
614
|
+
/>
|
|
615
|
+
</Map>
|
|
616
|
+
</MapWrapper>
|
|
617
|
+
)}
|
|
618
|
+
</OrderBusiness>
|
|
613
619
|
)}
|
|
614
|
-
|
|
620
|
+
</>
|
|
621
|
+
)}
|
|
622
|
+
{showStarbucksHeader && (
|
|
623
|
+
<HeaderContentTwo
|
|
624
|
+
order={order}
|
|
625
|
+
hashKey={props.hashKey}
|
|
626
|
+
googleMapsUrl={
|
|
627
|
+
googleMapsApiKey &&
|
|
628
|
+
!validTrackingStatus.includes(parseInt(order?.status)) &&
|
|
629
|
+
getGoogleMapImage(order?.business?.location, googleMapsApiKey, mapConfigs)
|
|
630
|
+
}
|
|
631
|
+
changeIdToExternalId={changeIdToExternalId}
|
|
632
|
+
enabledPoweredByOrdering={enabledPoweredByOrdering}
|
|
633
|
+
orderStatus={progressBarObjt(order?.status)?.value}
|
|
634
|
+
percentage={progressBarObjt(order?.status)?.percentage}
|
|
635
|
+
orderId={{ id: order?.id, external: order?.external_id }}
|
|
636
|
+
showReview={
|
|
637
|
+
[...acceptedStatus, 16].includes(parseInt(order?.status, 10)) &&
|
|
638
|
+
(!order?.review || (order.driver && !order?.user_review)) &&
|
|
639
|
+
(!isOrderReviewed || !isDriverReviewed)
|
|
640
|
+
}
|
|
641
|
+
/>
|
|
615
642
|
)}
|
|
616
643
|
<OrderCustomer>
|
|
617
|
-
<
|
|
644
|
+
<WrapperDriver>
|
|
618
645
|
{!hideCustomerPhoto && order?.customer?.photo && (
|
|
619
|
-
<
|
|
646
|
+
<PhotoBlock src={order?.customer?.photo} />
|
|
620
647
|
)}
|
|
621
|
-
<
|
|
648
|
+
<div>
|
|
622
649
|
<p>{order?.customer?.name} {order?.customer?.lastname}</p>
|
|
623
650
|
{!hideCustomerEmail && (
|
|
624
651
|
<p>{order?.customer?.email}</p>
|
|
@@ -629,8 +656,8 @@ const OrderDetailsUI = (props) => {
|
|
|
629
656
|
{!hideCustomerAddress && (
|
|
630
657
|
<p>{order?.customer?.address}</p>
|
|
631
658
|
)}
|
|
632
|
-
</
|
|
633
|
-
</
|
|
659
|
+
</div>
|
|
660
|
+
</WrapperDriver>
|
|
634
661
|
</OrderCustomer>
|
|
635
662
|
{order?.driver && (
|
|
636
663
|
<>
|
|
@@ -688,7 +715,7 @@ const OrderDetailsUI = (props) => {
|
|
|
688
715
|
}
|
|
689
716
|
</>
|
|
690
717
|
)}
|
|
691
|
-
{(deliveryTypes?.includes(order?.delivery_type) || order?.comment) && !isGiftCardOrder && (
|
|
718
|
+
{(deliveryTypes?.includes(order?.delivery_type) || order?.comment) && !isGiftCardOrder && !showStarbucksHeader && (
|
|
692
719
|
<OrderPreferences>
|
|
693
720
|
<OrderPreferencesSection
|
|
694
721
|
order={order}
|
|
@@ -700,17 +727,31 @@ const OrderDetailsUI = (props) => {
|
|
|
700
727
|
<WrapperRightContainer>
|
|
701
728
|
<OrderProducts>
|
|
702
729
|
<HeaderTitle>
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
730
|
+
{!showStarbucksHeader ? (
|
|
731
|
+
<>
|
|
732
|
+
<OrderHeaderInfoSection isService={isService} />
|
|
733
|
+
<OrderActionsSection
|
|
734
|
+
userCustomerId={userCustomerId}
|
|
735
|
+
isService={isService}
|
|
736
|
+
handleGoToPage={handleGoToPage}
|
|
737
|
+
/>
|
|
738
|
+
</>
|
|
739
|
+
) : (
|
|
740
|
+
<div
|
|
741
|
+
style={{ display: 'flex', flexDirection: 'column' }}
|
|
742
|
+
>
|
|
743
|
+
<OrderPreferencesSection
|
|
744
|
+
order={order}
|
|
745
|
+
placeSpotTypes={placeSpotTypes}
|
|
746
|
+
/>
|
|
747
|
+
</div>
|
|
748
|
+
)}
|
|
709
749
|
</HeaderTitle>
|
|
710
|
-
{sortedProductList}
|
|
750
|
+
{!showStarbucksHeader && sortedProductList}
|
|
711
751
|
<OrderBillSection
|
|
712
752
|
order={order}
|
|
713
753
|
setOpenTaxModal={setOpenTaxModal}
|
|
754
|
+
showOnlyTotals={showStarbucksHeader}
|
|
714
755
|
/>
|
|
715
756
|
</OrderProducts>
|
|
716
757
|
</WrapperRightContainer>
|