interface Props {
modelValue?: string;
+ type: "text" | "search" | "date";
title?: string;
error?: string;
- placeholder: string;
+ placeholder?: string;
size?: "xs" | "sm" | "md" | "lg";
color?:
| "primary"
diff --git a/components/NavBar/NavBar.vue b/components/NavBar/NavBar.vue
index 2a3d04f..67d4b74 100644
--- a/components/NavBar/NavBar.vue
+++ b/components/NavBar/NavBar.vue
@@ -59,28 +59,32 @@ const menuItems: MenuItem[] = [
},
],
},
- { name: "Foto's", icon: "material-symbols:camera", target: "/foto" },
+ {
+ name: "Foto's",
+ icon: "material-symbols:camera",
+ target: "https://proteus-eretes.nl/fotos",
+ },
{
name: "Leden",
icon: "material-symbols:person",
- target: "/lid",
+ target: "/leden",
children: [
{
name: "Groepen",
icon: "material-symbols:group",
- target: "/groups",
+ target: "/groepen",
},
{
name: "Lebberlijst",
icon: "ph:graph",
- target: "/lebberlijst",
+ target: "https://proteus-eretes.nl/lebberlijst",
},
],
},
{
name: "Evenementen",
icon: "material-symbols:calendar-today",
- target: "/event",
+ target: "https://proteus-eretes.nl/eetlijst",
},
];
diff --git a/components/NavBar/ProfileDropdown.vue b/components/NavBar/ProfileDropdown.vue
index 1bee6cb..7ddd978 100644
--- a/components/NavBar/ProfileDropdown.vue
+++ b/components/NavBar/ProfileDropdown.vue
@@ -14,7 +14,18 @@
class="menu menu-compact dropdown-content mt-3 p-2 shadow bg-base-100 rounded-box w-52"
>
- Profiel
+
+ Profiel
+
+
+
+ Lidmaatschappen
+
+
+
+
+ Instellingen
signOut()">Log uit
diff --git a/components/NavBar/Search.vue b/components/NavBar/Search.vue
index 60e9077..ba05518 100644
--- a/components/NavBar/Search.vue
+++ b/components/NavBar/Search.vue
@@ -1,8 +1,8 @@
-
+
-
diff --git a/components/Page/Material/TypesCreate.vue b/components/Page/Material/TypesCreate.vue
index f291d1b..e047365 100644
--- a/components/Page/Material/TypesCreate.vue
+++ b/components/Page/Material/TypesCreate.vue
@@ -4,6 +4,7 @@
-
+
@@ -19,7 +36,20 @@
diff --git a/composables/useBreadcrumbs.ts b/composables/useBreadcrumbs.ts
new file mode 100644
index 0000000..7c24536
--- /dev/null
+++ b/composables/useBreadcrumbs.ts
@@ -0,0 +1,59 @@
+import { Group, Member } from "~/server/types";
+
+export const useBreadcrumbs = () => {
+ const route = computed(() => useRoute().path.slice(1).split("/"));
+
+ const breadCrumbs = computed(() => {
+ const crumbs = [];
+ let link = "";
+
+ for (const crumb of route.value) {
+ crumbs.push({
+ name: formatCrumb(crumb),
+ link: (link = link + "/" + crumb),
+ });
+ }
+ return crumbs;
+ });
+
+ const groupCrumbs = (group: Group) =>
+ computed(() => {
+ const crumbs = [];
+ let link = "";
+
+ for (const crumb of route.value) {
+ link = link + "/" + crumb;
+ const name = crumb === group.id ? group.name : formatCrumb(crumb);
+ crumbs.push({ name, link });
+ }
+ return crumbs;
+ });
+
+ const memberCrumbs = (member: Member) =>
+ computed(() => {
+ const crumbs = [];
+ let link = "";
+
+ for (const crumb of route.value) {
+ link = link + "/" + crumb;
+ const name =
+ crumb === member.id
+ ? `${member.firstName} ${member.insertion} ${member.lastName}`
+ : formatCrumb(crumb);
+ crumbs.push({ name, link });
+ }
+ return crumbs;
+ });
+
+ return {
+ breadCrumbs,
+ memberCrumbs,
+ groupCrumbs,
+ };
+};
+
+const formatCrumb = (crumb: string) => {
+ let parts = crumb.split("-");
+ parts = parts.map((p) => p.charAt(0).toUpperCase() + p.slice(1));
+ return parts.join(" ");
+};
diff --git a/composables/useDateFormatter.ts b/composables/useDateFormatter.ts
new file mode 100644
index 0000000..31685c6
--- /dev/null
+++ b/composables/useDateFormatter.ts
@@ -0,0 +1,31 @@
+export const useDateFormatter = () => {
+ const dateToString = (date?: Date) =>
+ computed