From 5736483476697b3505283d2ff4b8a564092dcf48 Mon Sep 17 00:00:00 2001 From: Cioraneanu Mihai Date: Sat, 21 Sep 2024 23:48:29 +0300 Subject: [PATCH] - route constant fixes --- front/app.vue | 2 +- .../dashboard-budgets/dashboard-budgets.vue | 7 +- front/constants/RouteConstants.js | 13 +--- front/pages/dashboard.vue | 2 +- front/pages/settings/dashboard/cards.vue | 75 +++++++++++++++++++ .../{dashboard.vue => dashboard/index.vue} | 12 +-- front/pages/transactions/[[id]].vue | 4 +- front/plugins/axios.js | 1 - 8 files changed, 93 insertions(+), 23 deletions(-) create mode 100644 front/pages/settings/dashboard/cards.vue rename front/pages/settings/{dashboard.vue => dashboard/index.vue} (87%) diff --git a/front/app.vue b/front/app.vue index ddccba8..b3e9747 100644 --- a/front/app.vue +++ b/front/app.vue @@ -23,7 +23,7 @@ const theme = computed(() => (profileStore.darkTheme ? 'dark' : 'white')) onMounted(async () => { if (!appStore.authToken) { - navigateTo(`${RouteConstants.ROUTE_SETTINGS_APP_CONFIG}`) + navigateTo(`${RouteConstants.ROUTE_SETTINGS_SETUP}`) return } diff --git a/front/components/dashboard/dashboard-budgets/dashboard-budgets.vue b/front/components/dashboard/dashboard-budgets/dashboard-budgets.vue index 49a4a3e..441dc84 100644 --- a/front/components/dashboard/dashboard-budgets/dashboard-budgets.vue +++ b/front/components/dashboard/dashboard-budgets/dashboard-budgets.vue @@ -6,9 +6,13 @@ - + + +
+ No budgets ^_^ +
@@ -20,4 +24,5 @@ import DashboardBudgetItem from '~/components/dashboard/dashboard-budgets/dashbo const dataStore = useDataStore() const budgetList = dataStore.budgetList +const hasBudgets = computed(() => budgetList.length > 0) diff --git a/front/constants/RouteConstants.js b/front/constants/RouteConstants.js index abe45a4..26ae186 100644 --- a/front/constants/RouteConstants.js +++ b/front/constants/RouteConstants.js @@ -6,22 +6,13 @@ export default { ROUTE_EXTRAS: '/extras', ROUTE_DASHBOARD: '/dashboard', - ROUTE_SETTINGS: '/settings', - ROUTE_SETTINGS_APP_CONFIG: '/settings/app-config', - ROUTE_SETTINGS_USER_PREFERENCES_DATE: '/settings/user-preferences-date', - ROUTE_SETTINGS_USER_PREFERENCES_TRANSACTIONS: '/settings/user-preferences-transactions', - ROUTE_SETTINGS_USER_PREFERENCES_QUICK_AMOUNTS: '/settings/user-preferences-quick-transaction-amounts', - ROUTE_SETTINGS_USER_PREFERENCES_TRANSACTION_FIELDS_ORDER: '/settings/user-preferences-transaction-fields-order', - ROUTE_SETTINGS_USER_PREFERENCES_DASHBOARD_CARDS_ORDER: '/settings/user-preferences-dashboard-cards-order', - ROUTE_SETTINGS_NEW_TRANSACTION_DEFAULTS: '/settings/user-preferences-new-transaction-defaults', - ROUTE_SETTINGS_USER_PREFERENCES_UI: '/settings/user-preferences-ui', - ROUTE_SETTINGS_USER_PREFERENCES_DASHBOARD: '/settings/user-preferences-dashboard', - + ROUTE_SETTINGS: '/settings', ROUTE_SETTINGS_SETUP: '/settings/setup', ROUTE_SETTINGS_UI: '/settings/ui', ROUTE_SETTINGS_FORMATTING: '/settings/formatting', ROUTE_SETTINGS_DASHBOARD: '/settings/dashboard', + ROUTE_SETTINGS_DASHBOARD_CARDS_ORDER: '/settings/dashboard/cards', ROUTE_SETTINGS_TRANSACTION: '/settings/transactions', ROUTE_SETTINGS_TRANSACTION_FIELDS_ORDER: '/settings/transactions/fields', ROUTE_SETTINGS_TRANSACTION_DEFAULT_VALUES: '/settings/transactions/defaults', diff --git a/front/pages/dashboard.vue b/front/pages/dashboard.vue index e4dd4ee..3436f8e 100644 --- a/front/pages/dashboard.vue +++ b/front/pages/dashboard.vue @@ -22,7 +22,7 @@ - + diff --git a/front/pages/settings/dashboard/cards.vue b/front/pages/settings/dashboard/cards.vue new file mode 100644 index 0000000..deab8fc --- /dev/null +++ b/front/pages/settings/dashboard/cards.vue @@ -0,0 +1,75 @@ + + + \ No newline at end of file diff --git a/front/pages/settings/dashboard.vue b/front/pages/settings/dashboard/index.vue similarity index 87% rename from front/pages/settings/dashboard.vue rename to front/pages/settings/dashboard/index.vue index 43bb114..e0c865b 100644 --- a/front/pages/settings/dashboard.vue +++ b/front/pages/settings/dashboard/index.vue @@ -28,11 +28,11 @@