ordering-ui-admin-external 1.14.3 → 1.15.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 (134) hide show
  1. package/package.json +2 -2
  2. package/src/components/BusinessIntelligence/BusinessReviewDetails/index.js +4 -4
  3. package/src/components/BusinessIntelligence/BusinessReviewList/index.js +29 -6
  4. package/src/components/BusinessIntelligence/InvoiceBusinessManager/index.js +17 -1
  5. package/src/components/BusinessIntelligence/InvoiceDriverManager/index.js +17 -1
  6. package/src/components/BusinessIntelligence/InvoiceManager/index.js +16 -2
  7. package/src/components/BusinessIntelligence/InvoiceOrdertype/styles.js +1 -0
  8. package/src/components/BusinessIntelligence/ProductReviewDetails/index.js +4 -4
  9. package/src/components/BusinessIntelligence/Reports/index.js +16 -2
  10. package/src/components/BusinessIntelligence/ReviewProductsListing/index.js +34 -6
  11. package/src/components/BusinessIntelligence/ReviewsListing/index.js +31 -5
  12. package/src/components/BusinessIntelligence/UserReviewDetails/index.js +4 -4
  13. package/src/components/BusinessIntelligence/UsersReviewList/index.js +32 -11
  14. package/src/components/CartRecovery/RecoveryActionDetail/index.js +19 -1
  15. package/src/components/CartRecovery/RecoveryActionListing/index.js +21 -3
  16. package/src/components/Delivery/DeliveryUsersListing/index.js +3 -1
  17. package/src/components/Delivery/DriversCompaniesListing/index.js +27 -9
  18. package/src/components/Delivery/DriversCompanyDetailsForm/index.js +37 -8
  19. package/src/components/Delivery/DriversGroupDetails/index.js +36 -4
  20. package/src/components/Delivery/DriversGroupLogistics/index.js +18 -2
  21. package/src/components/Delivery/DriversGroupsListing/index.js +20 -6
  22. package/src/components/Delivery/UserDetails/index.js +26 -1
  23. package/src/components/Loyalty/GiftCardDetail/styles.js +192 -0
  24. package/src/components/Loyalty/GiftCards/index.js +22 -2
  25. package/src/components/Loyalty/PointsWalletBusinessList/index.js +24 -1
  26. package/src/components/Loyalty/PointsWalletLevels/index.js +21 -1
  27. package/src/components/Loyalty/RewardsPrograms/index.js +30 -3
  28. package/src/components/Loyalty/Wallet/index.js +22 -1
  29. package/src/components/Marketing/AdBannersListing/index.js +25 -8
  30. package/src/components/Marketing/BannerImageDetails/index.js +2 -1
  31. package/src/components/Marketing/CampaignDetail/index.js +22 -1
  32. package/src/components/Marketing/CampaignEmail/styles.js +3 -0
  33. package/src/components/Marketing/CampaignListing/index.js +18 -1
  34. package/src/components/Marketing/CampaignNotification/styles.js +3 -0
  35. package/src/components/Marketing/CampaignSMS/styles.js +3 -0
  36. package/src/components/Marketing/EnterprisePromotionGeneralDetails/index.js +2 -1
  37. package/src/components/Marketing/EnterprisePromotionListing/index.js +19 -1
  38. package/src/components/Marketing/PageBanner/index.js +26 -3
  39. package/src/components/Messages/MessagesListing/index.js +17 -0
  40. package/src/components/MyProducts/AdvancedSettings/FontStyleGroup.js +64 -0
  41. package/src/components/MyProducts/AdvancedSettings/OrderType.js +40 -0
  42. package/src/components/MyProducts/AdvancedSettings/SettingComponent.js +104 -0
  43. package/src/components/MyProducts/AdvancedSettings/index.js +541 -0
  44. package/src/components/MyProducts/AdvancedSettings/styles.js +388 -0
  45. package/src/components/MyProducts/AppLayout/index.js +19 -2
  46. package/src/components/MyProducts/AppLayout/styles.js +65 -0
  47. package/src/components/MyProducts/CallCenterApp/index.js +1 -1
  48. package/src/components/MyProducts/CustomerApp/index.js +2 -2
  49. package/src/components/MyProducts/DriverApp/index.js +2 -2
  50. package/src/components/MyProducts/KioskApp/index.js +1 -1
  51. package/src/components/MyProducts/OrderingWebsite/index.js +309 -255
  52. package/src/components/MyProducts/OrderingWebsite/styles.js +99 -2
  53. package/src/components/MyProducts/PosApp/index.js +1 -1
  54. package/src/components/MyProducts/StoreApp/index.js +2 -2
  55. package/src/components/OrderingProducts/OrderingProductDetails/index.js +24 -2
  56. package/src/components/OrderingProducts/OrderingProductsListing/index.js +17 -1
  57. package/src/components/Orders/DeliveriesManager/index.js +0 -1
  58. package/src/components/Orders/Messages/index.js +31 -11
  59. package/src/components/Orders/OrderDetails/index.js +34 -20
  60. package/src/components/Orders/OrderDetailsHeader/index.js +2 -3
  61. package/src/components/Orders/OrdersContentHeader/index.js +1 -1
  62. package/src/components/Orders/OrdersFilterGroup/index.js +111 -13
  63. package/src/components/Orders/OrdersFilterGroup/styles.js +26 -0
  64. package/src/components/Orders/OrdersManager/index.js +0 -1
  65. package/src/components/Settings/CountriesList/index.js +26 -6
  66. package/src/components/Settings/Deliverect/index.js +26 -2
  67. package/src/components/Settings/DoordashConnect/index.js +26 -2
  68. package/src/components/Settings/DropdownOptionList/index.js +27 -6
  69. package/src/components/Settings/IntegrationListing/index.js +3 -3
  70. package/src/components/Settings/ItsaCheckmate/index.js +26 -2
  71. package/src/components/Settings/LalamoveConnect/index.js +26 -2
  72. package/src/components/Settings/PickerExpress/index.js +26 -2
  73. package/src/components/Settings/PlaceListing/index.js +38 -6
  74. package/src/components/Settings/Settings/index.js +79 -37
  75. package/src/components/Settings/SettingsDetail/index.js +15 -1
  76. package/src/components/Settings/SitesAuthSettings/index.js +18 -1
  77. package/src/components/SidebarMenu/index.js +0 -2
  78. package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +1 -10
  79. package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +4 -0
  80. package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +120 -109
  81. package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +22 -1
  82. package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +8 -2
  83. package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +4 -0
  84. package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +11 -6
  85. package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +4 -0
  86. package/src/components/Stores/BusinessAdd/index.js +47 -16
  87. package/src/components/Stores/BusinessAdd/styles.js +27 -1
  88. package/src/components/Stores/BusinessAddStore/index.js +1 -1
  89. package/src/components/Stores/BusinessBrandListing/index.js +37 -4
  90. package/src/components/Stores/BusinessDeliveryPickupMore/index.js +22 -1
  91. package/src/components/Stores/BusinessDeliveryZoneDetails/index.js +25 -2
  92. package/src/components/Stores/BusinessDeliveryZoneList/index.js +30 -3
  93. package/src/components/Stores/BusinessDetail/index.js +20 -1
  94. package/src/components/Stores/BusinessDetails/index.js +18 -1
  95. package/src/components/Stores/BusinessFrontLayout/index.js +13 -1
  96. package/src/components/Stores/BusinessFrontLayout/styles.js +11 -0
  97. package/src/components/Stores/BusinessMenu/index.js +56 -11
  98. package/src/components/Stores/BusinessMenuOptions/index.js +28 -3
  99. package/src/components/Stores/BusinessOrderingChannels/index.js +19 -2
  100. package/src/components/Stores/BusinessPaymentMethods/index.js +24 -2
  101. package/src/components/Stores/BusinessPlaceGroupList/index.js +193 -0
  102. package/src/components/Stores/BusinessPlaceGroupList/styles.js +143 -0
  103. package/src/components/Stores/BusinessProductsCategoyDetails/index.js +21 -1
  104. package/src/components/Stores/BusinessProductsListing/index.js +49 -8
  105. package/src/components/Stores/BusinessPromotionGeneralForm/index.js +2 -2
  106. package/src/components/Stores/BusinessSharedMenuProducts/index.js +29 -3
  107. package/src/components/Stores/BusinessSync/index.js +18 -2
  108. package/src/components/Stores/BusinessTypes/index.js +26 -4
  109. package/src/components/Stores/BusinessWalletsList/index.js +23 -1
  110. package/src/components/Stores/BusinessesListing/index.js +11 -2
  111. package/src/components/Stores/ImportersButton/index.js +24 -3
  112. package/src/components/Stores/PaymentOption/index.js +29 -8
  113. package/src/components/Stores/PaymentOptionMethods/index.js +25 -3
  114. package/src/components/Stores/PaymentOptionPaypal/index.js +25 -3
  115. package/src/components/Stores/PaymentOptionSquare/index.js +25 -3
  116. package/src/components/Stores/PaymentOptionStripeDirect/index.js +25 -3
  117. package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +25 -3
  118. package/src/components/Stores/PaymethodOptionStripeConnect/index.js +25 -3
  119. package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +25 -3
  120. package/src/components/Stores/ProductDetails/index.js +19 -1
  121. package/src/components/Stores/ProductExtras/index.js +23 -2
  122. package/src/components/Stores/ProductIngredient/index.js +23 -2
  123. package/src/components/Stores/ProductMainDetails/index.js +20 -2
  124. package/src/components/Stores/ProductTagsList/index.js +28 -3
  125. package/src/components/Users/CustomerCashWallet/index.js +25 -3
  126. package/src/components/Users/CustomerDetails/index.js +20 -1
  127. package/src/components/Users/CustomerPointsWallet/index.js +25 -3
  128. package/src/components/Users/CustomersListing/index.js +9 -4
  129. package/src/components/Users/ProfessionalDetail/index.js +27 -1
  130. package/src/components/Users/ProfessionalListing/index.js +9 -4
  131. package/src/components/Users/UserActiveStateFilter/index.js +16 -3
  132. package/src/components/Users/UserDetails/index.js +27 -1
  133. package/src/components/Users/UsersListing/index.js +9 -4
  134. package/template/pages/BusinessProductsList/index.js +1 -1
