@portnet/ui 5.0.15 โ 5.0.17
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.
|
@@ -78,6 +78,12 @@ const reclamationApi = axiosInstance => ({
|
|
|
78
78
|
var _error$response4;
|
|
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
|
+
cloturerReclamation: id => axiosInstance.patch("/reclamation/".concat(id, "/cloturer")).then(r => r.data),
|
|
83
|
+
reourrirReclamation: (id, formData) => axiosInstance.patch("/reclamation/".concat(id, "/reouvrir"), formData, {
|
|
84
|
+
headers: {
|
|
85
|
+
"Content-Type": "multipart/form-data"
|
|
86
|
+
}
|
|
87
|
+
}).then(r => r.data)
|
|
82
88
|
});
|
|
83
89
|
exports.reclamationApi = reclamationApi;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/esnext.iterator.for-each.js");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -19,6 +18,7 @@ require("core-js/modules/es.typed-array.sort.js");
|
|
|
19
18
|
require("core-js/modules/es.typed-array.to-locale-string.js");
|
|
20
19
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
21
20
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
21
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
22
22
|
require("core-js/modules/esnext.iterator.map.js");
|
|
23
23
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
24
24
|
require("core-js/modules/web.url.js");
|
|
@@ -1499,8 +1499,7 @@ const ReclamationFormModal = _ref4 => {
|
|
|
1499
1499
|
})]
|
|
1500
1500
|
})
|
|
1501
1501
|
})),
|
|
1502
|
-
PopperComponent: CustomPopper
|
|
1503
|
-
,
|
|
1502
|
+
PopperComponent: CustomPopper,
|
|
1504
1503
|
noOptionsText: "Aucun service trouv\xE9",
|
|
1505
1504
|
className: "service-autocomplete"
|
|
1506
1505
|
})]
|
|
@@ -1512,18 +1511,7 @@ const ReclamationFormModal = _ref4 => {
|
|
|
1512
1511
|
timeout: 500,
|
|
1513
1512
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
1514
1513
|
className: "step-content details-step",
|
|
1515
|
-
children: [
|
|
1516
|
-
ref: errorRef,
|
|
1517
|
-
severity: "error",
|
|
1518
|
-
onClose: () => setError(null),
|
|
1519
|
-
style: {
|
|
1520
|
-
marginBottom: "15px",
|
|
1521
|
-
maxWidth: 400,
|
|
1522
|
-
marginLeft: "auto",
|
|
1523
|
-
marginRight: "auto"
|
|
1524
|
-
},
|
|
1525
|
-
children: error
|
|
1526
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
1514
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
1527
1515
|
variant: "h5",
|
|
1528
1516
|
className: "step-title",
|
|
1529
1517
|
gutterBottom: true,
|
|
@@ -1583,6 +1571,14 @@ const ReclamationFormModal = _ref4 => {
|
|
|
1583
1571
|
fullWidth: true,
|
|
1584
1572
|
children: "Joindre des fichiers (optionnel)"
|
|
1585
1573
|
})
|
|
1574
|
+
}), error && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Alert, {
|
|
1575
|
+
ref: errorRef,
|
|
1576
|
+
severity: "error",
|
|
1577
|
+
onClose: () => setError(null),
|
|
1578
|
+
style: {
|
|
1579
|
+
marginTop: "12px"
|
|
1580
|
+
},
|
|
1581
|
+
children: error
|
|
1586
1582
|
}), formData.files.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
1587
1583
|
sx: {
|
|
1588
1584
|
mt: 2,
|
|
@@ -1716,6 +1712,9 @@ const ReclamationFormModal = _ref4 => {
|
|
|
1716
1712
|
})]
|
|
1717
1713
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.DialogContent, {
|
|
1718
1714
|
className: "modal-content",
|
|
1715
|
+
style: {
|
|
1716
|
+
overflow: activeStep === 1 ? "visible" : "auto"
|
|
1717
|
+
},
|
|
1719
1718
|
children: renderStepContent()
|
|
1720
1719
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
1721
1720
|
className: "modal-footer",
|
|
@@ -1751,7 +1750,7 @@ const ReclamationFormModal = _ref4 => {
|
|
|
1751
1750
|
});
|
|
1752
1751
|
};
|
|
1753
1752
|
const ReclamationsList = _ref5 => {
|
|
1754
|
-
var _selectedReclamation$, _selectedReclamation$2;
|
|
1753
|
+
var _selectedReclamation$, _selectedReclamation$2, _selectedReclamation$3;
|
|
1755
1754
|
let {
|
|
1756
1755
|
onClose
|
|
1757
1756
|
} = _ref5;
|
|
@@ -1761,6 +1760,27 @@ const ReclamationsList = _ref5 => {
|
|
|
1761
1760
|
const [page, setPage] = (0, _react.useState)(1);
|
|
1762
1761
|
const [search, setSearch] = (0, _react.useState)();
|
|
1763
1762
|
const [searchKey, setSearchKey] = (0, _react.useState)("");
|
|
1763
|
+
const STATUT_REPONDUE = "REPONDUE";
|
|
1764
|
+
const STATUT_COLOR_MAP = {
|
|
1765
|
+
EN_ATTENTE: "#2196F3",
|
|
1766
|
+
EN_COURS: "#FF9800",
|
|
1767
|
+
REPONDUE: "#9C27B0",
|
|
1768
|
+
REOUVERTE: "#FF5722",
|
|
1769
|
+
CLOTUREE: "#4CAF50",
|
|
1770
|
+
TRAITE: "#4CAF50"
|
|
1771
|
+
};
|
|
1772
|
+
const STATUT_ICON_MAP = {
|
|
1773
|
+
EN_ATTENTE: "๐",
|
|
1774
|
+
EN_COURS: "โ๏ธ",
|
|
1775
|
+
REPONDUE: "๐ฌ",
|
|
1776
|
+
REOUVERTE: "๐",
|
|
1777
|
+
CLOTUREE: "๐"
|
|
1778
|
+
};
|
|
1779
|
+
const getStatusColorByCode = code => STATUT_COLOR_MAP[(code || "").toUpperCase()] || "#757575";
|
|
1780
|
+
const [reouvreDialogOpen, setReouvreDialogOpen] = (0, _react.useState)(false);
|
|
1781
|
+
const [reouvreDescription, setReouvreDescription] = (0, _react.useState)("");
|
|
1782
|
+
const [reouvreFiles, setReouvreFiles] = (0, _react.useState)([]);
|
|
1783
|
+
const reouvreFileInputRef = (0, _react.useRef)(null);
|
|
1764
1784
|
const {
|
|
1765
1785
|
data: reclamations,
|
|
1766
1786
|
isFetching,
|
|
@@ -1771,14 +1791,27 @@ const ReclamationsList = _ref5 => {
|
|
|
1771
1791
|
isLoading: isDownloading,
|
|
1772
1792
|
error: errorDownloadDocument
|
|
1773
1793
|
} = (0, _useReclamation.useDownloadDocument)();
|
|
1794
|
+
const {
|
|
1795
|
+
mutate: clotureReclamation,
|
|
1796
|
+
isLoading: isCloturing
|
|
1797
|
+
} = (0, _useReclamation.useClotureReclamation)();
|
|
1798
|
+
const {
|
|
1799
|
+
mutate: reouvreReclamation,
|
|
1800
|
+
isLoading: isReouvring
|
|
1801
|
+
} = (0, _useReclamation.useReouvreReclamation)();
|
|
1774
1802
|
const getStatusColor = statut => {
|
|
1775
|
-
switch (statut.toLowerCase()) {
|
|
1803
|
+
switch ((statut || "").toLowerCase()) {
|
|
1776
1804
|
case "traitรฉ":
|
|
1805
|
+
case "cloturee":
|
|
1777
1806
|
return "#4CAF50";
|
|
1778
1807
|
case "en cours":
|
|
1779
1808
|
return "#FF9800";
|
|
1780
1809
|
case "en attente":
|
|
1781
1810
|
return "#2196F3";
|
|
1811
|
+
case "repondue":
|
|
1812
|
+
return "#9C27B0";
|
|
1813
|
+
case "reouverte":
|
|
1814
|
+
return "#FF5722";
|
|
1782
1815
|
default:
|
|
1783
1816
|
return "#757575";
|
|
1784
1817
|
}
|
|
@@ -1791,6 +1824,61 @@ const ReclamationsList = _ref5 => {
|
|
|
1791
1824
|
setDetailsDialogOpen(false);
|
|
1792
1825
|
setSelectedReclamation(null);
|
|
1793
1826
|
};
|
|
1827
|
+
const handleCloturer = () => {
|
|
1828
|
+
if (!(selectedReclamation !== null && selectedReclamation !== void 0 && selectedReclamation.id)) return;
|
|
1829
|
+
clotureReclamation(selectedReclamation.id, {
|
|
1830
|
+
onSuccess: () => {
|
|
1831
|
+
queryClient.invalidateQueries("reclamations");
|
|
1832
|
+
handleCloseDetails();
|
|
1833
|
+
_reactToastify.toast.success("Rรฉclamation clรดturรฉe avec succรจs.");
|
|
1834
|
+
},
|
|
1835
|
+
onError: err => {
|
|
1836
|
+
var _err$response$data$me2, _err$response2;
|
|
1837
|
+
const msg = (_err$response$data$me2 = (_err$response2 = err.response) === null || _err$response2 === void 0 || (_err$response2 = _err$response2.data) === null || _err$response2 === void 0 ? void 0 : _err$response2.message) !== null && _err$response$data$me2 !== void 0 ? _err$response$data$me2 : "Une erreur est survenue lors de la clรดture.";
|
|
1838
|
+
_reactToastify.toast.error(msg);
|
|
1839
|
+
}
|
|
1840
|
+
});
|
|
1841
|
+
};
|
|
1842
|
+
const handleOpenReouvreDialog = () => {
|
|
1843
|
+
setReouvreDescription("");
|
|
1844
|
+
setReouvreFiles([]);
|
|
1845
|
+
setReouvreDialogOpen(true);
|
|
1846
|
+
};
|
|
1847
|
+
const handleCloseReouvreDialog = () => {
|
|
1848
|
+
setReouvreDialogOpen(false);
|
|
1849
|
+
setReouvreDescription("");
|
|
1850
|
+
setReouvreFiles([]);
|
|
1851
|
+
};
|
|
1852
|
+
const handleReouvreFileSelect = e => {
|
|
1853
|
+
const selected = Array.from(e.target.files);
|
|
1854
|
+
setReouvreFiles(prev => [...prev, ...selected]);
|
|
1855
|
+
e.target.value = "";
|
|
1856
|
+
};
|
|
1857
|
+
const handleRemoveReouvreFile = index => {
|
|
1858
|
+
setReouvreFiles(prev => prev.filter((_, i) => i !== index));
|
|
1859
|
+
};
|
|
1860
|
+
const handleSubmitReouvreture = () => {
|
|
1861
|
+
if (!(selectedReclamation !== null && selectedReclamation !== void 0 && selectedReclamation.id) || !reouvreDescription.trim()) return;
|
|
1862
|
+
const formData = new FormData();
|
|
1863
|
+
formData.append("description", reouvreDescription.trim());
|
|
1864
|
+
reouvreFiles.forEach(file => formData.append("files", file));
|
|
1865
|
+
reouvreReclamation({
|
|
1866
|
+
id: selectedReclamation.id,
|
|
1867
|
+
formData
|
|
1868
|
+
}, {
|
|
1869
|
+
onSuccess: () => {
|
|
1870
|
+
queryClient.invalidateQueries("reclamations");
|
|
1871
|
+
handleCloseReouvreDialog();
|
|
1872
|
+
handleCloseDetails();
|
|
1873
|
+
_reactToastify.toast.success("Rรฉclamation rรฉouverte avec succรจs.");
|
|
1874
|
+
},
|
|
1875
|
+
onError: err => {
|
|
1876
|
+
var _err$response$data$me3, _err$response3;
|
|
1877
|
+
const msg = (_err$response$data$me3 = (_err$response3 = err.response) === null || _err$response3 === void 0 || (_err$response3 = _err$response3.data) === null || _err$response3 === void 0 ? void 0 : _err$response3.message) !== null && _err$response$data$me3 !== void 0 ? _err$response$data$me3 : "Une erreur est survenue lors de la rรฉouverture.";
|
|
1878
|
+
_reactToastify.toast.error(msg);
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1881
|
+
};
|
|
1794
1882
|
const formatDate = dateString => {
|
|
1795
1883
|
const date = new Date(dateString);
|
|
1796
1884
|
return date.toLocaleDateString("fr-FR", {
|
|
@@ -1839,7 +1927,8 @@ const ReclamationsList = _ref5 => {
|
|
|
1839
1927
|
flex: 1,
|
|
1840
1928
|
display: "flex",
|
|
1841
1929
|
flexDirection: "column",
|
|
1842
|
-
backgroundColor: "#f5f5f5"
|
|
1930
|
+
backgroundColor: "#f5f5f5",
|
|
1931
|
+
minHeight: 0
|
|
1843
1932
|
},
|
|
1844
1933
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1845
1934
|
style: {
|
|
@@ -1956,7 +2045,8 @@ const ReclamationsList = _ref5 => {
|
|
|
1956
2045
|
style: {
|
|
1957
2046
|
flex: 1,
|
|
1958
2047
|
overflowY: "auto",
|
|
1959
|
-
padding: "8px"
|
|
2048
|
+
padding: "8px",
|
|
2049
|
+
minHeight: 0
|
|
1960
2050
|
},
|
|
1961
2051
|
children: isFetching ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1962
2052
|
style: {
|
|
@@ -2300,41 +2390,6 @@ const ReclamationsList = _ref5 => {
|
|
|
2300
2390
|
},
|
|
2301
2391
|
children: selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.description
|
|
2302
2392
|
})]
|
|
2303
|
-
}), (selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.response) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2304
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
2305
|
-
component: "div",
|
|
2306
|
-
sx: {
|
|
2307
|
-
fontSize: "11px",
|
|
2308
|
-
color: "#999",
|
|
2309
|
-
fontWeight: "500",
|
|
2310
|
-
marginBottom: "6px",
|
|
2311
|
-
textTransform: "uppercase",
|
|
2312
|
-
letterSpacing: "0.5px",
|
|
2313
|
-
fontFamily: WIDGET_FONT,
|
|
2314
|
-
display: "flex",
|
|
2315
|
-
alignItems: "center",
|
|
2316
|
-
gap: "6px"
|
|
2317
|
-
},
|
|
2318
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
2319
|
-
icon: _freeSolidSvgIcons.faReply,
|
|
2320
|
-
style: {
|
|
2321
|
-
color: "#6c757d",
|
|
2322
|
-
fontSize: "12px"
|
|
2323
|
-
}
|
|
2324
|
-
}), "R\xE9ponse"]
|
|
2325
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2326
|
-
style: {
|
|
2327
|
-
fontSize: "14px",
|
|
2328
|
-
color: "#333",
|
|
2329
|
-
lineHeight: "1.6",
|
|
2330
|
-
backgroundColor: "#f5f6f7",
|
|
2331
|
-
padding: "12px",
|
|
2332
|
-
borderRadius: "8px",
|
|
2333
|
-
border: "2px solid #6c757d",
|
|
2334
|
-
whiteSpace: "pre-line"
|
|
2335
|
-
},
|
|
2336
|
-
children: selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.response
|
|
2337
|
-
})]
|
|
2338
2393
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2339
2394
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
2340
2395
|
component: "div",
|
|
@@ -2446,17 +2501,454 @@ const ReclamationsList = _ref5 => {
|
|
|
2446
2501
|
})]
|
|
2447
2502
|
}, document.id || index))
|
|
2448
2503
|
})]
|
|
2504
|
+
}), (selectedReclamation === null || selectedReclamation === void 0 || (_selectedReclamation$3 = selectedReclamation.statusHistories) === null || _selectedReclamation$3 === void 0 ? void 0 : _selectedReclamation$3.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2505
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2506
|
+
style: {
|
|
2507
|
+
fontSize: "11px",
|
|
2508
|
+
color: "#999",
|
|
2509
|
+
fontWeight: "600",
|
|
2510
|
+
marginBottom: "16px",
|
|
2511
|
+
textTransform: "uppercase",
|
|
2512
|
+
letterSpacing: "0.5px",
|
|
2513
|
+
fontFamily: WIDGET_FONT
|
|
2514
|
+
},
|
|
2515
|
+
children: "Historique des statuts"
|
|
2516
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2517
|
+
style: {
|
|
2518
|
+
position: "relative",
|
|
2519
|
+
paddingLeft: "24px"
|
|
2520
|
+
},
|
|
2521
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2522
|
+
style: {
|
|
2523
|
+
position: "absolute",
|
|
2524
|
+
left: "8px",
|
|
2525
|
+
top: "6px",
|
|
2526
|
+
bottom: "6px",
|
|
2527
|
+
width: "2px",
|
|
2528
|
+
backgroundColor: "#e0e0e0"
|
|
2529
|
+
}
|
|
2530
|
+
}), selectedReclamation.statusHistories.map((entry, index) => {
|
|
2531
|
+
var _entry$documents;
|
|
2532
|
+
const color = getStatusColorByCode(entry.statutApresCode);
|
|
2533
|
+
const isLast = index === selectedReclamation.statusHistories.length - 1;
|
|
2534
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2535
|
+
style: {
|
|
2536
|
+
position: "relative",
|
|
2537
|
+
marginBottom: isLast ? 0 : "20px"
|
|
2538
|
+
},
|
|
2539
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2540
|
+
style: {
|
|
2541
|
+
position: "absolute",
|
|
2542
|
+
left: "-20px",
|
|
2543
|
+
top: "4px",
|
|
2544
|
+
width: "12px",
|
|
2545
|
+
height: "12px",
|
|
2546
|
+
borderRadius: "50%",
|
|
2547
|
+
backgroundColor: color,
|
|
2548
|
+
border: "2px solid white",
|
|
2549
|
+
boxShadow: "0 0 0 2px ".concat(color)
|
|
2550
|
+
}
|
|
2551
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2552
|
+
style: {
|
|
2553
|
+
backgroundColor: "#f8f9fa",
|
|
2554
|
+
borderRadius: "8px",
|
|
2555
|
+
border: "1px solid ".concat(color, "22"),
|
|
2556
|
+
padding: "12px"
|
|
2557
|
+
},
|
|
2558
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2559
|
+
style: {
|
|
2560
|
+
display: "flex",
|
|
2561
|
+
justifyContent: "space-between",
|
|
2562
|
+
alignItems: "flex-start",
|
|
2563
|
+
marginBottom: entry.commentaire ? "10px" : 0
|
|
2564
|
+
},
|
|
2565
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2566
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2567
|
+
style: {
|
|
2568
|
+
display: "flex",
|
|
2569
|
+
alignItems: "center",
|
|
2570
|
+
gap: "6px",
|
|
2571
|
+
marginBottom: "2px"
|
|
2572
|
+
},
|
|
2573
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2574
|
+
style: {
|
|
2575
|
+
fontSize: "11px"
|
|
2576
|
+
},
|
|
2577
|
+
children: STATUT_ICON_MAP[entry.statutApresCode] || "๐"
|
|
2578
|
+
}), entry.statutAvantCode && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2579
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2580
|
+
style: {
|
|
2581
|
+
fontSize: "11px",
|
|
2582
|
+
color: getStatusColorByCode(entry.statutAvantCode),
|
|
2583
|
+
fontWeight: "600",
|
|
2584
|
+
fontFamily: WIDGET_FONT
|
|
2585
|
+
},
|
|
2586
|
+
children: entry.statutAvantLibelle
|
|
2587
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2588
|
+
style: {
|
|
2589
|
+
fontSize: "11px",
|
|
2590
|
+
color: "#999"
|
|
2591
|
+
},
|
|
2592
|
+
children: "\u2192"
|
|
2593
|
+
})]
|
|
2594
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2595
|
+
style: {
|
|
2596
|
+
fontSize: "11px",
|
|
2597
|
+
color,
|
|
2598
|
+
fontWeight: "700",
|
|
2599
|
+
fontFamily: WIDGET_FONT
|
|
2600
|
+
},
|
|
2601
|
+
children: entry.statutApresLibelle
|
|
2602
|
+
})]
|
|
2603
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2604
|
+
style: {
|
|
2605
|
+
fontSize: "11px",
|
|
2606
|
+
color: "#999",
|
|
2607
|
+
fontFamily: WIDGET_FONT
|
|
2608
|
+
},
|
|
2609
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
2610
|
+
children: [entry.changedByNom ? entry.changedByNom : "Service Odoo", " \xB7 "]
|
|
2611
|
+
}), formatDate(entry.dateChangement)]
|
|
2612
|
+
})]
|
|
2613
|
+
})
|
|
2614
|
+
}), entry.commentaire && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2615
|
+
style: {
|
|
2616
|
+
fontSize: "13px",
|
|
2617
|
+
color: "#333",
|
|
2618
|
+
lineHeight: "1.5",
|
|
2619
|
+
fontFamily: WIDGET_FONT,
|
|
2620
|
+
backgroundColor: "white",
|
|
2621
|
+
padding: "8px 10px",
|
|
2622
|
+
borderRadius: "6px",
|
|
2623
|
+
border: "1px solid #e0e0e0",
|
|
2624
|
+
whiteSpace: "pre-line"
|
|
2625
|
+
},
|
|
2626
|
+
children: entry.commentaire
|
|
2627
|
+
}), entry.reponse && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2628
|
+
style: {
|
|
2629
|
+
marginTop: "8px",
|
|
2630
|
+
fontSize: "13px",
|
|
2631
|
+
color: "#333",
|
|
2632
|
+
lineHeight: "1.5",
|
|
2633
|
+
fontFamily: WIDGET_FONT,
|
|
2634
|
+
backgroundColor: "#f0f4ff",
|
|
2635
|
+
padding: "8px 10px",
|
|
2636
|
+
borderRadius: "6px",
|
|
2637
|
+
border: "1px solid #c5d0f0",
|
|
2638
|
+
whiteSpace: "pre-line"
|
|
2639
|
+
},
|
|
2640
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2641
|
+
style: {
|
|
2642
|
+
fontSize: "11px",
|
|
2643
|
+
fontWeight: "600",
|
|
2644
|
+
color: "#555",
|
|
2645
|
+
display: "block",
|
|
2646
|
+
marginBottom: "4px"
|
|
2647
|
+
},
|
|
2648
|
+
children: "\uD83D\uDCAC R\xE9ponse"
|
|
2649
|
+
}), entry.reponse]
|
|
2650
|
+
}), ((_entry$documents = entry.documents) === null || _entry$documents === void 0 ? void 0 : _entry$documents.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2651
|
+
style: {
|
|
2652
|
+
marginTop: "8px",
|
|
2653
|
+
display: "flex",
|
|
2654
|
+
flexDirection: "column",
|
|
2655
|
+
gap: "6px"
|
|
2656
|
+
},
|
|
2657
|
+
children: entry.documents.map((doc, di) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2658
|
+
style: {
|
|
2659
|
+
display: "flex",
|
|
2660
|
+
alignItems: "center",
|
|
2661
|
+
gap: "8px",
|
|
2662
|
+
padding: "6px 10px",
|
|
2663
|
+
backgroundColor: "white",
|
|
2664
|
+
borderRadius: "6px",
|
|
2665
|
+
border: "1px solid #e0e0e0",
|
|
2666
|
+
cursor: isDownloading ? "not-allowed" : "pointer",
|
|
2667
|
+
opacity: isDownloading ? 0.6 : 1
|
|
2668
|
+
},
|
|
2669
|
+
onClick: () => !isDownloading && handleDownload(doc.documentGuid, doc.documentName),
|
|
2670
|
+
onMouseEnter: e => {
|
|
2671
|
+
if (!isDownloading) e.currentTarget.style.backgroundColor = "#f0f0f0";
|
|
2672
|
+
},
|
|
2673
|
+
onMouseLeave: e => {
|
|
2674
|
+
if (!isDownloading) e.currentTarget.style.backgroundColor = "white";
|
|
2675
|
+
},
|
|
2676
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
2677
|
+
icon: _freeSolidSvgIcons.faPaperclip,
|
|
2678
|
+
style: {
|
|
2679
|
+
color: "var(--primary-color, #222f67)",
|
|
2680
|
+
fontSize: "12px"
|
|
2681
|
+
}
|
|
2682
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
2683
|
+
style: {
|
|
2684
|
+
flex: 1,
|
|
2685
|
+
fontSize: "12px",
|
|
2686
|
+
color: "#333",
|
|
2687
|
+
fontFamily: WIDGET_FONT
|
|
2688
|
+
},
|
|
2689
|
+
children: doc.documentName
|
|
2690
|
+
}), isDownloading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
|
|
2691
|
+
size: 12,
|
|
2692
|
+
style: {
|
|
2693
|
+
color: "var(--primary-color, #222f67)"
|
|
2694
|
+
}
|
|
2695
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
2696
|
+
icon: _freeSolidSvgIcons.faDownload,
|
|
2697
|
+
style: {
|
|
2698
|
+
color: "var(--primary-color, #222f67)",
|
|
2699
|
+
fontSize: "12px"
|
|
2700
|
+
}
|
|
2701
|
+
})]
|
|
2702
|
+
}, doc.id || di))
|
|
2703
|
+
})]
|
|
2704
|
+
})]
|
|
2705
|
+
}, entry.id || index);
|
|
2706
|
+
})]
|
|
2707
|
+
})]
|
|
2449
2708
|
})]
|
|
2450
2709
|
})
|
|
2451
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
2710
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogActions, {
|
|
2452
2711
|
sx: {
|
|
2453
2712
|
padding: "16px 24px",
|
|
2454
2713
|
borderTop: "1px solid #e0e0e0",
|
|
2455
|
-
backgroundColor: "#f8f9fa"
|
|
2714
|
+
backgroundColor: "#f8f9fa",
|
|
2715
|
+
gap: "8px"
|
|
2456
2716
|
},
|
|
2457
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
2717
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
2458
2718
|
onClick: handleCloseDetails,
|
|
2719
|
+
variant: "outlined",
|
|
2720
|
+
sx: {
|
|
2721
|
+
color: "var(--primary-color, #222f67)",
|
|
2722
|
+
borderColor: "var(--primary-color, #222f67)",
|
|
2723
|
+
padding: "5.5px 23px",
|
|
2724
|
+
borderRadius: "6px",
|
|
2725
|
+
fontWeight: "500",
|
|
2726
|
+
fontSize: "14px",
|
|
2727
|
+
textTransform: "none",
|
|
2728
|
+
boxShadow: "none",
|
|
2729
|
+
"&:hover": {
|
|
2730
|
+
borderColor: "var(--primary-color, #222f67)",
|
|
2731
|
+
backgroundColor: "rgba(34, 47, 103, 0.05)",
|
|
2732
|
+
boxShadow: "none"
|
|
2733
|
+
}
|
|
2734
|
+
},
|
|
2735
|
+
children: "Fermer"
|
|
2736
|
+
}), (selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.statutCode) === STATUT_REPONDUE && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
2737
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
2738
|
+
variant: "contained",
|
|
2739
|
+
onClick: handleCloturer,
|
|
2740
|
+
disabled: isCloturing,
|
|
2741
|
+
sx: {
|
|
2742
|
+
backgroundColor: "#e53935",
|
|
2743
|
+
color: "white",
|
|
2744
|
+
padding: "5.5px 23px",
|
|
2745
|
+
borderRadius: "6px",
|
|
2746
|
+
fontWeight: "500",
|
|
2747
|
+
fontSize: "14px",
|
|
2748
|
+
textTransform: "none",
|
|
2749
|
+
boxShadow: "none",
|
|
2750
|
+
"&:hover": {
|
|
2751
|
+
backgroundColor: "#c62828",
|
|
2752
|
+
boxShadow: "none"
|
|
2753
|
+
},
|
|
2754
|
+
"&:disabled": {
|
|
2755
|
+
backgroundColor: "#ef9a9a",
|
|
2756
|
+
boxShadow: "none"
|
|
2757
|
+
}
|
|
2758
|
+
},
|
|
2759
|
+
children: isCloturing ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
|
|
2760
|
+
size: 16,
|
|
2761
|
+
sx: {
|
|
2762
|
+
color: "white"
|
|
2763
|
+
}
|
|
2764
|
+
}) : "Clรดturer"
|
|
2765
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
2766
|
+
variant: "contained",
|
|
2767
|
+
onClick: handleOpenReouvreDialog,
|
|
2768
|
+
sx: {
|
|
2769
|
+
backgroundColor: "var(--primary-color, #222f67)",
|
|
2770
|
+
color: "white",
|
|
2771
|
+
padding: "5.5px 23px",
|
|
2772
|
+
borderRadius: "6px",
|
|
2773
|
+
fontWeight: "500",
|
|
2774
|
+
fontSize: "14px",
|
|
2775
|
+
textTransform: "none",
|
|
2776
|
+
boxShadow: "none",
|
|
2777
|
+
"&:hover": {
|
|
2778
|
+
backgroundColor: "var(--secondary-color, #2d3d7f)",
|
|
2779
|
+
boxShadow: "none"
|
|
2780
|
+
}
|
|
2781
|
+
},
|
|
2782
|
+
children: "R\xE9ouverture"
|
|
2783
|
+
})]
|
|
2784
|
+
})]
|
|
2785
|
+
})]
|
|
2786
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Dialog, {
|
|
2787
|
+
open: reouvreDialogOpen,
|
|
2788
|
+
onClose: handleCloseReouvreDialog,
|
|
2789
|
+
maxWidth: "sm",
|
|
2790
|
+
fullWidth: true,
|
|
2791
|
+
PaperProps: {
|
|
2792
|
+
sx: {
|
|
2793
|
+
borderRadius: 3,
|
|
2794
|
+
boxShadow: "0 8px 32px rgba(0,0,0,0.12)"
|
|
2795
|
+
}
|
|
2796
|
+
},
|
|
2797
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogTitle, {
|
|
2798
|
+
sx: {
|
|
2799
|
+
backgroundColor: "#f8f9fa",
|
|
2800
|
+
borderBottom: "1px solid #e0e0e0",
|
|
2801
|
+
display: "flex",
|
|
2802
|
+
justifyContent: "space-between",
|
|
2803
|
+
alignItems: "center",
|
|
2804
|
+
padding: "20px 24px"
|
|
2805
|
+
},
|
|
2806
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2807
|
+
style: {
|
|
2808
|
+
display: "flex",
|
|
2809
|
+
alignItems: "center",
|
|
2810
|
+
gap: "12px"
|
|
2811
|
+
},
|
|
2812
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
2813
|
+
icon: _freeSolidSvgIcons.faReply,
|
|
2814
|
+
style: {
|
|
2815
|
+
color: "var(--primary-color, #222f67)",
|
|
2816
|
+
fontSize: "18px"
|
|
2817
|
+
}
|
|
2818
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2819
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
2820
|
+
component: "div",
|
|
2821
|
+
sx: {
|
|
2822
|
+
fontWeight: "700",
|
|
2823
|
+
fontSize: "16px",
|
|
2824
|
+
margin: 0
|
|
2825
|
+
},
|
|
2826
|
+
children: "R\xE9ouverture de la r\xE9clamation"
|
|
2827
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
2828
|
+
component: "div",
|
|
2829
|
+
sx: {
|
|
2830
|
+
color: "#666",
|
|
2831
|
+
fontSize: "12px",
|
|
2832
|
+
marginTop: "3px"
|
|
2833
|
+
},
|
|
2834
|
+
children: selectedReclamation === null || selectedReclamation === void 0 ? void 0 : selectedReclamation.reference
|
|
2835
|
+
})]
|
|
2836
|
+
})]
|
|
2837
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
2838
|
+
onClick: handleCloseReouvreDialog,
|
|
2839
|
+
size: "small",
|
|
2840
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconsMaterial.Close, {
|
|
2841
|
+
fontSize: "small"
|
|
2842
|
+
})
|
|
2843
|
+
})]
|
|
2844
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogContent, {
|
|
2845
|
+
sx: {
|
|
2846
|
+
padding: "24px",
|
|
2847
|
+
display: "flex",
|
|
2848
|
+
flexDirection: "column",
|
|
2849
|
+
gap: "20px"
|
|
2850
|
+
},
|
|
2851
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
2852
|
+
label: "Description",
|
|
2853
|
+
placeholder: "D\xE9crivez la raison de la r\xE9ouverture...",
|
|
2854
|
+
value: reouvreDescription,
|
|
2855
|
+
onChange: e => setReouvreDescription(e.target.value),
|
|
2856
|
+
multiline: true,
|
|
2857
|
+
rows: 5,
|
|
2858
|
+
fullWidth: true,
|
|
2859
|
+
required: true,
|
|
2860
|
+
variant: "outlined",
|
|
2861
|
+
inputProps: {
|
|
2862
|
+
maxLength: 500
|
|
2863
|
+
},
|
|
2864
|
+
sx: {
|
|
2865
|
+
mt: 1,
|
|
2866
|
+
"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
2867
|
+
borderColor: "var(--primary-color, #222f67)"
|
|
2868
|
+
},
|
|
2869
|
+
"& .MuiInputLabel-root.Mui-focused": {
|
|
2870
|
+
color: "var(--primary-color, #222f67)"
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2874
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
2875
|
+
type: "file",
|
|
2876
|
+
ref: reouvreFileInputRef,
|
|
2877
|
+
style: {
|
|
2878
|
+
display: "none"
|
|
2879
|
+
},
|
|
2880
|
+
onChange: handleReouvreFileSelect,
|
|
2881
|
+
accept: ".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif",
|
|
2882
|
+
multiple: true
|
|
2883
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
2884
|
+
variant: "outlined",
|
|
2885
|
+
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconsMaterial.AttachFile, {}),
|
|
2886
|
+
onClick: () => {
|
|
2887
|
+
var _reouvreFileInputRef$;
|
|
2888
|
+
return (_reouvreFileInputRef$ = reouvreFileInputRef.current) === null || _reouvreFileInputRef$ === void 0 ? void 0 : _reouvreFileInputRef$.click();
|
|
2889
|
+
},
|
|
2890
|
+
sx: {
|
|
2891
|
+
borderRadius: "8px",
|
|
2892
|
+
border: "2px dashed var(--primary-color, #222f67)",
|
|
2893
|
+
color: "var(--primary-color, #222f67)",
|
|
2894
|
+
fontWeight: "600",
|
|
2895
|
+
textTransform: "none",
|
|
2896
|
+
width: "100%",
|
|
2897
|
+
"&:hover": {
|
|
2898
|
+
backgroundColor: "rgba(34, 47, 103, 0.05)",
|
|
2899
|
+
borderStyle: "solid"
|
|
2900
|
+
}
|
|
2901
|
+
},
|
|
2902
|
+
children: "Pi\xE8ces jointes (optionnel)"
|
|
2903
|
+
}), reouvreFiles.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
2904
|
+
sx: {
|
|
2905
|
+
mt: 1,
|
|
2906
|
+
display: "flex",
|
|
2907
|
+
flexWrap: "wrap",
|
|
2908
|
+
gap: 1
|
|
2909
|
+
},
|
|
2910
|
+
children: reouvreFiles.map((file, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Chip, {
|
|
2911
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconsMaterial.AttachFile, {}),
|
|
2912
|
+
label: file.name,
|
|
2913
|
+
onDelete: () => handleRemoveReouvreFile(index),
|
|
2914
|
+
sx: {
|
|
2915
|
+
borderRadius: "8px"
|
|
2916
|
+
},
|
|
2917
|
+
color: "primary",
|
|
2918
|
+
variant: "outlined"
|
|
2919
|
+
}, index))
|
|
2920
|
+
})]
|
|
2921
|
+
})]
|
|
2922
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.DialogActions, {
|
|
2923
|
+
sx: {
|
|
2924
|
+
padding: "16px 24px",
|
|
2925
|
+
borderTop: "1px solid #e0e0e0",
|
|
2926
|
+
backgroundColor: "#f8f9fa",
|
|
2927
|
+
gap: "8px"
|
|
2928
|
+
},
|
|
2929
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
2930
|
+
onClick: handleCloseReouvreDialog,
|
|
2931
|
+
variant: "outlined",
|
|
2932
|
+
sx: {
|
|
2933
|
+
color: "var(--primary-color, #222f67)",
|
|
2934
|
+
borderColor: "var(--primary-color, #222f67)",
|
|
2935
|
+
padding: "5.5px 23px",
|
|
2936
|
+
borderRadius: "6px",
|
|
2937
|
+
fontWeight: "500",
|
|
2938
|
+
fontSize: "14px",
|
|
2939
|
+
textTransform: "none",
|
|
2940
|
+
boxShadow: "none",
|
|
2941
|
+
"&:hover": {
|
|
2942
|
+
borderColor: "var(--primary-color, #222f67)",
|
|
2943
|
+
backgroundColor: "rgba(34, 47, 103, 0.05)",
|
|
2944
|
+
boxShadow: "none"
|
|
2945
|
+
}
|
|
2946
|
+
},
|
|
2947
|
+
children: "Annuler"
|
|
2948
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
2459
2949
|
variant: "contained",
|
|
2950
|
+
onClick: handleSubmitReouvreture,
|
|
2951
|
+
disabled: !reouvreDescription.trim() || isReouvring,
|
|
2460
2952
|
sx: {
|
|
2461
2953
|
backgroundColor: "var(--primary-color, #222f67)",
|
|
2462
2954
|
color: "white",
|
|
@@ -2464,16 +2956,24 @@ const ReclamationsList = _ref5 => {
|
|
|
2464
2956
|
borderRadius: "6px",
|
|
2465
2957
|
fontWeight: "500",
|
|
2466
2958
|
fontSize: "14px",
|
|
2467
|
-
fontFamily: WIDGET_FONT,
|
|
2468
2959
|
textTransform: "none",
|
|
2469
2960
|
boxShadow: "none",
|
|
2470
2961
|
"&:hover": {
|
|
2471
2962
|
backgroundColor: "var(--secondary-color, #2d3d7f)",
|
|
2472
2963
|
boxShadow: "none"
|
|
2964
|
+
},
|
|
2965
|
+
"&:disabled": {
|
|
2966
|
+
backgroundColor: "rgba(34, 47, 103, 0.4)",
|
|
2967
|
+
boxShadow: "none"
|
|
2473
2968
|
}
|
|
2474
2969
|
},
|
|
2475
|
-
children:
|
|
2476
|
-
|
|
2970
|
+
children: isReouvring ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
|
|
2971
|
+
size: 16,
|
|
2972
|
+
sx: {
|
|
2973
|
+
color: "white"
|
|
2974
|
+
}
|
|
2975
|
+
}) : "Confirmer la rรฉouverture"
|
|
2976
|
+
})]
|
|
2477
2977
|
})]
|
|
2478
2978
|
})]
|
|
2479
2979
|
});
|
|
@@ -2512,7 +3012,7 @@ const TijariaChatbot = selectedConversation => {
|
|
|
2512
3012
|
return () => iframe.removeEventListener("load", handleLoad);
|
|
2513
3013
|
}, []);
|
|
2514
3014
|
(0, _react.useEffect)(() => {
|
|
2515
|
-
console.log("selectedConversation", selectedConversation);
|
|
3015
|
+
// console.log("selectedConversation", selectedConversation);
|
|
2516
3016
|
const iframe = iframeRef.current;
|
|
2517
3017
|
const handleSelect = () => {
|
|
2518
3018
|
iframe.contentWindow.postMessage({
|
|
@@ -3200,8 +3700,16 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3200
3700
|
},
|
|
3201
3701
|
},*/
|
|
3202
3702
|
{
|
|
3703
|
+
icon: _freeSolidSvgIcons.faCommentDots,
|
|
3704
|
+
title: "TijarIA",
|
|
3705
|
+
id: "tijaria",
|
|
3706
|
+
action: () => {
|
|
3707
|
+
setViewingTijariaHistory(false);
|
|
3708
|
+
setViewingReclamations(false);
|
|
3709
|
+
}
|
|
3710
|
+
}, {
|
|
3203
3711
|
icon: _freeSolidSvgIcons.faComments,
|
|
3204
|
-
title: "
|
|
3712
|
+
title: "Historique TijarIA",
|
|
3205
3713
|
id: "mes-conversations",
|
|
3206
3714
|
action: () => {
|
|
3207
3715
|
setViewingTijariaHistory(true);
|
|
@@ -3532,52 +4040,11 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3532
4040
|
"aria-hidden": "true"
|
|
3533
4041
|
})
|
|
3534
4042
|
})]
|
|
3535
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
4043
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
3536
4044
|
style: {
|
|
3537
4045
|
padding: "8px"
|
|
3538
4046
|
},
|
|
3539
|
-
children:
|
|
3540
|
-
onClick: handleContactClick,
|
|
3541
|
-
onKeyDown: e => {
|
|
3542
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
3543
|
-
e.preventDefault();
|
|
3544
|
-
handleContactClick();
|
|
3545
|
-
}
|
|
3546
|
-
},
|
|
3547
|
-
tabIndex: 0,
|
|
3548
|
-
sx: {
|
|
3549
|
-
borderRadius: 1,
|
|
3550
|
-
mb: 0.5,
|
|
3551
|
-
py: 1.5,
|
|
3552
|
-
"&:hover": {
|
|
3553
|
-
backgroundColor: "var(--primary-alpha-8, rgba(34, 47, 103, 0.08))"
|
|
3554
|
-
},
|
|
3555
|
-
"&:focus": {
|
|
3556
|
-
backgroundColor: "var(--primary-alpha-8, rgba(34, 47, 103, 0.08))",
|
|
3557
|
-
outline: "2px solid var(--primary-color, #222f67)",
|
|
3558
|
-
outlineOffset: "2px"
|
|
3559
|
-
}
|
|
3560
|
-
},
|
|
3561
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ListItemIcon, {
|
|
3562
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconsMaterial.Email, {
|
|
3563
|
-
fontSize: "small",
|
|
3564
|
-
sx: {
|
|
3565
|
-
color: "var(--primary-color, #222f67)"
|
|
3566
|
-
},
|
|
3567
|
-
"aria-hidden": "true"
|
|
3568
|
-
})
|
|
3569
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ListItemText, {
|
|
3570
|
-
primary: "Contacter le support",
|
|
3571
|
-
secondary: "Envoyez-nous un email",
|
|
3572
|
-
primaryTypographyProps: {
|
|
3573
|
-
fontSize: "14px",
|
|
3574
|
-
fontWeight: "500"
|
|
3575
|
-
},
|
|
3576
|
-
secondaryTypographyProps: {
|
|
3577
|
-
fontSize: "12px"
|
|
3578
|
-
}
|
|
3579
|
-
})]
|
|
3580
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.MenuItem, {
|
|
4047
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.MenuItem, {
|
|
3581
4048
|
onClick: () => {
|
|
3582
4049
|
window.open("tel:+212520473100", "_self");
|
|
3583
4050
|
handleContactUsMenuClose();
|
|
@@ -3622,7 +4089,7 @@ const PuiHelpWidget = _ref7 => {
|
|
|
3622
4089
|
fontSize: "12px"
|
|
3623
4090
|
}
|
|
3624
4091
|
})]
|
|
3625
|
-
})
|
|
4092
|
+
})
|
|
3626
4093
|
})]
|
|
3627
4094
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ReclamationFormModal, {
|
|
3628
4095
|
open: reclamationModalOpen,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useListServiceReclamation = exports.useListReclamation = exports.useDownloadDocument = exports.useCreateReclamation = void 0;
|
|
6
|
+
exports.useReouvreReclamation = exports.useListServiceReclamation = exports.useListReclamation = exports.useDownloadDocument = exports.useCreateReclamation = exports.useClotureReclamation = void 0;
|
|
7
7
|
var _reactQuery = require("react-query");
|
|
8
8
|
var _PuiHelpWidgetContext = require("../components/common/PuiHelpWidgetContext");
|
|
9
9
|
const useListReclamation = (page, search) => {
|
|
@@ -65,4 +65,24 @@ const useListServiceReclamation = () => {
|
|
|
65
65
|
refetchOnReconnect: false
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
exports.useListServiceReclamation = useListServiceReclamation;
|
|
68
|
+
exports.useListServiceReclamation = useListServiceReclamation;
|
|
69
|
+
const useClotureReclamation = () => {
|
|
70
|
+
const {
|
|
71
|
+
reclamationApi
|
|
72
|
+
} = (0, _PuiHelpWidgetContext.useHelpWidget)();
|
|
73
|
+
return (0, _reactQuery.useMutation)(id => reclamationApi.cloturerReclamation(id));
|
|
74
|
+
};
|
|
75
|
+
exports.useClotureReclamation = useClotureReclamation;
|
|
76
|
+
const useReouvreReclamation = () => {
|
|
77
|
+
const {
|
|
78
|
+
reclamationApi
|
|
79
|
+
} = (0, _PuiHelpWidgetContext.useHelpWidget)();
|
|
80
|
+
return (0, _reactQuery.useMutation)(_ref => {
|
|
81
|
+
let {
|
|
82
|
+
id,
|
|
83
|
+
formData
|
|
84
|
+
} = _ref;
|
|
85
|
+
return reclamationApi.reourrirReclamation(id, formData);
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
exports.useReouvreReclamation = useReouvreReclamation;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
.reclamation-modal .MuiPaper-root {
|
|
16
16
|
margin: 0;
|
|
17
|
+
overflow: visible !important;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
|
|
@@ -100,7 +101,7 @@
|
|
|
100
101
|
min-height: 300px;
|
|
101
102
|
background-color: white;
|
|
102
103
|
flex: 1 1 auto;
|
|
103
|
-
overflow
|
|
104
|
+
overflow: hidden;
|
|
104
105
|
overflow-x: hidden;
|
|
105
106
|
display: flex;
|
|
106
107
|
justify-content: center;
|
|
@@ -109,6 +110,8 @@
|
|
|
109
110
|
.reclamation-modal .step-content {
|
|
110
111
|
max-width: 600px;
|
|
111
112
|
margin: 0 auto;
|
|
113
|
+
overflow: visible;
|
|
114
|
+
max-height: 100%;
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
.reclamation-modal .step-title {
|
|
@@ -163,7 +166,6 @@
|
|
|
163
166
|
.reclamation-modal .service-autocomplete {
|
|
164
167
|
width: 384px !important;
|
|
165
168
|
max-width: 100%;
|
|
166
|
-
height: 230px;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
.reclamation-modal .service-autocomplete .MuiOutlinedInput-root {
|
|
@@ -192,7 +194,6 @@
|
|
|
192
194
|
border-width: 2px;
|
|
193
195
|
}
|
|
194
196
|
|
|
195
|
-
/* --- Listbox (Dropdown) Styling --- */
|
|
196
197
|
.reclamation-modal .service-listbox {
|
|
197
198
|
max-height: 300px;
|
|
198
199
|
border-radius: 12px;
|
|
@@ -206,6 +207,11 @@
|
|
|
206
207
|
right: 0 !important;
|
|
207
208
|
}
|
|
208
209
|
|
|
210
|
+
.reclamation-modal .service-autocomplete .MuiAutocomplete-listbox {
|
|
211
|
+
max-height: 160px;
|
|
212
|
+
overflow-y: auto;
|
|
213
|
+
}
|
|
214
|
+
|
|
209
215
|
/* --- Option Items --- */
|
|
210
216
|
.reclamation-modal .service-option {
|
|
211
217
|
padding: 14px 16px;
|
|
@@ -218,10 +224,8 @@
|
|
|
218
224
|
|
|
219
225
|
.reclamation-modal .service-option .MuiTypography-root {
|
|
220
226
|
display: -webkit-box;
|
|
221
|
-
-webkit-line-clamp: 2;
|
|
222
227
|
-webkit-box-orient: vertical;
|
|
223
228
|
overflow: hidden;
|
|
224
|
-
text-overflow: ellipsis;
|
|
225
229
|
word-break: break-word;
|
|
226
230
|
}
|
|
227
231
|
|
|
@@ -462,7 +466,7 @@
|
|
|
462
466
|
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
|
|
463
467
|
margin: 24px 0;
|
|
464
468
|
border: 2px solid #cccc;
|
|
465
|
-
box-shadow:none;
|
|
469
|
+
box-shadow: none;
|
|
466
470
|
}
|
|
467
471
|
|
|
468
472
|
.success-modal .reference-number {
|
|
@@ -545,6 +549,11 @@
|
|
|
545
549
|
align-items: center !important;
|
|
546
550
|
gap: 8px !important;
|
|
547
551
|
transition: background-color 0.2s !important;
|
|
552
|
+
min-height: 48px !important;
|
|
553
|
+
margin-bottom: 4px !important;
|
|
554
|
+
line-height: 1.8 !important;
|
|
555
|
+
border-bottom: 1px solid #f0f0f0 !important;
|
|
556
|
+
|
|
548
557
|
}
|
|
549
558
|
|
|
550
559
|
.MuiAutocomplete-popper .MuiAutocomplete-option:hover {
|
|
@@ -566,4 +575,55 @@
|
|
|
566
575
|
border-radius: 50%;
|
|
567
576
|
background-color: var(--primary-color, #222f67);
|
|
568
577
|
flex-shrink: 0;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/* Responsive mobile - fix centrage uniquement */
|
|
581
|
+
@media (max-width: 576px) {
|
|
582
|
+
|
|
583
|
+
.reclamation-modal .modal-header {
|
|
584
|
+
padding: 16px !important;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.reclamation-modal .header-title {
|
|
588
|
+
font-size: 16px !important;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.reclamation-modal .progress-section {
|
|
592
|
+
padding: 12px 16px !important;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.reclamation-modal .stepper .MuiStepLabel-label {
|
|
596
|
+
font-size: 10px !important;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.reclamation-modal .modal-content {
|
|
600
|
+
padding: 16px !important;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.reclamation-modal .step-title {
|
|
604
|
+
font-size: 18px !important;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/* Fix centrage autocomplete */
|
|
608
|
+
.reclamation-modal .service-autocomplete {
|
|
609
|
+
width: 100% !important;
|
|
610
|
+
height: auto !important;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.reclamation-modal .step-content {
|
|
614
|
+
width: 100% !important;
|
|
615
|
+
max-width: 100% !important;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.reclamation-modal .modal-footer {
|
|
619
|
+
padding: 12px 16px !important;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.reclamation-modal .next-button,
|
|
623
|
+
.reclamation-modal .submit-button {
|
|
624
|
+
padding: 10px 20px !important;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
.MuiAutocomplete-popper .MuiAutocomplete-option:last-child {
|
|
628
|
+
border-bottom: none !important;
|
|
569
629
|
}
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
.help-widget-sidebar {
|
|
99
99
|
width: 100vw;
|
|
100
100
|
right: -100vw;
|
|
101
|
-
overflow
|
|
101
|
+
overflow: hidden;
|
|
102
102
|
}
|
|
103
103
|
.help-widget-sidebar.open {
|
|
104
104
|
right: 0;
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
width: 100vw;
|
|
450
450
|
right: -100vw;
|
|
451
451
|
border-radius: 0;
|
|
452
|
-
overflow
|
|
452
|
+
overflow: hidden;
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
.help-widget-sidebar.open {
|