mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
refactor: Links in Frontend
This commit is contained in:
parent
ad167fc051
commit
4dcfb0a876
@ -131,6 +131,20 @@ describe('router', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('register-community', () => {
|
||||
it('loads the "registerCommunity" component', async () => {
|
||||
const component = await routes.find((r) => r.path === '/register-community').component()
|
||||
expect(component.default.name).toBe('registerCommunity')
|
||||
})
|
||||
})
|
||||
|
||||
describe('select-community', () => {
|
||||
it('loads the "registerSelectCommunity" component', async () => {
|
||||
const component = await routes.find((r) => r.path === '/select-community').component()
|
||||
expect(component.default.name).toBe('registerSelectCommunity')
|
||||
})
|
||||
})
|
||||
|
||||
describe('reset', () => {
|
||||
it('loads the "ResetPassword" component', async () => {
|
||||
const component = await routes.find((r) => r.path === '/reset/:optin').component()
|
||||
|
||||
@ -36,7 +36,7 @@ const routes = [
|
||||
path: '/thx/:comingFrom',
|
||||
component: () => import('../views/Pages/thx.vue'),
|
||||
beforeEnter: (to, from, next) => {
|
||||
const validFrom = ['password', 'reset', 'register', 'community']
|
||||
const validFrom = ['password', 'reset', 'register']
|
||||
if (!validFrom.includes(from.path.split('/')[1])) {
|
||||
next({ path: '/login' })
|
||||
} else {
|
||||
|
||||
@ -124,10 +124,11 @@
|
||||
|
||||
<div class="text-center">
|
||||
<div class="text-center">
|
||||
<b-button class="test-button-back" variant="outline-secondary" to="/login">
|
||||
{{ $t('back') }}
|
||||
</b-button>
|
||||
|
||||
<router-link to="/login">
|
||||
<b-button class="test-button-back" variant="outline-secondary">
|
||||
{{ $t('back') }}
|
||||
</b-button>
|
||||
</router-link>
|
||||
<b-button
|
||||
:disabled="!(namesFilled && emailFilled && form.agree && !!language)"
|
||||
type="submit"
|
||||
@ -145,13 +146,11 @@
|
||||
</b-row>
|
||||
</b-container>
|
||||
<div class="text-center pt-4">
|
||||
<b-button
|
||||
class="test-button-another-community"
|
||||
variant="outline-secondary"
|
||||
to="/select-community"
|
||||
>
|
||||
{{ $t('community.choose-another-community') }}
|
||||
</b-button>
|
||||
<router-link to="/select-community">
|
||||
<b-button class="test-button-another-community" variant="outline-secondary">
|
||||
{{ $t('community.choose-another-community') }}
|
||||
</b-button>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -17,24 +17,30 @@
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-col class="text-center">
|
||||
<b-button variant="outline-secondary" to="/register">
|
||||
{{ $t('community.continue-to-registration') }}
|
||||
</b-button>
|
||||
<router-link to="/register">
|
||||
<b-button variant="outline-secondary">
|
||||
{{ $t('community.continue-to-registration') }}
|
||||
</b-button>
|
||||
</router-link>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
<hr />
|
||||
<b-row>
|
||||
<b-col class="text-center">
|
||||
<b-button variant="outline-secondary" to="/select-community">
|
||||
{{ $t('community.choose-another-community') }}
|
||||
</b-button>
|
||||
<router-link to="/select-community">
|
||||
<b-button variant="outline-secondary">
|
||||
{{ $t('community.choose-another-community') }}
|
||||
</b-button>
|
||||
</router-link>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<hr />
|
||||
<b-row>
|
||||
<b-col class="text-center">
|
||||
<b-button variant="outline-secondary" to="/login">{{ $t('back') }}</b-button>
|
||||
<router-link to="/login">
|
||||
<b-button variant="outline-secondary">{{ $t('back') }}</b-button>
|
||||
</router-link>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
@ -44,7 +50,7 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'registerSelectCommunity',
|
||||
name: 'registerCommunity',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
|
||||
@ -14,9 +14,11 @@
|
||||
<br />
|
||||
{{ $store.state.community.description }}
|
||||
<br />
|
||||
<b-button variant="outline-secondary" to="/register">
|
||||
{{ $t('community.continue-to-registration') }}
|
||||
</b-button>
|
||||
<router-link to="/register">
|
||||
<b-button variant="outline-secondary">
|
||||
{{ $t('community.continue-to-registration') }}
|
||||
</b-button>
|
||||
</router-link>
|
||||
</b-card>
|
||||
</div>
|
||||
|
||||
@ -44,7 +46,9 @@
|
||||
</div>
|
||||
|
||||
<div class="text-center py-lg-4">
|
||||
<b-button variant="outline-secondary" to="/login">{{ $t('back') }}</b-button>
|
||||
<router-link to="/login">
|
||||
<b-button variant="outline-secondary">{{ $t('back') }}</b-button>
|
||||
</router-link>
|
||||
</div>
|
||||
</b-container>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user