forked from jappel/leistungsbilanz-ts
Add public building project setting
This commit is contained in:
parent
43a3bb0b69
commit
44b6fde940
29 changed files with 2057 additions and 54 deletions
|
|
@ -14,6 +14,7 @@ export interface ProjectSettingsInput {
|
|||
externalProjectNumber: string | null;
|
||||
buildingOwner: string | null;
|
||||
description: string | null;
|
||||
isPublicBuilding: boolean;
|
||||
singlePhaseVoltageV: number;
|
||||
threePhaseVoltageV: number;
|
||||
enabledDistributionBoardSupplyTypes: DistributionBoardSupplyType[];
|
||||
|
|
@ -54,6 +55,9 @@ export function ProjectSettingsModal({
|
|||
const [description, setDescription] = useState(
|
||||
project.description ?? ""
|
||||
);
|
||||
const [isPublicBuilding, setIsPublicBuilding] = useState(
|
||||
project.isPublicBuilding
|
||||
);
|
||||
const [singlePhaseVoltageV, setSinglePhaseVoltageV] = useState(
|
||||
String(project.singlePhaseVoltageV)
|
||||
);
|
||||
|
|
@ -82,6 +86,7 @@ export function ProjectSettingsModal({
|
|||
externalProjectNumber: toNullableString(externalProjectNumber),
|
||||
buildingOwner: toNullableString(buildingOwner),
|
||||
description: toNullableString(description),
|
||||
isPublicBuilding,
|
||||
singlePhaseVoltageV: Number(singlePhaseVoltageV),
|
||||
threePhaseVoltageV: Number(threePhaseVoltageV),
|
||||
enabledDistributionBoardSupplyTypes,
|
||||
|
|
@ -269,6 +274,27 @@ export function ProjectSettingsModal({
|
|||
value={description}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-12">
|
||||
<label className="form-check">
|
||||
<input
|
||||
checked={isPublicBuilding}
|
||||
className="form-check-input"
|
||||
id="public-building"
|
||||
onChange={(event) =>
|
||||
setIsPublicBuilding(event.target.checked)
|
||||
}
|
||||
type="checkbox"
|
||||
/>
|
||||
<span className="form-check-label">
|
||||
Öffentliches Gebäude
|
||||
</span>
|
||||
</label>
|
||||
<div className="form-text ms-4">
|
||||
Wird bei der späteren Leitungsauslegung berücksichtigt,
|
||||
insbesondere bei der Auswahl halogenfreier Kabel und
|
||||
Leitungen.
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-12 col-md-6">
|
||||
<label className="form-label" htmlFor="single-phase-voltage">
|
||||
Standardspannung 1-phasig [V]
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export interface ProjectDto {
|
|||
externalProjectNumber: string | null;
|
||||
buildingOwner: string | null;
|
||||
description: string | null;
|
||||
isPublicBuilding: boolean;
|
||||
singlePhaseVoltageV: number;
|
||||
threePhaseVoltageV: number;
|
||||
enabledDistributionBoardSupplyTypes: DistributionBoardSupplyType[];
|
||||
|
|
|
|||
|
|
@ -245,6 +245,7 @@ export function updateProjectSettings(
|
|||
externalProjectNumber: string | null;
|
||||
buildingOwner: string | null;
|
||||
description: string | null;
|
||||
isPublicBuilding: boolean;
|
||||
singlePhaseVoltageV: number;
|
||||
threePhaseVoltageV: number;
|
||||
enabledDistributionBoardSupplyTypes: ProjectDto["enabledDistributionBoardSupplyTypes"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue