Fix some linter issues

This commit is contained in:
Jan Bader 2022-03-15 19:50:49 +00:00
parent 3ea90a5ebe
commit 66322ebd86
6 changed files with 49 additions and 32 deletions

View File

@ -1,6 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import Input from './Input.vue'; import Input from './Input.vue';
const props = defineProps(["modelValue"]); const props = defineProps<{
modelValue: Date
}>();
const emit = defineEmits(['update:modelValue']); const emit = defineEmits(['update:modelValue']);
function dateToYYYYMMDD(d: Date) : string { function dateToYYYYMMDD(d: Date) : string {

View File

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
const props = defineProps(["modelValue"]); const props = defineProps<{modelValue : number | string}>();
</script> </script>
<template> <template>

View File

@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from "vue"; import { computed } from "vue";
import Currency from "../components/Currency.vue" import Currency from "../components/Currency.vue";
import { useBudgetsStore } from "../stores/budget" import { useBudgetsStore } from "../stores/budget";
import { Account, useAccountStore } from "../stores/budget-account" import { Account, useAccountStore } from "../stores/budget-account";
import { useSettingsStore } from "../stores/settings" import { useSettingsStore } from "../stores/settings";
import AccountWithReconciled from "../components/AccountWithReconciled.vue"; import AccountWithReconciled from "../components/AccountWithReconciled.vue";
const settings = useSettingsStore(); const settings = useSettingsStore();
@ -53,6 +53,7 @@ const OffBudgetAccountsBalance = computed(() => accountStore.OffBudgetAccountsBa
</div> </div>
<div <div
v-for="account in OnBudgetAccounts" v-for="account in OnBudgetAccounts"
:key="account.ID"
class="flex flex-row justify-between" class="flex flex-row justify-between"
> >
<AccountWithReconciled :account="account" /> <AccountWithReconciled :account="account" />
@ -72,6 +73,7 @@ const OffBudgetAccountsBalance = computed(() => accountStore.OffBudgetAccountsBa
</div> </div>
<div <div
v-for="account in OffBudgetAccounts" v-for="account in OffBudgetAccounts"
:key="account.ID"
class="flex flex-row justify-between" class="flex flex-row justify-between"
> >
<AccountWithReconciled :account="account" /> <AccountWithReconciled :account="account" />

View File

@ -106,7 +106,10 @@ function assignedChanged(e : Event, category : Category){
<span class="hidden sm:block text-right">Assigned</span> <span class="hidden sm:block text-right">Assigned</span>
<span class="hidden sm:block text-right">Activity</span> <span class="hidden sm:block text-right">Activity</span>
<span class="hidden sm:block text-right">Available</span> <span class="hidden sm:block text-right">Available</span>
<template v-for="group in GroupsForMonth"> <template
v-for="group in GroupsForMonth"
:key="group.Name"
>
<span <span
class="text-lg font-bold mt-2" class="text-lg font-bold mt-2"
@click="toggleGroup(group)" @click="toggleGroup(group)"
@ -137,7 +140,11 @@ function assignedChanged(e : Event, category : Category){
/> />
<template <template
v-for="category in GetCategories(group.Name)" v-for="category in GetCategories(group.Name)"
:key="category.ID"
>
<div
v-if="getGroupState(group)" v-if="getGroupState(group)"
class="contents"
> >
<span <span
class="whitespace-nowrap overflow-hidden" class="whitespace-nowrap overflow-hidden"
@ -159,6 +166,7 @@ function assignedChanged(e : Event, category : Category){
<Currency <Currency
:value="accountStore.GetCategoryAvailable(category)" :value="accountStore.GetCategoryAvailable(category)"
/> />
</div>
</template> </template>
</template> </template>
</div> </div>

View File

@ -13,14 +13,18 @@ const BudgetsList = useSessionStore().BudgetsList;
<template> <template>
<h1>Budgets</h1> <h1>Budgets</h1>
<div class="grid md:grid-cols-2 gap-6"> <div class="grid md:grid-cols-2 gap-6">
<Card v-for="budget in BudgetsList"> <Card
v-for="budget in BudgetsList"
:key="budget.ID"
>
<router-link <router-link
:to="'/budget/'+budget.ID+'/budgeting'" :to="'/budget/'+budget.ID+'/budgeting'"
class="contents" class="contents"
> >
<!--<svg class="w-24"></svg>--> <!--<svg class="w-24"></svg>-->
<p class="w-24 text-center text-6xl" /> <p class="w-24 text-center text-6xl" />
<span class="text-lg">{{ budget.Name }}{{ budget.ID == budgetid ? " *" : "" }}</span> <span class="text-lg">{{ budget.Name
}}{{ budget.ID == budgetid ? " *" : "" }}</span>
</router-link> </router-link>
</Card> </Card>
<NewBudget /> <NewBudget />

View File

@ -1,4 +1,5 @@
<script lang="ts" setup></script> <script lang="ts" setup>
</script>
<template> <template>
<div> <div>