tags and new analytics new in budget
This commit is contained in:
@@ -30,7 +30,7 @@ const budget = ref(new Budget())
|
|||||||
const create = async () => {
|
const create = async () => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await createBudget(budget.value)
|
await createBudget(budget.value, createRecurrentPayments.value)
|
||||||
.then((res) => budget.value = res)
|
.then((res) => budget.value = res)
|
||||||
.catch((err) => console.log(err));
|
.catch((err) => console.log(err));
|
||||||
emits("budget-created", budget.value, createRecurrentPayments.value);
|
emits("budget-created", budget.value, createRecurrentPayments.value);
|
||||||
@@ -115,10 +115,10 @@ onMounted(() => {
|
|||||||
<DatePicker v-model="budget.dateTo" id="dateTo" dateFormat="dd.mm.yy"/>
|
<DatePicker v-model="budget.dateTo" id="dateTo" dateFormat="dd.mm.yy"/>
|
||||||
</FloatLabel>
|
</FloatLabel>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="flex flex-row items-center min-w-fit gap-4">-->
|
<div class="flex flex-row items-center min-w-fit gap-4">
|
||||||
<!-- <Checkbox v-model="createRecurrentPayments" binary/>-->
|
<Checkbox v-model="createRecurrentPayments" binary/>
|
||||||
<!-- Создать ежемесячные платежи?-->
|
Создать ежемесячные платежи?
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<div v-if="categories.length ==0" class="text-red-500 font-bold">Сперва лучше создать категории</div>
|
<div v-if="categories.length ==0" class="text-red-500 font-bold">Сперва лучше создать категории</div>
|
||||||
<div class="flex flex-row gap-2 justify-end items-center">
|
<div class="flex flex-row gap-2 justify-end items-center">
|
||||||
<Button label="Создать" severity="success" icon="pi pi-save" @click="create"/>
|
<Button label="Создать" severity="success" icon="pi pi-save" @click="create"/>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import Button from "primevue/button";
|
|||||||
import {EventBus} from '@/utils/EventBus.ts';
|
import {EventBus} from '@/utils/EventBus.ts';
|
||||||
import {useSpaceStore} from "@/stores/spaceStore";
|
import {useSpaceStore} from "@/stores/spaceStore";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
|
import {useDrawerStore} from "@/stores/drawerStore";
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const searchText = ref("");
|
const searchText = ref("");
|
||||||
@@ -21,6 +22,8 @@ const limit = 20; // Количество транзакций на одну з
|
|||||||
const offset = ref(0); // Начальное смещение
|
const offset = ref(0); // Начальное смещение
|
||||||
const allLoaded = ref(false); // Флаг для отслеживания окончания данных
|
const allLoaded = ref(false); // Флаг для отслеживания окончания данных
|
||||||
|
|
||||||
|
const drawerStore = useDrawerStore()
|
||||||
|
|
||||||
// Функция для получения транзакций с параметрами limit и offset
|
// Функция для получения транзакций с параметрами limit и offset
|
||||||
const fetchTransactions = async (reload) => {
|
const fetchTransactions = async (reload) => {
|
||||||
|
|
||||||
@@ -62,7 +65,6 @@ const switchUserFilter = async (user) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const tgname = computed(() => {
|
const tgname = computed(() => {
|
||||||
if (window.Telegram.WebApp) {
|
if (window.Telegram.WebApp) {
|
||||||
const tg = window.Telegram.WebApp;
|
const tg = window.Telegram.WebApp;
|
||||||
@@ -136,11 +138,20 @@ onUnmounted( async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="px-4 bg-gray-100 h-full">
|
<div class="flex flex-col gap-4 p-4 bg-gray-100 h-full ">
|
||||||
<h2 class="text-4xl mb-6 font-bold">Список транзакций </h2>
|
<div class="flex flex-row gap-4 items-center">
|
||||||
|
<h2 class="text-4xl font-bold">Список транзакций </h2>
|
||||||
|
<Button label="+ Создать" @click="{
|
||||||
|
drawerStore.setCategoryType('EXPENSE');
|
||||||
|
drawerStore.setTransactionType('INSTANT');
|
||||||
|
drawerStore.visible = true
|
||||||
|
}" size="small"/>
|
||||||
|
</div>
|
||||||
<div v-if="!selectedSpace" class="flex w-full h-full items-center justify-center">
|
<div v-if="!selectedSpace" class="flex w-full h-full items-center justify-center">
|
||||||
<p>Сперва нужно выбрать Пространство.
|
<p>Сперва нужно выбрать Пространство.
|
||||||
<button class="text-blue-500 hover:underline" @click="router.push('/spaces').then((res) => router.go(0))">Перейти</button>
|
<button class="text-blue-500 hover:underline" @click="router.push('/spaces').then((res) => router.go(0))">
|
||||||
|
Перейти
|
||||||
|
</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex flex-col gap-2">
|
<div v-else class="flex flex-col gap-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user