@buerokratt-ria/common-gui-components 0.0.27 → 0.0.29
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
|
@@ -4,6 +4,14 @@ All changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## Template [MajorVersion.MediterraneanVersion.MinorVersion] - DD-MM-YYYY
|
|
6
6
|
|
|
7
|
+
## [0.0.29] - 03-11-2025
|
|
8
|
+
|
|
9
|
+
- Added Language to chats/ended/download
|
|
10
|
+
|
|
11
|
+
## [0.0.28] - 03-10-2025
|
|
12
|
+
|
|
13
|
+
- Defined new endpoint specifically for ended chats. REACT_APP_RUUTER_PRIVATE_ENDED_API_URL
|
|
14
|
+
|
|
7
15
|
## [0.0.27] - 02-10-2025
|
|
8
16
|
|
|
9
17
|
- Adding missing showTest with default to true if undefined.
|
package/package.json
CHANGED
package/services/api.ts
CHANGED
|
@@ -20,6 +20,16 @@ const apiDev = axios.create({
|
|
|
20
20
|
withCredentials: true,
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
+
const apiDevEnded = axios.create({
|
|
24
|
+
baseURL: import.meta.env.REACT_APP_RUUTER_PRIVATE_ENDED_API_URL,
|
|
25
|
+
headers: {
|
|
26
|
+
Accept: 'application/json',
|
|
27
|
+
'Content-Type': 'application/json',
|
|
28
|
+
},
|
|
29
|
+
withCredentials: true,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
|
|
23
33
|
const AxiosInterceptor = ({ children }) => {
|
|
24
34
|
const { t } = useTranslation();
|
|
25
35
|
|
|
@@ -71,4 +81,9 @@ apiDev.interceptors.request.use(
|
|
|
71
81
|
handleRequestError
|
|
72
82
|
);
|
|
73
83
|
|
|
74
|
-
|
|
84
|
+
apiDevEnded.interceptors.request.use(
|
|
85
|
+
(axiosRequest) => axiosRequest,
|
|
86
|
+
handleRequestError
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
export { api, apiDev, apiDevEnded,AxiosInterceptor };
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from '../../../ui-components';
|
|
26
26
|
|
|
27
27
|
import {Chat as ChatType, CHAT_EVENTS, CHAT_STATUS} from '../../../types/chat';
|
|
28
|
-
import {apiDev} from '../../../services';
|
|
28
|
+
import {apiDev, apiDevEnded} from '../../../services';
|
|
29
29
|
import {Controller, useForm} from 'react-hook-form';
|
|
30
30
|
import {useLocation, useSearchParams} from 'react-router-dom';
|
|
31
31
|
import {unifyDateFromat} from './unfiyDate';
|
|
@@ -298,7 +298,7 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({
|
|
|
298
298
|
sortBy = `${sorting[0].id} ${sortType}`;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
return
|
|
301
|
+
return apiDevEnded.post('agents/chats/ended', {
|
|
302
302
|
customerSupportIds: data.customerSupportIds,
|
|
303
303
|
startDate: formatISO(startOfDay(new Date(data.startDate))),
|
|
304
304
|
endDate: formatISO(endOfDay(new Date(data.endDate))),
|
|
@@ -902,7 +902,7 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({
|
|
|
902
902
|
sortBy = `${sorting[0].id} ${sortType}`;
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
-
const chats = await
|
|
905
|
+
const chats = await apiDevEnded.post('agents/chats/ended', {
|
|
906
906
|
customerSupportIds: passedCustomerSupportIds,
|
|
907
907
|
startDate: formatISO(startOfDay(new Date(startDate))),
|
|
908
908
|
endDate: formatISO(endOfDay(new Date(endDate))),
|
|
@@ -920,8 +920,8 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({
|
|
|
920
920
|
t
|
|
921
921
|
);
|
|
922
922
|
|
|
923
|
-
const response = await
|
|
924
|
-
headers, rows, chatIds
|
|
923
|
+
const response = await apiDevEnded.post('chats/ended/download', {
|
|
924
|
+
headers, rows, chatIds, language: i18n.language
|
|
925
925
|
});
|
|
926
926
|
|
|
927
927
|
|
|
Binary file
|