mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
* initial dependency update with initial setup * initial dependency update with initial setup * lock update * Revert "initial dependency update with initial setup" This reverts commit aa71afc3eca20042a1e13066bee1730a15606dd2. * admin - moved to vite * feat(admin): migration packages update (#3327) * bump apollo package * extend vue config * create useCreationMonths composable * WIP * temporary * install dependencies * adjust configs * rework footer component * remove not needed spaces, * rework overview page * rework component * rework user search page * rework navbar * navbar adjustments * add depenedencies * style adjustment in footer * composable adjustments * update node version * rework search and pagination * feat(admin) - disable unit tests for migration time * feat(admin) - update eslint * wip on search user * rework creation formular component * feat(admin) - update eslint babel * feat(admin) - change stylelint version, fix eslint errors * feat(admin) - update dependency * feat(admin) - update dependency * feat(admin) - update dependency * feat(admin) - update dependency * feat(admin) - update dependency * feat(admin) - update dependency * feat(admin) - update dependency, update node * feat(admin) - update icons --------- Co-authored-by: Mateusz Michałowski <mateusz.michalowski@monterail.com> --------- Co-authored-by: Kamila Lach <80581523+unnunhexium@users.noreply.github.com>
91 lines
2.5 KiB
Vue
91 lines
2.5 KiB
Vue
<template>
|
|
<div class="contribution-link">
|
|
<b-card
|
|
border-variant="success"
|
|
:header="$t('contributionLink.contributionLinks')"
|
|
header-bg-variant="success"
|
|
header-text-variant="white"
|
|
header-class="text-center"
|
|
class="mt-5"
|
|
>
|
|
<b-button
|
|
v-if="!editContributionLink"
|
|
class="my-3 d-flex justify-content-left"
|
|
data-test="new-contribution-link-button"
|
|
@click="visible = !visible"
|
|
>
|
|
{{ $t('math.plus') }} {{ $t('contributionLink.newContributionLink') }}
|
|
</b-button>
|
|
|
|
<b-collapse id="newContribution" v-model="visible" class="mt-2">
|
|
<b-card>
|
|
<p class="h2 ml-5">{{ $t('contributionLink.contributionLinks') }}</p>
|
|
<contribution-link-form
|
|
:contribution-link-data="contributionLinkData"
|
|
:edit-contribution-link="editContributionLink"
|
|
@get-contribution-links="$emit('get-contribution-links')"
|
|
@close-contribution-form="closeContributionForm"
|
|
/>
|
|
</b-card>
|
|
</b-collapse>
|
|
|
|
<b-card-text>
|
|
<contribution-link-list
|
|
v-if="count > 0"
|
|
:items="items"
|
|
@edit-contribution-link-data="editContributionLinkData"
|
|
@get-contribution-links="$emit('get-contribution-links')"
|
|
@close-contribution-form="closeContributionForm"
|
|
/>
|
|
<div v-else>{{ $t('contributionLink.noContributionLinks') }}</div>
|
|
</b-card-text>
|
|
</b-card>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import ContributionLinkForm from '../ContributionLink/ContributionLinkForm'
|
|
import ContributionLinkList from '../ContributionLink/ContributionLinkList'
|
|
|
|
export default {
|
|
name: 'ContributionLink',
|
|
components: {
|
|
ContributionLinkForm,
|
|
ContributionLinkList,
|
|
},
|
|
props: {
|
|
items: {
|
|
type: Array,
|
|
required: true,
|
|
},
|
|
count: {
|
|
type: Number,
|
|
required: true,
|
|
},
|
|
},
|
|
emits: ['get-contribution-links'],
|
|
data: function () {
|
|
return {
|
|
visible: false,
|
|
contributionLinkData: {},
|
|
editContributionLink: false,
|
|
}
|
|
},
|
|
methods: {
|
|
closeContributionForm() {
|
|
if (this.visible) {
|
|
this.$root.$emit('bv::toggle::collapse', 'newContribution')
|
|
this.editContributionLink = false
|
|
this.contributionLinkData = {}
|
|
}
|
|
},
|
|
editContributionLinkData(data) {
|
|
if (!this.visible) {
|
|
this.$root.$emit('bv::toggle::collapse', 'newContribution')
|
|
}
|
|
this.contributionLinkData = data
|
|
this.editContributionLink = true
|
|
},
|
|
},
|
|
}
|
|
</script>
|