re-factor / cleanup

This commit is contained in:
2022-01-11 22:08:38 +00:00
parent e871708b20
commit e0be8a7cfe
251 changed files with 14680 additions and 15693 deletions

View File

@@ -7,20 +7,20 @@
<v-dialog v-model="dlgdate" width="300px">
<template v-slot:activator="{ on }">
<v-text-field
v-on="on"
prepend-icon="$ayiCalendarAlt"
@click:prepend="dlgdate = true"
:value="dateValue"
:label="label"
:rules="rules"
readonly
:error="!!hasErrors"
v-on="on"
@click:prepend="dlgdate = true"
></v-text-field>
</template>
<v-date-picker
:value="dateValue"
@input="updateDateValue"
:locale="languageName"
@input="updateDateValue"
>
<v-btn text color="primary" @click="$emit('input', null)">{{
$ay.t("Delete")
@@ -43,7 +43,6 @@
<v-text-field
ref="dateField"
:value="dateValue"
@change="updateDateValue"
:readonly="readonly"
:disabled="disabled"
:label="label"
@@ -51,6 +50,7 @@
type="date"
:error-messages="errorMessages"
:data-cy="`${dataCy}:time`"
@change="updateDateValue"
></v-text-field>
</v-col>
</template>
@@ -76,11 +76,6 @@
<script>
//******************************** NOTE: this control also captures the TIME even though it's DATE only, this is an intentional design decision to support field change to date or date AND time and is considered a display issue */
export default {
data: () => ({
dlgdate: false,
timeZoneName: window.$gz.locale.getResolvedTimeZoneName(),
languageName: window.$gz.locale.getResolvedLanguage()
}),
props: {
label: { type: String, default: null },
rules: { type: Array, default: undefined },
@@ -90,6 +85,11 @@ export default {
disabled: { type: Boolean, default: false },
dataCy: { type: String, default: null }
},
data: () => ({
dlgdate: false,
timeZoneName: window.$gz.locale.getResolvedTimeZoneName(),
languageName: window.$gz.locale.getResolvedLanguage()
}),
computed: {
hasErrors() {
return this.errorMessages != null && this.errorMessages.length > 0;