mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
32 lines
1.7 KiB
Plaintext
32 lines
1.7 KiB
Plaintext
<div>
|
|
<table class="table" ng-if="transactions.length > 0">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:25%" translate>{{ 'date' }}</th>
|
|
<th style="width:25%" translate>{{ 'operation' }}</th>
|
|
<th style="width:25%" translate>{{ 'operator' }}</th>
|
|
<th style="width:25%" translate>{{ 'amount' }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="t in transactions">
|
|
<td>{{ t.created_at | amDateFormat:'L' }}</td>
|
|
<td>
|
|
<span ng-if="t.transaction_type == 'credit'" translate>{{ 'credit' }}</span>
|
|
<span ng-if="t.transaction_type == 'debit' && t.transactable_type == 'Subscription'" translate>{{ 'debit_subscription' }}</span>
|
|
<span ng-if="t.transaction_type == 'debit' && t.transactable_type == 'Reservation' && t.transactable.reservable_type == 'Training'" translate>{{ 'debit_reservation_training' }}</span>
|
|
<span ng-if="t.transaction_type == 'debit' && t.transactable_type == 'Reservation' && t.transactable.reservable_type == 'Machine'" translate>{{ 'debit_reservation_machine' }}</span>
|
|
<span ng-if="t.transaction_type == 'debit' && t.transactable_type == 'Reservation' && t.transactable.reservable_type == 'Event'" translate>{{ 'debit_reservation_event' }}</span>
|
|
</td>
|
|
<td>{{ t.user.full_name }}</td>
|
|
<td ng-class="{'green':t.transaction_type == 'credit', 'red':t.transaction_type == 'debit'}">
|
|
<span ng-if="t.transaction_type == 'credit'">+</span>
|
|
<span ng-if="t.transaction_type == 'debit'">-</span>
|
|
<strong>{{ t.amount | currency }}</strong>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p ng-if="transactions.length == 0" translate>{{ 'no_transactions_for_now' }}</p>
|
|
</div>
|