transaction fix
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
:to="{ name: 'RegistrationCreateForEvent', params: { eventId: event.id } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
v-if="isCurrentEvent"
|
||||
v-if="event.active"
|
||||
>
|
||||
<button @click="navigate" class="btn btn-primary">
|
||||
<font-awesome-icon icon="plus"></font-awesome-icon> <span>Dołącz do wydarzenia</span>
|
||||
@@ -55,28 +55,7 @@
|
||||
<!-- <font-awesome-icon icon="plus"></font-awesome-icon> <span>Opłać boisko</span>-->
|
||||
<!-- </button>-->
|
||||
<!-- </router-link>-->
|
||||
<router-link
|
||||
v-if="event.id"
|
||||
:to="{ name: 'TransactionFieldPayment', params: { paymentForFieldByEventId: event.id } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
><!-- <router-link
|
||||
v-if="transaction.id"
|
||||
:to="{ name: 'TransactionCreateOpposite', params: { opposingTransactionId: transaction.id } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
>-->
|
||||
<button @click="navigate" class="btn btn-primary" v-if="hasAnyAuthority(['ROLE_ADMIN', 'ROLE_COUNTER'])">
|
||||
<font-awesome-icon icon="pencil-alt"></font-awesome-icon> <span>Dodaj płatność za boisko</span>
|
||||
</button>
|
||||
</router-link>
|
||||
<button
|
||||
class="btn btn-primary float-right"
|
||||
v-if="isCurrentEvent && hasAnyAuthority(['ROLE_ADMIN', 'ROLE_COUNTER'])"
|
||||
@click="settle()"
|
||||
>
|
||||
<font-awesome-icon icon="sync"></font-awesome-icon> <span>Rozlicz wydarzenie</span>
|
||||
</button>
|
||||
|
||||
<div class="table-responsive" v-if="event.registrations && event.registrations.length > 0">
|
||||
<table class="table table-striped" aria-describedby="event.registrations">
|
||||
<thead>
|
||||
@@ -181,6 +160,71 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="btn btn-primary float-right"
|
||||
v-if="(event.editable && hasAnyAuthority(['ROLE_COUNTER'])) || hasAnyAuthority(['ROLE_ADMIN'])"
|
||||
@click="settle()"
|
||||
>
|
||||
<font-awesome-icon icon="sync"></font-awesome-icon> <span>Rozlicz wydarzenie</span>
|
||||
</button>
|
||||
<router-link
|
||||
v-if="event.id && event.charged == false"
|
||||
:to="{ name: 'TransactionFieldPayment', params: { paymentForFieldByEventId: event.id } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
><!-- <router-link
|
||||
v-if="transaction.id"
|
||||
:to="{ name: 'TransactionCreateOpposite', params: { opposingTransactionId: transaction.id } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
>-->
|
||||
<button @click="navigate" class="btn btn-primary" v-if="hasAnyAuthority(['ROLE_ADMIN', 'ROLE_COUNTER'])">
|
||||
<font-awesome-icon icon="pencil-alt"></font-awesome-icon> <span>Dodaj płatność za boisko</span>
|
||||
</button>
|
||||
</router-link>
|
||||
|
||||
<router-link
|
||||
v-if="event.transactions?.length > 0 && event.editable"
|
||||
:to="{ name: 'TransactionPaymentsForTransaction', params: { paymentsForTransactionId: event.chargeTransactionId } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
><!-- <router-link
|
||||
v-if="transaction.id"
|
||||
:to="{ name: 'TransactionCreateOpposite', params: { opposingTransactionId: transaction.id } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
>-->
|
||||
<button @click="navigate" class="btn btn-primary" v-if="hasAnyAuthority(['ROLE_ADMIN', 'ROLE_COUNTER'])">
|
||||
<font-awesome-icon icon="pencil-alt"></font-awesome-icon> <span>Dodaj wpłaty na konto</span>
|
||||
</button>
|
||||
</router-link>
|
||||
<div class="table-responsive" v-if="event.transactions && event.transactions.length > 0">
|
||||
Rozliczenie:
|
||||
<table class="table table-striped" aria-describedby="transactions">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th/>-->
|
||||
<!-- <th/>-->
|
||||
<!-- <th/>-->
|
||||
<th />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="transaction in event.transactions" :key="transaction.id" data-cy="entityTable">
|
||||
<td>
|
||||
<router-link :to="{ name: 'TransactionView', params: { transactionId: transaction.id } }"
|
||||
>{{ transaction.date }} {{ transaction.type }}
|
||||
</router-link>
|
||||
<div v-if="transaction.comment">{{ transaction.comment }}</div>
|
||||
</td>
|
||||
<!-- <td>{{ transaction.type }}</td>-->
|
||||
<!-- <td>{{ transaction.date }}</td>-->
|
||||
<!-- <td>{{ transaction.comment }}</td>-->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./event-details.component.ts"></script>
|
||||
|
||||
Reference in New Issue
Block a user