@portnet/ui 5.0.16 → 5.0.18
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.
|
@@ -79,6 +79,15 @@ const reclamationApi = axiosInstance => ({
|
|
|
79
79
|
throw (error === null || error === void 0 || (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : _error$response4.data) || new Error("Impossible de charger les réclamations");
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
|
+
getListServiceReclamationByPortailApi: async portailId => {
|
|
83
|
+
try {
|
|
84
|
+
const response = await axiosInstance.get("/reclamation/list-service/".concat(portailId));
|
|
85
|
+
return response.data.body;
|
|
86
|
+
} catch (error) {
|
|
87
|
+
var _error$response5;
|
|
88
|
+
throw (error === null || error === void 0 || (_error$response5 = error.response) === null || _error$response5 === void 0 ? void 0 : _error$response5.data) || new Error("Impossible de charger les réclamations");
|
|
89
|
+
}
|
|
90
|
+
},
|
|
82
91
|
cloturerReclamation: id => axiosInstance.patch("/reclamation/".concat(id, "/cloturer")).then(r => r.data),
|
|
83
92
|
reourrirReclamation: (id, formData) => axiosInstance.patch("/reclamation/".concat(id, "/reouvrir"), formData, {
|
|
84
93
|
headers: {
|
|
@@ -34,6 +34,7 @@ const PuiHelpWidgetProvider = _ref => {
|
|
|
34
34
|
showReclamation = true,
|
|
35
35
|
showGuides = true,
|
|
36
36
|
currentProjectCode = null,
|
|
37
|
+
portailId = null,
|
|
37
38
|
children
|
|
38
39
|
} = _ref;
|
|
39
40
|
const axiosInstance = (0, _react.useMemo)(() => {
|
|
@@ -76,7 +77,8 @@ const PuiHelpWidgetProvider = _ref => {
|
|
|
76
77
|
showReclamation: showReclamation,
|
|
77
78
|
showGuides: showGuides,
|
|
78
79
|
currentProjectCode: currentProjectCode,
|
|
79
|
-
guideBaseUrl: guideBaseUrl
|
|
80
|
+
guideBaseUrl: guideBaseUrl,
|
|
81
|
+
portailId: portailId
|
|
80
82
|
})]
|
|
81
83
|
})
|
|
82
84
|
})
|
|
@@ -1243,7 +1243,8 @@ const CustomChatInterface = _ref3 => {
|
|
|
1243
1243
|
const ReclamationFormModal = _ref4 => {
|
|
1244
1244
|
let {
|
|
1245
1245
|
open,
|
|
1246
|
-
onClose
|
|
1246
|
+
onClose,
|
|
1247
|
+
portailId = null
|
|
1247
1248
|
} = _ref4;
|
|
1248
1249
|
const [activeStep, setActiveStep] = (0, _react.useState)(0);
|
|
1249
1250
|
const [formData, setFormData] = (0, _react.useState)({
|
|
@@ -1262,7 +1263,7 @@ const ReclamationFormModal = _ref4 => {
|
|
|
1262
1263
|
const {
|
|
1263
1264
|
data: listServiceReclamation,
|
|
1264
1265
|
isFetching: isFetchingListServiceReclamation
|
|
1265
|
-
} = (0, _useReclamation.useListServiceReclamation)();
|
|
1266
|
+
} = (0, _useReclamation.useListServiceReclamation)(portailId);
|
|
1266
1267
|
const [error, setError] = (0, _react.useState)(null);
|
|
1267
1268
|
const errorRef = (0, _react.useRef)(null);
|
|
1268
1269
|
const CustomPopper = props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Popper, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -2390,41 +2391,6 @@ const ReclamationsList = _ref5 => {
|
|
|
2390
2391
|
},
|
|
2391
2392
|
children: selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.description
|
|
2392
2393
|
})]
|
|
2393
|
-
}), (selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.response) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2394
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
2395
|
-
component: "div",
|
|
2396
|
-
sx: {
|
|
2397
|
-
fontSize: "11px",
|
|
2398
|
-
color: "#999",
|
|
2399
|
-
fontWeight: "500",
|
|
2400
|
-
marginBottom: "6px",
|
|
2401
|
-
textTransform: "uppercase",
|
|
2402
|
-
letterSpacing: "0.5px",
|
|
2403
|
-
fontFamily: WIDGET_FONT,
|
|
2404
|
-
display: "flex",
|
|
2405
|
-
alignItems: "center",
|
|
2406
|
-
gap: "6px"
|
|
2407
|
-
},
|
|
2408
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
2409
|
-
icon: _freeSolidSvgIcons.faReply,
|
|
2410
|
-
style: {
|
|
2411
|
-
color: "#6c757d",
|
|
2412
|
-
fontSize: "12px"
|
|
2413
|
-
}
|
|
2414
|
-
}), "R\xE9ponse"]
|
|
2415
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2416
|
-
style: {
|
|
2417
|
-
fontSize: "14px",
|
|
2418
|
-
color: "#333",
|
|
2419
|
-
lineHeight: "1.6",
|
|
2420
|
-
backgroundColor: "#f5f6f7",
|
|
2421
|
-
padding: "12px",
|
|
2422
|
-
borderRadius: "8px",
|
|
2423
|
-
border: "2px solid #6c757d",
|
|
2424
|
-
whiteSpace: "pre-line"
|
|
2425
|
-
},
|
|
2426
|
-
children: selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.response
|
|
2427
|
-
})]
|
|
2428
2394
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2429
2395
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
2430
2396
|
component: "div",
|
|
@@ -2659,6 +2625,29 @@ const ReclamationsList = _ref5 => {
|
|
|
2659
2625
|
whiteSpace: "pre-line"
|
|
2660
2626
|
},
|
|
2661
2627
|
children: entry.commentaire
|
|
2628
|
+
}), entry.reponse && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2629
|
+
style: {
|
|
2630
|
+
marginTop: "8px",
|
|
2631
|
+
fontSize: "13px",
|
|
2632
|
+
color: "#333",
|
|
2633
|
+
lineHeight: "1.5",
|
|
2634
|
+
fontFamily: WIDGET_FONT,
|
|
2635
|
+
backgroundColor: "#f0f4ff",
|
|
2636
|
+
padding: "8px 10px",
|
|
2637
|
+
borderRadius: "6px",
|
|
2638
|
+
border: "1px solid #c5d0f0",
|
|
2639
|
+
whiteSpace: "pre-line"
|
|
2640
|
+
},
|
|
2641
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2642
|
+
style: {
|
|
2643
|
+
fontSize: "11px",
|
|
2644
|
+
fontWeight: "600",
|
|
2645
|
+
color: "#555",
|
|
2646
|
+
display: "block",
|
|
2647
|
+
marginBottom: "4px"
|
|
2648
|
+
},
|
|
2649
|
+
children: "\uD83D\uDCAC R\xE9ponse"
|
|
2650
|
+
}), entry.reponse]
|
|
2662
2651
|
}), ((_entry$documents = entry.documents) === null || _entry$documents === void 0 ? void 0 : _entry$documents.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2663
2652
|
style: {
|
|
2664
2653
|
marginTop: "8px",
|
|
@@ -3414,7 +3403,8 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3414
3403
|
showReclamation = true,
|
|
3415
3404
|
showGuides = false,
|
|
3416
3405
|
currentProjectCode = null,
|
|
3417
|
-
guideBaseUrl
|
|
3406
|
+
guideBaseUrl,
|
|
3407
|
+
portailId = null
|
|
3418
3408
|
} = _ref7;
|
|
3419
3409
|
const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
|
|
3420
3410
|
const [isTourActive, setIsTourActive] = (0, _react.useState)(false);
|
|
@@ -4105,7 +4095,8 @@ const PuiHelpWidget = _ref7 => {
|
|
|
4105
4095
|
})]
|
|
4106
4096
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ReclamationFormModal, {
|
|
4107
4097
|
open: reclamationModalOpen,
|
|
4108
|
-
onClose: () => setReclamationModalOpen(false)
|
|
4098
|
+
onClose: () => setReclamationModalOpen(false),
|
|
4099
|
+
portailId: portailId
|
|
4109
4100
|
})]
|
|
4110
4101
|
});
|
|
4111
4102
|
};
|
|
@@ -52,20 +52,22 @@ const useDownloadDocument = () => {
|
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
54
|
exports.useDownloadDocument = useDownloadDocument;
|
|
55
|
-
const useListServiceReclamation = ()
|
|
55
|
+
const useListServiceReclamation = exports.useListServiceReclamation = function useListServiceReclamation() {
|
|
56
|
+
let portailId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
56
57
|
const {
|
|
57
58
|
reclamationApi
|
|
58
59
|
} = (0, _PuiHelpWidgetContext.useHelpWidget)();
|
|
59
60
|
return (0, _reactQuery.useQuery)({
|
|
60
|
-
queryKey: ["get_list_service_reclamation"],
|
|
61
|
-
queryFn: () =>
|
|
61
|
+
queryKey: ["get_list_service_reclamation", portailId],
|
|
62
|
+
queryFn: () =>
|
|
63
|
+
// portailId === ID_PMPCE
|
|
64
|
+
portailId ? reclamationApi.getListServiceReclamationByPortailApi(portailId) : reclamationApi.getListServiceReclamationApi(),
|
|
62
65
|
initialData: {},
|
|
63
66
|
retry: 1,
|
|
64
67
|
refetchOnWindowFocus: false,
|
|
65
68
|
refetchOnReconnect: false
|
|
66
69
|
});
|
|
67
70
|
};
|
|
68
|
-
exports.useListServiceReclamation = useListServiceReclamation;
|
|
69
71
|
const useClotureReclamation = () => {
|
|
70
72
|
const {
|
|
71
73
|
reclamationApi
|