ordering-ui-admin-external 1.8.4 → 1.9.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 (110) hide show
  1. package/_bundles/{ordering-ui-admin.ec185d6eb5351ecebfac.js → ordering-ui-admin.46b3298439d9527907e3.js} +2 -2
  2. package/_bundles/{ordering-ui-admin.ec185d6eb5351ecebfac.js.LICENSE.txt → ordering-ui-admin.46b3298439d9527907e3.js.LICENSE.txt} +0 -0
  3. package/_modules/components/MyProducts/OrderingWebsite/index.js +50 -8
  4. package/_modules/components/Settings/Deliverect/index.js +103 -0
  5. package/_modules/components/Settings/Deliverect/styles.js +115 -0
  6. package/_modules/components/Settings/IntegrationListing/index.js +41 -2
  7. package/_modules/components/Settings/IntegrationListing/styles.js +7 -4
  8. package/_modules/components/Settings/ItsaCheckmate/index.js +112 -0
  9. package/_modules/components/Settings/ItsaCheckmate/styles.js +118 -0
  10. package/_modules/components/Settings/PickerExpress/index.js +178 -0
  11. package/_modules/components/Settings/PickerExpress/styles.js +111 -0
  12. package/_modules/components/Settings/PlaceListing/index.js +1 -6
  13. package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +95 -0
  14. package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +43 -0
  15. package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +233 -0
  16. package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +40 -0
  17. package/_modules/components/Stores/BusinessAdd/Images/index.js +181 -0
  18. package/_modules/components/Stores/BusinessAdd/Images/styles.js +42 -0
  19. package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +53 -0
  20. package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +31 -0
  21. package/_modules/components/Stores/BusinessAdd/OtherDetails/index.js +43 -0
  22. package/_modules/components/Stores/BusinessAdd/OtherDetails/styles.js +25 -0
  23. package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +48 -0
  24. package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +31 -0
  25. package/_modules/components/Stores/BusinessAdd/Photos/index.js +174 -0
  26. package/_modules/components/Stores/BusinessAdd/Photos/styles.js +46 -0
  27. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +48 -0
  28. package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +24 -0
  29. package/_modules/components/Stores/BusinessAdd/Schedule/index.js +31 -0
  30. package/_modules/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
  31. package/_modules/components/Stores/BusinessAdd/index.js +170 -0
  32. package/_modules/components/Stores/BusinessAdd/styles.js +29 -0
  33. package/_modules/components/Stores/BusinessDeliveryDetails/styles.js +1 -1
  34. package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +4 -0
  35. package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
  36. package/_modules/components/Stores/BusinessPickupDetails/styles.js +1 -1
  37. package/_modules/components/Stores/BusinessProductAddForm/index.js +4 -4
  38. package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +1 -6
  39. package/_modules/components/Stores/BusinessProductsListing/index.js +38 -14
  40. package/_modules/components/Stores/BusinessesList/index.js +3 -2
  41. package/_modules/components/Stores/BusinessesListing/index.js +51 -26
  42. package/_modules/components/Stores/BusinessesListing/styles.js +22 -15
  43. package/_modules/components/Stores/BusinessesListingHeader/index.js +6 -5
  44. package/_modules/components/Stores/ProductStartGuide/index.js +69 -0
  45. package/_modules/components/Stores/ProductStartGuide/styles.js +28 -0
  46. package/_modules/components/Stores/ProductStep/index.js +92 -0
  47. package/_modules/components/Stores/ProductStep/styles.js +18 -0
  48. package/_modules/components/Stores/RestaurantSelectGuide/index.js +104 -0
  49. package/_modules/components/Stores/RestaurantSelectGuide/styles.js +44 -0
  50. package/_modules/components/Stores/index.js +7 -0
  51. package/_modules/index.js +6 -0
  52. package/index-template.js +64 -2
  53. package/package.json +2 -2
  54. package/src/components/MyProducts/OrderingWebsite/index.js +45 -3
  55. package/src/components/Settings/Deliverect/index.js +149 -0
  56. package/src/components/Settings/Deliverect/styles.js +344 -0
  57. package/src/components/Settings/IntegrationListing/index.js +46 -12
  58. package/src/components/Settings/IntegrationListing/styles.js +7 -1
  59. package/src/components/Settings/ItsaCheckmate/index.js +170 -0
  60. package/src/components/Settings/ItsaCheckmate/styles.js +366 -0
  61. package/src/components/Settings/PickerExpress/index.js +222 -0
  62. package/src/components/Settings/PickerExpress/styles.js +330 -0
  63. package/src/components/Settings/PlaceListing/index.js +2 -2
  64. package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +106 -0
  65. package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +107 -0
  66. package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +250 -0
  67. package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +101 -0
  68. package/src/components/Stores/BusinessAdd/Images/index.js +168 -0
  69. package/src/components/Stores/BusinessAdd/Images/styles.js +94 -0
  70. package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +43 -0
  71. package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +70 -0
  72. package/src/components/Stores/BusinessAdd/OtherDetails/index.js +51 -0
  73. package/src/components/Stores/BusinessAdd/OtherDetails/styles.js +49 -0
  74. package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +39 -0
  75. package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +46 -0
  76. package/src/components/Stores/BusinessAdd/Photos/index.js +156 -0
  77. package/src/components/Stores/BusinessAdd/Photos/styles.js +108 -0
  78. package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +46 -0
  79. package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +69 -0
  80. package/src/components/Stores/BusinessAdd/Schedule/index.js +23 -0
  81. package/src/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
  82. package/src/components/Stores/BusinessAdd/index.js +184 -0
  83. package/src/components/Stores/BusinessAdd/styles.js +85 -0
  84. package/src/components/Stores/BusinessDeliveryDetails/styles.js +1 -0
  85. package/src/components/Stores/BusinessDeliveryPickupMore/index.js +9 -1
  86. package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +8 -10
  87. package/src/components/Stores/BusinessPickupDetails/styles.js +1 -0
  88. package/src/components/Stores/BusinessProductAddForm/index.js +1 -1
  89. package/src/components/Stores/BusinessProductsCategoyInfo/index.js +4 -7
  90. package/src/components/Stores/BusinessProductsListing/index.js +20 -0
  91. package/src/components/Stores/BusinessesList/index.js +3 -2
  92. package/src/components/Stores/BusinessesListing/index.js +101 -67
  93. package/src/components/Stores/BusinessesListing/styles.js +36 -0
  94. package/src/components/Stores/BusinessesListingHeader/index.js +58 -51
  95. package/src/components/Stores/ProductStartGuide/index.js +60 -0
  96. package/src/components/Stores/ProductStartGuide/styles.js +62 -0
  97. package/src/components/Stores/ProductStep/index.js +84 -0
  98. package/src/components/Stores/ProductStep/styles.js +29 -0
  99. package/src/components/Stores/RestaurantSelectGuide/index.js +119 -0
  100. package/src/components/Stores/RestaurantSelectGuide/styles.js +150 -0
  101. package/src/components/Stores/index.js +2 -0
  102. package/src/index.js +2 -0
  103. package/template/app.js +4 -0
  104. package/template/assets/images/dummies/no-businesses.png +0 -0
  105. package/template/assets/images/import-menu.png +0 -0
  106. package/template/assets/images/imported-menu.png +0 -0
  107. package/template/assets/images/picker-express.png +0 -0
  108. package/template/components/ListenPageChanges/index.js +1 -0
  109. package/template/helmetdata.json +7 -0
  110. package/template/pages/BusinessAdd/index.js +11 -0
