re-factor / cleanup
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<v-row v-if="formState.ready">
|
||||
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
||||
<v-col cols="12" v-if="showSelector">
|
||||
<v-col v-if="showSelector" cols="12">
|
||||
<v-dialog
|
||||
v-model="showSelector"
|
||||
scrollable
|
||||
max-width="600px"
|
||||
v-model="showSelector"
|
||||
@keydown.esc="cancel"
|
||||
data-cy="dashSelector"
|
||||
@keydown.esc="cancel"
|
||||
>
|
||||
<v-card elevation="24">
|
||||
<v-card-title class="text-h5 lighten-2" primary-title>
|
||||
@@ -31,15 +31,15 @@
|
||||
<v-btn
|
||||
color="primary"
|
||||
text
|
||||
@click.native="showSelector = false"
|
||||
data-cy="dashSelector:cancel"
|
||||
@click.native="showSelector = false"
|
||||
>{{ $ay.t("Cancel") }}</v-btn
|
||||
>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-col>
|
||||
<v-col cols="12" v-if="!hasItems()">
|
||||
<v-col v-if="!hasItems()" cols="12">
|
||||
<v-btn outlined @click.native="showSelector = true">{{
|
||||
$ay.t("Add")
|
||||
}}</v-btn>
|
||||
@@ -83,6 +83,22 @@ export default {
|
||||
GzDashTestLineWidgetMonthlyTotalPrice,
|
||||
GzDashTestDayCalendarWidget
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
effectiveView: [],
|
||||
showSelector: false,
|
||||
formState: {
|
||||
ready: false,
|
||||
dirty: false,
|
||||
valid: true,
|
||||
readOnly: false,
|
||||
loading: true,
|
||||
errorBoxMessage: null,
|
||||
appError: null,
|
||||
serverError: {}
|
||||
}
|
||||
};
|
||||
},
|
||||
beforeCreate() {
|
||||
window.$gz.eventBus.$emit("menu-change", {
|
||||
isMain: true,
|
||||
@@ -283,22 +299,6 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
effectiveView: [],
|
||||
showSelector: false,
|
||||
formState: {
|
||||
ready: false,
|
||||
dirty: false,
|
||||
valid: true,
|
||||
readOnly: false,
|
||||
loading: true,
|
||||
errorBoxMessage: null,
|
||||
appError: null,
|
||||
serverError: {}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user