ordering-ui-react-native 0.17.13 → 0.17.14
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
CHANGED
|
@@ -139,7 +139,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
139
139
|
|
|
140
140
|
const onProductClick = (product: any) => {
|
|
141
141
|
const productAddedToCartLength = currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)
|
|
142
|
-
if (product?.type === 'service' &&
|
|
142
|
+
if (product?.type === 'service' && business?.professionals?.length > 0) {
|
|
143
143
|
setCurrentProduct(product)
|
|
144
144
|
setOpenService(true)
|
|
145
145
|
return
|
|
@@ -303,58 +303,62 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
303
303
|
{t('REQUIRED', 'Required')}
|
|
304
304
|
</OText>
|
|
305
305
|
</View>
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
{
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
<
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
306
|
+
<TouchableOpacity
|
|
307
|
+
style={styles.professionalSelect}
|
|
308
|
+
onPress={() => setIsOpen(true)}
|
|
309
|
+
>
|
|
310
|
+
{!!currentProfessional ? (
|
|
311
|
+
<>
|
|
312
|
+
<View style={{ flexDirection: 'row' }}>
|
|
313
|
+
{!!currentProfessional?.photo ? (
|
|
314
|
+
<FastImage
|
|
315
|
+
style={styles.photoStyle}
|
|
316
|
+
source={{
|
|
317
|
+
uri: optimizeImage(currentProfessional?.photo, 'h_250,c_limit'),
|
|
318
|
+
priority: FastImage.priority.normal,
|
|
319
|
+
}}
|
|
320
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
321
|
+
/>
|
|
322
|
+
) : (
|
|
323
|
+
<OIcon
|
|
324
|
+
src={theme?.images?.general?.user}
|
|
325
|
+
cover={false}
|
|
326
|
+
style={styles.photoStyle}
|
|
327
|
+
/>
|
|
328
|
+
)}
|
|
329
|
+
<View style={{ marginLeft: 14 }}>
|
|
330
|
+
<OText
|
|
331
|
+
size={14}
|
|
332
|
+
weight={'400'}
|
|
333
|
+
lineHeight={22}
|
|
334
|
+
>
|
|
335
|
+
{currentProfessional?.name} {currentProfessional?.lastname}
|
|
336
|
+
</OText>
|
|
337
|
+
<OText
|
|
338
|
+
size={12}
|
|
339
|
+
weight={'400'}
|
|
340
|
+
lineHeight={17}
|
|
341
|
+
color={isBusyTime(currentProfessional) ? theme.colors.danger5 : theme.colors.success500}
|
|
342
|
+
>
|
|
343
|
+
{isBusyTime(currentProfessional)
|
|
344
|
+
? t('BUSY_ON_SELECTED_TIME', 'Busy on selected time')
|
|
345
|
+
: t('AVAILABLE', 'Available')
|
|
346
|
+
}
|
|
347
|
+
</OText>
|
|
348
|
+
</View>
|
|
347
349
|
</View>
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
350
|
+
</>
|
|
351
|
+
) : (
|
|
352
|
+
<OText size={12}>{t('SELECT_PROFESSIONAL', 'Select professional')}</OText>
|
|
353
|
+
)}
|
|
354
|
+
<View style={{ marginLeft: 5 }}>
|
|
355
|
+
<IconAntDesign
|
|
356
|
+
name='down'
|
|
357
|
+
color={theme.colors.textThird}
|
|
358
|
+
size={12}
|
|
359
|
+
/>
|
|
360
|
+
</View>
|
|
361
|
+
</TouchableOpacity>
|
|
358
362
|
</ProfessionalWrapper>
|
|
359
363
|
<ScheduleWrapper>
|
|
360
364
|
<View
|
|
@@ -464,8 +468,9 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
464
468
|
</CalendarWrapper>
|
|
465
469
|
) : (
|
|
466
470
|
<OText
|
|
467
|
-
size={
|
|
468
|
-
style={{ marginBottom: 30 }}
|
|
471
|
+
size={16}
|
|
472
|
+
style={{ marginBottom: 30, textAlign: 'center' }}
|
|
473
|
+
color={theme?.colors?.disabled}
|
|
469
474
|
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
470
475
|
>
|
|
471
476
|
{t('NO_SCHEDULE', 'No schedule')}
|
|
@@ -541,7 +546,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
541
546
|
{t('ANY_OROFESSIONAL_MEMBER', 'Any professional member')}
|
|
542
547
|
</OText>
|
|
543
548
|
</View>
|
|
544
|
-
{professionalList?.map((professional: any) =>
|
|
549
|
+
{professionalList?.map((professional: any) => (
|
|
545
550
|
<TouchableOpacity
|
|
546
551
|
key={professional?.id}
|
|
547
552
|
style={styles.professionalItem}
|