+ settings update
This commit is contained in:
43
src/components/ListBox.vue
Normal file
43
src/components/ListBox.vue
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
|
||||||
|
import {PropType} from "vue";
|
||||||
|
import {Transaction} from "@/models/Transaction";
|
||||||
|
|
||||||
|
const props = defineProps(
|
||||||
|
{
|
||||||
|
elements: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
selectedElement: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="sm:col-span-1 w-full h-56 lg:h-[42rem] p-2 overflow-y-scroll outline outline-1 outline-gray-300 rounded-lg">
|
||||||
|
<!-- <IconField>-->
|
||||||
|
|
||||||
|
<!-- <InputText v-model="filterText" placeholder="Поиск категории"/>-->
|
||||||
|
<!-- <InputIcon class="pi pi-search"/>-->
|
||||||
|
<!-- </IconField>-->
|
||||||
|
<ul class=" min-w-fit w-full">
|
||||||
|
|
||||||
|
<li v-for="el in elements"
|
||||||
|
class="px-2 py-2 hover:bg-blue-50 rounded-md line-clamp-1 w-full"
|
||||||
|
:class="selectedElement == el.id? '!bg-emerald-50 text-emerald-700': '' "
|
||||||
|
@click="selectedElement=el">
|
||||||
|
{{ category.icon }} {{ e.name }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -35,9 +35,9 @@ const pages = ref([
|
|||||||
<div class="flex bg-gray-100 flex-col h-full px-4 gap-4 ">
|
<div class="flex bg-gray-100 flex-col h-full px-4 gap-4 ">
|
||||||
<h2 class="text-4xl font-bold ">Настройки</h2>
|
<h2 class="text-4xl font-bold ">Настройки</h2>
|
||||||
|
|
||||||
<div class="grid grid-cols-8 w-full h-full ">
|
<div class="xl:grid xl:grid-cols-8 w-full h-full ">
|
||||||
<div class="flex flex-row items-center justify-end col-start-2 col-span-1 ">
|
<div class=" hidden xl:flex flex-row items-center justify-end col-start-2 col-span-1 ">
|
||||||
<ul class=" flex flex-col gap-1 ">
|
<ul class=" flex-col gap-1 ">
|
||||||
<li v-for="page in pages" :key="page.code"
|
<li v-for="page in pages" :key="page.code"
|
||||||
class="flex flex-row gap-2 p-2 hover:bg-emerald-100 hover:text-emerald-700 hover:rounded-md items-center"
|
class="flex flex-row gap-2 p-2 hover:bg-emerald-100 hover:text-emerald-700 hover:rounded-md items-center"
|
||||||
:class="selectedModeCode == page.code ? 'bg-blue-100' : ''" @click="selectedModeCode = page.code">
|
:class="selectedModeCode == page.code ? 'bg-blue-100' : ''" @click="selectedModeCode = page.code">
|
||||||
@@ -46,6 +46,16 @@ const pages = ref([
|
|||||||
</ul>
|
</ul>
|
||||||
<Divider layout="vertical"/>
|
<Divider layout="vertical"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex xl:hidden sm:col-span-1 w-full h-fit p-2 mb-2 overflow-y-scroll outline outline-1 outline-gray-300 rounded-xl">
|
||||||
|
<ul class=" min-w-fit w-full">
|
||||||
|
|
||||||
|
<li v-for="page in pages"
|
||||||
|
class=" flex flex-row gap-2 items-center px-2 py-2 hover:bg-blue-50 rounded-md line-clamp-1 w-full"
|
||||||
|
:class="selectedModeCode == page.code ? '!bg-emerald-50 text-emerald-700': '' " @click="selectedModeCode=page.code">
|
||||||
|
<i :class="page.icon"/>{{ page.title }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<div class=" flex flex-col col-span-5 gap-2 max-h-[90dvh] overflow-y-scroll justify-items-start">
|
<div class=" flex flex-col col-span-5 gap-2 max-h-[90dvh] overflow-y-scroll justify-items-start">
|
||||||
<CategoriesList v-if="selectedModeCode == 'categories'"/>
|
<CategoriesList v-if="selectedModeCode == 'categories'"/>
|
||||||
<RecurrentList v-else-if="selectedModeCode == 'recurrent'"/>
|
<RecurrentList v-else-if="selectedModeCode == 'recurrent'"/>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="loading">
|
<div v-if="loading">
|
||||||
|
<LoadingView/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex flex-col bg-gray-100 dark:bg-gray-800 h-screen p-4">
|
<div v-else class="flex flex-col bg-gray-100 dark:bg-gray-800 h-screen p-4">
|
||||||
<ConfirmDialog/>
|
<ConfirmDialog/>
|
||||||
<!-- Заголовок и кнопка добавления категории -->
|
<!-- Заголовок и кнопка добавления категории -->
|
||||||
<div class="flex flex-row justify-between bg-gray-100">
|
<div class="flex flex-col gap-4 xl:flex-row justify-between bg-gray-100">
|
||||||
<h2 class="text-5xl font-bold">Категории</h2>
|
<h2 class="text-5xl font-bold">Категории</h2>
|
||||||
<Button label="Добавить категорию" icon="pi pi-plus" @click="openCreateDialog(null)"/>
|
<Button label="Добавить категорию" icon="pi pi-plus" class="text-sm" @click="openCreateDialog(null)"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Поле для поиска -->
|
<!-- Поле для поиска -->
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Переключатель категорий (доходы/расходы) -->
|
<!-- Переключатель категорий (доходы/расходы) -->
|
||||||
<div class="card flex sm:hidden justify-center mb-4">
|
<div class="card flex lg:hidden justify-center mb-4">
|
||||||
<SelectButton v-model="selectedCategoryType" :options="categoryTypes" optionLabel="name"
|
<SelectButton v-model="selectedCategoryType" :options="categoryTypes" optionLabel="name"
|
||||||
aria-labelledby="category-switch"/>
|
aria-labelledby="category-switch"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<!-- Список категорий с прокруткой для больших экранов -->
|
<!-- Список категорий с прокруткой для больших экранов -->
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="hidden sm:grid grid-cols-2 gap-x-10 w-full h-full justify-items-center overflow-y-auto">
|
<div class="hidden lg:grid grid-cols-2 gap-x-10 w-full h-full justify-items-center overflow-y-auto">
|
||||||
<!-- Категории доходов -->
|
<!-- Категории доходов -->
|
||||||
<div class="grid h-full w-full min-w-fit overflow-y-auto">
|
<div class="grid h-full w-full min-w-fit overflow-y-auto">
|
||||||
<div class=" gap-4 ">
|
<div class=" gap-4 ">
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Для маленьких экранов -->
|
<!-- Для маленьких экранов -->
|
||||||
<div class="flex sm:hidden flex-wrap rounded w-full">
|
<div class="flex lg:hidden flex-wrap rounded w-full">
|
||||||
<CategoryListItem
|
<CategoryListItem
|
||||||
v-for="category in filteredCategories"
|
v-for="category in filteredCategories"
|
||||||
:key="category.id"
|
:key="category.id"
|
||||||
@@ -117,6 +117,7 @@ import {
|
|||||||
|
|
||||||
import {useConfirm} from "primevue/useconfirm";
|
import {useConfirm} from "primevue/useconfirm";
|
||||||
import {useToast} from "primevue/usetoast";
|
import {useToast} from "primevue/usetoast";
|
||||||
|
import LoadingView from "@/components/LoadingView.vue";
|
||||||
|
|
||||||
|
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog :visible="show" modal :header="isEditing ? 'Edit Category' : 'Create New Category'" :closable="false"
|
<Dialog :visible="show" modal :header="isEditing ? 'Edit Category' : 'Create New Category'" :closable="false"
|
||||||
class="!w-1/3">
|
class="w-[95%] xl:!w-1/3">
|
||||||
<div class="flex justify-center gap-4">
|
<div class="flex justify-center gap-4">
|
||||||
<Button rounded outlined @click="toggleEmojiPicker" class=" flex justify-center !rounded-full !text-4xl !p-4"
|
<Button rounded outlined @click="toggleEmojiPicker" class=" flex justify-center !rounded-full !text-4xl !p-4"
|
||||||
size="large" :label="icon"/>
|
size="large" :label="icon"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- RecurrentPaymentsList.vue -->
|
<!-- RecurrentPaymentsList.vue -->
|
||||||
<template>
|
<template>
|
||||||
<div v-if="loading" class="flex flex-col items-center justify-center h-full bg-gray-100 py-15">
|
<div v-if="loading" >
|
||||||
Loading...
|
<LoadingView/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex flex-col h-full bg-gray-100 py-15">
|
<div v-else class="flex flex-col h-full bg-gray-100 py-15">
|
||||||
<!-- Заголовок -->
|
<!-- Заголовок -->
|
||||||
@@ -51,6 +51,7 @@ import {getRecurrentPayments} from "@/services/recurrentService";
|
|||||||
import CreateRecurrentModal from "@/components/settings/recurrent/CreateRecurrentModal.vue";
|
import CreateRecurrentModal from "@/components/settings/recurrent/CreateRecurrentModal.vue";
|
||||||
import {Category, CategoryType} from "@/models/Category";
|
import {Category, CategoryType} from "@/models/Category";
|
||||||
import {getCategories, getCategoryTypes} from "@/services/categoryService";
|
import {getCategories, getCategoryTypes} from "@/services/categoryService";
|
||||||
|
import LoadingView from "@/components/LoadingView.vue";
|
||||||
|
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
|
||||||
|
|||||||
@@ -124,11 +124,11 @@ onUnmounted( async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="px-4 bg-gray-100 h-full">
|
<div class="px-4 bg-gray-100 h-full">
|
||||||
<h2 class="text-4xl mb-6 font-bold">Transaction list</h2>
|
<h2 class="text-4xl mb-6 font-bold">Список транзакций </h2>
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<IconField>
|
<IconField>
|
||||||
<InputIcon class="pi pi-search"/>
|
<InputIcon class="pi pi-search"/>
|
||||||
<InputText v-model="searchText" placeholder="Search"></InputText>
|
<InputText v-model="searchText" placeholder="поиск"></InputText>
|
||||||
</IconField>
|
</IconField>
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<!-- <span v-for="user in users">{{user.id}}</span>-->
|
<!-- <span v-for="user in users">{{user.id}}</span>-->
|
||||||
|
|||||||
Reference in New Issue
Block a user