diff --git a/src/components/AgileCalculator.tsx b/src/components/AgileCalculator.tsx
new file mode 100644
index 0000000..2573e49
--- /dev/null
+++ b/src/components/AgileCalculator.tsx
@@ -0,0 +1,150 @@
+import Big from "big.js";
+import { Component, createMemo } from "solid-js";
+import { createStore } from "solid-js/store";
+import { TextInput } from "./Form";
+import { calculateAgileQuantity } from "./Positions";
+import { formatAmount } from "./SwissInvoice";
+
+const AgileCalculator: Component = () => {
+ const [agileCalculator, setAgileCalculator] = createStore({
+ minPoints: 0,
+ maxPoints: 10,
+ risk: 70,
+ singlePrice: 10.0,
+ hoursPerPoint: 1,
+ });
+ const calculatorQuantity = createMemo(() =>
+ calculateAgileQuantity(
+ agileCalculator.hoursPerPoint,
+ new Big(agileCalculator.risk).div(100).toNumber(),
+ agileCalculator.minPoints,
+ agileCalculator.maxPoints
+ )
+ );
+
+ return (
+
+
Rechnungsbeispiel
+
+ !Number.isNaN(e.currentTarget.valueAsNumber) &&
+ setAgileCalculator("risk", e.currentTarget.valueAsNumber)
+ }
+ />
+
+ !Number.isNaN(e.currentTarget.valueAsNumber) &&
+ setAgileCalculator("hoursPerPoint", e.currentTarget.valueAsNumber)
+ }
+ />
+
+ !Number.isNaN(e.currentTarget.valueAsNumber) &&
+ setAgileCalculator("minPoints", e.currentTarget.valueAsNumber)
+ }
+ />
+
+ !Number.isNaN(e.currentTarget.valueAsNumber) &&
+ setAgileCalculator("maxPoints", e.currentTarget.valueAsNumber)
+ }
+ />
+
+ !Number.isNaN(e.currentTarget.valueAsNumber) &&
+ setAgileCalculator("singlePrice", e.currentTarget.valueAsNumber)
+ }
+ />
+
+
+ {"("}
+
+ {new Big(-100).plus(agileCalculator.risk).abs().toNumber()}%
+ {" "}
+ *{" "}
+
+ {agileCalculator.minPoints} SP
+
+ {")"} + {"("}
+
+ {agileCalculator.risk}%
+ {" "}
+ *{" "}
+
+ {agileCalculator.maxPoints > agileCalculator.minPoints
+ ? agileCalculator.maxPoints
+ : agileCalculator.minPoints}{" "}
+ SP
+
+ {")"} =
+
+
+
+ Gewichtete Story Points:
+ {new Big(calculatorQuantity())
+ .div(agileCalculator.hoursPerPoint)
+ .toNumber()}{" "}
+ SP
+
+
+
+
+ {new Big(calculatorQuantity())
+ .div(agileCalculator.hoursPerPoint)
+ .toNumber()}{" "}
+ SP
+ {" "}
+ *{" "}
+
+ {agileCalculator.hoursPerPoint} h
+ {" "}
+ *{" "}
+
+ {agileCalculator.singlePrice} CHF
+ {" "}
+ =
+
+
+
+ Gesamtpreis:
+ {formatAmount(
+ calculatorQuantity() * agileCalculator.singlePrice
+ )}{" "}
+ CHF
+
+
+
+
+ );
+};
+
+export default AgileCalculator;