mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Add hideAmountGDD and hideAmountGDT to the login mutations and the verifyLogin queries
This commit is contained in:
parent
e936e2bf40
commit
2010a1b059
@ -27,6 +27,8 @@ export class User {
|
|||||||
this.klickTipp = null
|
this.klickTipp = null
|
||||||
this.hasElopage = null
|
this.hasElopage = null
|
||||||
this.creation = creation
|
this.creation = creation
|
||||||
|
this.hideAmountGDD = user.hideAmountGDD
|
||||||
|
this.hideAmountGDT = user.hideAmountGDT
|
||||||
}
|
}
|
||||||
|
|
||||||
@Field(() => Number)
|
@Field(() => Number)
|
||||||
@ -72,6 +74,12 @@ export class User {
|
|||||||
@Field(() => String)
|
@Field(() => String)
|
||||||
language: string
|
language: string
|
||||||
|
|
||||||
|
@Field(() => Boolean)
|
||||||
|
hideAmountGDD: boolean
|
||||||
|
|
||||||
|
@Field(() => Boolean)
|
||||||
|
hideAmountGDT: boolean
|
||||||
|
|
||||||
// This is not the users publisherId, but the one of the users who recommend him
|
// This is not the users publisherId, but the one of the users who recommend him
|
||||||
@Field(() => Number, { nullable: true })
|
@Field(() => Number, { nullable: true })
|
||||||
publisherId: number | null
|
publisherId: number | null
|
||||||
|
|||||||
@ -31,6 +31,8 @@ export const updateUserInfos = gql`
|
|||||||
$password: String
|
$password: String
|
||||||
$passwordNew: String
|
$passwordNew: String
|
||||||
$locale: String
|
$locale: String
|
||||||
|
$hideAmountGDD: boolean!
|
||||||
|
$hideAmountGDT: boolean!
|
||||||
) {
|
) {
|
||||||
updateUserInfos(
|
updateUserInfos(
|
||||||
firstName: $firstName
|
firstName: $firstName
|
||||||
@ -38,6 +40,8 @@ export const updateUserInfos = gql`
|
|||||||
password: $password
|
password: $password
|
||||||
passwordNew: $passwordNew
|
passwordNew: $passwordNew
|
||||||
language: $locale
|
language: $locale
|
||||||
|
hideAmountGDD: $hideAmountGDD
|
||||||
|
hideAmountGDT: $hideAmountGDT
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
@ -151,6 +155,8 @@ export const login = gql`
|
|||||||
publisherId
|
publisherId
|
||||||
isAdmin
|
isAdmin
|
||||||
creation
|
creation
|
||||||
|
hideAmountGDD
|
||||||
|
hideAmountGDT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|||||||
@ -14,6 +14,8 @@ export const verifyLogin = gql`
|
|||||||
publisherId
|
publisherId
|
||||||
isAdmin
|
isAdmin
|
||||||
creation
|
creation
|
||||||
|
hideAmountGDD
|
||||||
|
hideAmountGDT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|||||||
@ -50,6 +50,12 @@ export const mutations = {
|
|||||||
creation: (state, creation) => {
|
creation: (state, creation) => {
|
||||||
state.creation = creation
|
state.creation = creation
|
||||||
},
|
},
|
||||||
|
hideAmountGDD: (state, hideAmountGDD) => {
|
||||||
|
state.hideAmountGDD = hideAmountGDD
|
||||||
|
},
|
||||||
|
hideAmountGDT: (state, hideAmountGDT) => {
|
||||||
|
state.hideAmountGDT = hideAmountGDT
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
@ -64,6 +70,8 @@ export const actions = {
|
|||||||
commit('publisherId', data.publisherId)
|
commit('publisherId', data.publisherId)
|
||||||
commit('isAdmin', data.isAdmin)
|
commit('isAdmin', data.isAdmin)
|
||||||
commit('creation', data.creation)
|
commit('creation', data.creation)
|
||||||
|
commit('hideAmountGDD', data.hideAmountGDD)
|
||||||
|
commit('hideAmountGDT', data.hideAmountGDT)
|
||||||
},
|
},
|
||||||
logout: ({ commit, state }) => {
|
logout: ({ commit, state }) => {
|
||||||
commit('token', null)
|
commit('token', null)
|
||||||
@ -76,6 +84,8 @@ export const actions = {
|
|||||||
commit('publisherId', null)
|
commit('publisherId', null)
|
||||||
commit('isAdmin', false)
|
commit('isAdmin', false)
|
||||||
commit('creation', null)
|
commit('creation', null)
|
||||||
|
commit('hideAmountGDD', null)
|
||||||
|
commit('hideAmountGDT', null)
|
||||||
localStorage.clear()
|
localStorage.clear()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -102,6 +112,8 @@ try {
|
|||||||
hasElopage: false,
|
hasElopage: false,
|
||||||
publisherId: null,
|
publisherId: null,
|
||||||
creation: null,
|
creation: null,
|
||||||
|
hideAmountGDD: null,
|
||||||
|
hideAmountGDT: null,
|
||||||
},
|
},
|
||||||
getters: {},
|
getters: {},
|
||||||
// Syncronous mutation of the state
|
// Syncronous mutation of the state
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user