Skip to content

Commit 3778c74

Browse files
committed
works on REDLINE-17
1 parent 301a766 commit 3778c74

File tree

5 files changed

+53
-4
lines changed

5 files changed

+53
-4
lines changed

docs/ROADMAP.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,13 @@ general notes
4646

4747
- multi tenant
4848
- rest api with hierarchical paths
49-
-
49+
50+
## design insights
51+
52+
- liquids
53+
- water levels
54+
- cards
55+
- deck
56+
- pills
57+
- controls
58+
- charts

web-app-vue/src/App.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import CardOption from "@/components/CardOption.vue";
33
import CardLogin from "@/components/usuario/card-login.vue";
44
import NovaMovimentacao from "@/components/movimentacao/nova-movimentacao.vue";
5+
import ListaMovimentacoes from "@/components/movimentacao/lista-movimentacoes.vue";
56
import ListaCategorias from "@/components/categoria/lista-categorias.vue";
67
import ListaPlanejamentos from "@/components/planejamento/lista-planejamentos.vue";
78
import NovaCarteira from "@/components/conta/nova-conta.vue";
@@ -29,6 +30,7 @@ const uState = useUserStore();
2930
:active="cState.store.activeCard.movimentacao"
3031
@onActive="e => cState.toggleCard('movimentacao', e)">
3132
<nova-movimentacao></nova-movimentacao>
33+
<lista-movimentacoes></lista-movimentacoes>
3234
</card-option>
3335
<card-option v-if="uState.store.token"
3436
:title="'Carteiras e contas'"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template>
2+
<ul>
3+
<li></li>
4+
</ul>
5+
</template>
6+
<script setup>
7+
import { useMovimentacaoStore } from '@/stores/movimentacaoStore'
8+
import { onMounted } from 'vue'
9+
10+
const mState = useMovimentacaoStore()
11+
12+
onMounted(() => {
13+
mState.sincronizarMovimentacoes()
14+
})
15+
</script>
16+
<style scoped></style>
Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
<template>
2-
<div>nova movimentação</div>
2+
<form @submit.stop.prevent="salvarMovimentacao()">
3+
<select v-model="novaMovimentacao.tipo">
4+
<option>Selecione uma conta</option>
5+
<option v-for="tipo in mState.store.tiposMovimentacao" :key="tipo.id" :value="tipo">
6+
{{ tipo.descricao }}
7+
</option>
8+
</select>
9+
<input placeholder="valor" />
10+
<button type="submit">salvar</button>
11+
</form>
312
</template>
4-
<script setup></script>
13+
<script setup>
14+
import { useMovimentacaoStore } from '@/stores/movimentacaoStore'
15+
import { reactive } from 'vue'
16+
17+
const mState = useMovimentacaoStore()
18+
19+
const novaMovimentacao = reactive({
20+
tipo: { id: 2, descricao: 'SAIDA' }
21+
})
22+
23+
const salvarMovimentacao = async () => {}
24+
</script>
525
<style scoped></style>

web-app-vue/src/stores/movimentacaoStore.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
22
import { useUserStore } from '@/stores/userStore'
33
import { reactive } from 'vue'
44
import { getRedLine, setRedLine } from '@/services/redLine'
5-
import { lisTiposMovimentacao } from "@/services/api";
5+
import { lisTiposMovimentacao, listMovimentacoes } from '@/services/api'
66

77
export const useMovimentacaoStore = defineStore('movimentacao-store', () => {
88
const uState = useUserStore()
@@ -19,7 +19,9 @@ export const useMovimentacaoStore = defineStore('movimentacao-store', () => {
1919

2020
const sincronizarMovimentacoes = async () => {
2121
const redLine = getRedLine()
22+
const { id } = uState.userData
2223
store.tiposMovimentacao = await lisTiposMovimentacao()
24+
store.movimentacoes = await listMovimentacoes({ id })
2325
setRedLine({
2426
...redLine,
2527
tiposMovimentacao: store.tiposMovimentacao,

0 commit comments

Comments
 (0)