- fix QSelect

- permessi none/friends/all
This commit is contained in:
paoloar77
2022-01-28 18:15:46 +01:00
parent 5f51c231eb
commit d7480fd489
32 changed files with 777 additions and 222 deletions

View File

@@ -279,7 +279,17 @@ export default defineComponent({
if (item.table === 'skills') {
// console.log('---PRIMA ', item.value)
const valsaved = tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + newval, costanti.FILTER_TUTTI)
if (valsaved)
// check if exist
const recSkill = searchList.value.find((rec) => rec.table === 'skills')
let trovato = false
if (recSkill) {
console.log('recSkill.value', recSkill)
const arrvalues = valoriopt.value(recSkill.value, false)
console.log('arrvalues', arrvalues)
if (arrvalues)
trovato = arrvalues.find((rec: any) => rec[recSkill.key] === valsaved)
}
if (valsaved && trovato)
item.value = valsaved
else
item.value = costanti.FILTER_TUTTI
@@ -438,7 +448,7 @@ export default defineComponent({
}
}
console.log('filtersearch', filtersearch)
// console.log('filtersearch', filtersearch)
if (props.prop_search) {
let nosearch = false
@@ -450,7 +460,6 @@ export default defineComponent({
if (props.keyMain) {
nosearch = true
filtersearch.forEach((rec: any) => {
console.log('rec', rec)
if (!!rec[props.keyMain]) {
nosearch = false
}
@@ -464,7 +473,7 @@ export default defineComponent({
}
}
console.log('filtercustom', props.filtercustom)
// console.log('filtercustom', props.filtercustom)
let params: IParamsQuery = {
@@ -843,7 +852,7 @@ export default defineComponent({
function mounted() {
// console.log('GridTable mounted', tablesel.value)
console.log('props.filtercustom', props.filtercustom)
// console.log('props.filtercustom', props.filtercustom)
if (!!props.tablesList) {

View File

@@ -105,6 +105,7 @@
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `">
<span v-for="(item, index) in searchList" :key="index">
<CMySelect
:col="fieldsTable.getColByTable('myskills', item.key)"
v-if="(item.type === costanti.FieldType.select) || (item.type === costanti.FieldType.select_by_server)"
:label="labelcombo(item)"
v-model:value="item.value"
@@ -115,6 +116,7 @@
label-color="primary"
class="combowidth"
color="primary"
:icon_alternative="item.icon"
:optval="fieldsTable.getKeyByTable(item.table)"
:optlab="fieldsTable.getLabelByTable(item.table)"
:options="valoriopt(item, false)"
@@ -127,6 +129,7 @@
<CMySelect
v-if="item.type === costanti.FieldType.multiselect_by_server"
:col="fieldsTable.getColByTable('myskills', item.key)"
:multiselect_by_server="true"
:label="labelcombo(item)"
v-model:arrvalue="item.arrvalue"
@@ -138,6 +141,7 @@
label-color="primary"
class="combowidth"
color="primary"
:icon_alternative="item.icon"
:optval="fieldsTable.getKeyByTable(item.table)"
:optlab="fieldsTable.getLabelByTable(item.table)"
:options="valoriopt(item, false)"
@@ -164,6 +168,9 @@
:option-value="fieldsTable.getKeyByTable(item.table)"
>
<template v-if="item.icon" v-slot:prepend>
<q-icon :name="item.icon" />
</template>
<template
v-if="item.arrvalue.length >= 1"
v-slot:selected-item="scope">
@@ -389,7 +396,6 @@
class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb"
@click="colclicksel = mycol">
mycol : {{mycol}}
<CMyPopupEdit
:table="mytable"
:canEdit="true"