Added distributionboards
This commit is contained in:
@@ -63,6 +63,7 @@ export function PowerBalanceWorkspace() {
|
||||
|
||||
const selectedProject = projects.find((project) => project.id === selectedProjectId);
|
||||
const selectedBoard = distributionBoards.find((board) => board.id === selectedBoardId);
|
||||
const boardNames = new Map(distributionBoards.map((board) => [board.id, board.name]));
|
||||
const visibleConsumers = selectedBoardId
|
||||
? consumers.filter((consumer) => consumer.distributionBoardId === selectedBoardId)
|
||||
: consumers;
|
||||
@@ -343,6 +344,7 @@ export function PowerBalanceWorkspace() {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Verbraucher</th>
|
||||
<th>Verteilung</th>
|
||||
<th>Kategorie</th>
|
||||
<th>Anzahl</th>
|
||||
<th>Leistung je Stück [kW]</th>
|
||||
@@ -360,6 +362,7 @@ export function PowerBalanceWorkspace() {
|
||||
<Zap size={15} />
|
||||
{consumer.name}
|
||||
</td>
|
||||
<td>{consumer.distributionBoardId ? boardNames.get(consumer.distributionBoardId) || "-" : "-"}</td>
|
||||
<td>{consumer.category || "-"}</td>
|
||||
<td>{consumer.quantity}</td>
|
||||
<td>{formatNumber(consumer.installedPowerPerUnitKw)}</td>
|
||||
@@ -372,7 +375,7 @@ export function PowerBalanceWorkspace() {
|
||||
))}
|
||||
{!visibleConsumers.length ? (
|
||||
<tr>
|
||||
<td colSpan={9} className="emptyState">
|
||||
<td colSpan={10} className="emptyState">
|
||||
Lege eine Verteilung an oder erfasse den ersten Verbraucher.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user