new status in_progress in contribution list

This commit is contained in:
ogerly 2022-08-25 18:45:15 +02:00
parent 4e5c930dd5
commit 92ec3e4d25
11 changed files with 96 additions and 91 deletions

View File

@ -15,9 +15,7 @@
</contribution-messages-list-item> -->
</div>
</b-container>
<br />
<br />
<br />
<contribution-messages-formular :contributionId="contributionId" />
</div>
</template>

View File

@ -1,28 +1,5 @@
<template>
<div class="contribution-messages-formular">
<div v-if="form.text !== ''" class="mt-5">
<h4>{{ $t('preview') }}</h4>
<div class="border border-info m-5">
<b-row>
<b-col cols="1">
<b-avatar
:text="`${$store.state.firstName[0]} ${$store.state.lastName[0]}`"
variant="info"
></b-avatar>
</b-col>
<b-col cols="11">
<pre class="mt-2">
{{ $store.state.firstName }} {{ $store.state.lastName }}
</pre>
</b-col>
</b-row>
<b-row>
<b-col>
<pre class="ml-3 mt-3 mb-5">{{ form.text }}</pre>
</b-col>
</b-row>
</div>
</div>
<div>
<b-form @submit="onSubmit" @reset="onReset">
<b-form-textarea
@ -32,8 +9,14 @@
rows="3"
max-rows="6"
></b-form-textarea>
<b-button type="submit" variant="primary">{{ $t('form.submit') }}</b-button>
<b-button type="reset" variant="danger">{{ $t('form.reset') }}</b-button>
<b-row class="mt-4 mb-6">
<b-col>
<b-button type="reset" variant="danger">{{ $t('form.reset') }}</b-button>
</b-col>
<b-col class="text-right">
<b-button type="submit" variant="primary">{{ $t('form.submit') }}</b-button>
</b-col>
</b-row>
</b-form>
</div>
</div>
@ -78,6 +61,9 @@ export default {
event.preventDefault()
this.form.text = ''
},
toggleContributionMessagesBox() {
this.$emit('toggle-contribution-messages-box', this.contributionId)
},
},
}
</script>

View File

@ -5,12 +5,11 @@
<contribution-messages-list-item :message="message" />
</div>
</b-container>
<br />
<br />
<br />
<contribution-messages-formular
v-if="state === 'PENDING' || state === 'IN_PROGRESS'"
class="mt-5"
:contributionId="contributionId"
@toggle-contribution-messages-box="toggleContributionMessagesBox"
/>
</div>
</template>
@ -38,6 +37,11 @@ export default {
required: true,
},
},
methods: {
toggleContributionMessagesBox(id) {
this.$emit('toggle-contribution-messages-box', id)
},
},
}
</script>
<style scoped>

View File

@ -25,14 +25,11 @@ export default {
}
</script>
<style>
.clear {
clear: both;
}
.slot-is-not-moderator {
clear: both;
float: right;
width: 75%;
margin-top: 20px;
margin-bottom: 20px;
clear: both;
}
</style>

View File

