Standardize phase type labels
This commit is contained in:
+2
-1
@@ -689,7 +689,8 @@ body {
|
||||
border-color: #c2410c;
|
||||
}
|
||||
|
||||
.tree-grid input {
|
||||
.tree-grid input,
|
||||
.tree-grid select {
|
||||
width: 100%;
|
||||
min-width: 5rem;
|
||||
border: 1px solid #9fb6e0;
|
||||
|
||||
@@ -193,7 +193,7 @@ export default function ProjectsPage() {
|
||||
|
||||
async function handleQuickUpdateGlobalDevice(
|
||||
device: GlobalDeviceDto,
|
||||
key: "name" | "displayName" | "category",
|
||||
key: "name" | "displayName" | "category" | "phaseCount",
|
||||
value: string
|
||||
) {
|
||||
const payload: CreateGlobalDeviceInput = {
|
||||
@@ -203,7 +203,12 @@ export default function ProjectsPage() {
|
||||
quantity: device.quantity,
|
||||
installedPowerPerUnitKw: device.installedPowerPerUnitKw,
|
||||
demandFactor: device.demandFactor,
|
||||
phaseCount: device.phaseCount ?? undefined,
|
||||
phaseCount:
|
||||
key === "phaseCount"
|
||||
? value === "3"
|
||||
? 3
|
||||
: 1
|
||||
: device.phaseCount ?? 1,
|
||||
powerFactor: device.powerFactor ?? undefined,
|
||||
note: device.note ?? undefined,
|
||||
};
|
||||
@@ -416,8 +421,8 @@ export default function ProjectsPage() {
|
||||
setGlobalDeviceForm((current) => ({ ...current, phaseCount: event.target.value }))
|
||||
}
|
||||
>
|
||||
<option value="1">1-ph</option>
|
||||
<option value="3">3-ph</option>
|
||||
<option value="1">1-phasig</option>
|
||||
<option value="3">3-phasig</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="col-6 col-md-2">
|
||||
@@ -437,6 +442,7 @@ export default function ProjectsPage() {
|
||||
<th>Anzahl</th>
|
||||
<th>Leistung je Stück [kW]</th>
|
||||
<th>GZF</th>
|
||||
<th>Phasenart</th>
|
||||
<th>Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -479,6 +485,23 @@ export default function ProjectsPage() {
|
||||
<td>{device.quantity}</td>
|
||||
<td>{device.installedPowerPerUnitKw}</td>
|
||||
<td>{device.demandFactor}</td>
|
||||
<td>
|
||||
<select
|
||||
className="form-select form-select-sm"
|
||||
aria-label={`Phasenart für ${device.displayName}`}
|
||||
value={String(device.phaseCount ?? 1)}
|
||||
onChange={(event) =>
|
||||
void handleQuickUpdateGlobalDevice(
|
||||
device,
|
||||
"phaseCount",
|
||||
event.target.value
|
||||
)
|
||||
}
|
||||
>
|
||||
<option value="1">1-phasig</option>
|
||||
<option value="3">3-phasig</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<button
|
||||
className="btn btn-sm btn-outline-danger"
|
||||
@@ -492,7 +515,7 @@ export default function ProjectsPage() {
|
||||
))}
|
||||
{!globalDevices.length ? (
|
||||
<tr>
|
||||
<td colSpan={7} className="text-center text-secondary py-4">
|
||||
<td colSpan={8} className="text-center text-secondary py-4">
|
||||
Noch keine globalen Geräte vorhanden.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user