Ora cambiando Settore, la Categoria viene sbiancata su "Nessuno" (anche se ancora rimane visivamente selezionato)
i campi obbligatori non funziona il controllo? (Erano i campi di tipo Array) Aggiunta Categoria Ecovillaggi / Comunità + AutoProduzione Aggiunte consulenza, affrancamento, supporto.. su temi di LAVORO Quando inserisci un nuovo annuncio, prendi di default tutti i filtri visualizzati Aggiungere bottone "Condividi Pagina" sui gruppi
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.13"
|
APP_VERSION="0.2.14"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.13"
|
APP_VERSION="0.2.14"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="1"
|
APP_ID="1"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.13"
|
APP_VERSION="0.2.14"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.13"
|
APP_VERSION="0.2.14"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="12"
|
APP_ID="12"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default defineComponent({
|
|||||||
/*
|
/*
|
||||||
const idSectorServizi = computed(() => {
|
const idSectorServizi = computed(() => {
|
||||||
let myval: any = null
|
let myval: any = null
|
||||||
myval = searchList_Servizi.value.find((rec) => (rec.table === 'sectors'))
|
myval = searchList_Servizi.value.find((rec) => (rec.table === toolsext.TABSECTORS))
|
||||||
if (myval) {
|
if (myval) {
|
||||||
const ris = myval.value || 0
|
const ris = myval.value || 0
|
||||||
// console.log('idSectorServizi=', ris)
|
// console.log('idSectorServizi=', ris)
|
||||||
@@ -165,9 +165,9 @@ export default defineComponent({
|
|||||||
|
|
||||||
|
|
||||||
function getFilterSkills(recSkill: any, index: number, arr: any) {
|
function getFilterSkills(recSkill: any, index: number, arr: any) {
|
||||||
const recsectors: any = searchList.value.find((rec) => rec.table === 'sectors')
|
const recsectors: any = searchList.value.find((rec) => rec.table === toolsext.TABSECTORS)
|
||||||
// console.log('getFilterSkills', recSkill.idSector, recsectors.value)
|
// console.log('getFilterSkills', recSkill.idSector, recsectors.value)
|
||||||
if (recsectors) {
|
if (recsectors && recSkill.idSector) {
|
||||||
return recSkill.idSector.includes(recsectors.value)
|
return recSkill.idSector.includes(recsectors.value)
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
@@ -177,7 +177,7 @@ export default defineComponent({
|
|||||||
function getFilterGoods(recGood: any, index: number, arr: any) {
|
function getFilterGoods(recGood: any, index: number, arr: any) {
|
||||||
const recsectorGoods: any = searchList.value.find((rec) => rec.table === 'sectorgoods')
|
const recsectorGoods: any = searchList.value.find((rec) => rec.table === 'sectorgoods')
|
||||||
// console.log('getFilterSkills', recSkill.idSector, recsectors.value)
|
// console.log('getFilterSkills', recSkill.idSector, recsectors.value)
|
||||||
if (recsectorGoods) {
|
if (recsectorGoods && recGood.idSectorGood) {
|
||||||
return recGood.idSectorGood.includes(recsectorGoods.value)
|
return recGood.idSectorGood.includes(recsectorGoods.value)
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
@@ -281,9 +281,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Settore',
|
label: 'Settore',
|
||||||
table: 'sectors',
|
table: toolsext.TABSECTORS,
|
||||||
key: 'idSector',
|
key: 'idSector',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'sectors', 0),
|
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, 0),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -295,7 +295,7 @@ export default defineComponent({
|
|||||||
label: 'Categoria',
|
label: 'Categoria',
|
||||||
table: 'skills',
|
table: 'skills',
|
||||||
key: 'idSkill',
|
key: 'idSkill',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + tools.getCookie(tools.COOK_SEARCH + 'sectors', costanti.FILTER_TUTTI), costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
addall: true,
|
addall: true,
|
||||||
@@ -444,9 +444,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Settore',
|
label: 'Settore',
|
||||||
table: 'sectors',
|
table: toolsext.TABSECTORS,
|
||||||
key: 'idSector',
|
key: 'idSector',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'sectors', 0),
|
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, 0),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -458,7 +458,7 @@ export default defineComponent({
|
|||||||
label: 'Categoria',
|
label: 'Categoria',
|
||||||
table: 'skills',
|
table: 'skills',
|
||||||
key: 'idSkill',
|
key: 'idSkill',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + tools.getCookie(tools.COOK_SEARCH + 'sectors', costanti.FILTER_TUTTI), costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
addall: true,
|
addall: true,
|
||||||
@@ -672,9 +672,9 @@ export default defineComponent({
|
|||||||
table: 'cities',
|
table: 'cities',
|
||||||
key: 'idCity',
|
key: 'idCity',
|
||||||
type: costanti.FieldType.select_by_server,
|
type: costanti.FieldType.select_by_server,
|
||||||
value: 0,
|
arrvalue: [],
|
||||||
addall: true,
|
addall: true,
|
||||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
||||||
useinput: true,
|
useinput: true,
|
||||||
filter: null,
|
filter: null,
|
||||||
// filter: getFilterCitiesByProvince,
|
// filter: getFilterCitiesByProvince,
|
||||||
@@ -891,7 +891,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
lookup3: {
|
lookup3: {
|
||||||
lk_tab: 'sectors',
|
lk_tab: toolsext.TABSECTORS,
|
||||||
lk_LF: 'recSkill.idSector',
|
lk_LF: 'recSkill.idSector',
|
||||||
lk_FF: '_id',
|
lk_FF: '_id',
|
||||||
lk_as: 'sector',
|
lk_as: 'sector',
|
||||||
@@ -952,7 +952,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
lookup3: {
|
lookup3: {
|
||||||
lk_tab: 'sectors',
|
lk_tab: toolsext.TABSECTORS,
|
||||||
lk_LF: 'recSkill.idSector',
|
lk_LF: 'recSkill.idSector',
|
||||||
lk_FF: '_id',
|
lk_FF: '_id',
|
||||||
lk_as: 'sector',
|
lk_as: 'sector',
|
||||||
|
|||||||
@@ -280,15 +280,15 @@ export default defineComponent({
|
|||||||
|
|
||||||
const myvertical = ref(props.vertical)
|
const myvertical = ref(props.vertical)
|
||||||
|
|
||||||
const valoriopt = computed(() => (item: any, addall: boolean) => {
|
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
|
||||||
// console.log('valoriopt', item.table)
|
// console.log('valoriopt', item.table)
|
||||||
return globalStore.getTableJoinByName(item.table, addall, item.filter)
|
return globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
|
||||||
})
|
})
|
||||||
|
|
||||||
const labelcombo = computed(() => (item: any) => {
|
const labelcombo = computed(() => (item: any) => {
|
||||||
let lab = item.label
|
let lab = item.label
|
||||||
if (item.showcount)
|
if (item.showcount)
|
||||||
lab += ' (' + valoriopt.value(item, false).length + ')'
|
lab += ' (' + valoriopt.value(item, false, false).length + ')'
|
||||||
return lab
|
return lab
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ export default defineComponent({
|
|||||||
let trovato = false
|
let trovato = false
|
||||||
let arrvalues = []
|
let arrvalues = []
|
||||||
if (rec) {
|
if (rec) {
|
||||||
arrvalues = valoriopt.value(rec.value, false)
|
arrvalues = valoriopt.value(rec.value, false, false)
|
||||||
if (arrvalues)
|
if (arrvalues)
|
||||||
trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved)
|
trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved)
|
||||||
}
|
}
|
||||||
@@ -336,11 +336,16 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function searchval(newval: any, table: any) {
|
function searchval(newval: any, table: any) {
|
||||||
// console.log('searchval', newval, table)
|
console.log('searchval', newval, table)
|
||||||
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
||||||
|
|
||||||
if (table === 'sectors') {
|
if (table === toolsext.TABSKILLS) {
|
||||||
setCategBySector('skills', table, newval)
|
const recSector = searchList.value.find((rec) => rec.table === 'sectors')
|
||||||
|
if (recSector) {
|
||||||
|
tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval)
|
||||||
|
}
|
||||||
|
} else if (table === toolsext.TABSECTORS) {
|
||||||
|
setCategBySector(toolsext.TABSKILLS, table, newval)
|
||||||
}else if (table === 'goods') {
|
}else if (table === 'goods') {
|
||||||
setCategBySector('sectorgoods', table, newval)
|
setCategBySector('sectorgoods', table, newval)
|
||||||
}
|
}
|
||||||
@@ -400,7 +405,7 @@ export default defineComponent({
|
|||||||
let idRegion = 0
|
let idRegion = 0
|
||||||
let idSkill = 0
|
let idSkill = 0
|
||||||
if (searchList.value) {
|
if (searchList.value) {
|
||||||
recSector = searchList.value.find((item: ISearchList) => item.table === 'sectors')
|
recSector = searchList.value.find((item: ISearchList) => item.table === toolsext.TABSECTORS)
|
||||||
idSector = recSector ? recSector.value : 0
|
idSector = recSector ? recSector.value : 0
|
||||||
}
|
}
|
||||||
if (searchList.value) {
|
if (searchList.value) {
|
||||||
@@ -420,7 +425,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (searchList.value) {
|
if (searchList.value) {
|
||||||
recSkill = searchList.value.find((item: ISearchList) => item.table === 'skills')
|
recSkill = searchList.value.find((item: ISearchList) => item.table === toolsext.TABSKILLS)
|
||||||
idSkill = recSkill ? recSkill.value : 0
|
idSkill = recSkill ? recSkill.value : 0
|
||||||
console.log('recSkill', idSkill)
|
console.log('recSkill', idSkill)
|
||||||
}
|
}
|
||||||
@@ -514,7 +519,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ((item.table === 'skills') && item.value === costanti.FILTER_TUTTI) {
|
if ((item.table === toolsext.TABSKILLS) && item.value === costanti.FILTER_TUTTI) {
|
||||||
let obj2: any = {}
|
let obj2: any = {}
|
||||||
|
|
||||||
if (idSector > 0) {
|
if (idSector > 0) {
|
||||||
@@ -776,12 +781,20 @@ export default defineComponent({
|
|||||||
|
|
||||||
function selItem(item: any, col: IColGridTable, inmodif?: boolean) {
|
function selItem(item: any, col: IColGridTable, inmodif?: boolean) {
|
||||||
console.log('selItem', item, col)
|
console.log('selItem', item, col)
|
||||||
rowsel = item
|
|
||||||
idsel = item._id
|
|
||||||
colsel.value = col
|
|
||||||
if (inmodif) {
|
if (inmodif) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (col.jointable === toolsext.TABSECTORS) {
|
||||||
|
// Sbianca la select della Categoria
|
||||||
|
|
||||||
|
if (item && item.hasOwnProperty('idSkill')) {
|
||||||
|
item['idSkill'] = costanti.FILTER_NESSUNO
|
||||||
|
newRecord.value['idSkill'] = item['idSkill']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rowsel = item
|
||||||
|
idsel = item._id
|
||||||
|
colsel.value = col
|
||||||
}
|
}
|
||||||
|
|
||||||
function undoVal() {
|
function undoVal() {
|
||||||
@@ -1328,14 +1341,23 @@ export default defineComponent({
|
|||||||
|
|
||||||
let ok = true
|
let ok = true
|
||||||
|
|
||||||
mycolumns.value.forEach((col: IColGridTable) => {
|
//mycolumns.value.forEach((col: IColGridTable) => {
|
||||||
|
let col: IColGridTable
|
||||||
|
|
||||||
|
for (col of mycolumns.value) {
|
||||||
if (col.required) {
|
if (col.required) {
|
||||||
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
||||||
|
if (tools.isArray(newRecord.value[col.name])) {
|
||||||
|
if (newRecord.value[col.name].length <= 0) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (!newRecord.value[col.name]) {
|
if (!newRecord.value[col.name]) {
|
||||||
ok = false
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
@@ -1347,12 +1369,18 @@ export default defineComponent({
|
|||||||
for (col of mycolumns.value) {
|
for (col of mycolumns.value) {
|
||||||
if (col.required) {
|
if (col.required) {
|
||||||
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
||||||
|
if (tools.isArray(newRecord.value[col.name])) {
|
||||||
|
if (newRecord.value[col.name].length <= 0){
|
||||||
|
return translate(col.label_trans)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (!newRecord.value[col.name]) {
|
if (!newRecord.value[col.name]) {
|
||||||
// console.log('col.name', col.name)
|
// console.log('col.name', col.name)
|
||||||
return translate(col.label_trans)
|
return translate(col.label_trans)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,6 +151,7 @@
|
|||||||
v-model:value="item.value"
|
v-model:value="item.value"
|
||||||
@update:value="searchval(item.value, item.table)"
|
@update:value="searchval(item.value, item.table)"
|
||||||
:addall="item.addall"
|
:addall="item.addall"
|
||||||
|
:addnone="item.addnone"
|
||||||
:tablesel="item.type === costanti.FieldType.select_by_server ? item.tablesel : ''"
|
:tablesel="item.type === costanti.FieldType.select_by_server ? item.tablesel : ''"
|
||||||
:pickup="item.type === costanti.FieldType.select_by_server"
|
:pickup="item.type === costanti.FieldType.select_by_server"
|
||||||
label-color="primary"
|
label-color="primary"
|
||||||
@@ -177,6 +178,7 @@
|
|||||||
v-model:arrvalue="item.arrvalue"
|
v-model:arrvalue="item.arrvalue"
|
||||||
@update:arrvalue="searchval(item.arrvalue, item.table)"
|
@update:arrvalue="searchval(item.arrvalue, item.table)"
|
||||||
:addall="item.addall"
|
:addall="item.addall"
|
||||||
|
:addnone="item.addnone"
|
||||||
:tablesel="item.tablesel"
|
:tablesel="item.tablesel"
|
||||||
:pickup="true"
|
:pickup="true"
|
||||||
:param1="item.param1"
|
:param1="item.param1"
|
||||||
@@ -207,7 +209,7 @@
|
|||||||
map-options
|
map-options
|
||||||
stack-label
|
stack-label
|
||||||
:useinput="item.useinput"
|
:useinput="item.useinput"
|
||||||
:options="valoriopt(item, item.addall)"
|
:options="valoriopt(item, item.addall, item.addnone)"
|
||||||
:filter="item.filter"
|
:filter="item.filter"
|
||||||
class="combowidth"
|
class="combowidth"
|
||||||
:option-value="fieldsTable.getKeyByTable(item.table)"
|
:option-value="fieldsTable.getKeyByTable(item.table)"
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ export default defineComponent({
|
|||||||
load()
|
load()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function condividipag() {
|
||||||
|
return tools.copyStringToClipboard($q, self.location.host + tools.getPathByGroup(myrec.value, props.table), true)
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -90,6 +94,7 @@ export default defineComponent({
|
|||||||
colCitys,
|
colCitys,
|
||||||
toolsext,
|
toolsext,
|
||||||
col,
|
col,
|
||||||
|
condividipag,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
|
|
||||||
<q-img
|
<q-img
|
||||||
v-if="tools.getValue(myrec, 'photos', '')"
|
v-if="tools.getValue(myrec, 'photos', '')"
|
||||||
:src="tools.getFullFileName(tools.getValue(myrec, 'photos', ''), table, myrec.username, myrec.groupname)" class="img"
|
:src="tools.getFullFileName(tools.getValue(myrec, 'photos', ''), table, myrec.username, myrec.groupname)"
|
||||||
|
class="img"
|
||||||
alt="immagine del gruppo"></q-img>
|
alt="immagine del gruppo"></q-img>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -65,11 +66,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="row q-ma-sm q-pa-sm justify-center">
|
||||||
|
<div class="q-ma-sm">
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="far fa-file-alt" label="Apri Pagina" color="primary" text-color="white"
|
icon="far fa-file-alt" label="Apri Pagina" color="primary" text-color="white"
|
||||||
:to="tools.getToByCol(col, table, myrec)"
|
:to="tools.getToByCol(col, table, myrec)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="q-ma-sm">
|
||||||
|
<q-btn
|
||||||
|
color="primary" text-color="white" icon="fas fa-copy" label="Condividi Pagina"
|
||||||
|
@click="condividipag"></q-btn>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|||||||
@@ -78,10 +78,6 @@ export default defineComponent({
|
|||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
|
|
||||||
function getPathByGroup(grp: IMyGroup){
|
|
||||||
return '/' + tools.getDirectoryByTable(table.value) + '/' + grp.groupname
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
grp,
|
grp,
|
||||||
costanti,
|
costanti,
|
||||||
@@ -92,7 +88,7 @@ export default defineComponent({
|
|||||||
userStore,
|
userStore,
|
||||||
tools,
|
tools,
|
||||||
$q,
|
$q,
|
||||||
getPathByGroup,
|
table,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
<div v-if="tools.isUserOk()">
|
<div v-if="tools.isUserOk()">
|
||||||
<div v-if="grp">
|
<div v-if="grp">
|
||||||
<q-item class="q-my-sm" clickable>
|
<q-item class="q-my-sm" clickable>
|
||||||
<q-item-section avatar @click="naviga(getPathByGroup(grp))">
|
<q-item-section avatar @click="naviga(tools.getPathByGroup(grp, table))">
|
||||||
<q-avatar size="60px">
|
<q-avatar size="60px">
|
||||||
<q-img :src="getImgGroup(grp)" :alt="grp.groupname" img-class="imgprofile" height="60px"/>
|
<q-img :src="getImgGroup(grp)" :alt="grp.groupname" img-class="imgprofile" height="60px"/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section @click="naviga(getPathByGroup(grp))">
|
<q-item-section @click="naviga(tools.getPathByGroup(grp, table))">
|
||||||
<q-item-label><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
|
<q-item-label><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label v-if="grp.descr" caption lines="1"><em>{{ grp.descr }}</em></q-item-label>
|
<q-item-label v-if="grp.descr" caption lines="1"><em>{{ grp.descr }}</em></q-item-label>
|
||||||
|
|||||||
@@ -233,7 +233,7 @@
|
|||||||
:pickup="pickup"
|
:pickup="pickup"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:useinput="false">
|
:useinput="false">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
:pickup="pickup"
|
:pickup="pickup"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:useinput="false">
|
:useinput="false">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
@@ -306,7 +306,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<CMyToggleList
|
<CMyToggleList
|
||||||
:label="col.titlepopupedit"
|
:label="col.titlepopupedit"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
v-model:value="myvalue"
|
v-model:value="myvalue"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
@@ -319,7 +319,7 @@
|
|||||||
:type="costanti.FieldType.binary"
|
:type="costanti.FieldType.binary"
|
||||||
:value="myvalue"
|
:value="myvalue"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
@@ -342,12 +342,13 @@
|
|||||||
v-model:arrvalue="myvalue"
|
v-model:arrvalue="myvalue"
|
||||||
@update:arrvalue="changevalRec"
|
@update:arrvalue="changevalRec"
|
||||||
:addall="false"
|
:addall="false"
|
||||||
|
:addnone="false"
|
||||||
label-color="primary"
|
label-color="primary"
|
||||||
class="combowidth"
|
class="combowidth"
|
||||||
color="primary"
|
color="primary"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:sola_lettura="!isInModif"
|
:sola_lettura="!isInModif"
|
||||||
:useinput="col.allowNewValue"
|
:useinput="col.allowNewValue"
|
||||||
:newvaluefunc="addNewValue">
|
:newvaluefunc="addNewValue">
|
||||||
@@ -363,7 +364,7 @@
|
|||||||
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
class="combowidth"
|
class="combowidth"
|
||||||
:option-value="fieldsTable.getKeyByTable(col.jointable)"
|
:option-value="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
@update:model-value="changevalRec">
|
@update:model-value="changevalRec">
|
||||||
@@ -390,7 +391,7 @@
|
|||||||
:type_out="col.field_outtype"
|
:type_out="col.field_outtype"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
:value="myvalue"
|
:value="myvalue"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
@@ -410,11 +411,12 @@
|
|||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
:newvaluefunc="addNewValue"
|
:newvaluefunc="addNewValue"
|
||||||
:filter_table="col.filter_table"
|
:filter_table="col.filter_table"
|
||||||
|
:addnone="col.addnone"
|
||||||
:filter_field="col.filter_field"
|
:filter_field="col.filter_field"
|
||||||
:value_extra="value_extra"
|
:value_extra="value_extra"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:useinput="col.allowNewValue">
|
:useinput="col.allowNewValue">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
@@ -425,7 +427,7 @@
|
|||||||
row: {{row}}
|
row: {{row}}
|
||||||
col.jointable {{col.jointable}}
|
col.jointable {{col.jointable}}
|
||||||
myvalue {{myvalue}}
|
myvalue {{myvalue}}
|
||||||
opt: {{globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)}}
|
opt: {{globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)}}
|
||||||
val: {{fieldsTable.getKeyByTable(col.jointable)}}
|
val: {{fieldsTable.getKeyByTable(col.jointable)}}
|
||||||
lab: {{fieldsTable.getLabelByTable(col.jointable)}}-->
|
lab: {{fieldsTable.getLabelByTable(col.jointable)}}-->
|
||||||
<CMyChipList
|
<CMyChipList
|
||||||
@@ -438,7 +440,7 @@
|
|||||||
:labelifblank="canEdit ? 'Selezionare' : '' "
|
:labelifblank="canEdit ? 'Selezionare' : '' "
|
||||||
:filter_table="col.filter_table"
|
:filter_table="col.filter_table"
|
||||||
:filter_field="col.filter_field"
|
:filter_field="col.filter_field"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||||
@@ -455,6 +457,7 @@
|
|||||||
v-model:arrvalue="myvalue"
|
v-model:arrvalue="myvalue"
|
||||||
@update:arrvalue="changevalRec"
|
@update:arrvalue="changevalRec"
|
||||||
:addall="false"
|
:addall="false"
|
||||||
|
:addnone="false"
|
||||||
:tablesel="col.tablesel"
|
:tablesel="col.tablesel"
|
||||||
:pickup="true"
|
:pickup="true"
|
||||||
:filter_table="col.filter_table"
|
:filter_table="col.filter_table"
|
||||||
@@ -465,7 +468,7 @@
|
|||||||
color="primary"
|
color="primary"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:sola_lettura="!isInModif"
|
:sola_lettura="!isInModif"
|
||||||
:useinput="isInModif">
|
:useinput="isInModif">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
@@ -484,7 +487,7 @@
|
|||||||
:value_extra="value_extra"
|
:value_extra="value_extra"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:useinput="false">
|
:useinput="false">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
@@ -678,6 +681,7 @@
|
|||||||
:label="col.label ? col.label : t(col.label_trans)"
|
:label="col.label ? col.label : t(col.label_trans)"
|
||||||
v-model:value="scope.value"
|
v-model:value="scope.value"
|
||||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||||
|
:addnone="col.addnone"
|
||||||
:tablesel="col.fieldtype === costanti.FieldType.select_by_server ? tablesel : ''"
|
:tablesel="col.fieldtype === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||||
:filter_table="col.filter_table"
|
:filter_table="col.filter_table"
|
||||||
:filter_field="col.filter_field"
|
:filter_field="col.filter_field"
|
||||||
@@ -685,7 +689,7 @@
|
|||||||
:newvaluefunc="addNewValue"
|
:newvaluefunc="addNewValue"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:useinput="col.allowNewValue">
|
:useinput="col.allowNewValue">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
@@ -699,6 +703,7 @@
|
|||||||
v-model:arrvalue="scope.value"
|
v-model:arrvalue="scope.value"
|
||||||
@update:arrvalue="changevalRec"
|
@update:arrvalue="changevalRec"
|
||||||
:addall="false"
|
:addall="false"
|
||||||
|
:addnone="false"
|
||||||
:tablesel="tablesel"
|
:tablesel="tablesel"
|
||||||
:filter_table="col.filter_table"
|
:filter_table="col.filter_table"
|
||||||
:filter_field="col.filter_field"
|
:filter_field="col.filter_field"
|
||||||
@@ -709,7 +714,7 @@
|
|||||||
color="primary"
|
color="primary"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:useinput="true">
|
:useinput="true">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
@@ -724,7 +729,7 @@
|
|||||||
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
:display-value="fieldsTable.getTitleByTable(col.jointable)"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
class="combowidth"
|
class="combowidth"
|
||||||
:useinput="col.allowNewValue"
|
:useinput="col.allowNewValue"
|
||||||
:newvaluefunc="addNewValue"
|
:newvaluefunc="addNewValue"
|
||||||
@@ -816,7 +821,7 @@
|
|||||||
|
|
||||||
<CMyToggleList
|
<CMyToggleList
|
||||||
:label="col.titlepopupedit"
|
:label="col.titlepopupedit"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
v-model:value="scope.value"
|
v-model:value="scope.value"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)">
|
:optlab="fieldsTable.getLabelByTable(col.jointable)">
|
||||||
@@ -831,7 +836,7 @@
|
|||||||
v-model:value="scope.value"
|
v-model:value="scope.value"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)"
|
||||||
:useinput="false">
|
:useinput="false">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,6 +97,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
addnone: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
dense: {
|
dense: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -220,7 +225,6 @@ export default defineComponent({
|
|||||||
// localStorage.setItem(props.tablesel + '_' + newval, valori.value[newval])
|
// localStorage.setItem(props.tablesel + '_' + newval, valori.value[newval])
|
||||||
|
|
||||||
if (props.type_out === costanti.FieldType.object) {
|
if (props.type_out === costanti.FieldType.object) {
|
||||||
// debugger;
|
|
||||||
const arrout = []
|
const arrout = []
|
||||||
for (const val of newval) {
|
for (const val of newval) {
|
||||||
let obj: any = {}
|
let obj: any = {}
|
||||||
@@ -264,7 +268,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
// console.log('update')
|
console.log('update')
|
||||||
// console.log(' #### mounted myselect', props.options, 'arrvalue', myarrvalue.value)
|
// console.log(' #### mounted myselect', props.options, 'arrvalue', myarrvalue.value)
|
||||||
let rec: any
|
let rec: any
|
||||||
if (optionsreal.value) {
|
if (optionsreal.value) {
|
||||||
@@ -285,6 +289,15 @@ export default defineComponent({
|
|||||||
|
|
||||||
arrtempOpt.value.push(myobj)
|
arrtempOpt.value.push(myobj)
|
||||||
}
|
}
|
||||||
|
if (props.addnone) {
|
||||||
|
let myobj: any = {}
|
||||||
|
if (typeof props.optlab === 'string') {
|
||||||
|
myobj[props.optlab] = '[Nessuno]'
|
||||||
|
myobj[props.optval] = costanti.FILTER_NESSUNO
|
||||||
|
}
|
||||||
|
|
||||||
|
arrtempOpt.value = [myobj, ...arrtempOpt.value]
|
||||||
|
}
|
||||||
for (let i = 0; i < num; i++) {
|
for (let i = 0; i < num; i++) {
|
||||||
const itemId = parseInt(localStorage.getItem(props.tablesel + i + props.optval)!)
|
const itemId = parseInt(localStorage.getItem(props.tablesel + i + props.optval)!)
|
||||||
const itemlab = localStorage.getItem(props.tablesel + i + props.optlab)
|
const itemlab = localStorage.getItem(props.tablesel + i + props.optlab)
|
||||||
@@ -326,6 +339,16 @@ export default defineComponent({
|
|||||||
myarrvalue.value.push(rec[`${props.optval}`])
|
myarrvalue.value.push(rec[`${props.optval}`])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (props.addnone) {
|
||||||
|
let myobj: any = {}
|
||||||
|
if (typeof props.optlab === 'string') {
|
||||||
|
myobj[props.optlab] = '[Nessuno]'
|
||||||
|
myobj[props.optval] = costanti.FILTER_NESSUNO
|
||||||
|
}
|
||||||
|
|
||||||
|
myarrvalue.value = [myobj, ...myarrvalue.value]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.tablesel === 'friendsandme') {
|
if (props.tablesel === 'friendsandme') {
|
||||||
@@ -383,7 +406,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
// console.log(props.col.jointable, props.filter)
|
// console.log(props.col.jointable, props.filter)
|
||||||
if (props.col.jointable) {
|
if (props.col.jointable) {
|
||||||
optionsreal.value = globalStore.getTableJoinByName(props.col.jointable, props.col.addall, props.filter)
|
optionsreal.value = globalStore.getTableJoinByName(props.col.jointable, props.col.addall, props.col.addnone, props.filter)
|
||||||
// console.log('optionsreal.value', optionsreal.value)
|
// console.log('optionsreal.value', optionsreal.value)
|
||||||
} else {
|
} else {
|
||||||
optionsreal.value = props.options
|
optionsreal.value = props.options
|
||||||
@@ -402,7 +425,13 @@ export default defineComponent({
|
|||||||
if (props.multiple) {
|
if (props.multiple) {
|
||||||
myarr = myarr.filter((rec: any) => rec[props.filter_field] === needle)
|
myarr = myarr.filter((rec: any) => rec[props.filter_field] === needle)
|
||||||
} else {
|
} else {
|
||||||
myarr = myarr.filter((rec: any) => rec[props.filter_field].includes(needle))
|
|
||||||
|
myarr = myarr.filter((rec: any) => {
|
||||||
|
if (tools.isArray(rec[props.filter_field]))
|
||||||
|
return rec[props.filter_field].includes(needle)
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// console.log(' RISSSSSSSSS: ', myarr)
|
// console.log(' RISSSSSSSSS: ', myarr)
|
||||||
}
|
}
|
||||||
@@ -420,6 +449,17 @@ export default defineComponent({
|
|||||||
// console.log(' myarr: ', myarr)
|
// console.log(' myarr: ', myarr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (props.addnone) {
|
||||||
|
let myobj: any = {}
|
||||||
|
if (typeof props.optlab === 'string') {
|
||||||
|
myobj[props.optlab] = '[Nessuno]'
|
||||||
|
myobj[props.optval] = costanti.FILTER_NESSUNO
|
||||||
|
}
|
||||||
|
|
||||||
|
if (myarr)
|
||||||
|
myarr = [myobj, ...myarr]
|
||||||
|
}
|
||||||
|
|
||||||
// console.log(' myarr: ', myarr)
|
// console.log(' myarr: ', myarr)
|
||||||
return myarr
|
return myarr
|
||||||
}
|
}
|
||||||
@@ -505,6 +545,15 @@ export default defineComponent({
|
|||||||
myobj[props.optval] = costanti.FILTER_TUTTI
|
myobj[props.optval] = costanti.FILTER_TUTTI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myarr = [myobj, ...myarr]
|
||||||
|
}
|
||||||
|
if (props.addnone) {
|
||||||
|
let myobj: any = {}
|
||||||
|
if (typeof props.optlab === 'string') {
|
||||||
|
myobj[props.optlab] = '[Nessuno]'
|
||||||
|
myobj[props.optval] = costanti.FILTER_NESSUNO
|
||||||
|
}
|
||||||
|
|
||||||
myarr = [myobj, ...myarr]
|
myarr = [myobj, ...myarr]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -548,6 +548,7 @@ export interface IColGridTable {
|
|||||||
link?: string
|
link?: string
|
||||||
jointable?: string
|
jointable?: string
|
||||||
addall?: boolean
|
addall?: boolean
|
||||||
|
addnone?: boolean
|
||||||
filter?: any
|
filter?: any
|
||||||
resultjoin?: string[]
|
resultjoin?: string[]
|
||||||
tablesel?: string
|
tablesel?: string
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { useUserStore } from '@store/UserStore'
|
|||||||
import { useGlobalStore } from '@store/globalStore'
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
import { useQuasar } from 'quasar'
|
import { useQuasar } from 'quasar'
|
||||||
import { IParamsQuery } from 'model'
|
import { IParamsQuery } from 'model'
|
||||||
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Sendpushnotif',
|
name: 'Sendpushnotif',
|
||||||
@@ -97,7 +98,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
params.table = 'sectors'
|
params.table = toolsext.TABSECTORS
|
||||||
globalStore.loadTable(params).then((data) => {
|
globalStore.loadTable(params).then((data) => {
|
||||||
arrSector.value = data.rows
|
arrSector.value = data.rows
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ export const costanti = {
|
|||||||
REQ_ADD_USER_TO_GROUP: 40,
|
REQ_ADD_USER_TO_GROUP: 40,
|
||||||
REQ_REMOVE_USER_TO_GROUP: 41,
|
REQ_REMOVE_USER_TO_GROUP: 41,
|
||||||
|
|
||||||
|
FILTER_NESSUNO: 0,
|
||||||
FILTER_TUTTI: -100,
|
FILTER_TUTTI: -100,
|
||||||
TABLES_ARRAY: ['mygroups'],
|
TABLES_ARRAY: ['mygroups'],
|
||||||
TABLES_USERNAME_DATE: ['friends', 'friendsandme'],
|
TABLES_USERNAME_DATE: ['friends', 'friendsandme'],
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ function AddCol(params: IColGridTable) {
|
|||||||
tablesel: (params.tablesel === undefined) ? '' : params.tablesel,
|
tablesel: (params.tablesel === undefined) ? '' : params.tablesel,
|
||||||
jointable: (params.jointable === undefined) ? '' : params.jointable,
|
jointable: (params.jointable === undefined) ? '' : params.jointable,
|
||||||
addall: (params.addall === undefined) ? false : params.addall,
|
addall: (params.addall === undefined) ? false : params.addall,
|
||||||
|
addnone: (params.addnone === undefined) ? false : params.addnone,
|
||||||
filter: (params.filter === undefined) ? null : params.filter,
|
filter: (params.filter === undefined) ? null : params.filter,
|
||||||
allowchar: (params.allowchar === undefined) ? null : params.allowchar,
|
allowchar: (params.allowchar === undefined) ? null : params.allowchar,
|
||||||
showWhen: (params.showWhen === undefined) ? costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView : params.showWhen,
|
showWhen: (params.showWhen === undefined) ? costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView : params.showWhen,
|
||||||
@@ -342,7 +343,7 @@ export const colSectors = [
|
|||||||
name: 'idSector',
|
name: 'idSector',
|
||||||
label_trans: 'sectors.name',
|
label_trans: 'sectors.name',
|
||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.select,
|
||||||
jointable: 'sectors',
|
jointable: toolsext.TABSECTORS,
|
||||||
}),
|
}),
|
||||||
AddCol({ name: 'main', label_trans: 'store.main', fieldtype: costanti.FieldType.boolean }),
|
AddCol({ name: 'main', label_trans: 'store.main', fieldtype: costanti.FieldType.boolean }),
|
||||||
AddCol({ name: 'color', label_trans: 'products.color' }),
|
AddCol({ name: 'color', label_trans: 'products.color' }),
|
||||||
@@ -458,7 +459,7 @@ export const colSkills = [
|
|||||||
name: 'idSector',
|
name: 'idSector',
|
||||||
label_trans: 'sectors.name',
|
label_trans: 'sectors.name',
|
||||||
fieldtype: costanti.FieldType.multiselect,
|
fieldtype: costanti.FieldType.multiselect,
|
||||||
jointable: 'sectors',
|
jointable: toolsext.TABSECTORS,
|
||||||
}),
|
}),
|
||||||
AddCol({ name: 'color', label_trans: 'products.color' }),
|
AddCol({ name: 'color', label_trans: 'products.color' }),
|
||||||
AddCol({ name: 'theme', label_trans: 'products.theme' }),
|
AddCol({ name: 'theme', label_trans: 'products.theme' }),
|
||||||
@@ -663,6 +664,7 @@ export const colmyGoods = [
|
|||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.select,
|
||||||
required: false,
|
required: false,
|
||||||
jointable: 'goods',
|
jointable: 'goods',
|
||||||
|
addnone: true,
|
||||||
filter_table: 'sectorgoods',
|
filter_table: 'sectorgoods',
|
||||||
filter_field: 'idSectorGood',
|
filter_field: 'idSectorGood',
|
||||||
noshowlabel: true,
|
noshowlabel: true,
|
||||||
@@ -818,7 +820,7 @@ export const colmySkills = [
|
|||||||
label_trans: 'sectors.name',
|
label_trans: 'sectors.name',
|
||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.select,
|
||||||
required: true,
|
required: true,
|
||||||
jointable: 'sectors',
|
jointable: toolsext.TABSECTORS,
|
||||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||||
visible: true,
|
visible: true,
|
||||||
icon: 'category',
|
icon: 'category',
|
||||||
@@ -828,9 +830,10 @@ export const colmySkills = [
|
|||||||
label_trans: 'skill.name',
|
label_trans: 'skill.name',
|
||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.select,
|
||||||
jointable: 'skills',
|
jointable: 'skills',
|
||||||
filter_table: 'sectors',
|
filter_table: toolsext.TABSECTORS,
|
||||||
filter_field: 'idSector',
|
filter_field: 'idSector',
|
||||||
noshowlabel: true,
|
noshowlabel: true,
|
||||||
|
addnone: true,
|
||||||
icon: 'engineering',
|
icon: 'engineering',
|
||||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
|
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
|
||||||
allowNewValue: false,
|
allowNewValue: false,
|
||||||
@@ -1001,7 +1004,7 @@ export const colmyBachecas = [
|
|||||||
label_trans: 'sectors.name',
|
label_trans: 'sectors.name',
|
||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.select,
|
||||||
required: true,
|
required: true,
|
||||||
jointable: 'sectors',
|
jointable: toolsext.TABSECTORS,
|
||||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||||
visible: true,
|
visible: true,
|
||||||
icon: 'category',
|
icon: 'category',
|
||||||
@@ -1012,7 +1015,8 @@ export const colmyBachecas = [
|
|||||||
label_trans: 'skill.name',
|
label_trans: 'skill.name',
|
||||||
fieldtype: costanti.FieldType.select,
|
fieldtype: costanti.FieldType.select,
|
||||||
jointable: 'skills',
|
jointable: 'skills',
|
||||||
filter_table: 'sectors',
|
addnone: true,
|
||||||
|
filter_table: toolsext.TABSECTORS,
|
||||||
filter_field: 'idSector',
|
filter_field: 'idSector',
|
||||||
noshowlabel: true,
|
noshowlabel: true,
|
||||||
icon: 'engineering',
|
icon: 'engineering',
|
||||||
@@ -2580,7 +2584,7 @@ export const fieldsTable = {
|
|||||||
collabel: 'descr',
|
collabel: 'descr',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'sectors',
|
value: toolsext.TABSECTORS,
|
||||||
label: 'Settori',
|
label: 'Settori',
|
||||||
columns: colSectors,
|
columns: colSectors,
|
||||||
colkey: '_id',
|
colkey: '_id',
|
||||||
@@ -2595,7 +2599,7 @@ export const fieldsTable = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'catgrps',
|
value: 'catgrps',
|
||||||
label: 'Categorie',
|
label: 'Categorie Gruppi',
|
||||||
columns: colCatGrps,
|
columns: colCatGrps,
|
||||||
colkey: '_id',
|
colkey: '_id',
|
||||||
collabel: 'descr',
|
collabel: 'descr',
|
||||||
|
|||||||
@@ -4958,16 +4958,50 @@ export const tools = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getCitySel() {
|
||||||
|
const objcity = tools.getCookie(tools.COOK_SEARCH + 'cities', {_id: 0})
|
||||||
|
let defcity: any = []
|
||||||
|
if (objcity && objcity._id > 0) {
|
||||||
|
defcity = [objcity._id]
|
||||||
|
} else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
return defcity
|
||||||
|
},
|
||||||
|
|
||||||
|
getSelectionByTable(table: string, mydef: any) {
|
||||||
|
|
||||||
|
const arrtable = ['sectors', 'statusSkills', 'contribtypes', 'adtypes', 'sectorgoods', 'otherfilters', 'shippings']
|
||||||
|
const arrmultisel_tab = ['skills', 'goods']
|
||||||
|
const arrmultisel = [
|
||||||
|
{ table: 'skills', join: 'sectors'},
|
||||||
|
{ table: 'goods', join: 'sectorgoods'}
|
||||||
|
]
|
||||||
|
|
||||||
|
if (arrtable.includes(table)) {
|
||||||
|
return tools.getCookie(tools.COOK_SEARCH + table, mydef)
|
||||||
|
} else if (arrmultisel_tab.includes(table)){
|
||||||
|
const rec = arrmultisel.find((rec) => rec.table === table)
|
||||||
|
if (rec) {
|
||||||
|
return tools.getCookie(tools.COOK_SEARCH + table + '_' + tools.getCookie(tools.COOK_SEARCH + rec.join, 0), mydef)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return mydef
|
||||||
|
},
|
||||||
|
|
||||||
getdefaultnewrec_MySkill(): any {
|
getdefaultnewrec_MySkill(): any {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_id: 0,
|
_id: 0,
|
||||||
idSector: 0,
|
idSector: tools.getSelectionByTable('sectors', 0),
|
||||||
idSkill: 0,
|
idSkill: tools.getSelectionByTable('skills', 0),
|
||||||
idStatusSkill: [],
|
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
|
||||||
idContribType: [],
|
idContribType: tools.getSelectionByTable('contribtypes', []),
|
||||||
idCity: [],
|
idCity: this.getCitySel(),
|
||||||
NumLevel: 0,
|
NumLevel: 0,
|
||||||
adType: 0,
|
adType: tools.getSelectionByTable('adtypes', costanti.FILTER_TUTTI),
|
||||||
photos: [],
|
photos: [],
|
||||||
note: '',
|
note: '',
|
||||||
//**ADDFIELD_MYSKILL
|
//**ADDFIELD_MYSKILL
|
||||||
@@ -4979,15 +5013,25 @@ export const tools = {
|
|||||||
getdefaultnewrec_MyGoods(): any {
|
getdefaultnewrec_MyGoods(): any {
|
||||||
return {
|
return {
|
||||||
_id: 0,
|
_id: 0,
|
||||||
idSectorGood: 0,
|
|
||||||
idGood: 0,
|
// idSectorGood: 0,
|
||||||
idShipping: [],
|
// idGood: 0,
|
||||||
otherfilters: [],
|
// idStatusSkill: [],
|
||||||
idStatusSkill: [],
|
// idContribType: [],
|
||||||
idContribType: [],
|
// idCity: [],
|
||||||
idCity: [],
|
// adType: 0
|
||||||
|
// idShipping: [],
|
||||||
|
// otherfilters: [],
|
||||||
|
|
||||||
|
idSectorGood: tools.getSelectionByTable('sectorgoods', 0),
|
||||||
|
idGood: tools.getSelectionByTable('goods', 0),
|
||||||
|
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
|
||||||
|
idContribType: tools.getSelectionByTable('contribtypes', []),
|
||||||
|
idCity: this.getCitySel(),
|
||||||
NumLevel: 0,
|
NumLevel: 0,
|
||||||
adType: 0,
|
adType: tools.getSelectionByTable('adtypes', costanti.FILTER_TUTTI),
|
||||||
|
idShipping: [tools.getSelectionByTable('shippings', [])],
|
||||||
|
otherfilters: tools.getSelectionByTable('otherfilters', []),
|
||||||
photos: [],
|
photos: [],
|
||||||
note: '',
|
note: '',
|
||||||
//**ADDFIELD_MYSKILL
|
//**ADDFIELD_MYSKILL
|
||||||
@@ -5014,15 +5058,15 @@ export const tools = {
|
|||||||
getdefaultnewrec_MyBacheca(): any {
|
getdefaultnewrec_MyBacheca(): any {
|
||||||
return {
|
return {
|
||||||
_id: 0,
|
_id: 0,
|
||||||
idSector: 0,
|
idSector: tools.getSelectionByTable('sectors', 0),
|
||||||
idSkill: 0,
|
idSkill: tools.getSelectionByTable('skills', 0),
|
||||||
idStatusSkill: [],
|
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
|
||||||
idContribType: [],
|
idContribType: tools.getSelectionByTable('contribtypes', []),
|
||||||
dateTimeStart: new Date(),
|
dateTimeStart: new Date(),
|
||||||
dateTimeEnd: new Date(),
|
dateTimeEnd: new Date(),
|
||||||
idCity: [],
|
idCity: this.getCitySel(),
|
||||||
NumLevel: 0,
|
NumLevel: 0,
|
||||||
adType: 0,
|
adType: tools.getSelectionByTable('adtypes', costanti.FILTER_TUTTI),
|
||||||
photos: [],
|
photos: [],
|
||||||
note: '',
|
note: '',
|
||||||
//**ADDFIELD_MYBACHECAS
|
//**ADDFIELD_MYBACHECAS
|
||||||
@@ -5097,6 +5141,10 @@ export const tools = {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getPathByGroup(grp: any, table: string) {
|
||||||
|
return '/' + tools.getDirectoryByTable(table) + '/' + grp.groupname
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
// if (navigator.languages && navigator.languages.length > 0) {
|
// if (navigator.languages && navigator.languages.length > 0) {
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ export const toolsext = {
|
|||||||
TABUSER: 'users',
|
TABUSER: 'users',
|
||||||
TABFRIENDS: 'friends',
|
TABFRIENDS: 'friends',
|
||||||
TABMYGROUPS: 'mygroups',
|
TABMYGROUPS: 'mygroups',
|
||||||
|
TABSKILLS: 'skills',
|
||||||
|
TABSECTORS: 'sectors',
|
||||||
TABMYSKILLS: 'myskills',
|
TABMYSKILLS: 'myskills',
|
||||||
TABMYGOODS: 'mygoods',
|
TABMYGOODS: 'mygoods',
|
||||||
TABMYBACHECAS: 'mybachecas',
|
TABMYBACHECAS: 'mybachecas',
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
// return state.subSkills
|
// return state.subSkills
|
||||||
else if (table === 'statusSkills')
|
else if (table === 'statusSkills')
|
||||||
return state.statusSkills
|
return state.statusSkills
|
||||||
else if (table === 'sectors')
|
else if (table === toolsext.TABSECTORS)
|
||||||
return state.sectors
|
return state.sectors
|
||||||
else if (table === 'sectorgoods')
|
else if (table === 'sectorgoods')
|
||||||
return state.sectorgoods
|
return state.sectorgoods
|
||||||
@@ -1509,7 +1509,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
return arr
|
return arr
|
||||||
},
|
},
|
||||||
|
|
||||||
getTableJoinByName(table: string, addall?: boolean, filter?: any) {
|
getTableJoinByName(table: string, addall?: boolean, addnone?: boolean, filter?: any) {
|
||||||
|
|
||||||
let myarr: any = []
|
let myarr: any = []
|
||||||
if (table === 'permissions') myarr = [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Tutor, shared_consts.Permissions.Editor, shared_consts.Permissions.Zoomeri, shared_consts.Permissions.Department]
|
if (table === 'permissions') myarr = [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Tutor, shared_consts.Permissions.Editor, shared_consts.Permissions.Zoomeri, shared_consts.Permissions.Department]
|
||||||
@@ -1541,6 +1541,19 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
if (addall)
|
if (addall)
|
||||||
myarr = [costanti.FILTER_TUTTI, ...myarr]
|
myarr = [costanti.FILTER_TUTTI, ...myarr]
|
||||||
|
|
||||||
|
|
||||||
|
if (addnone) {
|
||||||
|
const mykey = fieldsTable.getKeyByTable(table)
|
||||||
|
const collab = fieldsTable.getLabelByTable(table)
|
||||||
|
let obj: any = {}
|
||||||
|
obj[mykey] = costanti.FILTER_NESSUNO
|
||||||
|
obj[collab] = '[Nessuno]'
|
||||||
|
obj['idSector'] = []
|
||||||
|
|
||||||
|
myarr = [obj, ...myarr]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (filter) {
|
if (filter) {
|
||||||
// console.log('table', table, 'filter', filter, 'arrprima', myarr)
|
// console.log('table', table, 'filter', filter, 'arrprima', myarr)
|
||||||
myarr = myarr.filter(filter)
|
myarr = myarr.filter(filter)
|
||||||
|
|||||||
Reference in New Issue
Block a user