login/registration/reset pages

This commit is contained in:
2025-06-13 15:58:43 +02:00
parent 92511dbfb5
commit c7479b1aa6
16 changed files with 443 additions and 371 deletions

View File

@ -11,6 +11,7 @@ export const useStore = defineStore("store", () => {
const monthlySavings = ref(137);
const storagePeriod = ref(10);
const totalInvestment = ref()
const minValue = ref()
const components = ref({} as PBPageItem[]);
const getSections = async (id: string) => {
@ -87,7 +88,31 @@ export const useStore = defineStore("store", () => {
}
}
async function getMinValue() {
try {
const res = await fetch(
'http://127.0.0.1:4000/api/public/plan-prediction/free/minimum',
{
headers: {
"Content-Type": "application/json",
},
}
);
if (!res.ok) {
throw new Error(`HTTP error: ${res.status}`);
}
const data = await res.json();
minValue.value = data.data
} catch (error) {
console.error("getList error:", error);
}
}
getCalculator()
getMinValue()
return {
currentPageID,
@ -95,6 +120,7 @@ export const useStore = defineStore("store", () => {
totalInvestment,
monthlySavings,
storagePeriod,
minValue,
getCalculator,
getComponents,
getSections,