Files
Calendar_Frontend/src/app/pages/admin/admin.component.html
T
Paddy f82255961b
Jenkins Production Deployment
Sign in through the admin app instead of this one (#20)
Reviewed-on: #20
Co-authored-by: Patrick Müller <mail@pmueller.me>
Co-committed-by: Patrick Müller <mail@pmueller.me>
2026-09-06 21:13:12 +00:00

57 lines
2.4 KiB
HTML

<!--
No sign-in form and no registration form: accounts live in the admin app and
the session is one cookie shared by all four apps. What is left here is a
link to the right place, plus the two states that must not turn into a
redirect loop - see `failure` in the component.
-->
<div *ngIf="!isLoggedIn && failure === null" class="form-container">
<p>Signing you in&hellip;</p>
<button (click)="signIn()">Go to sign-in</button>
</div>
<div *ngIf="failure === 'denied'" class="form-container">
<p>This account does not have access to the calendar.</p>
<p>Ask an administrator to grant it in the admin app, then reload.</p>
<button (click)="reload()">Reload</button>
<button (click)="logout()">Sign out</button>
</div>
<div *ngIf="failure === 'unavailable'" class="form-container">
<p>The administration service cannot be reached right now.</p>
<button (click)="reload()">Reload</button>
</div>
<div *ngIf="isLoggedIn && failure === null">
<span>Logged in as {{getUserName()}}</span>
<span>&nbsp;</span>
<button (click)="logout()">Logout</button>
<span>&nbsp; | &nbsp;</span>
<span>Calendar: </span>
<select [(ngModel)]="selectedCalendar" (change)="handleCalendarChange()">
<option value="" disabled selected hidden>Select calendar</option>
<option value="public">Public</option>
<option value="members">Internal - Members</option>
<option value="choir">Internal - Choir</option>
<option value="management">Internal - Management</option>
<option value="birthdays">Internal - Birthdays</option>
</select>
<span>&nbsp; | &nbsp;</span>
<span>Filter: </span>
<select [(ngModel)]="eventFilter" (change)="getEvents()">
<option value="all">All Events</option>
<option value="future">Future Events only</option>
<option value="past">Past Events only</option>
</select>
<span>&nbsp; | &nbsp;</span>
<span>Sorting: </span>
<select [(ngModel)]="eventSorting" (change)="sortEvents()">
<option value="start_asc">Start Date - Ascending</option>
<option value="start_desc">Start Date - Descending</option>
<option value="created_asc">Created Date - Ascending</option>
<option value="created_desc">Created Date - Descending</option>
</select>
<span>&nbsp; | &nbsp;</span>
<button (click)="getEvents()">Reload Events</button>
<div style="height: 1em;"></div>
<div id="events-table">
<app-events-table [events]="this.events" [selectedCalendar]="getCalendarId(selectedCalendar)"></app-events-table>
</div>
</div>