@bjsdistribution/dms-client-return 0.1.57-prod → 0.1.58-prod
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/dist/common/date-picker/CustomDatePicker.d.ts +11 -1
- package/dist/common/date-picker/FilterByType.d.ts +3 -1
- package/dist/common/date-picker/header/ClearDate.d.ts +4 -1
- package/dist/common/date-picker/header/DatePickerHeader.d.ts +5 -1
- package/dist/common/date-picker/header/Header.d.ts +3 -1
- package/dist/common/date-picker/legend/DateLegend.d.ts +7 -1
- package/dist/common/date-picker/legend/index.d.ts +3 -1
- package/dist/common/date-picker/modal/Modal.d.ts +6 -1
- package/dist/common/date-picker/range-date-filter/Seperator.d.ts +3 -1
- package/dist/common/date-picker/single-date-filter/SingleDateFilter.d.ts +8 -1
- package/dist/common/utils.d.ts +4 -0
- package/dist/components/client-portal/ReturnRTFilters.d.ts +5 -3
- package/dist/components/order-daily-overview/filters/BulkFilterStyle.d.ts +3 -2
- package/dist/components/order-daily-overview/filters/FilterStyle.d.ts +9 -8
- package/dist/components/order-daily-overview/header/checkbox-wrapper/CheckBoxWrapper.d.ts +2 -2
- package/dist/components/order-daily-overview/header/route-header/ClientRouterHeader.d.ts +1 -1
- package/dist/components/order-daily-overview/header/route-header/RouterHeader.d.ts +1 -1
- package/dist/components/order-daily-overview/header/route-header/RouterHeaderStyle.d.ts +5 -4
- package/dist/components/order-daily-overview/header/table-filter/TableFilterStyle.d.ts +5 -4
- package/dist/components/order-daily-overview/header-filters/Styledfilters.d.ts +27 -14
- package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.d.ts +1 -1
- package/dist/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.d.ts +23 -21
- package/dist/components/order-daily-overview/shared/elements/PrintDropDown.d.ts +4 -2
- package/dist/components/order-daily-overview/shared/utlis.d.ts +2 -2
- package/dist/components/order-daily-overview/table/table-data/styles.d.ts +44 -37
- package/dist/components/order-daily-overview/table-view/PaginationStyle.d.ts +12 -9
- package/dist/components/order-daily-overview/table-view/TableStyle.d.ts +38 -29
- package/dist/components/order-view/details-filters/left-side-filters/actions/ActionStyles.d.ts +4 -3
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.d.ts +4 -2
- package/dist/components/order-view/generic-table/AuditLogs.d.ts +1 -1
- package/dist/components/order-view/modalsPopup/CreateReturnModal.d.ts +1 -1
- package/dist/components/order-view/notes/logs/NotestableStyles.d.ts +3 -2
- package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.d.ts +2 -2
- package/dist/components/order-view/order-actions/actions/charge-log/index.d.ts +8 -8
- package/dist/components/order-view/order-actions/actions/confirm-order/tables/ReminderStyles.d.ts +9 -8
- package/dist/components/order-view/order-actions/actions/create-task-reminder/SharedComponents.d.ts +22 -9
- package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.d.ts +2 -2
- package/dist/components/order-view/order-actions/actions/force-debrief/styles.d.ts +8 -7
- package/dist/components/order-view/order-actions/actions/modalstyle.d.ts +35 -33
- package/dist/components/order-view/order-actions/actions/send-sms/SendSmsModal.d.ts +1 -1
- package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.d.ts +2 -2
- package/dist/components/order-view/order-actions/utils.d.ts +1 -1
- package/dist/components/order-view/order-details/expanded-content/orders-section/Depot.d.ts +2 -1
- package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.d.ts +1 -1
- package/dist/components/order-view/store.d.ts +1 -1
- package/dist/components/order-view/view-reminder/ViewReminder.d.ts +1 -1
- package/dist/components/order-view/view-reminder/reminder-styles.d.ts +27 -19
- package/dist/dms-client-return.cjs.development.js +2251 -2349
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +2252 -2350
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +4 -3
- package/src/common/utils.ts +9 -0
- package/src/components/client-portal/OutstandingTable.tsx +3 -2
- package/src/components/client-portal/return-confirm/ReturnConfirmedTable.tsx +3 -2
- package/src/components/order-daily-overview/common/fakedata.tsx +3 -2
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +3 -2
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +3 -2
- package/src/components/order-view/index.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Postcode.tsx +8 -32
- package/src/components/order-view/products-info/collapsed-content/index.tsx +3 -2
- package/src/components/order-view/utils.ts +5 -29
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.58-prod",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"testEnvironment": "jest-environment-jsdom-sixteen"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@bjsdistribution/dms-component-library": "0.
|
|
62
|
+
"@bjsdistribution/dms-component-library": "1.0.0-prod",
|
|
63
63
|
"@size-limit/preset-small-lib": "^11.0.1",
|
|
64
64
|
"@tippyjs/react": "^4.2.6",
|
|
65
65
|
"@types/react": "^18.2.47",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"react-custom-scrollbars-2": "^4.5.0",
|
|
98
98
|
"react-redux": "^9.2.0",
|
|
99
99
|
"react-switch-selector": "^2.2.1",
|
|
100
|
-
"uuid": "^10.0.0"
|
|
100
|
+
"uuid": "^10.0.0",
|
|
101
|
+
"@tanstack/react-query": "^4.36.1"
|
|
101
102
|
}
|
|
102
103
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getProjectEnv } from '@bjsdistribution/dms-component-library';
|
|
2
|
+
|
|
3
|
+
const basedEnv = getProjectEnv();
|
|
4
|
+
|
|
5
|
+
export const POSTCODE_LABEL = basedEnv === 'release_us' ? 'Zipcode' : 'Postcode';
|
|
6
|
+
export const CURRENCY_SYMBOL = basedEnv === 'release_us' ? '$' : '£';
|
|
7
|
+
export const WEIGHT_UNIT = basedEnv === 'release_us' ? 'LBS' : 'KG';
|
|
8
|
+
|
|
9
|
+
export const getEnvironment = () => basedEnv;
|
|
@@ -35,6 +35,7 @@ import PrinterIcon from '../../assets/icons/PrinterIcon';
|
|
|
35
35
|
import DownIcon from '../../assets/icons/DownIcon';
|
|
36
36
|
import PrintDropDownReturn from '../order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn';
|
|
37
37
|
import { dateFilterCPReducer } from './DateFilterStore';
|
|
38
|
+
import { WEIGHT_UNIT } from '../../common/utils';
|
|
38
39
|
|
|
39
40
|
const OutstandingTable = () => {
|
|
40
41
|
const [statePagination] = useAtom(filtersReducerAtom);
|
|
@@ -241,7 +242,7 @@ const OutstandingTable = () => {
|
|
|
241
242
|
<th>Part</th>
|
|
242
243
|
<th onClick={() => handleSort('weight')}>
|
|
243
244
|
<div className="sortIconClass">
|
|
244
|
-
Weight {renderSortIcon('weight')}
|
|
245
|
+
Weight ({WEIGHT_UNIT}) {renderSortIcon('weight')}
|
|
245
246
|
</div>
|
|
246
247
|
</th>
|
|
247
248
|
<th>CBM</th>
|
|
@@ -308,7 +309,7 @@ const OutstandingTable = () => {
|
|
|
308
309
|
<td>{displayValueOrNA(item?.part)}</td>
|
|
309
310
|
<td>
|
|
310
311
|
{displayValueOrNA(item?.weight)}{' '}
|
|
311
|
-
{item?.weight && item?.weight !== null ?
|
|
312
|
+
{item?.weight && item?.weight !== null ? WEIGHT_UNIT : ''}
|
|
312
313
|
</td>
|
|
313
314
|
<td>{displayValueOrNA(item?.cube)}</td>
|
|
314
315
|
<td>{displayValueOrNA(item?.return_reason)}</td>
|
|
@@ -28,6 +28,7 @@ import DownIcon from '../../../assets/icons/DownIcon';
|
|
|
28
28
|
import PrintDropDown from '../../order-daily-overview/shared/elements/PrintDropDown';
|
|
29
29
|
import { formatDate } from '../../order-daily-overview/shared/utlis';
|
|
30
30
|
import dayjs from 'dayjs';
|
|
31
|
+
import { WEIGHT_UNIT } from '../../../common/utils';
|
|
31
32
|
|
|
32
33
|
const ReturnConfirmedTable = () => {
|
|
33
34
|
const dropdownRefParent = useRef<HTMLDivElement>(null);
|
|
@@ -199,7 +200,7 @@ const ReturnConfirmedTable = () => {
|
|
|
199
200
|
<th> Total Parts</th>
|
|
200
201
|
<th onClick={() => handleSort('weight')}>
|
|
201
202
|
<div className="sortIconClass">
|
|
202
|
-
Total Weight {renderSortIcon('weight')}
|
|
203
|
+
Total Weight ({WEIGHT_UNIT}) {renderSortIcon('weight')}
|
|
203
204
|
</div>
|
|
204
205
|
</th>
|
|
205
206
|
<th onClick={() => handleSort('cube')}>
|
|
@@ -284,7 +285,7 @@ const ReturnConfirmedTable = () => {
|
|
|
284
285
|
<td>{displayValueOrNA(item?.total_products)}</td>
|
|
285
286
|
<td>
|
|
286
287
|
{displayValueOrNA(item?.weight)}{' '}
|
|
287
|
-
{item?.weight && item?.weight > 0 ?
|
|
288
|
+
{item?.weight && item?.weight > 0 ? WEIGHT_UNIT : ''}
|
|
288
289
|
</td>
|
|
289
290
|
|
|
290
291
|
<td>{displayValueOrNA(item?.cube)}</td>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { POSTCODE_LABEL } from '../../../common/utils';
|
|
1
2
|
export const RouteCountTable = [
|
|
2
3
|
{
|
|
3
4
|
id: 1,
|
|
@@ -80,7 +81,7 @@ export const TableData = [
|
|
|
80
81
|
{ key: 'time', label: 'Time', alwaysVisible: true },
|
|
81
82
|
{ key: 'tomtom', label: 'Tomtom', alwaysVisible: true },
|
|
82
83
|
{ key: 'recipient', label: 'Recipient', alwaysVisible: true },
|
|
83
|
-
{ key: 'postcode', label:
|
|
84
|
+
{ key: 'postcode', label: POSTCODE_LABEL },
|
|
84
85
|
{ key: 'route', label: 'Route' },
|
|
85
86
|
|
|
86
87
|
{ key: 'vehicle', label: 'Vehicle' },
|
|
@@ -156,7 +157,7 @@ export const TableData2 = [
|
|
|
156
157
|
{ key: 'type', label: 'Type' },
|
|
157
158
|
{ key: 'recipient', label: 'Recipient' },
|
|
158
159
|
{ key: 'instructions', label: 'Instructions' },
|
|
159
|
-
{ key: 'postCode', label:
|
|
160
|
+
{ key: 'postCode', label: POSTCODE_LABEL },
|
|
160
161
|
{ key: 'customer', label: 'Customer' },
|
|
161
162
|
{ key: 'weightCubes', label: 'Weight/Cubes' },
|
|
162
163
|
{ key: 'boxes', label: 'Boxes' },
|
|
@@ -25,6 +25,7 @@ import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
|
25
25
|
import { ApiResponse } from '../../common/interface';
|
|
26
26
|
import CaretDownFilledIcon from '../../../../common/CaretDownFilledIcon';
|
|
27
27
|
import SortIcon from '../../../../common/SortIcon';
|
|
28
|
+
import { WEIGHT_UNIT } from '../../../../common/utils';
|
|
28
29
|
|
|
29
30
|
const OrderTable = () => {
|
|
30
31
|
// const [, setSelectedReturnOrder] = useSelectedOrders();
|
|
@@ -242,7 +243,7 @@ const OrderTable = () => {
|
|
|
242
243
|
<th> Total Orders</th>
|
|
243
244
|
<th onClick={() => handleSort('weight')}>
|
|
244
245
|
<div className="sortIconClass">
|
|
245
|
-
Total Weight {renderSortIcon('weight')}
|
|
246
|
+
Total Weight ({WEIGHT_UNIT}) {renderSortIcon('weight')}
|
|
246
247
|
</div>
|
|
247
248
|
</th>
|
|
248
249
|
<th onClick={() => handleSort('cube')}>
|
|
@@ -333,7 +334,7 @@ const OrderTable = () => {
|
|
|
333
334
|
|
|
334
335
|
<td>
|
|
335
336
|
{displayValueOrNA(item?.weight)}{' '}
|
|
336
|
-
{item?.weight && item?.weight > 0 ?
|
|
337
|
+
{item?.weight && item?.weight > 0 ? WEIGHT_UNIT : ''}
|
|
337
338
|
</td>
|
|
338
339
|
|
|
339
340
|
<td>{displayValueOrNA(item?.cube)}</td>
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
import { EmptyDataContainer } from '../../table/table-data/styles';
|
|
30
30
|
import { CustomDrop, StyledTable, StyledTableWrapper } from './returnstyles';
|
|
31
31
|
import { NavLink, useSearchParams } from 'react-router-dom';
|
|
32
|
+
import { WEIGHT_UNIT } from '../../../../common/utils';
|
|
32
33
|
|
|
33
34
|
const ReturnOrderTable = () => {
|
|
34
35
|
const [state] = useAtom(filtersReducerAtom);
|
|
@@ -351,7 +352,7 @@ const ReturnOrderTable = () => {
|
|
|
351
352
|
<th>Part</th>
|
|
352
353
|
<th onClick={() => handleSort('weight')}>
|
|
353
354
|
<div className="sortIconClass">
|
|
354
|
-
Weight {renderSortIcon('weight')}
|
|
355
|
+
Weight ({WEIGHT_UNIT}) {renderSortIcon('weight')}
|
|
355
356
|
</div>
|
|
356
357
|
</th>
|
|
357
358
|
<th>CBM</th>
|
|
@@ -442,7 +443,7 @@ const ReturnOrderTable = () => {
|
|
|
442
443
|
<td>{displayValueOrNA(item?.part)}</td>
|
|
443
444
|
<td>
|
|
444
445
|
{displayValueOrNA(item?.weight)}{' '}
|
|
445
|
-
{item?.weight && item?.weight !== null ?
|
|
446
|
+
{item?.weight && item?.weight !== null ? WEIGHT_UNIT : ''}
|
|
446
447
|
</td>
|
|
447
448
|
<td>{displayValueOrNA(item?.cube)}</td>
|
|
448
449
|
<td>{displayValueOrNA(item?.return_reason)}</td>
|
|
@@ -42,6 +42,7 @@ import Notification from './notification';
|
|
|
42
42
|
import Order from './order-resources/expanded-content';
|
|
43
43
|
import { setResourcesCall, useAllOrderStatus } from './order-actions/store';
|
|
44
44
|
import { ClientType } from '../order-daily-overview/common/interface';
|
|
45
|
+
import { POSTCODE_LABEL } from '../../common/utils';
|
|
45
46
|
import { getEnvironment } from './utils';
|
|
46
47
|
|
|
47
48
|
interface ApiResponse {
|
|
@@ -486,7 +487,7 @@ function OrderView({ locationloading }: any) {
|
|
|
486
487
|
} catch (err) {
|
|
487
488
|
message.open({
|
|
488
489
|
type: 'error',
|
|
489
|
-
content:
|
|
490
|
+
content: `Failed to check ${POSTCODE_LABEL.toLowerCase()}. Please try again.`,
|
|
490
491
|
});
|
|
491
492
|
}
|
|
492
493
|
};
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
} from '../../../../../store';
|
|
11
11
|
import { ApiResponse } from '../../../../types';
|
|
12
12
|
import { message } from 'antd';
|
|
13
|
+
import { getProjectEnv } from '@bjsdistribution/dms-component-library';
|
|
14
|
+
import { POSTCODE_LABEL } from '../../../../../../common/utils';
|
|
13
15
|
|
|
14
16
|
const POSTCODE_REGEX = {
|
|
15
17
|
UK: /\b(?:[A-Za-z][A-HJ-Ya-hj-y]?[0-9][0-9A-Za-z]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})\b/,
|
|
@@ -18,36 +20,10 @@ const POSTCODE_REGEX = {
|
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
function Postcode() {
|
|
21
|
-
const
|
|
22
|
-
| 'development'
|
|
23
|
-
| 'release_us'
|
|
24
|
-
| 'release_uk'
|
|
25
|
-
| 'staging' => {
|
|
26
|
-
const projectEnv = process.env.REACT_APP_PROJECT_ENV;
|
|
27
|
-
const apiPath = process.env.REACT_APP_API_PATH;
|
|
28
|
-
|
|
29
|
-
if (apiPath === 'https://us.dms.api.bjshomedelivery.com') {
|
|
30
|
-
return 'release_us';
|
|
31
|
-
}
|
|
32
|
-
if (apiPath === 'https://development.dms.api.bjshomedelivery.com') {
|
|
33
|
-
return 'development';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (projectEnv === 'release_uk') {
|
|
37
|
-
return 'release_uk';
|
|
38
|
-
}
|
|
39
|
-
if (projectEnv === 'release_us') {
|
|
40
|
-
return 'release_us';
|
|
41
|
-
}
|
|
42
|
-
if (projectEnv === 'staging') {
|
|
43
|
-
return 'staging';
|
|
44
|
-
}
|
|
45
|
-
return 'development';
|
|
46
|
-
};
|
|
23
|
+
const environment = getProjectEnv();
|
|
47
24
|
|
|
48
25
|
const [orderDetails, setOrderDetails] = useOrderDetails();
|
|
49
26
|
const [isClientPortal] = useClientPortal();
|
|
50
|
-
const environment = getEnvironment();
|
|
51
27
|
const [errors, setErrors] = useAtom(errorAtom);
|
|
52
28
|
const orderRecipient = orderDetails?.order_recipient;
|
|
53
29
|
const isInvalidOrder = orderDetails?.invalid_order;
|
|
@@ -75,7 +51,7 @@ function Postcode() {
|
|
|
75
51
|
const showErr = () => {
|
|
76
52
|
setErrors(prevErrors => ({
|
|
77
53
|
...prevErrors,
|
|
78
|
-
postCodeError:
|
|
54
|
+
postCodeError: `Invalid ${POSTCODE_LABEL.toLowerCase()} format`,
|
|
79
55
|
}));
|
|
80
56
|
};
|
|
81
57
|
|
|
@@ -137,7 +113,7 @@ function Postcode() {
|
|
|
137
113
|
//@ts-ignore
|
|
138
114
|
content: isNorthSouth
|
|
139
115
|
? //@ts-ignore
|
|
140
|
-
`${response?.message} - Northern/Southern Ireland
|
|
116
|
+
`${response?.message} - Northern/Southern Ireland ${POSTCODE_LABEL.toLowerCase()} found`
|
|
141
117
|
: //@ts-ignore
|
|
142
118
|
response?.message || 'Success',
|
|
143
119
|
});
|
|
@@ -151,7 +127,7 @@ function Postcode() {
|
|
|
151
127
|
} catch (err) {
|
|
152
128
|
message.open({
|
|
153
129
|
type: 'error',
|
|
154
|
-
content:
|
|
130
|
+
content: `Failed to check ${POSTCODE_LABEL.toLowerCase()}. Please try again.`,
|
|
155
131
|
});
|
|
156
132
|
}
|
|
157
133
|
};
|
|
@@ -159,13 +135,13 @@ function Postcode() {
|
|
|
159
135
|
return (
|
|
160
136
|
<Container>
|
|
161
137
|
<Wrapper>
|
|
162
|
-
<Label label=
|
|
138
|
+
<Label label={POSTCODE_LABEL} htmlFor="postcode" />
|
|
163
139
|
{showCopyIcon && <CopyText text={orderRecipient?.postcode!} />}
|
|
164
140
|
</Wrapper>
|
|
165
141
|
<InputContainer
|
|
166
142
|
name="postcode"
|
|
167
143
|
type="text"
|
|
168
|
-
placeholder=
|
|
144
|
+
placeholder={`Enter ${POSTCODE_LABEL}`}
|
|
169
145
|
value={orderRecipient?.postcode || ''}
|
|
170
146
|
onChange={onChange}
|
|
171
147
|
autoComplete="off"
|
|
@@ -2,6 +2,7 @@ import { SectionHeader } from '@bjsdistribution/dms-component-library';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { useProductDetails } from '../../store';
|
|
5
|
+
import { WEIGHT_UNIT } from '../../../../common/utils';
|
|
5
6
|
|
|
6
7
|
function CollapsedContent() {
|
|
7
8
|
const [productsData] = useProductDetails();
|
|
@@ -23,8 +24,8 @@ function CollapsedContent() {
|
|
|
23
24
|
{productsData?.length > 0 && (
|
|
24
25
|
<>
|
|
25
26
|
<Items style={{ display: 'flex' }}>
|
|
26
|
-
Total: {calculateTotal(productsData, 'weight')}
|
|
27
|
-
{calculateTotal(productsData, 'cube')}m³
|
|
27
|
+
Total: {calculateTotal(productsData, 'weight')}
|
|
28
|
+
{WEIGHT_UNIT} / {calculateTotal(productsData, 'cube')}m³
|
|
28
29
|
</Items>
|
|
29
30
|
|
|
30
31
|
<Items style={{ display: 'flex' }}>
|
|
@@ -13,13 +13,11 @@ export const capitalize = (input: string) => {
|
|
|
13
13
|
return char.toUpperCase();
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
+
import { getProjectEnv } from '@bjsdistribution/dms-component-library';
|
|
17
|
+
|
|
16
18
|
export const getBaseUrlSymbol = (): string => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
localStorage.setItem('baseUrlSymbol', '£');
|
|
20
|
-
return '£';
|
|
21
|
-
}
|
|
22
|
-
return storedSymbol;
|
|
19
|
+
const basedEnv = getProjectEnv();
|
|
20
|
+
return basedEnv === 'release_us' ? '$' : '£';
|
|
23
21
|
};
|
|
24
22
|
export const handleKeyDownDebrief = (
|
|
25
23
|
e: React.KeyboardEvent<HTMLInputElement>
|
|
@@ -340,27 +338,5 @@ export const getEnvironment = ():
|
|
|
340
338
|
| 'release_us'
|
|
341
339
|
| 'release_uk'
|
|
342
340
|
| 'staging' => {
|
|
343
|
-
|
|
344
|
-
const apiPath = process.env.REACT_APP_API_PATH;
|
|
345
|
-
console.log(projectEnv, 'projectEnv', apiPath, 'apiPath');
|
|
346
|
-
if (apiPath === 'https://us.dms.api.bjshomedelivery.com') {
|
|
347
|
-
return 'release_us';
|
|
348
|
-
}
|
|
349
|
-
if (apiPath === 'https://development.dms.api.bjshomedelivery.com') {
|
|
350
|
-
return 'development';
|
|
351
|
-
}
|
|
352
|
-
if (apiPath === 'https://staging.dms.api.bjshomedelivery.com') {
|
|
353
|
-
return 'staging';
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
if (projectEnv === 'release_uk') {
|
|
357
|
-
return 'release_uk';
|
|
358
|
-
}
|
|
359
|
-
if (projectEnv === 'release_us') {
|
|
360
|
-
return 'release_us';
|
|
361
|
-
}
|
|
362
|
-
if (projectEnv === 'staging') {
|
|
363
|
-
return 'staging';
|
|
364
|
-
}
|
|
365
|
-
return 'development';
|
|
341
|
+
return getProjectEnv() as any;
|
|
366
342
|
};
|