@akinon/projectzero 2.0.0-beta.10 → 2.0.0-beta.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @akinon/projectzero
2
2
 
3
+ ## 2.0.0-beta.12
4
+
5
+ ### Minor Changes
6
+
7
+ - 1d79e32: ZERO-3540: Next.js Upgrade to 15.4.5
8
+
9
+ ## 2.0.0-beta.11
10
+
11
+ ### Minor Changes
12
+
13
+ - ac783d6: ZERO-3482: Update tailwindcss to version 4.1.11 and enhance button cursor styles
14
+
3
15
  ## 2.0.0-beta.10
4
16
 
5
17
  ### Minor Changes
@@ -1,5 +1,57 @@
1
1
  # projectzeronext
2
2
 
3
+ ## 2.0.0-beta.12
4
+
5
+ ### Minor Changes
6
+
7
+ - 1d79e32: ZERO-3540: Next.js Upgrade to 15.4.5
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [1d79e32]
12
+ - @akinon/pz-checkout-gift-pack@2.0.0-beta.12
13
+ - @akinon/pz-one-click-checkout@2.0.0-beta.12
14
+ - @akinon/pz-basket-gift-pack@2.0.0-beta.12
15
+ - @akinon/pz-tamara-extension@2.0.0-beta.12
16
+ - @akinon/pz-pay-on-delivery@2.0.0-beta.12
17
+ - @akinon/pz-tabby-extension@2.0.0-beta.12
18
+ - @akinon/pz-credit-payment@2.0.0-beta.12
19
+ - @akinon/pz-click-collect@2.0.0-beta.12
20
+ - @akinon/pz-masterpass@2.0.0-beta.12
21
+ - @akinon/pz-saved-card@2.0.0-beta.12
22
+ - @akinon/next@2.0.0-beta.12
23
+ - @akinon/pz-akifast@2.0.0-beta.12
24
+ - @akinon/pz-gpay@2.0.0-beta.12
25
+ - @akinon/pz-b2b@2.0.0-beta.12
26
+ - @akinon/pz-bkm@2.0.0-beta.12
27
+ - @akinon/pz-otp@2.0.0-beta.12
28
+
29
+ ## 2.0.0-beta.11
30
+
31
+ ### Minor Changes
32
+
33
+ - ac783d6: ZERO-3482: Update tailwindcss to version 4.1.11 and enhance button cursor styles
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [ac783d6]
38
+ - @akinon/pz-checkout-gift-pack@2.0.0-beta.11
39
+ - @akinon/pz-one-click-checkout@2.0.0-beta.11
40
+ - @akinon/pz-basket-gift-pack@2.0.0-beta.11
41
+ - @akinon/pz-tamara-extension@2.0.0-beta.11
42
+ - @akinon/pz-pay-on-delivery@2.0.0-beta.11
43
+ - @akinon/pz-tabby-extension@2.0.0-beta.11
44
+ - @akinon/pz-credit-payment@2.0.0-beta.11
45
+ - @akinon/pz-click-collect@2.0.0-beta.11
46
+ - @akinon/pz-masterpass@2.0.0-beta.11
47
+ - @akinon/pz-saved-card@2.0.0-beta.11
48
+ - @akinon/next@2.0.0-beta.11
49
+ - @akinon/pz-akifast@2.0.0-beta.11
50
+ - @akinon/pz-gpay@2.0.0-beta.11
51
+ - @akinon/pz-b2b@2.0.0-beta.11
52
+ - @akinon/pz-bkm@2.0.0-beta.11
53
+ - @akinon/pz-otp@2.0.0-beta.11
54
+
3
55
  ## 2.0.0-beta.10
4
56
 
5
57
  ### Minor Changes
@@ -15,13 +15,18 @@ The plugins selected from this list will be added to the project and ready for u
15
15
 
16
16
  ### Plugin List
17
17
 
18
- 1. Masterpass
19
- 2. Basket Gift Pack
18
+ 1. Basket Gift Pack
19
+ 2. Click & Collect
20
20
  3. Checkout Gift Pack
