ordering-ui-admin-external 1.12.4 → 1.13.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.778c933a70a4ed38f970.js → ordering-ui-admin.05ac04aa1fd8fa5d0ac3.js} +2 -2
- package/_bundles/{ordering-ui-admin.778c933a70a4ed38f970.js.LICENSE.txt → ordering-ui-admin.05ac04aa1fd8fa5d0ac3.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessIntelligence/BusinessReviewDetails/index.js +2 -12
- package/_modules/components/BusinessIntelligence/BusinessReviewList/index.js +5 -3
- package/_modules/components/BusinessIntelligence/BusinessReviewList/styles.js +1 -1
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/index.js +31 -49
- package/_modules/components/BusinessIntelligence/ReviewProductsListing/styles.js +20 -33
- package/_modules/components/BusinessIntelligence/ReviewsListing/index.js +54 -7
- package/_modules/components/BusinessIntelligence/ReviewsListing/styles.js +7 -3
- package/_modules/components/Delivery/DriversGroupGeneralForm/index.js +14 -14
- package/_modules/components/Loyalty/GiftCards/index.js +168 -0
- package/_modules/components/Loyalty/GiftCards/styles.js +80 -0
- package/_modules/components/Loyalty/PointsWalletLevels/index.js +5 -2
- package/_modules/components/Marketing/PageBanner/index.js +3 -1
- package/_modules/components/Marketing/PageBanner/styles.js +1 -1
- package/_modules/components/MyProducts/CustomProject/index.js +49 -0
- package/_modules/components/MyProducts/CustomProject/styles.js +27 -0
- package/_modules/components/MyProducts/index.js +8 -1
- package/_modules/components/Orders/OrderDetailsHeader/index.js +4 -4
- package/_modules/components/Settings/ApiKeysList/index.js +3 -1
- package/_modules/components/Settings/ApiKeysList/styles.js +4 -10
- package/_modules/components/Settings/Deliverect/index.js +4 -1
- package/_modules/components/Settings/Deliverect/styles.js +33 -31
- package/_modules/components/Settings/DoordashConnect/index.js +4 -1
- package/_modules/components/Settings/DoordashConnect/styles.js +31 -29
- package/_modules/components/Settings/ItsaCheckmate/index.js +4 -1
- package/_modules/components/Settings/ItsaCheckmate/styles.js +33 -39
- package/_modules/components/Settings/LalamoveConnect/index.js +4 -1
- package/_modules/components/Settings/LalamoveConnect/styles.js +32 -30
- package/_modules/components/Settings/LanguageTransTable/index.js +9 -2
- package/_modules/components/Settings/PickerExpress/index.js +4 -1
- package/_modules/components/Settings/PickerExpress/styles.js +32 -30
- package/_modules/components/Settings/PluginList/index.js +3 -1
- package/_modules/components/Settings/PluginList/styles.js +4 -8
- package/_modules/components/Settings/SettingsDetail/index.js +4 -1
- package/_modules/components/Settings/SettingsDetail/styles.js +15 -21
- package/_modules/components/Settings/SettingsList/index.js +16 -0
- package/_modules/components/Settings/SettingsList/styles.js +4 -1
- package/_modules/components/Settings/WebhookList/index.js +4 -2
- package/_modules/components/Settings/WebhookList/styles.js +4 -8
- package/_modules/components/Shared/ImageCrop/index.js +4 -2
- package/_modules/components/SidebarMenu/index.js +6 -1
- package/_modules/components/Stores/BusinessCateringDelivery/index.js +215 -0
- package/_modules/components/Stores/BusinessCateringDelivery/styles.js +20 -0
- package/_modules/components/Stores/BusinessDetails/index.js +5 -2
- package/_modules/components/Stores/BusinessPreorderDetails/index.js +18 -4
- package/_modules/components/Stores/BusinessPreorderDetails/styles.js +7 -5
- package/_modules/components/Stores/BusinessSummary/index.js +1 -1
- package/_modules/components/Stores/BusinessesListing/index.js +14 -14
- package/_modules/components/Stores/BusinessesListing/styles.js +1 -3
- package/_modules/components/Stores/PaymentOption/index.js +4 -4
- package/_modules/components/Stores/ProductTagDetails/styles.js +1 -1
- package/_modules/components/Stores/SeoOptions/styles.js +1 -1
- package/_modules/index.js +6 -0
- package/index-template.js +3 -1
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/BusinessReviewDetails/index.js +3 -7
- package/src/components/BusinessIntelligence/BusinessReviewList/index.js +13 -9
- package/src/components/BusinessIntelligence/BusinessReviewList/styles.js +2 -1
- package/src/components/BusinessIntelligence/ReviewProductsListing/index.js +33 -55
- package/src/components/BusinessIntelligence/ReviewProductsListing/styles.js +3 -53
- package/src/components/BusinessIntelligence/ReviewsListing/index.js +59 -8
- package/src/components/BusinessIntelligence/ReviewsListing/styles.js +19 -0
- package/src/components/Delivery/DriversGroupGeneralForm/index.js +14 -14
- package/src/components/Loyalty/GiftCards/index.js +200 -0
- package/src/components/Loyalty/GiftCards/styles.js +147 -0
- package/src/components/Loyalty/PointsWalletLevels/index.js +9 -12
- package/src/components/Marketing/PageBanner/index.js +4 -3
- package/src/components/Marketing/PageBanner/styles.js +5 -0
- package/src/components/MyProducts/CustomProject/index.js +56 -0
- package/src/components/MyProducts/CustomProject/styles.js +108 -0
- package/src/components/MyProducts/index.js +3 -1
- package/src/components/Orders/OrderDetailsHeader/index.js +2 -2
- package/src/components/Settings/ApiKeysList/index.js +5 -4
- package/src/components/Settings/ApiKeysList/styles.js +5 -11
- package/src/components/Settings/Deliverect/index.js +2 -3
- package/src/components/Settings/Deliverect/styles.js +23 -0
- package/src/components/Settings/DoordashConnect/index.js +2 -3
- package/src/components/Settings/DoordashConnect/styles.js +23 -0
- package/src/components/Settings/ItsaCheckmate/index.js +2 -3
- package/src/components/Settings/ItsaCheckmate/styles.js +23 -26
- package/src/components/Settings/LalamoveConnect/index.js +2 -3
- package/src/components/Settings/LalamoveConnect/styles.js +23 -0
- package/src/components/Settings/LanguageTransTable/index.js +12 -2
- package/src/components/Settings/PickerExpress/index.js +2 -3
- package/src/components/Settings/PickerExpress/styles.js +23 -0
- package/src/components/Settings/PluginList/index.js +4 -3
- package/src/components/Settings/PluginList/styles.js +3 -6
- package/src/components/Settings/SettingsDetail/index.js +3 -4
- package/src/components/Settings/SettingsDetail/styles.js +24 -27
- package/src/components/Settings/SettingsList/index.js +43 -0
- package/src/components/Settings/SettingsList/styles.js +1 -1
- package/src/components/Settings/WebhookList/index.js +5 -4
- package/src/components/Settings/WebhookList/styles.js +3 -5
- package/src/components/Shared/ImageCrop/index.js +4 -2
- package/src/components/SidebarMenu/index.js +8 -1
- package/src/components/Stores/BusinessCateringDelivery/index.js +174 -0
- package/src/components/Stores/BusinessCateringDelivery/styles.js +53 -0
- package/src/components/Stores/BusinessDetails/index.js +5 -2
- package/src/components/Stores/BusinessPreorderDetails/index.js +38 -11
- package/src/components/Stores/BusinessPreorderDetails/styles.js +9 -1
- package/src/components/Stores/BusinessSummary/index.js +1 -1
- package/src/components/Stores/BusinessesListing/index.js +57 -56
- package/src/components/Stores/BusinessesListing/styles.js +3 -11
- package/src/components/Stores/PaymentOption/index.js +1 -1
- package/src/components/Stores/ProductTagDetails/styles.js +1 -0
- package/src/components/Stores/SeoOptions/styles.js +1 -0
- package/src/index.js +3 -1
- package/template/app.js +4 -4
- package/template/assets/images/myProducts/custom-project.png +0 -0
- package/template/components/ListenPageChanges/index.js +1 -1
- package/template/helmetdata.json +7 -7
- package/template/pages/CustomProject/index.js +12 -0
- package/template/pages/ReviewProducts/index.js +0 -22
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
+
import React, { useRef } from 'react'
|
|
4
|
+
import { Input, Button } from '../../../styles'
|
|
5
|
+
import { SwitchContainer, Section, InputContainer, CateringContainer } from './styles'
|
|
6
|
+
export const BusinessCateringDelivery = (props) => {
|
|
7
|
+
const {
|
|
8
|
+
business,
|
|
9
|
+
type,
|
|
10
|
+
changePreorderConfigs
|
|
11
|
+
} = props
|
|
12
|
+
const [, t] = useLanguage()
|
|
13
|
+
|
|
14
|
+
const cateringValues = business?.configs?.filter(config => config.key.includes('preorder')).map(config => ({
|
|
15
|
+
name: config.key,
|
|
16
|
+
value: config.value.split('|').find(val => val.includes(type)).split(',')[1],
|
|
17
|
+
id: config.id
|
|
18
|
+
}))
|
|
19
|
+
const ref_preorder_lead_time = useRef()
|
|
20
|
+
const ref_preorder_slot_interval = useRef()
|
|
21
|
+
const ref_preorder_time_range = useRef()
|
|
22
|
+
const ref_preorder_minimum_days = useRef()
|
|
23
|
+
const ref_preorder_maximum_days = useRef()
|
|
24
|
+
let timeout = null
|
|
25
|
+
let previousSearch
|
|
26
|
+
const handleClickDefaultButton = (catering, ref) => {
|
|
27
|
+
if (ref.current.value === catering.value.toString()) return
|
|
28
|
+
ref.current.value = catering.value
|
|
29
|
+
changePreorderConfigs({ value: catering.value, type, id: catering.id })
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const onChange = (catering) => {
|
|
33
|
+
if (previousSearch !== catering.value) {
|
|
34
|
+
clearTimeout(timeout)
|
|
35
|
+
timeout = setTimeout(() => {
|
|
36
|
+
changePreorderConfigs({ value: catering.value, type, id: catering.id })
|
|
37
|
+
}, 750)
|
|
38
|
+
}
|
|
39
|
+
previousSearch = catering.value
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<CateringContainer>
|
|
44
|
+
<h1>
|
|
45
|
+
{t(type.toUpperCase(), type.includes('delivery') ? 'Catering delivery' : 'Catering pickup')}
|
|
46
|
+
</h1>
|
|
47
|
+
<Section>
|
|
48
|
+
<SwitchContainer>
|
|
49
|
+
<p>
|
|
50
|
+
{t('LEAD_TIMES_PER_ORDER_TYPE', 'Lead times per order type')}
|
|
51
|
+
</p>
|
|
52
|
+
<p>
|
|
53
|
+
{t('DEFAULT', 'Default')} = 0 ({t('ALLOWS_ASAP_ORDERS', 'allows asap orders')}).
|
|
54
|
+
</p>
|
|
55
|
+
</SwitchContainer>
|
|
56
|
+
<InputContainer>
|
|
57
|
+
<Input
|
|
58
|
+
ref={ref_preorder_lead_time}
|
|
59
|
+
placeholder='MM'
|
|
60
|
+
defaultValue={cateringValues.find(val => val.name === 'preorder_lead_time')?.value}
|
|
61
|
+
onChange={(evt) => onChange({ value: evt.target.value, type, id: cateringValues.find(val => val.name === 'preorder_lead_time')?.id })}
|
|
62
|
+
onFocus={() => { previousSearch = null }}
|
|
63
|
+
/>
|
|
64
|
+
<p>({t('MINUTES', 'Minutes')})</p>
|
|
65
|
+
<Button
|
|
66
|
+
onClick={() => handleClickDefaultButton({ value: 0, id: cateringValues.find(val => val.name === 'preorder_lead_time')?.id }, ref_preorder_lead_time)}
|
|
67
|
+
>
|
|
68
|
+
{t('USE_DEFAULT_VALUE', 'Use default value')}
|
|
69
|
+
</Button>
|
|
70
|
+
</InputContainer>
|
|
71
|
+
</Section>
|
|
72
|
+
<Section>
|
|
73
|
+
<SwitchContainer>
|
|
74
|
+
<p>
|
|
75
|
+
{t('SLOT_TIMES', 'Slot times')}
|
|
76
|
+
</p>
|
|
77
|
+
<p>
|
|
78
|
+
{t('DEFAULT', 'Default')} = 30 {t('MINUTES', 'minutes')}.
|
|
79
|
+
</p>
|
|
80
|
+
</SwitchContainer>
|
|
81
|
+
<InputContainer>
|
|
82
|
+
<Input
|
|
83
|
+
ref={ref_preorder_slot_interval}
|
|
84
|
+
placeholder='30'
|
|
85
|
+
defaultValue={cateringValues.find(val => val.name === 'preorder_slot_interval')?.value}
|
|
86
|
+
onChange={(evt) => onChange({ value: evt.target.value, type, id: cateringValues.find(val => val.name === 'preorder_slot_interval')?.id })}
|
|
87
|
+
onFocus={() => { previousSearch = null }}
|
|
88
|
+
/>
|
|
89
|
+
<p>({t('MINUTES', 'Minutes')})</p>
|
|
90
|
+
<Button
|
|
91
|
+
onClick={() => handleClickDefaultButton({ value: 30, id: cateringValues.find(val => val.name === 'preorder_slot_interval')?.id }, ref_preorder_slot_interval)}
|
|
92
|
+
>
|
|
93
|
+
{t('USE_DEFAULT_VALUE', 'Use default value')}
|
|
94
|
+
</Button>
|
|
95
|
+
</InputContainer>
|
|
96
|
+
</Section>
|
|
97
|
+
<Section>
|
|
98
|
+
<SwitchContainer>
|
|
99
|
+
<p>
|
|
100
|
+
{t('TIME_RANGE', 'Time range')}
|
|
101
|
+
</p>
|
|
102
|
+
<p>
|
|
103
|
+
{t('DEFAULT', 'Default')} = 30 {t('MINUTES', 'minutes')}.
|
|
104
|
+
</p>
|
|
105
|
+
</SwitchContainer>
|
|
106
|
+
<InputContainer>
|
|
107
|
+
<Input
|
|
108
|
+
placeholder='30'
|
|
109
|
+
defaultValue={cateringValues.find(val => val.name === 'preorder_time_range')?.value}
|
|
110
|
+
onChange={(evt) => onChange({ value: evt.target.value, id: cateringValues.find(val => val.name === 'preorder_time_range')?.id, type })}
|
|
111
|
+
ref={ref_preorder_time_range}
|
|
112
|
+
onFocus={() => { previousSearch = null }}
|
|
113
|
+
/>
|
|
114
|
+
<p>({t('MINUTES', 'Minutes')})</p>
|
|
115
|
+
<Button
|
|
116
|
+
onClick={() => handleClickDefaultButton({ value: 30, id: cateringValues.find(val => val.name === 'preorder_time_range')?.id }, ref_preorder_time_range)}
|
|
117
|
+
>
|
|
118
|
+
{t('USE_DEFAULT_VALUE', 'Use default value')}
|
|
119
|
+
</Button>
|
|
120
|
+
</InputContainer>
|
|
121
|
+
</Section>
|
|
122
|
+
<Section>
|
|
123
|
+
<SwitchContainer>
|
|
124
|
+
<p>
|
|
125
|
+
{t('MINIMUM_DAYS_PREORDER_ORDER_TYPE', 'Minimum days to preorder per order type')}
|
|
126
|
+
</p>
|
|
127
|
+
<p>
|
|
128
|
+
{t('DEFAULT', 'Default')} = 0 ({t('ALLOWS_ASAP_ORDERS', 'allows asap orders')}).
|
|
129
|
+
</p>
|
|
130
|
+
</SwitchContainer>
|
|
131
|
+
<InputContainer>
|
|
132
|
+
<Input
|
|
133
|
+
ref={ref_preorder_minimum_days}
|
|
134
|
+
placeholder='0'
|
|
135
|
+
defaultValue={cateringValues.find(val => val.name === 'preorder_minimum_days')?.value}
|
|
136
|
+
onChange={(evt) => onChange({ value: evt.target.value, id: cateringValues.find(val => val.name === 'preorder_minimum_days')?.id, type })}
|
|
137
|
+
onFocus={() => { previousSearch = null }}
|
|
138
|
+
/>
|
|
139
|
+
<p>({t('DAYS', 'Days')})</p>
|
|
140
|
+
<Button
|
|
141
|
+
onClick={() => handleClickDefaultButton({ value: 0, id: cateringValues.find(val => val.name === 'preorder_minimum_days')?.id }, ref_preorder_minimum_days)}
|
|
142
|
+
>
|
|
143
|
+
{t('USE_DEFAULT_VALUE', 'Use default value')}
|
|
144
|
+
</Button>
|
|
145
|
+
</InputContainer>
|
|
146
|
+
</Section>
|
|
147
|
+
<Section>
|
|
148
|
+
<SwitchContainer>
|
|
149
|
+
<p>
|
|
150
|
+
{t('MAXIMUM_DAYS', 'Maximum days')}
|
|
151
|
+
</p>
|
|
152
|
+
<p>
|
|
153
|
+
{t('DEFAULT', 'Default')} = 15 {t('DAYS', 'Days')}
|
|
154
|
+
</p>
|
|
155
|
+
</SwitchContainer>
|
|
156
|
+
<InputContainer>
|
|
157
|
+
<Input
|
|
158
|
+
ref={ref_preorder_maximum_days}
|
|
159
|
+
placeholder='15'
|
|
160
|
+
defaultValue={cateringValues.find(val => val.name === 'preorder_maximum_days')?.value}
|
|
161
|
+
onChange={(evt) => onChange({ value: evt.target.value, id: cateringValues.find(val => val.name === 'preorder_maximum_days')?.id, type })}
|
|
162
|
+
onFocus={() => { previousSearch = null }}
|
|
163
|
+
/>
|
|
164
|
+
<p>({t('DAYS', 'Days')})</p>
|
|
165
|
+
<Button
|
|
166
|
+
onClick={() => handleClickDefaultButton({ value: 15, id: cateringValues.find(val => val.name === 'preorder_maximum_days')?.id }, ref_preorder_maximum_days)}
|
|
167
|
+
>
|
|
168
|
+
{t('USE_DEFAULT_VALUE', 'Use default value')}
|
|
169
|
+
</Button>
|
|
170
|
+
</InputContainer>
|
|
171
|
+
</Section>
|
|
172
|
+
</CateringContainer>
|
|
173
|
+
)
|
|
174
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const CateringContainer = styled.div`
|
|
4
|
+
h1{
|
|
5
|
+
margin: 10px 0px;
|
|
6
|
+
font-size: 16px;
|
|
7
|
+
}
|
|
8
|
+
p {
|
|
9
|
+
margin-bottom: 0;
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
}
|
|
12
|
+
`
|
|
13
|
+
|
|
14
|
+
export const SwitchContainer = styled.div`
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
margin-bottom: 20px;
|
|
18
|
+
p {
|
|
19
|
+
margin-right: 20px;
|
|
20
|
+
}
|
|
21
|
+
label {
|
|
22
|
+
margin-top: 3px;
|
|
23
|
+
}
|
|
24
|
+
`
|
|
25
|
+
|
|
26
|
+
export const Section = styled.div`
|
|
27
|
+
margin-bottom: 40px;
|
|
28
|
+
margin-top: 20px;
|
|
29
|
+
`
|
|
30
|
+
|
|
31
|
+
export const InputContainer = styled.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
margin-bottom: 20px;
|
|
35
|
+
input {
|
|
36
|
+
text-align: center;
|
|
37
|
+
width: 80px;
|
|
38
|
+
margin-right: 10px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
p {
|
|
42
|
+
margin-right: 20px;
|
|
43
|
+
}
|
|
44
|
+
`
|
|
45
|
+
|
|
46
|
+
export const CheckboxContainer = styled.div`
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
margin-bottom: 10px;
|
|
50
|
+
p{
|
|
51
|
+
margin-left: 20px;
|
|
52
|
+
}
|
|
53
|
+
`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { BusinessDetails as BusinessDetailsController
|
|
2
|
+
import { useSession, useLanguage, BusinessDetails as BusinessDetailsController } from 'ordering-components-admin-external'
|
|
3
3
|
import { useWindowSize } from '../../../hooks/useWindowSize'
|
|
4
4
|
import { BusinessSummary } from '../BusinessSummary'
|
|
5
5
|
import { BusinessSupport } from '../BusinessSupport'
|
|
@@ -43,7 +43,8 @@ export const BusinessDetailsUI = (props) => {
|
|
|
43
43
|
handleUpdateBusinessState,
|
|
44
44
|
handleDuplicateBusiness,
|
|
45
45
|
handleDeleteBusiness,
|
|
46
|
-
actionStatus
|
|
46
|
+
actionStatus,
|
|
47
|
+
handleUpdatePreorderConfigs
|
|
47
48
|
} = props
|
|
48
49
|
|
|
49
50
|
const [, t] = useLanguage()
|
|
@@ -238,7 +239,9 @@ export const BusinessDetailsUI = (props) => {
|
|
|
238
239
|
formState={formState}
|
|
239
240
|
setFormState={setFormState}
|
|
240
241
|
business={businessState?.business}
|
|
242
|
+
actionStatus={actionStatus}
|
|
241
243
|
handleUpdateBusinessClick={handleUpdateBusinessClick}
|
|
244
|
+
handleUpdatePreorderConfigs={handleUpdatePreorderConfigs}
|
|
242
245
|
/>
|
|
243
246
|
)}
|
|
244
247
|
{selectedItem === 'custom_fields' && (
|
|
@@ -4,15 +4,20 @@ import { Button } from '../../../styles'
|
|
|
4
4
|
import {
|
|
5
5
|
BusinessPreorderContainer,
|
|
6
6
|
PreorderTimeWrapper,
|
|
7
|
-
TimeBlock
|
|
7
|
+
TimeBlock,
|
|
8
|
+
Margin
|
|
8
9
|
} from './styles'
|
|
10
|
+
import { Divider } from '../ProductDesktopPreview/styles'
|
|
11
|
+
import { BusinessCateringDelivery } from '../BusinessCateringDelivery'
|
|
9
12
|
|
|
10
13
|
export const BusinessPreorderDetails = (props) => {
|
|
11
14
|
const {
|
|
12
15
|
business,
|
|
13
16
|
formState,
|
|
14
17
|
setFormState,
|
|
15
|
-
handleUpdateBusinessClick
|
|
18
|
+
handleUpdateBusinessClick,
|
|
19
|
+
handleUpdatePreorderConfigs,
|
|
20
|
+
actionStatus
|
|
16
21
|
} = props
|
|
17
22
|
|
|
18
23
|
const [, t] = useLanguage()
|
|
@@ -57,6 +62,12 @@ export const BusinessPreorderDetails = (props) => {
|
|
|
57
62
|
})
|
|
58
63
|
}
|
|
59
64
|
|
|
65
|
+
const changePreorderConfigs = (params) => {
|
|
66
|
+
const cateringString = business?.configs?.find(config => config?.id === params?.id)?.value
|
|
67
|
+
const stringParam = cateringString.split('|').map(string => string.includes(params.type) ? `${params.type},${params.value}` : string).join('|')
|
|
68
|
+
handleUpdatePreorderConfigs(stringParam, params.id)
|
|
69
|
+
}
|
|
70
|
+
|
|
60
71
|
useEffect(() => {
|
|
61
72
|
setFormState({
|
|
62
73
|
...formState,
|
|
@@ -71,7 +82,7 @@ export const BusinessPreorderDetails = (props) => {
|
|
|
71
82
|
|
|
72
83
|
return (
|
|
73
84
|
<BusinessPreorderContainer>
|
|
74
|
-
<h1>{t('
|
|
85
|
+
<h1>{t('PREORDERS_SETTING', 'Preorders and lead times')}</h1>
|
|
75
86
|
<PreorderTimeWrapper>
|
|
76
87
|
<p className='name'>{t('PREORDER_TIME', 'Pre order time')}</p>
|
|
77
88
|
<p className='description'>{t('PREORDER_TIME_DESC', 'The anticipation time before activating the pre order')}</p>
|
|
@@ -100,15 +111,31 @@ export const BusinessPreorderDetails = (props) => {
|
|
|
100
111
|
}
|
|
101
112
|
</select>
|
|
102
113
|
</TimeBlock>
|
|
114
|
+
<Button
|
|
115
|
+
borderRadius='8px'
|
|
116
|
+
color='primary'
|
|
117
|
+
disabled={formState.loading || Object.keys(formState.changes).length === 0}
|
|
118
|
+
onClick={handleUpdateBusinessClick}
|
|
119
|
+
>
|
|
120
|
+
{t('SAVE', 'Save')}
|
|
121
|
+
</Button>
|
|
103
122
|
</PreorderTimeWrapper>
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
|
|
123
|
+
{/* <Divider />
|
|
124
|
+
<BusinessCateringDelivery
|
|
125
|
+
minutes={minutes}
|
|
126
|
+
type='catering_delivery'
|
|
127
|
+
business={business}
|
|
128
|
+
changePreorderConfigs={changePreorderConfigs}
|
|
129
|
+
disabled={actionStatus?.loading}
|
|
130
|
+
/>
|
|
131
|
+
<BusinessCateringDelivery
|
|
132
|
+
minutes={minutes}
|
|
133
|
+
type='catering_pickup'
|
|
134
|
+
business={business}
|
|
135
|
+
changePreorderConfigs={changePreorderConfigs}
|
|
136
|
+
disabled={actionStatus?.loading}
|
|
137
|
+
/>
|
|
138
|
+
<Margin /> */}
|
|
112
139
|
</BusinessPreorderContainer>
|
|
113
140
|
)
|
|
114
141
|
}
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components'
|
|
|
3
3
|
export const BusinessPreorderContainer = styled.div`
|
|
4
4
|
padding: 20px;
|
|
5
5
|
height: 100%;
|
|
6
|
-
|
|
6
|
+
margin-bottom: 20px;
|
|
7
7
|
h1 {
|
|
8
8
|
font-size: 20px;
|
|
9
9
|
font-weight: 700;
|
|
@@ -32,6 +32,10 @@ export const PreorderTimeWrapper = styled.div`
|
|
|
32
32
|
margin: 5px 0 18px;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
button {
|
|
36
|
+
margin-top: 20px;
|
|
37
|
+
margin-bottom: 10px;
|
|
38
|
+
}
|
|
35
39
|
`
|
|
36
40
|
|
|
37
41
|
export const TimeBlock = styled.div`
|
|
@@ -55,3 +59,7 @@ export const TimeBlock = styled.div`
|
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
`
|
|
62
|
+
|
|
63
|
+
export const Margin = styled.div`
|
|
64
|
+
height: 20px;
|
|
65
|
+
`
|
|
@@ -177,10 +177,46 @@ const BusinessesListingUI = (props) => {
|
|
|
177
177
|
noBusinesses={noBusinesses}
|
|
178
178
|
openAddBusiness={openAddBusiness}
|
|
179
179
|
/>
|
|
180
|
+
<ViewContainer>
|
|
181
|
+
<BusinessActiveStateFilter
|
|
182
|
+
selectedBusinessActiveState={selectedBusinessActiveState}
|
|
183
|
+
handleChangeBusinessActiveState={handleChangeBusinessActiveState}
|
|
184
|
+
/>
|
|
185
|
+
{!noBusinesses && (
|
|
186
|
+
<WrapperView>
|
|
187
|
+
<ViewMethodButton
|
|
188
|
+
active={viewMethod === 'card'}
|
|
189
|
+
onClick={() => handleViewMethod('card')}
|
|
190
|
+
>
|
|
191
|
+
<BsGrid />
|
|
192
|
+
</ViewMethodButton>
|
|
193
|
+
<ViewMethodButton
|
|
194
|
+
active={viewMethod === 'list'}
|
|
195
|
+
onClick={() => handleViewMethod('list')}
|
|
196
|
+
>
|
|
197
|
+
<BsViewList />
|
|
198
|
+
</ViewMethodButton>
|
|
199
|
+
</WrapperView>
|
|
200
|
+
)}
|
|
201
|
+
</ViewContainer>
|
|
202
|
+
{!noBusinesses && (
|
|
203
|
+
<ButtonGroup isSelect={businessIds?.length > 0}>
|
|
204
|
+
<BusinessTypeFilter
|
|
205
|
+
businessTypes={props.businessTypes}
|
|
206
|
+
defaultBusinessType={props.defaultBusinessType}
|
|
207
|
+
handleChangeBusinessType={handleChangeBusinessType}
|
|
208
|
+
setBusinessTypes={setBusinessTypes}
|
|
209
|
+
/>
|
|
210
|
+
{businessIds?.length > 0 && (
|
|
211
|
+
<BusinessDelete
|
|
212
|
+
handleDeleteMultiBusinesses={handleDeleteMultiBusinesses}
|
|
213
|
+
/>
|
|
214
|
+
)}
|
|
215
|
+
</ButtonGroup>
|
|
216
|
+
)}
|
|
180
217
|
{noBusinesses ? (
|
|
181
218
|
<EmptyBusinessWrapper>
|
|
182
219
|
<img src={theme.images.dummies.noBusinesses} alt='' />
|
|
183
|
-
<h2>{t('NO_BUSINESSES_DESCRIPTION', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse cursus adipiscing risus odio. Turpis nibh phasellus interdum vulputate urna, cursus pellentesque. Nec quis donec lobortis enim magna non turpis faucibus. ')}</h2>
|
|
184
220
|
<Button
|
|
185
221
|
color='primary'
|
|
186
222
|
borderRadius='7.6px'
|
|
@@ -190,61 +226,26 @@ const BusinessesListingUI = (props) => {
|
|
|
190
226
|
</Button>
|
|
191
227
|
</EmptyBusinessWrapper>
|
|
192
228
|
) : (
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
</ViewContainer>
|
|
214
|
-
<ButtonGroup isSelect={businessIds?.length > 0}>
|
|
215
|
-
<BusinessTypeFilter
|
|
216
|
-
businessTypes={props.businessTypes}
|
|
217
|
-
defaultBusinessType={props.defaultBusinessType}
|
|
218
|
-
handleChangeBusinessType={handleChangeBusinessType}
|
|
219
|
-
setBusinessTypes={setBusinessTypes}
|
|
220
|
-
/>
|
|
221
|
-
{businessIds?.length > 0 && (
|
|
222
|
-
<BusinessDelete
|
|
223
|
-
handleDeleteMultiBusinesses={handleDeleteMultiBusinesses}
|
|
224
|
-
/>
|
|
225
|
-
)}
|
|
226
|
-
</ButtonGroup>
|
|
227
|
-
<BusinessesList
|
|
228
|
-
viewMethod={viewMethod}
|
|
229
|
-
businessList={businessList}
|
|
230
|
-
pagination={pagination}
|
|
231
|
-
detailsBusinessId={detailsBusinessId}
|
|
232
|
-
loadMoreBusinesses={loadMoreBusinesses}
|
|
233
|
-
getPageBusinesses={getPageBusinesses}
|
|
234
|
-
handleSucessRemoveBusiness={handleSucessRemoveBusiness}
|
|
235
|
-
handleSucessAddBusiness={handleSucessAddBusiness}
|
|
236
|
-
handleSucessUpdateBusiness={handleSucessUpdateBusiness}
|
|
237
|
-
handleOpenBusinessDetails={handleOpenBusinessDetails}
|
|
238
|
-
handleOpenAddBusiness={handleOpenAddBusiness}
|
|
239
|
-
isTutorialMode={isTutorialMode}
|
|
240
|
-
businessIds={businessIds}
|
|
241
|
-
setBusinessIds={setBusinessIds}
|
|
242
|
-
handleChangeBusinessIds={handleChangeBusinessIds}
|
|
243
|
-
handleEnableAllBusiness={handleEnableAllBusiness}
|
|
244
|
-
selectedBusinessActiveState={selectedBusinessActiveState}
|
|
245
|
-
handleGotToAdd={handleGotToAdd}
|
|
246
|
-
/>
|
|
247
|
-
</>
|
|
229
|
+
<BusinessesList
|
|
230
|
+
viewMethod={viewMethod}
|
|
231
|
+
businessList={businessList}
|
|
232
|
+
pagination={pagination}
|
|
233
|
+
detailsBusinessId={detailsBusinessId}
|
|
234
|
+
loadMoreBusinesses={loadMoreBusinesses}
|
|
235
|
+
getPageBusinesses={getPageBusinesses}
|
|
236
|
+
handleSucessRemoveBusiness={handleSucessRemoveBusiness}
|
|
237
|
+
handleSucessAddBusiness={handleSucessAddBusiness}
|
|
238
|
+
handleSucessUpdateBusiness={handleSucessUpdateBusiness}
|
|
239
|
+
handleOpenBusinessDetails={handleOpenBusinessDetails}
|
|
240
|
+
handleOpenAddBusiness={handleOpenAddBusiness}
|
|
241
|
+
isTutorialMode={isTutorialMode}
|
|
242
|
+
businessIds={businessIds}
|
|
243
|
+
setBusinessIds={setBusinessIds}
|
|
244
|
+
handleChangeBusinessIds={handleChangeBusinessIds}
|
|
245
|
+
handleEnableAllBusiness={handleEnableAllBusiness}
|
|
246
|
+
selectedBusinessActiveState={selectedBusinessActiveState}
|
|
247
|
+
handleGotToAdd={handleGotToAdd}
|
|
248
|
+
/>
|
|
248
249
|
)}
|
|
249
250
|
</BusinessListingContainer>
|
|
250
251
|
{openBusinessDetails && (
|
|
@@ -95,24 +95,16 @@ export const EmptyBusinessWrapper = styled.div`
|
|
|
95
95
|
align-items: center;
|
|
96
96
|
justify-content: center;
|
|
97
97
|
flex-direction: column;
|
|
98
|
-
min-height: calc(100vh -
|
|
98
|
+
min-height: calc(100vh - 140px);
|
|
99
99
|
|
|
100
100
|
> img {
|
|
101
101
|
width: 90%;
|
|
102
102
|
max-width: 500px;
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
font-weight: 400;
|
|
106
|
-
font-size: 14px;
|
|
107
|
-
line-height: 24px;
|
|
108
|
-
margin-bottom: 30px;
|
|
109
|
-
margin-top: 0px;
|
|
110
|
-
text-align: center;
|
|
111
|
-
max-width: 600px;
|
|
112
|
-
color: ${props => props.theme.colors.lightGray};
|
|
113
|
-
}
|
|
104
|
+
|
|
114
105
|
button {
|
|
115
106
|
height: 44px;
|
|
107
|
+
margin-top: 30px;
|
|
116
108
|
}
|
|
117
109
|
@media (min-width: 576px) {
|
|
118
110
|
> img {
|
|
@@ -41,7 +41,7 @@ export const PaymentOption = (props) => {
|
|
|
41
41
|
const [paymentTabs, setPaymentTabs] = useState(sitesState?.sites?.length > 0 ? 0 : 1)
|
|
42
42
|
const [confirm, setConfirm] = useState({ open: false, content: null, handleOnAccept: null })
|
|
43
43
|
const [localState, setLocalState] = useState({ allowed_order_types: businessPaymethod?.allowed_order_types, sites: businessPaymethod?.sites })
|
|
44
|
-
const filteredOptions = localState?.sites ?? businessPaymethod?.sites
|
|
44
|
+
const filteredOptions = localState?.sites ?? businessPaymethod?.sites?.filter(a => sitesState?.sites?.find(b => a.id === b.id))
|
|
45
45
|
const [all, setAll] = useState(!!!filteredOptions?.length)
|
|
46
46
|
|
|
47
47
|
const setPaymethodInfo = (values) => {
|
package/src/index.js
CHANGED
|
@@ -353,7 +353,8 @@ import {
|
|
|
353
353
|
DriverApp,
|
|
354
354
|
PosApp,
|
|
355
355
|
CallCenterApp,
|
|
356
|
-
KioskApp
|
|
356
|
+
KioskApp,
|
|
357
|
+
CustomProject
|
|
357
358
|
} from './components/MyProducts'
|
|
358
359
|
import { OpenCartListing, RecoveryActionListing } from './components/CartRecovery'
|
|
359
360
|
import { FreeProductsList, PurchasedProductsList } from './components/Downloads'
|
|
@@ -765,6 +766,7 @@ export {
|
|
|
765
766
|
PosApp,
|
|
766
767
|
CallCenterApp,
|
|
767
768
|
KioskApp,
|
|
769
|
+
CustomProject,
|
|
768
770
|
|
|
769
771
|
Layout,
|
|
770
772
|
SidebarMenu,
|
package/template/app.js
CHANGED
|
@@ -39,7 +39,6 @@ import { PlacesList } from './pages/PlacesList'
|
|
|
39
39
|
import { InvoiceManager } from './pages/InvoiceManager'
|
|
40
40
|
import { OrderingProducts } from './pages/OrderingProducts'
|
|
41
41
|
import { ReviewsList } from './pages/ReviewsList'
|
|
42
|
-
import { ReviewProducts } from './pages/ReviewProducts'
|
|
43
42
|
import { DeliveryDriversList } from './pages/DeliveryDriversList'
|
|
44
43
|
import { DriversManagersList } from './pages/DriversManagersList'
|
|
45
44
|
import { DriversCompaniesList } from './pages/DriversCompaniesList'
|
|
@@ -73,6 +72,7 @@ import { AdBannersList } from './pages/AdBannersList'
|
|
|
73
72
|
import { Profile } from './pages/Profile'
|
|
74
73
|
import settings from './config.json'
|
|
75
74
|
import { BusinessAdd } from './pages/BusinessAdd'
|
|
75
|
+
import { CustomProject } from './pages/CustomProject'
|
|
76
76
|
|
|
77
77
|
export const App = () => {
|
|
78
78
|
const [{ auth, loading, user }] = useSession()
|
|
@@ -256,9 +256,6 @@ export const App = () => {
|
|
|
256
256
|
<ProtectedRoute path='/intelligence/invoice' allowedLevels={[0]}>
|
|
257
257
|
<InvoiceManager />
|
|
258
258
|
</ProtectedRoute>
|
|
259
|
-
<ProtectedRoute path='/intelligence/reviews/:store' allowedLevels={[0]}>
|
|
260
|
-
<ReviewProducts />
|
|
261
|
-
</ProtectedRoute>
|
|
262
259
|
<ProtectedRoute path='/intelligence/reviews' allowedLevels={[0]}>
|
|
263
260
|
<ReviewsList />
|
|
264
261
|
</ProtectedRoute>
|
|
@@ -321,6 +318,9 @@ export const App = () => {
|
|
|
321
318
|
<ProtectedRoute path='/my-products/kiosk-app' allowedLevels={[0]}>
|
|
322
319
|
<KioskApp />
|
|
323
320
|
</ProtectedRoute>
|
|
321
|
+
<ProtectedRoute path='/my-products/custom-project' allowedLevels={[0]}>
|
|
322
|
+
<CustomProject />
|
|
323
|
+
</ProtectedRoute>
|
|
324
324
|
|
|
325
325
|
<ProtectedRoute path='/settings/basic' allowedLevels={[0]}>
|
|
326
326
|
<BasicSettings />
|
|
Binary file
|
|
@@ -35,7 +35,6 @@ export const ListenPageChanges = ({ children }) => {
|
|
|
35
35
|
drivers_analytics: '/intelligence/drivers',
|
|
36
36
|
invoice: '/intelligence/invoice',
|
|
37
37
|
reviews: '/intelligence/reviews',
|
|
38
|
-
reviewProducts: '/intelligence/reviews/:store',
|
|
39
38
|
reports: '/intelligence/reports',
|
|
40
39
|
open_carts: '/cart-recovery/open-carts',
|
|
41
40
|
recovery_actions: '/cart-recovery/recovery-actions',
|
|
@@ -46,6 +45,7 @@ export const ListenPageChanges = ({ children }) => {
|
|
|
46
45
|
pos_app: '/my-products/pos-app',
|
|
47
46
|
call_center_app: '/my-products/call-center-app',
|
|
48
47
|
kiosk_app: '/my-products/kiosk-app',
|
|
48
|
+
custom_project: '/my-products/custom-project',
|
|
49
49
|
delivery_drivers: '/delivery/drivers-list',
|
|
50
50
|
drivers_managers: '/delivery/drivers-managers',
|
|
51
51
|
drivers_companies: '/delivery/drivers-companies',
|
package/template/helmetdata.json
CHANGED
|
@@ -125,13 +125,6 @@
|
|
|
125
125
|
"robots": "index, follow",
|
|
126
126
|
"canonicalUrl": ""
|
|
127
127
|
},
|
|
128
|
-
"reviewProducts": {
|
|
129
|
-
"title": "Review Products",
|
|
130
|
-
"description": "a dummy description about this page",
|
|
131
|
-
"keywords": "test, dummy, data",
|
|
132
|
-
"robots": "index, follow",
|
|
133
|
-
"canonicalUrl": ""
|
|
134
|
-
},
|
|
135
128
|
"reports": {
|
|
136
129
|
"title": "Advanced Reports",
|
|
137
130
|
"description": "a dummy description about this page",
|
|
@@ -258,6 +251,13 @@
|
|
|
258
251
|
"robots": "index, follow",
|
|
259
252
|
"canonicalUrl": ""
|
|
260
253
|
},
|
|
254
|
+
"custom_project": {
|
|
255
|
+
"title": "Custom Project",
|
|
256
|
+
"description": "a dummy description about this page",
|
|
257
|
+
"keywords": "test, dummy, data",
|
|
258
|
+
"robots": "index, follow",
|
|
259
|
+
"canonicalUrl": ""
|
|
260
|
+
},
|
|
261
261
|
"store_app": {
|
|
262
262
|
"title": "Store App",
|
|
263
263
|
"description": "a dummy description about this page",
|