From a8b371e1da64bc9aee3c301a36815c1538630fe6 Mon Sep 17 00:00:00 2001 From: Yinyin Liu Date: Wed, 29 Apr 2026 14:48:17 +0200 Subject: [PATCH] add installation date for sodistore home and pro --- .../Information/InformationSodistoreHome.tsx | 30 +++++++++++++++++++ typescript/frontend-marios2/src/lang/de.json | 1 + typescript/frontend-marios2/src/lang/en.json | 1 + typescript/frontend-marios2/src/lang/fr.json | 1 + typescript/frontend-marios2/src/lang/it.json | 1 + 5 files changed, 34 insertions(+) diff --git a/typescript/frontend-marios2/src/content/dashboards/Information/InformationSodistoreHome.tsx b/typescript/frontend-marios2/src/content/dashboards/Information/InformationSodistoreHome.tsx index 3c87ad13f..bdc1adc37 100644 --- a/typescript/frontend-marios2/src/content/dashboards/Information/InformationSodistoreHome.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/Information/InformationSodistoreHome.tsx @@ -404,6 +404,7 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) { const [networkProviders, setNetworkProviders] = useState([]); const [loadingProviders, setLoadingProviders] = useState(false); + const [installationDate, setInstallationDate] = useState(''); useEffect(() => { setLoadingProviders(true); @@ -414,6 +415,23 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) { .finally(() => setLoadingProviders(false)); }, []); + useEffect(() => { + if (!props.values.id) return; + axiosConfig + .get('/GetChecklistForInstallation', { + params: { installationId: props.values.id } + }) + .then((res) => { + if (Array.isArray(res.data)) { + const step10 = res.data.find( + (i: { stepNumber?: number }) => i.stepNumber === 10 + ); + setInstallationDate(step10?.doneAt ?? ''); + } + }) + .catch(() => setInstallationDate('')); + }, [props.values.id]); + return ( <> {openModalDeleteInstallation && ( @@ -856,6 +874,18 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) { /> +
+ } + type="date" + value={installationDate} + variant="outlined" + fullWidth + InputLabelProps={{ shrink: true }} + inputProps={{ readOnly: true }} + /> +
+