This commit is contained in:
2022-03-02 20:07:36 +00:00
parent dd73fdca3b
commit 208240d691
3 changed files with 130 additions and 5 deletions

View File

@@ -190,8 +190,11 @@ export default {
timeSpan: "*thisyear*",
interval: "month",
wotags: [],
wotagsany: true,
woitemtags: [],
woitemtagsany: true,
techtags: [],
techtagsany: true,
userid: null,
color: "#00205B"
}
@@ -213,8 +216,11 @@ export default {
customTitle: null,
timeSpan: "*thisyear*",
wotags: [],
wotagsany: true,
woitemtags: [],
woitemtagsany: true,
techtags: [],
techtagsany: true,
userid: null,
interval: "month",
color: "#00205B"

View File

@@ -37,6 +37,7 @@
<v-card-text>
<v-select
v-model="localSettings.timeSpan"
class="mt-4"
:items="selectLists.dateFilterTokens"
item-text="name"
item-value="id"
@@ -45,6 +46,7 @@
<v-select
v-model="localSettings.interval"
class="mt-4"
:items="selectLists.units"
item-text="name"
item-value="id"
@@ -53,6 +55,7 @@
<gz-pick-list
v-model="localSettings.userid"
class="mt-4"
allow-no-selection
:aya-type="$ay.ayt().User"
variant="tech"
@@ -61,21 +64,69 @@
<gz-tag-picker
v-model="localSettings.techtags"
class="mt-4"
:label="$ay.t('Tags') + ' - ' + $ay.t('User')"
></gz-tag-picker>
<v-radio-group
v-if="localSettings.techtags.length > 1"
v-model="localSettings.techtagsany"
row
class="mt-n3"
>
<v-radio
:label="$ay.t('GridFilterDialogAndRadioText')"
:value="false"
></v-radio>
<v-radio
:label="$ay.t('GridFilterDialogOrRadioText')"
:value="true"
></v-radio>
</v-radio-group>
<gz-tag-picker
v-model="localSettings.wotags"
class="mt-4"
:label="$ay.t('Tags') + ' - ' + $ay.t('WorkOrder')"
></gz-tag-picker>
<v-radio-group
v-if="localSettings.wotags.length > 1"
v-model="localSettings.wotagsany"
row
class="mt-n3"
>
<v-radio
:label="$ay.t('GridFilterDialogAndRadioText')"
:value="false"
></v-radio>
<v-radio
:label="$ay.t('GridFilterDialogOrRadioText')"
:value="true"
></v-radio>
</v-radio-group>
<gz-tag-picker
v-model="localSettings.woitemtags"
class="mt-4"
:label="$ay.t('Tags') + ' - ' + $ay.t('WorkOrderItem')"
></gz-tag-picker>
<v-radio-group
v-if="localSettings.woitemtags.length > 1"
v-model="localSettings.woitemtagsany"
row
class="mt-n3"
>
<v-radio
:label="$ay.t('GridFilterDialogAndRadioText')"
:value="false"
></v-radio>
<v-radio
:label="$ay.t('GridFilterDialogOrRadioText')"
:value="true"
></v-radio>
</v-radio-group>
<v-text-field
v-model="localSettings.customTitle"
class="mt-4"
:label="$ay.t('Name')"
></v-text-field>
</v-card-text>
@@ -186,8 +237,11 @@ export default {
this.settings.timeSpan = this.localSettings.timeSpan;
this.settings.interval = this.localSettings.interval;
this.settings.wotags = this.localSettings.wotags;
this.settings.wotagsany = this.localSettings.wotagsany;
this.settings.woitemtags = this.localSettings.woitemtags;
this.settings.woitemtagsany = this.localSettings.woitemtagsany;
this.settings.techtags = this.localSettings.techtags;
this.settings.techtagsany = this.localSettings.techtagsany;
this.settings.userid = this.localSettings.userid;
this.$emit("dash-change"); //trigger save to server
@@ -204,8 +258,11 @@ export default {
timeSpan: this.settings.timeSpan,
interval: this.settings.interval,
wotags: this.settings.wotags,
wotagsany: this.settings.wotagsany,
woitemtags: this.settings.woitemtags,
woitemtagsany: this.settings.woitemtagsany,
techtags: this.settings.techtags,
techtagsany: this.settings.techtagsany,
userid: this.settings.userid
},
clientTimeStamp: window.$gz.locale.clientLocalZoneTimeStamp()
@@ -292,7 +349,10 @@ async function fetchTranslatedText() {
"Interval",
"WorkOrder",
"WorkOrderItem",
"WorkOrderItemLaborUserID"
"WorkOrderItemLaborUserID",
"User",
"GridFilterDialogAndRadioText",
"GridFilterDialogOrRadioText"
]);
}

