add installation date for sodistore home and pro
This commit is contained in:
parent
49ae2b7806
commit
a8b371e1da
|
|
@ -404,6 +404,7 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) {
|
|||
|
||||
const [networkProviders, setNetworkProviders] = useState<string[]>([]);
|
||||
const [loadingProviders, setLoadingProviders] = useState(false);
|
||||
const [installationDate, setInstallationDate] = useState<string>('');
|
||||
|
||||
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) {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<TextField
|
||||
label={<FormattedMessage id="installationDate" defaultMessage="Installation Date" />}
|
||||
type="date"
|
||||
value={installationDate}
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
InputLabelProps={{ shrink: true }}
|
||||
inputProps={{ readOnly: true }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<FormControl sx={{ m: 1, width: '50ch' }}>
|
||||
<InputLabel
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@
|
|||
"dataCollectionEnabled": "Datenerfassung",
|
||||
"generalInfo": "Allgemeine Informationen",
|
||||
"installationSetup": "Installationseinrichtung",
|
||||
"installationDate": "Installationsdatum",
|
||||
"couplingType": "AC/DC-Kopplung",
|
||||
"couplingAC": "AC-gekoppelt",
|
||||
"couplingDC": "DC-gekoppelt",
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@
|
|||
"dataCollectionEnabled": "Data Collection",
|
||||
"generalInfo": "General Info",
|
||||
"installationSetup": "Installation Setup",
|
||||
"installationDate": "Installation Date",
|
||||
"couplingType": "AC/DC Coupling",
|
||||
"couplingAC": "AC-coupled",
|
||||
"couplingDC": "DC-coupled",
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@
|
|||
"dataCollectionEnabled": "Collecte de données",
|
||||
"generalInfo": "Informations générales",
|
||||
"installationSetup": "Configuration de l'installation",
|
||||
"installationDate": "Date d'installation",
|
||||
"couplingType": "Couplage AC/DC",
|
||||
"couplingAC": "Couplage AC",
|
||||
"couplingDC": "Couplage DC",
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@
|
|||
"dataCollectionEnabled": "Raccolta dati",
|
||||
"generalInfo": "Informazioni generali",
|
||||
"installationSetup": "Configurazione installazione",
|
||||
"installationDate": "Data di installazione",
|
||||
"couplingType": "Accoppiamento AC/DC",
|
||||
"couplingAC": "Accoppiamento AC",
|
||||
"couplingDC": "Accoppiamento DC",
|
||||
|
|
|
|||
Loading…
Reference in New Issue