Merge branch 'admin_pending_creation' into adminPendingCreationQueries

This commit is contained in:
elweyn 2021-11-30 10:10:15 +01:00
commit ffed004b1a
6 changed files with 8 additions and 28 deletions

View File

@ -54,7 +54,7 @@
</b-col>
</b-row>
<b-row class="m-4" v-show="createdIndex != null">
<b-row class="m-4" v-show="createdIndex">
<label>Betrag Auswählen</label>
<div>
<b-input-group prepend="GDD" append=".00">
@ -237,7 +237,7 @@ export default {
email: this.item.email,
creationDate: this.radioSelected.long,
amount: this.value,
note: this.text,
memo: this.text,
moderator: this.$store.state.moderator.id,
},
]
@ -255,7 +255,7 @@ export default {
email: this.item.email,
creationDate: this.radioSelected.long,
amount: Number(this.value),
note: this.text,
memo: this.text,
moderator: Number(this.$store.state.moderator.id),
}

View File

@ -2,7 +2,7 @@
<div class="component-nabvar">
<b-navbar toggleable="sm" type="dark" variant="success">
<b-navbar-brand to="/">
<img :src="logo" class="navbar-brand-img" alt="..." />
<img src="img/brand/green.png" class="navbar-brand-img" alt="..." />
</b-navbar-brand>
<b-navbar-toggle target="nav-collapse"></b-navbar-toggle>
@ -32,28 +32,8 @@ import CONFIG from '../config'
export default {
name: 'navbar',
data() {
return {
logo: 'img/brand/green.png',
}
},
methods: {
logout() {
// TODO
// this.$emit('logout')
/* this.$apollo
.query({
query: logout,
})
.then(() => {
this.$store.dispatch('logout')
this.$router.push('/logout')
})
.catch(() => {
this.$store.dispatch('logout')
if (this.$router.currentRoute.path !== '/logout') this.$router.push('/logout')
})
*/
this.$store.dispatch('logout')
this.$router.push('/logout')
},

View File

@ -9,7 +9,7 @@ export default class CreatePendingCreationArgs {
amount: number
@Field(() => String)
note: string
memo: string
@Field(() => String)
creationDate: string

View File

@ -31,7 +31,7 @@ export class AdminResolver {
@Query(() => [Number])
async createPendingCreation(
@Args() { email, amount, note, creationDate, moderator }: CreatePendingCreationArgs,
@Args() { email, amount, memo, creationDate, moderator }: CreatePendingCreationArgs,
): Promise<number[]> {
const userRepository = getCustomRepository(UserRepository)
const user = await userRepository.findByEmail(email)
@ -45,7 +45,7 @@ export class AdminResolver {
loginPendingTaskAdmin.amount = BigInt(amount * 10000)
loginPendingTaskAdmin.created = new Date()
loginPendingTaskAdmin.date = creationDateObj
loginPendingTaskAdmin.note = note
loginPendingTaskAdmin.memo = memo
loginPendingTaskAdmin.moderator = moderator
pendingCreationRepository.save(loginPendingTaskAdmin)

View File

@ -16,7 +16,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
\`userId\` int UNSIGNED DEFAULT 0,
\`created\` datetime NOT NULL,
\`date\` datetime NOT NULL,
\`note\` text DEFAULT NULL,
\`memo\` text DEFAULT NULL,
\`amount\` bigint(20) NOT NULL,
\`moderator\` int UNSIGNED DEFAULT 0,
PRIMARY KEY (\`id\`)