Fix filters
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
Jan Bader 2022-04-24 20:48:08 +00:00
parent 99549fb441
commit 5741236e2c
2 changed files with 6 additions and 10 deletions

View File

@ -38,8 +38,8 @@ const filters = ref({
PayeeID: null,
Category: null,
CategoryID: null,
FromDate: new Date(1900, 0, 2, 0, 0, 0),
ToDate: new Date(2999,11,32,0,0,0),
FromDate: new Date(1900, 0, 2),
ToDate: new Date(2999,11,32),
});
watch(() => filters.value.AccountID
@ -47,7 +47,6 @@ watch(() => filters.value.AccountID
+ filters.value.CategoryID
+ filters.value.FromDate?.toISOString()
+ filters.value.ToDate?.toISOString(), function() {
console.log(filters.value.FromDate)
if(!hasFilters.value)
return;
transactions.GetFilteredTransactions(
@ -63,8 +62,9 @@ const hasFilters = computed(() =>
filters.value.AccountID != null
|| filters.value.PayeeID != null
|| filters.value.CategoryID != null
|| (filters.value.FromDate != null && filters.value.FromDate.getYear() > 1900)
|| (filters.value.ToDate != null && filters.value.ToDate.getYear() < 2999))
|| (filters.value.FromDate != null && filters.value.FromDate.getFullYear() > 1901)
|| (filters.value.ToDate != null && filters.value.ToDate.getFullYear() < 2998))
const transactionsList = computed(() => {
if (hasFilters.value){
return transactions.FilteredTransactionsList;

View File

@ -3,10 +3,6 @@ import NewBudget from '../dialogs/NewBudget.vue';
import RowCard from '../components/RowCard.vue';
import { useSessionStore } from '../stores/session';
const props = defineProps<{
budgetid: string,
}>();
const BudgetsList = useSessionStore().BudgetsList;
</script>
@ -24,7 +20,7 @@ const BudgetsList = useSessionStore().BudgetsList;
<!--<svg class="w-24"></svg>-->
<p class="w-24 text-center text-6xl" />
<span class="text-lg">{{ budget.Name
}}{{ budget.ID == budgetid ? " *" : "" }}</span>
}}</span>
</router-link>
</RowCard>
<NewBudget />