Retires Support/donation/tiers page in favor of simple configurable link
This commit is contained in:
@@ -5,27 +5,24 @@ import { BehaviorSubject, firstValueFrom } from 'rxjs';
|
||||
|
||||
import { Show } from '../interfaces/show';
|
||||
import { Event } from '../interfaces/event';
|
||||
import { Tier } from '../interfaces/tier';
|
||||
import { StationConfig } from '../interfaces/station-config';
|
||||
import { HistoryEntry } from '../interfaces/history-entry';
|
||||
import { TeamMember } from '../interfaces/team-member';
|
||||
import { CommunityHighlight } from '../interfaces/community-highlight';
|
||||
import { ShowService } from '../services/show.service';
|
||||
import { EventService } from '../services/event.service';
|
||||
import { TierService } from '../services/tier.service';
|
||||
import { StationConfigService } from '../services/station-config.service';
|
||||
import { HistoryEntryService } from '../services/history-entry.service';
|
||||
import { TeamMemberService } from '../services/team-member.service';
|
||||
import { CommunityHighlightService } from '../services/community-highlight.service';
|
||||
import { AdminShowFormComponent } from './admin-show-form.component';
|
||||
import { AdminEventFormComponent } from './admin-event-form.component';
|
||||
import { AdminTierFormComponent } from './admin-tier-form.component';
|
||||
import { AdminStationFormComponent } from './admin-station-form.component';
|
||||
import { AdminHistoryFormComponent } from './admin-history-form.component';
|
||||
import { AdminTeamFormComponent } from './admin-team-form.component';
|
||||
import { AdminCommunityFormComponent } from './admin-community-form.component';
|
||||
|
||||
type TabKey = 'shows' | 'events' | 'tiers' | 'station' | 'history' | 'team' | 'community';
|
||||
type TabKey = 'shows' | 'events' | 'station' | 'history' | 'team' | 'community';
|
||||
|
||||
@Component({
|
||||
selector: 'app-admin',
|
||||
@@ -36,7 +33,6 @@ type TabKey = 'shows' | 'events' | 'tiers' | 'station' | 'history' | 'team' | 'c
|
||||
FormsModule,
|
||||
AdminShowFormComponent,
|
||||
AdminEventFormComponent,
|
||||
AdminTierFormComponent,
|
||||
AdminStationFormComponent,
|
||||
AdminHistoryFormComponent,
|
||||
AdminTeamFormComponent,
|
||||
@@ -48,7 +44,6 @@ type TabKey = 'shows' | 'events' | 'tiers' | 'station' | 'history' | 'team' | 'c
|
||||
export class AdminComponent implements OnInit {
|
||||
private showService = inject(ShowService);
|
||||
private eventService = inject(EventService);
|
||||
private tierService = inject(TierService);
|
||||
private stationConfigService = inject(StationConfigService);
|
||||
private historyEntryService = inject(HistoryEntryService);
|
||||
private teamMemberService = inject(TeamMemberService);
|
||||
@@ -59,7 +54,6 @@ export class AdminComponent implements OnInit {
|
||||
/** Item currently being edited (set by editXxx, cleared on save/close). */
|
||||
editingShow: Show | null = null;
|
||||
editingEvent: Event | null = null;
|
||||
editingTier: Tier | null = null;
|
||||
editingHistory: HistoryEntry | null = null;
|
||||
editingTeam: TeamMember | null = null;
|
||||
editingCommunity: CommunityHighlight | null = null;
|
||||
@@ -67,7 +61,6 @@ export class AdminComponent implements OnInit {
|
||||
/** BehaviorSubjects guarantee change detection via the async pipe — start empty, populated on load. */
|
||||
readonly shows$ = new BehaviorSubject<Show[]>([]);
|
||||
readonly events$ = new BehaviorSubject<Event[]>([]);
|
||||
readonly tiers$ = new BehaviorSubject<Tier[]>([]);
|
||||
readonly stationConfig$ = new BehaviorSubject<StationConfig | null>(null);
|
||||
readonly historyEntries$ = new BehaviorSubject<HistoryEntry[]>([]);
|
||||
readonly teamMembers$ = new BehaviorSubject<TeamMember[]>([]);
|
||||
@@ -75,7 +68,6 @@ export class AdminComponent implements OnInit {
|
||||
|
||||
showShowForm = false;
|
||||
showEventForm = false;
|
||||
showTierForm = false;
|
||||
showStationForm = false;
|
||||
showHistoryForm = false;
|
||||
showTeamForm = false;
|
||||
@@ -95,11 +87,6 @@ export class AdminComponent implements OnInit {
|
||||
this.events$.next(data);
|
||||
}
|
||||
|
||||
async reloadTiers(): Promise<void> {
|
||||
const data = await firstValueFrom(this.tierService.getTiers());
|
||||
this.tiers$.next(data);
|
||||
}
|
||||
|
||||
async reloadStationConfig(): Promise<void> {
|
||||
await this.stationConfigService.load();
|
||||
this.stationConfig$.next(this.stationConfigService.config());
|
||||
@@ -124,7 +111,6 @@ export class AdminComponent implements OnInit {
|
||||
await Promise.all([
|
||||
this.reloadShows(),
|
||||
this.reloadEvents(),
|
||||
this.reloadTiers(),
|
||||
this.reloadStationConfig(),
|
||||
this.reloadHistoryEntries(),
|
||||
this.reloadTeamMembers(),
|
||||
@@ -190,35 +176,6 @@ export class AdminComponent implements OnInit {
|
||||
await this.reloadEvents();
|
||||
}
|
||||
|
||||
// ── Tier CRUD ───────────────────────────────────────────
|
||||
|
||||
openTierForm(): void {
|
||||
this.editingTier = null;
|
||||
this.showTierForm = true;
|
||||
}
|
||||
|
||||
editTier(tier: Tier): void {
|
||||
this.editingTier = tier;
|
||||
this.showTierForm = true;
|
||||
}
|
||||
|
||||
onTierSaved(): void {
|
||||
this.reloadTiers();
|
||||
this.showTierForm = false;
|
||||
this.editingTier = null;
|
||||
}
|
||||
|
||||
onTierClosed(): void {
|
||||
this.showTierForm = false;
|
||||
this.editingTier = null;
|
||||
}
|
||||
|
||||
async deleteTier(id: number): Promise<void> {
|
||||
if (!confirm('Delete this tier?')) return;
|
||||
await firstValueFrom(this.tierService.deleteTier(id));
|
||||
await this.reloadTiers();
|
||||
}
|
||||
|
||||
// ── Station Config ──────────────────────────────────────
|
||||
|
||||
openStationForm(): void {
|
||||
|
||||
Reference in New Issue
Block a user