mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'open-creations-query-admin' into 2803-open-contribution-edit-button
This commit is contained in:
commit
91c74331ff
@ -75,6 +75,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { adminUpdateContribution } from '../graphql/adminUpdateContribution'
|
import { adminUpdateContribution } from '../graphql/adminUpdateContribution'
|
||||||
|
import { openCreations } from '../graphql/openCreations'
|
||||||
import { creationMonths } from '../mixins/creationMonths'
|
import { creationMonths } from '../mixins/creationMonths'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -96,10 +97,6 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
creation: {
|
|
||||||
type: Array,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -108,6 +105,7 @@ export default {
|
|||||||
rangeMin: 0,
|
rangeMin: 0,
|
||||||
rangeMax: 1000,
|
rangeMax: 1000,
|
||||||
selected: '',
|
selected: '',
|
||||||
|
creation: [0, 0, 0],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -151,6 +149,25 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
apollo: {
|
||||||
|
OpenCreations: {
|
||||||
|
query() {
|
||||||
|
return openCreations
|
||||||
|
},
|
||||||
|
fetchPolicy: 'network-only',
|
||||||
|
variables() {
|
||||||
|
return {
|
||||||
|
userId: this.item.userId,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update({ openCreations }) {
|
||||||
|
this.creation = openCreations.map((c) => c.amount)
|
||||||
|
},
|
||||||
|
error({ message }) {
|
||||||
|
this.toastError(message)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.creationUserData.date) {
|
if (this.creationUserData.date) {
|
||||||
const month = this.$d(new Date(this.creationUserData.date), 'month')
|
const month = this.$d(new Date(this.creationUserData.date), 'month')
|
||||||
|
|||||||
@ -93,7 +93,6 @@
|
|||||||
<div v-if="row.item.moderatorId">
|
<div v-if="row.item.moderatorId">
|
||||||
<edit-creation-formular
|
<edit-creation-formular
|
||||||
type="singleCreation"
|
type="singleCreation"
|
||||||
:creation="row.item.creation"
|
|
||||||
:item="row.item"
|
:item="row.item"
|
||||||
:row="row"
|
:row="row"
|
||||||
:creationUserData="creationUserData"
|
:creationUserData="creationUserData"
|
||||||
|
|||||||
11
admin/src/graphql/openCreations.js
Normal file
11
admin/src/graphql/openCreations.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import gql from 'graphql-tag'
|
||||||
|
|
||||||
|
export const openCreations = gql`
|
||||||
|
query ($userId: Int) {
|
||||||
|
openCreations(userId: $userID) {
|
||||||
|
year
|
||||||
|
month
|
||||||
|
amount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
@ -37,9 +37,9 @@
|
|||||||
"denied": "Rejected",
|
"denied": "Rejected",
|
||||||
"open": "Open"
|
"open": "Open"
|
||||||
},
|
},
|
||||||
"created": "Confirmed",
|
"created": "Created for",
|
||||||
"createdAt": "Created",
|
"createdAt": "Created at",
|
||||||
"creation": "Creation",
|
"creation": "Amount",
|
||||||
"creationList": "Creation list",
|
"creationList": "Creation list",
|
||||||
"creation_form": {
|
"creation_form": {
|
||||||
"creation_for": "Active Basic Income for",
|
"creation_for": "Active Basic Income for",
|
||||||
|
|||||||
@ -25,7 +25,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-3 font-weight-bold">{{ $t('contributionText') }}</div>
|
<div class="mt-3 font-weight-bold">{{ $t('contributionText') }}</div>
|
||||||
<div class="mb-3 text-break word-break">{{ memo }}</div>
|
<div class="mb-3 text-break word-break">{{ memo }}</div>
|
||||||
<div v-if="state === 'IN_PROGRESS' && !allContribution" class="text-205">
|
<div
|
||||||
|
v-if="state === 'IN_PROGRESS'"
|
||||||
|
class="text-205 pointer hover-font-bold"
|
||||||
|
@click="visible = !visible"
|
||||||
|
>
|
||||||
{{ $t('contribution.alert.answerQuestion') }}
|
{{ $t('contribution.alert.answerQuestion') }}
|
||||||
</div>
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<span class="ml-2">{{ $t('navigation.overview') }}</span>
|
<span class="ml-2">{{ $t('navigation.overview') }}</span>
|
||||||
</b-nav-item>
|
</b-nav-item>
|
||||||
<b-nav-item to="/send" class="mb-3" active-class="activeRoute">
|
<b-nav-item to="/send" class="mb-3" active-class="activeRoute">
|
||||||
<b-img src="/img/svg/send.svg" height="20" class="svg-icon" />
|
<b-icon icon="cash" aria-hidden="true"></b-icon>
|
||||||
<span class="ml-2">{{ $t('navigation.send') }}</span>
|
<span class="ml-2">{{ $t('navigation.send') }}</span>
|
||||||
</b-nav-item>
|
</b-nav-item>
|
||||||
<b-nav-item to="/transactions" class="mb-3" active-class="activeRoute">
|
<b-nav-item to="/transactions" class="mb-3" active-class="activeRoute">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user