Skip to content
Snippets Groups Projects
Commit 9913909c authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Fix loading single report page

parent 27a4620d
No related branches found
No related tags found
1 merge request!185Include usernames in all relevant reports actions in Moderation Log
......@@ -12,6 +12,7 @@ const reports = {
currentPage: 1,
fetchedReports: [],
loading: true,
loadingSingleReport: true,
openReportsCount: 0,
pageSize: 50,
singleReport: {},
......@@ -42,6 +43,9 @@ const reports = {
},
SET_SINGLE_REPORT: (state, report) => {
state.singleReport = report
},
SET_SINGLE_REPORT_LOADING: (state, status) => {
state.loadingSingleReport = status
}
},
actions: {
......@@ -162,11 +166,11 @@ const reports = {
commit('SET_LOADING', false)
},
async FetchSingleReport({ commit, getters }, id) {
commit('SET_LOADING', true)
commit('SET_SINGLE_REPORT_LOADING', true)
const { data } = await fetchSingleReport(id, getters.authHost, getters.token)
commit('SET_SINGLE_REPORT', data)
commit('SET_LOADING', false)
commit('SET_SINGLE_REPORT_LOADING', false)
},
async FetchOpenReportsCount({ commit, getters, state }) {
commit('SET_LOADING', true)
......
......@@ -47,7 +47,7 @@ export default {
components: { ModerateUserDropdown, RebootButton, ReportContent },
computed: {
loading() {
return this.$store.state.reports.loading
return this.$store.state.reports.loadingSingleReport
},
report() {
return this.$store.state.reports.singleReport
......
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