@bjsdistribution/dms-client-return 0.1.32-prod → 0.1.33-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/dms-client-return.cjs.development.js +18 -2
- 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 +18 -2
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-view/order-actions/actions/charge-log/index.tsx +26 -1
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { useAxios } from '@bjsdistribution/dms-component-library';
|
|
|
3
3
|
import {
|
|
4
4
|
useCurrentAction,
|
|
5
5
|
useCustomerInfo,
|
|
6
|
+
usegetClientData,
|
|
6
7
|
useOrderDetails,
|
|
7
8
|
} from '../../../store';
|
|
8
9
|
import { ApiResponse } from '../../../types';
|
|
@@ -10,12 +11,16 @@ import OrderActionModal from '../../../../../common/modals/order-action-modal/Or
|
|
|
10
11
|
import { Empty, Skeleton } from 'antd';
|
|
11
12
|
|
|
12
13
|
import styled from 'styled-components';
|
|
14
|
+
import { ClientType } from '../../../../order-daily-overview/common/interface';
|
|
15
|
+
import { getBaseUrlSymbol } from '../../../utils';
|
|
13
16
|
|
|
14
17
|
function ChargeLog() {
|
|
15
18
|
const [, setCurrentAction] = useCurrentAction();
|
|
16
19
|
const [customerInfo] = useCustomerInfo();
|
|
17
20
|
const infoText = `${customerInfo?.recipient_name}, ${customerInfo?.postcode}`;
|
|
18
21
|
const [orderDetails] = useOrderDetails();
|
|
22
|
+
const baseUrlSymbol = getBaseUrlSymbol();
|
|
23
|
+
const [clientData] = usegetClientData();
|
|
19
24
|
|
|
20
25
|
const closeModal = () => {
|
|
21
26
|
setCurrentAction(undefined);
|
|
@@ -71,11 +76,31 @@ function ChargeLog() {
|
|
|
71
76
|
fetchedData?.data?.map((order: any) => {
|
|
72
77
|
const label = order?.status?.split(':')[0];
|
|
73
78
|
const val = order?.status?.split(':')[1];
|
|
79
|
+
const baseUrl = clientData?.filter(
|
|
80
|
+
(client: ClientType) => client?.client_id === order?.client_id
|
|
81
|
+
)[0]?.url;
|
|
82
|
+
|
|
83
|
+
const redirectionLink =
|
|
84
|
+
baseUrl + `/finance/order/${order?.debrief_id}`;
|
|
74
85
|
return (
|
|
75
86
|
<tr>
|
|
76
87
|
<td>{order?.date}</td>
|
|
77
88
|
<td>{order?.description}</td>
|
|
78
|
-
<td>
|
|
89
|
+
<td>
|
|
90
|
+
<a
|
|
91
|
+
style={{
|
|
92
|
+
color: '#09F',
|
|
93
|
+
cursor: 'pointer',
|
|
94
|
+
textDecoration: 'none',
|
|
95
|
+
}}
|
|
96
|
+
href={`https://${redirectionLink}`}
|
|
97
|
+
target="_blank"
|
|
98
|
+
rel="noopener noreferrer"
|
|
99
|
+
>
|
|
100
|
+
{baseUrlSymbol}
|
|
101
|
+
{order?.amount}
|
|
102
|
+
</a>
|
|
103
|
+
</td>
|
|
79
104
|
<td>
|
|
80
105
|
<div
|
|
81
106
|
style={{
|