@@ -0,0 +1,119 @@
1
+ import React, { useEffect, useState } from 'react'
2
+ import Skeleton from 'react-loading-skeleton'
3
+ import { useLanguage, useConfig, GoogleAutocompleteInput } from 'ordering-components-admin-external'
4
+ import { Select } from '../../../styles/Select/FirstSelect'
5
+ import { ArrowRight, Image } from 'react-bootstrap-icons'
6
+ import { Button } from '../../../styles'
7
+ import {
8
+ Container,
9
+ SelectWrapper,
10
+ Option,
11
+ ButtonWrapper,
12
+ SearchWrapper,
13
+ EmptyData
14
+ } from './styles'
15
+
16
+ export const RestaurantSelectGuide = (props) => {
17
+ const {
18
+ setBusiness,
19
+ businessList,
20
+ setStep,
21
+ onClose,
22
+ handleImport,
23
+ handleChangeAddress,
24
+ orderingBusiness,
25
+ isLoading,
26
+ business
27
+ } = props
28
+
29
+ const [, t] = useLanguage()
30
+ const [options, setOptions] = useState([])
31
+ const [{ configs }] = useConfig()
32
+
33
+ const googleMapsApiKey = configs?.google_maps_api_key?.value
34
+
35
+ const handleSubmit = () => {
36
+ setStep(3)
37
+ handleImport()
38
+ }
39
+
40
+ const handleSelectBusiness = (id) => {
41
+ const _business = businessList.find(item => item._id === id)
42
+ setBusiness(_business)
43
+ }
44
+
45
+ useEffect(() => {
46
+ const _options = businessList?.map(item => {
47
+ return {
48
+ value: item._id,
49
+ content: (
50
+ <Option>
51
+ {item?.logo_photos[0]
52
+ ? <img src={item.logo_photos[0]} alt='' />
53
+ : <Image />}
54
+ {item.name}
55
+ </Option>)
56
+ }
57
+ })
58
+ setOptions(_options)
59
+ }, [businessList])
60
+
61
+ return (
62
+ <Container>
63
+ <h2>{t('SELECT_YOUR_RESTAURANT_FROM_THIS_LIST', 'Select your restaurant from this list.')}</h2>
64
+ <SearchWrapper>
65
+ <label>{t('ADDRESS', 'Address')}</label>
66
+ <GoogleAutocompleteInput
67
+ name='address'
68
+ className='input-autocomplete'
69
+ apiKey={googleMapsApiKey}
70
+ placeholder={t('ADDRESS', 'Address')}
71
+ onChangeAddress={(e) => {
72
+ handleChangeAddress(e)
73
+ }}
74
+ defaultValue={orderingBusiness?.address ?? ''}
75
+ autoComplete='new-password'
76
+ countryCode={configs?.country_autocomplete?.value || '*'}
77
+ />
78
+ </SearchWrapper>
79
+ {isLoading && (
80
+ <SelectWrapper>
81
+ <label>
82
+ <Skeleton height={15} width={100} />
83
+ </label>
84
+ <Skeleton height={44} />
85
+ </SelectWrapper>
86
+ )}
87
+ {!isLoading && options?.length > 0 && (
88
+ <SelectWrapper>
89
+ <label>{t('SELECT_YOUR_RESTAURANT', 'Select your restaurant')}</label>
90
+ <Select
91
+ options={options}
92
+ className='select'
93
+ defaultValue={business?._id || ''}
94
+ placeholder={t('SELECT_BUSINESS', 'Select a Business')}
95
+ onChange={(value) => handleSelectBusiness(value)}
96
+ searchBarIsCustomLayout
97
+ searchBarIsNotLazyLoad
98
+ />
99
+ </SelectWrapper>
100
+ )}
101
+ {!isLoading && options.length === 0 && (
102
+ <EmptyData>
103
+ {t('NO_RESULT', 'There are no results')}
104
+ </EmptyData>
105
+ )}
106
+ <ButtonWrapper>
107
+ <span onClick={() => onClose()}>{t('SKIP', 'Skip')}</span>
108
+ <Button
109
+ color='primary'
110
+ onClick={handleSubmit}
111
+ disabled={!business?._id}
112
+ >
113
+ {t('CONTINUE', 'Continue')}
114
+ <ArrowRight />
115
+ </Button>
116
+ </ButtonWrapper>
117
+ </Container>
118
+ )
119
+ }
@@ -0,0 +1,150 @@
1
+ import styled from 'styled-components'
2
+ import { darken } from 'polished'
3
+
4
+ export const Container = styled.div`
5
+ h2 {
6
+ font-weight: 600;
7
+ font-size: 24px;
8
+ line-height: 36px;
9
+ text-align: center;
10
+ margin: 0;
11
+ }
12
+ `
13
+
14
+ export const SelectWrapper = styled.div`
15
+ margin-top: 30px;
16
+
17
+ label {
18
+ font-weight: 400;
19
+ font-size: 14px;
20
+ line-height: 24px;
21
+ margin-bottom: 10px;
22
+ }
23
+
24
+ > div {
25
+ width: 100%;
26
+ border: none;
27
+
28
+ > div:first-child {
29
+ background-color: ${props => props.theme.colors.secundary};
30
+ height: 43px;
31
+ border: none;
32
+ border-radius: 7.6px;
33
+ font-weight: 400;
34
+ font-size: 14px;
35
+ line-height: 24px;
36
+ color: ${props => props.theme.colors.secundaryContrast};
37
+ }
38
+ .list {
39
+ background-color: ${props => props.theme.colors.secundary};
40
+ border: none;
41
+
42
+ .search-bar-container {
43
+ padding: 10px;
44
+ input {
45
+ background-color: transparent;
46
+ height: 44px;
47
+ }
48
+ }
49
+
50
+ .list-wrapper {
51
+ max-height: 200px;
52
+ > div {
53
+ padding: 6px 10px;
54
+ &:hover {
55
+ background-color: #f2f5f7;
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ `
62
+
63
+ export const Option = styled.div`
64
+ display: flex;
65
+ align-items: center;
66
+ font-weight: 400;
67
+ font-size: 14px;
68
+ line-height: 24px;
69
+ color: ${props => props.theme.colors.secundaryContrast};
70
+ img {
71
+ width: 24px;
72
+ height: 24px;
73
+ border-radius: 7px;
74
+ margin-right: 10px;
75
+ }
76
+ svg {
77
+ font-size: 24px;
78
+ border-radius: 7px;
79
+ margin-right: 10px;
80
+ }
81
+ `
82
+
83
+ export const ButtonWrapper = styled.div`
84
+ margin-top: 60px;
85
+ display: flex;
86
+ justify-content: space-between;
87
+ align-items: center;
88
+ span {
89
+ font-weight: 600;
90
+ font-size: 16px;
91
+ line-height: 24px;
92
+ cursor: pointer;
93
+ }
94
+ button {
95
+ min-width: 300px;
96
+ border-radius: 8px;
97
+ height: 44px;
98
+ position: relative;
99
+ svg {
100
+ position: absolute;
101
+ right: 15px;
102
+ top: 10px;
103
+ font-size: 21px;
104
+ }
105
+ }
106
+ `
107
+
108
+ export const SearchWrapper = styled.div`
109
+ label {
110
+ font-weight: 400;
111
+ font-size: 14px;
112
+ line-height: 24px;
113
+ margin-bottom: 12px;
114
+ }
115
+ input {
116
+ width: 100%;
117
+ height: 44px;
118
+ }
119
+ .input-autocomplete {
120
+ width: 100%;
121
+ background: ${props => props.theme.colors?.backgroundPage || '#FFF'};
122
+ border: 1px solid ${props => props.theme.colors.borderColor};
123
+ border-radius: 8px;
124
+ font-size: 14px;
125
+ padding: 10px 15px;
126
+ outline: none;
127
+ ::placeholder {
128
+ color: ${props => props.theme.colors.secundaryLight};
129
+ }
130
+
131
+ &:-ms-input-placeholder {
132
+ color: ${props => props.theme.colors.secundaryLight};
133
+ }
134
+
135
+ &::-ms-input-placeholder { /* Microsoft Edge */
136
+ color: ${props => props.theme.colors.secundaryLight};
137
+ }
138
+ &:focus {
139
+ border-color: ${() => darken(0.07, '#CCC')};
140
+ }
141
+ }
142
+ `
143
+
144
+ export const EmptyData = styled.p`
145
+ font-weight: 600;
146
+ font-size: 16px;
147
+ line-height: 24px;
148
+ text-align: center;
149
+ margin-top: 30px;
150
+ `
@@ -1,3 +1,4 @@
1
+ import { BusinessAdd } from './BusinessAdd'
1
2
  import { BusinessBrandListing } from './BusinessBrandListing'
