-
-
-
+
+
+
+ {{ intl.format(ppr) }}
+ Pro 1
+
+
+
+ {{ intl.format(ppr) }}
+ Pro 10
+
+
+
+ {{ intl.format(ppl) }}
+ Pro 100
+
@@ -18,4 +37,30 @@ type Props = {
}
const { uid } = defineProps
()
+
+const name = ref('')
+const price = ref(0)
+const roles = ref(0)
+const sheets = ref(0)
+const layers = ref(0)
+
+const ppr = ref(0)
+const pps = ref(0)
+const ppl = ref(0)
+
+const intl = Intl.NumberFormat('de-DE', {
+ style: 'currency',
+ currency: 'EUR',
+})
+
+const calculate = () => {
+ if (!price.value || !roles.value) return
+ ppr.value = price.value / roles.value
+
+ if (!sheets.value) return
+ pps.value = (ppr.value / sheets.value) * 10
+
+ if(!layers.value) return
+ ppl.value = (pps.value / layers.value) * 100
+}
diff --git a/app/pages/index.vue b/app/pages/index.vue
index 733b762..5c68d03 100644
--- a/app/pages/index.vue
+++ b/app/pages/index.vue
@@ -1,6 +1,13 @@
-
-
+
+
+
+
+ Vergleich hinzufügen
+
+