-
+
-
- {{ $t('no_hashtag') }}
+
+ {{ $t('no_hashtag') }}
-
-
-
+
+
+
{{ $t('hide_resubmission') }}
@@ -53,7 +53,7 @@
class="mt-4"
:items="items"
:fields="fields"
- :hideResubmission="hideResubmission"
+ :hide-resubmission="hideResubmission"
@show-overlay="showOverlay"
@update-status="updateStatus"
@reload-contribution="reloadContribution"
@@ -61,9 +61,9 @@
/>
{{ $t(overlayQuestion) }}
-
+
{{ $t(overlayBtnText) }}
@@ -135,99 +130,6 @@ export default {
hideResubmissionModel: true,
}
},
- watch: {
- tabIndex() {
- this.currentPage = 1
- },
- },
- methods: {
- reloadContribution(id) {
- this.$apollo
- .query({ query: getContribution, variables: { id } })
- .then((result) => {
- const contribution = result.data.contribution
- this.$set(
- this.items,
- this.items.findIndex((obj) => obj.id === contribution.id),
- contribution,
- )
- })
- .catch((error) => {
- this.overlay = false
- this.toastError(error.message)
- })
- },
- deleteCreation() {
- this.$apollo
- .mutate({
- mutation: adminDeleteContribution,
- variables: {
- id: this.item.id,
- },
- })
- .then((result) => {
- this.overlay = false
- this.updatePendingCreations(this.item.id)
- this.toastSuccess(this.$t('creation_form.toasted_delete'))
- })
- .catch((error) => {
- this.overlay = false
- this.toastError(error.message)
- })
- },
- denyCreation() {
- this.$apollo
- .mutate({
- mutation: denyContribution,
- variables: {
- id: this.item.id,
- },
- })
- .then((result) => {
- this.overlay = false
- this.updatePendingCreations(this.item.id)
- this.toastSuccess(this.$t('creation_form.toasted_denied'))
- })
- .catch((error) => {
- this.overlay = false
- this.toastError(error.message)
- })
- },
- confirmCreation() {
- this.$apollo
- .mutate({
- mutation: confirmContribution,
- variables: {
- id: this.item.id,
- },
- })
- .then((result) => {
- this.overlay = false
- this.updatePendingCreations(this.item.id)
- this.toastSuccess(this.$t('creation_form.toasted_created'))
- })
- .catch((error) => {
- this.overlay = false
- this.toastError(error.message)
- })
- },
- updatePendingCreations(id) {
- this.items = this.items.filter((obj) => obj.id !== id)
- this.$store.commit('openCreationsMinus', 1)
- },
- showOverlay(item, variant) {
- this.overlay = true
- this.item = item
- this.variant = variant
- },
- updateStatus(id) {
- this.items.find((obj) => obj.id === id).messagesCount++
- this.items.find((obj) => obj.id === id).status = 'IN_PROGRESS'
- },
- formatDateOrDash(value) {
- return value ? this.$d(new Date(value), 'short') : '—'
- },
- },
computed: {
fields() {
return [
@@ -440,6 +342,99 @@ export default {
return this.showResubmissionCheckbox ? this.hideResubmissionModel : false
},
},
+ watch: {
+ tabIndex() {
+ this.currentPage = 1
+ },
+ },
+ methods: {
+ reloadContribution(id) {
+ this.$apollo
+ .query({ query: getContribution, variables: { id } })
+ .then((result) => {
+ const contribution = result.data.contribution
+ this.$set(
+ this.items,
+ this.items.findIndex((obj) => obj.id === contribution.id),
+ contribution,
+ )
+ })
+ .catch((error) => {
+ this.overlay = false
+ this.toastError(error.message)
+ })
+ },
+ deleteCreation() {
+ this.$apollo
+ .mutate({
+ mutation: adminDeleteContribution,
+ variables: {
+ id: this.item.id,
+ },
+ })
+ .then((result) => {
+ this.overlay = false
+ this.updatePendingCreations(this.item.id)
+ this.toastSuccess(this.$t('creation_form.toasted_delete'))
+ })
+ .catch((error) => {
+ this.overlay = false
+ this.toastError(error.message)
+ })
+ },
+ denyCreation() {
+ this.$apollo
+ .mutate({
+ mutation: denyContribution,
+ variables: {
+ id: this.item.id,
+ },
+ })
+ .then((result) => {
+ this.overlay = false
+ this.updatePendingCreations(this.item.id)
+ this.toastSuccess(this.$t('creation_form.toasted_denied'))
+ })
+ .catch((error) => {
+ this.overlay = false
+ this.toastError(error.message)
+ })
+ },
+ confirmCreation() {
+ this.$apollo
+ .mutate({
+ mutation: confirmContribution,
+ variables: {
+ id: this.item.id,
+ },
+ })
+ .then((result) => {
+ this.overlay = false
+ this.updatePendingCreations(this.item.id)
+ this.toastSuccess(this.$t('creation_form.toasted_created'))
+ })
+ .catch((error) => {
+ this.overlay = false
+ this.toastError(error.message)
+ })
+ },
+ updatePendingCreations(id) {
+ this.items = this.items.filter((obj) => obj.id !== id)
+ this.$store.commit('openCreationsMinus', 1)
+ },
+ showOverlay(item, variant) {
+ this.overlay = true
+ this.item = item
+ this.variant = variant
+ },
+ updateStatus(id) {
+ this.items.find((obj) => obj.id === id).messagesCount++
+ this.items.find((obj) => obj.id === id).status = 'IN_PROGRESS'
+ },
+ formatDateOrDash(value) {
+ return value ? this.$d(new Date(value), 'short') : '—'
+ },
+ },
apollo: {
ListAllContributions: {
query() {
diff --git a/admin/src/pages/FederationVisualize.vue b/admin/src/pages/FederationVisualize.vue
index 5736b1a0e..cab8f0bae 100644
--- a/admin/src/pages/FederationVisualize.vue
+++ b/admin/src/pages/FederationVisualize.vue
@@ -7,8 +7,8 @@
icon="arrow-clockwise"
font-scale="2"
:animation="animation"
- @click="$apollo.queries.allCommunities.refresh()"
data-test="federation-communities-refresh-btn"
+ @click="$apollo.queries.allCommunities.refresh()"
>
diff --git a/admin/src/pages/UserSearch.vue b/admin/src/pages/UserSearch.vue
index a47fef58e..339672b14 100644
--- a/admin/src/pages/UserSearch.vue
+++ b/admin/src/pages/UserSearch.vue
@@ -7,8 +7,8 @@
filters.byActivated === null
? $t('all_emails')
: filters.byActivated === false
- ? $t('unregistered_emails')
- : ''
+ ? $t('unregistered_emails')
+ : ''
}}