@ -2,55 +2,64 @@
<div class="contribution-list-item">
<slot>
<div class="border p-3 w-100 mb-1" :class="`border-${variant}`">
<div class="d-inline-flex">
<div class="mr-2"><b-icon :icon="icon" :variant="variant" class="h2"></b-icon></div>
<div v-if="firstName" class="mr-3">{{ firstName }} {{ lastName }}</div>
<div class="mr-2" :class="state !== 'DELETED' ? 'font-weight-bold' : ''">
{{ amount | GDD }}
<div v-b-toggle="messages.length ? collapsId : ''">
<div class="d-inline-flex">
<div class="mr-2">
<b-icon
v-if="state === 'IN_PROGRESS'"
icon="question-square"
font-scale="2"
variant="warning"
></b-icon>
<b-icon v-else :icon="icon" :variant="variant" class="h2"></b-icon>
</div>
<div v-if="firstName" class="mr-3">{{ firstName }} {{ lastName }}</div>
<div class="mr-2" :class="state !== 'DELETED' ? 'font-weight-bold' : ''">
{{ amount | GDD }}
</div>
{{ $t('math.minus') }}
<div class="mx-2">{{ $d(new Date(date), 'short') }}</div>
</div>
{{ $t('math.minus') }}
<div class="mx-2">{{ $d(new Date(date), 'short') }}</div>
</div>
<div class="mr-2">
<span>{{ $t('contribution.date') }}</span>
<span>
{{ $d(new Date(contributionDate), 'monthAndYear') }}
</span>
</div>
<div class="mr-2">{{ memo }}</div>
<div
v-if="(state !== 'DELETED' && !firstName) || (state !== 'CONFIRMED' && !firstName)"
class="d-flex flex-row-reverse"
>
<div class="mr-2">
<span>{{ $t('contribution.date') }}</span>
<span>
{{ $d(new Date(contributionDate), 'monthAndYear') }}
</span>
</div>
<div class="mr-2">{{ memo }}</div>
<div
v-if="state !== 'CONFIRMED' && state !== 'DELETED'"
class="pointer ml-5"
@click="
$emit('update-contribution-form', {
id: id,
contributionDate: contributionDate,
memo: memo,
amount: amount,
})
"
v-if="(state !== 'DELETED' && !firstName) || (state !== 'CONFIRMED' && !firstName)"
class="d-flex flex-row-reverse"
>
<b-icon icon="pencil" class="h2"></b-icon>
</div>
<div
v-if="state !== 'CONFIRMED' && state !== 'DELETED'"
class="pointer"
@click="deleteContribution({ id })"
>
<b-icon icon="trash" class="h2"></b-icon>
</div>
<div v-if="messages.length" class="pointer">
<b-icon v-b-toggle="collapsId" icon="chat-dots" class="h2 mr-5"></b-icon>
<div
v-if="state !== 'CONFIRMED' && state !== 'DELETED'"
class="pointer ml-5"
@click="
$emit('update-contribution-form', {
id: id,
contributionDate: contributionDate,
memo: memo,
amount: amount,
})
"
>
<b-icon icon="pencil" class="h2"></b-icon>
</div>
<div
v-if="state !== 'CONFIRMED' && state !== 'DELETED'"
class="pointer"
@click="deleteContribution({ id })"
>
<b-icon icon="trash" class="h2"></b-icon>
</div>
<div v-if="messages.length" class="pointer">
<b-icon v-b-toggle="collapsId" icon="chat-dots" class="h2 mr-5"></b-icon>
</div>
</div>
</div>
<div v-if="messages">
<b-button v-if="state === 'IN_PROGRESS'" v-b-toggle="collapsId" variant="dark">
<b-icon icon="circle-fill" animation="throb" font-scale="1" variant="warning"></b-icon>
Bitte beantworte die Nachfrage
<b-button v-if="state === 'IN_PROGRESS'" v-b-toggle="collapsId" variant="warning">
{{ $t('contribution.alert.answerQuestion') }}
</b-button>
<b-collapse :id="collapsId" class="mt-2">
<b-card>
@ -58,6 +67,7 @@
:messages="messages"
:state="state"
:contributionId="contributionId"
@toggle-contribution-messages-box="toggleContributionMessagesBox"
/>
</b-card>
</b-collapse>
@ -140,6 +150,7 @@ export default {
variant() {
if (this.deletedAt) return 'danger'
if (this.confirmedAt) return 'success'
if (this.state === 'IN_PROGRESS') return 'warning'
return 'primary'
},
date() {
@ -155,6 +166,9 @@ export default {
if (value) this.$emit('delete-contribution', item)
})
},
toggleContributionMessagesBox(id) {
alert('toggleContributionMessagesBox(' + id + ')')
},
},
}
</script>

View File

@ -38,9 +38,10 @@
"communityNoteList": "Hier findest du alle eingereichten und bestätigten Beiträge von allen Mitgliedern aus dieser Gemeinschaft.",
"confirm": "bestätigt",
"myContributionNoteList": "Eingereichte Beiträge, die noch nicht bestätigt wurden, kannst du jederzeit bearbeiten oder löschen.",
"myContributionNoteSupport": "Es wird bald an dieser Stelle die Möglichkeit geben das ein Dialog zwischen Moderatoren und dir stattfinden kann. Solltest du jetzt Probleme haben bitte nimm Kontakt mit dem Support auf.",
"pending": "Eingereicht und wartet auf Bestätigung",
"rejected": "abgelehnt"
"rejected": "abgelehnt",
"in_progress":"Es gibt eine Rückfrage der Moderatoren.",
"answerQuestion": "Bitte beantworte die Nachfrage"
},
"date": "Beitrag für:",
"delete": "Beitrag löschen! Bist du sicher?",

