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 }} + /> +
+