Aggiungere Sito internet anche ai gruppi

Pare che quando creo un gruppo compaia il mio username tra gli amministratori !
Il filtro per Categoria in Servizi non filtra bene !
This commit is contained in:
paoloar77
2022-02-28 00:07:32 +01:00
parent a7771bce5d
commit ab7650193a
14 changed files with 726 additions and 41 deletions

View File

@@ -727,6 +727,7 @@ export default defineComponent({
photos: 1,
idCity: 1,
note: 1,
link_telegram: 1,
website: 1,
comune: 1,
mycities: 1,
@@ -750,6 +751,7 @@ export default defineComponent({
idCity: 1,
note: 1,
website: 1,
link_telegram: 1,
comune: 1,
mycities: 1,
sector: 1,
@@ -774,6 +776,7 @@ export default defineComponent({
note: 1,
//**ADDFIELD_MYGROUPS
website: 1,
link_telegram: 1,
comune: 1,
mycities: 1,
recCatGrp: 1,

View File

@@ -245,7 +245,7 @@ export default defineComponent({
const serverData: any = ref([])
const spinner_visible = ref(false)
const searchList = toRef(props, 'prop_searchList')
const searchList = ref(<ISearchList[]> [])
let actual = ''
@@ -307,24 +307,29 @@ export default defineComponent({
})
function setCategBySector(tablecat: string, tabsector: string, newval: any) {
const recSector = searchList.value.find((rec) => rec.table === tabsector)
if (recSector)
tools.setCookie(tools.COOK_SEARCH + tablecat + '_' + recSector.value, newval)
tools.setCookie(tools.COOK_SEARCH + tabsector, newval)
for (const item of searchList.value) {
if (item.table === tablecat) {
const valsaved = tools.getCookie(tools.COOK_SEARCH + tablecat + '_' + newval, costanti.FILTER_TUTTI)
const rec = searchList.value.find((rec) => rec.table === tablecat) // check if exist
let trovato = false
let arrvalues = []
if (rec) {
const arrvalues = valoriopt.value(rec.value, false)
arrvalues = valoriopt.value(rec.value, false)
if (arrvalues)
trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved)
}
if (valsaved && trovato)
item.value = valsaved
else
item.value = costanti.FILTER_TUTTI
else {
if (arrvalues) {
item.value = costanti.FILTER_TUTTI
}
}
}
}
@@ -334,10 +339,10 @@ export default defineComponent({
// console.log('searchval', newval, table)
tools.setCookie(tools.COOK_SEARCH + table, newval)
if (table === 'skills') {
setCategBySector(table, 'sectors', newval)
if (table === 'sectors') {
setCategBySector('skills', table, newval)
}else if (table === 'goods') {
setCategBySector(table, 'sectorgoods', newval)
setCategBySector('sectorgoods', table, newval)
}
refresh()
@@ -417,8 +422,10 @@ export default defineComponent({
if (searchList.value) {
recSkill = searchList.value.find((item: ISearchList) => item.table === 'skills')
idSkill = recSkill ? recSkill.value : 0
console.log('recSkill', idSkill)
}
let arrfilter_cities: any = []
let arrfilter_provices: any = []
@@ -480,6 +487,8 @@ export default defineComponent({
filtersearch.push(objitem)
} else if (item.arrvalue.length > 0) {
const myarr = item.arrvalue.filter((value: any) => {
if (typeof value === 'number') {
return value > 0
@@ -507,21 +516,25 @@ export default defineComponent({
} else {
if ((item.table === 'skills') && item.value === costanti.FILTER_TUTTI) {
let obj2: any = {}
if (idSector > 0) {
// idSector
obj2['sector._id'] = idSector
filtersearch2.push(obj2)
}
}
if ((item.table === 'goods') && item.value === costanti.FILTER_TUTTI) {
if (idSkill > 0) {
// idSector
obj2['idSkill'] = idSkill
filtersearch2.push(obj2)
}
} else if ((item.table === 'goods') && item.value === costanti.FILTER_TUTTI) {
let obj2: any = {}
if (idSectorGood > 0) {
// idSectorGood
obj2['sectorgood._id'] = idSectorGood
filtersearch2.push(obj2)
}
}
if ((item.table === 'subskills') && item.value === costanti.FILTER_TUTTI) {
} else if ((item.table === 'subskills') && item.value === costanti.FILTER_TUTTI) {
let obj2: any = {}
// idSector
if (idSkill > 0) {
@@ -977,6 +990,8 @@ export default defineComponent({
}
function mounted() {
searchList.value = props.prop_searchList
// console.log('GridTable mounted', tablesel.value)
// console.log('props.filtercustom', props.filtercustom)
@@ -1454,8 +1469,8 @@ export default defineComponent({
function showColCheck(col: IColGridTable, tipovis: number, visulabel:boolean, value: any = '', record: any = null){
if (col.isadvanced_field && !showfilteradv.value)
return false
//if (col.isadvanced_field && !showfilteradv.value)
// return false
const check = tools.checkIfShowField(col, tipovis, visulabel, value)

View File

@@ -556,10 +556,10 @@
<div
v-for="col in mycolumns" :key="col.name" class="newrec_fields">
<div class="text-center q-my-xs" v-if="(col.fieldtype === costanti.FieldType.separator)">
<!--<div class="text-center q-my-xs" v-if="(col.fieldtype === costanti.FieldType.separator)">
<q-btn color="primary" size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'"
label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
</div>
</div>-->
<div
v-if="showColCheck(col, tools.TIPOVIS_NEW_RECORD, true, 0, newRecord) && col.foredit ">
<div class="">
@@ -602,12 +602,12 @@
<q-card-section class="inset-shadow">
<div
v-for="col in mycolumns" :key="col.name">
<div class="text-center q-my-xs" v-if="(col.fieldtype === costanti.FieldType.separator)">
<!--<div class="text-center q-my-xs" v-if="(col.fieldtype === costanti.FieldType.separator)">
<q-btn color="primary" size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'"
label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
</div>
</div>-->
<div
v-else-if="showColCheck(col, tools.TIPOVIS_EDIT_RECORD, false) && col.foredit">
v-if="showColCheck(col, tools.TIPOVIS_EDIT_RECORD, false) && col.foredit">
<div>
<CMyPopupEdit
:table="mytable"

View File

@@ -53,7 +53,8 @@
<q-btn v-if="myvalue"
type="a" rounded size="md"
:class="{disabled: disable }"
color="white" text-color="blue" icon="fas fa-globe"
color="white" text-color="blue"
:icon="col.icon ? col.icon : `fas fa-globe`"
:href="tools.getlinkstd(myvalue)"
:label="myvalue"
target="_blank"