@@ -1,12 +1,14 @@
1
1
  import React, { useRef, useState } from 'react'
2
2
  import { useLanguage, ExamineClick, DragAndDrop, useApi, OrderingWebsite as OrderingWebsiteController } from 'ordering-components-admin-external'
3
3
  import { useInfoShare } from '../../../contexts/InfoShareContext'
4
+ import { useLocation } from 'react-router-dom'
4
5
  import { Button, IconButton, Input, TextArea } from '../../../styles'
5
6
  import {
6
7
  List as MenuIcon,
7
8
  Image as DumyPhoto,
8
9
  CheckSquareFill as CheckedIcon,
9
- Square as UnCheckedIcon
10
+ Square as UnCheckedIcon,
11
+ InfoCircle
10
12
  } from 'react-bootstrap-icons'
11
13
  import { useTheme } from 'styled-components'
12
14
  import { Alert, Modal, ImageCrop, ColorPicker } from '../../Shared'
@@ -32,22 +34,32 @@ import {
32
34
  CheckBoxWrapper,
33
35
  ColorPickerWrapper,
34
36
  ContentWrapper,
35
- WebsiteButtonWrapper
37
+ WebsiteButtonWrapper,
38
+ TabWrapper,
39
+ Tabs,
40
+ Tab,
41
+ HeaderInfoWrapper,
42
+ InfoContent
36
43
  } from './styles'
