ledger balance
This commit is contained in:
@@ -136,7 +136,7 @@ defineExpose({ open });
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
@reference "tailwindcss";
|
||||
@reference "@/style.css";
|
||||
|
||||
button.switch {
|
||||
@apply flex items-center px-4 rounded-md bg-slate-600;
|
||||
|
||||
@@ -26,7 +26,7 @@ const ledgerId = computed({
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
@reference "tailwindcss";
|
||||
@reference "@/style.css";
|
||||
|
||||
.system-ledger {
|
||||
@apply text-emerald-400;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
BalanceResponse,
|
||||
CombinedLedgerResponse,
|
||||
CombinedLedgerResponseTypeEnum,
|
||||
CreateCombinedLedgerRequest,
|
||||
@@ -75,7 +76,10 @@ 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)
|
||||
const getLedgerId = (ledger: Ledger | string): string => typeof ledger == 'string' ? ledger : ledger.ledgerId;
|
||||
|
||||
export const findAllTransactionInLeger = (ledger: Ledger | string): Promise<TransactionResponse[]> => transactionApi.finAllTransactionsInLedger(getLedgerId(ledger)).then(response => response.data)
|
||||
export const getLedgerBalance = (ledger: Ledger | string): Promise<BalanceResponse> => ledgerApi.findBalanceByLedgerId(getLedgerId(ledger)).then(response => response.data)
|
||||
|
||||
export const useLedgerParam = () => {
|
||||
const {findById} = useLedgersStore();
|
||||
|
||||
Reference in New Issue
Block a user