mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
getElopageLink to data and props elopageUri
This commit is contained in:
parent
d6b32b6ba5
commit
b874abb4f8
@ -68,6 +68,15 @@ describe('Navbar', () => {
|
||||
it('has first nav-item "members_area" in navbar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(7).text()).toEqual('members_area')
|
||||
})
|
||||
|
||||
it('has a link to the members area', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(7).text()).toContain('members_area')
|
||||
expect(wrapper.findAll('.nav-item').at(7).find('a').attributes('href')).toBe(
|
||||
'https://elopage.com/s/gradido/basic-de/payment?locale=en&prid=111&pid=123&firstName=User&lastName=Example&email=user@example.org',
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
it('has first nav-item "admin_area" in navbar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(8).text()).toEqual('admin_area')
|
||||
})
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
{{ $t('site.navbar.my-profil') }}
|
||||
</b-nav-item>
|
||||
<br />
|
||||
<b-nav-item class="mb-3" @click="$emit('getElopageLink')">
|
||||
<b-nav-item :href="elopageUri" class="mb-3" target="_blank">
|
||||
<b-icon icon="link45deg" aria-hidden="true"></b-icon>
|
||||
{{ $t('members_area') }}
|
||||
<b-badge v-if="!$store.state.hasElopage" pill variant="danger">!</b-badge>
|
||||
@ -78,6 +78,10 @@ export default {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
elopageUri: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</b-nav>
|
||||
<hr />
|
||||
<b-nav vertical class="w-100">
|
||||
<b-nav-item class="mb-3" @click="$emit('get-elopage-link')">
|
||||
<b-nav-item class="mb-3" :href="elopageUri" target="_blank">
|
||||
<b-icon icon="link45deg" aria-hidden="true"></b-icon>
|
||||
{{ $t('members_area') }}
|
||||
<b-badge v-if="!$store.state.hasElopage" pill variant="danger">!</b-badge>
|
||||
@ -35,5 +35,11 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'sidebar',
|
||||
props: {
|
||||
elopageUri: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -138,9 +138,7 @@ describe('DashboardLayoutGdd', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('has a logout button', () => {
|
||||
expect(wrapper.findAll('ul').at(3).text()).toBe('logout')
|
||||
})
|
||||
|
||||
|
||||
describe('logout', () => {
|
||||
beforeEach(async () => {
|
||||
|
||||
@ -4,19 +4,14 @@
|
||||
class="main-navbar"
|
||||
:balance="balance"
|
||||
:visible="visible"
|
||||
:elopageUri="elopageUri"
|
||||
@set-visible="setVisible"
|
||||
@get-elopage-link="getElopageLink"
|
||||
@admin="admin"
|
||||
@logout="logout"
|
||||
/>
|
||||
<div class="content-gradido">
|
||||
<div class="d-none d-sm-none d-md-none d-lg-flex shadow-lg" style="width: 300px">
|
||||
<sidebar
|
||||
class="main-sidebar"
|
||||
@getElopageLink="getElopageLink"
|
||||
@admin="admin"
|
||||
@logout="logout"
|
||||
/>
|
||||
<sidebar class="main-sidebar" :elopageUri="elopageUri" @admin="admin" @logout="logout" />
|
||||
</div>
|
||||
|
||||
<div class="main-page ml-2 mr-2" style="width: 100%" @click="visible = false">
|
||||
@ -64,6 +59,7 @@ export default {
|
||||
transactionCount: 0,
|
||||
pending: true,
|
||||
visible: false,
|
||||
elopageUri: this.getElopageLink(),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user