fix .env.production

This commit is contained in:
xds
2025-11-07 15:28:01 +03:00
parent 3ab59f0112
commit 500e87a80b
3 changed files with 49 additions and 40 deletions

View File

@@ -3,7 +3,7 @@
import {useSpaceStore} from "@/stores/spaceStore";
import {useToast} from "primevue/usetoast";
import {Divider} from "primevue";
import {onMounted, ref} from "vue";
import {computed, onMounted, ref} from "vue";
import {Category} from "@/models/category";
import {useToolbarStore} from "@/stores/toolbar-store";
import {useRouter} from "vue-router";
@@ -18,6 +18,12 @@ const router = useRouter()
const categories = ref<Category[]>([])
const incomeCategories = computed(() => {
return categories.value.filter(i => i.type == CategoryType.INCOME)
})
const expenseCategories = computed(() => {
return categories.value.filter(i => i.type == CategoryType.EXPENSE)
})
const fetchData = async () => {
try {
@@ -53,52 +59,52 @@ onMounted(async () => {
<div class="flex flex-col w-full !pb-10 gap-6">
<div class="flex flex-col">
<span>Income categories</span>
<span class="!pl-4">Income categories</span>
<div class="flex card flex-col ">
<span v-if="categories.filter(i => i.type == CategoryType.INCOME).length ==0 ">It looks like you haven't create any income category yet. <router-link
<span v-if="incomeCategories.length ==0 ">It looks like you haven't create any income category yet. <router-link
to="/categories/create" class="!text-blue-400">Try to create some first.</router-link></span>
<div v-else v-for="key in categories.filter(i => i.type == CategoryType.INCOME).keys()"
:key="categories[key].id"
@click="router.push(`/categories/${categories[key].id}/edit`)"
<div v-else v-for="key in incomeCategories.keys()"
:key="incomeCategories[key].id"
@click="router.push(`/categories/${incomeCategories[key].id}/edit`)"
class="flex flex-col w-full gap-0 pl-5 items-start justify-items-center font-bold ">
<div class="flex flex-row w-full items-center justify-between">
<div class="flex flex-row items-center gap-2 ">
<span class="text-3xl"> {{ categories[key].icon }}</span>
<div class="flex flex-col !font-bold "> {{ categories[key].name }}
<div class="flex flex-row text-sm">{{ categories[key].description }} |
{{ CategoryTypeName[categories[key].type] }}
<span class="text-3xl"> {{ incomeCategories[key].icon }}</span>
<div class="flex flex-col !font-bold "> {{ incomeCategories[key].name }}
<div class="flex flex-row text-sm">{{ incomeCategories[key].description }} |
{{ CategoryTypeName[incomeCategories[key].type] }}
</div>
</div>
</div>
<i class="pi pi-angle-right !font-extralight"/>
</div>
<Divider v-if="key+1 !== categories.length" class="!m-0 !py-3"/>
<Divider v-if="key+1 !== incomeCategories.length" class="!m-0 !py-3"/>
</div>
</div>
</div>
<div class="flex flex-col">
<span>Expense categories</span>
<span class="!pl-4">Expense categories</span>
<div class="flex card ">
<span v-if="categories.filter(i => i.type == CategoryType.EXPENSE).length ==0 ">It looks like you haven't create any expense category yet. <router-link
<span v-if="expenseCategories.length ==0 ">It looks like you haven't create any expense category yet. <router-link
to="/categories/create" class="!text-blue-400">Try to create some first.</router-link></span>
<div v-else v-for="key in categories.filter(i => i.type == CategoryType.EXPENSE).keys()"
:key="categories[key].id"
@click="router.push(`/categories/${categories[key].id}/edit`)"
<div v-else v-for="key in expenseCategories.keys()"
:key="expenseCategories[key].id"
@click="router.push(`/categories/${expenseCategories[key].id}/edit`)"
class="flex flex-col w-full gap-0 pl-5 items-start justify-items-center font-bold ">
<div class="flex flex-row w-full items-center justify-between">
<div class="flex flex-row items-center gap-2 ">
<span class="text-3xl"> {{ categories[key].icon }}</span>
<div class="flex flex-col !font-bold "> {{ categories[key].name }}
<div class="flex flex-row text-sm">{{ categories[key].description }} |
{{ CategoryTypeName[categories[key].type] }}
<span class="text-3xl"> {{ expenseCategories[key].icon }}</span>
<div class="flex flex-col !font-bold "> {{ expenseCategories[key].name }}
<div class="flex flex-row text-sm">{{ expenseCategories[key].description }} |
{{ CategoryTypeName[expenseCategories[key].type] }}
</div>
</div>
</div>
<i class="pi pi-angle-right !font-extralight"/>
</div>
<Divider v-if="key+1 !== categories.filter(i => i.type == CategoryType.EXPENSE).length" class="!m-0 !py-3"/>
<Divider v-if="key+1 !== expenseCategories.length" class="!m-0 !py-3"/>
</div>
</div>
</div>