mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
show open creation in contribution form
This commit is contained in:
parent
e5e594c3a2
commit
0ddd732da6
@ -4,8 +4,8 @@
|
||||
<h3>{{ $t('contribution.formText.h3') }}</h3>
|
||||
{{ $t('contribution.formText.text1') }}
|
||||
<ul class="my-3">
|
||||
<li>{{ $t('contribution.formText.lastMonth') }}</li>
|
||||
<li>{{ $t('contribution.formText.thisMonth') }}</li>
|
||||
<li v-html="$t('contribution.formText.lastMonth', lastMonthObject)"></li>
|
||||
<li v-html="$t('contribution.formText.thisMonth', thisMonthObject)"></li>
|
||||
</ul>
|
||||
|
||||
<div class="my-3">
|
||||
@ -64,12 +64,18 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
/*
|
||||
* data.lastMonth = The date set back by one month.
|
||||
* data.min = The date is reset by one month to the 1st of the previous month.
|
||||
*
|
||||
*/
|
||||
export default {
|
||||
name: 'ContributionForm',
|
||||
data() {
|
||||
return {
|
||||
minlength: 50,
|
||||
maxlength: 255,
|
||||
lastMonth: new Date(new Date(new Date().setMonth(new Date().getMonth() - 1))),
|
||||
min: new Date(new Date(new Date().setMonth(new Date().getMonth() - 1)).setDate(1)),
|
||||
max: new Date(),
|
||||
form: {
|
||||
@ -96,6 +102,28 @@ export default {
|
||||
return true
|
||||
return false
|
||||
},
|
||||
lastMonthObject(){
|
||||
// If the current month is January then the current year must be counted back by -1.
|
||||
if (new Date().getMonth === 1) {
|
||||
return {
|
||||
month: new Date(this.lastMonth).toLocaleString(this.$i18n.locale, { month: "long" }),
|
||||
year: new Date().getFullYear() - 1,
|
||||
creation: this.$store.state.creation[1]
|
||||
}
|
||||
}
|
||||
return {
|
||||
month: new Date(this.lastMonth).toLocaleString(this.$i18n.locale, { month: "long" }),
|
||||
year: new Date().getFullYear(),
|
||||
creation: this.$store.state.creation[1]
|
||||
}
|
||||
},
|
||||
thisMonthObject() {
|
||||
return {
|
||||
month: new Date().toLocaleString(this.$i18n.locale, { month: "long" }),
|
||||
year: new Date().getFullYear(),
|
||||
creation: this.$store.state.creation[2]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -35,10 +35,10 @@
|
||||
"activity": "Tätigkeit",
|
||||
"formText": {
|
||||
"h3": "Dein Beitrag zum Gemeinwohl",
|
||||
"lastMonth": "Für Juni 2022 kannst du noch 200 GDD einreichen .",
|
||||
"lastMonth": "Für <b>{month} {year}</b> kannst du noch <b>{creation}</b> GDD einreichen.",
|
||||
"text1": "Bring dich mit deinen Talenten in die Gemeinschaft ein! Dein freiwilliges Engagement honorieren wir mit 20 GDD pro Stunde bis maximal 1.000 GDD im Monat.",
|
||||
"text2": "Beschreibe deine Gemeinwohl-Tätigkeit mit Angabe der Stunden und trage einen Betrag von 20 GDD pro Stunde ein! Nach Bestätigung durch einen Moderator wird der Betrag deinem Konto gutgeschrieben.",
|
||||
"thisMonth": "Für Juli 2022 kannst du noch 500 GDD einreichen. "
|
||||
"thisMonth": "Für <b>{month} {year}</b> kannst du noch <b>{creation}</b> GDD einreichen. "
|
||||
},
|
||||
"noDateSelected": "Kein Datum ausgewählt",
|
||||
"submit": "Einreichen"
|
||||
|
||||
@ -35,10 +35,10 @@
|
||||
"activity": "Activity",
|
||||
"formText": {
|
||||
"h3": "Your contribution to the common good",
|
||||
"lastMonth": "For June 2022, you can still submit 200 GDD.",
|
||||
"lastMonth": "For <b>{month} {year}</b>, you can still submit <b>{creation}</b> GDD.",
|
||||
"text1": "Bring your talents to the community! Your voluntary commitment will be rewarded with 20 GDD per hour up to a maximum of 1,000 GDD per month.",
|
||||
"text2": "Describe your community service activity with hours and enter an amount of 20 GDD per hour! After confirmation by a moderator, the amount will be credited to your account.",
|
||||
"thisMonth": "For July 2022, you can still submit 500 GDD."
|
||||
"thisMonth": "For <b>{month} {year}</b>, you can still submit <b>{creation}</b> GDD."
|
||||
},
|
||||
"noDateSelected": "No date selected",
|
||||
"submit": "Submit"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user