Skip to content

Commit

Permalink
[MS] Added stats page
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienSvstr authored and fabienSvtr committed Aug 20, 2024
1 parent 2a8532e commit d09ae00
Show file tree
Hide file tree
Showing 6 changed files with 707 additions and 24 deletions.
19 changes: 11 additions & 8 deletions client/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,8 @@
"personalData": "My profile",
"statistics": "Statistics",
"customOrderBillingDetails": "Billing details",
"customOrderInvoices": "Invoices"
"customOrderInvoices": "Invoices",
"customOrderStatistics": "Statistics"
},
"logout": "Log out",
"preferences": "Preferences",
Expand Down Expand Up @@ -1325,12 +1326,9 @@
"revoked": "revoked",
"storage": "Used storage"
},
"admin": "Administrator",
"standard": "Standard",
"outsider": "Outsider",
"admins": "Administrators",
"standards": "Standards",
"outsiders": "Outsiders",
"admin": "Administrator | Administrators",
"standard": "Standard | Standards",
"outsider": "Outsider | Outsiders",
"consumptionDetail": "Consumption detail",
"nonPaying": "Non paying",
"paying": "charged",
Expand All @@ -1339,7 +1337,12 @@
"data": "data",
"metadata": "metadata",
"error": "Failed to retrieve organization data.",
"noStats": "No statistics to display."
"noStats": "No statistics to display.",
"used": "consumed",
"remaining": "remaining",
"almostFullUsed": "You are almost at your storage limit.",
"fullUsed": "You have reached your storage limit.",
"overUsed": "You have exceeded your contract storage quantity, please readjust."
},
"invoices": {
"title": "Preview of your invoices",
Expand Down
19 changes: 11 additions & 8 deletions client/src/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,8 @@
"personalData": "Mon profil",
"statistics": "Statistiques",
"customOrderBillingDetails": "Coordonnées de facturation",
"customOrderInvoices": "Factures"
"customOrderInvoices": "Factures",
"customOrderStatistics": "Statistiques"
},
"logout": "Se déconnecter",
"preferences": "Préférences",
Expand Down Expand Up @@ -1325,12 +1326,9 @@
"revoked": "révoqués",
"storage": "Stockage utilisé"
},
"admin": "Administrateur",
"standard": "Standard",
"outsider": "Externe",
"admins": "Administrateurs",
"standards": "Standards",
"outsiders": "Externes",
"admin": "Administrateur | Administrateurs",
"standard": "Standard | Standards",
"outsider": "Externe | Externes",
"consumptionDetail": "Détail des consommations",
"nonPaying": "Non payant",
"paying": "payant",
Expand All @@ -1339,7 +1337,12 @@
"data": "de données",
"metadata": "métadonnées",
"error": "Impossible de récupérer les données de l'organisation.",
"noStats": "Aucune statistique à afficher."
"noStats": "Aucune statistique à afficher.",
"used": "consommé",
"remaining": "restant",
"almostFullUsed": "Vous avez presque atteint votre limite de stockage.",
"fullUsed": "Vous avez consommé toute la quantité de stockage prévue dans votre contrat.",
"overUsed": "Vous avez dépassé la quantité de stockage prévue dans votre contrat, veuillez réajuster."
},
"invoices": {
"title": "Aperçu de vos factures",
Expand Down
21 changes: 15 additions & 6 deletions client/src/views/client-area/ClientAreaPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@
v-if="currentPage === ClientAreaPages.BillingDetails"
:organization="currentOrganization"
/>
<contracts-page
v-if="currentPage === ClientAreaPages.Contracts"
:organization="currentOrganization"
/>
<!-- Stripe order -->
<dashboard-page
v-if="currentPage === ClientAreaPages.Dashboard"
:organization="currentOrganization"
@switch-page-request="switchPage"
/>
<statistics-page
v-if="currentPage === ClientAreaPages.Statistics"
:organization="currentOrganization"
/>
<invoices-page
v-if="currentPage === ClientAreaPages.Invoices"
:organization="currentOrganization"
Expand All @@ -70,8 +71,13 @@
:organization="currentOrganization"
:information-manager="informationManager"
/>
<statistics-page
v-if="currentPage === ClientAreaPages.Statistics"
<!-- CustomOrder -->
<custom-order-statistics-page
v-if="currentPage === ClientAreaPages.CustomOrderStatistics"
:organization="currentOrganization"
/>
<contracts-page
v-if="currentPage === ClientAreaPages.Contracts"
:organization="currentOrganization"
/>
<custom-order-billing-details-page
Expand Down Expand Up @@ -106,6 +112,7 @@ import PersonalDataPage from '@/views/client-area/personal-data/PersonalDataPage
import StatisticsPage from '@/views/client-area/statistics/StatisticsPage.vue';
import CustomOrderInvoicesPage from '@/views/client-area/invoices/CustomOrderInvoicesPage.vue';
import CustomOrderBillingDetailsPage from '@/views/client-area/billing-details/CustomOrderBillingDetailsPage.vue';
import CustomOrderStatisticsPage from '@/views/client-area/statistics/CustomOrderStatisticsPage.vue';
import useSidebarMenu from '@/services/sidebarMenu';
import { Translatable } from 'megashark-lib';
import { ClientAreaQuery, getCurrentRouteQuery, navigateTo, Routes } from '@/router';
Expand Down Expand Up @@ -245,6 +252,8 @@ function getTitleByPage(): Translatable {
return 'clientArea.header.titles.personalData';
case ClientAreaPages.Statistics:
return 'clientArea.header.titles.statistics';
case ClientAreaPages.CustomOrderStatistics:
return 'clientArea.header.titles.customOrderStatistics';
case ClientAreaPages.CustomOrderBillingDetails:
return 'clientArea.header.titles.customOrderBillingDetails';
case ClientAreaPages.CustomOrderInvoices:
Expand Down
4 changes: 2 additions & 2 deletions client/src/views/client-area/ClientAreaSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@
button
lines="none"
class="menu-default menu-client-list-item"
:class="{ 'current-page menu-active': currentPage === ClientAreaPages.Statistics }"
@click="goToPageClicked(ClientAreaPages.Statistics)"
:class="{ 'current-page menu-active': currentPage === ClientAreaPages.CustomOrderStatistics }"
@click="goToPageClicked(ClientAreaPages.CustomOrderStatistics)"
>
<ion-icon
class="menu-client-list-item__icon"
Expand Down
Loading

0 comments on commit d09ae00

Please sign in to comment.