ordering-ui-react-native 0.21.12-release → 0.21.13-release
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/package.json +1 -1
- package/themes/business/src/components/DriverMap/index.tsx +0 -1
- package/themes/business/src/components/OrderDetails/Business.tsx +3 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +5 -3
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +6 -6
- package/themes/business/src/components/PreviousOrders/index.tsx +5 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +2 -1
- package/themes/original/src/components/AddressForm/index.tsx +8 -4
- package/themes/original/src/components/BusinessController/index.tsx +1 -1
- package/themes/original/src/components/OrderProgress/index.tsx +1 -1
- package/themes/original/src/components/ProductItemAccordion/index.tsx +7 -2
- package/themes/original/src/components/UserFormDetails/index.tsx +11 -9
package/package.json
CHANGED
|
@@ -77,6 +77,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
77
77
|
const [printerSettings, setPrinterSettings] = useState<any>('')
|
|
78
78
|
const [autoPrintEnabled, setAutoPrintEnabled] = useState<boolean>(false)
|
|
79
79
|
|
|
80
|
+
const orderToComplete = [4,20,21]
|
|
81
|
+
|
|
80
82
|
if (order?.status === 7 || order?.status === 4) {
|
|
81
83
|
if (drivers?.length > 0 && drivers) {
|
|
82
84
|
drivers.forEach((driver: any) => {
|
|
@@ -653,7 +655,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
653
655
|
disabled={loading}
|
|
654
656
|
/>
|
|
655
657
|
)}
|
|
656
|
-
{order?.status
|
|
658
|
+
{orderToComplete.includes(order?.status) && ![1].includes(order?.delivery_type) && (
|
|
657
659
|
<FloatingButton
|
|
658
660
|
btnText={t(
|
|
659
661
|
'ORDER_NOT_PICKEDUP_BY_CUSTOMER',
|
|
@@ -67,6 +67,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
67
67
|
const hideTimer = configs?.hidden_driver_eta_time?.value === '1'
|
|
68
68
|
const isAllowedDriverRejectOrder = configs?.allow_driver_reject_order?.value === '1'
|
|
69
69
|
const isHideRejectButtons = configs?.reject_orders_enabled && configs?.reject_orders_enabled?.value !== '1'
|
|
70
|
+
const isEnabledOrderNotReady = configs?.order_not_ready_enabled?.value === '1'
|
|
71
|
+
const isEnabledFailedPickupDriver = configs?.failed_pickup_by_driver_enabled?.value === '1'
|
|
70
72
|
const theme = useTheme();
|
|
71
73
|
const [, t] = useLanguage();
|
|
72
74
|
const [session] = useSession();
|
|
@@ -489,7 +491,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
489
491
|
/>
|
|
490
492
|
</Pickup>
|
|
491
493
|
)}
|
|
492
|
-
{order?.status === 3 && order?.delivery_type === 1 && !isHideRejectButtons && (
|
|
494
|
+
{order?.status === 3 && order?.delivery_type === 1 && !isHideRejectButtons && isEnabledOrderNotReady && (
|
|
493
495
|
<View style={{ paddingVertical: 20, marginBottom: 20 }}>
|
|
494
496
|
<OButton
|
|
495
497
|
style={styles.btnPickUp}
|
|
@@ -584,8 +586,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
584
586
|
secondButton={true}
|
|
585
587
|
firstColorCustom={theme.colors.red}
|
|
586
588
|
secondColorCustom={theme.colors.green}
|
|
587
|
-
widthButton={isHideRejectButtons ? '100%' : '45%'}
|
|
588
|
-
isHideRejectButtons={isHideRejectButtons}
|
|
589
|
+
widthButton={isHideRejectButtons || !isEnabledFailedPickupDriver ? '100%' : '45%'}
|
|
590
|
+
isHideRejectButtons={isHideRejectButtons || !isEnabledFailedPickupDriver}
|
|
589
591
|
/>
|
|
590
592
|
)}
|
|
591
593
|
{(validStatusComplete.includes(order?.status)) && (
|
|
@@ -219,8 +219,8 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
219
219
|
<OLink
|
|
220
220
|
PressStyle={styles.linkWithIcons}
|
|
221
221
|
url={Platform.select({
|
|
222
|
-
ios: `maps:0,0?q=${order?.business?.address}`,
|
|
223
|
-
android: `geo:0,0?q=${order?.business?.address}`,
|
|
222
|
+
ios: `maps:0,0?q=${order?.business?.address}@${order?.business?.location?.lat},${order?.business?.location?.lng}`,
|
|
223
|
+
android: `geo:0,0?q=${order?.business?.address}@${order?.business?.location?.lat},${order?.business?.location?.lng}`,
|
|
224
224
|
})}
|
|
225
225
|
numberOfLines={2}
|
|
226
226
|
shorcut={order?.business?.address}
|
|
@@ -239,8 +239,8 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
239
239
|
<OLink
|
|
240
240
|
PressStyle={styles.linkWithIcons}
|
|
241
241
|
url={Platform.select({
|
|
242
|
-
ios: `maps:0,0?q=${order?.business?.address_notes}`,
|
|
243
|
-
android: `geo:0,0?q=${order?.business?.address_notes}`,
|
|
242
|
+
ios: `maps:0,0?q=${order?.business?.address_notes}@${order?.business?.location?.lat},${order?.business?.location?.lng}`,
|
|
243
|
+
android: `geo:0,0?q=${order?.business?.address_notes}@${order?.business?.location?.lat},${order?.business?.location?.lng}`,
|
|
244
244
|
})}
|
|
245
245
|
shorcut={order?.business?.address_notes}
|
|
246
246
|
TextStyle={styles.textLink}
|
|
@@ -360,8 +360,8 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
360
360
|
<OLink
|
|
361
361
|
PressStyle={{ ...styles.linkWithIcons, marginBottom: 0 }}
|
|
362
362
|
url={Platform.select({
|
|
363
|
-
ios: `maps:0,0?q=${order?.customer?.address}`,
|
|
364
|
-
android: `geo:0,0?q=${order?.customer?.address}`,
|
|
363
|
+
ios: `maps:0,0?q=${order?.customer?.address}@${order?.customer?.location?.lat},${order?.customer?.location?.lng}`,
|
|
364
|
+
android: `geo:0,0?q=${order?.customer?.address}@${order?.customer?.location?.lat},${order?.customer?.location?.lng}`,
|
|
365
365
|
})}
|
|
366
366
|
onTextLayout={e => onTextLayout(e, 'customerAddress')}
|
|
367
367
|
numberOfLines={isReadMore.customerAddress ? 20 : 2}
|
|
@@ -45,6 +45,8 @@ export const PreviousOrders = (props: any) => {
|
|
|
45
45
|
const deliveryPickupBtn = props.appTitle?.text?.includes('Delivery') && [3, 8, 18]
|
|
46
46
|
const deliveryStatusCompleteBtn = props.appTitle?.text?.includes('Delivery') && [9, 19, 23]
|
|
47
47
|
const isHideRejectButtons = configs?.reject_orders_enabled && configs?.reject_orders_enabled?.value !== '1' && !isBusinessApp
|
|
48
|
+
const isEnabledOrderNotReady = configs?.order_not_ready_enabled?.value === '1'
|
|
49
|
+
const isEnabledFailedPickupDriver = configs?.failed_pickup_by_driver_enabled?.value === '1'
|
|
48
50
|
|
|
49
51
|
const handlePressOrder = (order: any) => {
|
|
50
52
|
if (order?.locked && isLogisticOrder) return
|
|
@@ -242,7 +244,7 @@ export const PreviousOrders = (props: any) => {
|
|
|
242
244
|
/>
|
|
243
245
|
</AcceptOrRejectOrderStyle>
|
|
244
246
|
)}
|
|
245
|
-
{_ordersGrouped[k][0]?.status === 3 && _ordersGrouped[k][0]?.delivery_type === 1 && !isHideRejectButtons &&
|
|
247
|
+
{_ordersGrouped[k][0]?.status === 3 && _ordersGrouped[k][0]?.delivery_type === 1 && !isHideRejectButtons && isEnabledOrderNotReady &&
|
|
246
248
|
(
|
|
247
249
|
<AcceptOrRejectOrderStyle>
|
|
248
250
|
<OButton
|
|
@@ -330,9 +332,9 @@ export const PreviousOrders = (props: any) => {
|
|
|
330
332
|
})}
|
|
331
333
|
/>
|
|
332
334
|
)}
|
|
333
|
-
{!!deliveryPickupBtn && deliveryPickupBtn?.includes(_ordersGrouped[k][0]?.status) && (
|
|
335
|
+
{!!deliveryPickupBtn && deliveryPickupBtn?.includes(_ordersGrouped[k][0]?.status) && isEnabledFailedPickupDriver && (
|
|
334
336
|
<AcceptOrRejectOrderStyle>
|
|
335
|
-
{!isHideRejectButtons && (
|
|
337
|
+
{!isHideRejectButtons && isEnabledOrderNotReady && (
|
|
336
338
|
<OButton
|
|
337
339
|
text={t('PICKUP_FAILED', 'Pickup failed')}
|
|
338
340
|
bgColor={theme.colors.danger100}
|
|
@@ -36,7 +36,8 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
36
36
|
handleCancelEdit,
|
|
37
37
|
toggleIsEdit,
|
|
38
38
|
isCheckout,
|
|
39
|
-
isAlsea
|
|
39
|
+
isAlsea,
|
|
40
|
+
allowDriverUpdateData
|
|
40
41
|
} = props;
|
|
41
42
|
|
|
42
43
|
const theme = useTheme();
|
|
@@ -66,9 +67,9 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
66
67
|
const rules: any = {
|
|
67
68
|
required: isRequiredField(field.code)
|
|
68
69
|
? t(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
`VALIDATION_ERROR_${field.code.toUpperCase()}_REQUIRED`,
|
|
71
|
+
`${field.name} is required`,
|
|
72
|
+
).replace('_attribute_', t(field.name, field.code))
|
|
72
73
|
: null,
|
|
73
74
|
};
|
|
74
75
|
if (field.code && field.code === 'email') {
|
|
@@ -261,90 +262,93 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
261
262
|
sortInputFields({ values: validationFields?.fields?.checkout })
|
|
262
263
|
.length > 0 && (
|
|
263
264
|
<UDWrapper>
|
|
264
|
-
{
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
{
|
|
275
|
-
|
|
265
|
+
{allowDriverUpdateData && (
|
|
266
|
+
<>
|
|
267
|
+
{sortInputFields({
|
|
268
|
+
values: validationFields.fields?.checkout,
|
|
269
|
+
}).map(
|
|
270
|
+
(field: any) =>
|
|
271
|
+
showField &&
|
|
272
|
+
showField(field.code) &&
|
|
273
|
+
!isAlsea
|
|
274
|
+
&& (
|
|
275
|
+
<React.Fragment key={field.id}>
|
|
276
|
+
<OText style={styles.label}>
|
|
277
|
+
{t(field?.code.toUpperCase(), field?.name)}
|
|
278
|
+
</OText>
|
|
276
279
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
.toLowerCase()
|
|
310
|
-
.replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''),
|
|
311
|
-
);
|
|
312
|
-
field.code !== 'email'
|
|
313
|
-
? handleChangeInput(val)
|
|
314
|
-
: handleChangeInput({
|
|
315
|
-
target: {
|
|
316
|
-
name: 'email',
|
|
317
|
-
value: val.target.value
|
|
280
|
+
<Controller
|
|
281
|
+
key={field.id}
|
|
282
|
+
control={control}
|
|
283
|
+
render={() => (
|
|
284
|
+
<OInput
|
|
285
|
+
name={field.code}
|
|
286
|
+
placeholder={t(
|
|
287
|
+
field.code.toUpperCase(),
|
|
288
|
+
field?.name,
|
|
289
|
+
)}
|
|
290
|
+
placeholderTextColor={theme.colors.arrowColor}
|
|
291
|
+
style={styles.inputStyle}
|
|
292
|
+
icon={
|
|
293
|
+
field.code === 'email'
|
|
294
|
+
? theme.images.general.email
|
|
295
|
+
: theme.images.general.user
|
|
296
|
+
}
|
|
297
|
+
autoCapitalize={
|
|
298
|
+
field.code === 'email' ? 'none' : 'sentences'
|
|
299
|
+
}
|
|
300
|
+
isDisabled={!isEdit}
|
|
301
|
+
value={
|
|
302
|
+
formState?.changes[field.code] ??
|
|
303
|
+
(user && user[field.code]) ??
|
|
304
|
+
''
|
|
305
|
+
}
|
|
306
|
+
onChange={(val: any) => {
|
|
307
|
+
field.code !== 'email'
|
|
308
|
+
? setValue(field.code, val.target.value)
|
|
309
|
+
: setValue(
|
|
310
|
+
field.code,
|
|
311
|
+
val.target.value
|
|
318
312
|
.toLowerCase()
|
|
319
|
-
.replace(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
313
|
+
.replace(/[&,()%";:ç?<>{}\\[\]\s]/g, ''),
|
|
314
|
+
);
|
|
315
|
+
field.code !== 'email'
|
|
316
|
+
? handleChangeInput(val)
|
|
317
|
+
: handleChangeInput({
|
|
318
|
+
target: {
|
|
319
|
+
name: 'email',
|
|
320
|
+
value: val.target.value
|
|
321
|
+
.toLowerCase()
|
|
322
|
+
.replace(
|
|
323
|
+
/[&,()%";:ç?<>{}\\[\]\s]/g,
|
|
324
|
+
'',
|
|
325
|
+
),
|
|
326
|
+
},
|
|
327
|
+
});
|
|
328
|
+
}}
|
|
329
|
+
autoCorrect={field.code === 'email' && false}
|
|
330
|
+
type={
|
|
331
|
+
field.code === 'email'
|
|
332
|
+
? 'email-address'
|
|
333
|
+
: 'default'
|
|
334
|
+
}
|
|
335
|
+
returnKeyType="done"
|
|
336
|
+
autoCompleteType={
|
|
337
|
+
field.code === 'email' ? 'email' : 'off'
|
|
338
|
+
}
|
|
339
|
+
selectionColor={theme.colors.primary}
|
|
340
|
+
color={theme.colors.textGray}
|
|
341
|
+
/>
|
|
342
|
+
)}
|
|
343
|
+
name={field.code}
|
|
344
|
+
rules={getInputRules(field)}
|
|
345
|
+
defaultValue={user && user[field.code]}
|
|
338
346
|
/>
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
/>
|
|
344
|
-
</React.Fragment>
|
|
345
|
-
),
|
|
347
|
+
</React.Fragment>
|
|
348
|
+
),
|
|
349
|
+
)}
|
|
350
|
+
</>
|
|
346
351
|
)}
|
|
347
|
-
|
|
348
352
|
<OText style={styles.label}>{t('PASSWORD', 'Password')}</OText>
|
|
349
353
|
|
|
350
354
|
<Controller
|
|
@@ -445,7 +449,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
445
449
|
</OText>
|
|
446
450
|
)}
|
|
447
451
|
|
|
448
|
-
{!!showInputPhoneNumber && !isAlsea && (
|
|
452
|
+
{!!showInputPhoneNumber && !isAlsea && allowDriverUpdateData && (
|
|
449
453
|
<WrapperPhone>
|
|
450
454
|
<PhoneInputNumber
|
|
451
455
|
data={phoneInputData}
|
|
@@ -487,28 +491,28 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
487
491
|
isEdit) ||
|
|
488
492
|
(watchPassword?.length > 0 && watchConfirmPassword?.length > 0) ||
|
|
489
493
|
formState?.loading) && (
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
494
|
+
<View style={{ flex: 1, marginLeft: 5 }}>
|
|
495
|
+
<OButton
|
|
496
|
+
text={
|
|
497
|
+
formState.loading
|
|
498
|
+
? t('UPDATING', 'Updating')
|
|
499
|
+
: t('UPDATE', 'Update')
|
|
500
|
+
}
|
|
501
|
+
bgColor={theme.colors.primary}
|
|
502
|
+
textStyle={{
|
|
503
|
+
...styles.btnText,
|
|
504
|
+
color: formState.loading
|
|
505
|
+
? theme.colors.textGray
|
|
506
|
+
: theme.colors.white,
|
|
507
|
+
}}
|
|
508
|
+
borderColor={theme.colors.primary}
|
|
509
|
+
isDisabled={formState.loading}
|
|
510
|
+
imgRightSrc={null}
|
|
511
|
+
style={styles.editButton}
|
|
512
|
+
onClick={handleSubmit(onSubmit)}
|
|
513
|
+
/>
|
|
514
|
+
</View>
|
|
515
|
+
)}
|
|
512
516
|
</EditButton>
|
|
513
517
|
)}
|
|
514
518
|
</>
|
|
@@ -486,10 +486,11 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
486
486
|
handleCancelEdit={handleCancelEdit}
|
|
487
487
|
toggleIsEdit={toggleIsEdit}
|
|
488
488
|
isAlsea={isAlsea}
|
|
489
|
+
allowDriverUpdateData={allowDriverUpdateData}
|
|
489
490
|
/>
|
|
490
491
|
</View>
|
|
491
492
|
)}
|
|
492
|
-
{!validationFields.loading && !isEdit &&
|
|
493
|
+
{!validationFields.loading && !isEdit && (
|
|
493
494
|
<EditButton>
|
|
494
495
|
<OButton
|
|
495
496
|
text={t('EDIT', 'Edit')}
|
|
@@ -371,6 +371,10 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
371
371
|
setToggleMap(!toggleMap);
|
|
372
372
|
};
|
|
373
373
|
|
|
374
|
+
const showFieldWithTheme = (name) => {
|
|
375
|
+
return !theme?.address?.components?.[name]?.hidden
|
|
376
|
+
}
|
|
377
|
+
|
|
374
378
|
useEffect(() => {
|
|
375
379
|
if (
|
|
376
380
|
orderState.loading &&
|
|
@@ -672,7 +676,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
672
676
|
)}
|
|
673
677
|
|
|
674
678
|
<View style={{ flexDirection: 'row', flexBasis: '50%' }}>
|
|
675
|
-
{
|
|
679
|
+
{((isRequiredField && isRequiredField('internal_number')) || showFieldWithTheme('internal_number')) && (
|
|
676
680
|
<Controller
|
|
677
681
|
control={control}
|
|
678
682
|
name="internal_number"
|
|
@@ -708,7 +712,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
708
712
|
isFocusHighlight
|
|
709
713
|
style={{
|
|
710
714
|
...styles.inputsStyle,
|
|
711
|
-
marginRight: showField('internal_number') && showField('zipcode') ? 24 : 0
|
|
715
|
+
marginRight: showField?.('internal_number') && showField?.('zipcode') ? 24 : 0
|
|
712
716
|
}}
|
|
713
717
|
forwardRef={internalNumberRef}
|
|
714
718
|
returnKeyType="next"
|
|
@@ -719,7 +723,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
719
723
|
/>
|
|
720
724
|
)}
|
|
721
725
|
|
|
722
|
-
{
|
|
726
|
+
{((isRequiredField && isRequiredField('zipcode')) || showFieldWithTheme('zipcode')) && (
|
|
723
727
|
<Controller
|
|
724
728
|
control={control}
|
|
725
729
|
name="zipcode"
|
|
@@ -764,7 +768,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
764
768
|
)}
|
|
765
769
|
</View>
|
|
766
770
|
|
|
767
|
-
{
|
|
771
|
+
{((isRequiredField && isRequiredField('address_notes')) || showFieldWithTheme('address_notes')) && (
|
|
768
772
|
<Controller
|
|
769
773
|
control={control}
|
|
770
774
|
name="address_notes"
|
|
@@ -309,7 +309,7 @@ export const BusinessControllerUI = React.memo((props: BusinessControllerParams)
|
|
|
309
309
|
</ReviewAndFavorite>
|
|
310
310
|
)}
|
|
311
311
|
</View>
|
|
312
|
-
<OText size={textSize} style={{ lineHeight: 15, marginBottom: 3 }} numberOfLines={
|
|
312
|
+
<OText size={textSize} style={{ lineHeight: 15, marginBottom: 3, fontFamily: '' }} numberOfLines={1}>
|
|
313
313
|
{business?.address}
|
|
314
314
|
</OText>
|
|
315
315
|
<Metadata>
|
|
@@ -133,7 +133,7 @@ const OrderProgressUI = (props: any) => {
|
|
|
133
133
|
<View style={styles.logoWrapper}>
|
|
134
134
|
<FastImage
|
|
135
135
|
style={{ width: 50, height: 50 }}
|
|
136
|
-
source={orderList?.orders.length === 1 && lastOrder?.business?.logo
|
|
136
|
+
source={orderList?.orders.length === 1 && lastOrder?.business?.logo?.includes?.('http') ? {
|
|
137
137
|
uri: optimizeImage(lastOrder?.business?.logo, 'h_50,c_limit'),
|
|
138
138
|
priority: FastImage.priority.normal,
|
|
139
139
|
} : theme.images.logos.logotype}
|
|
@@ -39,6 +39,11 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
39
39
|
} = props
|
|
40
40
|
|
|
41
41
|
const theme = useTheme();
|
|
42
|
+
const hideProductImage = isFromCheckout
|
|
43
|
+
? theme?.checkout?.components?.cart?.components?.product?.components?.image?.hidden
|
|
44
|
+
: theme?.confirmation?.components?.cart?.components?.products?.components?.photo?.hidden
|
|
45
|
+
|
|
46
|
+
const hideProductCommentHide = isFromCheckout && theme?.checkout?.components?.cart?.components?.product?.components?.comments?.hidden
|
|
42
47
|
|
|
43
48
|
const pickerStyle = StyleSheet.create({
|
|
44
49
|
inputAndroid: {
|
|
@@ -157,7 +162,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
157
162
|
>
|
|
158
163
|
<View style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
|
|
159
164
|
<ContentInfo>
|
|
160
|
-
{(product?.images || theme?.images?.dummies?.product) && (
|
|
165
|
+
{(product?.images || theme?.images?.dummies?.product) && !hideProductImage && (
|
|
161
166
|
<ProductImage>
|
|
162
167
|
{isFromCheckout ? (
|
|
163
168
|
product?.images ? (
|
|
@@ -312,7 +317,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
312
317
|
))}
|
|
313
318
|
</ProductOptionsList>
|
|
314
319
|
)}
|
|
315
|
-
{!!product.comment && (
|
|
320
|
+
{!!product.comment && !hideProductCommentHide && (
|
|
316
321
|
<ProductComment>
|
|
317
322
|
<OText size={10} color={theme.colors.textSecondary}>{t('SPECIAL_COMMENT', 'Special Comment')}</OText>
|
|
318
323
|
<OText size={10} color={theme.colors.textThird}>{product.comment}</OText>
|
|
@@ -380,17 +380,19 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
380
380
|
),
|
|
381
381
|
)}
|
|
382
382
|
{showInputBirthday && (
|
|
383
|
-
|
|
384
|
-
<
|
|
385
|
-
{
|
|
386
|
-
|
|
387
|
-
<TouchableOpacity onPress={() => setShowDatePicker(!showDatePicker)}>
|
|
388
|
-
<OText size={14} lineHeight={21} color={theme.colors.textNormal} weight={'500'} style={{ marginTop: 6, marginBottom: -15 }}>
|
|
389
|
-
{birthdate ? moment(birthdate).format('YYYY-MM-DD') : ''}
|
|
383
|
+
<>
|
|
384
|
+
<WrapperBirthdate>
|
|
385
|
+
<OText size={14} lineHeight={21} color={theme.colors.textNormal} weight={'500'} style={{ textTransform: 'capitalize', alignSelf: 'flex-start' }}>
|
|
386
|
+
{t('BIRTHDATE', 'Birthdate')}
|
|
390
387
|
</OText>
|
|
391
|
-
|
|
388
|
+
<TouchableOpacity onPress={() => setShowDatePicker(!showDatePicker)}>
|
|
389
|
+
<OText size={14} lineHeight={21} color={theme.colors.textNormal} weight={'500'} style={{ marginTop: 6 }}>
|
|
390
|
+
{birthdate ? moment(birthdate).format('YYYY-MM-DD') : ''}
|
|
391
|
+
</OText>
|
|
392
|
+
</TouchableOpacity>
|
|
393
|
+
</WrapperBirthdate>
|
|
392
394
|
<DatePickerUI open={showDatePicker} birthdate={birthdate} onConfirm={_handleChangeDate} onCancel={() => setShowDatePicker(false)} />
|
|
393
|
-
|
|
395
|
+
</>
|
|
394
396
|
)}
|
|
395
397
|
{!!showInputPhoneNumber && ((requiredFields && requiredFields.includes('cellphone')) || !requiredFields) && (
|
|
396
398
|
<WrapperPhone>
|