Add profile and house background preferences to SitePreferences: Extend SitePreferences model and related services to include profileBackground and houseBackground fields. Update API and UI components to support new background settings, enhancing user customization options.

This commit is contained in:
Julien Froidefond
2025-12-22 08:54:51 +01:00
parent 14c767cfc0
commit 9bcafe54d3
18 changed files with 295 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1349,6 +1349,8 @@ export const SitePreferencesScalarFieldEnum = {
eventsBackground: 'eventsBackground',
leaderboardBackground: 'leaderboardBackground',
challengesBackground: 'challengesBackground',
profileBackground: 'profileBackground',
houseBackground: 'houseBackground',
eventRegistrationPoints: 'eventRegistrationPoints',
eventFeedbackPoints: 'eventFeedbackPoints',
houseJoinPoints: 'houseJoinPoints',

View File

@@ -162,6 +162,8 @@ export const SitePreferencesScalarFieldEnum = {
eventsBackground: 'eventsBackground',
leaderboardBackground: 'leaderboardBackground',
challengesBackground: 'challengesBackground',
profileBackground: 'profileBackground',
houseBackground: 'houseBackground',
eventRegistrationPoints: 'eventRegistrationPoints',
eventFeedbackPoints: 'eventFeedbackPoints',
houseJoinPoints: 'houseJoinPoints',

View File

@@ -48,6 +48,8 @@ export type SitePreferencesMinAggregateOutputType = {
eventsBackground: string | null
leaderboardBackground: string | null
challengesBackground: string | null
profileBackground: string | null
houseBackground: string | null
eventRegistrationPoints: number | null
eventFeedbackPoints: number | null
houseJoinPoints: number | null
@@ -63,6 +65,8 @@ export type SitePreferencesMaxAggregateOutputType = {
eventsBackground: string | null
leaderboardBackground: string | null
challengesBackground: string | null
profileBackground: string | null
houseBackground: string | null
eventRegistrationPoints: number | null
eventFeedbackPoints: number | null
houseJoinPoints: number | null
@@ -78,6 +82,8 @@ export type SitePreferencesCountAggregateOutputType = {
eventsBackground: number
leaderboardBackground: number
challengesBackground: number
profileBackground: number
houseBackground: number
eventRegistrationPoints: number
eventFeedbackPoints: number
houseJoinPoints: number
@@ -111,6 +117,8 @@ export type SitePreferencesMinAggregateInputType = {
eventsBackground?: true
leaderboardBackground?: true
challengesBackground?: true
profileBackground?: true
houseBackground?: true
eventRegistrationPoints?: true
eventFeedbackPoints?: true
houseJoinPoints?: true
@@ -126,6 +134,8 @@ export type SitePreferencesMaxAggregateInputType = {
eventsBackground?: true
leaderboardBackground?: true
challengesBackground?: true
profileBackground?: true
houseBackground?: true
eventRegistrationPoints?: true
eventFeedbackPoints?: true
houseJoinPoints?: true
@@ -141,6 +151,8 @@ export type SitePreferencesCountAggregateInputType = {
eventsBackground?: true
leaderboardBackground?: true
challengesBackground?: true
profileBackground?: true
houseBackground?: true
eventRegistrationPoints?: true
eventFeedbackPoints?: true
houseJoinPoints?: true
@@ -243,6 +255,8 @@ export type SitePreferencesGroupByOutputType = {
eventsBackground: string | null
leaderboardBackground: string | null
challengesBackground: string | null
profileBackground: string | null
houseBackground: string | null
eventRegistrationPoints: number
eventFeedbackPoints: number
houseJoinPoints: number
@@ -281,6 +295,8 @@ export type SitePreferencesWhereInput = {
eventsBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
leaderboardBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
challengesBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
profileBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
houseBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
eventRegistrationPoints?: Prisma.IntFilter<"SitePreferences"> | number
eventFeedbackPoints?: Prisma.IntFilter<"SitePreferences"> | number
houseJoinPoints?: Prisma.IntFilter<"SitePreferences"> | number
@@ -296,6 +312,8 @@ export type SitePreferencesOrderByWithRelationInput = {
eventsBackground?: Prisma.SortOrderInput | Prisma.SortOrder
leaderboardBackground?: Prisma.SortOrderInput | Prisma.SortOrder
challengesBackground?: Prisma.SortOrderInput | Prisma.SortOrder
profileBackground?: Prisma.SortOrderInput | Prisma.SortOrder
houseBackground?: Prisma.SortOrderInput | Prisma.SortOrder
eventRegistrationPoints?: Prisma.SortOrder
eventFeedbackPoints?: Prisma.SortOrder
houseJoinPoints?: Prisma.SortOrder
@@ -314,6 +332,8 @@ export type SitePreferencesWhereUniqueInput = Prisma.AtLeast<{
eventsBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
leaderboardBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
challengesBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
profileBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
houseBackground?: Prisma.StringNullableFilter<"SitePreferences"> | string | null
eventRegistrationPoints?: Prisma.IntFilter<"SitePreferences"> | number
eventFeedbackPoints?: Prisma.IntFilter<"SitePreferences"> | number
houseJoinPoints?: Prisma.IntFilter<"SitePreferences"> | number
@@ -329,6 +349,8 @@ export type SitePreferencesOrderByWithAggregationInput = {
eventsBackground?: Prisma.SortOrderInput | Prisma.SortOrder
leaderboardBackground?: Prisma.SortOrderInput | Prisma.SortOrder
challengesBackground?: Prisma.SortOrderInput | Prisma.SortOrder
profileBackground?: Prisma.SortOrderInput | Prisma.SortOrder
houseBackground?: Prisma.SortOrderInput | Prisma.SortOrder
eventRegistrationPoints?: Prisma.SortOrder
eventFeedbackPoints?: Prisma.SortOrder
houseJoinPoints?: Prisma.SortOrder
@@ -352,6 +374,8 @@ export type SitePreferencesScalarWhereWithAggregatesInput = {
eventsBackground?: Prisma.StringNullableWithAggregatesFilter<"SitePreferences"> | string | null
leaderboardBackground?: Prisma.StringNullableWithAggregatesFilter<"SitePreferences"> | string | null
challengesBackground?: Prisma.StringNullableWithAggregatesFilter<"SitePreferences"> | string | null
profileBackground?: Prisma.StringNullableWithAggregatesFilter<"SitePreferences"> | string | null
houseBackground?: Prisma.StringNullableWithAggregatesFilter<"SitePreferences"> | string | null
eventRegistrationPoints?: Prisma.IntWithAggregatesFilter<"SitePreferences"> | number
eventFeedbackPoints?: Prisma.IntWithAggregatesFilter<"SitePreferences"> | number
houseJoinPoints?: Prisma.IntWithAggregatesFilter<"SitePreferences"> | number
@@ -367,6 +391,8 @@ export type SitePreferencesCreateInput = {
eventsBackground?: string | null
leaderboardBackground?: string | null
challengesBackground?: string | null
profileBackground?: string | null
houseBackground?: string | null
eventRegistrationPoints?: number
eventFeedbackPoints?: number
houseJoinPoints?: number
@@ -382,6 +408,8 @@ export type SitePreferencesUncheckedCreateInput = {
eventsBackground?: string | null
leaderboardBackground?: string | null
challengesBackground?: string | null
profileBackground?: string | null
houseBackground?: string | null
eventRegistrationPoints?: number
eventFeedbackPoints?: number
houseJoinPoints?: number
@@ -397,6 +425,8 @@ export type SitePreferencesUpdateInput = {
eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
challengesBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
profileBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
houseBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
eventRegistrationPoints?: Prisma.IntFieldUpdateOperationsInput | number
eventFeedbackPoints?: Prisma.IntFieldUpdateOperationsInput | number
houseJoinPoints?: Prisma.IntFieldUpdateOperationsInput | number
@@ -412,6 +442,8 @@ export type SitePreferencesUncheckedUpdateInput = {
eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
challengesBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
profileBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
houseBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
eventRegistrationPoints?: Prisma.IntFieldUpdateOperationsInput | number
eventFeedbackPoints?: Prisma.IntFieldUpdateOperationsInput | number
houseJoinPoints?: Prisma.IntFieldUpdateOperationsInput | number
@@ -427,6 +459,8 @@ export type SitePreferencesCreateManyInput = {
eventsBackground?: string | null
leaderboardBackground?: string | null
challengesBackground?: string | null
profileBackground?: string | null
houseBackground?: string | null
eventRegistrationPoints?: number
eventFeedbackPoints?: number
houseJoinPoints?: number
@@ -442,6 +476,8 @@ export type SitePreferencesUpdateManyMutationInput = {
eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
challengesBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
profileBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
houseBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
eventRegistrationPoints?: Prisma.IntFieldUpdateOperationsInput | number
eventFeedbackPoints?: Prisma.IntFieldUpdateOperationsInput | number
houseJoinPoints?: Prisma.IntFieldUpdateOperationsInput | number
@@ -457,6 +493,8 @@ export type SitePreferencesUncheckedUpdateManyInput = {
eventsBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
leaderboardBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
challengesBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
profileBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
houseBackground?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
eventRegistrationPoints?: Prisma.IntFieldUpdateOperationsInput | number
eventFeedbackPoints?: Prisma.IntFieldUpdateOperationsInput | number
houseJoinPoints?: Prisma.IntFieldUpdateOperationsInput | number
@@ -472,6 +510,8 @@ export type SitePreferencesCountOrderByAggregateInput = {
eventsBackground?: Prisma.SortOrder
leaderboardBackground?: Prisma.SortOrder
challengesBackground?: Prisma.SortOrder
profileBackground?: Prisma.SortOrder
houseBackground?: Prisma.SortOrder
eventRegistrationPoints?: Prisma.SortOrder
eventFeedbackPoints?: Prisma.SortOrder
houseJoinPoints?: Prisma.SortOrder
@@ -495,6 +535,8 @@ export type SitePreferencesMaxOrderByAggregateInput = {
eventsBackground?: Prisma.SortOrder
leaderboardBackground?: Prisma.SortOrder
challengesBackground?: Prisma.SortOrder
profileBackground?: Prisma.SortOrder
houseBackground?: Prisma.SortOrder
eventRegistrationPoints?: Prisma.SortOrder
eventFeedbackPoints?: Prisma.SortOrder
houseJoinPoints?: Prisma.SortOrder
@@ -510,6 +552,8 @@ export type SitePreferencesMinOrderByAggregateInput = {
eventsBackground?: Prisma.SortOrder
leaderboardBackground?: Prisma.SortOrder
challengesBackground?: Prisma.SortOrder
profileBackground?: Prisma.SortOrder
houseBackground?: Prisma.SortOrder
eventRegistrationPoints?: Prisma.SortOrder
eventFeedbackPoints?: Prisma.SortOrder
houseJoinPoints?: Prisma.SortOrder
@@ -535,6 +579,8 @@ export type SitePreferencesSelect<ExtArgs extends runtime.Types.Extensions.Inter
eventsBackground?: boolean
leaderboardBackground?: boolean
challengesBackground?: boolean
profileBackground?: boolean
houseBackground?: boolean
eventRegistrationPoints?: boolean
eventFeedbackPoints?: boolean
houseJoinPoints?: boolean
@@ -550,6 +596,8 @@ export type SitePreferencesSelectCreateManyAndReturn<ExtArgs extends runtime.Typ
eventsBackground?: boolean
leaderboardBackground?: boolean
challengesBackground?: boolean
profileBackground?: boolean
houseBackground?: boolean
eventRegistrationPoints?: boolean
eventFeedbackPoints?: boolean
houseJoinPoints?: boolean
@@ -565,6 +613,8 @@ export type SitePreferencesSelectUpdateManyAndReturn<ExtArgs extends runtime.Typ
eventsBackground?: boolean
leaderboardBackground?: boolean
challengesBackground?: boolean
profileBackground?: boolean
houseBackground?: boolean
eventRegistrationPoints?: boolean
eventFeedbackPoints?: boolean
houseJoinPoints?: boolean
@@ -580,6 +630,8 @@ export type SitePreferencesSelectScalar = {
eventsBackground?: boolean
leaderboardBackground?: boolean
challengesBackground?: boolean
profileBackground?: boolean
houseBackground?: boolean
eventRegistrationPoints?: boolean
eventFeedbackPoints?: boolean
houseJoinPoints?: boolean
@@ -589,7 +641,7 @@ export type SitePreferencesSelectScalar = {
updatedAt?: boolean
}
export type SitePreferencesOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "homeBackground" | "eventsBackground" | "leaderboardBackground" | "challengesBackground" | "eventRegistrationPoints" | "eventFeedbackPoints" | "houseJoinPoints" | "houseLeavePoints" | "houseCreatePoints" | "createdAt" | "updatedAt", ExtArgs["result"]["sitePreferences"]>
export type SitePreferencesOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "homeBackground" | "eventsBackground" | "leaderboardBackground" | "challengesBackground" | "profileBackground" | "houseBackground" | "eventRegistrationPoints" | "eventFeedbackPoints" | "houseJoinPoints" | "houseLeavePoints" | "houseCreatePoints" | "createdAt" | "updatedAt", ExtArgs["result"]["sitePreferences"]>
export type $SitePreferencesPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "SitePreferences"
@@ -600,6 +652,8 @@ export type $SitePreferencesPayload<ExtArgs extends runtime.Types.Extensions.Int
eventsBackground: string | null
leaderboardBackground: string | null
challengesBackground: string | null
profileBackground: string | null
houseBackground: string | null
eventRegistrationPoints: number
eventFeedbackPoints: number
houseJoinPoints: number
@@ -1035,6 +1089,8 @@ export interface SitePreferencesFieldRefs {
readonly eventsBackground: Prisma.FieldRef<"SitePreferences", 'String'>
readonly leaderboardBackground: Prisma.FieldRef<"SitePreferences", 'String'>
readonly challengesBackground: Prisma.FieldRef<"SitePreferences", 'String'>
readonly profileBackground: Prisma.FieldRef<"SitePreferences", 'String'>
readonly houseBackground: Prisma.FieldRef<"SitePreferences", 'String'>
readonly eventRegistrationPoints: Prisma.FieldRef<"SitePreferences", 'Int'>
readonly eventFeedbackPoints: Prisma.FieldRef<"SitePreferences", 'Int'>
readonly houseJoinPoints: Prisma.FieldRef<"SitePreferences", 'Int'>

View File

@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "SitePreferences" ADD COLUMN "profileBackground" TEXT;

View File

@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "SitePreferences" ADD COLUMN "houseBackground" TEXT;

View File

@@ -107,6 +107,8 @@ model SitePreferences {
eventsBackground String?
leaderboardBackground String?
challengesBackground String?
profileBackground String?
houseBackground String?
eventRegistrationPoints Int @default(100)
eventFeedbackPoints Int @default(100)
houseJoinPoints Int @default(100)