Overview of upcoming events
This commit is contained in:
@@ -41,7 +41,10 @@ class DashboardController extends CommonController {
|
||||
}
|
||||
|
||||
public function getMyParticipations() : JsonResponse {
|
||||
//dd($this->eventParticipants->getMyParticipations());
|
||||
return response()->json(['myParticipations' => $this->eventParticipants->getMyParticipations()]);
|
||||
}
|
||||
|
||||
public function getUpcomingEvents() : JsonResponse {
|
||||
return response()->json(['upcomingEvents' => $this->events->getUpcoming()]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ Route::middleware(IdentifyTenant::class)->group(function () {
|
||||
Route::prefix('api/v1/dashboard')->group(function () {
|
||||
Route::get('/my-invoices', [DashboardController::class, 'getMyInvoices']);
|
||||
Route::get('/open-cost-units', [DashboardController::class, 'getOpenCostUnits']);
|
||||
Route::get('/upcoming-events', [DashboardController::class, 'getUpcomingEvents']);
|
||||
Route::get('/my-participations', [DashboardController::class, 'getMyParticipations']);
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<script setup>
|
||||
import {onMounted, reactive} from "vue";
|
||||
|
||||
const events = reactive({
|
||||
'upcomingEvents': '',
|
||||
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
const response = await fetch('/api/v1/dashboard/upcoming-events');
|
||||
const data = await response.json();
|
||||
Object.assign(events, data);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<table class="widget-content-item" v-if="events.upcomingEvents.length > 0">
|
||||
<tr>
|
||||
<td style="font-weight: bold">Veranstaltung</td>
|
||||
<td style="font-weight: bold">Teilis</td>
|
||||
<td style="font-weight: bold">Team</td>
|
||||
<td style="font-weight: bold">GruFüs</td>
|
||||
</tr>
|
||||
|
||||
<tr v-for="event in events.upcomingEvents">
|
||||
<td><a :href="'/event/details/' + event.identifier" class="link">{{event.nameShort}}</a></td>
|
||||
<td style="text-align: center;">{{event.countParticipant}}</td>
|
||||
<td style="text-align: center;">{{event.countTeam}}</td>
|
||||
<td style="text-align: center;">{{event.countVolunteer}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p v-else style="padding: 10px; font-weight: bold">Es existieren im Moment keine Veranstaltungen, für die du verantwortlich bist.</p>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -107,10 +107,47 @@
|
||||
<input type="button" value="Rundmail senden" @click="mailToGroup" /><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 200px">Veranstaltung</th>
|
||||
<td>{{ dynamicProps.event.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px">Beginn</th>
|
||||
<td>{{ dynamicProps.event.eventBegin }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Ende</th>
|
||||
<td>{{ dynamicProps.event.eventEnd }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Anmeldeschluss</th>
|
||||
<td>{{dynamicProps.event.earlyBirdEnd.formatted}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Nachmeldeschluss</th>
|
||||
<td>{{dynamicProps.event.registrationFinalEnd.formatted}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Anmelde-URL</th>
|
||||
<td>
|
||||
{{dynamicProps.event.url}}<br />
|
||||
<img :src="'/print-event-code/' + dynamicProps.event.identifier" alt="Event Code" style="width: 150px; height: 150px; margin-top: 20px;" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="event-flexbox-row bottom">
|
||||
<label style="font-size: 9pt;" class="link" @click="showCommonSettings">Allgemeine Einstellungen</label>
|
||||
<label style="font-size: 9pt;" class="link" @click="showEventManagement">Veranstaltungsleitung</label>
|
||||
<label style="font-size: 9pt;" class="link" @click="eventData()">Details für Einladung</label>
|
||||
<label style="font-size: 9pt;" class="link" @click="showParticipationFees">Teilnahmegebühren</label>
|
||||
<a style="font-size: 9pt;" class="link" :href="'/cost-unit/' + props.data.event.costUnit.id">Ausgabenübersicht</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user