ordering-ui-admin-external 1.8.5 → 1.10.0

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.
Files changed (158) hide show
  1. package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js → ordering-ui-admin.e741ec718656ba6908ef.js} +2 -2
  2. package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js.LICENSE.txt → ordering-ui-admin.e741ec718656ba6908ef.js.LICENSE.txt} +0 -0
  3. package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +2 -1
  4. package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +2 -1
  5. package/_modules/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +23 -5
  6. package/_modules/components/Delivery/DriversGroupDetails/index.js +6 -9
  7. package/_modules/components/Delivery/UsersList/index.js +2 -1
  8. package/_modules/components/MyProducts/OrderingWebsite/index.js +50 -8
  9. package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +2 -1
  10. package/_modules/components/Orders/OrderBill/index.js +17 -17
  11. package/_modules/components/Profile/ProfilePage/index.js +3 -1
  12. package/_modules/components/Profile/ProfilePage/styles.js +23 -6
  13. package/_modules/components/Settings/Deliverect/index.js +103 -0
  14. package/_modules/components/Settings/Deliverect/styles.js +115 -0
  15. package/_modules/components/Settings/DoordashConnect/index.js +1 -1
  16. package/_modules/components/Settings/IntegrationListing/index.js +41 -2
  17. package/_modules/components/Settings/IntegrationListing/styles.js +7 -4
  18. package/_modules/components/Settings/ItsaCheckmate/index.js +112 -0
  19. package/_modules/components/Settings/ItsaCheckmate/styles.js +118 -0
  20. package/_modules/components/Settings/PickerExpress/index.js +178 -0
  21. package/_modules/components/Settings/PickerExpress/styles.js +111 -0
  22. package/_modules/components/Settings/index.js +8 -1
  23. package/_modules/components/Shared/Modal/styles.js +1 -1
  24. package/_modules/components/SidebarMenu/index.js +14 -1
  25. package/_modules/components/SidebarMenu/styles.js +9 -3
  26. package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +95 -0
  27. package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +43 -0
  28. package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +233 -0
  29. package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +40 -0
  30. package/_modules/components/Stores/BusinessAdd/Images/index.js +181 -0
  31. package/_modules/components/Stores/BusinessAdd/Images/styles.js +42 -0
  32. package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +53 -0
  33. package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +31 -0
  34. package/_modules/components/Stores/BusinessAdd/OtherDetails/index.js +43 -0
  35. package/_modules/components/Stores/BusinessAdd/OtherDetails/styles.js +25 -0
  36. package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +48 -0
  37. package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +31 -0
  38. package/_modules/components/Stores/BusinessAdd/Photos/index.js +174 -0
  39. package/_modules/components/Stores/BusinessAdd/Photos/styles.js +46 -0
  40. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +48 -0
  41. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +24 -0
  42. package/_modules/components/Stores/BusinessAdd/Schedule/index.js +31 -0
  43. package/_modules/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
  44. package/_modules/components/Stores/BusinessAdd/index.js +170 -0
  45. package/_modules/components/Stores/BusinessAdd/styles.js +29 -0
  46. package/_modules/components/Stores/BusinessDeliveryDetails/styles.js +1 -1
  47. package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +4 -0
  48. package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
  49. package/_modules/components/Stores/BusinessPickupDetails/styles.js +1 -1
  50. package/_modules/components/Stores/BusinessProductAddForm/index.js +5 -5
  51. package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +1 -6
  52. package/_modules/components/Stores/BusinessProductsListing/index.js +38 -14
  53. package/_modules/components/Stores/BusinessesList/index.js +5 -3
  54. package/_modules/components/Stores/BusinessesListing/index.js +51 -26
  55. package/_modules/components/Stores/BusinessesListing/styles.js +22 -15
  56. package/_modules/components/Stores/BusinessesListingHeader/index.js +6 -5
  57. package/_modules/components/Stores/ProductStartGuide/index.js +69 -0
  58. package/_modules/components/Stores/ProductStartGuide/styles.js +28 -0
  59. package/_modules/components/Stores/ProductStep/index.js +92 -0
  60. package/_modules/components/Stores/ProductStep/styles.js +18 -0
  61. package/_modules/components/Stores/RestaurantSelectGuide/index.js +104 -0
  62. package/_modules/components/Stores/RestaurantSelectGuide/styles.js +44 -0
  63. package/_modules/components/Stores/index.js +36 -1
  64. package/_modules/components/Users/ProfessionalAddForm/index.js +16 -3
  65. package/_modules/components/Users/ProfessionalList/index.js +2 -1
  66. package/_modules/components/Users/ProfessionalListing/index.js +2 -0
  67. package/_modules/components/Users/ProfessionalSchedule/Schedule/index.js +36 -0
  68. package/_modules/components/Users/ProfessionalSchedule/index.js +10 -120
  69. package/_modules/components/Users/ProfessionalSchedule/styles.js +4 -16
  70. package/_modules/components/Users/UserFormDetails/index.js +1 -1
  71. package/_modules/components/Users/UsersList/index.js +5 -4
  72. package/_modules/components/Users/UsersListingHeader/index.js +5 -2
  73. package/_modules/components/Users/UsersListingHeader/styles.js +18 -3
  74. package/_modules/index.js +36 -0
  75. package/index-template.js +64 -2
  76. package/package.json +2 -2
  77. package/src/components/BusinessIntelligence/BusinessReviewList/index.js +1 -0
  78. package/src/components/BusinessIntelligence/UsersReviewList/index.js +1 -0
  79. package/src/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +20 -0
  80. package/src/components/Delivery/DriversGroupDetails/index.js +7 -7
  81. package/src/components/Delivery/DriversGroupsDeliveryZoneDetails/index.js +1 -1
  82. package/src/components/Delivery/UsersList/index.js +1 -0
  83. package/src/components/MyProducts/OrderingWebsite/index.js +45 -3
  84. package/src/components/OrderingProducts/OrderingProductsListing/index.js +1 -0
  85. package/src/components/Orders/OrderBill/index.js +20 -22
  86. package/src/components/Profile/ProfilePage/index.js +16 -2
  87. package/src/components/Profile/ProfilePage/styles.js +67 -1
  88. package/src/components/Settings/Deliverect/index.js +149 -0
  89. package/src/components/Settings/Deliverect/styles.js +344 -0
  90. package/src/components/Settings/DoordashConnect/index.js +1 -1
  91. package/src/components/Settings/IntegrationListing/index.js +47 -13
  92. package/src/components/Settings/IntegrationListing/styles.js +7 -1
  93. package/src/components/Settings/ItsaCheckmate/index.js +170 -0
  94. package/src/components/Settings/ItsaCheckmate/styles.js +366 -0
  95. package/src/components/Settings/PickerExpress/index.js +222 -0
  96. package/src/components/Settings/PickerExpress/styles.js +330 -0
  97. package/src/components/Settings/index.js +3 -1
  98. package/src/components/Shared/Modal/styles.js +1 -1
  99. package/src/components/SidebarMenu/index.js +21 -3
  100. package/src/components/SidebarMenu/styles.js +26 -0
  101. package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +106 -0
  102. package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +107 -0
  103. package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +250 -0
  104. package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +101 -0
  105. package/src/components/Stores/BusinessAdd/Images/index.js +168 -0
  106. package/src/components/Stores/BusinessAdd/Images/styles.js +94 -0
  107. package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +43 -0
  108. package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +70 -0
  109. package/src/components/Stores/BusinessAdd/OtherDetails/index.js +51 -0
  110. package/src/components/Stores/BusinessAdd/OtherDetails/styles.js +49 -0
  111. package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +39 -0
  112. package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +46 -0
  113. package/src/components/Stores/BusinessAdd/Photos/index.js +156 -0
  114. package/src/components/Stores/BusinessAdd/Photos/styles.js +108 -0
  115. package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +46 -0
  116. package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +69 -0
  117. package/src/components/Stores/BusinessAdd/Schedule/index.js +23 -0
  118. package/src/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
  119. package/src/components/Stores/BusinessAdd/index.js +184 -0
  120. package/src/components/Stores/BusinessAdd/styles.js +85 -0
  121. package/src/components/Stores/BusinessDeliveryDetails/styles.js +1 -0
  122. package/src/components/Stores/BusinessDeliveryPickupMore/index.js +9 -1
  123. package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +8 -10
  124. package/src/components/Stores/BusinessPickupDetails/styles.js +1 -0
  125. package/src/components/Stores/BusinessProductAddForm/index.js +13 -11
  126. package/src/components/Stores/BusinessProductsCategoyInfo/index.js +4 -7
  127. package/src/components/Stores/BusinessProductsListing/index.js +20 -0
  128. package/src/components/Stores/BusinessesList/index.js +4 -2
  129. package/src/components/Stores/BusinessesListing/index.js +101 -67
  130. package/src/components/Stores/BusinessesListing/styles.js +36 -0
  131. package/src/components/Stores/BusinessesListingHeader/index.js +58 -51
  132. package/src/components/Stores/ProductStartGuide/index.js +60 -0
  133. package/src/components/Stores/ProductStartGuide/styles.js +62 -0
  134. package/src/components/Stores/ProductStep/index.js +84 -0
  135. package/src/components/Stores/ProductStep/styles.js +29 -0
  136. package/src/components/Stores/RestaurantSelectGuide/index.js +119 -0
  137. package/src/components/Stores/RestaurantSelectGuide/styles.js +150 -0
  138. package/src/components/Stores/index.js +11 -1
  139. package/src/components/Users/ProfessionalAddForm/index.js +11 -1
  140. package/src/components/Users/ProfessionalList/index.js +1 -0
  141. package/src/components/Users/ProfessionalListing/index.js +2 -0
  142. package/src/components/Users/ProfessionalSchedule/Schedule/index.js +32 -0
  143. package/src/components/Users/ProfessionalSchedule/index.js +9 -49
  144. package/src/components/Users/ProfessionalSchedule/styles.js +0 -49
  145. package/src/components/Users/UserFormDetails/index.js +1 -1
  146. package/src/components/Users/UsersList/index.js +4 -2
  147. package/src/components/Users/UsersListingHeader/index.js +17 -2
  148. package/src/components/Users/UsersListingHeader/styles.js +59 -0
  149. package/src/index.js +14 -2
  150. package/template/app.js +4 -0
  151. package/template/assets/images/dummies/no-businesses.png +0 -0
  152. package/template/assets/images/import-menu.png +0 -0
  153. package/template/assets/images/imported-menu.png +0 -0
  154. package/template/assets/images/picker-express.png +0 -0
  155. package/template/components/ListenPageChanges/index.js +1 -0
  156. package/template/config.json +1 -1
  157. package/template/helmetdata.json +7 -0
  158. package/template/pages/BusinessAdd/index.js +11 -0
