mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
badges AmountGDD and AmountGDT show and hide
This commit is contained in:
parent
d734d54239
commit
de4431774b
@ -4,7 +4,7 @@
|
||||
tag="div"
|
||||
:rules="rules"
|
||||
:name="name"
|
||||
v-slot="{ errors, valid, validated, ariaInput, ariaMsg }"
|
||||
v-slot="{ valid, validated, ariaInput }"
|
||||
>
|
||||
<b-form-group :label="label" :label-for="labelFor">
|
||||
<b-form-input
|
||||
@ -19,9 +19,6 @@
|
||||
min="0"
|
||||
:max="validMaxTime"
|
||||
></b-form-input>
|
||||
<b-form-invalid-feedback v-bind="ariaMsg">
|
||||
{{ errors[0] }}
|
||||
</b-form-invalid-feedback>
|
||||
</b-form-group>
|
||||
</validation-provider>
|
||||
</div>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<div class="translucent-color-opacity">
|
||||
<div class="text-center">
|
||||
<b-badge
|
||||
v-if="badgeShow"
|
||||
class="position-absolute mt--2 ml--4 px-3 zindex1"
|
||||
:variant="showStatus ? 'success' : 'light'"
|
||||
>
|
||||
@ -59,7 +60,7 @@ export default {
|
||||
props: {
|
||||
path: { type: String, required: false, default: '' },
|
||||
balance: { type: Number, required: true },
|
||||
badge: { type: Boolean, default: false },
|
||||
badgeShow: { type: Boolean, default: true },
|
||||
showStatus: { type: Boolean, default: false },
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -2,8 +2,9 @@
|
||||
<div>
|
||||
<div class="text-center">
|
||||
<b-badge
|
||||
v-if="badgeShow"
|
||||
class="position-absolute mt--2 ml--4 px-3 zindex1"
|
||||
:variant="badge ? 'success' : 'light'"
|
||||
:variant="showStatus ? 'success' : 'light'"
|
||||
>
|
||||
{{ $t('GDT') }}
|
||||
</b-badge>
|
||||
@ -53,7 +54,7 @@ export default {
|
||||
name: 'GdtAmount',
|
||||
props: {
|
||||
GdtBalance: { type: Number, required: true },
|
||||
badge: { type: Boolean, default: false },
|
||||
badgeShow: { type: Boolean, default: true },
|
||||
showStatus: { type: Boolean, default: false },
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<b-row>
|
||||
<b-col cols="5">
|
||||
<div>
|
||||
<gdd-amount :balance="balance" :showStatus="false" :path="path" />
|
||||
<gdd-amount :balance="balance" :showStatus="false" :path="path" :badgeShow="false" />
|
||||
</div>
|
||||
</b-col>
|
||||
<b-col cols="7">
|
||||
@ -20,13 +20,13 @@
|
||||
<b-row>
|
||||
<b-col cols="6">
|
||||
<div>
|
||||
<gdd-amount :balance="balance" :badge="true" :showStatus="true" />
|
||||
<gdd-amount :balance="balance" :badge="true" :showStatus="true" :badgeShow="false" />
|
||||
</div>
|
||||
</b-col>
|
||||
<b-col cols="6">
|
||||
<div>
|
||||
<router-link to="gdt">
|
||||
<gdt-amount :GdtBalance="GdtBalance" />
|
||||
<gdt-amount :GdtBalance="GdtBalance" :badgeShow="false" />
|
||||
</router-link>
|
||||
</div>
|
||||
</b-col>
|
||||
@ -37,7 +37,7 @@
|
||||
<b-col cols="6">
|
||||
<div>
|
||||
<router-link to="transactions">
|
||||
<gdd-amount :balance="balance" :badge="true" :showStatus="true" />
|
||||
<gdd-amount :balance="balance" :showStatus="true" />
|
||||
</router-link>
|
||||
</div>
|
||||
</b-col>
|
||||
@ -55,7 +55,7 @@
|
||||
<b-col cols="6">
|
||||
<div>
|
||||
<router-link to="transactions">
|
||||
<gdd-amount :balance="balance" :badge="true" :showStatus="false" />
|
||||
<gdd-amount :balance="balance" :showStatus="false" />
|
||||
</router-link>
|
||||
</div>
|
||||
</b-col>
|
||||
|
||||
@ -56,15 +56,8 @@ export const loadAllRules = (i18nCallback) => {
|
||||
|
||||
extend('gddCreationTime', {
|
||||
validate(value, { min, max }) {
|
||||
value = value.replace(',', '.')
|
||||
// console.log(value)
|
||||
// console.log(min)
|
||||
// console.log(max)
|
||||
// console.log(typeof(value))
|
||||
// console.log(typeof(min))
|
||||
// console.log(typeof(max))
|
||||
// value = value.replace(',', '.')
|
||||
return Number(value) >= min && Number(value) <= max
|
||||
if (value) value = value.replace(',', '.')
|
||||
return value >= min && value <= max
|
||||
},
|
||||
params: ['min', 'max'],
|
||||
message: (_, values) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user