@riosst100/pwa-marketplace 2.9.4 → 2.9.6

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.
Files changed (39) hide show
  1. package/i18n/en_US.json +1 -0
  2. package/i18n/id_ID.json +1 -0
  3. package/package.json +1 -1
  4. package/src/componentOverrideMapping.js +6 -1
  5. package/src/components/ConfirmEmailPage/confirmEmail.js +76 -0
  6. package/src/components/ConfirmEmailPage/confirmEmail.module.css +71 -0
  7. package/src/components/ConfirmEmailPage/index.js +1 -0
  8. package/src/components/FavoriteSellerPage/favoriteSeller.js +0 -1
  9. package/src/components/FavoriteSellerPage/item.js +0 -2
  10. package/src/components/OrderDetail/components/itemsOrdered.js +94 -82
  11. package/src/components/OrderDetail/components/rmaList.js +80 -88
  12. package/src/components/OrderDetail/orderDetail.js +154 -95
  13. package/src/components/RMAPage/RMACreate.js +225 -36
  14. package/src/components/RMAPage/RMADetail.js +141 -89
  15. package/src/components/RMAPage/RMAList.js +38 -57
  16. package/src/components/RMAPage/components/productItem.js +55 -30
  17. package/src/components/RMAPage/orderRow.js +109 -254
  18. package/src/components/VerifyEmailPage/verifyEmail.js +33 -10
  19. package/src/intercept.js +8 -1
  20. package/src/overwrites/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js +2 -2
  21. package/src/overwrites/peregrine/lib/talons/CheckoutPage/PaymentInformation/paymentMethods.gql.js +45 -0
  22. package/src/overwrites/peregrine/lib/talons/OrderHistoryPage/orderHistoryPage.gql.js +117 -0
  23. package/src/overwrites/peregrine/lib/talons/OrderHistoryPage/orderRow.gql.js +46 -0
  24. package/src/overwrites/peregrine/lib/talons/OrderHistoryPage/useOrderRow.js +112 -0
  25. package/src/overwrites/peregrine/lib/talons/RMAPage/rmaPage.gql.js +170 -0
  26. package/src/overwrites/venia-ui/lib/components/AccountInformationPage/DeleteAccount.js +5 -37
  27. package/src/overwrites/venia-ui/lib/components/Adapter/adapter.js +3 -1
  28. package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderHistoryPage.js +10 -2
  29. package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderRow.js +158 -79
  30. package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderRow.module.css +3 -3
  31. package/src/overwrites/venia-ui/lib/components/StoreCodeRoute/storeCodeRoute.js +1 -1
  32. package/src/talons/AccountInformationPage/deleteAccount.gql.js +23 -0
  33. package/src/talons/AccountInformationPage/useDeleteAccount.js +98 -0
  34. package/src/talons/ConfirmEmailPage/confirmEmailPage.gql.js +20 -0
  35. package/src/talons/ConfirmEmailPage/useConfirmEmailPage.js +78 -0
  36. package/src/talons/OrderHistoryPage/useOrderHistoryPage.js +115 -0
  37. package/src/talons/RMAPage/useRmaPage.js +145 -0
  38. package/src/talons/VerifyEmailPage/useVerifyEmailPage.js +73 -0
  39. package/src/talons/VerifyEmailPage/verifyEmailPage.gql.js +36 -0
@@ -1,83 +1,142 @@
1
- import React from 'react';
1
+ import React, { useMemo, useRef, useCallback } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
  import { StoreTitle } from '@magento/venia-ui/lib/components/Head';
4
4
  import Image from '@magento/venia-ui/lib/components/Image';
5
- import { Link } from 'react-router-dom';
5
+ import { Link, useParams } from 'react-router-dom';
6
6
  import Button from '@magento/venia-ui/lib/components/Button';
7
7
  import ChatContent from '../LiveChat/chatContent';
8
8
  import cn from 'classnames';
9
9
  import { Send, Printer } from 'iconsax-react';
10
- import Item from './components/productItem';
10
+ import useRmaPage from '@riosst100/pwa-marketplace/src/talons/RMAPage/useRmaPage';
11
11
 