@@ -54,24 +54,23 @@ const DriversGroupDetailsUI = (props) => {
54
54
  const _driversGroupMenus = !driversGroupState.driversGroup
55
55
  ? [
56
56
  { key: 'general', value: t('GENERAL', 'General') },
57
- { key: 'businesses', value: t('BUSINESSES', 'Businesses') },
58
- { key: 'delivery_zones', value: t('DELIVERY_ZONES', 'Delivery Zones') }
57
+ { key: 'businesses', value: t('BUSINESSES', 'Businesses') }
59
58
  ]
60
59
  : (useAdvanced && autoAssignType !== 'basic')
61
60
  ? [
62
61
  { key: 'general', value: t('GENERAL', 'General') },
63
62
  { key: 'businesses', value: t('BUSINESSES', 'Businesses') },
63
+ { key: 'delivery_zones', value: t('DELIVERY_ZONES', 'Delivery Zones') },
64
64
  { key: 'paymethods', value: t('PAYMENT_METHODS', 'Payment methods') },
65
65
  { key: 'advanced_logistics', value: t('ADVANCED_LOGISTICS', 'Advanced logistics') },
66
- { key: 'logs', value: t('LOGS', 'Logs') },
67
- { key: 'delivery_zones', value: t('DELIVERY_ZONES', 'Delivery Zones') }
66
+ { key: 'logs', value: t('LOGS', 'Logs') }
68
67
  ]
69
68
  : [
70
69
  { key: 'general', value: t('GENERAL', 'General') },
71
70
  { key: 'businesses', value: t('BUSINESSES', 'Businesses') },
71
+ { key: 'delivery_zones', value: t('DELIVERY_ZONES', 'Delivery Zones') },
72
72
  { key: 'paymethods', value: t('PAYMENT_METHODS', 'Payment methods') },
73
- { key: 'logs', value: t('LOGS', 'Logs') },
74
- { key: 'delivery_zones', value: t('DELIVERY_ZONES', 'Delivery Zones') }
73
+ { key: 'logs', value: t('LOGS', 'Logs') }
75
74
  ]
76
75
  setDriversGroupMenus(_driversGroupMenus)
77
76
  }, [useAdvanced])