37
44
  import Skeleton from 'react-loading-skeleton'
45
+ import { AdvancedSettings } from '../AdvancedSettings'
38
46
 
39
47
  const OrderingWebsiteUI = (props) => {
40
48
  const {
41
49
  themeValues,
42
50
  orderingTheme,
43
51
  setThemeValues,
44
- handleUpdateSiteTheme
52
+ handleUpdateSiteTheme,
53
+ advancedValues,
54
+ setAdvancedValues,
55
+ themesList
45
56
  } = props
46
57
 
47
58
  const [, t] = useLanguage()
48
59
  const [{ isCollapse }, { handleMenuCollapse }] = useInfoShare()
49
60
  const theme = useTheme()
50
61
  const [ordering] = useApi()
62
+ const location = useLocation()
51
63
 
52
64
  const logoRef = useRef(null)
53
65
  const backgroundRef = useRef(null)
@@ -57,6 +69,12 @@ const OrderingWebsiteUI = (props) => {
57
69
  const [cropState, setCropState] = useState({ name: null, data: null, open: false })
58
70
  const [homePageContent, setHomePageContent] = useState(false)
59
71
  const [footerContent, setFooterContent] = useState(false)
72
+ const [selectedSetting, setSelectedSetting] = useState('basic')
73
+
74
+ const settingsList = [
75
+ { key: 'basic', name: t('BASIC_SETTINGS', 'Basic Settings') },
76
+ { key: 'advanced', name: t('ADVANCED_SETTINGS', 'Advanced Settings') }
77
+ ]
60
78
 
61
79
  const handleClickImage = (type) => {
62
80
  if (type === 'logo') {
@@ -147,296 +165,332 @@ const OrderingWebsiteUI = (props) => {
147
165
  </IconButton>
148
166
  )}
149
167
  <h1>{t('MY_PRODUCTS', 'My products')}</h1>
168
+ {(location.pathname === '/my-products/ordering-website' || location.pathname === '/my-products/customer-app') && (
169
+ <HeaderInfoWrapper>
170
+ <IconButton
171
+ color='primary'
172
+ >
173
+ <InfoCircle />
174
+ </IconButton>
175
+ <InfoContent>
176
+ {t('MY_PRODUCTS_INFO', 'Use the advanced configurations below to customize your products changing the images, colors, available options and others with a few clicks. If you have doubts, please contact our team here:')}
177
+ <a href='https://www.ordering.co/support' rel='noopener noreferrer' target='_blank'>https://www.ordering.co/support</a>
178
+ </InfoContent>
179
+ </HeaderInfoWrapper>
180
+ )}
150
181
  </HeaderTitleContainer>
151
182
  <WebsiteWrapper>
152
183
  <InfoWrapper>
153
184
  <h1>{t('ORDERING_WEBSITE', 'Ordering website')}</h1>
154
185
  <p>{t('ORDERING_WEBSITE_DESC', 'This product is included in your project by default.')}</p>
186
+ <WebsiteButtonWrapper>
187
+ <Button
188
+ color='primary'
189
+ borderRadius='8px'
190
+ onClick={() => window.open(`https://${ordering?.project}.tryordering.com`, '_blank')}
191
+ >
192
+ {t('VISIT_MY_WEBSITE', 'Visit My Website')}
193
+ </Button>
194
+ </WebsiteButtonWrapper>
155
195
  </InfoWrapper>
156
196
  <img src={theme.images.myProducts.orderingWebsite} alt='ordering-website' />
157
197
  </WebsiteWrapper>
158
198
  <MoreSettingsHeader>
159
199
  <h2>{t('MORE_SETTINGS_FOR_YOUR', 'More settings for your')} <span>{t('WEBSITE_ORIGINAL', 'website')}</span></h2>
160
200
  <p>{t('MORE_SETTINGS_YOUR_WEBSITE_DESC', 'Change background, colors, fonts, style, branding and all the essentials of your brand.')}</p>
201
+ <TabWrapper>
202
+ <Tabs>
203
+ {settingsList.map(setting => (
204
+ <Tab
205
+ key={setting.key}
206
+ active={selectedSetting === setting.key}
207
+ onClick={() => !orderingTheme?.loading && setSelectedSetting(setting.key)}
208
+ >
209
+ {setting.name}
210
+ </Tab>
211
+ ))}
212
+ </Tabs>
213
+ </TabWrapper>
161
214
  </MoreSettingsHeader>
162
- <WebsiteButtonWrapper>
163
- <Button
164
- color='primary'
165
- borderRadius='8px'
166
- onClick={() => window.open(`https://${ordering?.project}.tryordering.com`, '_blank')}
167
- >
168
- {t('VISIT_MY_WEBSITE', 'Visit My Website')}
169
- </Button>
170
- </WebsiteButtonWrapper>
171
- <FormWrapper>
172
- <InputFormWrapper>
173
- <InnerBlock>
174
- <h4>{t('WEBSITE_SETTINGS', 'Website settings')}</h4>
175
- <FormGroup>
176
- <label>
215
+ {selectedSetting === 'basic' && (
216
+ <FormWrapper>
217
+ <InputFormWrapper>
218
+ <InnerBlock>
219
+ <h4>{t('WEBSITE_SETTINGS', 'Website settings')}</h4>
220
+ <FormGroup>
221
+ <label>
222
+ {orderingTheme?.loading ? (
223
+ <Skeleton height={20} width={150} />
224
+ ) : (
225
+ <>
226
+ {t('NAME', 'Name')}
227
+ </>
228
+ )}
229
+ </label>
177
230
  {orderingTheme?.loading ? (
178
- <Skeleton height={20} width={150} />
231
+ <Skeleton height={40} style={{ width: '100%' }} />
179
232
  ) : (
180
- <>
181
- {t('NAME', 'Name')}
182
- </>
233
+ <Input
234
+ name='name'
235
+ placeholder={t('SOURCE_DEMO_WEBSITE', 'Source demo website')}
236
+ value={themeValues?.website_settings?.components?.values?.name || ''}
237
+ onChange={handleChangeSiteSettings}
238
+ />
183
239
  )}
184
- </label>
185
- {orderingTheme?.loading ? (
186
- <Skeleton height={40} style={{ width: '100%' }} />
187
- ) : (
188
- <Input
189
- name='name'
190
- placeholder={t('SOURCE_DEMO_WEBSITE', 'Source demo website')}
191
- value={themeValues?.website_settings?.components?.values?.name || ''}
192
- onChange={handleChangeSiteSettings}
193
- />
194
- )}
195
- </FormGroup>
196
- <FormGroup>
197
- <label>
240
+ </FormGroup>
241
+ <FormGroup>
242
+ <label>
243
+ {orderingTheme?.loading ? (
244
+ <Skeleton height={20} width={150} />
245
+ ) : (
246
+ <>
247
+ {t('DESCRIPTION', 'Decription')}
248
+ </>
249
+ )}
250
+ </label>
198
251
  {orderingTheme?.loading ? (
199
- <Skeleton height={20} width={150} />
252
+ <Skeleton height={65} style={{ width: '100%' }} />
200
253
  ) : (
201
- <>
202
- {t('DESCRIPTION', 'Decription')}
203
- </>
254
+ <TextArea
255
+ name='description'
256
+ placeholder={t('DESCRIPTION', 'Decription')}
257
+ value={themeValues?.website_settings?.components?.values?.description || ''}
258
+ onChange={handleChangeSiteSettings}
259
+ />
204
260
  )}
205
- </label>
206
- {orderingTheme?.loading ? (
207
- <Skeleton height={65} style={{ width: '100%' }} />
208
- ) : (
209
- <TextArea
210
- name='description'
211
- placeholder={t('DESCRIPTION', 'Decription')}
212
- value={themeValues?.website_settings?.components?.values?.description || ''}
213
- onChange={handleChangeSiteSettings}
214
- />
215
- )}
216
- </FormGroup>
217
- <FormGroup>
218
- <label>
261
+ </FormGroup>
262
+ <FormGroup>
263
+ <label>
264
+ {orderingTheme?.loading ? (
265
+ <Skeleton height={20} width={150} />
266
+ ) : (
267
+ <>
268
+ {t('TEMPORAL_DOMAIN', 'Temporal domain')}
269
+ </>
270
+ )}
271
+ </label>
219
272
  {orderingTheme?.loading ? (
220
- <Skeleton height={20} width={150} />
273
+ <Skeleton height={20} style={{ width: '100%' }} />
221
274
  ) : (
222
- <>
223
- {t('TEMPORAL_DOMAIN', 'Temporal domain')}
224
- </>
275
+ <TemporalDomail>
276
+ {t('VISIT', 'Visit')}: <a href={`https://${ordering?.project}.tryordering.com`} rel='noopener noreferrer' target='_blank'>https://{ordering?.project}.tryordering.com</a>
277
+ </TemporalDomail>
225
278
  )}
226
- </label>
227
- {orderingTheme?.loading ? (
228
- <Skeleton height={20} style={{ width: '100%' }} />
229
- ) : (
230
- <TemporalDomail>
231
- {t('VISIT', 'Visit')}: <a href={`https://${ordering?.project}.tryordering.com`} rel='noopener noreferrer' target='_blank'>https://{ordering?.project}.tryordering.com</a>
232
- </TemporalDomail>
233
- )}
234
- </FormGroup>
235
- <FormGroup>
236
- <label>
279
+ </FormGroup>
280
+ <FormGroup>
281
+ <label>
282
+ {orderingTheme?.loading ? (
283
+ <Skeleton height={20} width={150} />
284
+ ) : (
285
+ <>
286
+ {t('CUSTOM_DOMAIN', 'Custom domain')}
287
+ </>
288
+ )}
289
+ </label>
237
290
  {orderingTheme?.loading ? (
238
- <Skeleton height={20} width={150} />
291
+ <Skeleton height={40} style={{ width: '100%' }} />
239
292
  ) : (
240
- <>
241
- {t('CUSTOM_DOMAIN', 'Custom domain')}
242
- </>
293
+ <Button
294
+ color='primary'
295
+ outline
296
+ borderRadius='8px'
297
+ onClick={() => window.open('https://www.ordering.co/custom-domain-change', '_blank')}
298
+ >
299
+ {t('REQUEST_CUSTOM_DOMAIN', 'Request custom domain')}
300
+ </Button>
243
301
  )}
244
- </label>
302
+ </FormGroup>
303
+ </InnerBlock>
304
+ </InputFormWrapper>
305
+ <InputFormWrapper>
306
+ <h4>{t('IMAGES', 'Images')}</h4>
307
+ <InnerBlock>
245
308
  {orderingTheme?.loading ? (
246
- <Skeleton height={40} style={{ width: '100%' }} />
309
+ <>
310
+ <Skeleton height={100} width={100} style={{ marginBottom: '15px' }} />
311
+ <Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
312
+ </>
247
313
  ) : (
248
- <Button
249
- color='primary'
250
- outline
251
- borderRadius='8px'
252
- onClick={() => window.open('https://www.ordering.co/custom-domain-change', '_blank')}
253
- >
254
- {t('REQUEST_CUSTOM_DOMAIN', 'Request custom domain')}
255
- </Button>
256
- )}
257
- </FormGroup>
258
- </InnerBlock>
259
- </InputFormWrapper>
260
- <InputFormWrapper>
261
- <h4>{t('IMAGES', 'Images')}</h4>
262
- <InnerBlock>
263
- {orderingTheme?.loading ? (
264
- <>
265
- <Skeleton height={100} width={100} style={{ marginBottom: '15px' }} />
266
- <Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
267
- </>
268
- ) : (
269
- <ImageFormGroup>
270
- <LogoImage
271
- onClick={() => handleClickImage('logo')}
272
- >
273
- <ExamineClick
274
- onFiles={files => handleFiles(files, 'logo')}
275
- childRef={(e) => { logoRef.current = e }}
276
- accept='image/png, image/jpeg, image/jpg'
314
+ <ImageFormGroup>
315
+ <LogoImage
316
+ onClick={() => handleClickImage('logo')}
277
317
  >
278
- <DragAndDrop
279
- onDrop={dataTransfer => handleFiles(dataTransfer.files, 'logo')}
318
+ <ExamineClick
319
+ onFiles={files => handleFiles(files, 'logo')}
320
+ childRef={(e) => { logoRef.current = e }}
280
321
  accept='image/png, image/jpeg, image/jpg'
281
- disabled={orderingTheme.loading}
282
322
  >
283
- {themeValues?.images?.components?.logo?.components?.image && <img src={themeValues?.images?.components?.logo?.components?.image} alt='logo image' loading='lazy' />}
284
- <UploadImageIconContainer bgimage={themeValues?.images?.components?.logo?.components?.image}>
285
- <UploadImageIcon>
286
- <DumyPhoto />
287
- <span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
288
- </UploadImageIcon>
289
- </UploadImageIconContainer>
290
- </DragAndDrop>
291
- </ExamineClick>
292
- </LogoImage>
293
- <ImgInfoWrapper>
294
- <h4>{t('HEADER_LOGO', 'Header logo')}</h4>
295
- <p>900 x 200 px</p>
296
- <p>{t('FORMAT', 'Format')}: PNG</p>
297
- </ImgInfoWrapper>
298
- </ImageFormGroup>
299
- )}
300
- {orderingTheme?.loading ? (
301
- <>
302
- <Skeleton height={100} style={{ marginBottom: '15px', width: '100%' }} />
303
- <Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
304
- </>
305
- ) : (
306
- <ImageFormGroup>
307
- <BackgroundImage
308
- onClick={() => handleClickImage('homepage_background')}
309
- >
310
- <ExamineClick
311
- onFiles={files => handleFiles(files, 'homepage_background')}
312
- childRef={(e) => { backgroundRef.current = e }}
313
- accept='image/png, image/jpeg, image/jpg'
323
+ <DragAndDrop
324
+ onDrop={dataTransfer => handleFiles(dataTransfer.files, 'logo')}
325
+ accept='image/png, image/jpeg, image/jpg'
326
+ disabled={orderingTheme.loading}
327
+ >
328
+ {themeValues?.images?.components?.logo?.components?.image && <img src={themeValues?.images?.components?.logo?.components?.image} alt='logo image' loading='lazy' />}
329
+ <UploadImageIconContainer bgimage={themeValues?.images?.components?.logo?.components?.image}>
330
+ <UploadImageIcon>
331
+ <DumyPhoto />
332
+ <span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
333
+ </UploadImageIcon>
334
+ </UploadImageIconContainer>
335
+ </DragAndDrop>
336
+ </ExamineClick>
337
+ </LogoImage>
338
+ <ImgInfoWrapper>
339
+ <h4>{t('HEADER_LOGO', 'Header logo')}</h4>
340
+ <p>900 x 200 px</p>
341
+ <p>{t('FORMAT', 'Format')}: PNG</p>
342
+ </ImgInfoWrapper>
343
+ </ImageFormGroup>
344
+ )}
345
+ {orderingTheme?.loading ? (
346
+ <>
347
+ <Skeleton height={100} style={{ marginBottom: '15px', width: '100%' }} />
348
+ <Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
349
+ </>
350
+ ) : (
351
+ <ImageFormGroup>
352
+ <BackgroundImage
353
+ onClick={() => handleClickImage('homepage_background')}
314
354
  >
315
- <DragAndDrop
316
- onDrop={dataTransfer => handleFiles(dataTransfer.files, 'homepage_background')}
355
+ <ExamineClick
356
+ onFiles={files => handleFiles(files, 'homepage_background')}
357
+ childRef={(e) => { backgroundRef.current = e }}
317
358
  accept='image/png, image/jpeg, image/jpg'
318
- disabled={orderingTheme.loading}
319
359
  >
320
- {themeValues?.images?.components?.homepage_background?.components?.image && <img src={themeValues?.images?.components?.homepage_background?.components?.image} alt='backgrond image' loading='lazy' />}
321
- <UploadImageIconContainer bgimage={!!themeValues?.images?.components?.homepage_background?.components?.image}>
322
- <UploadImageIcon>
323
- <DumyPhoto />
324
- <span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
325
- </UploadImageIcon>
326
- </UploadImageIconContainer>
327
- </DragAndDrop>
328
- </ExamineClick>
329
- </BackgroundImage>
330
- <ImgInfoWrapper>
331
- <h4>{t('HOMEPAGE_BACKGROUND', 'Homepage background')}</h4>
332
- <p>1920 x 1280 px</p>
333
- <p>{t('FORMAT', 'Format')}: PNG</p>
334
- </ImgInfoWrapper>
335
- </ImageFormGroup>
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'
360
+ <DragAndDrop
361
+ onDrop={dataTransfer => handleFiles(dataTransfer.files, 'homepage_background')}
362
+ accept='image/png, image/jpeg, image/jpg'
363
+ disabled={orderingTheme.loading}
364
+ >
365
+ {themeValues?.images?.components?.homepage_background?.components?.image && <img src={themeValues?.images?.components?.homepage_background?.components?.image} alt='backgrond image' loading='lazy' />}
366
+ <UploadImageIconContainer bgimage={!!themeValues?.images?.components?.homepage_background?.components?.image}>
367
+ <UploadImageIcon>
368
+ <DumyPhoto />
369
+ <span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
370
+ </UploadImageIcon>
371
+ </UploadImageIconContainer>
372
+ </DragAndDrop>
373
+ </ExamineClick>
374
+ </BackgroundImage>
375
+ <ImgInfoWrapper>
376
+ <h4>{t('HOMEPAGE_BACKGROUND', 'Homepage background')}</h4>
377
+ <p>1920 x 1280 px</p>
378
+ <p>{t('FORMAT', 'Format')}: PNG</p>
379
+ </ImgInfoWrapper>
380
+ </ImageFormGroup>
381
+ )}
382
+ {orderingTheme?.loading ? (
383
+ <>
384
+ <Skeleton height={100} style={{ marginBottom: '15px', width: '100%' }} />
385
+ <Skeleton height={15} count={3} width={150} style={{ display: 'block', marginBottom: '7px' }} />
386
+ </>
387
+ ) : (
388
+ <ImageFormGroup>
389
+ <BackgroundImage
390
+ onClick={() => handleClickImage('homepage_mobile_background')}
351
391
  >
352
- <DragAndDrop
353
- onDrop={dataTransfer => handleFiles(dataTransfer.files, 'homepage_mobile_background')}
392
+ <ExamineClick
393
+ onFiles={files => handleFiles(files, 'homepage_mobile_background')}
394
+ childRef={(e) => { mobileBackgroundRef.current = e }}
354
395
  accept='image/png, image/jpeg, image/jpg'
355
- disabled={orderingTheme.loading}
356
396
  >
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
- )}
374
- {orderingTheme?.loading ? (
375
- <Skeleton width={200} height={20} />
376
- ) : (
377
- <CheckBoxWrapper
378
- onClick={() => handleChangeValue(!themeValues?.images?.components?.homepage_image_fullscreen, 'images', 'homepage_image_fullscreen')}
379
- >
380
- {themeValues?.images?.components?.homepage_image_fullscreen ? (
381
- <CheckedIcon className='active' />
382
- ) : (
383
- <UnCheckedIcon />
384
- )}
385
- <span>{t('HOMEPAGE_IMAGE_FULLSCREEN', 'Homepage image fullscreen')}</span>
386
- </CheckBoxWrapper>
387
- )}
388
- </InnerBlock>
389
- </InputFormWrapper>
390
- {!orderingTheme?.loading && (
391
- <InputFormWrapper>
392
- <h4>{t('THEME_SETTINGS', 'Theme Settings')}</h4>
393
- <InnerBlock>
394
- <ColorPickerWrapper>
395
- <div>
396
- <p>{t('PRIMARY_COLOR_BUTTONS', 'Primary Color for Buttons')}</p>
397
- <ColorPicker
398
- defaultColor={themeValues?.theme_settings?.components?.style?.primary_btn_color}
399
- onChangeColor={(color) => handleChangeValue(color, 'theme_settings', 'style.primary_btn_color')}
400
- />
401
- </div>
402
- </ColorPickerWrapper>
403
- <ContentWrapper>
404
- <div>
405
- <p>{t('HOMEPAGE_CONTENT', 'Homepage Content')}</p>
406
- <Button
407
- color='primary'
408
- borderRadius='8px'
409
- outline
410
- onClick={() => setHomePageContent(true)}
411
- >
412
- {t('HOMEPAGE_CONTENT', 'Homepage content')}
413
- </Button>
414
- </div>
415
- <div>
416
- <p>{t('FOOTER_CONTENT', 'Footer Content')}</p>
417
- <Button
418
- color='primary'
419
- borderRadius='8px'
420
- outline
421
- onClick={() => setFooterContent(true)}
422
- >
423
- {t('FOOTER_CONTENT', 'Footer content')}
424
- </Button>
425
- </div>
426
- </ContentWrapper>
397
+ <DragAndDrop
398
+ onDrop={dataTransfer => handleFiles(dataTransfer.files, 'homepage_mobile_background')}
399
+ accept='image/png, image/jpeg, image/jpg'
400
+ disabled={orderingTheme.loading}
401
+ >
402
+ {themeValues?.images?.components?.homepage_mobile_background?.components?.image && <img src={themeValues?.images?.components?.homepage_mobile_background?.components?.image} alt='backgrond image' loading='lazy' />}
403
+ <UploadImageIconContainer bgimage={!!themeValues?.images?.components?.homepage_mobile_background?.components?.image}>
404
+ <UploadImageIcon>
405
+ <DumyPhoto />
406
+ <span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
407
+ </UploadImageIcon>
408
+ </UploadImageIconContainer>
409
+ </DragAndDrop>
410
+ </ExamineClick>
411
+ </BackgroundImage>
412
+ <ImgInfoWrapper>
413
+ <h4>{t('HOMEPAGE_MOBILE_BACKGROUND', 'Homepage mobile background')}</h4>
414
+ <p>1440 x 770 px</p>
415
+ <p>{t('FORMAT', 'Format')}: PNG</p>
416
+ </ImgInfoWrapper>
417
+ </ImageFormGroup>
418
+ )}
419
+ {orderingTheme?.loading ? (
420
+ <Skeleton width={200} height={20} />
421
+ ) : (
422
+ <CheckBoxWrapper
423
+ onClick={() => handleChangeValue(!themeValues?.images?.components?.homepage_image_fullscreen, 'images', 'homepage_image_fullscreen')}
424
+ >
425
+ {themeValues?.images?.components?.homepage_image_fullscreen ? (
426
+ <CheckedIcon className='active' />
427
+ ) : (
428
+ <UnCheckedIcon />
429
+ )}
430
+ <span>{t('HOMEPAGE_IMAGE_FULLSCREEN', 'Homepage image fullscreen')}</span>
431
+ </CheckBoxWrapper>
432
+ )}
427
433
  </InnerBlock>
428
434
  </InputFormWrapper>
429
- )}
435
+ {!orderingTheme?.loading && (
436
+ <InputFormWrapper>
437
+ <h4>{t('THEME_SETTINGS', 'Theme Settings')}</h4>
438
+ <InnerBlock>
439
+ <ColorPickerWrapper>
440
+ <div>
441
+ <p>{t('PRIMARY_COLOR_BUTTONS', 'Primary Color for Buttons')}</p>
442
+ <ColorPicker
443
+ defaultColor={themeValues?.theme_settings?.components?.style?.primary_btn_color}
444
+ onChangeColor={(color) => handleChangeValue(color, 'theme_settings', 'style.primary_btn_color')}
445
+ />
446
+ </div>
447
+ </ColorPickerWrapper>
448
+ <ContentWrapper>
449
+ <div>
450
+ <p>{t('HOMEPAGE_CONTENT', 'Homepage Content')}</p>
451
+ <Button
452
+ color='primary'
453
+ borderRadius='8px'
454
+ outline
455
+ onClick={() => setHomePageContent(true)}
456
+ >
457
+ {t('HOMEPAGE_CONTENT', 'Homepage content')}
458
+ </Button>
459
+ </div>
460
+ <div>
461
+ <p>{t('FOOTER_CONTENT', 'Footer Content')}</p>
462
+ <Button
463
+ color='primary'
464
+ borderRadius='8px'
465
+ outline
466
+ onClick={() => setFooterContent(true)}
467
+ >
468
+ {t('FOOTER_CONTENT', 'Footer content')}
469
+ </Button>
470
+ </div>
471
+ </ContentWrapper>
472
+ </InnerBlock>
473
+ </InputFormWrapper>
474
+ )}
430
475
 
431
- <Button
432
- color='primary'
433
- borderRadius='8px'
434
- onClick={() => handleUpdateSiteTheme()}
435
- disabled={orderingTheme?.loading}
436
- >
437
- {t('SAVE', 'Save')}
438
- </Button>
439
- </FormWrapper>
476
+ <Button
477
+ color='primary'
478
+ borderRadius='8px'
479
+ onClick={() => handleUpdateSiteTheme()}
480
+ disabled={orderingTheme?.loading}
481
+ >
482
+ {t('SAVE', 'Save')}
483
+ </Button>
484
+ </FormWrapper>
485
+ )}
486
+ {/* {selectedSetting === 'advanced' && !orderingTheme?.loading && (
487
+ <AdvancedSettings
488
+ themesList={themesList}
489
+ advancedValues={advancedValues}
490
+ setAdvancedValues={setAdvancedValues}
491
+ handleUpdateSiteTheme={handleUpdateSiteTheme}
492
+ />
493
+ )} */}
440
494
  </Container>
441
495
  <Alert
442
496
  title={t('ORDERING', 'Ordering')}