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.
- package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js → ordering-ui-admin.e741ec718656ba6908ef.js} +2 -2
- package/_bundles/{ordering-ui-admin.66a745752c35fb204c80.js.LICENSE.txt → ordering-ui-admin.e741ec718656ba6908ef.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +2 -1
- package/_modules/components/BusinessIntelligence/UsersReviewList/index.js +2 -1
- package/_modules/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +23 -5
- package/_modules/components/Delivery/DriversGroupDetails/index.js +6 -9
- package/_modules/components/Delivery/UsersList/index.js +2 -1
- package/_modules/components/MyProducts/OrderingWebsite/index.js +50 -8
- package/_modules/components/OrderingProducts/OrderingProductsListing/index.js +2 -1
- package/_modules/components/Orders/OrderBill/index.js +17 -17
- package/_modules/components/Profile/ProfilePage/index.js +3 -1
- package/_modules/components/Profile/ProfilePage/styles.js +23 -6
- package/_modules/components/Settings/Deliverect/index.js +103 -0
- package/_modules/components/Settings/Deliverect/styles.js +115 -0
- package/_modules/components/Settings/DoordashConnect/index.js +1 -1
- package/_modules/components/Settings/IntegrationListing/index.js +41 -2
- package/_modules/components/Settings/IntegrationListing/styles.js +7 -4
- package/_modules/components/Settings/ItsaCheckmate/index.js +112 -0
- package/_modules/components/Settings/ItsaCheckmate/styles.js +118 -0
- package/_modules/components/Settings/PickerExpress/index.js +178 -0
- package/_modules/components/Settings/PickerExpress/styles.js +111 -0
- package/_modules/components/Settings/index.js +8 -1
- package/_modules/components/Shared/Modal/styles.js +1 -1
- package/_modules/components/SidebarMenu/index.js +14 -1
- package/_modules/components/SidebarMenu/styles.js +9 -3
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/index.js +95 -0
- package/_modules/components/Stores/BusinessAdd/BusinessDetails/styles.js +43 -0
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +233 -0
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/styles.js +40 -0
- package/_modules/components/Stores/BusinessAdd/Images/index.js +181 -0
- package/_modules/components/Stores/BusinessAdd/Images/styles.js +42 -0
- package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +53 -0
- package/_modules/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +31 -0
- package/_modules/components/Stores/BusinessAdd/OtherDetails/index.js +43 -0
- package/_modules/components/Stores/BusinessAdd/OtherDetails/styles.js +25 -0
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/index.js +48 -0
- package/_modules/components/Stores/BusinessAdd/PaymentMethods/styles.js +31 -0
- package/_modules/components/Stores/BusinessAdd/Photos/index.js +174 -0
- package/_modules/components/Stores/BusinessAdd/Photos/styles.js +46 -0
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/index.js +48 -0
- package/_modules/components/Stores/BusinessAdd/ReceiveOrders/styles.js +24 -0
- package/_modules/components/Stores/BusinessAdd/Schedule/index.js +31 -0
- package/_modules/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
- package/_modules/components/Stores/BusinessAdd/index.js +170 -0
- package/_modules/components/Stores/BusinessAdd/styles.js +29 -0
- package/_modules/components/Stores/BusinessDeliveryDetails/styles.js +1 -1
- package/_modules/components/Stores/BusinessDeliveryPickupMore/index.js +4 -0
- package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
- package/_modules/components/Stores/BusinessPickupDetails/styles.js +1 -1
- package/_modules/components/Stores/BusinessProductAddForm/index.js +5 -5
- package/_modules/components/Stores/BusinessProductsCategoyInfo/index.js +1 -6
- package/_modules/components/Stores/BusinessProductsListing/index.js +38 -14
- package/_modules/components/Stores/BusinessesList/index.js +5 -3
- package/_modules/components/Stores/BusinessesListing/index.js +51 -26
- package/_modules/components/Stores/BusinessesListing/styles.js +22 -15
- package/_modules/components/Stores/BusinessesListingHeader/index.js +6 -5
- package/_modules/components/Stores/ProductStartGuide/index.js +69 -0
- package/_modules/components/Stores/ProductStartGuide/styles.js +28 -0
- package/_modules/components/Stores/ProductStep/index.js +92 -0
- package/_modules/components/Stores/ProductStep/styles.js +18 -0
- package/_modules/components/Stores/RestaurantSelectGuide/index.js +104 -0
- package/_modules/components/Stores/RestaurantSelectGuide/styles.js +44 -0
- package/_modules/components/Stores/index.js +36 -1
- package/_modules/components/Users/ProfessionalAddForm/index.js +16 -3
- package/_modules/components/Users/ProfessionalList/index.js +2 -1
- package/_modules/components/Users/ProfessionalListing/index.js +2 -0
- package/_modules/components/Users/ProfessionalSchedule/Schedule/index.js +36 -0
- package/_modules/components/Users/ProfessionalSchedule/index.js +10 -120
- package/_modules/components/Users/ProfessionalSchedule/styles.js +4 -16
- package/_modules/components/Users/UserFormDetails/index.js +1 -1
- package/_modules/components/Users/UsersList/index.js +5 -4
- package/_modules/components/Users/UsersListingHeader/index.js +5 -2
- package/_modules/components/Users/UsersListingHeader/styles.js +18 -3
- package/_modules/index.js +36 -0
- package/index-template.js +64 -2
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/BusinessReviewList/index.js +1 -0
- package/src/components/BusinessIntelligence/UsersReviewList/index.js +1 -0
- package/src/components/Delivery/DriversGroupDeliveryZoneInformation/index.js +20 -0
- package/src/components/Delivery/DriversGroupDetails/index.js +7 -7
- package/src/components/Delivery/DriversGroupsDeliveryZoneDetails/index.js +1 -1
- package/src/components/Delivery/UsersList/index.js +1 -0
- package/src/components/MyProducts/OrderingWebsite/index.js +45 -3
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +1 -0
- package/src/components/Orders/OrderBill/index.js +20 -22
- package/src/components/Profile/ProfilePage/index.js +16 -2
- package/src/components/Profile/ProfilePage/styles.js +67 -1
- package/src/components/Settings/Deliverect/index.js +149 -0
- package/src/components/Settings/Deliverect/styles.js +344 -0
- package/src/components/Settings/DoordashConnect/index.js +1 -1
- package/src/components/Settings/IntegrationListing/index.js +47 -13
- package/src/components/Settings/IntegrationListing/styles.js +7 -1
- package/src/components/Settings/ItsaCheckmate/index.js +170 -0
- package/src/components/Settings/ItsaCheckmate/styles.js +366 -0
- package/src/components/Settings/PickerExpress/index.js +222 -0
- package/src/components/Settings/PickerExpress/styles.js +330 -0
- package/src/components/Settings/index.js +3 -1
- package/src/components/Shared/Modal/styles.js +1 -1
- package/src/components/SidebarMenu/index.js +21 -3
- package/src/components/SidebarMenu/styles.js +26 -0
- package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +106 -0
- package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +107 -0
- package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +250 -0
- package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +101 -0
- package/src/components/Stores/BusinessAdd/Images/index.js +168 -0
- package/src/components/Stores/BusinessAdd/Images/styles.js +94 -0
- package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/index.js +43 -0
- package/src/components/Stores/BusinessAdd/OrderTypePriceLevel/styles.js +70 -0
- package/src/components/Stores/BusinessAdd/OtherDetails/index.js +51 -0
- package/src/components/Stores/BusinessAdd/OtherDetails/styles.js +49 -0
- package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +39 -0
- package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +46 -0
- package/src/components/Stores/BusinessAdd/Photos/index.js +156 -0
- package/src/components/Stores/BusinessAdd/Photos/styles.js +108 -0
- package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +46 -0
- package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +69 -0
- package/src/components/Stores/BusinessAdd/Schedule/index.js +23 -0
- package/src/components/Stores/BusinessAdd/Schedule/styles.js +14 -0
- package/src/components/Stores/BusinessAdd/index.js +184 -0
- package/src/components/Stores/BusinessAdd/styles.js +85 -0
- package/src/components/Stores/BusinessDeliveryDetails/styles.js +1 -0
- package/src/components/Stores/BusinessDeliveryPickupMore/index.js +9 -1
- package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +8 -10
- package/src/components/Stores/BusinessPickupDetails/styles.js +1 -0
- package/src/components/Stores/BusinessProductAddForm/index.js +13 -11
- package/src/components/Stores/BusinessProductsCategoyInfo/index.js +4 -7
- package/src/components/Stores/BusinessProductsListing/index.js +20 -0
- package/src/components/Stores/BusinessesList/index.js +4 -2
- package/src/components/Stores/BusinessesListing/index.js +101 -67
- package/src/components/Stores/BusinessesListing/styles.js +36 -0
- package/src/components/Stores/BusinessesListingHeader/index.js +58 -51
- package/src/components/Stores/ProductStartGuide/index.js +60 -0
- package/src/components/Stores/ProductStartGuide/styles.js +62 -0
- package/src/components/Stores/ProductStep/index.js +84 -0
- package/src/components/Stores/ProductStep/styles.js +29 -0
- package/src/components/Stores/RestaurantSelectGuide/index.js +119 -0
- package/src/components/Stores/RestaurantSelectGuide/styles.js +150 -0
- package/src/components/Stores/index.js +11 -1
- package/src/components/Users/ProfessionalAddForm/index.js +11 -1
- package/src/components/Users/ProfessionalList/index.js +1 -0
- package/src/components/Users/ProfessionalListing/index.js +2 -0
- package/src/components/Users/ProfessionalSchedule/Schedule/index.js +32 -0
- package/src/components/Users/ProfessionalSchedule/index.js +9 -49
- package/src/components/Users/ProfessionalSchedule/styles.js +0 -49
- package/src/components/Users/UserFormDetails/index.js +1 -1
- package/src/components/Users/UsersList/index.js +4 -2
- package/src/components/Users/UsersListingHeader/index.js +17 -2
- package/src/components/Users/UsersListingHeader/styles.js +59 -0
- package/src/index.js +14 -2
- package/template/app.js +4 -0
- package/template/assets/images/dummies/no-businesses.png +0 -0
- package/template/assets/images/import-menu.png +0 -0
- package/template/assets/images/imported-menu.png +0 -0
- package/template/assets/images/picker-express.png +0 -0
- package/template/components/ListenPageChanges/index.js +1 -0
- package/template/config.json +1 -1
- package/template/helmetdata.json +7 -0
- 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'
|
|
@@ -99,8 +100,13 @@ import { PaymentOptionMethods } from './PaymentOptionMethods'
|
|
|
99
100
|
import { BusinessPublishing } from './BusinessPublishing'
|
|
100
101
|
import { ServiceDetail } from './ServiceDetail'
|
|
101
102
|
import { ProductVideos } from './ProductVideos'
|
|
103
|
+
import { ProductStartGuide } from './ProductStartGuide'
|
|
104
|
+
import { ImportersButton } from './ImportersButton'
|
|
105
|
+
import { RestaurantSelectGuide } from './RestaurantSelectGuide'
|
|
106
|
+
import { ProductStep } from './ProductStep'
|
|
102
107
|
|
|
103
108
|
export {
|
|
109
|
+
BusinessAdd,
|
|
104
110
|
BusinessBrandListing,
|
|
105
111
|
BusinessesListing,
|
|
106
112
|
BusinessProductsListing,
|
|
@@ -201,5 +207,9 @@ export {
|
|
|
201
207
|
PaymentOptionMethods,
|
|
202
208
|
BusinessPublishing,
|
|
203
209
|
ServiceDetail,
|
|
204
|
-
ProductVideos
|
|
210
|
+
ProductVideos,
|
|
211
|
+
ProductStartGuide,
|
|
212
|
+
ImportersButton,
|
|
213
|
+
RestaurantSelectGuide,
|
|
214
|
+
ProductStep
|
|
205
215
|
}
|
|
@@ -13,6 +13,7 @@ import { sortInputFields, bytesConverter } from '../../../utils'
|
|
|
13
13
|
import Skeleton from 'react-loading-skeleton'
|
|
14
14
|
import BiImage from '@meronex/icons/bi/BiImage'
|
|
15
15
|
import { XLg } from 'react-bootstrap-icons'
|
|
16
|
+
import { OccupationSelector } from '../OccupationSelector'
|
|
16
17
|
|
|
17
18
|
import {
|
|
18
19
|
FormContainer,
|
|
@@ -42,7 +43,8 @@ const ProfessionalAddFormUI = (props) => {
|
|
|
42
43
|
handlechangeImage,
|
|
43
44
|
handleChangeSwtich,
|
|
44
45
|
onClose,
|
|
45
|
-
isService
|
|
46
|
+
isService,
|
|
47
|
+
occupations
|
|
46
48
|
} = props
|
|
47
49
|
const formMethods = useForm()
|
|
48
50
|
const [, t] = useLanguage()
|
|
@@ -221,6 +223,13 @@ const ProfessionalAddFormUI = (props) => {
|
|
|
221
223
|
</ExamineClick>
|
|
222
224
|
</Image>
|
|
223
225
|
</UserImage>
|
|
226
|
+
<InputWrapper>
|
|
227
|
+
<label>{t('SPECIALIST', 'Specialist')}</label>
|
|
228
|
+
<OccupationSelector
|
|
229
|
+
occupations={occupations}
|
|
230
|
+
handleChangeOccupation={id => handleChangeInput({ target: { name: 'occupation_id', value: id } })}
|
|
231
|
+
/>
|
|
232
|
+
</InputWrapper>
|
|
224
233
|
{!validationFields?.loading ? (
|
|
225
234
|
<>
|
|
226
235
|
{sortInputFields({ values: validationFields?.fields?.checkout }).map(field =>
|
|
@@ -292,6 +301,7 @@ const ProfessionalAddFormUI = (props) => {
|
|
|
292
301
|
message: t('VALIDATION_ERROR_PASSWORD_MIN_STRING', 'The Password must be at least 8 characters.').replace('_attribute_', t('PASSWORD', 'Password')).replace('_min_', 8)
|
|
293
302
|
}
|
|
294
303
|
})}
|
|
304
|
+
autoComplete='new-password'
|
|
295
305
|
/>
|
|
296
306
|
</InputWrapper>
|
|
297
307
|
)}
|
|
@@ -321,6 +321,7 @@ export const ProfessionalList = (props) => {
|
|
|
321
321
|
totalPages={paginationProps.totalPages}
|
|
322
322
|
handleChangePage={handleChangePage}
|
|
323
323
|
handleChangePageSize={handleChangePageSize}
|
|
324
|
+
defaultPageSize={paginationProps?.pageSize}
|
|
324
325
|
/>
|
|
325
326
|
</WrapperPagination>
|
|
326
327
|
)}
|
|
@@ -99,6 +99,7 @@ const ProfessionalListingUI = (props) => {
|
|
|
99
99
|
<>
|
|
100
100
|
<UsersListingContainer>
|
|
101
101
|
<UsersListingHeader
|
|
102
|
+
isProfessionals
|
|
102
103
|
title={headerTitle}
|
|
103
104
|
searchValue={searchValue}
|
|
104
105
|
onSearch={onSearch}
|
|
@@ -169,6 +170,7 @@ const ProfessionalListingUI = (props) => {
|
|
|
169
170
|
onClose={() => setOpenUserAddForm(false)}
|
|
170
171
|
>
|
|
171
172
|
<ProfessionalAddForm
|
|
173
|
+
occupations={occupationsState.occupations}
|
|
172
174
|
handleSuccessAdd={handleSuccessAddUser}
|
|
173
175
|
onClose={() => setOpenUserAddForm(false)}
|
|
174
176
|
/>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { memo } from 'react'
|
|
2
|
+
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
+
import { Schedule as ScheduleController } from '../../../Shared'
|
|
4
|
+
import {
|
|
5
|
+
ScheduleWrapper,
|
|
6
|
+
ScheduleContentWrapper
|
|
7
|
+
} from '../styles'
|
|
8
|
+
|
|
9
|
+
function SchedulePropsAreEqual (prevProps, nextProps) {
|
|
10
|
+
return JSON.stringify(prevProps.scheduleList) === JSON.stringify(nextProps.scheduleList)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Schedule = memo((props) => {
|
|
14
|
+
const {
|
|
15
|
+
handleChangeScheduleState,
|
|
16
|
+
scheduleList
|
|
17
|
+
} = props
|
|
18
|
+
|
|
19
|
+
const [, t] = useLanguage()
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<ScheduleWrapper>
|
|
23
|
+
<h1>{t('SCHEDULE', 'Schedule')}</h1>
|
|
24
|
+
<ScheduleContentWrapper>
|
|
25
|
+
<ScheduleController
|
|
26
|
+
scheduleList={scheduleList}
|
|
27
|
+
handleChangeScheduleState={val => handleChangeScheduleState(val)}
|
|
28
|
+
/>
|
|
29
|
+
</ScheduleContentWrapper>
|
|
30
|
+
</ScheduleWrapper>
|
|
31
|
+
)
|
|
32
|
+
}, SchedulePropsAreEqual)
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
|
1
|
+
import React, { useEffect, useState, useCallback } from 'react'
|
|
2
2
|
import { useLanguage, ProfessionalSchedule as ProfessionalScheduleController } from 'ordering-components-admin-external'
|
|
3
3
|
import { Circle as UnCheckIcon, RecordCircleFill as CheckIcon } from 'react-bootstrap-icons'
|
|
4
|
-
import {
|
|
5
|
-
import { Schedule } from '../../Shared'
|
|
4
|
+
import { Schedule } from './Schedule'
|
|
6
5
|
import { Button, Input } from '../../../styles'
|
|
7
6
|
|
|
8
7
|
import {
|
|
9
8
|
Container,
|
|
10
9
|
DateRangeWrapper,
|
|
11
10
|
RangeItem,
|
|
12
|
-
ScheduleWrapper,
|
|
13
|
-
SelectWrapper,
|
|
14
|
-
Option,
|
|
15
|
-
ScheduleContentWrapper,
|
|
16
11
|
ButtonWrapper
|
|
17
12
|
} from './styles'
|
|
18
13
|
|
|
@@ -27,33 +22,12 @@ const ProfessionalScheduleUI = (props) => {
|
|
|
27
22
|
|
|
28
23
|
const [, t] = useLanguage()
|
|
29
24
|
const [isMaxDays, setIsMaxDays] = useState(false)
|
|
30
|
-
const [scheduleType, setScheduleType] = useState('')
|
|
31
|
-
|
|
32
|
-
const defaultSchedule = [
|
|
33
|
-
{ enabled: true, lapses: [{ open: { hour: 0, minute: 0 }, close: { hour: 23, minute: 59 } }] },
|
|
34
|
-
{ enabled: true, lapses: [{ open: { hour: 0, minute: 0 }, close: { hour: 23, minute: 59 } }] },
|
|
35
|
-
{ enabled: true, lapses: [{ open: { hour: 0, minute: 0 }, close: { hour: 23, minute: 59 } }] },
|
|
36
|
-
{ enabled: true, lapses: [{ open: { hour: 0, minute: 0 }, close: { hour: 23, minute: 59 } }] },
|
|
37
|
-
{ enabled: true, lapses: [{ open: { hour: 0, minute: 0 }, close: { hour: 23, minute: 59 } }] },
|
|
38
|
-
{ enabled: true, lapses: [{ open: { hour: 0, minute: 0 }, close: { hour: 23, minute: 59 } }] },
|
|
39
|
-
{ enabled: true, lapses: [{ open: { hour: 0, minute: 0 }, close: { hour: 23, minute: 59 } }] }
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
const typeList = [
|
|
43
|
-
{ value: 'default', content: <Option>{t('USE_DEFAULT_SCHEDULE', 'Use default schedule')}</Option> },
|
|
44
|
-
{ value: 'customize', content: <Option>{t('CUSTOMIZE_SCHEDULE', 'Customize schedule')}</Option> }
|
|
45
|
-
]
|
|
46
25
|
|
|
47
26
|
const handleIndefinitelyClick = () => {
|
|
48
27
|
handleChangeItem({ max_days_in_future: null })
|
|
49
28
|
setIsMaxDays(false)
|
|
50
29
|
}
|
|
51
30
|
|
|
52
|
-
const handleChangeScheduleType = (val) => {
|
|
53
|
-
setScheduleType(val)
|
|
54
|
-
if (val === 'default') handleChangeItem({ schedule: defaultSchedule })
|
|
55
|
-
}
|
|
56
|
-
|
|
57
31
|
const handlClickFutureDay = (e) => {
|
|
58
32
|
if (e.target.closest('.max_days_in_future')) return
|
|
59
33
|
setIsMaxDays(true)
|
|
@@ -63,9 +37,10 @@ const ProfessionalScheduleUI = (props) => {
|
|
|
63
37
|
handleUpdateClick && handleUpdateClick()
|
|
64
38
|
}
|
|
65
39
|
|
|
40
|
+
const changeSchedule = useCallback((val) => handleChangeItem({ schedule: val }), [])
|
|
41
|
+
|
|
66
42
|
useEffect(() => {
|
|
67
43
|
if (typeof user?.max_days_in_future === 'number') setIsMaxDays(true)
|
|
68
|
-
if (user?.schedule) setScheduleType('customize')
|
|
69
44
|
}, [user])
|
|
70
45
|
|
|
71
46
|
return (
|
|
@@ -100,26 +75,11 @@ const ProfessionalScheduleUI = (props) => {
|
|
|
100
75
|
<label>{t('INDEFINITELY_INTO_THE_FUTURE', 'Indefinitely into the future')}</label>
|
|
101
76
|
</RangeItem>
|
|
102
77
|
</DateRangeWrapper>
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
className='select'
|
|
109
|
-
defaultValue={scheduleType}
|
|
110
|
-
placeholder={t('SELECT_OPTION', 'Select an option')}
|
|
111
|
-
onChange={(value) => handleChangeScheduleType(value)}
|
|
112
|
-
/>
|
|
113
|
-
</SelectWrapper>
|
|
114
|
-
{scheduleType === 'customize' && (
|
|
115
|
-
<ScheduleContentWrapper>
|
|
116
|
-
<Schedule
|
|
117
|
-
scheduleList={user?.schedule}
|
|
118
|
-
handleChangeScheduleState={val => handleChangeItem({ schedule: val })}
|
|
119
|
-
/>
|
|
120
|
-
</ScheduleContentWrapper>
|
|
121
|
-
)}
|
|
122
|
-
</ScheduleWrapper>
|
|
78
|
+
<Schedule
|
|
79
|
+
key={user?.id}
|
|
80
|
+
scheduleList={user?.schedule}
|
|
81
|
+
handleChangeScheduleState={changeSchedule}
|
|
82
|
+
/>
|
|
123
83
|
</Container>
|
|
124
84
|
<ButtonWrapper>
|
|
125
85
|
<Button
|
|
@@ -69,55 +69,6 @@ export const ScheduleWrapper = styled.div`
|
|
|
69
69
|
margin-bottom: 15px;
|
|
70
70
|
}
|
|
71
71
|
`
|
|
72
|
-
|
|
73
|
-
export const SelectWrapper = styled.div`
|
|
74
|
-
margin-bottom: 15px;
|
|
75
|
-
|
|
76
|
-
> div {
|
|
77
|
-
width: 100%;
|
|
78
|
-
border: none;
|
|
79
|
-
|
|
80
|
-
> div:first-child {
|
|
81
|
-
background-color: ${props => props.theme.colors.secundary};
|
|
82
|
-
height: 43px;
|
|
83
|
-
border: none;
|
|
84
|
-
border-radius: 7.6px;
|
|
85
|
-
font-weight: 400;
|
|
86
|
-
font-size: 14px;
|
|
87
|
-
line-height: 24px;
|
|
88
|
-
color: ${props => props.theme.colors.secundaryContrast};
|
|
89
|
-
}
|
|
90
|
-
.list {
|
|
91
|
-
background-color: ${props => props.theme.colors.secundary};
|
|
92
|
-
border: none;
|
|
93
|
-
|
|
94
|
-
.search-bar-container {
|
|
95
|
-
padding: 10px;
|
|
96
|
-
input {
|
|
97
|
-
background-color: transparent;
|
|
98
|
-
height: 44px;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.list-wrapper {
|
|
103
|
-
> div {
|
|
104
|
-
padding: 6px 10px;
|
|
105
|
-
&:hover {
|
|
106
|
-
background-color: #f2f5f7;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
`
|
|
113
|
-
|
|
114
|
-
export const Option = styled.div`
|
|
115
|
-
font-weight: 400;
|
|
116
|
-
font-size: 14px;
|
|
117
|
-
line-height: 24px;
|
|
118
|
-
color: ${props => props.theme.colors.secundaryContrast};
|
|
119
|
-
`
|
|
120
|
-
|
|
121
72
|
export const ScheduleContentWrapper = styled.div`
|
|
122
73
|
border-top: 1px solid ${props => props.theme.colors.borderColor};
|
|
123
74
|
`
|
|
@@ -263,7 +263,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
263
263
|
</React.Fragment>
|
|
264
264
|
)
|
|
265
265
|
)}
|
|
266
|
-
{isProfessional && occupations
|
|
266
|
+
{isProfessional && occupations?.length > 0 && (
|
|
267
267
|
<OccupationSelector
|
|
268
268
|
occupationId={user?.occupation_id}
|
|
269
269
|
occupations={occupations}
|
|
@@ -66,7 +66,7 @@ export const UsersList = (props) => {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
const handleChangePage = (page) => {
|
|
69
|
-
getUsers(page,
|
|
69
|
+
getUsers(page, paginationProps?.pageSize)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
const handleChangePageSize = (pageSize) => {
|
|
@@ -147,7 +147,7 @@ export const UsersList = (props) => {
|
|
|
147
147
|
</tr>
|
|
148
148
|
</thead>
|
|
149
149
|
{usersList.loading ? (
|
|
150
|
-
[...Array(10).keys()].map(i => (
|
|
150
|
+
[...Array(paginationProps?.pageSize || 10).keys()].map(i => (
|
|
151
151
|
<tbody key={i}>
|
|
152
152
|
<tr>
|
|
153
153
|
<td>
|
|
@@ -269,10 +269,12 @@ export const UsersList = (props) => {
|
|
|
269
269
|
{usersList?.users.length > 0 && (
|
|
270
270
|
<WrapperPagination>
|
|
271
271
|
<Pagination
|
|
272
|
+
defaultPageSize={paginationProps?.pageSize}
|
|
272
273
|
currentPage={paginationProps.currentPage}
|
|
273
274
|
totalPages={paginationProps.totalPages}
|
|
274
275
|
handleChangePage={handleChangePage}
|
|
275
276
|
handleChangePageSize={handleChangePageSize}
|
|
277
|
+
defaultPageSize={paginationProps?.pageSize}
|
|
276
278
|
/>
|
|
277
279
|
</WrapperPagination>
|
|
278
280
|
)}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
3
|
import { SearchBar } from '../../Shared'
|
|
4
|
-
import { List as MenuIcon } from 'react-bootstrap-icons'
|
|
4
|
+
import { List as MenuIcon, InfoCircle } from 'react-bootstrap-icons'
|
|
5
5
|
import { IconButton } from '../../../styles'
|
|
6
6
|
import { useInfoShare } from '../../../contexts/InfoShareContext'
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
HeaderContainer,
|
|
10
10
|
HeaderTitleContainer,
|
|
11
|
-
ActionContainer
|
|
11
|
+
ActionContainer,
|
|
12
|
+
InfoWrapper,
|
|
13
|
+
InfoContent
|
|
12
14
|
} from './styles'
|
|
13
15
|
|
|
14
16
|
export const UsersListingHeader = (props) => {
|
|
15
17
|
const {
|
|
18
|
+
isProfessionals,
|
|
16
19
|
title,
|
|
17
20
|
searchValue,
|
|
18
21
|
onSearch
|
|
@@ -33,6 +36,18 @@ export const UsersListingHeader = (props) => {
|
|
|
33
36
|
</IconButton>
|
|
34
37
|
)}
|
|
35
38
|
<h1>{title}</h1>
|
|
39
|
+
{isProfessionals && (
|
|
40
|
+
<InfoWrapper>
|
|
41
|
+
<IconButton
|
|
42
|
+
color='primary'
|
|
43
|
+
>
|
|
44
|
+
<InfoCircle />
|
|
45
|
+
</IconButton>
|
|
46
|
+
<InfoContent>
|
|
47
|
+
{t('PROFESSIONALS_INFO', 'Create, assign and manage your professionals. Once the professional link his Google account, continue synchronizing your appointments with the professionals user using the Synchronize button inside of the account. Select the stores and configure the schedules for your services.')}
|
|
48
|
+
</InfoContent>
|
|
49
|
+
</InfoWrapper>
|
|
50
|
+
)}
|
|
36
51
|
</HeaderTitleContainer>
|
|
37
52
|
<ActionContainer>
|
|
38
53
|
<SearchBar
|
|
@@ -74,3 +74,62 @@ export const ActionContainer = styled.div`
|
|
|
74
74
|
margin-top: 0px;
|
|
75
75
|
}
|
|
76
76
|
`
|
|
77
|
+
export const InfoWrapper = styled.div`
|
|
78
|
+
position: relative;
|
|
79
|
+
${props => props.theme?.rtl ? css`
|
|
80
|
+
margin-left: -8px;
|
|
81
|
+
margin-right: 8px;
|
|
82
|
+
` : css`
|
|
83
|
+
margin-right: -8px;
|
|
84
|
+
margin-left: 8px;
|
|
85
|
+
`}
|
|
86
|
+
|
|
87
|
+
> button {
|
|
88
|
+
height: 25px;
|
|
89
|
+
svg {
|
|
90
|
+
width: 16px;
|
|
91
|
+
height: 16px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
&:hover > div {
|
|
95
|
+
visibility: visible;
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
`
|
|
99
|
+
|
|
100
|
+
export const InfoContent = styled.div`
|
|
101
|
+
position: absolute;
|
|
102
|
+
top: 100%;
|
|
103
|
+
z-index: 999;
|
|
104
|
+
background: ${props => props.theme.colors.backgroundInfo};
|
|
105
|
+
border: 1px solid ${props => props.theme.colors.primary};
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
|
|
108
|
+
border-radius: 7.6px;
|
|
109
|
+
padding: 8px 12px;
|
|
110
|
+
font-size: 12px;
|
|
111
|
+
line-height: 18px;
|
|
112
|
+
min-width: 150px;
|
|
113
|
+
transition: all 0.3s linear;
|
|
114
|
+
visibility: hidden;
|
|
115
|
+
opacity: 0;
|
|
116
|
+
right: 0px;
|
|
117
|
+
${props => props.theme.rtl && css`
|
|
118
|
+
left: 0px;
|
|
119
|
+
right: initial;
|
|
120
|
+
`}
|
|
121
|
+
|
|
122
|
+
@media (min-width: 576px) {
|
|
123
|
+
min-width: 350px;
|
|
124
|
+
padding: 12px 15px;
|
|
125
|
+
left: 0px;
|
|
126
|
+
${props => props.theme.rtl && css`
|
|
127
|
+
right: 0px;
|
|
128
|
+
left: initial;
|
|
129
|
+
`}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media (min-width: 993px) {
|
|
133
|
+
min-width: 535px;
|
|
134
|
+
}
|
|
135
|
+
`
|