This commit is contained in:
2020-02-07 22:08:59 +00:00
parent b2daa8b0d3
commit 44762e84a5
3 changed files with 8 additions and 41 deletions

View File

@@ -9,16 +9,12 @@
locale: languageName
}"
:readonly="readonly"
v-bind:label="label"
v-bind:rules="rules"
v-bind:required="required"
:label="label"
:rules="rules"
></v-text-field>
<p v-show="error" class="form__error v-messages theme--light error--text">
{{ error }}
</p>
<!-- currency:{{ currencyName }}, locale:{{ languageName }}, amount:{{ amount }}
<span class="title">v-currency-field</span>
<v-currency-field v-model="value" /> -->
</div>
</template>
<script>
@@ -41,7 +37,6 @@ export default {
label: String,
rules: Array,
value: { type: Number, default: null },
required: { type: Boolean, default: false },
readonly: { type: Boolean, default: false },
error: {
type: String,
@@ -66,29 +61,5 @@ export default {
this.formattedValue = value;
}
}
// ,
// computed: {
// amountLocal: {
// get: function() {
// console.log("Control getting amount: " + this.amount);
// if (this.amount == null) {
// return "0";
// } else {
// return this.amount.toString();
// }
// },
// set: function(value) {
// var parsedValue = this.$parseCurrency(this.amount, {
// currency: this.currencyName,
// locale: this.languageName
// });
// console.log("Control SETTING amount: " + parsedValue);
// //https://vuejs.org/v2/guide/components-custom-events.html#sync-Modifier
// //https://stackoverflow.com/a/51722100/8939
// this.$emit("update:amount", parsedValue);
// this.$emit("change", parsedValue);
// }
// }
// },
};
</script>

View File

@@ -23,7 +23,6 @@
prepend-icon="fa-user"
label="User"
autofocus
required
clearable
autocomplete="off"
autocorrect="off"
@@ -41,7 +40,6 @@
prepend-icon="fa-key"
label="Password"
type="password"
required
clearable
:error="errorBadCreds"
v-on:keyup.enter="login"

View File

@@ -70,7 +70,6 @@
ref="count"
:rules="[form().integerValid(this, 'count')]"
:error-messages="form().serverErrors(this, 'count')"
required
@change="onChange('count')"
type="number"
></v-text-field>
@@ -88,10 +87,12 @@
:readonly="this.formState.readOnly"
:label="lt('WidgetDollarAmount')"
ref="dollarAmount"
required
:rules="[form().decimalValid(this, 'dollarAmount')]"
:rules="[
form().decimalValid(this, 'dollarAmount'),
form().required(this, 'dollarAmount')
]"
:error-messages="form().serverErrors(this, 'dollarAmount')"
@change="onChange('dollarAmount')"
@input="onChange('dollarAmount')"
></gz-currency>
</v-col>
@@ -130,7 +131,6 @@
:label="lt('Active')"
ref="active"
:error-messages="form().serverErrors(this, 'active')"
required
@change="onChange('active')"
></v-checkbox>
</v-col>
@@ -151,7 +151,6 @@
ref="roles"
:rules="[form().integerValid(this, 'roles')]"
:error-messages="form().serverErrors(this, 'roles')"
required
@change="onChange('roles')"
></v-select>
</v-col>
@@ -416,7 +415,6 @@ export default {
},
onChange(ref) {
if (!this.formState.loading && !this.formState.readOnly) {
console.log("Onchange: " + ref);
window.$gz.form.onChange(this, ref);
}
},
@@ -447,7 +445,7 @@ export default {
window.$gz.form.setErrorBoxErrors(vm);
} else {
vm.obj = res.data;
console.log("GetData dollarAmount:" + res.data.dollarAmount);
//Update the form status
window.$gz.form.setFormState({
vm: vm,