ordering-ui-react-native 0.16.47-release → 0.16.48-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/src/components/shared/OToast.tsx +2 -2
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +259 -238
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
- package/themes/business/src/components/OrdersOption/index.tsx +16 -61
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
- package/themes/business/src/components/PreviousOrders/index.tsx +330 -240
- package/themes/business/src/components/PreviousOrders/styles.tsx +30 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +12 -2
- package/themes/business/src/components/shared/OText.tsx +3 -2
- package/themes/business/src/types/index.tsx +10 -2
- package/themes/original/index.tsx +2 -0
|
@@ -41,7 +41,8 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
|
|
|
41
41
|
reviewState,
|
|
42
42
|
setReviewState,
|
|
43
43
|
actionState,
|
|
44
|
-
handleSendCustomerReview
|
|
44
|
+
handleSendCustomerReview,
|
|
45
|
+
handleCustomCustomerReview
|
|
45
46
|
} = props
|
|
46
47
|
|
|
47
48
|
const theme = useTheme()
|
|
@@ -155,6 +156,15 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
|
|
|
155
156
|
|
|
156
157
|
const customerName = `${order?.customer?.name ?? ''} ${order?.customer?.middle_name ?? ''} ${order?.customer?.lastname ?? ''} ${order?.customer?.second_lastname ?? ''}`?.replace(' ', ' ')?.trim() ?? ''
|
|
157
158
|
|
|
159
|
+
const handleReviewClick = () => {
|
|
160
|
+
handleCustomCustomerReview
|
|
161
|
+
? handleCustomCustomerReview({
|
|
162
|
+
qualification: reviewState?.qualification,
|
|
163
|
+
comment: reviewState?.comment
|
|
164
|
+
})
|
|
165
|
+
: handleSendCustomerReview()
|
|
166
|
+
}
|
|
167
|
+
|
|
158
168
|
return (
|
|
159
169
|
<KeyboardAvoidingView
|
|
160
170
|
enabled
|
|
@@ -305,7 +315,7 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
|
|
|
305
315
|
|
|
306
316
|
<ActionButtonWrapper>
|
|
307
317
|
<FloatingButton
|
|
308
|
-
firstButtonClick={() =>
|
|
318
|
+
firstButtonClick={() => handleReviewClick()}
|
|
309
319
|
btnText={actionState.loading ? t('LOADING', 'Loading') : t('SEND_REVIEW', 'Send Review')}
|
|
310
320
|
color={theme.colors.primary}
|
|
311
321
|
widthButton={'100%'}
|
|
@@ -40,12 +40,13 @@ interface Props {
|
|
|
40
40
|
numberOfLines?: number;
|
|
41
41
|
ellipsizeMode?: string;
|
|
42
42
|
adjustsFontSizeToFit?: boolean;
|
|
43
|
-
textDecorationLine?: string
|
|
43
|
+
textDecorationLine?: string;
|
|
44
|
+
lineHeight?: number;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
const OText = (props: Props): React.ReactElement => {
|
|
47
48
|
return (
|
|
48
|
-
<SText {...props} style={props.style}>
|
|
49
|
+
<SText {...props} style={[props.style, { lineHeight: props.lineHeight }]}>
|
|
49
50
|
{props.children}
|
|
50
51
|
{props.space && ' '}
|
|
51
52
|
</SText>
|
|
@@ -297,6 +297,10 @@ export interface OrdersOptionParams {
|
|
|
297
297
|
isLogisticActivated?: boolean;
|
|
298
298
|
isAlsea?: boolean;
|
|
299
299
|
checkNotification?: boolean;
|
|
300
|
+
ordersFormatted?: any;
|
|
301
|
+
handleChangeOrderStatus?: () => void;
|
|
302
|
+
handleSendCustomerReview?: () => void;
|
|
303
|
+
orderDetailsProps?: any;
|
|
300
304
|
}
|
|
301
305
|
export interface ActiveOrdersParams {
|
|
302
306
|
orders?: any;
|
|
@@ -555,14 +559,17 @@ export interface AcceptOrRejectOrderParams {
|
|
|
555
559
|
loading?: boolean;
|
|
556
560
|
action: string;
|
|
557
561
|
orderId?: number;
|
|
558
|
-
handleUpdateOrder?: (
|
|
562
|
+
handleUpdateOrder?: (p1: any, p2: any) => {};
|
|
559
563
|
notShowCustomerPhone?: boolean | undefined;
|
|
560
|
-
actions?:
|
|
564
|
+
actions?: any;
|
|
561
565
|
titleAccept?: textTranslate;
|
|
562
566
|
titleReject?: textTranslate;
|
|
563
567
|
titleNotReady?: textTranslate;
|
|
564
568
|
appTitle?: textTranslate;
|
|
565
569
|
orderTitle?: any
|
|
570
|
+
isPage?: boolean
|
|
571
|
+
navigation?: any
|
|
572
|
+
route?: any
|
|
566
573
|
}
|
|
567
574
|
|
|
568
575
|
export interface MapViewParams {
|
|
@@ -584,6 +591,7 @@ export interface ReviewCustomerParams {
|
|
|
584
591
|
actionState?: any,
|
|
585
592
|
handleChangeQualification?: any,
|
|
586
593
|
handleSendCustomerReview?: any,
|
|
594
|
+
handleCustomCustomerReview?: any,
|
|
587
595
|
}
|
|
588
596
|
|
|
589
597
|
export interface NoNetworkParams {
|
|
@@ -95,6 +95,7 @@ import { LogoutButton } from './src/components/LogoutButton';
|
|
|
95
95
|
import { UserFormDetailsUI } from './src/components/UserFormDetails';
|
|
96
96
|
import { WalletTransactionItem } from './src/components/WalletTransactionItem';
|
|
97
97
|
import { Promotions } from './src/components/Promotions'
|
|
98
|
+
import { MultiCart } from './src/components/MultiCart'
|
|
98
99
|
import { USER_TYPE, ORDER_TYPES } from './src/config/constants'
|
|
99
100
|
|
|
100
101
|
import { OSBill, OSTable, OSCoupon, OSTotal, OSRow } from './src/components/OrderSummary/styles';
|
|
@@ -258,6 +259,7 @@ export {
|
|
|
258
259
|
WalletTransactionItem,
|
|
259
260
|
Promotions,
|
|
260
261
|
MyOrders,
|
|
262
|
+
MultiCart,
|
|
261
263
|
ORDER_TYPES,
|
|
262
264
|
USER_TYPE,
|
|
263
265
|
|