Skip to content
Snippets Groups Projects
Commit 0d78b873 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

add user query

parent e12d4c31
No related branches found
No related tags found
1 merge request!1Add user query
......@@ -32,7 +32,7 @@
'table-warning' : member.status == 'MISSING',
}">
<th scope="row">{{ member.uid }}</th>
<td class="d-none d-xl-table-cell">{{ member.pubkey }}</td>
<td class="d-none d-xl-table-cell"><a :href="'hash/' + member.hash">{{ member.pubkey }}</a></td>
<td class="d-none d-sm-table-cell">{{ member.status }}</td>
</tr>
</tbody>
......@@ -63,7 +63,7 @@ export default {
],
// Requête graphQL
query: gql`{version}`,
param: '4Fge'
param: '4Fge',
}
},
// Fonctions locales
......@@ -78,6 +78,7 @@ export default {
pubkey
uid
status
hash
}
}
} `,
......
<template>
<main class="content">
<h2 class="display-2 text-center mb-5">{{ idFromHash.uid }}</h2>
<div class="row">
<ul>
<li>{{ idFromHash.uid }}</li>
<li>{{ idFromHash.pubkey }}</li>
<li>{{ idFromHash.status }}</li>
</ul>
</div>
</main>
</template>
<script>
import gql from "graphql-tag";
export default {
data() {
// Variables locales
return {};
},
// Fonctions locales
methods: {},
apollo: {
idFromHash: {
query: gql`
query Search($hash: Hash!) {
idFromHash(hash: $hash) {
pubkey
uid
status
hash
}
}
`,
variables() {
return { hash: this.$route.params.hash };
},
skip() {
return false;
},
},
},
mounted() {
// Mise à jour du fil d'ariane au chargement
$nuxt.$emit("changeRoute", this.breadcrumb);
},
};
</script>
<style lang="sass" scoped>
// CSS Lié au composant
</style>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment