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 [networkProviders, setNetworkProviders] = useState<string[]>([]);
|
||||||
const [loadingProviders, setLoadingProviders] = useState(false);
|
const [loadingProviders, setLoadingProviders] = useState(false);
|
||||||
|
const [installationDate, setInstallationDate] = useState<string>('');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoadingProviders(true);
|
setLoadingProviders(true);
|
||||||
|
|
@ -414,6 +415,23 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) {
|
||||||
.finally(() => setLoadingProviders(false));
|
.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 (
|
return (
|
||||||
<>
|
<>
|
||||||
{openModalDeleteInstallation && (
|
{openModalDeleteInstallation && (
|
||||||
|
|
@ -856,6 +874,18 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) {
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
<div>
|
||||||
<FormControl sx={{ m: 1, width: '50ch' }}>
|
<FormControl sx={{ m: 1, width: '50ch' }}>
|
||||||
<InputLabel
|
<InputLabel
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"dataCollectionEnabled": "Datenerfassung",
|
"dataCollectionEnabled": "Datenerfassung",
|
||||||
"generalInfo": "Allgemeine Informationen",
|
"generalInfo": "Allgemeine Informationen",
|
||||||
"installationSetup": "Installationseinrichtung",
|
"installationSetup": "Installationseinrichtung",
|
||||||
|
"installationDate": "Installationsdatum",
|
||||||
"couplingType": "AC/DC-Kopplung",
|
"couplingType": "AC/DC-Kopplung",
|
||||||
"couplingAC": "AC-gekoppelt",
|
"couplingAC": "AC-gekoppelt",
|
||||||
"couplingDC": "DC-gekoppelt",
|
"couplingDC": "DC-gekoppelt",
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@
|
||||||
"dataCollectionEnabled": "Data Collection",
|
"dataCollectionEnabled": "Data Collection",
|
||||||
"generalInfo": "General Info",
|
"generalInfo": "General Info",
|
||||||
"installationSetup": "Installation Setup",
|
"installationSetup": "Installation Setup",
|
||||||
|
"installationDate": "Installation Date",
|
||||||
"couplingType": "AC/DC Coupling",
|
"couplingType": "AC/DC Coupling",
|
||||||
"couplingAC": "AC-coupled",
|
"couplingAC": "AC-coupled",
|
||||||
"couplingDC": "DC-coupled",
|
"couplingDC": "DC-coupled",
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@
|
||||||
"dataCollectionEnabled": "Collecte de données",
|
"dataCollectionEnabled": "Collecte de données",
|
||||||
"generalInfo": "Informations générales",
|
"generalInfo": "Informations générales",
|
||||||
"installationSetup": "Configuration de l'installation",
|
"installationSetup": "Configuration de l'installation",
|
||||||
|
"installationDate": "Date d'installation",
|
||||||
"couplingType": "Couplage AC/DC",
|
"couplingType": "Couplage AC/DC",
|
||||||
"couplingAC": "Couplage AC",
|
"couplingAC": "Couplage AC",
|
||||||
"couplingDC": "Couplage DC",
|
"couplingDC": "Couplage DC",
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@
|
||||||
"dataCollectionEnabled": "Raccolta dati",
|
"dataCollectionEnabled": "Raccolta dati",
|
||||||
"generalInfo": "Informazioni generali",
|
"generalInfo": "Informazioni generali",
|
||||||
"installationSetup": "Configurazione installazione",
|
"installationSetup": "Configurazione installazione",
|
||||||
|
"installationDate": "Data di installazione",
|
||||||
"couplingType": "Accoppiamento AC/DC",
|
"couplingType": "Accoppiamento AC/DC",
|
||||||
"couplingAC": "Accoppiamento AC",
|
"couplingAC": "Accoppiamento AC",
|
||||||
"couplingDC": "Accoppiamento DC",
|
"couplingDC": "Accoppiamento DC",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue