ordering-ui-external 14.0.5 → 14.0.7
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/{7.ordering-ui.e5571322319c3152e419.js → 7.ordering-ui.b2be153972548d48278f.js} +1 -1
- package/_bundles/{ordering-ui.e5571322319c3152e419.js → ordering-ui.b2be153972548d48278f.js} +2 -2
- package/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +5 -4
- package/_modules/themes/five/src/components/OrderDetails/index.js +32 -8
- package/_modules/themes/five/src/components/OrderDetails/layouts/Starbucks/HeaderContent.js +157 -0
- package/_modules/themes/five/src/components/OrderDetails/layouts/Starbucks/index.js +12 -0
- package/_modules/themes/five/src/components/OrderDetails/layouts/Starbucks/styles.js +37 -0
- package/_modules/themes/five/src/components/ReviewDriver/layouts/Simple/index.js +240 -0
- package/_modules/themes/five/src/components/ReviewDriver/layouts/Simple/styles.js +58 -0
- package/_modules/themes/five/src/components/ReviewOrder/layouts/Simple/index.js +247 -0
- package/_modules/themes/five/src/components/ReviewOrder/layouts/Simple/styles.js +59 -0
- package/index-template.js +11 -1
- package/package.json +2 -2
- package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +190 -185
- package/src/themes/five/src/components/OrderDetails/index.js +257 -216
- package/src/themes/five/src/components/OrderDetails/layouts/Starbucks/HeaderContent.js +168 -0
- package/src/themes/five/src/components/OrderDetails/layouts/Starbucks/index.js +7 -0
- package/src/themes/five/src/components/OrderDetails/layouts/Starbucks/styles.js +148 -0
- package/src/themes/five/src/components/ReviewDriver/layouts/Simple/index.js +205 -0
- package/src/themes/five/src/components/ReviewDriver/layouts/Simple/styles.js +163 -0
- package/src/themes/five/src/components/ReviewOrder/layouts/Simple/index.js +211 -0
- package/src/themes/five/src/components/ReviewOrder/layouts/Simple/styles.js +173 -0
- package/template/assets/icons/delivered.png +0 -0
- package/template/assets/icons/driver.png +0 -0
- package/template/assets/icons/home.png +0 -0
- package/template/assets/icons/store.png +0 -0
- /package/_bundles/{0.ordering-ui.e5571322319c3152e419.js → 0.ordering-ui.b2be153972548d48278f.js} +0 -0
- /package/_bundles/{1.ordering-ui.e5571322319c3152e419.js → 1.ordering-ui.b2be153972548d48278f.js} +0 -0
- /package/_bundles/{2.ordering-ui.e5571322319c3152e419.js → 2.ordering-ui.b2be153972548d48278f.js} +0 -0
- /package/_bundles/{4.ordering-ui.e5571322319c3152e419.js → 4.ordering-ui.b2be153972548d48278f.js} +0 -0
- /package/_bundles/{5.ordering-ui.e5571322319c3152e419.js → 5.ordering-ui.b2be153972548d48278f.js} +0 -0
- /package/_bundles/{6.ordering-ui.e5571322319c3152e419.js → 6.ordering-ui.b2be153972548d48278f.js} +0 -0
- /package/_bundles/{7.ordering-ui.e5571322319c3152e419.js.LICENSE.txt → 7.ordering-ui.b2be153972548d48278f.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.e5571322319c3152e419.js → 8.ordering-ui.b2be153972548d48278f.js} +0 -0
- /package/_bundles/{9.ordering-ui.e5571322319c3152e419.js → 9.ordering-ui.b2be153972548d48278f.js} +0 -0
- /package/_bundles/{ordering-ui.e5571322319c3152e419.js.LICENSE.txt → ordering-ui.b2be153972548d48278f.js.LICENSE.txt} +0 -0
package/index-template.js
CHANGED
|
@@ -19,6 +19,11 @@ import logotypeInvert from './template/assets/images/logotype-invert.svg'
|
|
|
19
19
|
import isotype from './template/assets/images/isotype.svg'
|
|
20
20
|
import isotypeInvert from './template/assets/images/isotype-invert.svg'
|
|
21
21
|
|
|
22
|
+
import delivered from './template/assets/icons/delivered.png'
|
|
23
|
+
import driver from './template/assets/icons/driver.png'
|
|
24
|
+
import home from './template/assets/icons/home.png'
|
|
25
|
+
import store from './template/assets/icons/store.png'
|
|
26
|
+
|
|
22
27
|
import homeHero from './template/assets/images/home-hero.jpg'
|
|
23
28
|
import homeHeroMobile from './template/assets/images/home-hero-mobile.jpg'
|
|
24
29
|
import businessHero from './template/assets/images/business-hero.jpg'
|
|
@@ -148,7 +153,12 @@ theme.images = {
|
|
|
148
153
|
phone,
|
|
149
154
|
driverPng
|
|
150
155
|
},
|
|
151
|
-
|
|
156
|
+
icons: {
|
|
157
|
+
delivered,
|
|
158
|
+
driver,
|
|
159
|
+
home,
|
|
160
|
+
store
|
|
161
|
+
},
|
|
152
162
|
order: {
|
|
153
163
|
status0: orderStatus0,
|
|
154
164
|
status1: orderStatus1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.7",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"lodash": "^4.17.19",
|
|
89
89
|
"moment": "^2.29.4",
|
|
90
90
|
"nanoid": "^4.0.0",
|
|
91
|
-
"ordering-components-external": "13.0.
|
|
91
|
+
"ordering-components-external": "13.0.5",
|
|
92
92
|
"payment": "^2.4.6",
|
|
93
93
|
"polished": "^3.6.6",
|
|
94
94
|
"react-bootstrap-icons": "^1.7.2",
|
|
@@ -17,7 +17,8 @@ import BsInfoCircle from '@meronex/icons/bs/BsInfoCircle'
|
|
|
17
17
|
export const OrderBillSection = (props) => {
|
|
18
18
|
const {
|
|
19
19
|
order,
|
|
20
|
-
setOpenTaxModal
|
|
20
|
+
setOpenTaxModal,
|
|
21
|
+
showOnlyTotals
|
|
21
22
|
} = props
|
|
22
23
|
|
|
23
24
|
const [, t] = useLanguage()
|
|
@@ -60,192 +61,196 @@ export const OrderBillSection = (props) => {
|
|
|
60
61
|
{parsePrice(((order?.summary?.subtotal ?? order?.subtotal) + getIncludedTaxes()))}
|
|
61
62
|
</td>
|
|
62
63
|
</tr>
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
{order?.
|
|
66
|
-
<
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</tr>
|
|
75
|
-
)}
|
|
76
|
-
{
|
|
77
|
-
order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 1)?.map(offer => (
|
|
78
|
-
<tr key={offer.id}>
|
|
79
|
-
<td>
|
|
80
|
-
{t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
|
|
81
|
-
{offer.rate_type === 1 && (
|
|
82
|
-
<span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
|
|
83
|
-
)}
|
|
84
|
-
{setOpenTaxModal && (
|
|
85
|
-
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_1' })}>
|
|
86
|
-
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
87
|
-
</Exclamation>
|
|
64
|
+
{!showOnlyTotals && (
|
|
65
|
+
<>
|
|
66
|
+
{(order?.summary?.discount > 0 ?? order?.discount > 0) && order?.offers?.length === 0 && (
|
|
67
|
+
<tr>
|
|
68
|
+
{order?.offer_type === 1 ? (
|
|
69
|
+
<td>
|
|
70
|
+
{t('DISCOUNT', theme?.defaultLanguages?.DISCOUNT || 'Discount')}{' '}
|
|
71
|
+
<span>{`(${verifyDecimals(order?.offer_rate, parsePrice)}%)`}</span>
|
|
72
|
+
</td>
|
|
73
|
+
) : (
|
|
74
|
+
<td>{t('DISCOUNT', theme?.defaultLanguages?.DISCOUNT || 'Discount')}</td>
|
|
88
75
|
)}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- {parsePrice(offer?.summary?.discount)}
|
|
92
|
-
</td>
|
|
93
|
-
</tr>
|
|
94
|
-
))
|
|
95
|
-
}
|
|
96
|
-
{order?.summary?.subtotal_with_discount > 0 && order?.summary?.discount > 0 && order?.summary?.total >= 0 && (
|
|
97
|
-
<tr>
|
|
98
|
-
<td>{t('SUBTOTAL_WITH_DISCOUNT', 'Subtotal with discount')}</td>
|
|
99
|
-
{order?.tax_type === 1 ? (
|
|
100
|
-
<td>{parsePrice((order?.summary?.subtotal_with_discount + getIncludedTaxesDiscounts() ?? 0))}</td>
|
|
101
|
-
) : (
|
|
102
|
-
<td>{parsePrice(order?.summary?.subtotal_with_discount ?? 0)}</td>
|
|
76
|
+
<td>- {parsePrice(order?.summary?.discount ?? order?.discount)}</td>
|
|
77
|
+
</tr>
|
|
103
78
|
)}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<td>
|
|
132
|
-
{t(tax?.name?.toUpperCase()?.replace(/ /g, '_'), tax?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
133
|
-
<span>{`(${verifyDecimals(tax?.rate, parseNumber)}%)`}</span>
|
|
134
|
-
{setOpenTaxModal && (
|
|
135
|
-
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: tax, type: 'tax' })}>
|
|
136
|
-
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
137
|
-
</Exclamation>
|
|
138
|
-
)}
|
|
139
|
-
</td>
|
|
140
|
-
<td>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0)}</td>
|
|
141
|
-
</tr>
|
|
142
|
-
))
|
|
143
|
-
}
|
|
144
|
-
{
|
|
145
|
-
order?.fees?.length > 0 && order?.fees?.filter(fee => !(fee?.fixed === 0 && fee?.percentage === 0))?.map(fee => (
|
|
146
|
-
<tr key={fee.id}>
|
|
147
|
-
<td>
|
|
148
|
-
{t(fee?.name?.toUpperCase()?.replace(/ /g, '_'), fee?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
149
|
-
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`})
|
|
150
|
-
{setOpenTaxModal && (
|
|
151
|
-
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: fee, type: 'fee' })}>
|
|
152
|
-
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
153
|
-
</Exclamation>
|
|
154
|
-
)}
|
|
155
|
-
</td>
|
|
156
|
-
<td>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</td>
|
|
157
|
-
</tr>
|
|
158
|
-
))
|
|
159
|
-
}
|
|
160
|
-
{
|
|
161
|
-
order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 3)?.map(offer => (
|
|
162
|
-
<tr key={offer.id}>
|
|
163
|
-
<td>
|
|
164
|
-
{t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
|
|
165
|
-
{offer.rate_type === 1 && (
|
|
166
|
-
<span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
|
|
167
|
-
)}
|
|
168
|
-
{setOpenTaxModal && (
|
|
169
|
-
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })}>
|
|
170
|
-
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
171
|
-
</Exclamation>
|
|
172
|
-
)}
|
|
173
|
-
</td>
|
|
174
|
-
<td>
|
|
175
|
-
- {parsePrice(offer?.summary?.discount)}
|
|
176
|
-
</td>
|
|
177
|
-
</tr>
|
|
178
|
-
))
|
|
179
|
-
}
|
|
180
|
-
{typeof order?.summary?.delivery_price === 'number' && !isPickup && (
|
|
181
|
-
<tr>
|
|
182
|
-
<td>{t('DELIVERY_FEE', theme?.defaultLanguages?.DELIVERY_FEE || 'Delivery Fee')}</td>
|
|
183
|
-
<td>{parsePrice(order?.summary?.delivery_price + getIncludedTaxes(true))}</td>
|
|
184
|
-
</tr>
|
|
185
|
-
)}
|
|
186
|
-
{order?.extra_value_checkprice && order?.extra_value_checkprice > 0 && (
|
|
187
|
-
<tr>
|
|
188
|
-
<td>{t('EXTRA_VALUE_CHECKPRICE', 'Extra value checkprice')}</td>
|
|
189
|
-
<td>{parsePrice(order?.extra_value_checkprice)}</td>
|
|
190
|
-
</tr>
|
|
191
|
-
)}
|
|
192
|
-
{
|
|
193
|
-
order?.taxes?.length > 0 && order?.taxes?.filter(tax => tax?.type === 2 && tax?.rate !== 0 && tax?.target === 'delivery_fee').map(tax => (
|
|
194
|
-
<tr key={tax?.id}>
|
|
195
|
-
<td>
|
|
196
|
-
{t(tax?.name?.toUpperCase()?.replace(/ /g, '_'), tax?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
197
|
-
<span>{`(${verifyDecimals(tax?.rate, parseNumber)}%)`}</span>
|
|
198
|
-
{setOpenTaxModal && (
|
|
199
|
-
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: tax, type: 'tax' })}>
|
|
200
|
-
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
201
|
-
</Exclamation>
|
|
79
|
+
{
|
|
80
|
+
order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 1)?.map(offer => (
|
|
81
|
+
<tr key={offer.id}>
|
|
82
|
+
<td>
|
|
83
|
+
{t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
|
|
84
|
+
{offer.rate_type === 1 && (
|
|
85
|
+
<span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
|
|
86
|
+
)}
|
|
87
|
+
{setOpenTaxModal && (
|
|
88
|
+
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_1' })}>
|
|
89
|
+
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
90
|
+
</Exclamation>
|
|
91
|
+
)}
|
|
92
|
+
</td>
|
|
93
|
+
<td>
|
|
94
|
+
- {parsePrice(offer?.summary?.discount)}
|
|
95
|
+
</td>
|
|
96
|
+
</tr>
|
|
97
|
+
))
|
|
98
|
+
}
|
|
99
|
+
{order?.summary?.subtotal_with_discount > 0 && order?.summary?.discount > 0 && order?.summary?.total >= 0 && (
|
|
100
|
+
<tr>
|
|
101
|
+
<td>{t('SUBTOTAL_WITH_DISCOUNT', 'Subtotal with discount')}</td>
|
|
102
|
+
{order?.tax_type === 1 ? (
|
|
103
|
+
<td>{parsePrice((order?.summary?.subtotal_with_discount + getIncludedTaxesDiscounts() ?? 0))}</td>
|
|
104
|
+
) : (
|
|
105
|
+
<td>{parsePrice(order?.summary?.subtotal_with_discount ?? 0)}</td>
|
|
202
106
|
)}
|
|
203
|
-
</
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
107
|
+
</tr>
|
|
108
|
+
)}
|
|
109
|
+
{
|
|
110
|
+
order?.taxes?.length === 0 && order?.tax_type === 2 && (
|
|
111
|
+
<tr>
|
|
112
|
+
<td>
|
|
113
|
+
{t('TAX', 'Tax')}
|
|
114
|
+
<span>{`(${verifyDecimals(order?.tax, parseNumber)}%)`}</span>
|
|
115
|
+
</td>
|
|
116
|
+
<td>{parsePrice(order?.summary?.tax ?? 0)}</td>
|
|
117
|
+
</tr>
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
{
|
|
121
|
+
order?.fees?.length === 0 && (
|
|
122
|
+
<tr>
|
|
123
|
+
<td>
|
|
124
|
+
{t('SERVICE_FEE', 'Service fee')}
|
|
125
|
+
<span>{`(${verifyDecimals(order?.service_fee, parseNumber)}%)`}</span>
|
|
126
|
+
</td>
|
|
127
|
+
<td>{parsePrice(order?.summary?.service_fee ?? 0)}</td>
|
|
128
|
+
</tr>
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
{
|
|
132
|
+
order?.taxes?.length > 0 && order?.taxes?.filter(tax => tax?.type === 2 && tax?.rate !== 0 && tax?.target === 'product').map(tax => (
|
|
133
|
+
<tr key={tax?.id}>
|
|
134
|
+
<td>
|
|
135
|
+
{t(tax?.name?.toUpperCase()?.replace(/ /g, '_'), tax?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
136
|
+
<span>{`(${verifyDecimals(tax?.rate, parseNumber)}%)`}</span>
|
|
137
|
+
{setOpenTaxModal && (
|
|
138
|
+
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: tax, type: 'tax' })}>
|
|
139
|
+
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
140
|
+
</Exclamation>
|
|
141
|
+
)}
|
|
142
|
+
</td>
|
|
143
|
+
<td>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0)}</td>
|
|
144
|
+
</tr>
|
|
145
|
+
))
|
|
146
|
+
}
|
|
147
|
+
{
|
|
148
|
+
order?.fees?.length > 0 && order?.fees?.filter(fee => !(fee?.fixed === 0 && fee?.percentage === 0))?.map(fee => (
|
|
149
|
+
<tr key={fee.id}>
|
|
150
|
+
<td>
|
|
151
|
+
{t(fee?.name?.toUpperCase()?.replace(/ /g, '_'), fee?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
152
|
+
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`})
|
|
153
|
+
{setOpenTaxModal && (
|
|
154
|
+
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: fee, type: 'fee' })}>
|
|
155
|
+
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
156
|
+
</Exclamation>
|
|
157
|
+
)}
|
|
158
|
+
</td>
|
|
159
|
+
<td>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</td>
|
|
160
|
+
</tr>
|
|
161
|
+
))
|
|
162
|
+
}
|
|
163
|
+
{
|
|
164
|
+
order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 3)?.map(offer => (
|
|
165
|
+
<tr key={offer.id}>
|
|
166
|
+
<td>
|
|
167
|
+
{t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
|
|
168
|
+
{offer.rate_type === 1 && (
|
|
169
|
+
<span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
|
|
170
|
+
)}
|
|
171
|
+
{setOpenTaxModal && (
|
|
172
|
+
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })}>
|
|
173
|
+
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
174
|
+
</Exclamation>
|
|
175
|
+
)}
|
|
176
|
+
</td>
|
|
177
|
+
<td>
|
|
178
|
+
- {parsePrice(offer?.summary?.discount)}
|
|
179
|
+
</td>
|
|
180
|
+
</tr>
|
|
181
|
+
))
|
|
182
|
+
}
|
|
183
|
+
{typeof order?.summary?.delivery_price === 'number' && !isPickup && (
|
|
184
|
+
<tr>
|
|
185
|
+
<td>{t('DELIVERY_FEE', theme?.defaultLanguages?.DELIVERY_FEE || 'Delivery Fee')}</td>
|
|
186
|
+
<td>{parsePrice(order?.summary?.delivery_price + getIncludedTaxes(true))}</td>
|
|
187
|
+
</tr>
|
|
188
|
+
)}
|
|
189
|
+
{order?.extra_value_checkprice && order?.extra_value_checkprice > 0 && (
|
|
190
|
+
<tr>
|
|
191
|
+
<td>{t('EXTRA_VALUE_CHECKPRICE', 'Extra value checkprice')}</td>
|
|
192
|
+
<td>{parsePrice(order?.extra_value_checkprice)}</td>
|
|
193
|
+
</tr>
|
|
194
|
+
)}
|
|
195
|
+
{
|
|
196
|
+
order?.taxes?.length > 0 && order?.taxes?.filter(tax => tax?.type === 2 && tax?.rate !== 0 && tax?.target === 'delivery_fee').map(tax => (
|
|
197
|
+
<tr key={tax?.id}>
|
|
198
|
+
<td>
|
|
199
|
+
{t(tax?.name?.toUpperCase()?.replace(/ /g, '_'), tax?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
200
|
+
<span>{`(${verifyDecimals(tax?.rate, parseNumber)}%)`}</span>
|
|
201
|
+
{setOpenTaxModal && (
|
|
202
|
+
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: tax, type: 'tax' })}>
|
|
203
|
+
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
204
|
+
</Exclamation>
|
|
205
|
+
)}
|
|
206
|
+
</td>
|
|
207
|
+
<td>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0)}</td>
|
|
208
|
+
</tr>
|
|
209
|
+
))
|
|
210
|
+
}
|
|
211
|
+
{
|
|
212
|
+
order?.offers?.length > 0 && order?.offers?.filter(offer => offer?.target === 2)?.map(offer => (
|
|
213
|
+
<tr key={offer.id}>
|
|
214
|
+
<td>
|
|
215
|
+
{t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
|
|
216
|
+
{offer.rate_type === 1 && (
|
|
217
|
+
<span>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</span>
|
|
218
|
+
)}
|
|
219
|
+
{setOpenTaxModal && (
|
|
220
|
+
<Exclamation onClick={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_2' })}>
|
|
221
|
+
<BsInfoCircle size='20' color={theme.colors.primary} />
|
|
222
|
+
</Exclamation>
|
|
223
|
+
)}
|
|
224
|
+
</td>
|
|
225
|
+
<td>
|
|
226
|
+
- {parsePrice(offer?.summary?.discount)}
|
|
227
|
+
</td>
|
|
228
|
+
</tr>
|
|
229
|
+
))
|
|
230
|
+
}
|
|
231
|
+
{(order?.summary?.driver_tip > 0 || order?.driver_tip > 0) && (
|
|
232
|
+
<tr>
|
|
233
|
+
<td>
|
|
234
|
+
{t('DRIVER_TIP', theme?.defaultLanguages?.DRIVER_TIP || 'Driver tip')}{' '}
|
|
235
|
+
{(order?.summary?.driver_tip > 0 || order?.driver_tip > 0) &&
|
|
236
|
+
parseInt(configs?.driver_tip_type?.value, 10) === 2 &&
|
|
237
|
+
!parseInt(configs?.driver_tip_use_custom?.value, 10) &&
|
|
238
|
+
(
|
|
239
|
+
<span>{`(${verifyDecimals(order?.driver_tip, parseNumber)}%)`}</span>
|
|
240
|
+
)}
|
|
241
|
+
</td>
|
|
242
|
+
<td>{parsePrice(order?.summary?.driver_tip ?? order?.totalDriverTip)}</td>
|
|
243
|
+
</tr>
|
|
244
|
+
)}
|
|
245
|
+
{extraValueAdjustment && !!parseFloat(extraValueAdjustment?.value) && (
|
|
246
|
+
<tr>
|
|
247
|
+
<td>
|
|
248
|
+
{t(extraValueAdjustment?.key?.toUpperCase(), extraValueAdjustment?.key)}{' '}
|
|
249
|
+
</td>
|
|
250
|
+
<td>{parseFloat(extraValueAdjustment?.value) > 0 ? parsePrice(parseFloat(extraValueAdjustment?.value)) : `- ${parsePrice(parseFloat(extraValueAdjustment?.value) * -1)}`}</td>
|
|
251
|
+
</tr>
|
|
252
|
+
)}
|
|
253
|
+
</>
|
|
249
254
|
)}
|
|
250
255
|
</tbody>
|
|
251
256
|
</table>
|
|
@@ -257,7 +262,7 @@ export const OrderBillSection = (props) => {
|
|
|
257
262
|
</tr>
|
|
258
263
|
</tbody>
|
|
259
264
|
</table>
|
|
260
|
-
{order?.payment_events?.length > 0 && (
|
|
265
|
+
{order?.payment_events?.length > 0 && !showOnlyTotals && (
|
|
261
266
|
<div style={{ marginTop: 10 }}>
|
|
262
267
|
<span style={{ fontSize: 20 }}>{t('PAYMENTS', 'Payments')}</span>
|
|
263
268
|
<div
|