-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from sombriks/develop
test elease
- Loading branch information
Showing
9 changed files
with
275 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<template> | ||
<v-container fluid> | ||
<v-row align="center"> | ||
<v-form v-model="valid"> | ||
<div class="column"> | ||
<conta-autocomplete | ||
class="item" | ||
label="Conta de origem" | ||
v-model="formPagamento.contaOrigem" | ||
:rules="[requiredRule]" | ||
/> | ||
<conta-autocomplete | ||
class="item" | ||
label="Conta de destino" | ||
v-model="formPagamento.contaDestino" | ||
:rules="[requiredRule]" | ||
/> | ||
<chip-date | ||
class="item" | ||
label="Data pagamento" | ||
v-model="formPagamento.vencimento" | ||
/> | ||
<chip-periodo | ||
label="Período" | ||
v-model:inicial="formPagamento.inicial" | ||
v-model:final="formPagamento.final" | ||
></chip-periodo> | ||
<v-divider /> | ||
<p>valor total das movimentações do período</p> | ||
<!-- movimentações do período --> | ||
<v-divider /> | ||
<div class="item row"> | ||
<v-btn | ||
variant="outlined" | ||
class="ma-2" | ||
color="green" | ||
type="submit" | ||
icon="mdi-check" | ||
></v-btn> | ||
<v-spacer></v-spacer> | ||
<v-btn | ||
variant="outlined" | ||
color="orange" | ||
class="ma-2" | ||
type="button" | ||
@click="router.push('/historico')" | ||
icon="mdi-close" | ||
></v-btn> | ||
</div> | ||
</div> | ||
</v-form> | ||
</v-row> | ||
</v-container> | ||
<div> | ||
<h1>Pagamento</h1> | ||
<ol> | ||
<li>selecionar uma conta de origem</li> | ||
<li>selecionar uma conta de destino</li> | ||
<li>definir um período</li> | ||
<li>marcar as movimentações do período para pagamento; calcular o valor</li> | ||
<li>salvar o movimento de origem</li> | ||
<li>salvar o movimento de destino</li> | ||
<li>atualizar as movimentações- marcar como pagas</li> | ||
</ol> | ||
</div> | ||
</template> | ||
<script setup> | ||
import { reactive, ref } from 'vue' | ||
import { requiredRule } from '@/services/basic-rules' | ||
import ContaAutocomplete from '@/shared/conta-autocomplete.vue' | ||
import ChipPeriodo from '@/shared/chip-periodo.vue' | ||
import { endOfMonth, startOfMonth } from 'date-fns' | ||
import ChipDate from '@/shared/chip-date.vue' | ||
import { router } from '@/services/router' | ||
const valid = ref(false) | ||
const formPagamento = reactive({ | ||
contaOrigem: 0, | ||
contaDestino: 0, | ||
valor: 0, | ||
vencimento: new Date(), | ||
inicial: startOfMonth(new Date()), | ||
final: endOfMonth(new Date()) | ||
}) | ||
</script> | ||
<style scoped> | ||
.column { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.item { | ||
margin: 5px; | ||
} | ||
.row { | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<template> | ||
<v-container fluid> | ||
<v-card | ||
elevation="24" | ||
min-width="320" | ||
> | ||
<v-card-text> | ||
<v-radio-group inline label="Operação" v-model="operacao"> | ||
<v-radio label="Pagamento" value="pagamento"></v-radio> | ||
<v-radio label="Transferência" value="transferencia"></v-radio> | ||
</v-radio-group> | ||
<pagamento-form v-if="operacao === 'pagamento'"></pagamento-form> | ||
<transferencia-form v-if="operacao === 'transferencia'"></transferencia-form> | ||
|
||
</v-card-text> | ||
</v-card> | ||
|
||
</v-container> | ||
|
||
<!-- <div>--> | ||
<!-- <h1>Pagamento</h1>--> | ||
<!-- <ol>--> | ||
<!-- <li>selecionar uma conta de origem</li>--> | ||
<!-- <li>selecionar uma conta de destino</li>--> | ||
<!-- <li>definir um período</li>--> | ||
<!-- <li>marcar as contas do período para pagamento</li>--> | ||
<!-- </ol>--> | ||
<!-- </div>--> | ||
</template> | ||
<script setup> | ||
import { onMounted, ref } from 'vue' | ||
import PagamentoForm from '@/pages/pagamento/pagamento-form.vue' | ||
import TransferenciaForm from '@/pages/pagamento/transferencia-form.vue' | ||
import { useMovimentacaoStore } from '@/stores/movimentacaoStore' | ||
import { useCategoriaStore } from '@/stores/categoriaStore' | ||
import { useContaStore } from '@/stores/contaStore' | ||
const movimentacaoStore = useMovimentacaoStore() | ||
const categoriaStore = useCategoriaStore() | ||
const contaStore = useContaStore() | ||
const operacao = ref("") | ||
onMounted(async () => { | ||
await Promise.all([ | ||
contaStore.sincronizarContas(), | ||
categoriaStore.sincronizarCategorias(), | ||
movimentacaoStore.sincronizarMovimentacoes() | ||
]) | ||
}) | ||
</script> | ||
<style scoped> | ||
</style> |
Oops, something went wrong.