diff --git a/frontend/api/class-interfaces/groups.ts b/frontend/api/class-interfaces/groups.ts index 26446bb9636e..1bd4d872f184 100644 --- a/frontend/api/class-interfaces/groups.ts +++ b/frontend/api/class-interfaces/groups.ts @@ -1,5 +1,6 @@ import { BaseCRUDAPI } from "../_base"; import { GroupInDB, UserOut } from "~/types/api-types/user"; +import { GroupStatistics, GroupStorage } from "~/types/api-types/group"; const prefix = "/api"; @@ -11,6 +12,8 @@ const routes = { permissions: `${prefix}/groups/permissions`, preferences: `${prefix}/groups/preferences`, + statistics: `${prefix}/groups/statistics`, + storage: `${prefix}/groups/storage`, invitation: `${prefix}/groups/invitations`, @@ -103,4 +106,12 @@ export class GroupAPI extends BaseCRUDAPI { // TODO: This should probably be a patch request, which isn't offered by the API currently return await this.requests.put(routes.permissions, payload); } + + async statistics() { + return await this.requests.get(routes.statistics); + } + + async storage() { + return await this.requests.get(routes.storage); + } } diff --git a/frontend/components/global/StatsCards.vue b/frontend/components/global/StatsCards.vue new file mode 100644 index 000000000000..ca3d8589cc69 --- /dev/null +++ b/frontend/components/global/StatsCards.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/frontend/composables/recipes/use-recipes.ts b/frontend/composables/recipes/use-recipes.ts index 17931d4a28cc..a9c15d52712e 100644 --- a/frontend/composables/recipes/use-recipes.ts +++ b/frontend/composables/recipes/use-recipes.ts @@ -97,7 +97,7 @@ export const useRecipes = (all = false, fetchRecipes = true) => { })(); async function refreshRecipes() { - const { data } = await api.recipes.getAll(start, end); + const { data } = await api.recipes.getAll(start, end, { loadFood: true }); if (data) { recipes.value = data; } diff --git a/frontend/pages/user/profile/index.vue b/frontend/pages/user/profile/index.vue index ab48e9f4e3b5..e37c72ab014f 100644 --- a/frontend/pages/user/profile/index.vue +++ b/frontend/pages/user/profile/index.vue @@ -38,6 +38,51 @@ +
+
+

Account Summary

+

Here's a summary of your group's information

+
+ + + + Group Statistics + + Your Group Statistics provide some insight how you're using Mealie. + + + + + + + + + + + + Storage Capacity + + Your storage capacity is a calculation of the images and assets you have uploaded. + This feature is currently inactive + + + + + + + + + +
+

Personal

@@ -149,18 +194,21 @@