From dfb3b6356f241b0d1f5fe65028e638d88cf74449 Mon Sep 17 00:00:00 2001 From: Victor Klomp Date: Wed, 18 Dec 2024 19:13:46 +0100 Subject: [PATCH] feat: Wrapped (#470) * feat: SudoSOS wrapped * chore: i18n --- .../src/locales/en/common/common.json | 13 +- .../src/locales/nl/common/common.json | 14 +- apps/dashboard/src/router/index.ts | 6 + apps/dashboard/src/views/WrappedView.vue | 122 ++++++++++++++++++ 4 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 apps/dashboard/src/views/WrappedView.vue diff --git a/apps/dashboard/src/locales/en/common/common.json b/apps/dashboard/src/locales/en/common/common.json index dea59249..4632bc8d 100644 --- a/apps/dashboard/src/locales/en/common/common.json +++ b/apps/dashboard/src/locales/en/common/common.json @@ -169,7 +169,18 @@ "apiError": "Error", "errorMessage": "Something is going wrong, please open an issue on {link} describing the issue.", "permissionMessages": { - "transactions": "You are not allowed to view these transactions." + "transactions": "You are not allowed to view these transactions." + }, + "wrapped": { + "lastYear": "In the last year:", + "total": "You spent in total:", + "totalBorrel": "You spent in total at borrels:", + "depth": "But more in depth", + "totalAlc": "On alcohol (incl. 0.0) you spent:", + "totalSoda": "On soda you spent:", + "totalSnacks": "On snacks you spent:", + "fav": "Lastly your favourites were:", + "christmas": "Merry christmas and a happy new year from the ABC!" } } } diff --git a/apps/dashboard/src/locales/nl/common/common.json b/apps/dashboard/src/locales/nl/common/common.json index d4985fe8..2e2071fa 100644 --- a/apps/dashboard/src/locales/nl/common/common.json +++ b/apps/dashboard/src/locales/nl/common/common.json @@ -169,7 +169,19 @@ "apiError": "Fout", "errorMessage": "Er is iets misgegaan, open een issue op {link} en beschrijf het probleem.", "permissionMessages": { - "transactions": "Je mag deze transacties niet bekijken." + "transactions": "Je mag deze transacties niet bekijken." + }, + "wrapped": { + "lastYear": "In het afgelopen jaar:", + "total": "Heb je in total uitgegeven:", + "totalBorrel": "In totaal bij borrel heb je uitgegeven:", + "depth": "Verder uitgesplitst", + "totalAlc": "Aan alcohol (incl. 0.0) heb je uitgegeven:", + "totalSoda": "Aan fris heb je uitgegeven:", + "totalSnacks": "Aan snacks heb je uitgegeven:", + "fav": "Je absolute favorieten waren:", + "christmas": "Fijne kerst en een gelukkig nieuw jaar van de ABC!" } + } } diff --git a/apps/dashboard/src/router/index.ts b/apps/dashboard/src/router/index.ts index dc85b331..79bb51a5 100644 --- a/apps/dashboard/src/router/index.ts +++ b/apps/dashboard/src/router/index.ts @@ -11,6 +11,7 @@ import { sellerRoutes } from "@/modules/seller/routes"; import { userRoutes } from "@/modules/user/routes"; import MaintenanceView from '@/views/MaintenanceView.vue'; import { useSettingsStore } from '@/stores/settings.store'; +import WrappedView from "@/views/WrappedView.vue"; declare module 'vue-router' { interface RouteMeta { @@ -49,6 +50,11 @@ const router = createRouter({ component: ErrorView, name: 'error', }, + { + path: 'wrapped', + component: WrappedView, + name: 'wrapped', + }, ] }, { diff --git a/apps/dashboard/src/views/WrappedView.vue b/apps/dashboard/src/views/WrappedView.vue new file mode 100644 index 00000000..06cb558a --- /dev/null +++ b/apps/dashboard/src/views/WrappedView.vue @@ -0,0 +1,122 @@ + + + + + \ No newline at end of file