This commit is contained in:
2019-06-18 23:56:40 +00:00
parent bc262a1899
commit aee900ab82
3 changed files with 44 additions and 4 deletions

View File

@@ -77,6 +77,8 @@ DONE: Turn widget edit ROLES into a static select populated from server
- Use the enumpicklist route to get a list of roles and use it for the widget UI - Use the enumpicklist route to get a list of roles and use it for the widget UI
DONE: Widget - NOTES FIELD DONE: Widget - NOTES FIELD
TODO: TAGS!!! Do tags mofo TODO: TAGS!!! Do tags mofo
- https://stackoverflow.com/questions/48500587/vuetify-v0-17-6-how-to-get-the-autocomplete-text-inside-v-select
-
TODO: Custom fields TODO: Custom fields
TODO: Record history display / check other AyaNova 7 options / buttons that need to carry forward TODO: Record history display / check other AyaNova 7 options / buttons that need to carry forward
- Some of this stuff is stage 2 for the edit form - Some of this stuff is stage 2 for the edit form

View File

@@ -97,7 +97,8 @@ export default {
"DeletePrompt", "DeletePrompt",
"AreYouSureUnsavedChanges", "AreYouSureUnsavedChanges",
"Leave", "Leave",
"Copy" "Copy",
"Tags"
], ],
decimalValidate(required) { decimalValidate(required) {
return { required: required, decimal: [2, this.format().decimalSeparator] }; return { required: required, decimal: [2, this.format().decimalSeparator] };

View File

@@ -138,6 +138,20 @@
@change="onChange('roles')" @change="onChange('roles')"
></v-select> ></v-select>
</v-flex> </v-flex>
<v-flex xs12 px-2>
<v-autocomplete
v-model="obj.tags"
:readonly="this.formState.readOnly"
:label="this.$gzlocale.get('Tags')"
:error-messages="this.$gzform.serverErrors(this, 'tags')"
ref="tags"
@change="onChange('tags')"
:items="pickLists.tags"
:loading="tagSearchUnderway"
:search-input.sync="searchTags"
chips
></v-autocomplete>
</v-flex>
<v-flex xs12 px-2> <v-flex xs12 px-2>
<v-textarea <v-textarea
v-model="obj.notes" v-model="obj.notes"
@@ -147,7 +161,6 @@
ref="notes" ref="notes"
@change="onChange('notes')" @change="onChange('notes')"
auto-grow auto-grow
outline
></v-textarea> ></v-textarea>
</v-flex> </v-flex>
</v-layout> </v-layout>
@@ -173,7 +186,7 @@
<script> <script>
///////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* Xeslint-disable */ /* eslint-disable */
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
const FORM_KEY = "inventory-widget-edit"; const FORM_KEY = "inventory-widget-edit";
@@ -256,8 +269,11 @@ export default {
data() { data() {
return { return {
pickLists: { pickLists: {
roles: [] roles: [],
tags: []
}, },
searchTags: null,
tagSearchUnderway: false,
obj: { obj: {
id: 0, id: 0,
concurrencyToken: 0, concurrencyToken: 0,
@@ -312,6 +328,27 @@ export default {
} }
}, },
deep: true deep: true
},
searchTags(val) {
var vm = this;
if (vm.tagSearchUnderway) {
return;
}
vm.tagSearchUnderway = true;
vm.$gzapi
.get("TagList/picklist?query=" + val) //roles
.then(res => {
if (res.error) {
throw res.error;
}
vm.pickLists.tags = res.data;
vm.tagSearchUnderway = false;
})
.catch(err => {
vm.$gzHandleFormError(err);
});
} }
}, },
computed: { computed: {