@portnet/ui 5.0.18 → 5.0.20
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.
|
@@ -33,6 +33,7 @@ const PuiHelpWidgetProvider = _ref => {
|
|
|
33
33
|
token,
|
|
34
34
|
showReclamation = true,
|
|
35
35
|
showGuides = true,
|
|
36
|
+
showTijaria = true,
|
|
36
37
|
currentProjectCode = null,
|
|
37
38
|
portailId = null,
|
|
38
39
|
children
|
|
@@ -42,7 +43,8 @@ const PuiHelpWidgetProvider = _ref => {
|
|
|
42
43
|
baseURL
|
|
43
44
|
});
|
|
44
45
|
instance.interceptors.request.use(config => {
|
|
45
|
-
|
|
46
|
+
const activeToken = token || sessionStorage.getItem("access_token");
|
|
47
|
+
config.headers.Authorization = "Bearer ".concat(activeToken);
|
|
46
48
|
return config;
|
|
47
49
|
});
|
|
48
50
|
instance.interceptors.response.use(res => res, err => {
|
|
@@ -65,7 +67,7 @@ const PuiHelpWidgetProvider = _ref => {
|
|
|
65
67
|
guideImageService: (0, _guideImageService.default)(publicAxiosInstance),
|
|
66
68
|
tijariaUrl,
|
|
67
69
|
apiAuthUrl,
|
|
68
|
-
token
|
|
70
|
+
token: token || sessionStorage.getItem("access_token")
|
|
69
71
|
};
|
|
70
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRedux.Provider, {
|
|
71
73
|
store: widgetStore,
|
|
@@ -76,6 +78,7 @@ const PuiHelpWidgetProvider = _ref => {
|
|
|
76
78
|
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiHelpWidget.default, {
|
|
77
79
|
showReclamation: showReclamation,
|
|
78
80
|
showGuides: showGuides,
|
|
81
|
+
showTijaria: showTijaria,
|
|
79
82
|
currentProjectCode: currentProjectCode,
|
|
80
83
|
guideBaseUrl: guideBaseUrl,
|
|
81
84
|
portailId: portailId
|
|
@@ -866,6 +866,7 @@ const ContentPanel = _ref => {
|
|
|
866
866
|
};
|
|
867
867
|
const BottomContent = _ref2 => {
|
|
868
868
|
let {
|
|
869
|
+
showTijaria,
|
|
869
870
|
viewingReclamations,
|
|
870
871
|
viewingTijariaHistory,
|
|
871
872
|
activeChat,
|
|
@@ -899,6 +900,13 @@ const BottomContent = _ref2 => {
|
|
|
899
900
|
setMessages: setMessages
|
|
900
901
|
});
|
|
901
902
|
}
|
|
903
|
+
if (!showTijaria) {
|
|
904
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
905
|
+
style: {
|
|
906
|
+
flex: 1
|
|
907
|
+
}
|
|
908
|
+
});
|
|
909
|
+
}
|
|
902
910
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TijariaChatbot, {
|
|
903
911
|
selectedConversation: selectedConversation
|
|
904
912
|
});
|
|
@@ -3402,6 +3410,7 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3402
3410
|
let {
|
|
3403
3411
|
showReclamation = true,
|
|
3404
3412
|
showGuides = false,
|
|
3413
|
+
showTijaria = true,
|
|
3405
3414
|
currentProjectCode = null,
|
|
3406
3415
|
guideBaseUrl,
|
|
3407
3416
|
portailId = null
|
|
@@ -3701,7 +3710,7 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3701
3710
|
setViewingReclamations(false);
|
|
3702
3711
|
},
|
|
3703
3712
|
},*/
|
|
3704
|
-
{
|
|
3713
|
+
...(showTijaria ? [{
|
|
3705
3714
|
icon: _freeSolidSvgIcons.faCommentDots,
|
|
3706
3715
|
title: "TijarIA",
|
|
3707
3716
|
id: "tijaria",
|
|
@@ -3717,7 +3726,7 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3717
3726
|
setViewingTijariaHistory(true);
|
|
3718
3727
|
setViewingReclamations(false);
|
|
3719
3728
|
}
|
|
3720
|
-
}];
|
|
3729
|
+
}] : [])];
|
|
3721
3730
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
3722
3731
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
3723
3732
|
className: "help-widget-button ".concat(isOpen ? "open" : ""),
|
|
@@ -3895,6 +3904,7 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3895
3904
|
})]
|
|
3896
3905
|
}, index))
|
|
3897
3906
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BottomContent, {
|
|
3907
|
+
showTijaria: showTijaria,
|
|
3898
3908
|
viewingReclamations: viewingReclamations,
|
|
3899
3909
|
viewingTijariaHistory: viewingTijariaHistory,
|
|
3900
3910
|
activeChat: activeChat,
|
|
@@ -61,7 +61,7 @@ const useListServiceReclamation = exports.useListServiceReclamation = function u
|
|
|
61
61
|
queryKey: ["get_list_service_reclamation", portailId],
|
|
62
62
|
queryFn: () =>
|
|
63
63
|
// portailId === ID_PMPCE
|
|
64
|
-
portailId ? reclamationApi.getListServiceReclamationByPortailApi(portailId) : reclamationApi.getListServiceReclamationApi(),
|
|
64
|
+
portailId !== null ? reclamationApi.getListServiceReclamationByPortailApi(portailId) : reclamationApi.getListServiceReclamationApi(),
|
|
65
65
|
initialData: {},
|
|
66
66
|
retry: 1,
|
|
67
67
|
refetchOnWindowFocus: false,
|