Load me query for banner from cache only
This commit is contained in:
parent
e4e1c0f418
commit
815dfe7b07
|
|
@ -103,8 +103,6 @@
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
/*for IE10+*/
|
/*for IE10+*/
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-scroll {
|
.no-scroll {
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,52 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import me from '@/mixins/me';
|
import gql from 'graphql-tag';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [me],
|
data() {
|
||||||
|
return {
|
||||||
|
me: {
|
||||||
|
readOnly: false,
|
||||||
|
selectedClass: {
|
||||||
|
readOnly: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
apollo: {
|
||||||
|
me: {
|
||||||
|
query: gql`
|
||||||
|
query {
|
||||||
|
me {
|
||||||
|
readOnly
|
||||||
|
selectedClass {
|
||||||
|
readOnly
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
fetchPolicy: 'cache-only',
|
||||||
|
update({me}) {
|
||||||
|
if (!me) {
|
||||||
|
return {
|
||||||
|
readOnly: false,
|
||||||
|
selectedClass: {
|
||||||
|
readOnly: false,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return me;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
readOnlyText() {
|
readOnlyText() {
|
||||||
return this.me.readOnly ? 'Sie besitzen keine aktive Lizenz.' : 'Sie sind in dieser Klasse nicht mehr aktiv.';
|
return this.me.readOnly ? 'Sie besitzen keine aktive Lizenz.' : 'Sie sind in dieser Klasse nicht mehr aktiv.';
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue