Files
firefly-iii/frontend/src/pages/groups/Show.vue
2022-03-29 14:55:51 +02:00

79 lines
1.9 KiB
Vue

<!--
- Show.vue
- Copyright (c) 2022 james@firefly-iii.org
-
- This file is part of Firefly III (https://github.com/firefly-iii).
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<template>
<q-page>
<div class="row q-mx-md">
<div class="col-12">
<q-card bordered>
<q-card-section>
<div class="text-h6">{{ group.title }}</div>
</q-card-section>
<q-card-section>
<div class="row">
<div class="col-12 q-mb-xs">
Title: {{ group.title }}<br>
</div>
</div>
</q-card-section>
</q-card>
</div>
</div>
</q-page>
</template>
<script>
import Get from "../../api/groups/get";
export default {
name: "Show",
data() {
return {
group: {},
id: 0
}
},
created() {
this.id = parseInt(this.$route.params.id);
this.getGroup();
},
components: {},
methods: {
onRequest: function (payload) {
this.page = payload.page;
this.getGroup();
},
getGroup: function () {
let get = new Get;
get.get(this.id).then((response) => this.parseGroup(response));
},
parseGroup: function (response) {
this.group = {
title: response.data.data.attributes.title,
};
},
}
}
</script>
<style scoped>
</style>