generated from nhcarrigan/template
feat: add primary badge selection for user profiles
Implements #49 - Allow users to select one primary badge to display on their profile instead of showing all badges at once. Changes: - Add PrimaryBadge enum to Prisma schema and shared types (STAFF, MOD, VIP, DISCORD) - Add primaryBadge field to User model and all user interfaces - Update settings component with badge selection dropdown - Only show badges the user actually has in the dropdown - Update profile component to display only selected badge (or all if none selected) - Add primaryBadge to admin profile edit modal - Update API routes and services to handle primaryBadge - Export PrimaryBadge enum from shared-types (not just as type) Additional fixes: - Fix Angular output naming: rename onEdit/onDelete to edit/delete - Update all parent components using comment-display outputs - Add type casting for Prisma PrimaryBadge enum to shared-types enum
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ApiService } from './api.service';
|
||||
import { User } from '@library/shared-types';
|
||||
import { User, PrimaryBadge } from '@library/shared-types';
|
||||
|
||||
export interface UserProfileResponse {
|
||||
id: string;
|
||||
@@ -16,6 +16,7 @@ export interface UserProfileResponse {
|
||||
avatar?: string;
|
||||
bio?: string;
|
||||
slug?: string;
|
||||
primaryBadge?: PrimaryBadge;
|
||||
website?: string;
|
||||
discordServer?: string;
|
||||
bluesky?: string;
|
||||
@@ -43,6 +44,7 @@ export interface UpdateUserSettingsRequest {
|
||||
displayName?: string;
|
||||
bio?: string;
|
||||
profilePublic?: boolean;
|
||||
primaryBadge?: PrimaryBadge;
|
||||
website?: string;
|
||||
discordServer?: string;
|
||||
bluesky?: string;
|
||||
|
||||
Reference in New Issue
Block a user