transaction list display
This commit is contained in:
@@ -6,12 +6,14 @@ import {
|
||||
LedgerResponseTypeEnum,
|
||||
MainLedgerResponse,
|
||||
MainLedgerResponseTypeEnum,
|
||||
TransactionResponse,
|
||||
TransferResponseTypeEnum,
|
||||
UpdateCombinedLedgerRequest,
|
||||
UpdateMainLedgerRequest
|
||||
} from "@/generated/mammon";
|
||||
import {defineStore} from "pinia";
|
||||
import {ref, triggerRef} from "vue";
|
||||
import {ledgerApi} from "@/mammon";
|
||||
import {ledgerApi, transactionApi} from "@/mammon";
|
||||
|
||||
export const LedgerTypes = LedgerResponseTypeEnum;
|
||||
|
||||
@@ -20,6 +22,7 @@ export type MainLedger = MainLedgerResponse & {type: MainLedgerResponseTypeEnum}
|
||||
export type CombinedLedger = CombinedLedgerResponse & {type: CombinedLedgerResponseTypeEnum}
|
||||
export type Ledger = MainLedger | CombinedLedger;
|
||||
|
||||
export const TransferTypes = TransferResponseTypeEnum;
|
||||
|
||||
export const systemLedgerRef = 'system';
|
||||
export const systemLedger = {
|
||||
@@ -71,3 +74,5 @@ export const useLedgersStore = defineStore('ledgers', () => {
|
||||
return {ledgers, findById, findAllById, createMain, createCombined, updateMain, updateCombined, refresh};
|
||||
})
|
||||
|
||||
export const findAllTransactionInLeger = (ledger: Ledger | string): Promise<TransactionResponse[]> => transactionApi.finAllTransactionsInLedger(typeof ledger == 'string' ? ledger : ledger.ledgerId).then(response => response.data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user