diff --git a/src/Data.js b/src/Data.js
index 44edbce..77a66e9 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -32,30 +32,14 @@ class Flat {
return room ? this.sizeShared / this.numPeople * room.numPeople : 0;
}
- // Calculates the share of the project wide common area
- // the party has to pay for.
- // Currently done by number of people in the party.
- calcCommonAreaShare(room = null) {
- var numPeople;
- if (room) {
- numPeople = room.numPeople;
- } else {
- numPeople = this.numRooms;
- }
-
- return commonArea / numPeopleTotal * numPeople;
- }
-
// Calculates the total area the party has to pay for
- // Includes the private area, share of the common area and for
- // WGs and clusters the share of the internal shared area
+ // Includes the private area and if applicable share of
+ // the internal common area of WGs and cluster flats
calcTotalPayedArea(room = null) {
- var commonAreaShare = this.calcCommonAreaShare(room);
-
if (!room) {
- return this.sizePrivate + commonAreaShare;
+ return this.sizePrivate;
} else {
- return room.size + commonAreaShare + this.calcInternalAreaShare(room);
+ return room.size + this.calcInternalAreaShare(room);
}
}
}
@@ -129,8 +113,6 @@ const addedCost = 1.2;
export const minRent = 9.45 + addedCost;
export const maxRent = 13.06 + addedCost;
-const commonArea = 388.80;
-
// Calculate total number of people
var _numPeople = 0;
diff --git a/src/Solimieten.js b/src/Solimieten.js
index c977e03..289324e 100644
--- a/src/Solimieten.js
+++ b/src/Solimieten.js
@@ -103,24 +103,33 @@ export function FlatDetailsCard({ flat, room }) {
var sizeSharedBox = null;
- var commonAreaShare = flat.calcCommonAreaShare(room);
var internalAreaShare = flat.calcInternalAreaShare(room);
+ var totalSizeToPay = flat.calcTotalPayedArea(room);
if (flat.wgRoomList.length > 0) {
- sizeSharedBox =
-
- Interne Gemeinschaftsfläche
-
-
- {flat.sizeShared.toFixed(2)} m²
-
- ;
+ sizeSharedBox = [
+
+
+ Anteil Interne Gemeinschaftsfläche (WG und Cluster)
+
+
+ {internalAreaShare.toFixed(2)} m²
+
+ ,
+
+
+ Zahlfläche
+
+
+ {sizePrivate.toFixed(2)} m² + {internalAreaShare.toFixed(2)} m² (WG/Cluster-Fläche)
+
+ Gesamt: {totalSizeToPay.toFixed(2)} m²
+
+ ];
}
- var totalSizeToPay = flat.calcTotalPayedArea(room);
-
body =
} spacing='4'>
@@ -135,34 +144,18 @@ export function FlatDetailsCard({ flat, room }) {
- Zimmeranzahl
+ Zimmeranzahl und Gesamtfläche
- {flat.numRooms}
+ {flat.numRooms} Zimmer, {flat.sizePrivate.toFixed(2)} m²
{sizeSharedBox}
-
-
- Anteil Gemeinschaftsfläche
-
-
- {commonAreaShare.toFixed(2)} m² {internalAreaShare ? ("(Allmendefläche) + " + internalAreaShare.toFixed(2) + " m² (WG/Cluster-Fläche)") : ""}
-
-
-
-
- Zahlfläche
-
-
- {sizePrivate.toFixed(2)} m² + {commonAreaShare.toFixed(2)} m² (Allmendefläche) {internalAreaShare ? " + " + (internalAreaShare.toFixed(2) + " m² (WG/Cluster-Fläche)") : null}
-
- Gesamt: {totalSizeToPay.toFixed(2)} m²
-
Mindestmiete
+ Die Mindestmiete ergibt sich aus dem WBS Satz für die private Fläche (4,45 €/m²), den Nebenkosten (1,20 €/m²) und der Küchen-Nutzungspauschale von 50€ pro Küche
{((sizePrivate + internalAreaShare) * minRent + 50).toFixed(2)} €