ordering-ui-react-native 0.16.67 → 0.16.70
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/src/components/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +1 -1
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/index.tsx +2 -0
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +11 -3
- package/themes/business/src/types/index.tsx +8 -7
- package/themes/original/index.tsx +2 -0
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +10 -18
- package/themes/original/src/components/BusinessProductsList/index.tsx +15 -0
- package/themes/original/src/components/BusinessProductsListing/index.tsx +2 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/index.tsx +8 -3
- package/themes/original/src/components/Checkout/index.tsx +20 -11
- package/themes/original/src/components/OrderDetails/index.tsx +16 -1
- package/themes/original/src/components/OrderDetails/styles.tsx +5 -1
- package/themes/original/src/components/OrderItAgain/index.tsx +72 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderSummary/index.tsx +1 -34
- package/themes/original/src/components/PlaceSpot/index.tsx +235 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/SingleProductCard/index.tsx +27 -14
- package/themes/original/src/types/index.tsx +24 -4
|
@@ -26,7 +26,7 @@ function SingleProductCardPropsAreEqual(prevProps: any, nextProps: any) {
|
|
|
26
26
|
prevProps.categoryState === nextProps.categoryState
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const
|
|
29
|
+
const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
30
30
|
const {
|
|
31
31
|
product,
|
|
32
32
|
isSoldOut,
|
|
@@ -36,7 +36,8 @@ const SinguleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
36
36
|
handleFavoriteProduct,
|
|
37
37
|
enableIntersection,
|
|
38
38
|
navigation,
|
|
39
|
-
businessId
|
|
39
|
+
businessId,
|
|
40
|
+
isPreviously
|
|
40
41
|
} = props;
|
|
41
42
|
|
|
42
43
|
const theme = useTheme();
|
|
@@ -96,7 +97,7 @@ const SinguleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
96
97
|
const [, t] = useLanguage();
|
|
97
98
|
const [stateConfig] = useConfig();
|
|
98
99
|
const [{ auth }] = useSession()
|
|
99
|
-
const [{ parsePrice, optimizeImage }] = useUtils();
|
|
100
|
+
const [{ parsePrice, optimizeImage, parseDate }] = useUtils();
|
|
100
101
|
const [orderState] = useOrder()
|
|
101
102
|
const [isIntersectionObserver, setIsIntersectionObserver] = useState(!enableIntersection)
|
|
102
103
|
|
|
@@ -179,15 +180,17 @@ const SinguleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
179
180
|
style={{ ...styles.line18, flex: 1 }}>
|
|
180
181
|
{product?.name}
|
|
181
182
|
</OText>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
183
|
+
{!isPreviously && (
|
|
184
|
+
<TouchableOpacity
|
|
185
|
+
onPress={handleChangeFavorite}
|
|
186
|
+
>
|
|
187
|
+
<IconAntDesign
|
|
188
|
+
name={product?.favorite ? 'heart' : 'hearto'}
|
|
189
|
+
color={theme.colors.danger5}
|
|
190
|
+
size={18}
|
|
191
|
+
/>
|
|
192
|
+
</TouchableOpacity>
|
|
193
|
+
)}
|
|
191
194
|
</View>
|
|
192
195
|
<PricesContainer>
|
|
193
196
|
<OText color={theme.colors.primary}>{product?.price ? parsePrice(product?.price) : ''}</OText>
|
|
@@ -197,12 +200,22 @@ const SinguleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
197
200
|
</PricesContainer>
|
|
198
201
|
<OText
|
|
199
202
|
size={10}
|
|
200
|
-
numberOfLines={2}
|
|
203
|
+
numberOfLines={!isPreviously ? 2 : 1}
|
|
201
204
|
ellipsizeMode="tail"
|
|
202
205
|
color={theme.colors.textSecondary}
|
|
203
206
|
style={styles.line15}>
|
|
204
207
|
{product?.description}
|
|
205
208
|
</OText>
|
|
209
|
+
{isPreviously && (
|
|
210
|
+
<OText
|
|
211
|
+
size={10}
|
|
212
|
+
numberOfLines={1}
|
|
213
|
+
ellipsizeMode="tail"
|
|
214
|
+
color={theme.colors.primary}
|
|
215
|
+
style={styles.line15}>
|
|
216
|
+
{t('LAST_ORDERED_ON', 'Last ordered on')} {parseDate(product?.last_ordered_date, { outputFormat: 'MMM DD, YYYY' })}
|
|
217
|
+
</OText>
|
|
218
|
+
)}
|
|
206
219
|
</CardInfo>
|
|
207
220
|
<LogoWrapper>
|
|
208
221
|
{product?.ribbon?.enabled && (
|
|
@@ -290,7 +303,7 @@ const SinguleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
290
303
|
export const SingleProductCard = (props: SingleProductCardParams) => {
|
|
291
304
|
const singleProductCardProps = {
|
|
292
305
|
...props,
|
|
293
|
-
UIComponent:
|
|
306
|
+
UIComponent: SingleProductCardUI
|
|
294
307
|
}
|
|
295
308
|
return <SingleProductCardController {...singleProductCardProps} />
|
|
296
309
|
}
|
|
@@ -290,6 +290,7 @@ export interface BusinessProductsListParams {
|
|
|
290
290
|
isFiltMode?: boolean,
|
|
291
291
|
handleUpdateProducts?: any,
|
|
292
292
|
navigation?: any;
|
|
293
|
+
previouslyProducts?: any;
|
|
293
294
|
}
|
|
294
295
|
export interface SingleProductCardParams {
|
|
295
296
|
businessId: any;
|
|
@@ -303,6 +304,7 @@ export interface SingleProductCardParams {
|
|
|
303
304
|
handleUpdateProducts?: any;
|
|
304
305
|
enableIntersection?: boolean;
|
|
305
306
|
navigation?: any;
|
|
307
|
+
isPreviously?: any;
|
|
306
308
|
}
|
|
307
309
|
export interface BusinessInformationParams {
|
|
308
310
|
navigation?: any,
|
|
@@ -640,12 +642,20 @@ export interface NoNetworkParams {
|
|
|
640
642
|
}
|
|
641
643
|
|
|
642
644
|
export interface PlaceSpotParams {
|
|
643
|
-
|
|
645
|
+
isCheckout?: any,
|
|
646
|
+
isInputMode?: any,
|
|
644
647
|
cart?: any,
|
|
648
|
+
spotNumberDefault?: any,
|
|
649
|
+
vehicleDefault?: any,
|
|
650
|
+
spotNumber?: any,
|
|
651
|
+
setSpotNumber?: any,
|
|
652
|
+
orderTypes?: any,
|
|
645
653
|
placesState?: any,
|
|
646
|
-
handleChangePlace
|
|
647
|
-
|
|
648
|
-
|
|
654
|
+
handleChangePlace? : any,
|
|
655
|
+
spotState?: any,
|
|
656
|
+
vehicle?: any,
|
|
657
|
+
setVehicle?: any,
|
|
658
|
+
handleChangeSpot?: any
|
|
649
659
|
}
|
|
650
660
|
|
|
651
661
|
export interface PromotionParams {
|
|
@@ -737,6 +747,16 @@ export interface ProfessionalProfileParams {
|
|
|
737
747
|
onClose: any
|
|
738
748
|
}
|
|
739
749
|
|
|
750
|
+
export interface OrderItAgainParams {
|
|
751
|
+
onProductClick: any,
|
|
752
|
+
productList: any,
|
|
753
|
+
businessId: any,
|
|
754
|
+
categoryState: any,
|
|
755
|
+
currentCart: any,
|
|
756
|
+
handleUpdateProducts: any,
|
|
757
|
+
navigation: any
|
|
758
|
+
}
|
|
759
|
+
|
|
740
760
|
export interface PreviousProductsOrderedParams {
|
|
741
761
|
products?: any,
|
|
742
762
|
onProductClick?: any,
|