jako tako
This commit is contained in:
@@ -35,29 +35,93 @@
|
||||
<span>{{ event.comment }}</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- Dodajemy sekcję dla rejestracji -->
|
||||
<h3>Rejestracje</h3>
|
||||
<ul>
|
||||
<li v-for="registration in event.registrations" :key="registration.id">
|
||||
{{ registration.playerName }}
|
||||
<!-- lub inne pola, które chcesz pokazać -->
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<router-link :to="{ name: 'RegistrationCreateForEvent', params: { eventId: event.id } }" custom v-slot="{ navigate }">
|
||||
<button @click="navigate" class="btn btn-primary">
|
||||
<font-awesome-icon icon="plus"></font-awesome-icon> <span>Dodaj Rejestrację</span>
|
||||
<font-awesome-icon icon="plus"></font-awesome-icon> <span>Dołącz do wydarzenia</span>
|
||||
</button>
|
||||
</router-link>
|
||||
<div class="table-responsive" v-if="event.registrations && event.registrations.length > 0">
|
||||
<table class="table table-striped" aria-describedby="event.registrations">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><span>#</span></th>
|
||||
<th scope="col"><span>Date Time</span></th>
|
||||
<th scope="col"><span>Player Name</span></th>
|
||||
<th scope="col"><span>Comment</span></th>
|
||||
<th scope="col"><span>Active</span></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(registration, index) in sortedAndIndexedRegistrations" :key="registration.id" data-cy="entityTable">
|
||||
<td>
|
||||
<!-- Display row number or empty if not active -->
|
||||
{{ getRegistrationIndex(index) }}
|
||||
</td>
|
||||
<td>{{ formatDateShort(registration.dateTime) || '' }}</td>
|
||||
<td>{{ registration.playerName }}</td>
|
||||
<td>{{ registration.comment }}</td>
|
||||
<td>{{ registration.active }}</td>
|
||||
|
||||
<button type="submit" @click.prevent="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">
|
||||
<font-awesome-icon icon="arrow-left"></font-awesome-icon> <span>Back</span>
|
||||
</button>
|
||||
<router-link v-if="event.id" :to="{ name: 'EventEdit', params: { eventId: event.id } }" custom v-slot="{ navigate }">
|
||||
<button @click="navigate" class="btn btn-primary">
|
||||
<font-awesome-icon icon="pencil-alt"></font-awesome-icon> <span>Edit</span>
|
||||
</button>
|
||||
</router-link>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<router-link
|
||||
:to="{ name: 'RegistrationView', params: { registrationId: registration.id } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
>
|
||||
<button @click="navigate" class="btn btn-info btn-sm details" data-cy="entityDetailsButton">
|
||||
<font-awesome-icon icon="eye"></font-awesome-icon>
|
||||
<span class="d-none d-md-inline">View</span>
|
||||
</button>
|
||||
</router-link>
|
||||
<!-- <b-button-->
|
||||
<!-- @click="prepareRemove(registration)"-->
|
||||
<!-- variant="danger"-->
|
||||
<!-- class="btn btn-sm"-->
|
||||
<!-- data-cy="entityDeleteButton"-->
|
||||
<!-- v-b-modal.removeEntity-->
|
||||
<!-- >-->
|
||||
<!-- <font-awesome-icon icon="times"></font-awesome-icon>-->
|
||||
<!-- <span class="d-none d-md-inline">Delete</span>-->
|
||||
<!-- </b-button>-->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<b-modal ref="removeEntity" id="removeEntity">
|
||||
<template #modal-title>
|
||||
<span id="sasiedziApp.registration.delete.question" data-cy="registrationDeleteDialogHeading">Confirm delete operation</span>
|
||||
</template>
|
||||
<div class="modal-body">
|
||||
<p id="jhi-delete-registration-heading">Are you sure you want to delete Registration {{ removeId }}?</p>
|
||||
</div>
|
||||
<template #modal-footer>
|
||||
<div>
|
||||
<button type="button" class="btn btn-secondary" @click="closeDialog()">Cancel</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary"
|
||||
id="jhi-confirm-delete-registration"
|
||||
data-cy="entityConfirmDeleteButton"
|
||||
@click="removeRegistration()"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</b-modal>
|
||||
|
||||
<!-- <button type="submit" @click.prevent="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">-->
|
||||
<!-- <font-awesome-icon icon="arrow-left"></font-awesome-icon> <span>Back</span>-->
|
||||
<!-- </button>-->
|
||||
<!-- <router-link v-if="event.id" :to="{ name: 'EventEdit', params: { eventId: event.id } }" custom v-slot="{ navigate }">-->
|
||||
<!-- <button @click="navigate" class="btn btn-primary">-->
|
||||
<!-- <font-awesome-icon icon="pencil-alt"></font-awesome-icon> <span>Edit</span>-->
|
||||
<!-- </button>-->
|
||||
<!-- </router-link>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user