@portnet/ui 5.0.22 → 5.0.23
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.
|
@@ -9,7 +9,10 @@ require("core-js/modules/es.array.includes.js");
|
|
|
9
9
|
require("core-js/modules/es.array-buffer.constructor.js");
|
|
10
10
|
require("core-js/modules/es.array-buffer.slice.js");
|
|
11
11
|
require("core-js/modules/es.promise.js");
|
|
12
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
13
|
+
require("core-js/modules/es.regexp.test.js");
|
|
12
14
|
require("core-js/modules/es.string.includes.js");
|
|
15
|
+
require("core-js/modules/es.string.split.js");
|
|
13
16
|
require("core-js/modules/es.string.trim.js");
|
|
14
17
|
require("core-js/modules/es.typed-array.uint8-array.js");
|
|
15
18
|
require("core-js/modules/es.typed-array.fill.js");
|
|
@@ -1794,7 +1797,7 @@ const ReclamationsList = _ref5 => {
|
|
|
1794
1797
|
data: reclamations,
|
|
1795
1798
|
isFetching,
|
|
1796
1799
|
error
|
|
1797
|
-
} = (0, _useReclamation.useListReclamation)(page);
|
|
1800
|
+
} = (0, _useReclamation.useListReclamation)(page, searchKey);
|
|
1798
1801
|
const {
|
|
1799
1802
|
mutate: downloadDocument,
|
|
1800
1803
|
isLoading: isDownloading,
|
|
@@ -1825,6 +1828,22 @@ const ReclamationsList = _ref5 => {
|
|
|
1825
1828
|
return "#757575";
|
|
1826
1829
|
}
|
|
1827
1830
|
};
|
|
1831
|
+
const renderTextWithLinks = text => {
|
|
1832
|
+
if (!text) return null;
|
|
1833
|
+
const parts = text.split(/(https?:\/\/[^\s)]+)/g);
|
|
1834
|
+
return parts.map((part, i) => /^https?:\/\//.test(part) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
1835
|
+
href: part,
|
|
1836
|
+
target: "_blank",
|
|
1837
|
+
rel: "noopener noreferrer",
|
|
1838
|
+
style: {
|
|
1839
|
+
color: "var(--primary-color, #222f67)",
|
|
1840
|
+
wordBreak: "break-all"
|
|
1841
|
+
},
|
|
1842
|
+
children: part
|
|
1843
|
+
}, i) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
1844
|
+
children: part
|
|
1845
|
+
}, i));
|
|
1846
|
+
};
|
|
1828
1847
|
const handleReclamationClick = reclamation => {
|
|
1829
1848
|
setSelectedReclamation(reclamation);
|
|
1830
1849
|
setDetailsDialogOpen(true);
|
|
@@ -1928,6 +1947,7 @@ const ReclamationsList = _ref5 => {
|
|
|
1928
1947
|
});
|
|
1929
1948
|
};
|
|
1930
1949
|
const onSearch = () => {
|
|
1950
|
+
setPage(1);
|
|
1931
1951
|
setSearchKey(search);
|
|
1932
1952
|
};
|
|
1933
1953
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -2655,7 +2675,7 @@ const ReclamationsList = _ref5 => {
|
|
|
2655
2675
|
marginBottom: "4px"
|
|
2656
2676
|
},
|
|
2657
2677
|
children: "\uD83D\uDCAC R\xE9ponse"
|
|
2658
|
-
}), entry.reponse]
|
|
2678
|
+
}), renderTextWithLinks(entry.reponse)]
|
|
2659
2679
|
}), ((_entry$documents = entry.documents) === null || _entry$documents === void 0 ? void 0 : _entry$documents.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2660
2680
|
style: {
|
|
2661
2681
|
marginTop: "8px",
|
|
@@ -3420,6 +3440,7 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3420
3440
|
const {
|
|
3421
3441
|
guideApi
|
|
3422
3442
|
} = (0, _PuiHelpWidgetContext.useHelpWidget)();
|
|
3443
|
+
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
3423
3444
|
const toggle = () => {
|
|
3424
3445
|
setDropdownOpen(prev => !prev);
|
|
3425
3446
|
};
|
|
@@ -3690,7 +3711,10 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3690
3711
|
icon: _freeSolidSvgIcons.faClipboardList,
|
|
3691
3712
|
title: "Mes réclamations",
|
|
3692
3713
|
id: "mes-reclamations",
|
|
3693
|
-
action: () =>
|
|
3714
|
+
action: () => {
|
|
3715
|
+
queryClient.invalidateQueries("get_list_reclamation");
|
|
3716
|
+
setViewingReclamations(true);
|
|
3717
|
+
}
|
|
3694
3718
|
}, {
|
|
3695
3719
|
icon: _freeSolidSvgIcons.faBullhorn,
|
|
3696
3720
|
title: "Nouvelle réclamation",
|
|
@@ -72,19 +72,29 @@ const useClotureReclamation = () => {
|
|
|
72
72
|
const {
|
|
73
73
|
reclamationApi
|
|
74
74
|
} = (0, _PuiHelpWidgetContext.useHelpWidget)();
|
|
75
|
-
|
|
75
|
+
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
76
|
+
return (0, _reactQuery.useMutation)(id => reclamationApi.cloturerReclamation(id), {
|
|
77
|
+
onSuccess: () => {
|
|
78
|
+
queryClient.invalidateQueries("get_list_reclamation");
|
|
79
|
+
}
|
|
80
|
+
});
|
|
76
81
|
};
|
|
77
82
|
exports.useClotureReclamation = useClotureReclamation;
|
|
78
83
|
const useReouvreReclamation = () => {
|
|
79
84
|
const {
|
|
80
85
|
reclamationApi
|
|
81
86
|
} = (0, _PuiHelpWidgetContext.useHelpWidget)();
|
|
87
|
+
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
82
88
|
return (0, _reactQuery.useMutation)(_ref => {
|
|
83
89
|
let {
|
|
84
90
|
id,
|
|
85
91
|
formData
|
|
86
92
|
} = _ref;
|
|
87
93
|
return reclamationApi.reourrirReclamation(id, formData);
|
|
94
|
+
}, {
|
|
95
|
+
onSuccess: () => {
|
|
96
|
+
queryClient.invalidateQueries("get_list_reclamation");
|
|
97
|
+
}
|
|
88
98
|
});
|
|
89
99
|
};
|
|
90
100
|
exports.useReouvreReclamation = useReouvreReclamation;
|