12
12
  const RMADetail = () => {
13
13
  const { formatMessage } = useIntl();
14
+ const { urlKey } = useParams();
15
+ const rmaId = urlKey;
16
+ const { rmaDetail, rmaDetailLoading, rmaDetailError } = useRmaPage({ rmaId });
14
17
  const PAGE_TITLE = formatMessage({
15
18
  id: 'Quotes.pageTitleTextRMADetail',
16
19
  defaultMessage: 'Return Detail'
17
20
  });
18
-
19
- const urlImage = 'https://pwa-tcgcollective.local:8255/media/catalog/product/s/-/s-l1600_6__1.jpg?auto=webp&format=pjpg&width=495&height=618.75&fit=cover';
21
+
22
+ // Dummy chat data retained for development/demo and as a fallback
20
23
  const dummyChat = [
21
24
  {
22
- "message": "May I help you",
23
- "type": "seller",
24
- "timeStamp": "03-06-2024 2:59 pm"
25
+ message: 'May I help you',
26
+ type: 'seller',
27
+ timeStamp: '03-06-2024 2:59 pm'
25
28
  },
26
29
  {
27
- "message": "Yes",
28
- "type": "buyer",
29
- "timeStamp": "03-06-2024 2:59 pm"
30
+ message: 'Yes',
31
+ type: 'buyer',
32
+ timeStamp: '03-06-2024 2:59 pm'
30
33
  },
31
34
  {
32
- "message": "can i get a discount",
33
- "type": "buyer",
34
- "timeStamp": "03-06-2024 2:59 pm"
35
+ message: 'can i get a discount',
36
+ type: 'buyer',
37
+ timeStamp: '03-06-2024 2:59 pm'
35
38
  },
36
39
  {
37
- "message": "you can redeem this code 'JunePlay'",
38
- "type": "seller",
39
- "timeStamp": "03-06-2024 2:59 pm"
40
+ message: "you can redeem this code 'JunePlay'",
41
+ type: 'seller',
42
+ timeStamp: '03-06-2024 2:59 pm'
40
43
  },
41
44
  {
42
- "message": "or this code 'collectfest'",
43
- "type": "seller",
44
- "timeStamp": "03-06-2024 2:59 pm"
45
+ message: "or this code 'collectfest'",
46
+ type: 'seller',
47
+ timeStamp: '03-06-2024 2:59 pm'
45
48
  },
46
49
  {
47
- "message": "May I help you",
48
- "type": "seller",
49
- "timeStamp": "03-06-2024 2:59 pm"
50
+ message: 'May I help you',
51
+ type: 'seller',
52
+ timeStamp: '03-06-2024 2:59 pm'
50
53
  },
51
54
  {
52
- "message": "Yes",
53
- "type": "buyer",
54
- "timeStamp": "03-06-2024 2:59 pm"
55
+ message: 'Yes',
56
+ type: 'buyer',
57
+ timeStamp: '03-06-2024 2:59 pm'
55
58
  },
56
59
  {
57
- "message": "can i get a discount",
58
- "type": "buyer",
59
- "timeStamp": "03-06-2024 2:59 pm"
60
+ message: 'can i get a discount',
61
+ type: 'buyer',
62
+ timeStamp: '03-06-2024 2:59 pm'
60
63
  },
61
64
  {
62
- "message": "you can redeem this code 'JunePlay'",
63
- "type": "seller",
64
- "timeStamp": "03-06-2024 2:59 pm"
65
+ message: "you can redeem this code 'JunePlay'",
66
+ type: 'seller',
67
+ timeStamp: '03-06-2024 2:59 pm'
65
68
  },
66
69
  {
67
- "message": "or this code 'collectfest'",
68
- "type": "seller",
69
- "timeStamp": "03-06-2024 2:59 pm"
70
- },
71
- ]
70
+ message: "or this code 'collectfest'",
71
+ type: 'seller',
72
+ timeStamp: '03-06-2024 2:59 pm'
73
+ }
74
+ ];
75
+
76
+ const chatData = useMemo(() => {
77
+ const messages = (rmaDetail && rmaDetail.messages) ? rmaDetail.messages : [];
78
+ const email = rmaDetail && rmaDetail.shipping_address && rmaDetail.shipping_address.email;
79
+ const mapped = messages.map(m => ({
80
+ message: m.text,
81
+ type: email && m.sender_email === email ? 'buyer' : 'seller',
82
+ timeStamp: m.created_at
83
+ }));
84
+ return mapped.length > 0 ? mapped : dummyChat;
85
+ }, [rmaDetail]);
86
+
87
+ const formatted = useMemo(() => {
88
+ if (!rmaDetail) return {};
89
+ const toDate = (d) => {
90
+ if (!d) return '';
91
+ const iso = d.replace(' ', 'T');
92
+ const dt = new Date(iso);
93
+ if (isNaN(dt.getTime())) return d;
94
+ return dt.toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' });
95
+ };
96
+ return {
97
+ status: rmaDetail.status_label || rmaDetail.status,
98
+ increment_id: rmaDetail.increment_id || rmaDetail.increment_id,
99
+ rmaNumber: rmaDetail.increment_id || rmaDetail.rma_id,
100
+ orderNumber: rmaDetail.order && rmaDetail.order.increment_id ? rmaDetail.order.increment_id : '-',
101
+ orderDate: rmaDetail.order && rmaDetail.order.created_at ? toDate(rmaDetail.order.created_at) : '',
102
+ dateRequested: rmaDetail.rma_date ? toDate(rmaDetail.rma_date) : '',
103
+ shipping: rmaDetail.shipping_address,
104
+ items: rmaDetail.items || []
105
+ };
106
+ }, [rmaDetail]);
107
+ // Use same in-page print approach as OrderDetail: CSS hides everything except .print-area
108
+ const printRef = useRef(null);
109
+ const handlePrint = useCallback(() => {
110
+ const styleId = 'rma-detail-print-style';
111
+ let style = document.getElementById(styleId);
112
+ if (!style) {
113
+ style = document.createElement('style');
114
+ style.id = styleId;
115
+ style.type = 'text/css';
116
+ style.media = 'print';
117
+ style.appendChild(document.createTextNode(`
118
+ @page { size: A4; margin: 0; }
119
+ @media print {
120
+ body { margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
121
+ body * { visibility: hidden !important; }
122
+ .print-area, .print-area * { visibility: visible !important; }
123
+ .print-area { position: relative; left: 0; top: -20px; width: 100%; }
124
+ .no-print { display: none !important; }
125
+ }
126
+ `));
127
+ document.head.appendChild(style);
128
+ }
129
+ window.print();
130
+ }, []);
72
131
 