21
- 4. Checkout Providers
22
- 5. OTP
23
- 6. Redirection Payment
24
- 7. Click & Collect
21
+ 4. One Click Checkout
22
+ 5. Garanti Pay
23
+ 6. Pay On Delivery
24
+ 7. OTP
25
+ 8. BKM Express
26
+ 9. Credit Payment
27
+ 10. Multi Basket
28
+ 11. Tabby Payment Extension
29
+ 12. Tamara Payment Extension
25
30
 
26
31
  ## Installation
27
32
 
@@ -33,44 +38,74 @@ The plugins selected from this list will be added to the project and ready for u
33
38
 
34
39
  2. Select the plugins desire to install from the list provided.
35
40
 
36
- ### Masterpass
41
+ ### Basket Gift Pack
37
42
 
38
- The Masterpass plugin enables users to make payments with their Masterpass-registered cards on the payment page. With this plugin, operations such as listing Masterpass-registered cards, adding new cards, and removing cards can be performed.
43
+ Adds a gift pack and/or a gift note to products in the basket. Enhances the gifting experience for customers.
39
44
 
40
- [Click here for details](https://bitbucket.org/akinonteam/pz-masterpass/src/main/)
45
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-basket-gift-pack)
41
46
 
42
- ### Basket Gift Pack
47
+ ### Click & Collect
43
48
 
44
- This plugin allows for the addition of gift pack and gift note or just a gift note for products on the basket page.
49
+ Allows customers to place an order online and pick it up from a selected store. Reduces delivery costs and improves convenience for users.
45
50
 
46
- [Click here for details](https://bitbucket.org/akinonteam/pz-basket-gift-pack/src/main/)
51
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-click-collect)
47
52
 
48
53
  ### Checkout Gift Pack
49
54
 
50
- Used to enable the gift pack option for products on the payment page.
55
+ Enables a gift pack option on the payment page. Customers can choose to wrap their purchases as gifts during checkout.
56
+
57
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-checkout-gift-pack)
58
+
59
+ ### One Click Checkout
51
60
 
52
- [Click here for details](https://bitbucket.org/akinonteam/pz-checkout-gift-pack/src/main/)
61
+ Simplifies the checkout process by adding one-click payment methods.
53
62
 
54
- ### Checkout Providers
63
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-one-click-checkout)
55
64
 
56
- This plugin is used to add payment methods to the checkout process.
65
+ ### Garanti Pay
57
66
 
58
- [Click here for details](https://bitbucket.org/akinonteam/pz_checkout_providers/src/master/)
67
+ Allows Garanti Bank credit card users to make fast and secure payments without entering card details.
68
+
69
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-gpay)
70
+
71
+ ### Pay On Delivery
72
+
73
+ Provides an option for customers to pay with cash or a credit card at the time of delivery.
74
+
75
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-pay-on-delivery)
59
76
 
60
77
  ### OTP
61
78
 
62
- This application provides SMS verification (OTP) support for desired actions such as registration and updating profile information.
79
+ Adds SMS-based OTP (One-Time Password) verification for secure actions such as registration and updating profile information.
63
80
 
64
- [Click here for details](https://bitbucket.org/akinonteam/pz_otp/src/master/)
81
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-otp)
65
82
 
66
- ### Redirection Payment
83
+ ### BKM Express
67
84
 
68
- Used to enable any payment option with a redirection type on the payment page.
85
+ Integrates the BKM Express payment method for users to make fast and secure payments without entering card details.
69
86
 
70
- [Click here for details](https://bitbucket.org/akinonteam/pz-redirection-payment/src/main/)
87
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-bkm)
71
88
 
72
- ### Click & Collect
89
+ ### Credit Payment
90
+
91
+ Supports credit card payments with installment and non-installment options.
92
+
93
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-credit-payment)
94
+
95
+ ### Multi Basket
96
+
97
+ Enables customers to create and manage multiple virtual baskets at the same time. Facilitates better basket organization.
98
+
99
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-multi-basket)
100
+
101
+ ### Tabby Payment Extension
102
+
103
+ Integrates Tabby’s installment and deferred payment solutions into the checkout.
104
+
105
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-tabby-extension)
106
+
107
+ ### Tamara Payment Extension
73
108
 
