-
-
- {$t("monthly_fee")}:
- {selectedSubscriptionModel?.monthly_fee || "-"}
-
-
- {$t("hourly_rate")}:
- {selectedSubscriptionModel?.hourly_rate || "-"}
-
- {#if selectedSubscriptionModel?.included_hours_per_year}
+
+
+
+
+
- {$t("included_hours_per_year")}:
- {selectedSubscriptionModel?.included_hours_per_year}
+ {$t("monthly_fee")}:
+ {selectedSubscriptionModel?.monthly_fee || "-"}
- {/if}
- {#if selectedSubscriptionModel?.included_hours_per_month}
- {$t("included_hours_per_month")}:
- {selectedSubscriptionModel?.included_hours_per_month}
+ {$t("hourly_rate")}:
+ {selectedSubscriptionModel?.hourly_rate || "-"}
- {/if}
-
-
-
- {$t("details")}:
- {selectedSubscriptionModel?.details || "-"}
-
- {#if selectedSubscriptionModel?.conditions}
-
- {$t("conditions")}:
- {selectedSubscriptionModel?.conditions}
-
- {/if}
+ {#if selectedSubscriptionModel?.included_hours_per_year}
+
+ {$t("included_hours_per_year")}:
+ {selectedSubscriptionModel?.included_hours_per_year}
+
+ {/if}
+ {#if selectedSubscriptionModel?.included_hours_per_month}
+
+ {$t("included_hours_per_month")}:
+ {selectedSubscriptionModel?.included_hours_per_month}
+
+ {/if}
+
+
+
+ {$t("details")}:
+ {selectedSubscriptionModel?.details || "-"}
+
+ {#if selectedSubscriptionModel?.conditions}
+
+ {$t("conditions")}:
+ {selectedSubscriptionModel?.conditions}
+
+ {/if}
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- {#if isUpdating}
-
- {:else}
-
-
- {/if}
-
-
+
+
+
+
+
+
+
+
+
+ {#if isUpdating}
+
+ {:else}
+
+
+ {/if}
+
+
+{/if}
diff --git a/frontend/src/routes/auth/admin/users/old+page.svelte b/frontend/src/routes/auth/admin/users/old+page.svelte
new file mode 100644
index 0000000..684c110
--- /dev/null
+++ b/frontend/src/routes/auth/admin/users/old+page.svelte
@@ -0,0 +1,94 @@
+
+
+
+
+
+
{$t("user.management")}
+
+
+
+
+
+
+ | {$t("user.id")} |
+ {$t("name")} |
+ {$t("email")} |
+ {$t("status")} |
+ {$t("actions")} |
+
+
+
+ {#each users as user}
+
+ | {user.id} |
+ {user.first_name} {user.last_name} |
+ {user.email} |
+ {$t("userStatus." + user.status)} |
+
+
+
+ |
+
{/each}
+
+
+
+
+
+ {#if showModal}
+
+
+
+ {/if}
+
+
+
diff --git a/frontend/src/routes/auth/login/+page.server.js b/frontend/src/routes/auth/login/+page.server.js
index d33d1ef..dedda1d 100644
--- a/frontend/src/routes/auth/login/+page.server.js
+++ b/frontend/src/routes/auth/login/+page.server.js
@@ -5,7 +5,9 @@ import { fail, redirect } from "@sveltejs/kit";
/** @type {import('./$types').PageServerLoad} */
export async function load({ locals }) {
// redirect user if logged in
+ console.log("loading login page");
if (locals.user) {
+ console.log("user is logged in");
throw redirect(302, "/");
}
}
@@ -20,11 +22,11 @@ export const actions = {
* @returns Error data or redirects user to the home page or the previous page
*/
login: async ({ request, fetch, cookies }) => {
+ console.log("login action called");
const data = await request.formData();
const email = String(data.get("email"));
const password = String(data.get("password"));
const next = String(data.get("next"));
-
/** @type {RequestInit} */
const requestInitOptions = {
method: "POST",
@@ -37,9 +39,7 @@ export const actions = {
password: password,
}),
};
-
- const res = await fetch(`${BASE_API_URI}/users/login/`, requestInitOptions);
-
+ const res = await fetch(`${BASE_API_URI}/users/login`, requestInitOptions);
console.log("Login response status:", res.status);
console.log("Login response headers:", Object.fromEntries(res.headers));
diff --git a/frontend/src/routes/auth/login/+page.svelte b/frontend/src/routes/auth/login/+page.svelte
index 2507679..211bdcb 100644
--- a/frontend/src/routes/auth/login/+page.svelte
+++ b/frontend/src/routes/auth/login/+page.svelte
@@ -32,8 +32,8 @@
{#each form?.errors as error (error.id)}
{$t(error.key)}
diff --git a/frontend/src/static/css/bootstrap-grid.css b/frontend/src/static/css/bootstrapv5/bootstrap-grid.css
similarity index 100%
rename from frontend/src/static/css/bootstrap-grid.css
rename to frontend/src/static/css/bootstrapv5/bootstrap-grid.css
diff --git a/frontend/src/static/css/bootstrap-grid.css.map b/frontend/src/static/css/bootstrapv5/bootstrap-grid.css.map
similarity index 100%
rename from frontend/src/static/css/bootstrap-grid.css.map
rename to frontend/src/static/css/bootstrapv5/bootstrap-grid.css.map
diff --git a/frontend/src/static/css/bootstrap-grid.min.css b/frontend/src/static/css/bootstrapv5/bootstrap-grid.min.css
similarity index 100%
rename from frontend/src/static/css/bootstrap-grid.min.css
rename to frontend/src/static/css/bootstrapv5/bootstrap-grid.min.css
diff --git a/frontend/src/static/css/bootstrap-grid.min.css.map b/frontend/src/static/css/bootstrapv5/bootstrap-grid.min.css.map
similarity index 100%
rename from frontend/src/static/css/bootstrap-grid.min.css.map
rename to frontend/src/static/css/bootstrapv5/bootstrap-grid.min.css.map
diff --git a/frontend/src/static/css/bootstrap-reboot.css b/frontend/src/static/css/bootstrapv5/bootstrap-reboot.css
similarity index 100%
rename from frontend/src/static/css/bootstrap-reboot.css
rename to frontend/src/static/css/bootstrapv5/bootstrap-reboot.css
diff --git a/frontend/src/static/css/bootstrap-reboot.css.map b/frontend/src/static/css/bootstrapv5/bootstrap-reboot.css.map
similarity index 100%
rename from frontend/src/static/css/bootstrap-reboot.css.map
rename to frontend/src/static/css/bootstrapv5/bootstrap-reboot.css.map
diff --git a/frontend/src/static/css/bootstrap-reboot.min.css b/frontend/src/static/css/bootstrapv5/bootstrap-reboot.min.css
similarity index 100%
rename from frontend/src/static/css/bootstrap-reboot.min.css
rename to frontend/src/static/css/bootstrapv5/bootstrap-reboot.min.css
diff --git a/frontend/src/static/css/bootstrap-reboot.min.css.map b/frontend/src/static/css/bootstrapv5/bootstrap-reboot.min.css.map
similarity index 100%
rename from frontend/src/static/css/bootstrap-reboot.min.css.map
rename to frontend/src/static/css/bootstrapv5/bootstrap-reboot.min.css.map
diff --git a/frontend/src/static/css/bootstrap-utilities.css b/frontend/src/static/css/bootstrapv5/bootstrap-utilities.css
similarity index 100%
rename from frontend/src/static/css/bootstrap-utilities.css
rename to frontend/src/static/css/bootstrapv5/bootstrap-utilities.css
diff --git a/frontend/src/static/css/bootstrap-utilities.css.map b/frontend/src/static/css/bootstrapv5/bootstrap-utilities.css.map
similarity index 100%
rename from frontend/src/static/css/bootstrap-utilities.css.map
rename to frontend/src/static/css/bootstrapv5/bootstrap-utilities.css.map
diff --git a/frontend/src/static/css/bootstrap-utilities.min.css b/frontend/src/static/css/bootstrapv5/bootstrap-utilities.min.css
similarity index 100%
rename from frontend/src/static/css/bootstrap-utilities.min.css
rename to frontend/src/static/css/bootstrapv5/bootstrap-utilities.min.css
diff --git a/frontend/src/static/css/bootstrap-utilities.min.css.map b/frontend/src/static/css/bootstrapv5/bootstrap-utilities.min.css.map
similarity index 100%
rename from frontend/src/static/css/bootstrap-utilities.min.css.map
rename to frontend/src/static/css/bootstrapv5/bootstrap-utilities.min.css.map
diff --git a/frontend/src/static/css/bootstrap.css b/frontend/src/static/css/bootstrapv5/bootstrap.css
similarity index 100%
rename from frontend/src/static/css/bootstrap.css
rename to frontend/src/static/css/bootstrapv5/bootstrap.css
diff --git a/frontend/src/static/css/bootstrap.css.map b/frontend/src/static/css/bootstrapv5/bootstrap.css.map
similarity index 100%
rename from frontend/src/static/css/bootstrap.css.map
rename to frontend/src/static/css/bootstrapv5/bootstrap.css.map
diff --git a/frontend/src/static/css/bootstrap.min.css b/frontend/src/static/css/bootstrapv5/bootstrap.min.css
similarity index 100%
rename from frontend/src/static/css/bootstrap.min.css
rename to frontend/src/static/css/bootstrapv5/bootstrap.min.css
diff --git a/frontend/src/static/css/bootstrap.min.css.map b/frontend/src/static/css/bootstrapv5/bootstrap.min.css.map
similarity index 100%
rename from frontend/src/static/css/bootstrap.min.css.map
rename to frontend/src/static/css/bootstrapv5/bootstrap.min.css.map
diff --git a/frontend/src/static/js/bootstrap.bundle.js b/frontend/src/static/js/bootstrapv5/bootstrap.bundle.js
similarity index 100%
rename from frontend/src/static/js/bootstrap.bundle.js
rename to frontend/src/static/js/bootstrapv5/bootstrap.bundle.js
diff --git a/frontend/src/static/js/bootstrap.bundle.js.map b/frontend/src/static/js/bootstrapv5/bootstrap.bundle.js.map
similarity index 100%
rename from frontend/src/static/js/bootstrap.bundle.js.map
rename to frontend/src/static/js/bootstrapv5/bootstrap.bundle.js.map
diff --git a/frontend/src/static/js/bootstrap.bundle.min.js b/frontend/src/static/js/bootstrapv5/bootstrap.bundle.min.js
similarity index 100%
rename from frontend/src/static/js/bootstrap.bundle.min.js
rename to frontend/src/static/js/bootstrapv5/bootstrap.bundle.min.js
diff --git a/frontend/src/static/js/bootstrap.bundle.min.js.map b/frontend/src/static/js/bootstrapv5/bootstrap.bundle.min.js.map
similarity index 100%
rename from frontend/src/static/js/bootstrap.bundle.min.js.map
rename to frontend/src/static/js/bootstrapv5/bootstrap.bundle.min.js.map
diff --git a/frontend/src/static/js/bootstrap.esm.js b/frontend/src/static/js/bootstrapv5/bootstrap.esm.js
similarity index 100%
rename from frontend/src/static/js/bootstrap.esm.js
rename to frontend/src/static/js/bootstrapv5/bootstrap.esm.js
diff --git a/frontend/src/static/js/bootstrap.esm.js.map b/frontend/src/static/js/bootstrapv5/bootstrap.esm.js.map
similarity index 100%
rename from frontend/src/static/js/bootstrap.esm.js.map
rename to frontend/src/static/js/bootstrapv5/bootstrap.esm.js.map
diff --git a/frontend/src/static/js/bootstrap.esm.min.js b/frontend/src/static/js/bootstrapv5/bootstrap.esm.min.js
similarity index 100%
rename from frontend/src/static/js/bootstrap.esm.min.js
rename to frontend/src/static/js/bootstrapv5/bootstrap.esm.min.js
diff --git a/frontend/src/static/js/bootstrap.esm.min.js.map b/frontend/src/static/js/bootstrapv5/bootstrap.esm.min.js.map
similarity index 100%
rename from frontend/src/static/js/bootstrap.esm.min.js.map
rename to frontend/src/static/js/bootstrapv5/bootstrap.esm.min.js.map
diff --git a/frontend/src/static/js/bootstrap.js b/frontend/src/static/js/bootstrapv5/bootstrap.js
similarity index 100%
rename from frontend/src/static/js/bootstrap.js
rename to frontend/src/static/js/bootstrapv5/bootstrap.js
diff --git a/frontend/src/static/js/bootstrap.js.map b/frontend/src/static/js/bootstrapv5/bootstrap.js.map
similarity index 100%
rename from frontend/src/static/js/bootstrap.js.map
rename to frontend/src/static/js/bootstrapv5/bootstrap.js.map
diff --git a/frontend/src/static/js/bootstrap.min.js b/frontend/src/static/js/bootstrapv5/bootstrap.min.js
similarity index 100%
rename from frontend/src/static/js/bootstrap.min.js
rename to frontend/src/static/js/bootstrapv5/bootstrap.min.js
diff --git a/frontend/src/static/js/bootstrap.min.js.map b/frontend/src/static/js/bootstrapv5/bootstrap.min.js.map
similarity index 100%
rename from frontend/src/static/js/bootstrap.min.js.map
rename to frontend/src/static/js/bootstrapv5/bootstrap.min.js.map
diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js
index 54af965..bb648c9 100644
--- a/frontend/svelte.config.js
+++ b/frontend/svelte.config.js
@@ -1,16 +1,17 @@
+import { sveltePreprocess } from "svelte-preprocess";
// import adapter from '@sveltejs/adapter-auto';
-import adapter from '@sveltejs/adapter-vercel';
+import adapter from "@sveltejs/adapter-vercel";
/** @type {import('@sveltejs/kit').Config} */
const config = {
- kit: {
- // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
- // If your environment is not supported or you settled on a specific environment, switch out the adapter.
- // See https://kit.svelte.dev/docs/adapters for more information about adapters.
- adapter: adapter({
- runtime: 'edge'
- })
- }
+ kit: {
+ // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
+ // If your environment is not supported or you settled on a specific environment, switch out the adapter.
+ // See https://kit.svelte.dev/docs/adapters for more information about adapters.
+ adapter: adapter({
+ runtime: "edge",
+ }),
+ },
};
export default config;