mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove unused parts of component
This commit is contained in:
parent
9a71d0b3e2
commit
fce0f04ab6
@ -39,37 +39,5 @@ describe('AmountAndNameRow', () => {
|
||||
expect(wrapper.find('div.gdd-transaction-list-item-name').find('a').exists()).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
describe('with linked user', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({
|
||||
linkedUser: { firstName: 'Bibi', lastName: 'Bloxberg', email: 'bibi@bloxberg.de' },
|
||||
})
|
||||
})
|
||||
|
||||
it('has a link with first and last name', () => {
|
||||
expect(wrapper.find('div.gdd-transaction-list-item-name').text()).toBe('Bibi Bloxberg')
|
||||
})
|
||||
|
||||
it('has a link', () => {
|
||||
expect(wrapper.find('div.gdd-transaction-list-item-name').find('a').exists()).toBe(true)
|
||||
})
|
||||
|
||||
describe('click link', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.find('div.gdd-transaction-list-item-name').find('a').trigger('click')
|
||||
})
|
||||
|
||||
it('emits set tunneled email', () => {
|
||||
expect(wrapper.emitted('set-tunneled-email')).toEqual([['bibi@bloxberg.de']])
|
||||
})
|
||||
|
||||
it('pushes the route with query for email', () => {
|
||||
expect(mocks.$router.push).toBeCalledWith({
|
||||
path: '/send',
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -10,21 +10,7 @@
|
||||
</b-col>
|
||||
<b-col cols="7">
|
||||
<div class="gdd-transaction-list-item-name">
|
||||
<span v-if="linkedUser && linkedUser.email">
|
||||
<b-link @click.stop="tunnelEmail">
|
||||
{{ itemText }}
|
||||
</b-link>
|
||||
</span>
|
||||
<span v-else>{{ itemText }}</span>
|
||||
<span v-if="linkId">
|
||||
{{ $t('via_link') }}
|
||||
<b-icon
|
||||
icon="link45deg"
|
||||
variant="muted"
|
||||
class="m-mb-1"
|
||||
:title="$t('gdd_per_link.redeemed-title')"
|
||||
/>
|
||||
</span>
|
||||
<span>{{ text }}</span>
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
@ -38,31 +24,9 @@ export default {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
linkedUser: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
linkId: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
tunnelEmail() {
|
||||
this.$emit('set-tunneled-email', this.linkedUser.email)
|
||||
this.$router.push({ path: '/send' })
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
itemText() {
|
||||
return this.linkedUser
|
||||
? this.linkedUser.firstName + ' ' + this.linkedUser.lastName
|
||||
: this.text
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user