diff --git a/backend/src/schema/resolvers/moderation.js b/backend/src/schema/resolvers/moderation.js index 5faf8c551..ff2a84a5a 100644 --- a/backend/src/schema/resolvers/moderation.js +++ b/backend/src/schema/resolvers/moderation.js @@ -31,7 +31,10 @@ export default { const session = driver.session() try { - const queryOpenDecisionWriteTxResultPromise = queryOpenDecisionWriteTransaction(session, resourceId) + const queryOpenDecisionWriteTxResultPromise = queryOpenDecisionWriteTransaction( + session, + resourceId, + ) const [openDecisionTxResult] = await queryOpenDecisionWriteTxResultPromise let cypherHeader = '' @@ -50,7 +53,8 @@ export default { CREATE (resource)<-[decision:DECIDED]-(moderator) SET decision.latest = true ` - } else { // an open decision, then change it + } else { + // an open decision, then change it if (disable === undefined) disable = openDecisionTxResult.decision.properties.disable // default set to existing if (closed === undefined) closed = openDecisionTxResult.decision.properties.closed // default set to existing // current moderator is not the same as old @@ -100,8 +104,7 @@ export default { // console.log('disable: ', disable) const mutateDecisionWriteTxResultPromise = session.writeTransaction(async txc => { - const mutateDecisionTransactionResponse = await txc.run( - cypher, { + const mutateDecisionTransactionResponse = await txc.run(cypher, { resourceId, moderatorId: moderator.id, disable, diff --git a/webapp/graphql/Moderation.js b/webapp/graphql/Moderation.js index be87be1de..352296825 100644 --- a/webapp/graphql/Moderation.js +++ b/webapp/graphql/Moderation.js @@ -110,3 +110,13 @@ export const reportMutation = () => { } ` } + +export const decideMutation = () => { + return gql` + mutation($resourceId: ID!, $disable: Boolean, $closed: Boolean) { + decide(resourceId: $resourceId, disable: $disable, closed: $closed) { + disable + } + } + ` +} diff --git a/webapp/locales/de.json b/webapp/locales/de.json index 7460e82a2..e38924d14 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -454,9 +454,11 @@ "typeRowHeadline": "Typ", "contentRowHeadline": "Inhalt", "authorRowHeadline": "Autor", - "decisionRowHeadline": "Decision", + "decisionRowHeadline": "Entscheidung", "decided": "Entschieden", "noDecision": "Keine Entscheidung!", + "decideButton": "Entscheide", + "DecisionSuccess": "Erfolgreich entschieden!", "enabledBy": "Aktiviert von", "disabledBy": "Deaktiviert von", "reasonCategory": "Kategorie", diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 638bbba46..eb31c620d 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -458,6 +458,8 @@ "decisionRowHeadline": "Decision", "decided": "Decided", "noDecision": "No decision!", + "decideButton": "Decide", + "DecisionSuccess": "Decided successfully!", "enabledBy": "Enabled by", "disabledBy": "Disabled by", "reasonCategory": "Category", diff --git a/webapp/pages/moderation/index.vue b/webapp/pages/moderation/index.vue index 442c5133a..72cde9cb6 100644 --- a/webapp/pages/moderation/index.vue +++ b/webapp/pages/moderation/index.vue @@ -8,7 +8,7 @@ cellpadding="0" >