mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
query transaction links as admin
This commit is contained in:
parent
ab0f7c8c7e
commit
752228a7ea
@ -5,7 +5,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listTransactionLinks } from '../graphql/listTransactionLinks.js'
|
||||
import { listTransactionLinksAdmin } from '../graphql/listTransactionLinksAdmin.js'
|
||||
export default {
|
||||
name: 'LinksTransactionListFormular',
|
||||
props: {
|
||||
@ -42,19 +42,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getListTransactionLinks() {
|
||||
alert('es wird nur die id von peter erkannt. bitte die links der userId aus dem backend geben.')
|
||||
this.$apollo
|
||||
.query({
|
||||
query: listTransactionLinks,
|
||||
query: listTransactionLinksAdmin,
|
||||
variables: {
|
||||
currentPage: 1,
|
||||
pageSize: 5,
|
||||
userId: parseInt(this.userId),
|
||||
userId: this.userId,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
console.log(result.data.listTransactionLinks)
|
||||
this.items = result.data.listTransactionLinks
|
||||
this.items = result.data.listTransactionLinksAdmin
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toastError(error.message)
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
export const listTransactionLinks = gql`
|
||||
query($currentPage: Int = 1, $pageSize: Int = 5) {
|
||||
listTransactionLinks(currentPage: $currentPage, pageSize: $pageSize) {
|
||||
id
|
||||
amount
|
||||
holdAvailableAmount
|
||||
memo
|
||||
code
|
||||
createdAt
|
||||
validUntil
|
||||
redeemedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
16
admin/src/graphql/listTransactionLinksAdmin.js
Normal file
16
admin/src/graphql/listTransactionLinksAdmin.js
Normal file
@ -0,0 +1,16 @@
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
export const listTransactionLinksAdmin = gql`
|
||||
query ($currentPage: Int = 1, $pageSize: Int = 5, $userId: Int!) {
|
||||
listTransactionLinksAdmin(currentPage: $currentPage, pageSize: $pageSize, userId: $userId) {
|
||||
id
|
||||
amount
|
||||
holdAvailableAmount
|
||||
memo
|
||||
code
|
||||
createdAt
|
||||
validUntil
|
||||
redeemedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
@ -83,8 +83,8 @@
|
||||
},
|
||||
"transactionlink": {
|
||||
"form_header": "Transaktion Links",
|
||||
"created":"Erstellt",
|
||||
"expired":"Abgelaufen"
|
||||
"created": "Erstellt",
|
||||
"expired": "Abgelaufen"
|
||||
},
|
||||
"undelete_user": "Nutzer wiederherstellen",
|
||||
"unregistered_emails": "Nur unregistrierte Nutzer",
|
||||
|
||||
@ -83,8 +83,8 @@
|
||||
},
|
||||
"transactionlink": {
|
||||
"form_header": "Transaction links",
|
||||
"created":"Created",
|
||||
"expired":"Expired"
|
||||
"created": "Created",
|
||||
"expired": "Expired"
|
||||
},
|
||||
"undelete_user": "Undelete User",
|
||||
"unregistered_emails": "Only unregistered users",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user