mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into 2121-Translate-locales-to-Spanish
This commit is contained in:
commit
1b012365f1
@ -51,13 +51,12 @@
|
|||||||
</b-col>
|
</b-col>
|
||||||
</validation-provider>
|
</validation-provider>
|
||||||
<label class="mt-3">{{ $t('form.amount') }} {{ $t('math.asterisk') }}</label>
|
<label class="mt-3">{{ $t('form.amount') }} {{ $t('math.asterisk') }}</label>
|
||||||
<b-input-group size="lg" prepend="GDD" append=".00">
|
<b-input-group size="lg" prepend="GDD">
|
||||||
<b-form-input
|
<b-form-input
|
||||||
id="contribution-amount"
|
id="contribution-amount"
|
||||||
v-model="form.amount"
|
v-model="form.amount"
|
||||||
type="number"
|
type="text"
|
||||||
min="1"
|
:formatter="numberFormat"
|
||||||
:max="isThisMonth ? maxGddThisMonth : maxGddLastMonth"
|
|
||||||
></b-form-input>
|
></b-form-input>
|
||||||
</b-input-group>
|
</b-input-group>
|
||||||
<div
|
<div
|
||||||
@ -104,7 +103,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
numberFormat(value) {
|
||||||
|
return value.replace(/\D/g, '')
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
|
this.form.amount = this.numberFormat(this.form.amount)
|
||||||
if (this.form.id) {
|
if (this.form.id) {
|
||||||
this.$emit('update-contribution', this.form)
|
this.$emit('update-contribution', this.form)
|
||||||
} else {
|
} else {
|
||||||
@ -132,8 +135,8 @@ export default {
|
|||||||
if (
|
if (
|
||||||
this.form.date === '' ||
|
this.form.date === '' ||
|
||||||
this.form.memo.length < this.minlength ||
|
this.form.memo.length < this.minlength ||
|
||||||
this.form.amount <= 0 ||
|
parseInt(this.form.amount) <= 0 ||
|
||||||
this.form.amount > 1000 ||
|
parseInt(this.form.amount) > 1000 ||
|
||||||
(this.isThisMonth && parseInt(this.form.amount) > parseInt(this.maxGddThisMonth)) ||
|
(this.isThisMonth && parseInt(this.form.amount) > parseInt(this.maxGddThisMonth)) ||
|
||||||
(!this.isThisMonth && parseInt(this.form.amount) > parseInt(this.maxGddLastMonth))
|
(!this.isThisMonth && parseInt(this.form.amount) > parseInt(this.maxGddLastMonth))
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user