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>
|
||||
<script>
|
||||
import { adminUpdateContribution } from '../graphql/adminUpdateContribution'
|
||||
import { openCreations } from '../graphql/openCreations'
|
||||
import { creationMonths } from '../mixins/creationMonths'
|
||||
|
||||
export default {
|
||||
@ -96,10 +97,6 @@ export default {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
creation: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -108,6 +105,7 @@ export default {
|
||||
rangeMin: 0,
|
||||
rangeMax: 1000,
|
||||
selected: '',
|
||||
creation: [0, 0, 0],
|
||||
}
|
||||
},
|
||||
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() {
|
||||
if (this.creationUserData.date) {
|
||||
const month = this.$d(new Date(this.creationUserData.date), 'month')
|
||||
|
||||
@ -93,7 +93,6 @@
|
||||
<div v-if="row.item.moderatorId">
|
||||
<edit-creation-formular
|
||||
type="singleCreation"
|
||||
:creation="row.item.creation"
|
||||
:item="row.item"
|
||||
:row="row"
|
||||
: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",
|
||||
"open": "Open"
|
||||
},
|
||||
"created": "Confirmed",
|
||||
"createdAt": "Created",
|
||||
"creation": "Creation",
|
||||
"created": "Created for",
|
||||
"createdAt": "Created at",
|
||||
"creation": "Amount",
|
||||
"creationList": "Creation list",
|
||||
"creation_form": {
|
||||
"creation_for": "Active Basic Income for",
|
||||
|
||||
@ -25,7 +25,11 @@
|
||||
</div>
|
||||
<div class="mt-3 font-weight-bold">{{ $t('contributionText') }}</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') }}
|
||||
</div>
|
||||
</b-col>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<span class="ml-2">{{ $t('navigation.overview') }}</span>
|
||||
</b-nav-item>
|
||||
<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>
|
||||
</b-nav-item>
|
||||
<b-nav-item to="/transactions" class="mb-3" active-class="activeRoute">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user