diff --git a/resources/js/components/account/Quests.vue b/resources/js/components/account/Quests.vue index e486be09..5daf95a2 100644 --- a/resources/js/components/account/Quests.vue +++ b/resources/js/components/account/Quests.vue @@ -58,6 +58,21 @@ export default { return this.account.id === accountId; }, + fetchAccountQuests() { + axios + .get('/api/account/' + this.account.username + '/quests') + .then((response) => { + this.quests = response.data.data; + this.display = response.data.display !== 0; + this.errored = false + }) + .catch(error => { + console.log(error) + this.errored = true + }) + .finally(() => this.loading = false); + }, + updateDisplayQuests() { axios .post('/api/account/' + this.account.username + '/quests', { @@ -72,6 +87,13 @@ export default { } }, + watch: { + account(account) { + this.account = account; + this.fetchAccountQuests(); + } + }, + data() { return { loading: true, @@ -89,20 +111,10 @@ export default { this.user = response.data; }) .catch(error => { - + console.log(error) }); - axios - .get('/api/account/' + this.account.username + '/quests') - .then((response) => { - this.quests = response.data.data; - this.display = response.data.display !== 0; - }) - .catch(error => { - console.log(error) - this.errored = true - }) - .finally(() => this.loading = false); + this.fetchAccountQuests(); }, created() { diff --git a/resources/js/pages/group/Show.vue b/resources/js/pages/group/Show.vue index 39cf50ce..9b9f10e4 100644 --- a/resources/js/pages/group/Show.vue +++ b/resources/js/pages/group/Show.vue @@ -6,13 +6,9 @@
-
+

{{ account.username }}

-

Equipment

- - -
@@ -45,6 +41,14 @@
+ +

Equipment

+ + + +

Quests

+ +
@@ -91,7 +95,7 @@ export default { data() { return { - account: {}, + account: null, skills: true, component: AccountSkillHiscore, }