diff --git a/backend/src/graphql/arg/UpdateUserInfosArgs.ts b/backend/src/graphql/arg/UpdateUserInfosArgs.ts
index 22b548f91..4eade8f2f 100644
--- a/backend/src/graphql/arg/UpdateUserInfosArgs.ts
+++ b/backend/src/graphql/arg/UpdateUserInfosArgs.ts
@@ -1,6 +1,7 @@
import { IsBoolean, IsEnum, IsInt, IsString } from 'class-validator'
import { ArgsType, Field, InputType, Int } from 'type-graphql'
+import { GmsPublishLocationType } from '@enum/GmsPublishLocationType'
import { GmsPublishNameType } from '@enum/GmsPublishNameType'
import { Location } from '@model/Location'
@@ -49,10 +50,7 @@ export class UpdateUserInfosArgs {
@IsBoolean()
gmsAllowed?: boolean
- @Field(() => GmsPublishNameType, {
- nullable: true,
- defaultValue: GmsPublishNameType.GMS_PUBLISH_NAME_ALIAS_OR_INITALS,
- })
+ @Field(() => GmsPublishNameType, { nullable: true })
@IsEnum(GmsPublishNameType)
gmsPublishName?: GmsPublishNameType | null
@@ -60,7 +58,7 @@ export class UpdateUserInfosArgs {
@isValidLocation()
gmsLocation?: Location | null
- @Field(() => Int, { nullable: true, defaultValue: 2 })
- @IsInt()
- gmsPublishLocation?: number | null
+ @Field(() => GmsPublishLocationType, { nullable: true })
+ @IsEnum(GmsPublishLocationType)
+ gmsPublishLocation?: GmsPublishLocationType | null
}
diff --git a/backend/src/graphql/model/User.ts b/backend/src/graphql/model/User.ts
index 0d3cfccc7..166367fd1 100644
--- a/backend/src/graphql/model/User.ts
+++ b/backend/src/graphql/model/User.ts
@@ -1,6 +1,9 @@
import { User as dbUser } from '@entity/User'
import { ObjectType, Field, Int } from 'type-graphql'
+import { GmsPublishLocationType } from '@enum/GmsPublishLocationType'
+import { GmsPublishNameType } from '@enum/GmsPublishNameType'
+
import { KlickTipp } from './KlickTipp'
@ObjectType()
@@ -31,6 +34,7 @@ export class User {
this.hideAmountGDT = user.hideAmountGDT
this.gmsAllowed = user.gmsAllowed
this.gmsPublishName = user.gmsPublishName
+ this.gmsPublishLocation = user.gmsPublishLocation
}
}
@@ -79,8 +83,11 @@ export class User {
@Field(() => Boolean)
gmsAllowed: boolean
- @Field(() => Int, { nullable: true })
- gmsPublishName: number | null
+ @Field(() => GmsPublishNameType, { nullable: true })
+ gmsPublishName: GmsPublishNameType | null
+
+ @Field(() => GmsPublishLocationType, { nullable: true })
+ gmsPublishLocation: GmsPublishLocationType | null
// This is not the users publisherId, but the one of the users who recommend him
@Field(() => Int, { nullable: true })
diff --git a/frontend/src/components/UserSettings/UserGMSLocation.vue b/frontend/src/components/UserSettings/UserGMSLocation.vue
new file mode 100644
index 000000000..0d7fe9ab7
--- /dev/null
+++ b/frontend/src/components/UserSettings/UserGMSLocation.vue
@@ -0,0 +1,8 @@
+
+