ordering-ui-react-native 0.17.13 → 0.17.15
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
|
|
@@ -537,6 +537,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
537
537
|
export const BusinessProductsListing = (props: BusinessProductsListingParams) => {
|
|
538
538
|
const businessProductslistingProps = {
|
|
539
539
|
...props,
|
|
540
|
+
isForceSearch: Platform.OS === 'ios',
|
|
540
541
|
UIComponent: BusinessProductsListingUI
|
|
541
542
|
}
|
|
542
543
|
return (
|
|
@@ -38,7 +38,7 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
|
|
|
38
38
|
|
|
39
39
|
const theme = useTheme();
|
|
40
40
|
const [isOpenAllCategories, setIsOpenAllCategories] = useState(false)
|
|
41
|
-
const defaultImage = (name : string) => theme.images?.categories?.[name.toLowerCase()]
|
|
41
|
+
const defaultImage = (name : string) => theme.images?.categories?.[name.toLowerCase().replace(' ', '')]
|
|
42
42
|
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
if(typesState?.types?.length > 0){
|
|
@@ -198,9 +198,9 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
|
|
|
198
198
|
isOpenAllCategories && setIsOpenAllCategories(false)
|
|
199
199
|
}}
|
|
200
200
|
>
|
|
201
|
-
{(item.
|
|
201
|
+
{(defaultImage(item.name) || item.image) ? (
|
|
202
202
|
<OIcon
|
|
203
|
-
url={item.image || defaultImage(item.name)}
|
|
203
|
+
url={typeof item.name === 'number' ? item.image || defaultImage(item.name) : defaultImage(item.name) || item.image}
|
|
204
204
|
style={styles.logo}
|
|
205
205
|
/>
|
|
206
206
|
) : (
|
|
@@ -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}
|