From b0397deba561cf29ac5c3833fe2bac99eabdcf4b Mon Sep 17 00:00:00 2001 From: Leonardo Silveira Date: Mon, 4 Sep 2023 00:01:21 -0300 Subject: [PATCH] works on RED-3 --- web-app-vue/src/pages/auth-page.vue | 2 +- web-app-vue/src/pages/categorias-page.vue | 11 ++++++++++ ...{movimentacao-page.vue => config-page.vue} | 2 +- web-app-vue/src/pages/contas-page.vue | 11 ++++++++++ web-app-vue/src/pages/movimentacoes-page.vue | 10 ++++++++++ .../src/pages/nova-movimentacao-page.vue | 11 ++++++++++ web-app-vue/src/pages/planejamento-page.vue | 11 ++++++++++ web-app-vue/src/pages/recorrencias-page.vue | 11 ++++++++++ web-app-vue/src/routes/router.js | 20 +++++++++++++++---- 9 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 web-app-vue/src/pages/categorias-page.vue rename web-app-vue/src/pages/{movimentacao-page.vue => config-page.vue} (82%) create mode 100644 web-app-vue/src/pages/contas-page.vue create mode 100644 web-app-vue/src/pages/movimentacoes-page.vue create mode 100644 web-app-vue/src/pages/nova-movimentacao-page.vue create mode 100644 web-app-vue/src/pages/planejamento-page.vue create mode 100644 web-app-vue/src/pages/recorrencias-page.vue diff --git a/web-app-vue/src/pages/auth-page.vue b/web-app-vue/src/pages/auth-page.vue index 5176044..0c8db4c 100644 --- a/web-app-vue/src/pages/auth-page.vue +++ b/web-app-vue/src/pages/auth-page.vue @@ -3,7 +3,7 @@ diff --git a/web-app-vue/src/pages/movimentacao-page.vue b/web-app-vue/src/pages/config-page.vue similarity index 82% rename from web-app-vue/src/pages/movimentacao-page.vue rename to web-app-vue/src/pages/config-page.vue index 5176044..e3ad7a1 100644 --- a/web-app-vue/src/pages/movimentacao-page.vue +++ b/web-app-vue/src/pages/config-page.vue @@ -3,7 +3,7 @@ diff --git a/web-app-vue/src/pages/movimentacoes-page.vue b/web-app-vue/src/pages/movimentacoes-page.vue new file mode 100644 index 0000000..3c7d683 --- /dev/null +++ b/web-app-vue/src/pages/movimentacoes-page.vue @@ -0,0 +1,10 @@ + + + + diff --git a/web-app-vue/src/pages/nova-movimentacao-page.vue b/web-app-vue/src/pages/nova-movimentacao-page.vue new file mode 100644 index 0000000..5cb8194 --- /dev/null +++ b/web-app-vue/src/pages/nova-movimentacao-page.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/web-app-vue/src/pages/planejamento-page.vue b/web-app-vue/src/pages/planejamento-page.vue new file mode 100644 index 0000000..14ef761 --- /dev/null +++ b/web-app-vue/src/pages/planejamento-page.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/web-app-vue/src/pages/recorrencias-page.vue b/web-app-vue/src/pages/recorrencias-page.vue new file mode 100644 index 0000000..e6c4ec1 --- /dev/null +++ b/web-app-vue/src/pages/recorrencias-page.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/web-app-vue/src/routes/router.js b/web-app-vue/src/routes/router.js index 6a36fd3..6c7de45 100644 --- a/web-app-vue/src/routes/router.js +++ b/web-app-vue/src/routes/router.js @@ -1,11 +1,23 @@ import { createRouter, createWebHashHistory } from 'vue-router' import AuthPage from '@/pages/auth-page.vue' -import MovimentacaoPage from '@/pages/movimentacao-page.vue' +import NovaMovimentacaoPage from '@/pages/nova-movimentacao-page.vue' +import CategoriasPage from '@/pages/categorias-page.vue' +import ConfigPage from '@/pages/config-page.vue' +import PlanejamentoPage from '@/pages/planejamento-page.vue' +import RecorrenciasPage from '@/pages/recorrencias-page.vue' +import ContasPage from '@/pages/contas-page.vue' +import MovimentacoesPage from '@/pages/movimentacoes-page.vue' const routes = [ + { path: '/', redirect: '/nova-movimentacao' }, { component: AuthPage, path: '/auth' }, - { component: MovimentacaoPage, path: '/movimentacao' }, - { path: '/', redirect: '/movimentacao' } + { component: CategoriasPage, path: '/categorias' }, + { component: ConfigPage, path: '/config' }, + { component: ContasPage, path: '/contas' }, + { component: MovimentacoesPage, path: '/movimentacoes' }, + { component: NovaMovimentacaoPage, path: '/nova-movimentacao' }, + { component: PlanejamentoPage, path: '/planejamento' }, + { component: RecorrenciasPage, path: '/recorrencias' } ] export const router = createRouter({ @@ -15,7 +27,7 @@ export const router = createRouter({ const isAuthenticated = false // TODO check token -router.beforeEach(async (to, from) => { +router.beforeEach(async (to) => { if (!isAuthenticated && to.path !== '/auth') { return { path: '/auth' } }