Compare commits
4 Commits
0b36048f47
...
master
Author | SHA1 | Date | |
---|---|---|---|
45af54d995 | |||
a241298170 | |||
9248c12aab | |||
8817e665e9 |
12
bass.build
Normal file
12
bass.build
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
(def go
|
||||||
|
(from (linux/alpine)
|
||||||
|
($ apk add go)))
|
||||||
|
|
||||||
|
(-> ($ go mod download)
|
||||||
|
(with-image go)
|
||||||
|
(with-mount *dir*/go.mod ./go.mod)
|
||||||
|
(with-mount *dir*/go.sum ./go.sum))
|
||||||
|
|
||||||
|
(def go-mods
|
||||||
|
(from go
|
||||||
|
($ go mod download)))
|
@ -2,7 +2,7 @@ import { defineStore } from "pinia";
|
|||||||
import { GET, POST } from "../api";
|
import { GET, POST } from "../api";
|
||||||
import { useBudgetsStore } from "./budget";
|
import { useBudgetsStore } from "./budget";
|
||||||
import { useSessionStore } from "./session";
|
import { useSessionStore } from "./session";
|
||||||
import { useTransactionsStore } from "./transactions";
|
import { Transaction, useTransactionsStore } from "./transactions";
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
Accounts: Map<string, Account>;
|
Accounts: Map<string, Account>;
|
||||||
@ -200,6 +200,7 @@ export const useAccountStore = defineStore("budget/account", {
|
|||||||
transactionsStore.AddTransactions(
|
transactionsStore.AddTransactions(
|
||||||
response.Transactions
|
response.Transactions
|
||||||
);
|
);
|
||||||
|
account.Transactions = response.Transactions.map((x : Transaction) =>x.ID);
|
||||||
},
|
},
|
||||||
async FetchMonthBudget(budgetid: string, year: number, month: number) {
|
async FetchMonthBudget(budgetid: string, year: number, month: number) {
|
||||||
const result = await GET(
|
const result = await GET(
|
||||||
|
@ -47,10 +47,12 @@ export const useTransactionsStore = defineStore("budget/transactions", {
|
|||||||
}
|
}
|
||||||
return reconciledBalance;
|
return reconciledBalance;
|
||||||
},
|
},
|
||||||
TransactionsByDate(state) : Record<string, Transaction[]> {
|
TransactionsByDate(state) : Record<string, Transaction[]>|undefined{
|
||||||
const accountsStore = useAccountStore();
|
const accountsStore = useAccountStore();
|
||||||
const accountID = accountsStore.CurrentAccountID;
|
const account = accountsStore.CurrentAccount;
|
||||||
const allTransactions = [...this.Transactions.values()].filter(x => x.AccountID == accountID);
|
if(account === undefined)
|
||||||
|
return undefined;
|
||||||
|
const allTransactions = account!.Transactions.map(x => this.Transactions.get(x) ?? {} as Transaction);
|
||||||
return groupBy(allTransactions, x => formatDate(x.Date));
|
return groupBy(allTransactions, x => formatDate(x.Date));
|
||||||
},
|
},
|
||||||
TransactionsList(state) : Transaction[] {
|
TransactionsList(state) : Transaction[] {
|
||||||
|
Reference in New Issue
Block a user