View File

@@ -37,6 +37,7 @@
<v-card-text>
<v-select
v-model="localSettings.timeSpan"
class="mt-4"
:items="selectLists.dateFilterTokens"
item-text="name"
item-value="id"
@@ -45,6 +46,7 @@
<v-select
v-model="localSettings.interval"
class="mt-4"
:items="selectLists.units"
item-text="name"
item-value="id"
@@ -53,6 +55,7 @@
<gz-pick-list
v-model="localSettings.userid"
class="mt-4"
allow-no-selection
:aya-type="$ay.ayt().User"
variant="tech"
@@ -61,21 +64,69 @@
<gz-tag-picker
v-model="localSettings.techtags"
class="mt-4"
:label="$ay.t('Tags') + ' - ' + $ay.t('User')"
></gz-tag-picker>
<v-radio-group
v-if="localSettings.techtags.length > 1"
v-model="localSettings.techtagsany"
row
class="mt-n3"
>
<v-radio
:label="$ay.t('GridFilterDialogAndRadioText')"
:value="false"
></v-radio>
<v-radio
:label="$ay.t('GridFilterDialogOrRadioText')"
:value="true"
></v-radio>
</v-radio-group>
<gz-tag-picker
v-model="localSettings.wotags"
class="mt-4"
:label="$ay.t('Tags') + ' - ' + $ay.t('WorkOrder')"
></gz-tag-picker>
<v-radio-group
v-if="localSettings.wotags.length > 1"
v-model="localSettings.wotagsany"
row
class="mt-n3"
>
<v-radio
:label="$ay.t('GridFilterDialogAndRadioText')"
:value="false"
></v-radio>
<v-radio
:label="$ay.t('GridFilterDialogOrRadioText')"
:value="true"
></v-radio>
</v-radio-group>
<gz-tag-picker
v-model="localSettings.woitemtags"
class="mt-4"
:label="$ay.t('Tags') + ' - ' + $ay.t('WorkOrderItem')"
></gz-tag-picker>
<v-radio-group
v-if="localSettings.woitemtags.length > 1"
v-model="localSettings.woitemtagsany"
row
class="mt-n3"
>
<v-radio
:label="$ay.t('GridFilterDialogAndRadioText')"
:value="false"
></v-radio>
<v-radio
:label="$ay.t('GridFilterDialogOrRadioText')"
:value="true"
></v-radio>
</v-radio-group>
<v-text-field
v-model="localSettings.customTitle"
class="mt-4"
:label="$ay.t('Name')"
></v-text-field>
</v-card-text>
@@ -184,13 +235,15 @@ export default {
this.context = true;
},
updateSettings: function() {
//copy settings from local to
this.settings.customTitle = this.localSettings.customTitle;
this.settings.timeSpan = this.localSettings.timeSpan;
this.settings.interval = this.localSettings.interval;
this.settings.wotags = this.localSettings.wotags;
this.settings.wotagsany = this.localSettings.wotagsany;
this.settings.woitemtags = this.localSettings.woitemtags;
this.settings.woitemtagsany = this.localSettings.woitemtagsany;
this.settings.techtags = this.localSettings.techtags;
this.settings.techtagsany = this.localSettings.techtagsany;
this.settings.userid = this.localSettings.userid;
this.$emit("dash-change");
@@ -207,8 +260,11 @@ export default {
timeSpan: this.settings.timeSpan,
interval: this.settings.interval,
wotags: this.settings.wotags,
wotagsany: this.settings.wotagsany,
woitemtags: this.settings.woitemtags,
woitemtagsany: this.settings.woitemtagsany,
techtags: this.settings.techtags,
techtagsany: this.settings.techtagsany,
userid: this.settings.userid
},
clientTimeStamp: window.$gz.locale.clientLocalZoneTimeStamp()
@@ -295,7 +351,10 @@ async function fetchTranslatedText() {
"Interval",
"WorkOrder",
"WorkOrderItem",
"WorkOrderItemLaborUserID"
"WorkOrderItemLaborUserID",
"User",
"GridFilterDialogAndRadioText",
"GridFilterDialogOrRadioText"
]);
}