This commit is contained in:
2020-12-15 19:17:28 +00:00
parent de48dce53c
commit e49889d134
3 changed files with 44 additions and 31 deletions

View File

@@ -31,8 +31,6 @@ todo: biz rule like validatecansave and validatecandelete but validatecanFetch f
currently doing: MEMO - currently doing: MEMO -
READ menu items
Reply, Forward
compose - must filter OUT outside users, currently they show, new picklist I guess with extra criteria? compose - must filter OUT outside users, currently they show, new picklist I guess with extra criteria?
search results should not pull up other's memo's search results should not pull up other's memo's
exclude from searching? Not searchable?? exclude from searching? Not searchable??

View File

@@ -37,10 +37,9 @@
</template> </template>
<script> <script>
///////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* eslint-disable */ /* Xeslint-disable */
//////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////
export default { export default {
created() { created() {
this.fetchValueIfNotPresent(); this.fetchValueIfNotPresent();
@@ -82,7 +81,11 @@ export default {
default: true default: true
}, },
canClear: { type: Boolean, default: true }, canClear: { type: Boolean, default: true },
label: { type: String, default: "" } label: { type: String, default: "" },
variant: {
type: String,
default: null
}
}, },
watch: { watch: {
ayaType(val, oldVal) { ayaType(val, oldVal) {
@@ -174,7 +177,6 @@ export default {
//this is required for the control to update and parent form to detect it //this is required for the control to update and parent form to detect it
this.$emit("input", e.id); this.$emit("input", e.id);
}, },
fetchValueIfNotPresent() { fetchValueIfNotPresent() {
//is there a value that might require fetching? //is there a value that might require fetching?
@@ -195,7 +197,12 @@ export default {
window.$gz.form.addNoSelectionItem(vm.searchResults, true); window.$gz.form.addNoSelectionItem(vm.searchResults, true);
} else { } else {
//Not here, better get it //Not here, better get it
let urlParams = "?ayaType=" + vm.ayaType + "&preId=" + vm.value; let variantSegment = "";
if (vm.variant != null) {
variantSegment = `&variant=${vm.variant}`;
}
let urlParams =
"?ayaType=" + vm.ayaType + "&preId=" + vm.value + variantSegment;
vm.getList(urlParams); vm.getList(urlParams);
} }
}, },
@@ -270,6 +277,9 @@ export default {
if (vm.includeInactive) { if (vm.includeInactive) {
urlParams += "&inactive=true"; urlParams += "&inactive=true";
} }
if (vm.variant != null) {
urlParams += `&variant=${vm.variant}`;
}
} }
try { try {
let res = await window.$gz.api.get("pick-list/list" + urlParams); let res = await window.$gz.api.get("pick-list/list" + urlParams);
@@ -373,6 +383,9 @@ export default {
if (vm.includeInactive) { if (vm.includeInactive) {
urlParams += "&inactive=true"; urlParams += "&inactive=true";
} }
if (vm.variant != null) {
urlParams += `&variant=${vm.variant}`;
}
this.getList(urlParams); this.getList(urlParams);
//------------ //------------
}, 300) //did some checking, 200-300ms seems to be the most common debounce time for ajax search queries }, 300) //did some checking, 200-300ms seems to be the most common debounce time for ajax search queries
@@ -383,7 +396,8 @@ export default {
function debounce(func, wait, immediate) { function debounce(func, wait, immediate) {
var timeout; var timeout;
return function() { return function() {
var context = this, args = arguments; var context = this,
args = arguments;
clearTimeout(timeout); clearTimeout(timeout);
timeout = setTimeout(function() { timeout = setTimeout(function() {
timeout = null; timeout = null;

View File

@@ -72,6 +72,7 @@
:allowNoSelection="false" :allowNoSelection="false"
:canClear="false" :canClear="false"
:ayaType="ayaTypes().User" :ayaType="ayaTypes().User"
:variant="'outside'"
:showEditIcon="false" :showEditIcon="false"
v-model="pickListSelectedUserId" v-model="pickListSelectedUserId"
:label="$ay.t('MemoToID')" :label="$ay.t('MemoToID')"