Skip to content

Commit

Permalink
Added stock market column to dividends table
Browse files Browse the repository at this point in the history
  • Loading branch information
simba77 committed Aug 4, 2024
1 parent 925463d commit f094b0c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions assets/pages/Dividends/IndexPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function confirmDelete(item: Dividend) {
<th>Date</th>
<th>Sum</th>
<th>Ticker</th>
<th>Stock Market</th>
<th>Account</th>
<th class="flex justify-end">
Actions
Expand All @@ -68,6 +69,7 @@ function confirmDelete(item: Dividend) {
<td>{{ dividend.date }}</td>
<td>{{ formatPrice(dividend.amount) }}</td>
<td>{{ dividend.ticker }}</td>
<td>{{ dividend.stockMarket }}</td>
<td>{{ dividend.accountName }}</td>
<td class="table-actions">
<template v-if="dividend.id">
Expand Down
1 change: 1 addition & 0 deletions assets/types/dividends.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface Dividend {
id: number
date: string
ticker: string
stockMarket: string
amount: number
accountName: string
}
Expand Down
13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/Response/DTO/Dividends/DividendListItemDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public function __construct(
public int $id,
public string $date,
public string $ticker,
public string $stockMarket,
public string $amount,
public string $accountName
) {
Expand Down
1 change: 1 addition & 0 deletions src/Services/DividendsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function getDividendsForUser(?User $user): array
id: $dividend->getId(),
date: $dividend->getDate()->format('d.m.Y'),
ticker: $dividend->getTicker(),
stockMarket: $dividend->getStockMarket(),
amount: $dividend->getAmount(),
accountName: $dividend->getAccount()->getName()
);
Expand Down

0 comments on commit f094b0c

Please sign in to comment.