transactions matrix
This commit is contained in:
@@ -30,6 +30,12 @@
|
||||
<span>Wszystkie wydarzenia</span>
|
||||
</span>
|
||||
</b-nav-item>
|
||||
<b-nav-item to="/transaction" exact>
|
||||
<span>
|
||||
<font-awesome-icon icon="th-list" />
|
||||
<span>Finanse</span>
|
||||
</span>
|
||||
</b-nav-item>
|
||||
<!-- <b-nav-item-dropdown right id="entity-menu" v-if="authenticated" active-class="active" class="pointer" data-cy="entity">-->
|
||||
<!-- <template #button-content>-->
|
||||
<!-- <span class="navbar-dropdown-menu">-->
|
||||
|
||||
@@ -31,7 +31,11 @@
|
||||
<th scope="row"><span>Type</span></th>
|
||||
<th scope="row"><span>Date</span></th>
|
||||
<th scope="row"><span>Comment</span></th>
|
||||
|
||||
<th scope="row"><span>Event</span></th>
|
||||
<th scope="row" v-for="item in transactions[0].items">
|
||||
<span>{{ item.userAccount?.name }}</span>
|
||||
</th>
|
||||
<th scope="row"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -50,6 +54,7 @@
|
||||
}}</router-link>
|
||||
</div>
|
||||
</td>
|
||||
<td v-for="item in transaction.items">{{ item.amount }}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<router-link :to="{ name: 'TransactionView', params: { transactionId: transaction.id } }" custom v-slot="{ navigate }">
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { type IEvent } from '@/shared/model/event.model';
|
||||
|
||||
import { type TransactionType } from '@/shared/model/enumerations/transaction-type.model';
|
||||
import type { IUserAccount } from '@/shared/model/user-account.model';
|
||||
export interface ITransaction {
|
||||
id?: number;
|
||||
type?: keyof typeof TransactionType | null;
|
||||
date?: Date | null;
|
||||
comment?: string | null;
|
||||
event?: IEvent | null;
|
||||
items?: ITransactionItem[] | [];
|
||||
}
|
||||
|
||||
export class Transaction implements ITransaction {
|
||||
@@ -16,5 +18,24 @@ export class Transaction implements ITransaction {
|
||||
public date?: Date | null,
|
||||
public comment?: string | null,
|
||||
public event?: IEvent | null,
|
||||
public items?: ITransactionItem[] | [],
|
||||
) {}
|
||||
}
|
||||
|
||||
export interface ITransactionItem {
|
||||
id?: number;
|
||||
comment?: string | null;
|
||||
event?: IEvent | null;
|
||||
amount?: number | null;
|
||||
userAccount?: IUserAccount | null;
|
||||
}
|
||||
|
||||
export class TransactionItem implements ITransactionItem {
|
||||
constructor(
|
||||
public id?: number,
|
||||
public comment?: string | null,
|
||||
public event?: IEvent | null,
|
||||
public amount?: number | null,
|
||||
public userAccount?: IUserAccount | null,
|
||||
) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user