View File

@ -38,9 +38,10 @@
"communityNoteList": "Here you will find all submitted and confirmed contributions from all members of this community.",
"confirm": "confirmed",
"myContributionNoteList": "You can edit or delete entries that have not yet been confirmed at any time.",
"myContributionNoteSupport": "Soon there will be the possibility for a dialogue between moderators and you. If you have any problems now, please contact the support.",
"pending": "Submitted and waiting for confirmation",
"rejected": "deleted"
"rejected": "deleted",
"in_progress":"Es gibt eine Rückfrage der Moderatoren.",
"answerQuestion": "Please answer the question"
},
"date": "Contribution for:",
"delete": "Delete Contribution! Are you sure?",

View File

@ -38,9 +38,10 @@
"communityNoteList": "Aquí encontrarás todas las contribuciones enviadas y confirmadas de todos los miembros de esta comunidad.",
"confirm": "confirmado",
"myContributionNoteList": "Puedes editar o eliminar las contribuciones enviadas que aún no han sido confirmadas en cualquier momento.",
"myContributionNoteSupport": "Pronto existirá la posibilidad de que puedas dialogar con los moderadores. Si tienes algún problema ahora, ponte en contacto con el equipo de asistencia.",
"pending": "Enviado y a la espera de confirmación",
"rejected": "rechazado"
"rejected": "rechazado",
"in_progress":"Es gibt eine Rückfrage der Moderatoren.",
"answerQuestion": "Please answer the question"
},
"date": "Contribución para:",
"delete": "Eliminar la contribución. ¿Estás seguro?",

View File

@ -38,9 +38,10 @@
"communityNoteList": "Vous trouverez ci-contre toutes les contributions versées et certifiées de tous les membres de cette communauté.",
"confirm": " Approuvé",
"myContributionNoteList": "À tout moment vous pouvez éditer ou supprimer les données qui n´ont pas été confirmées.",
"myContributionNoteSupport": "Vous aurez bientôt la possibilité de dialoguer avec un médiateur. Si vous rencontrez un problème maintenant, merci de contacter l´aide en ligne.",
"pending": "Inscription en attente de validation",
"rejected": "supprimé"
"rejected": "supprimé",
"in_progress":"Es gibt eine Rückfrage der Moderatoren.",
"answerQuestion": "Please answer the question"
},
"date": "Contribution pour:",
"delete": "Supprimer la contribution! Êtes-vous sûr?",

View File

@ -38,9 +38,10 @@
"communityNoteList": "Hier vind je alle ingediende en bevestigde bijdragen van alle leden uit deze gemeenschap.",
"confirm": "bevestigt",
"myContributionNoteList": "Ingediende bijdragen, die nog niet bevestigd zijn, kun je op elk moment wijzigen of verwijderen.",
"myContributionNoteSupport": "Hier heb je binnenkort de mogelijkheid een gesprek met een moderator te voeren. Mocht je nu problemen hebben, dan neem alsjeblieft contact op met Support.",
"pending": "Ingediend en wacht op bevestiging",
"rejected": "afgewezen"
"rejected": "afgewezen",
"in_progress":"Es gibt eine Rückfrage der Moderatoren.",
"answerQuestion": "Please answer the question"
},
"date": "Bijdrage voor:",
"delete": "Bijdrage verwijderen! Weet je het zeker?",

View File

@ -22,6 +22,10 @@
<b-icon icon="bell-fill" variant="primary"></b-icon>
{{ $t('contribution.alert.pending') }}
</li>
<li>
<b-icon icon="question-square" variant="warning"></b-icon>
{{ $t('contribution.alert.in_progress') }}
</li>
<li>
<b-icon icon="check" variant="success"></b-icon>
{{ $t('contribution.alert.confirm') }}
@ -32,9 +36,6 @@
</li>
</ul>
<hr />
<p class="mb-0">
{{ $t('contribution.alert.myContributionNoteSupport') }}
</p>
</b-alert>
</div>
<contribution-list