2
3
  import { BusinessesListing } from './BusinessesListing'
3
4
  import { BusinessProductsListing } from './BusinessProductsListing'
@@ -101,6 +102,7 @@ import { ServiceDetail } from './ServiceDetail'
101
102
  import { ProductVideos } from './ProductVideos'
102
103
 
103
104
  export {
105
+ BusinessAdd,
104
106
  BusinessBrandListing,
105
107
  BusinessesListing,
106
108
  BusinessProductsListing,
package/src/index.js CHANGED
@@ -278,6 +278,7 @@ import {
278
278
  ProductMainDetails,
279
279
  BusinessSharedMenuProductDetails,
280
280
  BusinessSpreadSheet,
281
+ BusinessAdd,
281
282
  SingleBusinessProduct,
282
283
  BusinessTypeDetail,
283
284
  ProductDetatilsInformation,
@@ -615,6 +616,7 @@ export {
615
616
  BusinessDetails,
616
617
  BusinessFrontLayout,
617
618
  BusinessMenu,
619
+ BusinessAdd,
618
620
  BusinessNotifications,
619
621
  BusinessOrderingChannels,
620
622
  BusinessPaymentMethods,
package/template/app.js CHANGED
@@ -71,6 +71,7 @@ import { QueryLogin } from '../src/components/Login'
71
71
  import { PluginSettings } from './pages/PluginSettings'
72
72
  import { Profile } from './pages/Profile'
73
73
  import settings from './config.json'
74
+ import { BusinessAdd } from './pages/BusinessAdd'
74
75
 
75
76
  export const App = () => {
76
77
  const [{ auth, loading, user }] = useSession()
@@ -231,6 +232,9 @@ export const App = () => {
231
232
  <ProtectedRoute path='/stores/brand' allowedLevels={[0]}>
232
233
  <BrandManager />
233
234
  </ProtectedRoute>
235
+ <ProtectedRoute path='/stores/add' allowedLevels={[0, 2]}>
236
+ <BusinessAdd />
237
+ </ProtectedRoute>
234
238
 
235
239
  <ProtectedRoute path='/users/customers' allowedLevels={[0]}>
236
240
  <CustomersList />
@@ -21,6 +21,7 @@ export const ListenPageChanges = ({ children }) => {
21
21
  professionals: '/users/professionals',
22
22
  login: '/login',
23
23
  businesses: '/stores/list',
24
+ business_add: '/stores/add',
24
25
  brand: '/stores/brand',
25
26
  store: '/stores/products/:store?',
26
27
  basic_settings: '/settings/basic',
@@ -55,6 +55,13 @@
55
55
  "robots": "index, follow",
56
56
  "canonicalUrl": ""
57
57
  },
58
+ "business_add": {
59
+ "title": "Business Add",
60
+ "description": "a dummy description about this page",
61
+ "keywords": "test, dummy, data",
62
+ "robots": "index, follow",
63
+ "canonicalUrl": ""
64
+ },
58
65
  "brand": {
59
66
  "title": "Businesse Brand",
60
67
  "description": "a dummy description about this page",
@@ -0,0 +1,11 @@
1
+ import React from 'react'
2
+ import { HelmetTags } from '../../components/HelmetTags'
3
+ import { BusinessAdd as BusinessAddController } from '../../../src/components/Stores'
4
+ export const BusinessAdd = (props) => {
5
+ return (
6
+ <>
7
+ <HelmetTags page='business_add' />
8
+ <BusinessAddController {...props} />
9
+ </>
10
+ )
11
+ }