Merge branch '1707-reporting-with-specific-information' of github.com:Human-Connection/Human-Connection into 1707-refactor-db-reporting-with-specific-information

This commit is contained in:
Wolfgang Huß 2019-10-14 15:35:22 +02:00
commit ddb9a63f6e
2 changed files with 17 additions and 10 deletions

View File

@ -0,0 +1,12 @@
export const reportReasonCategoriesDatabaseList = () => {
return [
'other', // element # zero, because it is the nutral one
'discrimination-etc',
'pornographic-content-links',
'glorific-trivia-of-cruel-inhuman-acts',
'doxing',
'intentional-intimidation-stalking-persecution',
'advert-products-services-commercial',
'criminal-behavior-violation-german-law',
]
}

View File

@ -50,6 +50,7 @@
<script>
import { SweetalertIcon } from 'vue-sweetalert-icons'
import { reportMutation } from '~/graphql/Moderation.js'
import { reportReasonCategoriesDatabaseList } from '~/../shared/moderation/report.js'
export default {
name: 'ReportModal',
@ -62,16 +63,10 @@ export default {
id: { type: String, required: true },
},
data() {
const valuesReasonCategoryOptions = [
'discrimination-etc',
'pornographic-content-links',
'glorific-trivia-of-cruel-inhuman-acts',
'doxing',
'intentional-intimidation-stalking-persecution',
'advert-products-services-commercial',
'criminal-behavior-violation-german-law',
'other',
]
const reasonCategoryList = reportReasonCategoriesDatabaseList()
// move the first element "other" to the end
let valuesReasonCategoryOptions = reasonCategoryList.slice(1).concat(reasonCategoryList[0])
let reasonCategoryOptions = []
valuesReasonCategoryOptions.forEach(reasonCategory => {
reasonCategoryOptions.push({