diff --git a/apps/frontend/src/app/components/admin/admin-suggestions.component.ts b/apps/frontend/src/app/components/admin/admin-suggestions.component.ts index a0198ed..ac171ca 100644 --- a/apps/frontend/src/app/components/admin/admin-suggestions.component.ts +++ b/apps/frontend/src/app/components/admin/admin-suggestions.component.ts @@ -10,12 +10,18 @@ import { FormsModule } from '@angular/forms'; import { SuggestionService } from '../../services/suggestion.service'; import { AuthService } from '../../services/auth.service'; import { PaginationComponent } from '../shared/pagination.component'; -import { Suggestion, SuggestionStatus, SuggestionEntity } from '@library/shared-types'; +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], + imports: [CommonModule, FormsModule, PaginationComponent, GameFormComponent, BookFormComponent, MusicFormComponent, ShowFormComponent, MangaFormComponent, ArtFormComponent], template: `
by {{ art()!.artist }}
+ @if (authService.user()?.isAdmin) { +
@@ -309,6 +325,35 @@ import { Book, Comment, BookStatus } from '@library/shared-types';
color: #4b5563;
}
+
+ .admin-actions {
+ display: flex;
+ gap: 0.75rem;
+ margin-bottom: 1.5rem;
+ padding: 1rem;
+ background: #fef3c7;
+ border-radius: 4px;
+ border: 1px solid #fbbf24;
+ }
+
+ .btn-edit {
+ background: #3b82f6;
+ color: white;
+ }
+
+ .btn-edit:hover {
+ background: #2563eb;
+ }
+
+ .btn-delete {
+ background: #ef4444;
+ color: white;
+ }
+
+ .btn-delete:hover {
+ background: #dc2626;
+ }
+
.series {
color: #8b6f47;
font-size: 1rem;
@@ -542,6 +587,7 @@ export class BookDetailComponent implements OnInit {
commentsLoading = signal(false);
error = signal
📚 {{ game()!.series }}@if (game()!.seriesOrder) { #{{ game()!.seriesOrder }}}
@@ -300,6 +317,34 @@ import { Game, Comment, GameStatus } from '@library/shared-types';
color: #4b5563;
}
+ .admin-actions {
+ display: flex;
+ gap: 0.75rem;
+ margin-bottom: 1.5rem;
+ padding: 1rem;
+ background: #fef3c7;
+ border-radius: 4px;
+ border: 1px solid #fbbf24;
+ }
+
+ .btn-edit {
+ background: #3b82f6;
+ color: white;
+ }
+
+ .btn-edit:hover {
+ background: #2563eb;
+ }
+
+ .btn-delete {
+ background: #ef4444;
+ color: white;
+ }
+
+ .btn-delete:hover {
+ background: #dc2626;
+ }
+
.series {
color: #8b6f47;
font-size: 1rem;
@@ -533,6 +578,7 @@ export class GameDetailComponent implements OnInit {
commentsLoading = signal(false);
error = signal by {{ music()!.artist }}