InfiniteScroll: Le liste (Beni / Servizi / Eventi) devono essere caricate in automatico, scorrendo la lista...
fix category
This commit is contained in:
2
grp.js
2
grp.js
@@ -145,7 +145,7 @@ db.getCollection('mygoods').aggregate(
|
|||||||
"from": "sectorgoods",
|
"from": "sectorgoods",
|
||||||
"localField": "recGood.idSectorGood",
|
"localField": "recGood.idSectorGood",
|
||||||
"foreignField": "_id",
|
"foreignField": "_id",
|
||||||
"as": "sectorgood"
|
"as": "sectorGood"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ module.exports = configure((ctx) => ({
|
|||||||
'QBanner',
|
'QBanner',
|
||||||
'QInnerLoading',
|
'QInnerLoading',
|
||||||
'QSpinnerGears',
|
'QSpinnerGears',
|
||||||
|
'QSpinnerDots',
|
||||||
'QDate',
|
'QDate',
|
||||||
'QTime',
|
'QTime',
|
||||||
'QSlideTransition',
|
'QSlideTransition',
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ db.getCollection('myskills').aggregate(
|
|||||||
"from": "sectorgoods",
|
"from": "sectorgoods",
|
||||||
"localField": "recGood.idSectorGood",
|
"localField": "recGood.idSectorGood",
|
||||||
"foreignField": "_id",
|
"foreignField": "_id",
|
||||||
"as": "sectorgood"
|
"as": "sectorGood"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ export default defineComponent({
|
|||||||
tablesel: 'cities',
|
tablesel: 'cities',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Visiblità',
|
label: 'Visibilità',
|
||||||
table: 'pub_to_share',
|
table: 'pub_to_share',
|
||||||
key: 'pub_to_share',
|
key: 'pub_to_share',
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
@@ -353,7 +353,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 + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSKILLS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
addall: true,
|
addall: true,
|
||||||
@@ -517,7 +517,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 + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSKILLS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
addall: true,
|
addall: true,
|
||||||
@@ -706,11 +706,11 @@ export default defineComponent({
|
|||||||
filter: null,
|
filter: null,
|
||||||
useinput: false,
|
useinput: false,
|
||||||
},
|
},
|
||||||
/*{
|
{
|
||||||
label: 'Settore',
|
label: 'Settore',
|
||||||
table: 'sectorgoods',
|
table: 'sectorgoods',
|
||||||
key: 'idSectorGood',
|
key: 'idSectorGood',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'sectorgoods', 0),
|
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORGOODS, 0, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
filter: null,
|
filter: null,
|
||||||
@@ -722,7 +722,7 @@ export default defineComponent({
|
|||||||
label: 'Categoria',
|
label: 'Categoria',
|
||||||
table: 'goods',
|
table: 'goods',
|
||||||
key: 'idGood',
|
key: 'idGood',
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'goods' + '_' + tools.getCookie(tools.COOK_SEARCH + 'sectorgoods', costanti.FILTER_TUTTI), costanti.FILTER_TUTTI),
|
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABGOODS + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORGOODS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI, true),
|
||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
type: costanti.FieldType.select,
|
type: costanti.FieldType.select,
|
||||||
addall: true,
|
addall: true,
|
||||||
@@ -730,6 +730,7 @@ export default defineComponent({
|
|||||||
showcount: true,
|
showcount: true,
|
||||||
useinput: false,
|
useinput: false,
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
label: 'Consegna',
|
label: 'Consegna',
|
||||||
table: 'shippings',
|
table: 'shippings',
|
||||||
@@ -910,6 +911,8 @@ export default defineComponent({
|
|||||||
visibility: 1,
|
visibility: 1,
|
||||||
admins: 1,
|
admins: 1,
|
||||||
idCatGrp: 1,
|
idCatGrp: 1,
|
||||||
|
date_created: 1,
|
||||||
|
date_updated: 1,
|
||||||
photos: 1,
|
photos: 1,
|
||||||
idCity: 1,
|
idCity: 1,
|
||||||
note: 1,
|
note: 1,
|
||||||
@@ -933,6 +936,8 @@ export default defineComponent({
|
|||||||
visibility: 1,
|
visibility: 1,
|
||||||
admins: 1,
|
admins: 1,
|
||||||
idCatGrp: 1,
|
idCatGrp: 1,
|
||||||
|
date_created: 1,
|
||||||
|
date_updated: 1,
|
||||||
photos: 1,
|
photos: 1,
|
||||||
idCity: 1,
|
idCity: 1,
|
||||||
note: 1,
|
note: 1,
|
||||||
@@ -955,6 +960,8 @@ export default defineComponent({
|
|||||||
descr: 1,
|
descr: 1,
|
||||||
img: 1,
|
img: 1,
|
||||||
idCatGrp: 1,
|
idCatGrp: 1,
|
||||||
|
date_created: 1,
|
||||||
|
date_updated: 1,
|
||||||
visibility: 1,
|
visibility: 1,
|
||||||
admins: 1,
|
admins: 1,
|
||||||
photos: 1,
|
photos: 1,
|
||||||
@@ -1027,9 +1034,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
lookup3: {
|
lookup3: {
|
||||||
lk_tab: 'sectorgoods',
|
lk_tab: 'sectorgoods',
|
||||||
lk_LF: 'recGood.idSectorGood',
|
// lk_LF: 'recGood.idSectorGood',
|
||||||
|
lk_LF: 'idSectorGood',
|
||||||
lk_FF: '_id',
|
lk_FF: '_id',
|
||||||
lk_as: 'sectorgood',
|
lk_as: 'sectorGood',
|
||||||
af_objId_tab: '',
|
af_objId_tab: '',
|
||||||
},
|
},
|
||||||
lookup5: {
|
lookup5: {
|
||||||
@@ -1094,7 +1102,8 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
lookup3: {
|
lookup3: {
|
||||||
lk_tab: toolsext.TABSECTORS,
|
lk_tab: toolsext.TABSECTORS,
|
||||||
lk_LF: 'recSkill.idSector',
|
// lk_LF: 'recSkill.idSector',
|
||||||
|
lk_LF: 'idSector',
|
||||||
lk_FF: '_id',
|
lk_FF: '_id',
|
||||||
lk_as: 'sector',
|
lk_as: 'sector',
|
||||||
af_objId_tab: '',
|
af_objId_tab: '',
|
||||||
@@ -1210,7 +1219,8 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
lookup3: {
|
lookup3: {
|
||||||
lk_tab: toolsext.TABSECTORS,
|
lk_tab: toolsext.TABSECTORS,
|
||||||
lk_LF: 'recSkill.idSector',
|
// lk_LF: 'recSkill.idSector',
|
||||||
|
lk_LF: 'idSector',
|
||||||
lk_FF: '_id',
|
lk_FF: '_id',
|
||||||
lk_as: 'sector',
|
lk_as: 'sector',
|
||||||
af_objId_tab: '',
|
af_objId_tab: '',
|
||||||
|
|||||||
@@ -51,6 +51,11 @@
|
|||||||
|
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<q-page-scroller position="bottom-right" :scroll-offset="850" :offset="[18, 18]" style="opacity: 0.3">
|
||||||
|
<q-btn fab icon="keyboard_arrow_up" color="accent"/>
|
||||||
|
</q-page-scroller>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
.tdclass, .trclass{
|
.tdclass, .trclass{
|
||||||
min-height: 20px !important;
|
min-height: 20px !important;
|
||||||
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-table td {
|
.q-table td {
|
||||||
|
|||||||
@@ -251,8 +251,12 @@ export default defineComponent({
|
|||||||
|
|
||||||
const $router = useRouter()
|
const $router = useRouter()
|
||||||
|
|
||||||
|
const myinfscroll = ref(null)
|
||||||
|
|
||||||
const serverData: any = ref([])
|
const serverData: any = ref([])
|
||||||
|
const numRecLoaded = ref(0)
|
||||||
const spinner_visible = ref(false)
|
const spinner_visible = ref(false)
|
||||||
|
const changetable = ref(false)
|
||||||
const searchList = ref(<ISearchList[]>[])
|
const searchList = ref(<ISearchList[]>[])
|
||||||
|
|
||||||
let actual = ''
|
let actual = ''
|
||||||
@@ -302,7 +306,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
watch(() => searchList.value, (to: any, from: any) => {
|
watch(() => searchList.value, (to: any, from: any) => {
|
||||||
// console.log('watch searchlist', to)
|
// console.log('watch searchlist', to)
|
||||||
|
if (searchList.value && !changetable.value) {
|
||||||
|
console.log('REFRR searchList.value', to)
|
||||||
refresh()
|
refresh()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => showfilteradv.value, (newval: any, from: any) => {
|
watch(() => showfilteradv.value, (newval: any, from: any) => {
|
||||||
@@ -311,7 +318,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
watch(() => props.filtercustom, (to: any, from: any) => {
|
watch(() => props.filtercustom, (to: any, from: any) => {
|
||||||
// console.log('filtercustom', to)
|
// console.log('filtercustom', to)
|
||||||
|
if (JSON.stringify(to) !== JSON.stringify(from)) {
|
||||||
|
console.log('REFRR props.filtercustom', to, from)
|
||||||
refresh()
|
refresh()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$router.beforeResolve((to: any) => {
|
$router.beforeResolve((to: any) => {
|
||||||
@@ -325,6 +335,7 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
function setCategBySector(tablecat: string, tabsector: string, newval: any) {
|
function setCategBySector(tablecat: string, tabsector: string, newval: any) {
|
||||||
|
console.log('setCategBySector', tablecat, tabsector, newval)
|
||||||
|
|
||||||
const recSector = searchList.value.find((rec) => rec.table === tabsector)
|
const recSector = searchList.value.find((rec) => rec.table === tabsector)
|
||||||
if (recSector)
|
if (recSector)
|
||||||
@@ -341,10 +352,12 @@ export default defineComponent({
|
|||||||
if (arrvalues)
|
if (arrvalues)
|
||||||
trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved)
|
trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved)
|
||||||
}
|
}
|
||||||
|
console.log(' ...item', item)
|
||||||
if (valsaved && trovato)
|
if (valsaved && trovato)
|
||||||
item.value = valsaved
|
item.value = valsaved
|
||||||
else {
|
else {
|
||||||
if (arrvalues) {
|
if (arrvalues) {
|
||||||
|
console.log(' ...filter tutti')
|
||||||
item.value = costanti.FILTER_TUTTI
|
item.value = costanti.FILTER_TUTTI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -400,7 +413,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function searchval(newval: any, table: any) {
|
function searchval(newval: any, table: any) {
|
||||||
console.log('searchval', newval, table)
|
console.log('REFRR searchval', newval, table)
|
||||||
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
||||||
|
|
||||||
if (table === toolsext.TABSKILLS) {
|
if (table === toolsext.TABSKILLS) {
|
||||||
@@ -410,11 +423,18 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
} else if (table === toolsext.TABSECTORS) {
|
} else if (table === toolsext.TABSECTORS) {
|
||||||
setCategBySector(toolsext.TABSKILLS, table, newval)
|
setCategBySector(toolsext.TABSKILLS, table, newval)
|
||||||
|
} else if (table === toolsext.TABSECTORGOODS) {
|
||||||
|
setCategBySector(toolsext.TABGOODS, table, newval)
|
||||||
} else if (table === toolsext.TABREGIONS) {
|
} else if (table === toolsext.TABREGIONS) {
|
||||||
setProvinceByRegion(toolsext.TABPROVINCE, table, newval)
|
setProvinceByRegion(toolsext.TABPROVINCE, table, newval)
|
||||||
} else if (table === 'goods') {
|
} else if (table === toolsext.TABGOODS) {
|
||||||
setCategBySector('sectorgoods', table, newval)
|
const recSector = searchList.value.find((rec) => rec.table === toolsext.TABSECTORGOODS)
|
||||||
|
if (recSector) {
|
||||||
|
tools.setCookie(tools.COOK_SEARCH + table + '_' + recSector.value, newval)
|
||||||
}
|
}
|
||||||
|
// setCategBySector('sectorgoods', table, newval)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
@@ -440,7 +460,7 @@ export default defineComponent({
|
|||||||
// emulate ajax call
|
// emulate ajax call
|
||||||
// SELECT * FROM ... WHERE...LIMIT...
|
// SELECT * FROM ... WHERE...LIMIT...
|
||||||
async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, sortBy: any, descending: any) {
|
async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, sortBy: any, descending: any) {
|
||||||
|
// console.log('fetchFromServer')
|
||||||
let myobj: any = {}
|
let myobj: any = {}
|
||||||
if (sortBy) {
|
if (sortBy) {
|
||||||
myobj = {}
|
myobj = {}
|
||||||
@@ -623,7 +643,7 @@ export default defineComponent({
|
|||||||
let obj2: any = {}
|
let obj2: any = {}
|
||||||
if (idSectorGood > 0) {
|
if (idSectorGood > 0) {
|
||||||
// idSectorGood
|
// idSectorGood
|
||||||
obj2['sectorgood._id'] = idSectorGood
|
obj2['sectorGood._id'] = idSectorGood
|
||||||
filtersearch2.push(obj2)
|
filtersearch2.push(obj2)
|
||||||
}
|
}
|
||||||
} else if ((item.table === 'subskills') && item.value === costanti.FILTER_TUTTI) {
|
} else if ((item.table === 'subskills') && item.value === costanti.FILTER_TUTTI) {
|
||||||
@@ -742,8 +762,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
savefilter()
|
savefilter()
|
||||||
|
|
||||||
if (!mytable.value)
|
if (!mytable.value) {
|
||||||
|
startsearch.value = false
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// console.log('myfilterandnow', myfilterandnow, 'myfilterandnow', myfilterandnow)
|
// console.log('myfilterandnow', myfilterandnow, 'myfilterandnow', myfilterandnow)
|
||||||
|
|
||||||
@@ -762,7 +785,7 @@ export default defineComponent({
|
|||||||
const startRow = (page - 1) * rowsPerPage
|
const startRow = (page - 1) * rowsPerPage
|
||||||
const endRow = startRow + fetchCount
|
const endRow = startRow + fetchCount
|
||||||
|
|
||||||
// console.log('startRow', startRow, 'endRow', endRow)
|
console.log('onRequest: startRow', startRow, 'endRow', endRow)
|
||||||
|
|
||||||
serverData.value = []
|
serverData.value = []
|
||||||
|
|
||||||
@@ -798,9 +821,86 @@ export default defineComponent({
|
|||||||
// ...and turn of loading indicator
|
// ...and turn of loading indicator
|
||||||
loading.value = false
|
loading.value = false
|
||||||
spinner_visible.value = false
|
spinner_visible.value = false
|
||||||
|
changetable.value = false
|
||||||
|
startsearch.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onUpdateData(index: number, myprops: any, done: any) {
|
||||||
|
const { page, rowsPerPage, rowsNumber, sortBy, descending } = myprops.pagination
|
||||||
|
const myfilternow = myfilter.value
|
||||||
|
const myfilterandnow = myfilterand.value
|
||||||
|
|
||||||
|
savefilter()
|
||||||
|
|
||||||
|
if (!mytable.value) {
|
||||||
|
startsearch.value = false
|
||||||
|
if (myinfscroll.value) {
|
||||||
|
// @ts-ignore
|
||||||
|
myinfscroll.value.resume()
|
||||||
|
}
|
||||||
|
done()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// function all rows if "All" (0) is rowsel
|
||||||
|
const fetchCount = rowsPerPage === 0 ? rowsNumber : rowsPerPage
|
||||||
|
|
||||||
|
// calculate starting row of data
|
||||||
|
const startRow = numRecLoaded.value
|
||||||
|
const endRow = startRow + fetchCount
|
||||||
|
console.log('startRow', startRow, 'endRow', endRow, 'fetchCount', fetchCount)
|
||||||
|
|
||||||
|
|
||||||
|
if (startRow < pagination.value.rowsNumber) {
|
||||||
|
|
||||||
|
// fetch data from "server"
|
||||||
|
return fetchFromServer(startRow, endRow, myfilternow, myfilterandnow, sortBy, descending).then((ris: any) => {
|
||||||
|
|
||||||
|
pagination.value.rowsNumber = getRowsNumberCount(myfilter)
|
||||||
|
console.log(' ...rowsNumber', pagination.value.rowsNumber)
|
||||||
|
|
||||||
|
if (returnedData.value === []) {
|
||||||
|
// no more data
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
numRecLoaded.value = numRecLoaded.value + (returnedData.value ? returnedData.value.length : 0)
|
||||||
|
console.log(' ...numRecLoaded.value', numRecLoaded.value)
|
||||||
|
serverData.value = [...serverData.value, ...returnedData.value]
|
||||||
|
} catch (e) {
|
||||||
|
serverData.value = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// don't forfunction to update local pagination object
|
||||||
|
pagination.value.page = page
|
||||||
|
pagination.value.rowsPerPage = rowsPerPage
|
||||||
|
pagination.value.sortBy = sortBy
|
||||||
|
pagination.value.descending = descending
|
||||||
|
|
||||||
|
// console.log('pagination', pagination)
|
||||||
|
|
||||||
|
// ...and turn of loading indicator
|
||||||
|
changetable.value = false
|
||||||
|
startsearch.value = false
|
||||||
|
|
||||||
|
if (myinfscroll.value) {
|
||||||
|
// @ts-ignore
|
||||||
|
myinfscroll.value.resume()
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(' ...DONE ')
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
startsearch.value = false
|
||||||
|
if (myinfscroll.value) {
|
||||||
|
// @ts-ignore
|
||||||
|
myinfscroll.value.resume()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function refresh_arr() {
|
function refresh_arr() {
|
||||||
const myarr = [...serverData.value]
|
const myarr = [...serverData.value]
|
||||||
@@ -809,19 +909,37 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function refresh_table() {
|
function refresh_table() {
|
||||||
|
|
||||||
onRequest({
|
onRequest({
|
||||||
pagination: pagination.value
|
pagination: pagination.value
|
||||||
})
|
})
|
||||||
rowclicksel.value = null
|
rowclicksel.value = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function refresh_infscroll(done: any) {
|
||||||
|
rowclicksel.value = null
|
||||||
|
|
||||||
|
onUpdateData(0,
|
||||||
|
{
|
||||||
|
pagination: pagination.value
|
||||||
|
}, done)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
|
console.log('refresh', 'startsearch', startsearch.value)
|
||||||
|
|
||||||
// console.log('refresh')
|
// console.log('refresh')
|
||||||
if (!startsearch.value)
|
if (startsearch.value)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
console.log('REFRESH!')
|
||||||
|
|
||||||
|
startsearch.value = true
|
||||||
|
|
||||||
serverData.value = []
|
serverData.value = []
|
||||||
|
numRecLoaded.value = 0
|
||||||
|
|
||||||
search.value = search.value.trim()
|
search.value = search.value.trim()
|
||||||
|
|
||||||
@@ -834,10 +952,21 @@ export default defineComponent({
|
|||||||
|
|
||||||
// console.log('myfilter', myfilter.value)
|
// console.log('myfilter', myfilter.value)
|
||||||
|
|
||||||
|
if (shared_consts.VERTIC_SHOW_GRID.includes(myvertical.value)) {
|
||||||
|
if (myinfscroll.value) {
|
||||||
|
// @ts-ignore
|
||||||
|
myinfscroll.value.stop()
|
||||||
|
}
|
||||||
|
|
||||||
|
refresh_infscroll(function () { return true })
|
||||||
|
} else {
|
||||||
refresh_table()
|
refresh_table()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
watch(() => mycodeid.value, (newval, oldval) => {
|
watch(() => mycodeid.value, (newval, oldval) => {
|
||||||
|
console.log('REFRR - mycodeid.value', newval)
|
||||||
refresh()
|
refresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -846,6 +975,8 @@ export default defineComponent({
|
|||||||
myvertical.value === costanti.VISUTABLE_SCHEDA_GROUP ||
|
myvertical.value === costanti.VISUTABLE_SCHEDA_GROUP ||
|
||||||
myvertical.value === costanti.VISUTABLE_SCHEDA_USER ||
|
myvertical.value === costanti.VISUTABLE_SCHEDA_USER ||
|
||||||
(props.showType === costanti.SHOW_USERINFO))) {
|
(props.showType === costanti.SHOW_USERINFO))) {
|
||||||
|
|
||||||
|
console.log('REFRR - updateTables.value', newval)
|
||||||
refresh()
|
refresh()
|
||||||
|
|
||||||
userStore.updateTables = false
|
userStore.updateTables = false
|
||||||
@@ -865,6 +996,10 @@ export default defineComponent({
|
|||||||
return userStore.isFacilitatore
|
return userStore.isFacilitatore
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isAdmin() {
|
||||||
|
return userStore.isAdmin
|
||||||
|
}
|
||||||
|
|
||||||
function disabilita() {
|
function disabilita() {
|
||||||
if ((mytable.value === 'users') && (isFacilitatore() && !userStore.isAdmin && !userStore.isManager)) {
|
if ((mytable.value === 'users') && (isFacilitatore() && !userStore.isAdmin && !userStore.isManager)) {
|
||||||
return true
|
return true
|
||||||
@@ -891,6 +1026,14 @@ export default defineComponent({
|
|||||||
item['idSkill'] = costanti.FILTER_NESSUNO
|
item['idSkill'] = costanti.FILTER_NESSUNO
|
||||||
newRecord.value['idSkill'] = item['idSkill']
|
newRecord.value['idSkill'] = item['idSkill']
|
||||||
}
|
}
|
||||||
|
} else if (col.jointable === toolsext.TABSECTORGOODS) {
|
||||||
|
// Sbianca la select della Categoria Beni
|
||||||
|
|
||||||
|
if (item && item.hasOwnProperty('idGood')) {
|
||||||
|
item['idGood'] = costanti.FILTER_NESSUNO
|
||||||
|
newRecord.value['idGood'] = item['idGood']
|
||||||
|
console.log('newRecord', newRecord)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
rowsel = item
|
rowsel = item
|
||||||
idsel = item._id
|
idsel = item._id
|
||||||
@@ -936,7 +1079,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function annulla(val: any) {
|
function annulla(val: any) {
|
||||||
console.log('annulla')
|
console.log('GridTable annulla')
|
||||||
/*
|
/*
|
||||||
if (newRecord.value) {
|
if (newRecord.value) {
|
||||||
globalStore.DeleteRec({ table: mytable.value, id: newRecord.value._id })
|
globalStore.DeleteRec({ table: mytable.value, id: newRecord.value._id })
|
||||||
@@ -1280,7 +1423,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeTable(mysel: any) {
|
function changeTable(mysel: any) {
|
||||||
// console.log('changeTable', tablesel.value)
|
console.log('changeTable', tablesel.value)
|
||||||
|
changetable.value = true
|
||||||
if (tablesel.value === undefined || tablesel.value === '')
|
if (tablesel.value === undefined || tablesel.value === '')
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -1379,12 +1523,12 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
startsearch.value = true
|
console.log('REFRR - changetable')
|
||||||
|
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSearch() {
|
function doSearch() {
|
||||||
|
console.log('REFRR - doSearch')
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1721,6 +1865,17 @@ export default defineComponent({
|
|||||||
return actualDate.value
|
return actualDate.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onLoadScroll (index: number, done: any) {
|
||||||
|
if (index > 0) {
|
||||||
|
console.log('onLoadScroll', index, 'RECLOAD', numRecLoaded.value, 'ROWS: ', pagination.value.rowsNumber)
|
||||||
|
if (numRecLoaded.value >= pagination.value.rowsNumber) {
|
||||||
|
done(true)
|
||||||
|
} else {
|
||||||
|
pagination.value.page = pagination.value.page + 1
|
||||||
|
refresh_infscroll(done)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// onMounted(mounted)
|
// onMounted(mounted)
|
||||||
|
|
||||||
created()
|
created()
|
||||||
@@ -1809,6 +1964,10 @@ export default defineComponent({
|
|||||||
getActualDate,
|
getActualDate,
|
||||||
actualDate,
|
actualDate,
|
||||||
actual,
|
actual,
|
||||||
|
isAdmin,
|
||||||
|
onLoadScroll,
|
||||||
|
numRecLoaded,
|
||||||
|
myinfscroll,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -33,7 +33,208 @@
|
|||||||
<q-inner-loading :showing="spinner_visible">
|
<q-inner-loading :showing="spinner_visible">
|
||||||
<q-spinner-tail size="2em" color="primary"/>
|
<q-spinner-tail size="2em" color="primary"/>
|
||||||
</q-inner-loading>
|
</q-inner-loading>
|
||||||
|
|
||||||
|
<div v-if="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)">
|
||||||
|
<div v-if="searchList"
|
||||||
|
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `">
|
||||||
|
<span v-for="(item, index) in searchList" :key="index">
|
||||||
|
|
||||||
|
<!--<div class="text-center q-my-xs" v-if="(item.type === costanti.FieldType.separator)">
|
||||||
|
<q-btn size="sm" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'" label="Filtri Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||||
|
</div>-->
|
||||||
|
|
||||||
|
<CMySelect
|
||||||
|
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||||
|
v-if="(item.type === costanti.FieldType.select) || (item.type === costanti.FieldType.select_by_server)"
|
||||||
|
:label="labelcombo(item)"
|
||||||
|
v-model:value="item.value"
|
||||||
|
@update:value="searchval(item.value, item.table)"
|
||||||
|
:addall="item.addall"
|
||||||
|
:addnone="item.addnone"
|
||||||
|
:tablesel="item.type === costanti.FieldType.select_by_server ? item.tablesel : ''"
|
||||||
|
:pickup="item.type === costanti.FieldType.select_by_server"
|
||||||
|
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)"
|
||||||
|
:filter="item.filter"
|
||||||
|
:filter_extra="item.filter_extra"
|
||||||
|
:useinput="item.useinput && item.type !== costanti.FieldType.select_by_server">
|
||||||
|
</CMySelect>
|
||||||
|
|
||||||
|
<!--<div v-if="item.type === costanti.FieldType.multiselect_by_server">
|
||||||
|
item: {{ item}}
|
||||||
|
</div>-->
|
||||||
|
|
||||||
|
<CMySelect
|
||||||
|
v-if="item.type === costanti.FieldType.multiselect_by_server"
|
||||||
|
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||||
|
:multiselect_by_server="true"
|
||||||
|
:label="labelcombo(item)"
|
||||||
|
v-model:arrvalue="item.arrvalue"
|
||||||
|
@update:arrvalue="searchval(item.arrvalue, item.table)"
|
||||||
|
:addall="item.addall"
|
||||||
|
:addnone="item.addnone"
|
||||||
|
:tablesel="item.tablesel"
|
||||||
|
:pickup="true"
|
||||||
|
:param1="item.param1"
|
||||||
|
label-color="primary"
|
||||||
|
class="combowidth"
|
||||||
|
color="primary"
|
||||||
|
:icon_alternative="item.icon"
|
||||||
|
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||||
|
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||||
|
:filter="item.filter"
|
||||||
|
:filter_extra="item.filter_extra"
|
||||||
|
:options="valoriopt(item, false)"
|
||||||
|
:useinput="true">
|
||||||
|
</CMySelect>
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
v-if="(item.type === costanti.FieldType.multiselect)"
|
||||||
|
v-model="item.arrvalue"
|
||||||
|
label-color="primary"
|
||||||
|
:label="labelcombo(item)"
|
||||||
|
@update:model-value="searchval(item.arrvalue, item.table)"
|
||||||
|
rounded
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
multiple
|
||||||
|
options-dense
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
stack-label
|
||||||
|
:useinput="item.useinput"
|
||||||
|
:options="valoriopt(item, item.addall, item.addnone)"
|
||||||
|
:filter="item.filter"
|
||||||
|
class="combowidth"
|
||||||
|
: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">
|
||||||
|
<div
|
||||||
|
v-if="scope.opt[fieldsTable.getLabelByTable(item.table)] || (scope.opt && checkIfShowRec(scope.opt)) ">
|
||||||
|
<q-chip
|
||||||
|
removable
|
||||||
|
dense
|
||||||
|
@remove="scope.removeAtIndex(scope.index)"
|
||||||
|
v-if="checkIfShowRec(scope.opt)"
|
||||||
|
color="white"
|
||||||
|
text-color="mycol"
|
||||||
|
class="q-my-none q-ml-xs q-mr-none"
|
||||||
|
>
|
||||||
|
<q-avatar color="primary" text-color="white" :icon="item.icon" size="12px"/>
|
||||||
|
{{ scope.opt[fieldsTable.getLabelByTable(item.table)] || (scope.opt) }}
|
||||||
|
</q-chip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-slot:option="{ itemProps, opt, selected, toggleOption }">
|
||||||
|
<q-item v-bind="itemProps">
|
||||||
|
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>{{ opt[fieldsTable.getLabelByTable(item.table)] }}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section side>
|
||||||
|
<q-toggle :model-value="selected" @update:model-value="toggleOption(opt)"/>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</q-select>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="(prop_search || canEdit)"
|
||||||
|
class="row justify-center vertical-middle">
|
||||||
|
|
||||||
|
<div v-if="prop_search" class="q-mr-sm full-width">
|
||||||
|
<q-input
|
||||||
|
v-model="search" filled dense type="search" debounce="500" :hint="hint"
|
||||||
|
label="Cerca"
|
||||||
|
|
||||||
|
v-on:keyup.enter="doSearch"
|
||||||
|
>
|
||||||
|
<template v-slot:after>
|
||||||
|
<q-btn v-if="mytable" dense label="" color="primary" @click="refresh" icon="search"></q-btn>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<q-space></q-space>
|
||||||
|
<q-select
|
||||||
|
v-if="mytable && pagination.rowsNumber > 0 && (prop_search || canEdit) && showCol && myvertical === 0"
|
||||||
|
v-model="colVisib"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
multiple
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$t('grid.columns')"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="mycolumns"
|
||||||
|
option-value="name"
|
||||||
|
@update:model-value="changeCol">
|
||||||
|
|
||||||
|
</q-select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="pagination.rowsNumber === 1 && prop_search">{{ pagination.rowsNumber }} elemento trovato</div>
|
||||||
|
<div v-if="pagination.rowsNumber > 1 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
||||||
|
</div>
|
||||||
|
numRecLoaded: {{numRecLoaded}}
|
||||||
|
<q-infinite-scroll
|
||||||
|
ref="myinfscroll"
|
||||||
|
v-if="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
|
||||||
|
initial-index="0"
|
||||||
|
@load="onLoadScroll" :offset="350"
|
||||||
|
debounce="300"
|
||||||
|
|
||||||
|
>
|
||||||
|
INFINITE: <br />
|
||||||
|
|
||||||
|
<div v-for="(row, index) in serverData" :key="index" class="caption">
|
||||||
|
<div v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)">
|
||||||
|
|
||||||
|
<div v-if="row.dateTimeStart && (tools.getstrVeryShortDate(row.dateTimeStart) !== actual)" class="actualdate">
|
||||||
|
<span style="display: none">{{ actual = tools.getstrVeryShortDate(row.dateTimeStart) }}</span>
|
||||||
|
<q-chip class="text-center shadow-5 glossy bg-orange" icon="fas fa-calendar-day">{{ tools.getstrDateLong(row.dateTimeStart) }}</q-chip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<CMyRecGrpCard
|
||||||
|
v-if="tablesel === toolsext.TABMYGROUPS"
|
||||||
|
:table="tablesel"
|
||||||
|
:prop_myrec="row"
|
||||||
|
@cmdext="cmdExt"
|
||||||
|
>
|
||||||
|
</CMyRecGrpCard>
|
||||||
|
<CMyRecCard
|
||||||
|
v-else
|
||||||
|
:table="tablesel"
|
||||||
|
:prop_myrec="row"
|
||||||
|
@cmdext="cmdExt"
|
||||||
|
>
|
||||||
|
</CMyRecCard>
|
||||||
|
</div>
|
||||||
|
<template v-slot:loading>
|
||||||
|
<div class="row justify-center q-my-md">
|
||||||
|
<q-spinner-dots color="primary" size="40px"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</q-infinite-scroll>
|
||||||
<q-table
|
<q-table
|
||||||
|
v-else
|
||||||
:grid="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
|
:grid="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
|
||||||
:grid-header="shared_consts.VERTIC_SHOW_GRID.includes(myvertical) && shared_consts.TABLES_WITH_SORTING.includes(mytable)"
|
:grid-header="shared_consts.VERTIC_SHOW_GRID.includes(myvertical) && shared_consts.TABLES_WITH_SORTING.includes(mytable)"
|
||||||
flat
|
flat
|
||||||
@@ -42,10 +243,14 @@
|
|||||||
:rows="serverData"
|
:rows="serverData"
|
||||||
:columns="mycolumns"
|
:columns="mycolumns"
|
||||||
:filter="myfilter"
|
:filter="myfilter"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination2"
|
||||||
|
virtual-scroll
|
||||||
|
:virtual-scroll-item-size="48"
|
||||||
|
:virtual-scroll-sticky-size-start="48"
|
||||||
|
@virtual-scroll="onScroll"
|
||||||
|
:rows-per-page-options="[0]"
|
||||||
:row-key="colkey"
|
:row-key="colkey"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@request="onRequest"
|
|
||||||
@selection="selectionclick"
|
@selection="selectionclick"
|
||||||
binary-state-sort
|
binary-state-sort
|
||||||
:visible-columns="colVisib"
|
:visible-columns="colVisib"
|
||||||
@@ -291,17 +496,15 @@
|
|||||||
<div v-if="pagination.rowsNumber === 1 && prop_search">{{ pagination.rowsNumber }} elemento trovato</div>
|
<div v-if="pagination.rowsNumber === 1 && prop_search">{{ pagination.rowsNumber }} elemento trovato</div>
|
||||||
<div v-if="pagination.rowsNumber > 1 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
<div v-if="pagination.rowsNumber > 1 && prop_search">{{ pagination.rowsNumber }} elementi trovati</div>
|
||||||
|
|
||||||
<div v-if="choose_visutype" class="">
|
<div v-if="choose_visutype && $q.screen.gt.xs && isAdmin()" class="">
|
||||||
<q-radio v-model="myvertical" :val="2" label="Lista"
|
<q-radio v-model="myvertical" :val="2" label="Lista"/>
|
||||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
<!--<q-radio v-if="mytable === toolsext.TAB" v-model="myvertical" :val="costanti.VISUTABLE_SCHEDA_GROUP"
|
||||||
<q-radio v-if="mytable === toolsext.TAB" v-model="myvertical" :val="costanti.VISUTABLE_SCHEDA_GROUP"
|
|
||||||
label="Scheda"
|
label="Scheda"
|
||||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
||||||
<q-radio v-else-if="mytable !== toolsext.TABMYGROUPS && !finder" v-model="myvertical"
|
<q-radio v-else-if="mytable !== toolsext.TABMYGROUPS && !finder" v-model="myvertical"
|
||||||
:val="costanti.VISUTABLE_SCHEDA_USER" label="Scheda"
|
:val="costanti.VISUTABLE_SCHEDA_USER" slabel="Scheda"
|
||||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>-->
|
||||||
<q-radio v-if="$q.screen.gt.xs" v-model="myvertical" :val="0" label="Tabella"
|
<q-radio v-if="$q.screen.gt.xs" v-model="myvertical" :val="0" label="Tabella"/>
|
||||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -611,7 +814,7 @@
|
|||||||
label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||||
</div>-->
|
</div>-->
|
||||||
<div
|
<div
|
||||||
v-if="showColCheck(col, tools.TIPOVIS_EDIT_RECORD, false) && col.foredit">
|
v-if="showColCheck(col, tools.TIPOVIS_EDIT_RECORD, false) && col.foredit" class="tdclass">
|
||||||
<div>
|
<div>
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
:table="mytable"
|
:table="mytable"
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--:title="t(mycol.label_trans)"-->
|
<!--:title="t(mycol.label_trans)"-->
|
||||||
|
|
||||||
<div v-for="(mycol, index) of col" :key="index">
|
<div v-for="(mycol, index) of col" :key="index">
|
||||||
<div
|
<div
|
||||||
v-if="(mycol.visible && (tools.checkIfShowField(mycol, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(myrec, mycol.field, mycol.subfield))))">
|
v-if="(mycol.visible && (tools.checkIfShowField(mycol, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(myrec, mycol.field, mycol.subfield))))">
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ export default defineComponent({
|
|||||||
verdana: 'Verdana'
|
verdana: 'Verdana'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const showtools = ref(false)
|
||||||
|
|
||||||
const toolbarcomp = ref([
|
const toolbarcomp = ref([
|
||||||
['left', 'center', 'right', 'justify'],
|
['left', 'center', 'right', 'justify'],
|
||||||
['bold', 'italic', 'underline', 'strike'],
|
['bold', 'italic', 'underline', 'strike'],
|
||||||
@@ -172,6 +174,8 @@ export default defineComponent({
|
|||||||
myvalue.value = ''
|
myvalue.value = ''
|
||||||
else
|
else
|
||||||
myvalue.value = props.value
|
myvalue.value = props.value
|
||||||
|
|
||||||
|
showtools.value = tools.getCookie('showtools', '0') === '1'
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPaste (evt: any) {
|
function onPaste (evt: any) {
|
||||||
@@ -213,6 +217,7 @@ export default defineComponent({
|
|||||||
tools,
|
tools,
|
||||||
onPaste,
|
onPaste,
|
||||||
editorRef,
|
editorRef,
|
||||||
|
showtools,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
>
|
>
|
||||||
|
|
||||||
<q-btn rounded size="sm" color="primary">
|
<q-toggle v-model="showtools" :label="showtools ? $t('editor.hidetool') : $t('editor.showtool')" @click="tools.setCookie('showtools', showtools ? '1' : '0')"></q-toggle>
|
||||||
|
<br>
|
||||||
|
<q-btn v-if="showtools" rounded size="sm" color="primary">
|
||||||
<q-icon name="colorize" class="cursor-pointer">
|
<q-icon name="colorize" class="cursor-pointer">
|
||||||
<q-popup-proxy>
|
<q-popup-proxy>
|
||||||
<q-color v-model="mycolor" @change="setcolor"></q-color>
|
<q-color v-model="mycolor" @change="setcolor"></q-color>
|
||||||
@@ -30,7 +32,7 @@
|
|||||||
toolbar-text-color="white"
|
toolbar-text-color="white"
|
||||||
toolbar-toggle-color="yellow-8"
|
toolbar-toggle-color="yellow-8"
|
||||||
toolbar-bg="primary"
|
toolbar-bg="primary"
|
||||||
:toolbar="toolbarcomp"
|
:toolbar="showtools ? toolbarcomp : []"
|
||||||
:fonts="myfonts"
|
:fonts="myfonts"
|
||||||
@update:model-value="changeval"
|
@update:model-value="changeval"
|
||||||
@paste="onPaste"
|
@paste="onPaste"
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import { CAccomodation } from '../CAccomodation'
|
|||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { costanti } from '@costanti'
|
import { costanti } from '@costanti'
|
||||||
|
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
// import VueTelInput from 'vue3-tel-input'
|
// import VueTelInput from 'vue3-tel-input'
|
||||||
// import 'vue3-tel-input/dist/vue3-tel-input.css'
|
// import 'vue3-tel-input/dist/vue3-tel-input.css'
|
||||||
@@ -27,6 +26,7 @@ import MixinUsers from '@/mixins/mixin-users'
|
|||||||
import { toolsext } from '@store/Modules/toolsext'
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMyPopupEdit',
|
name: 'CMyPopupEdit',
|
||||||
emits: ['showandsave', 'update:row', 'show', 'save', 'annulla'],
|
emits: ['showandsave', 'update:row', 'show', 'save', 'annulla'],
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<div v-else-if="col.fieldtype === costanti.FieldType.username_chip">
|
<div v-else-if="col.fieldtype === costanti.FieldType.username_chip">
|
||||||
<div class="q-ma-xs">
|
<div class="q-ma-xs">
|
||||||
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue"
|
<q-btn v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue"
|
||||||
type="a" rounded size="md"
|
rounded size="md"
|
||||||
:class="{disabled: disable }"
|
:class="{disabled: disable }"
|
||||||
color="white" text-color="blue" :icon="`img:`+userStore.getImgUserByUsername(myvalue)"
|
color="white" text-color="blue" :icon="`img:`+userStore.getImgUserByUsername(myvalue)"
|
||||||
:to="col.link.replace(col.name, myvalue)"
|
:to="col.link.replace(col.name, myvalue)"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--suppress ALL -->
|
<!--suppress ALL -->
|
||||||
<template>
|
<template>
|
||||||
<div class="q-py-xs centermydiv cardrec" :style="`max-width: `+ (tools.getwidth($q) - 20) +`px; ` + ($q.screen.lt.sm ? (`min-width: `+ (tools.getwidth($q) - 20) +`px;`) : ``)">
|
<div class="q-py-xs centermydiv cardrec"
|
||||||
|
:style="`max-width: `+ (tools.getwidth($q) - 20) +`px; ` + ($q.screen.lt.sm ? (`min-width: `+ (tools.getwidth($q) - 20) +`px;`) : ``)">
|
||||||
<q-item v-if="myrec" clickable v-ripple class="shadow-2 q-btn--rounded bg-teal-1">
|
<q-item v-if="myrec" clickable v-ripple class="shadow-2 q-btn--rounded bg-teal-1">
|
||||||
|
|
||||||
|
|
||||||
@@ -12,11 +12,14 @@
|
|||||||
<q-icon :name="fieldsTable.getIconByAdType(myrec.adType)" color="white"
|
<q-icon :name="fieldsTable.getIconByAdType(myrec.adType)" color="white"
|
||||||
class="q-ml-xs"/>
|
class="q-ml-xs"/>
|
||||||
</q-badge>
|
</q-badge>
|
||||||
|
|
||||||
<q-avatar size="60px">
|
<q-avatar size="60px">
|
||||||
<q-img :src="tools.getFullFileName(myrec.photos, table, myrec.username, '')" :alt="myrec.descr"
|
<q-img :src="tools.getFullFileName(myrec.photos, table, myrec.username, '')" :alt="myrec.descr"
|
||||||
img-class="imgprofile" height="60px"/>
|
img-class="imgprofile" height="60px"/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section v-else avatar @click="naviga(`/my/` + myrec.username)">
|
<q-item-section v-else avatar @click="naviga(`/my/` + myrec.username)">
|
||||||
|
|
||||||
<q-badge v-if="showBadge()" class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myrec.adType)">
|
<q-badge v-if="showBadge()" class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myrec.adType)">
|
||||||
@@ -30,13 +33,16 @@
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section @click="navigaExt(myrec)">
|
<q-item-section @click="navigaExt(myrec)">
|
||||||
<q-item-label class="full-width">
|
<q-item-label lines="1" class="full-width" >
|
||||||
<span v-for="(rec, ind) of myrec.recSkill" :key="ind"> <q-chip
|
|
||||||
dense
|
<span v-for="(rec, ind) of tools.getArrSubSector(table, myrec)" :key="ind">
|
||||||
class="text-center shadow-5 glossy bg-blue chipmodif">{{ rec.descr }}</q-chip></span>
|
<q-chip dense class="text-center shadow-5 glossy text-white bg-green">{{ rec.descr }}</q-chip>
|
||||||
<span v-for="(rec, ind) of myrec.myskill" :key="ind"> <q-chip
|
</span>
|
||||||
dense
|
<span>
|
||||||
class="text-center shadow-5 glossy bg-green chipmodif">{{ rec.descr }}</q-chip></span>
|
<span v-for="(rec, ind) of tools.getArrSector(table, myrec)" :key="ind">
|
||||||
|
<q-chip dense class="text-center shadow-5 glossy text-white bg-blue">{{ rec.descr }}</q-chip></span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
<!--<span class="dateevent" v-if="myrec.dateTimeStart">dal <span class="datainizio">{{tools.getstrVeryShortDate(myrec.dateStart) }}</span> al <span class="datafine">{{ tools.getstrVeryShortDate(myrec.dateEnd) }}</span>
|
<!--<span class="dateevent" v-if="myrec.dateTimeStart">dal <span class="datainizio">{{tools.getstrVeryShortDate(myrec.dateStart) }}</span> al <span class="datafine">{{ tools.getstrVeryShortDate(myrec.dateEnd) }}</span>
|
||||||
</span>-->
|
</span>-->
|
||||||
@@ -45,7 +51,7 @@
|
|||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label lines="1" style="text-align: right" class="text_user_city">
|
<q-item-label lines="1" style="text-align: right" class="text_user_city">
|
||||||
<span class="text-weight-bold">{{ myrec.username }}</span> -
|
<span class="text-weight-bold">{{ myrec.username }}</span> -
|
||||||
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span>
|
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }} ({{ rec.prov }})</span>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|||||||
@@ -323,7 +323,12 @@ export default defineComponent({
|
|||||||
if (!arrtempOpt.value.includes(myidkey)){
|
if (!arrtempOpt.value.includes(myidkey)){
|
||||||
let myobj: any = {}
|
let myobj: any = {}
|
||||||
myobj[props.col.remote_key] = myidkey
|
myobj[props.col.remote_key] = myidkey
|
||||||
|
if (props.col.remote_field === 'comune' && !!myrec['prov']) {
|
||||||
|
myobj[props.col.remote_field] = myrec[props.col.remote_field] + ' (' + myrec['prov'] + ')'
|
||||||
|
} else {
|
||||||
myobj[props.col.remote_field] = myrec[props.col.remote_field]
|
myobj[props.col.remote_field] = myrec[props.col.remote_field]
|
||||||
|
}
|
||||||
|
|
||||||
arrtempOpt.value.push(myobj)
|
arrtempOpt.value.push(myobj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,8 +68,18 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="!isalreadyReg" class="q-gutter-sm">
|
<div v-else-if="!isalreadyReg" class="q-gutter-sm q-mt-sm">
|
||||||
|
|
||||||
|
<div v-if="signup.username === 'undefined'">
|
||||||
|
<br>
|
||||||
|
Vai su <b>BOT RISO</b> Telegram ed imposta l'Username di Telegram.<br><br>
|
||||||
|
<q-btn rounded color="primary" icon="fab fa-telegram" label="Apri BOT"
|
||||||
|
type="a"
|
||||||
|
:href="tools.getLinkBotTelegram()" target="_blank"></q-btn>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
<q-input
|
<q-input
|
||||||
v-if="showaportador && signup.aportador_solidario !== tools.APORTADOR_NONE"
|
v-if="showaportador && signup.aportador_solidario !== tools.APORTADOR_NONE"
|
||||||
bg-color="lightblue"
|
bg-color="lightblue"
|
||||||
@@ -299,6 +309,8 @@
|
|||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<br/><br/><br/>
|
<br/><br/><br/>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
:prop_colkey="prop_colkey"
|
:prop_colkey="prop_colkey"
|
||||||
:col_title="col_title"
|
:col_title="col_title"
|
||||||
:col_footer="col_footer"
|
:col_footer="col_footer"
|
||||||
:vertical="-1"
|
:vertical="costanti.VISUTABLE_LISTA"
|
||||||
:choose_visutype="!visuinpage"
|
:choose_visutype="!visuinpage"
|
||||||
:butt_modif_new="!visuinpage"
|
:butt_modif_new="!visuinpage"
|
||||||
nodataLabel="Nessun dato presente"
|
nodataLabel="Nessun dato presente"
|
||||||
|
|||||||
@@ -217,12 +217,17 @@ const msg_website_it = {
|
|||||||
'<span><a href="https://paypal.me/paoloarena/10" target="_blank">10€</a></span>' +
|
'<span><a href="https://paypal.me/paoloarena/10" target="_blank">10€</a></span>' +
|
||||||
'<span><a href="https://paypal.me/paoloarena" target="_blank">scegli</a></span>' +
|
'<span><a href="https://paypal.me/paoloarena" target="_blank">scegli</a></span>' +
|
||||||
'</div><em>clicca sull\'importo per fare una <strong>donazione</strong> </em><br>' +
|
'</div><em>clicca sull\'importo per fare una <strong>donazione</strong> </em><br>' +
|
||||||
'<br>2) Tramite <strong>Bonifico Bancario</strong>:<br>' +
|
'<br>2) Tramite <strong>Satispay</strong>: <a href="https://www.satispay.com/app/match/link/money-box/S6Y-SVN--62712D42-35B0-4BB9-8511-410C2AB8CD45" target="_blank">Clicca qui</a><br>' +
|
||||||
'Intestato a Paolo Arena<br>' +
|
'<div style="font-size: 1rem; background-color: white; color: blue; border: solid 2px #f00; margin: 5px; padding: 5px; border-radius: 10px; " ' +
|
||||||
'IBAN: IT76O0347501605CC0010311400<br>' +
|
'class="row justify-around">' +
|
||||||
'Causale: "donazione riso.app"<br><br>' +
|
'Se ancora non hai Satispay <a href="https://www.satispay.com/promo/PAOLOARENA4">Richiedila cliccando qui</a></br>' +
|
||||||
|
'E\' consigliata se hai un conto bancario come alternativa alla costosa carta di credito/debito</br>' +
|
||||||
|
'👉🏻 <strong>Registrandoti entrambi riceviamo un Bonus di 5 €</strong></br>' +
|
||||||
|
'</div>' +
|
||||||
|
'<br>3) Tramite <strong>Bonifico Bancario</strong>:<br>' +
|
||||||
|
'(Scrivi a Surya (<a href="mailto:surya@riso.app">surya@riso.app</a>) per ricevere le coordinate</br>' +
|
||||||
'' +
|
'' +
|
||||||
'3) In alternativa scegli tu una forma di scambio da donare a Paolo (per scrivergli su Telegram: <a href="https://t.me/surya1977" target="_blank">Surya Paolo</a>)<br />' +
|
'4) In alternativa scegli tu una forma di scambio da donare a Paolo (per scrivergli su Telegram: <a href="https://t.me/surya1977" target="_blank">Surya Paolo</a>)<br />' +
|
||||||
'<span style="color: red; font-size: 2rem;">❤</span> Sono graditi messaggi sia di suggerimenti che di apprezzamenti.<br>' +
|
'<span style="color: red; font-size: 2rem;">❤</span> Sono graditi messaggi sia di suggerimenti che di apprezzamenti.<br>' +
|
||||||
'Grazie Mille per l\'Aiuto ed il Supporto' +
|
'Grazie Mille per l\'Aiuto ed il Supporto' +
|
||||||
'<br>',
|
'<br>',
|
||||||
|
|||||||
@@ -500,6 +500,17 @@ const baseroutes: IListRoutes[] = [
|
|||||||
inmenu: true,
|
inmenu: true,
|
||||||
infooter: true,
|
infooter: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
active: true,
|
||||||
|
order: 15,
|
||||||
|
path: '/provapao',
|
||||||
|
materialIcon: 'fas fa-house-user',
|
||||||
|
name: 'mypages.provapao',
|
||||||
|
component: () => import('@/root/provapao/provapao.vue'),
|
||||||
|
meta: { requiresAuth: true },
|
||||||
|
inmenu: true,
|
||||||
|
infooter: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
active: true,
|
active: true,
|
||||||
order: 15,
|
order: 15,
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export interface IMyGroup {
|
|||||||
photos: IImgGallery[]
|
photos: IImgGallery[]
|
||||||
visibility?: number[]
|
visibility?: number[]
|
||||||
date_created?: Date
|
date_created?: Date
|
||||||
|
date_updated?: Date
|
||||||
admins?: IFriends[]
|
admins?: IFriends[]
|
||||||
req_users?: IFriends[]
|
req_users?: IFriends[]
|
||||||
blocked?: boolean
|
blocked?: boolean
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
</CFinder>
|
</CFinder>
|
||||||
|
|
||||||
<CDashboard></CDashboard>
|
<br />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<LandingFooter></LandingFooter>
|
|
||||||
</q-page>
|
</q-page>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
:table="toolsext.TABMYGOODS"
|
:table="toolsext.TABMYGOODS"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CDashboard></CDashboard>
|
<br />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<LandingFooter></LandingFooter>
|
|
||||||
</q-page>
|
</q-page>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
</CFinder>
|
</CFinder>
|
||||||
|
|
||||||
<CDashboard></CDashboard>
|
<br />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<LandingFooter></LandingFooter>
|
|
||||||
</q-page>
|
</q-page>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
0
src/root/provapao/provapao.scss
Executable file
0
src/root/provapao/provapao.scss
Executable file
181
src/root/provapao/provapao.ts
Executable file
181
src/root/provapao/provapao.ts
Executable file
@@ -0,0 +1,181 @@
|
|||||||
|
import {
|
||||||
|
defineComponent, ref, computed,
|
||||||
|
} from 'vue'
|
||||||
|
|
||||||
|
import { tools } from '@src/store/Modules/tools'
|
||||||
|
import { toolsext } from '@src/store/Modules/toolsext'
|
||||||
|
import { CSkill } from '@/components/CSkill'
|
||||||
|
import { CFinder } from '@/components/CFinder'
|
||||||
|
import { CDashboard } from '@/components/CDashboard'
|
||||||
|
import { CTitlePage } from '@/components/CTitlePage'
|
||||||
|
import { CChartMap } from '@src/components/CChartMap'
|
||||||
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
|
import { CMapsEsempio } from '@src/components/CMapsEsempio'
|
||||||
|
import { CVerifyEmail } from '@src/components/CVerifyEmail'
|
||||||
|
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
|
||||||
|
import { LandingFooter } from '@/components/LandingFooter'
|
||||||
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
import { static_data } from '@/db/static_data'
|
||||||
|
import MixinBase from '@/mixins/mixin-base'
|
||||||
|
import MixinUsers from '@/mixins/mixin-users'
|
||||||
|
import { costanti } from '@costanti'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'ProvaPao',
|
||||||
|
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, LandingFooter },
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
name: 'index',
|
||||||
|
label: '#',
|
||||||
|
field: 'index'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'name',
|
||||||
|
required: true,
|
||||||
|
label: 'Dessert (100g serving)',
|
||||||
|
align: 'left',
|
||||||
|
// @ts-ignore
|
||||||
|
field: row => row.name,
|
||||||
|
// @ts-ignore
|
||||||
|
format: val => `${val}`,
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{ name: 'calories', align: 'center', label: 'Calories', field: 'calories', sortable: true },
|
||||||
|
{ name: 'fat', label: 'Fat (g)', field: 'fat', sortable: true },
|
||||||
|
{ name: 'carbs', label: 'Carbs (g)', field: 'carbs' },
|
||||||
|
{ name: 'protein', label: 'Protein (g)', field: 'protein' },
|
||||||
|
{ name: 'sodium', label: 'Sodium (mg)', field: 'sodium' },
|
||||||
|
{ name: 'calcium', label: 'Calcium (%)', field: 'calcium', sortable: true, sort: (a: any, b: any) => parseInt(a, 10) - parseInt(b, 10) },
|
||||||
|
{ name: 'iron', label: 'Iron (%)', field: 'iron', sortable: true, sort: (a: any, b: any) => parseInt(a, 10) - parseInt(b, 10) }
|
||||||
|
]
|
||||||
|
|
||||||
|
const seed = [
|
||||||
|
{
|
||||||
|
name: 'Frozen Yogurt',
|
||||||
|
calories: 159,
|
||||||
|
fat: 6.0,
|
||||||
|
carbs: 24,
|
||||||
|
protein: 4.0,
|
||||||
|
sodium: 87,
|
||||||
|
calcium: '14%',
|
||||||
|
iron: '1%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Ice cream sandwich',
|
||||||
|
calories: 237,
|
||||||
|
fat: 9.0,
|
||||||
|
carbs: 37,
|
||||||
|
protein: 4.3,
|
||||||
|
sodium: 129,
|
||||||
|
calcium: '8%',
|
||||||
|
iron: '1%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Eclair',
|
||||||
|
calories: 262,
|
||||||
|
fat: 16.0,
|
||||||
|
carbs: 23,
|
||||||
|
protein: 6.0,
|
||||||
|
sodium: 337,
|
||||||
|
calcium: '6%',
|
||||||
|
iron: '7%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Cupcake',
|
||||||
|
calories: 305,
|
||||||
|
fat: 3.7,
|
||||||
|
carbs: 67,
|
||||||
|
protein: 4.3,
|
||||||
|
sodium: 413,
|
||||||
|
calcium: '3%',
|
||||||
|
iron: '8%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Gingerbread',
|
||||||
|
calories: 356,
|
||||||
|
fat: 16.0,
|
||||||
|
carbs: 49,
|
||||||
|
protein: 3.9,
|
||||||
|
sodium: 327,
|
||||||
|
calcium: '7%',
|
||||||
|
iron: '16%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Jelly bean',
|
||||||
|
calories: 375,
|
||||||
|
fat: 0.0,
|
||||||
|
carbs: 94,
|
||||||
|
protein: 0.0,
|
||||||
|
sodium: 50,
|
||||||
|
calcium: '0%',
|
||||||
|
iron: '0%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Lollipop',
|
||||||
|
calories: 392,
|
||||||
|
fat: 0.2,
|
||||||
|
carbs: 98,
|
||||||
|
protein: 0,
|
||||||
|
sodium: 38,
|
||||||
|
calcium: '0%',
|
||||||
|
iron: '2%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Honeycomb',
|
||||||
|
calories: 408,
|
||||||
|
fat: 3.2,
|
||||||
|
carbs: 87,
|
||||||
|
protein: 6.5,
|
||||||
|
sodium: 562,
|
||||||
|
calcium: '0%',
|
||||||
|
iron: '45%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Donut',
|
||||||
|
calories: 452,
|
||||||
|
fat: 25.0,
|
||||||
|
carbs: 51,
|
||||||
|
protein: 4.9,
|
||||||
|
sodium: 326,
|
||||||
|
calcium: '2%',
|
||||||
|
iron: '22%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'KitKat',
|
||||||
|
calories: 518,
|
||||||
|
fat: 26.0,
|
||||||
|
carbs: 65,
|
||||||
|
protein: 7,
|
||||||
|
sodium: 54,
|
||||||
|
calcium: '12%',
|
||||||
|
iron: '6%'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
// we generate lots of rows here
|
||||||
|
let rows: any = []
|
||||||
|
for (let i = 0; i < 1000; i++) {
|
||||||
|
rows = rows.concat(seed.slice(0).map((r: any) => ({ ...r })))
|
||||||
|
}
|
||||||
|
rows.forEach((row: any, index: any) => {
|
||||||
|
row.index = index
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
tools,
|
||||||
|
toolsext,
|
||||||
|
static_data,
|
||||||
|
columns,
|
||||||
|
rows,
|
||||||
|
|
||||||
|
pagination: ref({
|
||||||
|
rowsPerPage: 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
43
src/root/provapao/provapao.vue
Executable file
43
src/root/provapao/provapao.vue
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<q-page class="">
|
||||||
|
<CTitlePage :ind="1" />
|
||||||
|
|
||||||
|
<div v-if="tools.isLogged()">
|
||||||
|
|
||||||
|
<div v-if="tools.isUserOk()">
|
||||||
|
|
||||||
|
<CFinder
|
||||||
|
:ind="1"
|
||||||
|
:table="toolsext.TABMYSKILLS"
|
||||||
|
/>
|
||||||
|
|
||||||
|
Prova Pao:<br>
|
||||||
|
<div class="q-pa-md">
|
||||||
|
<q-table
|
||||||
|
style="height: 400px"
|
||||||
|
title="Treats"
|
||||||
|
:rows="rows"
|
||||||
|
:columns="columns"
|
||||||
|
row-key="index"
|
||||||
|
virtual-scroll
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:rows-per-page-options="[0]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CUserNonVerif></CUserNonVerif>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<LandingFooter></LandingFooter>
|
||||||
|
</q-page>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<script lang="ts" src="./provapao.ts">
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './provapao.scss';
|
||||||
|
</style>
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
:table="toolsext.TABMYSKILLS"
|
:table="toolsext.TABMYSKILLS"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CDashboard></CDashboard>
|
<br />
|
||||||
|
<!--<CDashboard></CDashboard>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -20,7 +21,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<LandingFooter></LandingFooter>
|
|
||||||
</q-page>
|
</q-page>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ const msg_it = {
|
|||||||
chisei: 'Chi Sei? Raccontaci di te:',
|
chisei: 'Chi Sei? Raccontaci di te:',
|
||||||
iltuoimpegno: 'Quale è stato il tuo impegno per salvare il pianeta ad oggi?',
|
iltuoimpegno: 'Quale è stato il tuo impegno per salvare il pianeta ad oggi?',
|
||||||
come_aiutare: 'Cosa vorresti fare per aiutare il pianeta?',
|
come_aiutare: 'Cosa vorresti fare per aiutare il pianeta?',
|
||||||
|
skills: 'Competenze e Talenti',
|
||||||
},
|
},
|
||||||
otherpages: {
|
otherpages: {
|
||||||
product: 'Prodotto',
|
product: 'Prodotto',
|
||||||
@@ -243,7 +244,7 @@ const msg_it = {
|
|||||||
open: 'Clicca sul bottone qui sotto, si aprirà una chat Telegram speciale (chiamata BOT)',
|
open: 'Clicca sul bottone qui sotto, si aprirà una chat Telegram speciale (chiamata BOT)',
|
||||||
ifclose: 'poi premi "AVVIA" o "START" e segui le istruzioni indicate.',
|
ifclose: 'poi premi "AVVIA" o "START" e segui le istruzioni indicate.',
|
||||||
openbot: 'Entra qui',
|
openbot: 'Entra qui',
|
||||||
regbot: 'Verifica Telegram',
|
regbot: 'Registrati cliccando qui (si aprirà Telegram)',
|
||||||
},
|
},
|
||||||
login: {
|
login: {
|
||||||
facebook: 'Facebook',
|
facebook: 'Facebook',
|
||||||
@@ -990,6 +991,7 @@ const msg_it = {
|
|||||||
request_trust: 'Richieste Fiducia',
|
request_trust: 'Richieste Fiducia',
|
||||||
trusted: 'Fiducia Accettata',
|
trusted: 'Fiducia Accettata',
|
||||||
rejected: 'Rifiutati',
|
rejected: 'Rifiutati',
|
||||||
|
provapao: 'Prova pao',
|
||||||
},
|
},
|
||||||
friends: {
|
friends: {
|
||||||
accept_trust: 'Accetta Fiducia',
|
accept_trust: 'Accetta Fiducia',
|
||||||
@@ -1020,6 +1022,7 @@ const msg_it = {
|
|||||||
admin: 'amministratore',
|
admin: 'amministratore',
|
||||||
admins: 'Amministratori',
|
admins: 'Amministratori',
|
||||||
createdby: 'Creato da {username} in data {date}',
|
createdby: 'Creato da {username} in data {date}',
|
||||||
|
lastmodify: 'Ultima modifica {date}',
|
||||||
subscribes: 'Membri',
|
subscribes: 'Membri',
|
||||||
ask_group: 'Chiedi di entrare nel Gruppo',
|
ask_group: 'Chiedi di entrare nel Gruppo',
|
||||||
exit_group: 'Esci dal Gruppo',
|
exit_group: 'Esci dal Gruppo',
|
||||||
@@ -1120,6 +1123,10 @@ const msg_it = {
|
|||||||
expiringDate: 'Data Scadenza',
|
expiringDate: 'Data Scadenza',
|
||||||
|
|
||||||
},
|
},
|
||||||
|
editor: {
|
||||||
|
showtool: 'Mostra strumenti per formattare il testo',
|
||||||
|
hidetool: 'Nascondi strumenti per formattare il testo',
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,8 @@ export const Api = {
|
|||||||
return reject({ code: toolsext.ERR_AUTHENTICATION })
|
return reject({ code: toolsext.ERR_AUTHENTICATION })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (tools.isDebug())
|
||||||
|
console.log('result', res)
|
||||||
return resolve(res)
|
return resolve(res)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@@ -614,6 +614,13 @@ export const colmyUserGroup = [
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
showWhen: 0
|
showWhen: 0
|
||||||
}),
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'date_updated', label_trans: 'reg.pub_updated', fieldtype: costanti.FieldType.onlydate,
|
||||||
|
required: false,
|
||||||
|
visible: false,
|
||||||
|
sortable: true,
|
||||||
|
showWhen: 0
|
||||||
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'photos',
|
name: 'photos',
|
||||||
label_trans: 'skill.photos',
|
label_trans: 'skill.photos',
|
||||||
|
|||||||
@@ -2258,6 +2258,12 @@ export const tools = {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getstrDateYY(mytimestamp: Date | number | string | undefined) {
|
||||||
|
// console.log('getstrDate', mytimestamp)
|
||||||
|
if (mytimestamp) return date.formatDate(mytimestamp, 'DD/MM/YY')
|
||||||
|
return ''
|
||||||
|
},
|
||||||
|
|
||||||
getstrDateLong(mytimestamp: Date | number | string | undefined) {
|
getstrDateLong(mytimestamp: Date | number | string | undefined) {
|
||||||
// console.log('getstrDate', mytimestamp)
|
// console.log('getstrDate', mytimestamp)
|
||||||
const dayofweek = this.getDayOfWeek(mytimestamp)
|
const dayofweek = this.getDayOfWeek(mytimestamp)
|
||||||
@@ -5785,6 +5791,32 @@ export const tools = {
|
|||||||
return config[name];
|
return config[name];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getArrSector(table: string, rec: any) {
|
||||||
|
if (table === toolsext.TABMYGOODS)
|
||||||
|
return rec.sectorGood
|
||||||
|
else if ((table === toolsext.TABMYBACHECAS) || (table === toolsext.TABMYSKILLS))
|
||||||
|
return rec.sector
|
||||||
|
else if (table === toolsext.TABMYGROUPS)
|
||||||
|
return [{descr: rec.sector}]
|
||||||
|
else if (table === toolsext.TABMYHOSPS)
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
getArrSubSector(table: string, rec: any) {
|
||||||
|
if (table === toolsext.TABMYGOODS)
|
||||||
|
return rec.recGood
|
||||||
|
else if ((table === toolsext.TABMYBACHECAS) || (table === toolsext.TABMYSKILLS))
|
||||||
|
return rec.recSkill
|
||||||
|
else if (table === toolsext.TABMYGROUPS)
|
||||||
|
return []
|
||||||
|
else if (table === toolsext.TABMYHOSPS)
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
// if (navigator.languages && navigator.languages.length > 0) {
|
// if (navigator.languages && navigator.languages.length > 0) {
|
||||||
// return navigator.languages[0]
|
// return navigator.languages[0]
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export const toolsext = {
|
|||||||
TABFRIENDS: 'friends',
|
TABFRIENDS: 'friends',
|
||||||
TABMYGROUPS: 'mygroups',
|
TABMYGROUPS: 'mygroups',
|
||||||
TABSKILLS: 'skills',
|
TABSKILLS: 'skills',
|
||||||
|
TABGOODS: 'goods',
|
||||||
TABSECTORS: 'sectors',
|
TABSECTORS: 'sectors',
|
||||||
TABSECTORGOODS: 'sectorgoods',
|
TABSECTORGOODS: 'sectorgoods',
|
||||||
TABREGIONS: 'regions',
|
TABREGIONS: 'regions',
|
||||||
|
|||||||
@@ -1625,7 +1625,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
let obj: any = {}
|
let obj: any = {}
|
||||||
obj[mykey] = costanti.FILTER_NESSUNO
|
obj[mykey] = costanti.FILTER_NESSUNO
|
||||||
obj[collab] = '[Nessuno]'
|
obj[collab] = '[Nessuno]'
|
||||||
|
|
||||||
|
if (table === toolsext.TABMYGOODS) {
|
||||||
|
obj['idSectorGood'] = []
|
||||||
|
} else if ((table === toolsext.TABMYSKILLS) ) {
|
||||||
obj['idSector'] = []
|
obj['idSector'] = []
|
||||||
|
}
|
||||||
|
|
||||||
myarr = [obj, ...myarr]
|
myarr = [obj, ...myarr]
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="">
|
<div class="">
|
||||||
|
<!--
|
||||||
<q-banner
|
<q-banner
|
||||||
rounded
|
rounded
|
||||||
dense
|
dense
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
<span class="mybanner">Questa sezione è ancora in fase di miglioramento.</span>
|
<span class="mybanner">Questa sezione è ancora in fase di miglioramento.</span>
|
||||||
|
|
||||||
</q-banner>
|
</q-banner>
|
||||||
|
-->
|
||||||
<CMyFriends
|
<CMyFriends
|
||||||
v-if="searchList.length > 0"
|
v-if="searchList.length > 0"
|
||||||
v-model="filter"
|
v-model="filter"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.members, .admins, .creator{
|
.members, .admins, .creator, .element{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
vertical-align: center;
|
vertical-align: center;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export default defineComponent({
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
const tabgrp = ref('info')
|
const tabgrp = ref('info')
|
||||||
|
const tabmembers = ref('all')
|
||||||
const tab = ref('membri')
|
const tab = ref('membri')
|
||||||
|
|
||||||
const arrfilterand: any = ref([])
|
const arrfilterand: any = ref([])
|
||||||
@@ -225,6 +226,7 @@ export default defineComponent({
|
|||||||
extraparams_refused,
|
extraparams_refused,
|
||||||
tab,
|
tab,
|
||||||
tabgrp,
|
tabgrp,
|
||||||
|
tabmembers,
|
||||||
numUsers,
|
numUsers,
|
||||||
numAdmins,
|
numAdmins,
|
||||||
listaAdmins,
|
listaAdmins,
|
||||||
|
|||||||
@@ -104,8 +104,6 @@
|
|||||||
<q-tab v-if="!!mygrp.note" label="Pagina" name="page" icon="fas fa-file-word"></q-tab>
|
<q-tab v-if="!!mygrp.note" label="Pagina" name="page" icon="fas fa-file-word"></q-tab>
|
||||||
<q-tab v-if="tools.iCanShowGroupsMember(mygrp) || tools.iAmAdminGroup(groupname)"
|
<q-tab v-if="tools.iCanShowGroupsMember(mygrp) || tools.iAmAdminGroup(groupname)"
|
||||||
:label="t('groups.subscribes')" name="membri" icon="fas fa-users"></q-tab>
|
:label="t('groups.subscribes')" name="membri" icon="fas fa-users"></q-tab>
|
||||||
<q-tab v-if="tools.iAmAdminGroup(groupname)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
|
||||||
<q-tab v-if="tools.iAmAdminGroup(groupname)" label="Rifiutati" name="refused" icon="fas fa-user-minus"></q-tab>
|
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
|
||||||
<q-tab-panels v-model="tabgrp" animated>
|
<q-tab-panels v-model="tabgrp" animated>
|
||||||
@@ -119,12 +117,17 @@
|
|||||||
<q-separator/>
|
<q-separator/>
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="creator">
|
<div class="element">
|
||||||
<q-icon name="fas fa-lightbulb"></q-icon>
|
<q-icon name="fas fa-lightbulb"></q-icon>
|
||||||
{{ $t('groups.createdby', {
|
{{ $t('groups.createdby', {
|
||||||
username: mygrp.createdBy,
|
username: mygrp.createdBy,
|
||||||
date: tools.getstrDateLong(mygrp.date_created),
|
date: tools.getstrDateYY(mygrp.date_created), })
|
||||||
})
|
}}
|
||||||
|
</div>
|
||||||
|
<div class="element">
|
||||||
|
<q-icon name="fas fa-pencil-alt"></q-icon>
|
||||||
|
{{ $t('groups.lastmodify', {
|
||||||
|
date: tools.getstrDateYY(mygrp.date_updated), })
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -180,6 +183,7 @@
|
|||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
|
<br>
|
||||||
</div>
|
</div>
|
||||||
<q-card v-if="mygrp.title">
|
<q-card v-if="mygrp.title">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
@@ -231,6 +235,16 @@
|
|||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
|
|
||||||
<q-tab-panel name="membri" style="max-width: 400px;" v-if="tools.iCanShowGroupsMember(mygrp)">
|
<q-tab-panel name="membri" style="max-width: 400px;" v-if="tools.iCanShowGroupsMember(mygrp)">
|
||||||
|
|
||||||
|
<q-tabs v-model="tabmembers" class="text-blue">
|
||||||
|
<q-tab label="Tutti" name="all" icon="fas fa-users"></q-tab>
|
||||||
|
<q-tab v-if="tools.iAmAdminGroup(groupname)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
||||||
|
<q-tab v-if="tools.iAmAdminGroup(groupname)" label="Rifiutati" name="refused" icon="fas fa-user-minus"></q-tab>
|
||||||
|
</q-tabs>
|
||||||
|
|
||||||
|
<q-tab-panels v-model="tabmembers" animated>
|
||||||
|
<q-tab-panel name="all">
|
||||||
|
|
||||||
<CGridTableRec
|
<CGridTableRec
|
||||||
ref="tabMembri"
|
ref="tabMembri"
|
||||||
prop_mytable="users"
|
prop_mytable="users"
|
||||||
@@ -324,6 +338,9 @@
|
|||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
|
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
|
||||||
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade"/>
|
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade"/>
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
|
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
v-if="static_data.functionality.SHOW_COMPETENZE"
|
v-if="static_data.functionality.SHOW_COMPETENZE"
|
||||||
class="" title="Competenze e Talenti" bgcolor="bg-positive" clcolor="text-white"
|
class="" :title="$t('profile.skills')" bgcolor="bg-positive" clcolor="text-white"
|
||||||
myclass="myshad" :canopen="true">
|
myclass="myshad" :canopen="true">
|
||||||
|
|
||||||
<q-tabs v-model="actualcard" class="text-blue">
|
<q-tabs v-model="actualcard" class="text-blue">
|
||||||
|
|||||||
Reference in New Issue
Block a user