Add conditional display logic to staff application form based on open/close status
This commit is contained in:
parent
5eaeb3552a
commit
ed9d41cdc6
|
|
@ -6,6 +6,7 @@
|
||||||
</div>
|
</div>
|
||||||
</app-header>
|
</app-header>
|
||||||
<main>
|
<main>
|
||||||
|
@if (staffApplicationsIsOpen()) {
|
||||||
<section class="darkmodeSection staff-application-container">
|
<section class="darkmodeSection staff-application-container">
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
|
|
@ -29,7 +30,8 @@
|
||||||
<p>You are logged in as <strong>{{ authService.username() }}</strong>. If this is the correct account
|
<p>You are logged in as <strong>{{ authService.username() }}</strong>. If this is the correct account
|
||||||
please continue</p>
|
please continue</p>
|
||||||
<br>
|
<br>
|
||||||
<p><strong>Notice: </strong> Submitting a staff application is <strong>not</strong> an instant process.
|
<p><strong>Notice: </strong> Submitting a staff application is <strong>not</strong> an instant
|
||||||
|
process.
|
||||||
We will review your application carefully and get back to you if we think you're a good fit.</p>
|
We will review your application carefully and get back to you if we think you're a good fit.</p>
|
||||||
<p style="font-style: italic;">Applications that seem to have been made with
|
<p style="font-style: italic;">Applications that seem to have been made with
|
||||||
little to no effort will be automatically rejected.</p>
|
little to no effort will be automatically rejected.</p>
|
||||||
|
|
@ -114,7 +116,8 @@
|
||||||
<!-- PC Requirements -->
|
<!-- PC Requirements -->
|
||||||
<div class="checkbox-field">
|
<div class="checkbox-field">
|
||||||
<mat-checkbox formControlName="meetsRequirements">
|
<mat-checkbox formControlName="meetsRequirements">
|
||||||
I confirm that I meet the PC requirements (able to record video at 30fps 720p or higher, and able
|
I confirm that I meet the PC requirements (able to record video at 30fps 720p or higher, and
|
||||||
|
able
|
||||||
to talk in voice chat)
|
to talk in voice chat)
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
@if (form.controls.meetsRequirements.invalid && form.controls.meetsRequirements.touched) {
|
@if (form.controls.meetsRequirements.invalid && form.controls.meetsRequirements.touched) {
|
||||||
|
|
@ -314,5 +317,9 @@
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
} @else {
|
||||||
|
<h1>Staff applications are closed at this time. Please keep an eye on our announcement channel in Discord to see
|
||||||
|
when it opens!</h1>
|
||||||
|
}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ export class StaffApplicationComponent implements OnInit, OnDestroy, AfterViewIn
|
||||||
protected availableDays: string[] = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
protected availableDays: string[] = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
||||||
protected selectedDays: string[] = [];
|
protected selectedDays: string[] = [];
|
||||||
protected userTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
protected userTimezone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||||
|
protected staffApplicationsIsOpen = signal<boolean>(false)
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
|
@ -151,6 +152,9 @@ export class StaffApplicationComponent implements OnInit, OnDestroy, AfterViewIn
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.staffApplicationService.getStaffApplicationsIsOpen().subscribe(isOpen => {
|
||||||
|
this.staffApplicationsIsOpen.set(isOpen)
|
||||||
|
})
|
||||||
const uuid = this.authService.getUuid();
|
const uuid = this.authService.getUuid();
|
||||||
if (uuid === null) {
|
if (uuid === null) {
|
||||||
alert('Error retrieving token, please relog on the website and try again')
|
alert('Error retrieving token, please relog on the website and try again')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user