This commit is contained in:
2021-11-01 22:11:47 +00:00
parent 95847c195a
commit efb8ce93e3
4 changed files with 30 additions and 62 deletions

View File

@@ -15,14 +15,12 @@
:rules="rules"
readonly
:error="!!hasErrors"
:data-cy="'dtfpick:' + testId"
></v-text-field>
</template>
<v-date-picker
:value="dateValue"
@input="updateDateValue"
:locale="languageName"
:data-cy="'dpick:' + testId"
>
<v-btn text color="primary" @click="$emit('input', null)">{{
$ay.t("Delete")
@@ -52,7 +50,7 @@
:rules="rules"
type="date"
:error-messages="errorMessages"
:data-cy="'dpick:' + testId"
:data-cy="`${dataCy}:time`"
></v-text-field>
</v-col>
</template>
@@ -90,7 +88,7 @@ export default {
value: { type: String, default: null },
readonly: { type: Boolean, default: false },
disabled: { type: Boolean, default: false },
testId: { type: String, default: null }
dataCy: { type: String, default: null }
},
computed: {
hasErrors() {

View File

@@ -16,38 +16,24 @@
:rules="rules"
readonly
:error="!!hasErrors"
:data-cy="'dtfpick:' + testId"
></v-text-field>
</template>
<v-date-picker
:value="dateValue"
@input="updateDateValue"
:locale="languageName"
:data-cy="'dpick:' + testId"
>
<v-btn
text
color="primary"
@click="$emit('input', null)"
:data-cy="'dpickdelete:' + testId"
>{{ $ay.t("Delete") }}</v-btn
>
<v-btn text color="primary" @click="$emit('input', null)">{{
$ay.t("Delete")
}}</v-btn>
<v-spacer></v-spacer>
<v-btn
text
color="primary"
@click="setToday()"
:data-cy="'dpicktoday:' + testId"
>{{ $ay.t("DateRangeToday") }}</v-btn
>
<v-btn text color="primary" @click="setToday()">{{
$ay.t("DateRangeToday")
}}</v-btn>
<v-spacer></v-spacer>
<v-btn
text
color="primary"
@click="dlgdate = false"
:data-cy="'dpickok:' + testId"
>{{ $ay.t("OK") }}</v-btn
>
<v-btn text color="primary" @click="dlgdate = false">{{
$ay.t("OK")
}}</v-btn>
</v-date-picker>
</v-dialog>
</v-col>
@@ -62,7 +48,6 @@
@click:prepend="dlgtime = true"
readonly
:error="!!hasErrors"
:data-cy="'ttfpick:' + testId"
></v-text-field>
</template>
<v-time-picker
@@ -71,31 +56,18 @@
:format="hour12 ? 'ampm' : '24hr'"
:value="timeValue"
@input="updateTimeValue"
:data-cy="'tpick:' + testId"
>
<v-btn
text
color="primary"
@click="$emit('input', null)"
:data-cy="'ttfpickdelete:' + testId"
>{{ $ay.t("Delete") }}</v-btn
>
<v-btn text color="primary" @click="$emit('input', null)">{{
$ay.t("Delete")
}}</v-btn>
<v-spacer></v-spacer>
<v-btn
text
color="primary"
@click="setNow()"
:data-cy="'ttfpicknow:' + testId"
>{{ $ay.t("Now") }}</v-btn
>
<v-btn text color="primary" @click="setNow()">{{
$ay.t("Now")
}}</v-btn>
<v-spacer></v-spacer>
<v-btn
text
color="primary"
@click="dlgtime = false"
:data-cy="'ttfpickok:' + testId"
>{{ $ay.t("OK") }}</v-btn
>
<v-btn text color="primary" @click="dlgtime = false">{{
$ay.t("OK")
}}</v-btn>
</v-time-picker>
</v-dialog>
</v-col>
@@ -112,7 +84,7 @@
:rules="rules"
type="date"
:error-messages="errorMessages"
:data-cy="'dpick:' + testId"
:data-cy="`${dataCy}:date`"
></v-text-field>
</v-col>
<v-col cols="6">
@@ -123,7 +95,7 @@
:readonly="readonly"
:disabled="disabled"
type="time"
:data-cy="'tpick:' + testId"
:data-cy="`${dataCy}:time`"
></v-text-field>
</v-col>
</template>
@@ -164,7 +136,7 @@ export default {
value: { type: String, default: null },
readonly: { type: Boolean, default: false },
disabled: { type: Boolean, default: false },
testId: { type: String, default: null }
dataCy: { type: String, default: null }
},
computed: {
hasErrors() {

View File

@@ -15,7 +15,7 @@
:disabled="disabled"
:label="$ay.t('TimeSpanDays')"
type="number"
:data-cy="'durationdays:' + testId"
:data-cy="`${dataCy}:days`"
:error="!!hasErrors"
></v-text-field>
</v-col>
@@ -28,7 +28,7 @@
:disabled="disabled"
:label="$ay.t('TimeSpanHours')"
type="number"
:data-cy="'durationhours:' + testId"
:data-cy="`${dataCy}:hours`"
:error="!!hasErrors"
></v-text-field>
</v-col>
@@ -41,7 +41,7 @@
:disabled="disabled"
:label="$ay.t('TimeSpanMinutes')"
type="number"
:data-cy="'durationminutes:' + testId"
:data-cy="`${dataCy}:minutes`"
:error="!!hasErrors"
></v-text-field>
</v-col>
@@ -55,7 +55,7 @@
:disabled="disabled"
:label="$ay.t('TimeSpanSeconds')"
type="number"
:data-cy="'durationseconds:' + testId"
:data-cy="`${dataCy}:seconds`"
:error="!!hasErrors"
></v-text-field>
</v-col>
@@ -79,7 +79,7 @@ export default {
disabled: { type: Boolean, default: false },
showSeconds: { type: Boolean, default: true },
showDays: { type: Boolean, default: true },
testId: { type: String, default: null }
dataCy: { type: String, default: null }
},
computed: {
hasErrors() {

View File

@@ -14,7 +14,6 @@
@click:prepend="dlgtime = true"
readonly
:error="!!hasErrors"
:data-cy="'ttfpick:' + testId"
></v-text-field>
</template>
<v-time-picker
@@ -23,7 +22,6 @@
:format="hour12 ? 'ampm' : '24hr'"
:value="timeValue"
@input="updateTimeValue"
:data-cy="'tpick:' + testId"
><v-btn text color="primary" @click="$emit('input', null)">{{
$ay.t("Delete")
}}</v-btn>
@@ -48,7 +46,7 @@
:readonly="readonly"
:disabled="disabled"
type="time"
:data-cy="'tpick:' + testId"
:data-cy="`${dataCy}:time`"
></v-text-field>
</v-col>
</template>
@@ -88,7 +86,7 @@ export default {
value: { type: String, default: null },
readonly: { type: Boolean, default: false },
disabled: { type: Boolean, default: false },
testId: { type: String, default: null }
dataCy: { type: String, default: null }
},
computed: {
hasErrors() {