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

# Conflicts:
#	shared/moderation/report.js
This commit is contained in:
Wolfgang Huß 2019-10-14 16:21:08 +02:00
commit fd27583c1d
6 changed files with 24 additions and 31 deletions

View File

@ -673,7 +673,7 @@ import { gql } from '../jest/helpers'
mutation: reportMutation,
variables: {
resourceId: 'p1',
reasonCategory: 'discrimination-etc',
reasonCategory: 'discrimination_etc',
reasonDescription: 'This post is bigoted',
},
}),

View File

@ -51,7 +51,7 @@ Feature: Report and Moderate
Scenario: Review reported content
Given somebody reported the following posts:
| submitterEmail | resourceId | reasonCategory | reasonDescription |
| p1.submitter@example.org | p1 | discrimination-etc | Offensive content |
| p1.submitter@example.org | p1 | discrimination_etc | Offensive content |
And I am logged in with a "moderator" role
When I click on the avatar menu in the top right corner
And I click on "Moderation"

View File

@ -1,13 +0,0 @@
export const reportReasonCategoriesDatabaseList = () => {
// list see "ReasonCategory" in backend GraphQL schema file "REPORTED.gql"
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,7 +50,6 @@
<script>
import { SweetalertIcon } from 'vue-sweetalert-icons'
import { reportMutation } from '~/graphql/Moderation.js'
import { reportReasonCategoriesDatabaseList } from '~/../shared/moderation/report.js'
export default {
name: 'ReportModal',
@ -63,9 +62,16 @@ export default {
id: { type: String, required: true },
},
data() {
const reasonCategoryList = reportReasonCategoriesDatabaseList()
// move the first element "other" to the end
let valuesReasonCategoryOptions = reasonCategoryList.slice(1).concat(reasonCategoryList[0])
let 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',
]
let reasonCategoryOptions = []
valuesReasonCategoryOptions.forEach(reasonCategory => {

View File

@ -499,13 +499,13 @@
"label": "Wähle eine Kategorie:",
"placeholder": "Kategorie …",
"options": {
"discrimination-etc": "Diskriminierende Beiträge, Kommentare, Äußerungen oder Beleidigungen.",
"pornographic-content-links": "Das Posten oder Verlinken eindeutig pornografischen Materials.",
"glorific-trivia-of-cruel-inhuman-acts": "Verherrlichung oder Verharmlosung grausamer oder unmenschlicher Gewalttätigkeiten.",
"discrimination_etc": "Diskriminierende Beiträge, Kommentare, Äußerungen oder Beleidigungen.",
"pornographic_content_links": "Das Posten oder Verlinken eindeutig pornografischen Materials.",
"glorific_trivia_of_cruel_inhuman_acts": "Verherrlichung oder Verharmlosung grausamer oder unmenschlicher Gewalttätigkeiten.",
"doxing": "Das Veröffentlichen von personenbezogenen Daten anderer ohne deren Einverständnis oder das Androhen dessen (\"Doxing\").",
"intentional-intimidation-stalking-persecution": "Absichtliche Einschüchterung, Stalking oder Verfolgung.",
"advert-products-services-commercial": "Bewerben von Produkten und Dienstleistungen mit kommerzieller Absicht.",
"criminal-behavior-violation-german-law": "Strafbares Verhalten bzw. Verstoß gegen deutsches Recht.",
"intentional_intimidation_stalking_persecution": "Absichtliche Einschüchterung, Stalking oder Verfolgung.",
"advert_products_services_commercial": "Bewerben von Produkten und Dienstleistungen mit kommerzieller Absicht.",
"criminal_behavior_violation_german_law": "Strafbares Verhalten bzw. Verstoß gegen deutsches Recht.",
"other": "Andere …"
}
},

View File

@ -500,13 +500,13 @@
"label": "Select a category:",
"placeholder": "Category …",
"options": {
"discrimination-etc": "Discriminatory posts, comments, utterances or insults.",
"pornographic-content-links": "Posting or linking of clearly pornographic material.",
"glorific-trivia-of-cruel-inhuman-acts": "Glorification or trivialization of cruel or inhuman acts of violence.",
"discrimination_etc": "Discriminatory posts, comments, utterances or insults.",
"pornographic_content_links": "Posting or linking of clearly pornographic material.",
"glorific_trivia_of_cruel_inhuman_acts": "Glorification or trivialization of cruel or inhuman acts of violence.",
"doxing": "The disclosure of others' personal information without their consent or threat there of (\"doxing\").",
"intentional-intimidation-stalking-persecution": "Intentional intimidation, stalking or persecution.",
"advert-products-services-commercial": "Advertising products and services with commercial intent.",
"criminal-behavior-violation-german-law": "Criminal behavior or violation of German law.",
"intentional_intimidation_stalking_persecution": "Intentional intimidation, stalking or persecution.",
"advert_products_services_commercial": "Advertising products and services with commercial intent.",
"criminal_behavior_violation_german_law": "Criminal behavior or violation of German law.",
"other": "Other …"
}
},