Show button on transactions overview so that they can individually be deleted
MODIFY
resources/assets/sass/components/row.scss
resources/assets/sass/components/row.scss
.row {
display: flex;
+ &.row--middle {
+ align-items: center;
+ }
+
&.row--right {
justify-content: flex-end;
}

MODIFY
resources/assets/sass/components/typography.scss
resources/assets/sass/components/typography.scss
@@ -43,3 +43,9 @@ a {
text-decoration: none;
color: $colors-primary;
}
+
+.c {
+ &-light {
+ color: #CCC;
+ }
+}

MODIFY
resources/views/transactions/index.blade.php
resources/views/transactions/index.blade.php
<div class="box">
@foreach ($transactions as $transaction)
<div class="box__section row">
- <div class="row__column row__column--middle">{{ $transaction->description }}</div>
+ <div class="row__column row__column--middle row row--middle">
+ <div>{{ $transaction->description }}</div>
+ <form action="/{{ get_class($transaction) === 'App\Models\Earning' ? 'earnings' : 'spendings' }}/{{ $transaction->id }}" method="POST">
+ {{ method_field('DELETE') }}
+ {{ csrf_field() }}
+ <button class="button link">
+ <i class="fas fa-trash fa-xs c-light ml-1"></i>
+ </button>
+ </form>
+ </div>
<div class="row__column">
@if ($transaction->tag)
<div class="row">

Show button on transactions overview so that they can individually be deleted