Merge pull request #2924 from gradido/fix-reset-send-coins

fix(frontend): reset button send coins
This commit is contained in:
Hannes Heine 2023-04-06 16:16:30 +02:00 committed by GitHub
commit b6aa5983fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -130,6 +130,7 @@ import InputEmail from '@/components/Inputs/InputEmail'
import InputAmount from '@/components/Inputs/InputAmount'
import InputTextarea from '@/components/Inputs/InputTextarea'
import { user as userQuery } from '@/graphql/queries'
import { isEmpty } from 'lodash'
export default {
name: 'TransactionForm',
@ -176,7 +177,8 @@ export default {
this.form.amount = ''
this.form.memo = ''
this.$refs.formValidator.validate()
if (this.$route.query && !this.$route.query === {}) this.$router.replace({ query: undefined })
if (this.$route.query && !isEmpty(this.$route.query))
this.$router.replace({ query: undefined })
},
},
apollo: {

View File

@ -8,11 +8,9 @@ const routerPushMock = jest.fn()
const mocks = {
$router: {
push: routerPushMock,
history: {
current: {
fullPath: '/transactions',
},
},
},
$route: {
path: '/transactions',
},
}

View File

@ -34,8 +34,8 @@ export default {
},
},
methods: {
tunnelEmail() {
if (this.$router.history.current.fullPath !== '/send') this.$router.push({ path: '/send' })
async tunnelEmail() {
if (this.$route.path !== '/send') await this.$router.push({ path: '/send' })
this.$router.push({ query: { gradidoID: this.linkedUser.gradidoID } })
},
},