2020-03-18 10:57:33 +00:00
|
|
|
<template>
|
|
|
|
<main>
|
2021-12-06 10:35:20 +00:00
|
|
|
<div
|
|
|
|
v-if="isLoading"
|
|
|
|
class="ui vertical segment"
|
|
|
|
>
|
|
|
|
<div :class="['ui', 'centered', 'active', 'inline', 'loader']" />
|
2020-03-18 10:57:33 +00:00
|
|
|
</div>
|
|
|
|
<template v-if="object">
|
|
|
|
<div class="ui vertical stripe segment">
|
2021-12-06 10:35:20 +00:00
|
|
|
<user-request-card :obj="object" />
|
2020-03-18 10:57:33 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</main>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-12-06 10:35:20 +00:00
|
|
|
import axios from 'axios'
|
2020-03-18 10:57:33 +00:00
|
|
|
|
2022-04-23 07:37:43 +00:00
|
|
|
import UserRequestCard from '~/components/manage/moderation/UserRequestCard.vue'
|
2020-03-18 10:57:33 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2021-12-06 10:35:20 +00:00
|
|
|
UserRequestCard
|
2020-03-18 10:57:33 +00:00
|
|
|
},
|
2021-12-06 10:35:20 +00:00
|
|
|
props: { id: { type: Number, required: true } },
|
|
|
|
data () {
|
2020-03-18 10:57:33 +00:00
|
|
|
return {
|
|
|
|
isLoading: true,
|
2021-12-06 10:35:20 +00:00
|
|
|
object: null
|
2020-03-18 10:57:33 +00:00
|
|
|
}
|
|
|
|
},
|
2021-12-06 10:35:20 +00:00
|
|
|
created () {
|
2020-03-18 10:57:33 +00:00
|
|
|
this.fetchData()
|
|
|
|
},
|
|
|
|
methods: {
|
2021-12-06 10:35:20 +00:00
|
|
|
fetchData () {
|
|
|
|
const self = this
|
2020-03-18 10:57:33 +00:00
|
|
|
this.isLoading = true
|
2021-12-06 10:35:20 +00:00
|
|
|
const url = `manage/moderation/requests/${this.id}/`
|
2020-03-18 10:57:33 +00:00
|
|
|
axios.get(url).then(response => {
|
|
|
|
self.object = response.data
|
|
|
|
self.isLoading = false
|
|
|
|
})
|
2021-12-06 10:35:20 +00:00
|
|
|
}
|
|
|
|
}
|
2020-03-18 10:57:33 +00:00
|
|
|
}
|
|
|
|
</script>
|