Skip to content

Commit

Permalink
works on RED-3
Browse files Browse the repository at this point in the history
  • Loading branch information
sombriks committed Sep 4, 2023
1 parent 7e25bdb commit b0397de
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 6 deletions.
2 changes: 1 addition & 1 deletion web-app-vue/src/pages/auth-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</script>

<template>

<h1>Auth</h1>
</template>

<style scoped>
Expand Down
11 changes: 11 additions & 0 deletions web-app-vue/src/pages/categorias-page.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script setup>
</script>

<template>
<h1>Categorias</h1>
</template>

<style scoped>
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</script>

<template>

<h1>Config</h1>
</template>

<style scoped>
Expand Down
11 changes: 11 additions & 0 deletions web-app-vue/src/pages/contas-page.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script setup>
</script>

<template>
<h1>Contas</h1>
</template>

<style scoped>
</style>
10 changes: 10 additions & 0 deletions web-app-vue/src/pages/movimentacoes-page.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup>
</script>

<template>
<h1>Movimentações</h1>
</template>
<style scoped>
</style>
11 changes: 11 additions & 0 deletions web-app-vue/src/pages/nova-movimentacao-page.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script setup>
</script>

<template>
<h1>Nova movimentação</h1>
</template>

<style scoped>
</style>
11 changes: 11 additions & 0 deletions web-app-vue/src/pages/planejamento-page.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script setup>
</script>

<template>
<h1>Planejamento</h1>
</template>

<style scoped>
</style>
11 changes: 11 additions & 0 deletions web-app-vue/src/pages/recorrencias-page.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script setup>
</script>

<template>
<h1>Recorrências</h1>
</template>

<style scoped>
</style>
20 changes: 16 additions & 4 deletions web-app-vue/src/routes/router.js
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -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' }
}
Expand Down

0 comments on commit b0397de

Please sign in to comment.