73
132
  return (
74
- <div className='relative grid gap-y-md'>
133
+ <div className='print-area relative grid gap-y-md' ref={printRef}>
75
134
  <StoreTitle>{PAGE_TITLE}</StoreTitle>
76
135
  <div aria-live="polite" className="text-xl font-medium text-left">
77
- {PAGE_TITLE} - DEV123123123
136
+ {PAGE_TITLE} {formatted.increment_id ? `#${formatted.increment_id}` : ''}
78
137
  </div>
79
138
  <div className='block relative'>
80
- <div className='flex gap-x-4 justify-end mb-2'>
139
+ <div className='flex gap-x-4 justify-end mb-2 no-print'>
81
140
  <Button
82
141
  priority='high'
83
142
  classes={{
@@ -87,6 +146,7 @@ const RMADetail = () => {
87
146
  "bg-white px-6 py-2 rounded-md text-gray-900 hover_!text-white border border-solid",
88
147
  "border-gray-900 focus-visible_outline-none hover_bg-gray-900"
89
148
  )}
149
+ onClick={handlePrint}
90
150
  >
91
151
  <span className='flex gap-x-3 justify-center group-hover_!text-white'>
92
152
  <Printer
@@ -138,12 +198,12 @@ const RMADetail = () => {
138
198
  {
139
199
  formatMessage({
140
200
  id: 'RMA.Status',
141
- defaultMessage: 'Status'
201
+ defaultMessage: 'Status Return'
142
202
  })
143
203
  }
144
204
  </span>
145
205
  <span className='font-medium block text-blue-700'>
146
- Pending Approval
206
+ {formatted.status || '-'}
147
207
  </span>
148
208
  </p>
149
209
  </div>
@@ -158,7 +218,7 @@ const RMADetail = () => {
158
218
  }
159
219
  </span>
160
220
  <span className='font-normal block'>
161
- DEV123123123-12
221
+ {formatted.rmaNumber || '-'}
162
222
  </span>
163
223
  </p>
164
224
  </div>
@@ -173,7 +233,7 @@ const RMADetail = () => {
173
233
  }
174
234
  </span>
175
235
  <span className='font-normal block'>
176
- DEV123123123 at Nov 8, 2024
236
+ {`${formatted.orderNumber || '-'}${formatted.orderDate ? ` at ${formatted.orderDate}` : ''}`}
177
237
  </span>
178
238
  </p>
179
239
  </div>
@@ -188,7 +248,7 @@ const RMADetail = () => {
188
248
  }
189
249
  </span>
190
250
  <span className='font-normal block'>
191
- Nov 17, 2024
251
+ {formatted.dateRequested || '-'}
192
252
  </span>
193
253
  </p>
194
254
  </div>
@@ -206,49 +266,18 @@ const RMADetail = () => {
206
266
  </span>
207
267
  </p>
208
268
  <p className='text-[13px] text-colorDefault whitespace-pre-wrap'>
209
- John Doe{'\n'}
210
- johndoe@email.com{'\n'}
211
- 1233123412{'\n'}
212
- 6164 Honey Bluff Parkway{'\n'}
213
- Calder{'\n'}
214
- Michigan{'\n'}
215
- UnitedState{'\n'}
269
+ {
270
+ `${formatted.shipping.firstname || ''} ${formatted.shipping.lastname || ''}\n` +
271
+ `${formatted.shipping.email || ''}\n` +
272
+ `${formatted.shipping.telephone || ''}\n` +
273
+ `${formatted.shipping.street || ''}\n` +
274
+ `${formatted.shipping.city || ''}\n` +
275
+ `${formatted.shipping.region || ''}\n` +
276
+ `${formatted.shipping.country_id || ''}\n`
277
+ }
216
278
  </p>
217
279
  </div>
218
280
  </div>
219
- {/* <div className='relative flex w-full md_w-6/12 justify-center flex-col mb-10 md_mb-0'>
220
- <Image
221
- alt='product image'
222
- className="relative max-w-[300px]"
223
- src={urlImage}
224
- classes={{
225
- root: ' relative self-center mb-5'
226
- }}
227
- />
228
-
229
- <p className='text-[16px] font-medium text-colorDefault text-center'>
230
- $60.00
231
- </p>
232
-
233
- <Link to="/pop-mart-star-wars-series-blind-box-confirmed-figures-designer-art-new-toys-gift.html" className="max-w-[360px] self-center mb-5">
234
- <span className=" text-[13px] block text-center font-medium text-colorDefault w-full">
235
- POP MART Star Wars Series Blind Box Confirmed Figures Designer Art New Toys Gift
236
- </span>
237
- </Link>
238
- <Button
239
- priority='high'
240
- classes={{
241
- content: 'capitalize text-[16px] font-semibold'
242
- }}
243
- >
244
- {
245
- formatMessage({
246
- id: 'Quotes.addToCart',
247
- defaultMessage: 'Add To Cart'
248
- })
249
- }
250
- </Button>
251
- </div> */}
252
281
  </div>
253
282
  </div>
254
283
  <div className=' flex flex-col'>
@@ -256,18 +285,41 @@ const RMADetail = () => {
256
285
  Items
257
286
  </div>
258
287
  <div className='border-t border-gray-100 py-4 flex flex-col gap-y-4'>
259
- {[...Array(2)].map((item) => (
260
- <Item />
288
+ {!rmaDetailLoading && formatted.items && formatted.items.length === 0 && (
289
+ <div className='text-[13px] text-colorDefault'>No items</div>
290
+ )}
291
+ {!rmaDetailLoading && formatted.items && formatted.items.map((it, idx) => (
292
+ <div key={it.id || idx} className='flex gap-4 items-start'>
293
+ <div className='w-[70px] h-[70px] overflow-hidden rounded-md bg-gray-50 flex items-center justify-center'>
294
+ {it.image_url ? (
295
+ <img src={it.image_url} alt={it.name} width={70} height={70} />
296
+ ) : (
297
+ <div className='text-[10px] text-gray-400'>No Image</div>
298
+ )}
299
+ </div>
300
+ <div className='flex flex-col text-[13px]'>
301
+ <span className='font-medium'>{it.name}</span>
302
+ <span>SKU : {it.sku || '-'}</span>
303
+ <span>Qty : {it.qty_requested || 0}</span>
304
+ <span>Reason : {it.reason || '-'}</span>
305
+ <span>Resolution : {it.resolution || '-'}</span>
306
+ <span>Condition : {it.condition || '-'}</span>
307
+ </div>
308
+ </div>
261
309
  ))}
262
310
  </div>
263
311
  </div>
264
- <div className=' flex flex-col mb-10'>
312
+ <div className=' flex flex-col mb-10 no-print'>
265
313
  <div aria-live="polite" className="text-lg font-medium text-left mb-4">
266
314
  Messages
267
315
  </div>
268
316
  <div className='rounded-md border border-gray-100 p-4 pr-0 pt-0 flex flex-col gap-y-6'>
269
317
  <div className='max-h-[600px] overflow-auto relative chat-container pr-4 pt-4'>
270
- <ChatContent chatData={dummyChat} />
318
+ {rmaDetailError ? (
319
+ <div className='text-[13px] text-red-600'>Failed to load messages.</div>
320
+ ) : (
321
+ <ChatContent chatData={chatData} />
322
+ )}
271
323
  </div>
272
324
  <div className='flex gap-2 pr-4'>
273
325
  <textarea
@@ -7,8 +7,8 @@ import { shape, string } from 'prop-types';
7
7
  import { Form } from 'informed';
8
8
 
9
9
  import { useToasts } from '@magento/peregrine/lib/Toasts';
10
- import OrderHistoryContextProvider from '@magento/peregrine/lib/talons/OrderHistoryPage/orderHistoryContext';
11
- import { useOrderHistoryPage } from '@magento/peregrine/lib/talons/OrderHistoryPage/useOrderHistoryPage';
10
+ // import OrderHistoryContextProvider from '@magento/peregrine/lib/talons/OrderHistoryPage/orderHistoryContext';
11
+ import { useRmaPage } from '@riosst100/pwa-marketplace/src/talons/RMAPage/useRmaPage';
12
12
 
13
13
  import { useStyle } from '@magento/venia-ui/lib/classify';
14
14
  import Button from '@magento/venia-ui/lib/components/Button';
@@ -16,9 +16,9 @@ import Icon from '@magento/venia-ui/lib/components/Icon';
16
16
  import LoadingIndicator from '@magento/venia-ui/lib/components/LoadingIndicator';
17
17
  import { StoreTitle } from '@magento/venia-ui/lib/components/Head';
18
18
  import TextInput from '@magento/venia-ui/lib/components/TextInput';
19
-
19
+ import Pagination from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Pagination';
20
20
  import defaultClasses from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderHistoryPage.module.css';
21
- import OrderRow from './orderRow';
21
+ import RmaRow from './orderRow';
22
22
  import ResetButton from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/OrderHistoryPage/resetButton';
23
23
  import { SearchNormal } from 'iconsax-react';
24
24
  import cn from 'classnames';
@@ -34,17 +34,21 @@ const errorIcon = (
34
34
  );
35
35
 
36
36
  const RMAList = props => {
37
- const talonProps = useOrderHistoryPage();
37
+ const talonProps = useRmaPage();
38
38
  const {
39
39
  errorMessage,
40
- loadMoreOrders,
40
+ loadMoreRmas,
41
41
  handleReset,
42
42
  handleSubmit,
43
43
  isBackgroundLoading,
44
44
  isLoadingWithoutData,
45
- orders,
45
+ rmas,
46
46
  pageInfo,
47
- searchText
47
+ searchText,
48
+ pageControl,
49
+ rmaDetailData,
50
+ rmaDetailLoading,
51
+ rmaDetailError
48
52
  } = talonProps;
49
53
  const [, { addToast }] = useToasts();
50
54
  const { formatMessage } = useIntl();
@@ -61,33 +65,33 @@ const RMAList = props => {
61
65
 
62
66
  const classes = useStyle(defaultClasses, props.classes);
63
67
 
64
- const orderRows = useMemo(() => {
65
- return orders.map(order => {
66
- return <OrderRow key={order.id} order={order} />;
68
+ const rmaRows = useMemo(() => {
69
+ return rmas.map(rma => {
70
+ return <RmaRow key={rma.rma_id} rma={rma} />;
67
71
  });
68
- }, [orders]);
72
+ }, [rmas]);
69
73
 
70
74
  const pageContents = useMemo(() => {
71
75
  if (isLoadingWithoutData) {
72
76
  return <LoadingIndicator />;
73
- } else if (!isBackgroundLoading && searchText && !orders.length) {
77
+ } else if (!isBackgroundLoading && searchText && !rmas.length) {
74
78
  return (
75
79
  <h3 className={classes.emptyHistoryMessage}>
76
80
  <FormattedMessage
77
- id={'orderHistoryPage.invalidOrderNumber'}
78
- defaultMessage={`Order "${searchText}" was not found.`}
81
+ id={'rmaPage.invalidOrderNumber'}
82
+ defaultMessage={`RMA for Order "${searchText}" was not found.`}
79
83
  values={{
80
84
  number: searchText
81
85
  }}
82
86
  />
83
87
  </h3>
84
88
  );
85
- } else if (!isBackgroundLoading && !orders.length) {
89
+ } else if (!isBackgroundLoading && !rmas.length) {
86
90
  return (
87
91
  <h3 className={classes.emptyHistoryMessage}>
88
92
  <FormattedMessage
89
- id={'orderHistoryPage.emptyDataMessage'}
90
- defaultMessage={"You don't have any orders yet."}
93
+ id={'rmaPage.emptyDataMessage'}
94
+ defaultMessage={"You don't have any RMA requests yet."}
91
95
  />
92
96
  </h3>
93
97
  );
@@ -95,9 +99,9 @@ const RMAList = props => {
95
99
  return (
96
100
  <ul
97
101
  className={classes.orderHistoryTable}
98
- data-cy="OrderHistoryPage-orderHistoryTable"
102
+ data-cy="RMAPage-rmaTable"
99
103
  >
100
- {orderRows}
104
+ {rmaRows}
101
105
  </ul>
102
106
  );
103
107
  }
@@ -106,8 +110,8 @@ const RMAList = props => {
106
110
  classes.orderHistoryTable,
107
111
  isBackgroundLoading,
108
112
  isLoadingWithoutData,
109
- orderRows,
110
- orders.length,
113
+ rmaRows,
114
+ rmas.length,
111
115
  searchText
112
116
  ]);
113
117
 
@@ -127,24 +131,20 @@ const RMAList = props => {
127
131
  />
128
132
  ) : null;
129
133
 
130
- const loadMoreButton = loadMoreOrders ? (
134
+ const loadMoreButton = loadMoreRmas ? (
131
135
  <Button
132
136
  classes={{ root_lowPriority: classes.loadMoreButton }}
133
137
  disabled={isBackgroundLoading || isLoadingWithoutData}
134
- onClick={loadMoreOrders}
138
+ onClick={loadMoreRmas}
135
139
  priority="low"
136
140
  >
137
141
  <FormattedMessage
138
- id={'orderHistoryPage.loadMore'}
142
+ id={'rmaPage.loadMore'}
139
143
  defaultMessage={'Load More'}
140
144
  />
141
145
  </Button>
142
146
  ) : null;
143
147
 
144
- const gotoSelectRMA = () => {
145
- history.push('/return/select')
146
- }
147
-
148
148
  useEffect(() => {
149
149
  if (errorMessage) {
150
150
  addToast({
@@ -158,8 +158,7 @@ const RMAList = props => {
158
158
  }, [addToast, errorMessage]);
159
159
 
160
160
  return (
161
- <OrderHistoryContextProvider>
162
- <div className="grid gap-y-md">
161
+ <div className="grid gap-y-md">
163
162
  <StoreTitle>{PAGE_TITLE}</StoreTitle>
164
163
  <div aria-live="polite" className="text-xl font-medium text-left">
165
164
  {PAGE_TITLE}
@@ -196,34 +195,16 @@ const RMAList = props => {
196
195
  </Form>
197
196
  <span className={classes.pageInfo}>{pageInfoLabel}</span>
198
197
  </div>
199
- <div className='flex justify-end w-full'>
200
- <Button
201
- priority='high'
202
- classes={{
203
- content: "flex justify-center gap-x-2.5 items-center text-[14px] font-medium capitalize"
204
- }}
205
- className={cn(
206
- "bg-blue-600 px-6 py-2 rounded-md text-white border ",
207
- "border-blue-600 hover_bg-blue-700 hover_border-blue-700 focus-visible_outline-none"
208
- )}
209
- onClick={gotoSelectRMA}
210
- >
211
- <span className='flex gap-x-3 justify-center'>
212
- {
213
- formatMessage({
214
- id: 'RMA.newReturn',
215
- defaultMessage: 'New Return'
216
- })
217
- }
218
- </span>
219
- </Button>
220
- </div>
221
198
  {pageContents}
199
+ <div className="mt-4">
200
+ {pageControl?.totalPages > 1 ? (
201
+ <Pagination pageControl={pageControl} />
202
+ ) : null}
203
+ </div>
222
204
  {loadMoreButton}
223
- </div>
224
- </OrderHistoryContextProvider >
225
- );
226
- };
205
+ </div>
206
+ );
207
+ }
227
208
 
228
209
  export default RMAList;
229
210