@@ -181,7 +180,8 @@ const DriversGroupDetailsUI = (props) => {
181
180
  <DriversGroupLogs driversGroupId={driversGroupState.driversGroup?.id} />
182
181
  )}
183
182
  {showMenu === 'delivery_zones' && (
184
- <DriverGroupDeliveryDetails {...props}
183
+ <DriverGroupDeliveryDetails
184
+ {...props}
185
185
  handleParentSidebarMove={handleParentSidebarMove}
186
186
  drivergroup={driversGroupState.driversGroup}
187
187
  setIsExtendExtraOpen={setIsExtendExtraOpen}
@@ -29,7 +29,7 @@ const DriverGroupDeliveryZoneDetailsUI = (props) => {
29
29
  handleAddDriverGroupDeliveryZone,
30
30
  handleDeleteDriverGroupDeliveryZone,
31
31
  handleUploadKmlFiles,
32
- kmlData,
32
+ kmlData
33
33
  } = props
34
34
 
35
35
  const theme = useTheme()
@@ -267,6 +267,7 @@ export const UsersList = (props) => {
267
267
  totalPages={paginationProps.totalPages}
268
268
  handleChangePage={handleChangePage}
269
269
  handleChangePageSize={handleChangePageSize}
270
+ defaultPageSize={paginationProps?.pageSize}
270
271
  />
271
272
  </WrapperPagination>
272
273
  )}
@@ -50,7 +50,8 @@ const OrderingWebsiteUI = (props) => {
50
50
  const [ordering] = useApi()
51
51
 
52
52
  const logoRef = useRef(null)
53
- const backgrooundRef = useRef(null)
53
+ const backgroundRef = useRef(null)
54
+ const mobileBackgroundRef = useRef(null)
54
55
 
55
56
  const [alertState, setAlertState] = useState({ open: false, content: [] })
56
57
  const [cropState, setCropState] = useState({ name: null, data: null, open: false })
@@ -63,7 +64,11 @@ const OrderingWebsiteUI = (props) => {
63
64
  }
64
65
 
65
66
  if (type === 'homepage_background') {
66
- backgrooundRef.current.click()
67
+ backgroundRef.current.click()
68
+ }
69
+
70
+ if (type === 'homepage_mobile_background') {
71
+ mobileBackgroundRef.current.click()
67
72
  }
68
73
  }
69
74
 
@@ -304,7 +309,7 @@ const OrderingWebsiteUI = (props) => {
304
309
  >
305
310
  <ExamineClick
306
311
  onFiles={files => handleFiles(files, 'homepage_background')}
307
- childRef={(e) => { backgrooundRef.current = e }}
312
+ childRef={(e) => { backgroundRef.current = e }}
308
313
  accept='image/png, image/jpeg, image/jpg'
309
314
  >
310
315
  <DragAndDrop
@@ -329,6 +334,43 @@ const OrderingWebsiteUI = (props) => {
329
334
  </ImgInfoWrapper>
330
335
  </ImageFormGroup>
331
336
  )}
337
+ {orderingTheme?.loading ? (
338
+ <>
339
+ <Skeleton height={100} style={{ marginBottom: '15px', width: '100%' }} />
340
+ <Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
341
+ </>
342
+ ) : (
343
+ <ImageFormGroup>
344
+ <BackgroundImage
345
+ onClick={() => handleClickImage('homepage_mobile_background')}
346
+ >
347
+ <ExamineClick
348
+ onFiles={files => handleFiles(files, 'homepage_mobile_background')}
349
+ childRef={(e) => { mobileBackgroundRef.current = e }}
350
+ accept='image/png, image/jpeg, image/jpg'
351
+ >
352
+ <DragAndDrop
353
+ onDrop={dataTransfer => handleFiles(dataTransfer.files, 'homepage_mobile_background')}
354
+ accept='image/png, image/jpeg, image/jpg'
355
+ disabled={orderingTheme.loading}
356
+ >
357
+ {themeValues?.images?.components?.homepage_mobile_background?.components?.image && <img src={themeValues?.images?.components?.homepage_mobile_background?.components?.image} alt='backgrond image' loading='lazy' />}
358
+ <UploadImageIconContainer bgimage={!!themeValues?.images?.components?.homepage_mobile_background?.components?.image}>
359
+ <UploadImageIcon>
360
+ <DumyPhoto />
361
+ <span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
362
+ </UploadImageIcon>
363
+ </UploadImageIconContainer>
364
+ </DragAndDrop>
365
+ </ExamineClick>
366
+ </BackgroundImage>
367
+ <ImgInfoWrapper>
368
+ <h4>{t('HOMEPAGE_MOBILE_BACKGROUND', 'Homepage mobile background')}</h4>
369
+ <p>1440 x 770 px</p>
370
+ <p>{t('FORMAT', 'Format')}: PNG</p>
371
+ </ImgInfoWrapper>
372
+ </ImageFormGroup>
373
+ )}
332
374
  {orderingTheme?.loading ? (
333
375
  <Skeleton width={200} height={20} />
334
376
  ) : (
@@ -168,6 +168,7 @@ const OrderingProductsUI = (props) => {
168
168
  totalPages={paginationProps?.totalPages}
169
169
  handleChangePage={handleChangePage}
170
170
  handleChangePageSize={handleChangePageSize}
171
+ defaultPageSize={paginationProps?.pageSize}
171
172
  />
172
173
  )}
173
174
  </PagesBottomContainer>
@@ -23,7 +23,7 @@ export const OrderBill = (props) => {
23
23
  const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
24
24
  const SPOT_DICTIONARY = {
25
25
  3: t('SPOT_NUMBER_EAT_IN', 'Table number'),
26
- 4: t('SPOT_NUMBER_CURBSIDE', 'Spor number'),
26
+ 4: t('SPOT_NUMBER_CURBSIDE', 'Spot number'),
27
27
  5: t('SPOT_NUMBER_DRIVE_THRU', 'Drive thru lane')
28
28
  }
29
29
 
@@ -106,7 +106,7 @@ export const OrderBill = (props) => {
106
106
  order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 1)?.map(offer => (
107
107
  <tr key={offer.id}>
108
108
  <td>
109
- {offer.name}
109
+ {t(offer.name?.toUpperCase()?.replaceAll(' ', '_'), offer.name)}
110
110
  {offer.rate_type === 1 && (
111
111
  <span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
112
112
  )}
@@ -153,7 +153,7 @@ export const OrderBill = (props) => {
153
153
  order?.taxes?.length > 0 && order?.taxes?.filter(tax => tax?.type === 2 && tax?.rate !== 0).map(tax => (
154
154
  <tr key={tax?.id}>
155
155
  <td>
156
- {tax?.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
156
+ {t(tax?.name?.toUpperCase()?.replaceAll(' ', '_'), tax?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
157
157
  <span>{`(${verifyDecimals(tax?.rate, parseNumber)}%)`}</span>
158
158
  </td>
159
159
  <td>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0, { currency: order?.currency })}</td>
@@ -164,7 +164,7 @@ export const OrderBill = (props) => {
164
164
  order?.fees?.length > 0 && order?.fees?.filter(fee => !(fee?.fixed === 0 && fee?.percentage === 0))?.map(fee => (
165
165
  <tr key={fee.id}>
166
166
  <td>
167
- {fee?.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
167
+ {t(fee?.name?.toUpperCase()?.replaceAll(' ', '_'), fee?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
168
168
  ({fee?.fixed > 0 && `${parsePrice(fee?.fixed)} + `}{fee.percentage}%)
169
169
  </td>
170
170
  <td>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0, { currency: order?.currency })}</td>
@@ -175,7 +175,7 @@ export const OrderBill = (props) => {
175
175
  order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 3)?.map(offer => (
176
176
  <tr key={offer.id}>
177
177
  <td>
178
- {offer.name}
178
+ {t(offer.name?.toUpperCase()?.replaceAll(' ', '_'), offer.name)}
179
179
  {offer.rate_type === 1 && (
180
180
  <span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
181
181
  )}
@@ -196,7 +196,7 @@ export const OrderBill = (props) => {
196
196
  order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 2)?.map(offer => (
197
197
  <tr key={offer.id}>
198
198
  <td>
199
- {offer.name}
199
+ {t(offer.name?.toUpperCase()?.replaceAll(' ', '_'), offer.name)}
200
200
  {offer.rate_type === 1 && (
201
201
  <span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
202
202
  )}
@@ -244,7 +244,7 @@ export const OrderBill = (props) => {
244
244
  <td>
245
245
  {event?.wallet_event
246
246
  ? walletName[event?.wallet_event?.wallet?.type]?.name
247
- : event?.paymethod?.name}
247
+ : t(event?.paymethod?.name?.toUpperCase()?.replaceAll(' ', '_'), event?.paymethod?.name)}
248
248
  </td>
249
249
  <td>-{parsePrice(event?.amount, { currency: order?.currency })}</td>
250
250
  </tr>
@@ -252,20 +252,18 @@ export const OrderBill = (props) => {
252
252
  </tbody>
253
253
  </table>
254
254
  )}
255
- {order?.delivery_option && (
256
- <table className='delivery_option'>
257
- <thead>
258
- <tr>
259
- <th colSpan='2'>{t('DELIVERY_PREFERENCE', 'Delivery Preference')}</th>
260
- </tr>
261
- </thead>
262
- <tbody>
263
- <tr>
264
- <td>{order?.delivery_option?.name}</td>
265
- </tr>
266
- </tbody>
267
- </table>
268
- )}
255
+ <table className='delivery_option'>
256
+ <thead>
257
+ <tr>
258
+ <th colSpan='2'>{t('DELIVERY_PREFERENCE', 'Delivery Preference')}</th>
259
+ </tr>
260
+ </thead>
261
+ <tbody>
262
+ <tr>
263
+ <td>{order?.delivery_option ? order?.delivery_option?.name : t('EITHER_WAY', 'Either way')}</td>
264
+ </tr>
265
+ </tbody>
266
+ </table>
269
267
  {order?.comment && (
270
268
  <table className='comments'>
271
269
  <tbody>
@@ -296,7 +294,7 @@ export const OrderBill = (props) => {
296
294
  <tbody>
297
295
  <tr>
298
296
  <td>{t('ORDER_VEHICLE_TYPE', 'Type')}</td>
299
- <td>{order?.vehicle?.type}</td>
297
+ <td>{t(order?.vehicle?.type?.toUpperCase(), order?.vehicle?.type)}</td>
300
298
  </tr>
301
299
  <tr>
302
300
  <td>{t('ORDER_VEHICLE_MODEL', 'Model')}</td>
@@ -5,7 +5,7 @@ import {
5
5
  useSession
6
6
  } from 'ordering-components-admin-external'
7
7
  import FaUserAlt from '@meronex/icons/fa/FaUserAlt'
8
- import { List as MenuIcon } from 'react-bootstrap-icons'
8
+ import { List as MenuIcon, InfoCircle } from 'react-bootstrap-icons'
9
9
  import { IconButton, Button } from '../../../styles'
10
10
  import { useInfoShare } from '../../../contexts/InfoShareContext'
11
11
  import { Sessions } from '../Sessions'
@@ -16,7 +16,9 @@ import {
16
16
  UserInfoContainer,
17
17
  UserImage,
18
18
  UserInfoWrapper,
19
- ButtonsGroup
19
+ ButtonsGroup,
20
+ InfoWrapper,
21
+ InfoContent
20
22
  } from './styles'
21
23
 
22
24
  const ProfilePageUI = (props) => {
@@ -40,6 +42,18 @@ const ProfilePageUI = (props) => {
40
42
  </IconButton>
41
43
  )}
42
44
  <h1>{t('PROFILE', '')}</h1>
45
+ {user?.level === 8 && (
46
+ <InfoWrapper>
47
+ <IconButton
48
+ color='primary'
49
+ >
50
+ <InfoCircle />
51
+ </IconButton>
52
+ <InfoContent>
53
+ {t('CONNTECT_PROFESSIONAL_ACCOUNT_INFO', 'Connect your Professional account with your Google account to synchronize the appointments with the Google calendar Application. Use the Google account button to start with the login process, do not forget to notify the admin to Complete the synchronization.')}
54
+ </InfoContent>
55
+ </InfoWrapper>
56
+ )}
43
57
  </HeaderContainer>
44
58
  <UserInfoContainer>
45
59
  <UserImage>
@@ -1,4 +1,4 @@
1
- import styled from 'styled-components'
1
+ import styled, { css } from 'styled-components'
2
2
 
3
3
  export const Container = styled.div`
4
4
  flex: 1;
@@ -27,12 +27,19 @@ export const UserImage = styled.div`
27
27
  box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
28
28
  width: 216px;
29
29
  height: 216px;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
30
33
  img {
31
34
  width: 100%;
32
35
  height: 100%;
33
36
  object-fit: cover;
34
37
  border-radius: 8px;
35
38
  }
39
+ svg {
40
+ width: 80%;
41
+ height: 80%;
42
+ }
36
43
  `
37
44
  export const UserInfoWrapper = styled.div`
38
45
  margin: 0 26px;
@@ -63,3 +70,62 @@ export const ButtonsGroup = styled.div`
63
70
  height: 44px;
64
71
  }
65
72
  `
73
+ export const InfoWrapper = styled.div`
74
+ position: relative;
75
+ ${props => props.theme?.rtl ? css`
76
+ margin-left: -8px;
77
+ margin-right: 8px;
78
+ ` : css`
79
+ margin-right: -8px;
80
+ margin-left: 8px;
81
+ `}
82
+
83
+ > button {
84
+ height: 25px;
85
+ svg {
86
+ width: 16px;
87
+ height: 16px;
88
+ }
89
+ }
90
+ &:hover > div {
91
+ visibility: visible;
92
+ opacity: 1;
93
+ }
94
+ `
95
+
96
+ export const InfoContent = styled.div`
97
+ position: absolute;
98
+ top: 100%;
99
+ z-index: 999;
100
+ background: ${props => props.theme.colors.backgroundInfo};
101
+ border: 1px solid ${props => props.theme.colors.primary};
102
+ box-sizing: border-box;
103
+ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
104
+ border-radius: 7.6px;
105
+ padding: 8px 12px;
106
+ font-size: 12px;
107
+ line-height: 18px;
108
+ min-width: 150px;
109
+ transition: all 0.3s linear;
110
+ visibility: hidden;
111
+ opacity: 0;
112
+ right: 0px;
113
+ ${props => props.theme.rtl && css`
114
+ left: 0px;
115
+ right: initial;
116
+ `}
117
+
118
+ @media (min-width: 576px) {
119
+ min-width: 350px;
120
+ padding: 12px 15px;
121
+ left: 0px;
122
+ ${props => props.theme.rtl && css`
123
+ right: 0px;
124
+ left: initial;
125
+ `}
126
+ }
127
+
128
+ @media (min-width: 993px) {
129
+ min-width: 535px;
130
+ }
131
+ `
@@ -0,0 +1,149 @@
1
+ import React, { useState, useEffect } from 'react'
2
+ import { useLanguage } from 'ordering-components-admin-external'
3
+ import { Button, IconButton } from '../../../styles'
4
+ import { DragScroll, Modal } from '../../Shared'
5
+ import BsArrowRight from '@meronex/icons/bs/BsArrowRight'
6
+ import { XLg } from 'react-bootstrap-icons'
7
+ import { useWindowSize } from '../../../hooks/useWindowSize'
8
+
9
+ import {
10
+ Header,
11
+ AllSetting,
12
+ Description,
13
+ CategoryExtraContent,
14
+ Container,
15
+ DescriptionHeader,
16
+ HeaderIcons,
17
+ DeliverectContainer,
18
+ SettingListConatiner,
19
+ Tab,
20
+ GetStarted,
21
+ YoutubeVideoWrapper,
22
+ YoutubeVideoInner
23
+ } from './styles'
24
+
25
+ export const Deliverect = (props) => {
26
+ const {
27
+ onClose
28
+ } = props
29
+
30
+ const [, t] = useLanguage()
31
+ const { width } = useWindowSize()
32
+
33
+ const [settingsOpen, setSettingsOpen] = useState(false)
34
+
35
+ const toggleMainContent = () => {
36
+ if (width <= 500) {
37
+ document.getElementById('catDescription').style.width = '100vw'
38
+ } else {
39
+ if ((settingsOpen) && width >= 1000) {
40
+ document.getElementById('catDescription').style.width = '1000px'
41
+ } else {
42
+ document.getElementById('catDescription').style.width = '500px'
43
+ }
44
+ }
45
+ }
46
+
47
+ useEffect(() => {
48
+ if (width < 1000) return
49
+ if (settingsOpen) {
50
+ document.getElementById('catDescription').style.width = '1000px'
51
+ } else {
52
+ toggleMainContent()
53
+ }
54
+ }, [settingsOpen])
55
+
56
+ useEffect(() => {
57
+ toggleMainContent()
58
+ }, [width])
59
+
60
+ const LalaMoveConnectDescription = () => {
61
+ return (
62
+ <CategoryExtraContent>
63
+ <IconButton
64
+ color='black'
65
+ onClick={() => setSettingsOpen(false)}
66
+ >
67
+ <XLg />
68
+ </IconButton>
69
+ <div>
70
+ <Header>
71
+ <h1>{t('MORE_INFO', 'More Info')}</h1>
72
+ </Header>
73
+ <SettingListConatiner>
74
+ <DragScroll>
75
+ <Tab
76
+ active
77
+ >
78
+ {t('GENERAL', 'General')}
79
+ </Tab>
80
+ </DragScroll>
81
+ </SettingListConatiner>
82
+ <GetStarted>
83
+ <h2>{t('GET_STARTED_RIGHT_HERE', 'Get started right here')}</h2>
84
+ <p>{t('FILL_UP_THIS_FORM_TO_REQUEST_INFORMATION', 'Fill up this form to request more information')}</p>
85
+ <a href='https://share.hsforms.com/1uGzNQ71IS2KXCAFC0mTBCg3neff' target='_blank' rel='noopener noreferrer'>
86
+ <Button color='primary'>{t('SEND_FORM', 'Send Form')}</Button>
87
+ </a>
88
+ </GetStarted>
89
+ <YoutubeVideoWrapper>
90
+ <YoutubeVideoInner>
91
+ <iframe
92
+ title='youtube'
93
+ src='https://www.youtube.com/embed/_v8nPmW_E-0?playlist=_v8nPmW_E-0&loop=1'
94
+ />
95
+ </YoutubeVideoInner>
96
+ </YoutubeVideoWrapper>
97
+ </div>
98
+ </CategoryExtraContent>
99
+ )
100
+ }
101
+
102
+ return (
103
+ <Container
104
+ id='catDescription'
105
+ >
106
+ <DeliverectContainer>
107
+ <DescriptionHeader>
108
+ <HeaderIcons>
109
+ <IconButton
110
+ color='black'
111
+ onClick={onClose}
112
+ >
113
+ <XLg />
114
+ </IconButton>
115
+ </HeaderIcons>
116
+ </DescriptionHeader>
117
+ <Header>
118
+ <h1>{t('DELIVERECT', 'Deliverect')}</h1>
119
+ <Button color='lightPrimary'>{t('NEW', 'New')}</Button>
120
+ </Header>
121
+ <Description dangerouslySetInnerHTML={{ __html: t('SYNC_DEC_SECOND', 'Deliverect integrates all your <span>online orders</span> to your <span>existing POS</span> or our <span>Delivery Manger app.</span> Restaurants large and small rely on Deliverect to reduce failures and order mistakes while speeding up order preparation.') }} />
122
+ <AllSetting onClick={() => setSettingsOpen(true)}>
123
+ <span>{t('SETTINGS', 'All settings')}</span>
124
+ <BsArrowRight />
125
+ </AllSetting>
126
+ </DeliverectContainer>
127
+ {settingsOpen && (
128
+ <>
129
+ {width >= 1000 ? (
130
+ <LalaMoveConnectDescription />
131
+ ) : (
132
+ <>
133
+ <Modal
134
+ width='70%'
135
+ height='90vh'
136
+ open
137
+ padding='0px'
138
+ onClose={() => setSettingsOpen(false)}
139
+ hideCloseDefault
140
+ >
141
+ <LalaMoveConnectDescription />
142
+ </Modal>
143
+ </>
144
+ )}
145
+ </>
146
+ )}
147
+ </Container>
148
+ )
149
+ }