change props from text to link in FigureQrCode

This commit is contained in:
ogerly 2022-04-22 12:43:27 +02:00
parent 3163acabee
commit d595c76d08
4 changed files with 6 additions and 11 deletions

View File

@ -3,10 +3,10 @@
<b-col>
<b-card class="p-0 gradido-custom-background">
<div class="h3 mb-4">{{ $t('gdd_per_link.created') }}</div>
<clipboard-copy :text="link" @show-qr-code-button="showQrCodeButton" />
<clipboard-copy :link="link" @show-qr-code-button="showQrCodeButton" />
<div class="text-center">
<figure-qr-code v-if="showQrcode" :text="link" />
<figure-qr-code v-if="showQrcode" :link="link" />
<b-button variant="success" @click="$emit('on-reset')" class="mt-4">
{{ $t('form.close') }}
@ -42,10 +42,5 @@ export default {
this.showQrcode = !this.showQrcode
},
},
computed: {
link() {
return `${window.location.origin}/redeem/${this.code}`
},
},
}
</script>

View File

@ -4,7 +4,7 @@ import FigureQrCode from './FigureQrCode'
const localVue = global.localVue
const propsData = {
text: '',
link: '',
}
describe('FigureQrCode', () => {

View File

@ -14,14 +14,14 @@ export default {
QRCanvas,
},
props: {
text: { type: String, required: true },
link: { type: String, required: true },
},
data() {
return {
options: {
cellSize: 8,
correctLevel: 'H',
data: this.text,
data: this.link,
},
}
},

View File

@ -47,7 +47,7 @@
</b-row>
<b-modal :id="'modalPopover-' + id" title="QR-Code" ok-only hide-header-close>
<div class="text-center">
<figure-qr-code :text="link" />
<figure-qr-code :link="link" />
<p>{{ link }}</p>
</div>
</b-modal>