74
- This plugin enables the "Click & Collect" in-store pickup option.
109
+ Adds Tamara’s "Buy Now, Pay Later" feature to the payment options. Customers can defer payments while ensuring a seamless checkout experience.
75
110
 
76
- [Click here for details](https://bitbucket.org/akinonteam/pz-click-collect/src/main/)
111
+ [Click here for details](https://www.npmjs.com/package/@akinon/pz-tamara-extension)
@@ -1,11 +1,11 @@
1
1
  const nextJest = require('next/jest');
2
- import type { InitialOptionsTsJest } from 'ts-jest/dist/types';
2
+ import type { JestConfigWithTsJest } from 'ts-jest';
3
3
 
4
4
  const createJestConfig = nextJest({
5
5
  dir: './'
6
6
  });
7
7
 
8
- const config: InitialOptionsTsJest = {
8
+ const config: JestConfigWithTsJest = {
9
9
  preset: 'ts-jest',
10
10
  setupFilesAfterEnv: ['<rootDir>/setupTests.ts'],
11
11
  transform: {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectzeronext",
3
- "version": "2.0.0-beta.10",
3
+ "version": "2.0.0-beta.12",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -24,35 +24,35 @@
24
24
  "test:middleware": "jest middleware-matcher.test.ts --bail"
25
25
  },
26
26
  "dependencies": {
27
- "@akinon/next": "2.0.0-beta.10",
28
- "@akinon/pz-akifast": "2.0.0-beta.10",
29
- "@akinon/pz-b2b": "2.0.0-beta.10",
30
- "@akinon/pz-basket-gift-pack": "2.0.0-beta.10",
31
- "@akinon/pz-bkm": "2.0.0-beta.10",
32
- "@akinon/pz-checkout-gift-pack": "2.0.0-beta.10",
33
- "@akinon/pz-click-collect": "2.0.0-beta.10",
34
- "@akinon/pz-credit-payment": "2.0.0-beta.10",
35
- "@akinon/pz-gpay": "2.0.0-beta.10",
36
- "@akinon/pz-masterpass": "2.0.0-beta.10",
37
- "@akinon/pz-one-click-checkout": "2.0.0-beta.10",
38
- "@akinon/pz-otp": "2.0.0-beta.10",
39
- "@akinon/pz-pay-on-delivery": "2.0.0-beta.10",
40
- "@akinon/pz-saved-card": "2.0.0-beta.10",
41
- "@akinon/pz-tabby-extension": "2.0.0-beta.10",
42
- "@akinon/pz-tamara-extension": "2.0.0-beta.10",
27
+ "@akinon/next": "2.0.0-beta.12",
28
+ "@akinon/pz-akifast": "2.0.0-beta.12",
29
+ "@akinon/pz-b2b": "2.0.0-beta.12",
30
+ "@akinon/pz-basket-gift-pack": "2.0.0-beta.12",
31
+ "@akinon/pz-bkm": "2.0.0-beta.12",
32
+ "@akinon/pz-checkout-gift-pack": "2.0.0-beta.12",
33
+ "@akinon/pz-click-collect": "2.0.0-beta.12",
34
+ "@akinon/pz-credit-payment": "2.0.0-beta.12",
35
+ "@akinon/pz-gpay": "2.0.0-beta.12",
36
+ "@akinon/pz-masterpass": "2.0.0-beta.12",
37
+ "@akinon/pz-one-click-checkout": "2.0.0-beta.12",
38
+ "@akinon/pz-otp": "2.0.0-beta.12",
39
+ "@akinon/pz-pay-on-delivery": "2.0.0-beta.12",
40
+ "@akinon/pz-saved-card": "2.0.0-beta.12",
41
+ "@akinon/pz-tabby-extension": "2.0.0-beta.12",
42
+ "@akinon/pz-tamara-extension": "2.0.0-beta.12",
43
43
  "@hookform/resolvers": "2.9.0",
44
44
  "@next/third-parties": "14.1.0",
45
45
  "@react-google-maps/api": "2.17.1",
46
46
  "@tailwindcss/postcss": "4.0.0",
47
47
  "dayjs": "1.11.5",
48
48
  "lossless-json": "2.0.5",
49
- "next": "15.3.2",
49
+ "next": "15.4.5",
50
50
  "next-auth": "4.24.11",
51
51
  "next-pwa": "5.6.0",
52
52
  "pino": "8.11.0",
53
53
  "postcss": "8.5.3",
54
- "react": "19.0.0",
55
- "react-dom": "19.0.0",
54
+ "react": "19.1.1",
55
+ "react-dom": "19.1.1",
56
56
  "react-google-recaptcha": "2.1.0",
57
57
  "react-hook-form": "7.31.3",
58
58
  "react-intersection-observer": "9.4.0",
@@ -63,7 +63,7 @@
63
63
  "yup": "0.32.11"
64
64
  },
65
65
  "devDependencies": {
66
- "@akinon/eslint-plugin-projectzero": "2.0.0-beta.10",
66
+ "@akinon/eslint-plugin-projectzero": "2.0.0-beta.12",
67
67
  "@semantic-release/changelog": "6.0.2",
68
68
  "@semantic-release/exec": "6.0.3",
69
69
  "@semantic-release/git": "10.0.1",
@@ -100,7 +100,7 @@
100
100
  "stylelint-config-standard": "25.0.0",
101
101
  "stylelint-scss": "4.2.0",
102
102
  "stylelint-selector-bem-pattern": "2.1.1",
103
- "tailwindcss": "4.1.6",
103
+ "tailwindcss": "4.1.11",
104
104
  "ts-jest": "29.1.1",
105
105
  "ts-node": "10.7.0",
106
106
  "typescript": "5.7.2"
@@ -237,13 +237,13 @@ const AccountOrderCancellation = ({ params }) => {
237
237
  <div>
238
238
  <div className="pb-2 mb-3 text-lg border-gray border-b">
239
239
  <span data-testid="account-orders-return-order-count">
240
- {order.orderitem_set.length}
240
+ {order?.orderitem_set?.length}
241
241
  </span>{' '}
242
242
  <span>{t('account.my_orders.detail.products')}</span>
243
243
  </div>
244
244
 
245
245
  <form onSubmit={handleSubmit(onSubmit)}>
246
- {order.orderitem_set.map((item, index: number) => (
246
+ {order?.orderitem_set?.map((item, index: number) => (
247
247
  <Controller
248
248
  defaultValue={[]}
249
249
  control={control}
@@ -254,7 +254,7 @@ const AccountOrderCancellation = ({ params }) => {
254
254
  return cancelItem.order_item === item.id;
255
255
  });
256
256
 
257
- const cancellationType = item.is_refundable
257
+ const cancellationType = item?.is_refundable
258
258
  ? 'refund'
259
259
  : 'cancel';
260
260
 
@@ -270,7 +270,10 @@ const AccountOrderCancellation = ({ params }) => {
270
270
  onChange={onChange}
271
271
  value={value}
272
272
  selectOption={selectOption}
273
- fileInput={fileInputCondition(item, item.product.name)}
273
+ fileInput={fileInputCondition(
274
+ item,
275
+ item?.product?.name
276
+ )}
274
277
  />
275
278
  );
276
279
  }}
@@ -33,14 +33,15 @@ const AccountOrderDetail = ({ params }) => {
33
33
  const groupedOrder = [];
34
34
 
35
35
  if (order) {
36
- const groupedData = order.orderitem_set.reduce((groups, item) => {
37
- const { tracking_number } = item;
38
- if (!groups[tracking_number]) {
39
- groups[tracking_number] = [];
40
- }
41
- groups[tracking_number].push(item);
42
- return groups;
43
- }, {});
36
+ const groupedData =
37
+ order?.orderitem_set?.reduce((groups, item) => {
38
+ const { tracking_number } = item;
39
+ if (!groups[tracking_number]) {
40
+ groups[tracking_number] = [];
41
+ }
42
+ groups[tracking_number].push(item);
43
+ return groups;
44
+ }, {}) || {};
44
45
 
45
46
  const result = Object.values(groupedData);
46
47
 
@@ -77,8 +78,8 @@ const AccountOrderDetail = ({ params }) => {
77
78
 
78
79
  <div>
79
80
  <span className="text-base font-bold">
80
- {order?.orderitem_set.length}{' '}
81
- {t('account.my_orders.detail.products')} {groupedOrder.length}{' '}
81
+ {order?.orderitem_set?.length}{' '}
82
+ {t('account.my_orders.detail.products')} {groupedOrder?.length}{' '}
82
83
  {t('account.my_orders.detail.packages')}
83
84
  </span>
84
85
  </div>
@@ -88,16 +89,17 @@ const AccountOrderDetail = ({ params }) => {
88
89
  className="break-words"
89
90
  >
90
91
  <span>{t('account.my_orders.detail.delivery_address')}</span>:{' '}
91
- {order.shipping_address.line} {order.shipping_address.district.name}{' '}
92
- {order.shipping_address.township.name}{' '}
93
- {order.shipping_address.city.name}
92
+ {order?.shipping_address?.line}{' '}
93
+ {order?.shipping_address?.district?.name}{' '}
94
+ {order?.shipping_address?.township?.name}{' '}
95
+ {order?.shipping_address?.city?.name}
94
96
  </div>
95
97
  </OrderDetailHeader>
96
98
 
97
99
  <div>
98
100
  {groupedOrder.map((group, i) => {
99
101
  const orderStatus = getOrderStatus(
100
- group[0].status.value.toString(),
102
+ group[0]?.status?.value?.toString(),
101
103
  t
102
104
  );
103
105
 
@@ -121,8 +123,8 @@ const AccountOrderDetail = ({ params }) => {
121
123
  <div className="flex justify-between items-center lg:gap-x-12">
122
124
  <div className="text-base">{orderStatus.label}</div>
123
125
 
124
- {group[0].tracking_number && group[0].tracking_url && (
125
- <Link href={group[0].tracking_url}>
126
+ {group[0]?.tracking_number && group[0]?.tracking_url && (
127
+ <Link href={group[0]?.tracking_url}>
126
128
  <Button className="px-7" appearance="filled">
127
129
  {t('account.my_orders.detail.track_shipment')}
128
130
  </Button>
@@ -134,7 +136,7 @@ const AccountOrderDetail = ({ params }) => {
134
136
  <div className="px-4 lg:px-7">
135
137
  {group.map((item, index) => {
136
138
  const itemStatus = getOrderStatus(
137
- item.status.value.toString(),
139
+ item?.status?.value?.toString(),
138
140
  t
139
141
  );
140
142
 
@@ -147,15 +149,15 @@ const AccountOrderDetail = ({ params }) => {
147
149
  <div className="shrink-0">
148
150
  <Link
149
151
  className="block"
150
- href={item.product.absolute_url}
152
+ href={item?.product?.absolute_url}
151
153
  >
152
154
  <Image
153
155
  src={
154
- item.product.image
156
+ item?.product?.image
155
157
  ? item.product.image
156
158
  : '/noimage.jpg'
157
159
  }
158
- alt={item.product.name}
160
+ alt={item?.product?.name}
159
161
  width={112}
160
162
  height={150}
161
163
  />
@@ -164,33 +166,33 @@ const AccountOrderDetail = ({ params }) => {
164
166
 
165
167
  <div className="flex flex-col justify-between lg:max-w-48">
166
168
  <div className="text-sm">
167
- <Link href={item.product.absolute_url}>
168
- {item.product.name}
169
+ <Link href={item?.product?.absolute_url}>
170
+ {item?.product?.name}
169
171
  </Link>
170
172
  </div>
171
173
 
172
174
  <div className="text-gray-900 text-xs">
173
- {item.product.attributes.filterable_color && (
175
+ {item?.product?.attributes?.filterable_color && (
174
176
  <div>
175
177
  <span>
176
178
  {t('account.my_orders.detail.color')}
177
179
  </span>
178
- : {item.product.attributes.filterable_color}
180
+ : {item?.product?.attributes?.filterable_color}
179
181
  </div>
180
182
  )}
181
183
 
182
- {item.product.attributes.size && (
184
+ {item?.product?.attributes?.size && (
183
185
  <div>
184
186
  <span>
185
187
  {t('account.my_orders.detail.size')}
186
188
  </span>
187
- :{item.product.attributes.size}
189
+ :{item?.product?.attributes?.size}
188
190
  </div>
189
191
  )}
190
192
 
191
193
  <div>
192
194
  <span>{t('account.my_orders.detail.code')}</span>:{' '}
193
- {item.product.base_code}
195
+ {item?.product?.base_code}
194
196
  </div>
195
197
  </div>
196
198
  </div>
@@ -207,11 +209,11 @@ const AccountOrderDetail = ({ params }) => {
207
209
  {itemStatus.label}
208
210
  </div>
209
211
 
210
- {(item.is_cancellable || item.is_refundable) &&
211
- order.is_cancellable && (
212
+ {(item?.is_cancellable || item?.is_refundable) &&
213
+ order?.is_cancellable && (
212
214
  <div className="lg:ml-24">
213
215
  <Link
214
- href={`${ROUTES.ACCOUNT_ORDERS}/${order.id}/cancellation`}
216
+ href={`${ROUTES.ACCOUNT_ORDERS}/${order?.id}/cancellation`}
215
217
  >
216
218
  <Button
217
219
  className="px-4 uppercase font-bold h-7"
@@ -227,21 +229,21 @@ const AccountOrderDetail = ({ params }) => {
227
229
  )}
228
230
  </div>
229
231
  <div className="flex flex-col justify-center items-end lg:ml-6 lg:min-w-[7rem]">
230
- {parseFloat(item.retail_price) >
231
- parseFloat(item.price) && (
232
+ {parseFloat(item?.retail_price || '0') >
233
+ parseFloat(item?.price || '0') && (
232
234
  <Price
233
235
  className="font-normal line-through"
234
- value={item.retail_price}
236
+ value={item?.retail_price}
235
237
  />
236
238
  )}
237
239
 
238
240
  <Price
239
241
  className={clsx('font-normal', {
240
242
  'text-secondary-600':
241
- parseFloat(item.retail_price) >
242
- parseFloat(item.price)
243
+ parseFloat(item?.retail_price || '0') >
244
+ parseFloat(item?.price || '0')
243
245
  })}
244
- value={item.price}
246
+ value={item?.price}
245
247
  />
246
248
  </div>
247
249
  </div>
@@ -325,29 +327,29 @@ const AccountOrderDetail = ({ params }) => {
325
327
  <div className="flex justify-between text-sm text-black-700 mb-2">
326
328
  <p>
327
329
  <span>{t('account.my_orders.detail.subtotal')}</span> (
328
- {order.orderitem_set.length}{' '}
330
+ {order?.orderitem_set?.length}{' '}
329
331
  <span>{t('account.my_orders.detail.items')}</span>)
330
332
  </p>
331
333
 
332
334
  <Price
333
335
  className="font-normal min-w-max"
334
336
  value={
335
- parseFloat(order.amount_without_discount) -
336
- parseFloat(order.shipping_amount)
337
+ parseFloat(order?.amount_without_discount || '0') -
338
+ parseFloat(order?.shipping_amount || '0')
337
339
  }
338
340
  />
339
341
  </div>
340
342
 
341
- {order.discountitem_set &&
342
- order.discountitem_set.map((item, index) => (
343
+ {order?.discountitem_set &&
344
+ order?.discountitem_set?.map((item, index) => (
343
345
  <div
344
346
  className="flex justify-between text-sm text-black-700 mb-2"
345
347
  key={index}
346
348
  >
347
- <p>{item.name}</p>
349
+ <p>{item?.name}</p>
348
350
  <Price
349
351
  className="font-normal min-w-max"
350
- value={item.amount}
352
+ value={item?.amount}
351
353
  useNegative
352
354
  />
353
355
  </div>
@@ -360,7 +362,8 @@ const AccountOrderDetail = ({ params }) => {
360
362
  className="font-normal min-w-max"
361
363
  data-testid="account-orders-detail-total"
362
364
  value={
363
- parseFloat(order.amount) - parseFloat(order.shipping_amount)
365
+ parseFloat(order?.amount || '0') -
366
+ parseFloat(order?.shipping_amount || '0')
364
367
  }
365
368
  />
366
369
  </div>
@@ -35,7 +35,7 @@ export const Button = (props: ButtonProps) => {
35
35
 
36
36
  const buttonClasses = twMerge(
37
37
  clsx(
38
- 'px-4 text-xs transition-all duration-200',
38
+ 'px-4 text-xs transition-all duration-200 cursor-pointer',
39
39
  'inline-flex gap-2 justify-center items-center',
40
40
  variants[appearance],
41
41
  sizes[size],
@@ -54,7 +54,7 @@ export const Button = (props: ButtonProps) => {
54
54
  {children}
55
55
  </Link>
56
56
  ) : (
57
- <button {...rest} className={buttonClasses}>
57
+ <button data-testid="button" {...rest} className={buttonClasses}>
58
58
  {children}
59
59
  </button>
60
60
  );
@@ -9,6 +9,7 @@ const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {
9
9
  <label className={twMerge('flex flex-col text-xs', props.className)}>
10
10
  <div className="flex items-center">
11
11
  <input
12
+ data-testid="checkbox"
12
13
  type="checkbox"
13
14
  {...rest}
14
15
  ref={ref}
@@ -61,5 +61,6 @@ module.exports = {
61
61
  ],
62
62
  redis: {
63
63
  defaultExpirationTime: 900 // 15 min
64
- }
64
+ },
65
+ customNotFoundEnabled: false
65
66
  };
@@ -13,7 +13,7 @@ export const Order = (props) => {
13
13
  .reverse()
14
14
  .join(' ');
15
15
 
16
- const orderStatus = getOrderStatus(props.status.value.toString(), t);
16
+ const orderStatus = getOrderStatus(props?.status?.value?.toString(), t);
17
17
 
18
18
  return (
19
19
  <div className="border border-gray px-5 py-4 text-sm mb-4 last:mb-0">
@@ -58,30 +58,32 @@ export const Order = (props) => {
58
58
 
59
59
  <div className="w-full flex flex-col justify-between mt-6 mb-2 order-3 md:items-center md:flex-row md:order-none md:gap-20 lg:gap-40">
60
60
  <ul className="flex flex-wrap gap-3.5 mb-6 items-center md:mb-0">
61
- {props.orderitem_set.slice(0, 3).map((item, index) => (
61
+ {props?.orderitem_set?.slice(0, 3).map((item, index) => (
62
62
  // TODO: Static image will change (TR)
63
63
  <li className="shrink-0" key={index}>
64
64
  <Image
65
- src={item.product.image ? item.product.image : '/noimage.jpg'}
66
- alt={item.product.name}
65
+ src={
66
+ item?.product?.image ? item.product.image : '/noimage.jpg'
67
+ }
68
+ alt={item?.product?.name}
67
69
  width={64}
68
70
  height={96}
69
71
  />
70
72
  </li>
71
73
  ))}
72
- {props.orderitem_set.length > 3 && (
73
- <div>+ {props.orderitem_set.length - 3}</div>
74
+ {props?.orderitem_set?.length > 3 && (
75
+ <div>+ {props?.orderitem_set?.length - 3}</div>
74
76
  )}
75
77
  </ul>
76
78
 
77
- <span className={orderStatus.className}>{orderStatus.label}</span>
79
+ <span className={orderStatus?.className}>{orderStatus?.label}</span>
78
80
  </div>
79
81
 
80
82
  <div
81
83
  className="order-2 flex items-end md:order-none"
82
84
  data-testid="account-orders-count"
83
85
  >
84
- {props.orderitem_set.length} {t('account.my_orders.order.items')}
86
+ {props?.orderitem_set?.length} {t('account.my_orders.order.items')}
85
87
  </div>
86
88
  </div>
87
89
  </div>