/** * @copyright 2026 NHCarrigan * @license Naomi's Public License * @author Naomi Carrigan */ import { Component, OnInit, inject, signal, computed } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { SuggestionService } from '../../services/suggestion.service'; import { AuthService } from '../../services/auth.service'; import { PaginationComponent } from '../shared/pagination.component'; import { GameFormComponent } from '../shared/game-form.component'; import { BookFormComponent } from '../shared/book-form.component'; import { MusicFormComponent } from '../shared/music-form.component'; import { ShowFormComponent } from '../shared/show-form.component'; import { MangaFormComponent } from '../shared/manga-form.component'; import { ArtFormComponent } from '../shared/art-form.component'; import { Suggestion, SuggestionStatus, SuggestionEntity, CreateGameDto, UpdateGameDto, GameStatus, CreateBookDto, UpdateBookDto, BookStatus, CreateMusicDto, UpdateMusicDto, MusicStatus, MusicType, CreateShowDto, UpdateShowDto, ShowStatus, ShowType, CreateMangaDto, UpdateMangaDto, MangaStatus, CreateArtDto, UpdateArtDto } from '@library/shared-types'; @Component({ selector: 'app-admin-suggestions', standalone: true, imports: [CommonModule, FormsModule, PaginationComponent, GameFormComponent, BookFormComponent, MusicFormComponent, ShowFormComponent, MangaFormComponent, ArtFormComponent], template: `
Review and respond to community suggestions
No suggestions found.
Platform: {{ suggestion.gameData.platform }}
} @if (suggestion.gameData.notes) {Notes: {{ suggestion.gameData.notes }}
} @if (suggestion.gameData.coverImage) {Author: {{ suggestion.bookData.author }}
} @if (suggestion.bookData.isbn) {ISBN: {{ suggestion.bookData.isbn }}
} @if (suggestion.bookData.notes) {Notes: {{ suggestion.bookData.notes }}
} @if (suggestion.bookData.coverImage) {Artist: {{ suggestion.musicData.artist }}
} @if (suggestion.musicData.type) {Type: {{ suggestion.musicData.type }}
} @if (suggestion.musicData.notes) {Notes: {{ suggestion.musicData.notes }}
} @if (suggestion.musicData.coverArt) {Artist: {{ suggestion.artData.artist }}
} @if (suggestion.artData.description) {Description: {{ suggestion.artData.description }}
} @if (suggestion.artData.imageUrl) {Type: {{ suggestion.showData.type }}
} @if (suggestion.showData.notes) {Notes: {{ suggestion.showData.notes }}
} @if (suggestion.showData.coverImage) {Author: {{ suggestion.mangaData.author }}
} @if (suggestion.mangaData.notes) {Notes: {{ suggestion.mangaData.notes }}
} @if (suggestion.mangaData.coverImage) {