not-set instead of default value for AC/DC Coupling and Backup Load

This commit is contained in:
Yinyin Liu 2026-06-16 14:36:04 +02:00
parent 15972cff1d
commit 4aa30acd0b
8 changed files with 24 additions and 8 deletions

View File

@ -61,8 +61,8 @@ public class Installation : TreeNode
public string PvStringsPerInverter { get; set; } = ""; public string PvStringsPerInverter { get; set; } = "";
public string InstallationModel { get; set; } = ""; public string InstallationModel { get; set; } = "";
public string ExternalEms { get; set; } = "No"; public string ExternalEms { get; set; } = "No";
public string CouplingType { get; set; } = "DC"; public string? CouplingType { get; set; }
public string BackupLoad { get; set; } = "None"; public string? BackupLoad { get; set; }
[Ignore] [Ignore]
public String OrderNumbers { get; set; } public String OrderNumbers { get; set; }

View File

@ -294,7 +294,6 @@ public static partial class Db
fileConnection.Execute("UPDATE Installation SET ExternalEms = 'No' WHERE ExternalEms IS NULL OR ExternalEms = ''"); fileConnection.Execute("UPDATE Installation SET ExternalEms = 'No' WHERE ExternalEms IS NULL OR ExternalEms = ''");
fileConnection.Execute("UPDATE Installation SET InstallationModel = '' WHERE InstallationModel IS NULL"); fileConnection.Execute("UPDATE Installation SET InstallationModel = '' WHERE InstallationModel IS NULL");
fileConnection.Execute("UPDATE Installation SET PvStringsPerInverter = '' WHERE PvStringsPerInverter IS NULL"); fileConnection.Execute("UPDATE Installation SET PvStringsPerInverter = '' WHERE PvStringsPerInverter IS NULL");
fileConnection.Execute("UPDATE Installation SET BackupLoad = 'None' WHERE BackupLoad IS NULL");
return fileConnection; return fileConnection;
//return CopyDbToMemory(fileConnection); //return CopyDbToMemory(fileConnection);

View File

@ -376,7 +376,14 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) {
}) })
.catch(() => {}); .catch(() => {});
} }
updateInstallation(formValues, props.type); updateInstallation(
{
...formValues,
couplingType: formValues.couplingType || null,
backupLoad: formValues.backupLoad || null
},
props.type
);
}; };
const handleDelete = () => { const handleDelete = () => {
@ -912,12 +919,15 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) {
</InputLabel> </InputLabel>
<Select <Select
name="couplingType" name="couplingType"
value={formValues.couplingType || 'DC'} value={formValues.couplingType || ''}
onChange={handleChange} onChange={handleChange}
inputProps={{ readOnly: !canEdit }} inputProps={{ readOnly: !canEdit }}
displayEmpty displayEmpty
notched notched
> >
<MenuItem value="">
<em><FormattedMessage id="notSet" defaultMessage="Not set" /></em>
</MenuItem>
<MenuItem value="AC"> <MenuItem value="AC">
<FormattedMessage id="couplingAC" defaultMessage="AC-coupled" /> <FormattedMessage id="couplingAC" defaultMessage="AC-coupled" />
</MenuItem> </MenuItem>
@ -941,12 +951,15 @@ function InformationSodistorehome(props: InformationSodistorehomeProps) {
</InputLabel> </InputLabel>
<Select <Select
name="backupLoad" name="backupLoad"
value={formValues.backupLoad || 'None'} value={formValues.backupLoad || ''}
onChange={handleChange} onChange={handleChange}
inputProps={{ readOnly: !canEdit }} inputProps={{ readOnly: !canEdit }}
displayEmpty displayEmpty
notched notched
> >
<MenuItem value="">
<em><FormattedMessage id="notSet" defaultMessage="Not set" /></em>
</MenuItem>
<MenuItem value="Whole"> <MenuItem value="Whole">
<FormattedMessage id="backupWhole" defaultMessage="Whole house" /> <FormattedMessage id="backupWhole" defaultMessage="Whole house" />
</MenuItem> </MenuItem>

View File

@ -28,8 +28,8 @@ export interface I_Installation extends I_S3Credentials {
pvStringsPerInverter: string; pvStringsPerInverter: string;
installationModel: string; installationModel: string;
externalEms: string; externalEms: string;
couplingType: string; couplingType: string | null;
backupLoad: string; backupLoad: string | null;
parentId: number; parentId: number;
s3WriteKey: string; s3WriteKey: string;

View File

@ -139,6 +139,7 @@
"backupWhole": "Komplettes Haus", "backupWhole": "Komplettes Haus",
"backupPartial": "Teilnetz", "backupPartial": "Teilnetz",
"backupNone": "nicht verwendet", "backupNone": "nicht verwendet",
"notSet": "Nicht festgelegt",
"selectModel": "Modell auswählen...", "selectModel": "Modell auswählen...",
"inverterN": "Wechselrichter {n}", "inverterN": "Wechselrichter {n}",
"clusterN": "Cluster {n}", "clusterN": "Cluster {n}",

View File

@ -121,6 +121,7 @@
"backupWhole": "Whole house", "backupWhole": "Whole house",
"backupPartial": "Partial", "backupPartial": "Partial",
"backupNone": "Not used", "backupNone": "Not used",
"notSet": "Not set",
"selectModel": "Select model...", "selectModel": "Select model...",
"inverterN": "Inverter {n}", "inverterN": "Inverter {n}",
"clusterN": "Cluster {n}", "clusterN": "Cluster {n}",

View File

@ -133,6 +133,7 @@
"backupWhole": "Maison entière", "backupWhole": "Maison entière",
"backupPartial": "Partiel", "backupPartial": "Partiel",
"backupNone": "Non utilisé", "backupNone": "Non utilisé",
"notSet": "Non défini",
"selectModel": "Sélectionner le modèle...", "selectModel": "Sélectionner le modèle...",
"inverterN": "Onduleur {n}", "inverterN": "Onduleur {n}",
"clusterN": "Cluster {n}", "clusterN": "Cluster {n}",

View File

@ -121,6 +121,7 @@
"backupWhole": "Intera casa", "backupWhole": "Intera casa",
"backupPartial": "Parziale", "backupPartial": "Parziale",
"backupNone": "Non utilizzato", "backupNone": "Non utilizzato",
"notSet": "Non impostato",
"selectModel": "Seleziona modello...", "selectModel": "Seleziona modello...",
"inverterN": "Inverter {n}", "inverterN": "Inverter {n}",
"clusterN": "Cluster {n}", "clusterN": "Cluster {n}",