Riattivato il Calendario (ma ancora non lo rendo visibile)
aggiunto campi: DateTimeStart e DateTimeEnd negli Eventi Aggiunto Filtro Data
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
.text-cls{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.my-text {
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
@@ -26,8 +30,8 @@
|
||||
}
|
||||
|
||||
.mybox {
|
||||
min-width: 125px;
|
||||
min-height: 137px;
|
||||
min-width: 112px;
|
||||
min-height: 112px;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<template>
|
||||
<div v-if="numcol === 3" class="col-xs-4 col-sm-4 col-md-3 col-lg-2">
|
||||
<div class="q-ma-xs">
|
||||
<div class="q-ma-sm">
|
||||
<q-btn v-if="!small" class="mybox_3" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||
<q-icon class="q-ma-sm" :name="icon"/>
|
||||
<div class="q-ma-sm my-text_3 no-wrap"><span v-html="label"></span></div>
|
||||
<div class="q-ma-sm my-text_3 text-cls no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
<q-btn v-if="small" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||
<q-icon class="q-ma-xs" :name="icon" size="sm"/>
|
||||
<div class="q-ma-xs my-text-small no-wrap"><span v-html="label"></span></div>
|
||||
<q-icon class="q-ma-sm" :name="icon" size="sm"/>
|
||||
<div class="q-ma-xs my-text-small text-cls no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="col-xs-6 col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="q-ma-sm">
|
||||
<q-btn v-if="!small" class="mybox" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||
<q-icon class="q-ma-sm" size="4.5rem" :name="icon"/>
|
||||
<div class="q-ma-sm text-h5 no-wrap"><span v-html="label"></span></div>
|
||||
<q-icon class="q-ma-sm" size="3rem" :name="icon"/>
|
||||
<div class="q-ma-sm text-h5 text-cls no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
<q-btn v-if="small" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||
<q-icon class="q-ma-xs" :name="icon" size="sm"/>
|
||||
<div class="q-ma-xs my-text-small no-wrap"><span v-html="label"></span></div>
|
||||
<q-icon class="q-ma-sm" :name="icon" size="sm"/>
|
||||
<div class="q-ma-xs my-text-small text-cls no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,6 +44,7 @@ export default defineComponent({
|
||||
const searchList_Servizi = ref(<ISearchList[]>[])
|
||||
const searchList_Beni = ref(<ISearchList[]>[])
|
||||
const searchList_MyGroups = ref(<ISearchList[]>[])
|
||||
const searchList_Events = ref(<ISearchList[]>[])
|
||||
|
||||
const search = ref('')
|
||||
const myrecfiltertoggle = ref(tools.FILTER_ALL)
|
||||
@@ -53,7 +54,6 @@ export default defineComponent({
|
||||
const col_footer = ref('idCity')
|
||||
const col_tabfooter = ref('mycities')
|
||||
|
||||
const mypagination = ref({ sortBy: 'date_created', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 })
|
||||
|
||||
const col = ref(<IColGridTable>{})
|
||||
|
||||
@@ -81,6 +81,13 @@ export default defineComponent({
|
||||
},
|
||||
)
|
||||
|
||||
const mypagination = computed(() => {
|
||||
if (props.table === toolsext.TABMYBACHECAS)
|
||||
return { sortBy: 'dateStart', descending: false, page: 1, rowsNumber: 20, rowsPerPage: 20 }
|
||||
|
||||
return { sortBy: 'date_created', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 }
|
||||
})
|
||||
|
||||
const searchList = computed(() => {
|
||||
if (props.table === toolsext.TABMYGOODS)
|
||||
return searchList_Beni.value
|
||||
@@ -88,6 +95,8 @@ export default defineComponent({
|
||||
return searchList_Servizi.value
|
||||
else if (props.table === toolsext.TABMYGROUPS)
|
||||
return searchList_MyGroups.value
|
||||
else if (props.table === toolsext.TABMYBACHECAS)
|
||||
return searchList_Events.value
|
||||
|
||||
return searchList_Servizi.value
|
||||
})
|
||||
@@ -107,11 +116,13 @@ export default defineComponent({
|
||||
if (props.table === toolsext.TABMYGOODS)
|
||||
return 'nome del Bene o settore da cercare'
|
||||
else if (props.table === toolsext.TABMYSKILLS)
|
||||
return 'nome del servizio o settore da cercare'
|
||||
return 'nome del Servizio o settore da cercare'
|
||||
else if (props.table === toolsext.TABMYGROUPS)
|
||||
return 'nome del gruppo da cercare'
|
||||
return 'nome del Gruppo da cercare'
|
||||
else if (props.table === toolsext.TABMYBACHECAS)
|
||||
return 'nome dell\'Evento da cercare'
|
||||
|
||||
return 'nome del gruppo da cercare'
|
||||
return 'nome da cercare'
|
||||
})
|
||||
|
||||
const visuType = computed(() => {
|
||||
@@ -121,6 +132,8 @@ export default defineComponent({
|
||||
return $q.screen.gt.xs
|
||||
else if (props.table === toolsext.TABMYGROUPS)
|
||||
return $q.screen.gt.xs
|
||||
else if (props.table === toolsext.TABMYBACHECAS)
|
||||
return $q.screen.gt.xs
|
||||
|
||||
return $q.screen.gt.xs
|
||||
})
|
||||
@@ -132,6 +145,8 @@ export default defineComponent({
|
||||
return 'Nessun Servizio trovato con i filtri selezionati'
|
||||
else if (props.table === toolsext.TABMYGROUPS)
|
||||
return 'Nessun Gruppo trovato con i filtri selezionati'
|
||||
else if (props.table === toolsext.TABMYBACHECAS)
|
||||
return 'Nessun Evento trovato con i filtri selezionati'
|
||||
|
||||
return 'Nessun dato trovato con i filtri selezionati'
|
||||
})
|
||||
@@ -341,6 +356,118 @@ export default defineComponent({
|
||||
|
||||
]
|
||||
|
||||
searchList_Events.value = [
|
||||
{
|
||||
label: 'Stato',
|
||||
table: 'statusSkills',
|
||||
key: 'idStatusSkill',
|
||||
value: 0,
|
||||
// arrvalue: tools.getCookie(tools.COOK_SEARCH + 'statusSkills', []),
|
||||
arrvalue: [],
|
||||
type: costanti.FieldType.multiselect,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
icon: 'mood',
|
||||
filteradv: true,
|
||||
},
|
||||
/*{
|
||||
label: 'Regione',
|
||||
table: 'regions',
|
||||
key: 'idReg',
|
||||
value: 0,
|
||||
type: costanti.FieldType.select,
|
||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'regions', [costanti.FILTER_TUTTI]),
|
||||
filter: null,
|
||||
useinput: true,
|
||||
},*/
|
||||
{
|
||||
label: 'Provincia',
|
||||
table: 'provinces',
|
||||
key: 'idProvince',
|
||||
type: costanti.FieldType.select,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
filter: null,
|
||||
useinput: true,
|
||||
icon: 'flag',
|
||||
},
|
||||
{
|
||||
label: 'Comune',
|
||||
table: 'cities',
|
||||
key: 'idCity',
|
||||
type: costanti.FieldType.select_by_server,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
useinput: true,
|
||||
filter: null,
|
||||
// filter: getFilterCitiesByProvince,
|
||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||
tablesel: 'cities',
|
||||
},
|
||||
{
|
||||
label: 'Offro/Cerco',
|
||||
table: 'adtypes',
|
||||
key: 'adType',
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'adtypes', costanti.FILTER_TUTTI),
|
||||
arrvalue: [],
|
||||
addall: true,
|
||||
type: costanti.FieldType.select,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
},
|
||||
{
|
||||
label: 'Data Inizio',
|
||||
table: 'caldate',
|
||||
key: 'dateTimeStart',
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'datetimestart', costanti.FILTER_TUTTI),
|
||||
arrvalue: [],
|
||||
type: costanti.FieldType.select,
|
||||
addall: true,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
},
|
||||
{
|
||||
label: 'Settore',
|
||||
table: 'sectors',
|
||||
key: 'idSector',
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'sectors', 0),
|
||||
arrvalue: [],
|
||||
type: costanti.FieldType.select,
|
||||
filter: null,
|
||||
addall: true,
|
||||
notinsearch: true,
|
||||
useinput: false,
|
||||
},
|
||||
{
|
||||
label: 'Categoria',
|
||||
table: 'skills',
|
||||
key: 'idSkill',
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + tools.getCookie(tools.COOK_SEARCH + 'sectors', costanti.FILTER_TUTTI), costanti.FILTER_TUTTI),
|
||||
arrvalue: [],
|
||||
type: costanti.FieldType.select,
|
||||
addall: true,
|
||||
filter: getFilterSkills,
|
||||
showcount: true,
|
||||
useinput: false,
|
||||
},
|
||||
{
|
||||
label: 'In cambio di',
|
||||
table: 'contribtypes',
|
||||
key: 'idContribType',
|
||||
value: 0,
|
||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'contribtypes', []),
|
||||
type: costanti.FieldType.multiselect,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
icon: 'fas fa-hand-holding',
|
||||
filteradv: true,
|
||||
//icon: 'swap_horizontal_circle',
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
searchList_Beni.value = [
|
||||
/*{
|
||||
label: 'Regione',
|
||||
@@ -649,8 +776,72 @@ export default defineComponent({
|
||||
af_objId_tab: '',
|
||||
},
|
||||
}
|
||||
} else if (props.table === toolsext.TABMYBACHECAS) {
|
||||
return {
|
||||
// Servizi
|
||||
lookup1: {
|
||||
lk_tab: 'users',
|
||||
lk_LF: 'userId',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'user',
|
||||
af_objId_tab: 'myId',
|
||||
},
|
||||
lookup2: {
|
||||
lk_tab: 'skills',
|
||||
lk_LF: 'idSkill',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'recSkill',
|
||||
af_objId_tab: '',
|
||||
lk_proj: {
|
||||
recSkill: 1,
|
||||
sector: 1,
|
||||
idSector: 1,
|
||||
idSkill: 1,
|
||||
// idSubSkill: 1,
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
idCity: 1,
|
||||
dateTimeStart: 1,
|
||||
dateTimeEnd: 1,
|
||||
numLevel: 1,
|
||||
adType: 1,
|
||||
photos: 1,
|
||||
note: 1,
|
||||
website: 1,
|
||||
//**ADDFIELD_MYSKILL
|
||||
descr: 1,
|
||||
date_created: 1,
|
||||
date_updated: 1,
|
||||
userId: 1,
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
}
|
||||
},
|
||||
lookup3: {
|
||||
lk_tab: 'sectors',
|
||||
lk_LF: 'recSkill.idSector',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'sector',
|
||||
af_objId_tab: '',
|
||||
},
|
||||
lookup5: {
|
||||
lk_tab: 'cities',
|
||||
lk_LF: 'idCity',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'mycities',
|
||||
af_objId_tab: '',
|
||||
},
|
||||
}
|
||||
|
||||
} else {
|
||||
return {
|
||||
// Servizi
|
||||
lookup1: {
|
||||
lk_tab: 'users',
|
||||
lk_LF: 'userId',
|
||||
|
||||
@@ -245,8 +245,10 @@ export default defineComponent({
|
||||
const spinner_visible = ref(false)
|
||||
const searchList = toRef(props, 'prop_searchList')
|
||||
|
||||
let actual = ''
|
||||
|
||||
let idsel = ''
|
||||
let colsel = ref(<IColGridTable | null>{ name: '', field: '' })
|
||||
let colsel = ref(<IColGridTable | null>{ name: '', field: '', sortable: false })
|
||||
let valPrec = ''
|
||||
|
||||
let separator: 'horizontal'
|
||||
@@ -261,6 +263,7 @@ export default defineComponent({
|
||||
const colVisib: any = ref([])
|
||||
const colNotVisib: any = ref([])
|
||||
const colExtra: any = ref([])
|
||||
const actualDate: any = ref(<any>null)
|
||||
|
||||
const rowclicksel = ref(<any>null)
|
||||
const colclicksel = ref(null)
|
||||
@@ -402,6 +405,7 @@ export default defineComponent({
|
||||
let filtersearch: any[] = []
|
||||
let filtersearch2: any[] = []
|
||||
let filtersearch3or: any[] = []
|
||||
let filtercustom: any[] = [...props.filtercustom]
|
||||
|
||||
let recSector = null
|
||||
let recSectorGood = null
|
||||
@@ -463,6 +467,18 @@ export default defineComponent({
|
||||
filtersearch3or.push(obj)
|
||||
}
|
||||
}
|
||||
} else if (shared_consts.TABLES_WITH_FILTER_FIELD.includes(item.table)) {
|
||||
|
||||
if (item.value) {
|
||||
if (item.value && item.value !== '' && item.value._id !== costanti.FILTER_TUTTI) {
|
||||
const myr: any = globalStore.getRecordByTableSingle(item.table, item.value)
|
||||
|
||||
if (myr) {
|
||||
filtercustom.push(myr.filter)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else if (item.value > 0) {
|
||||
objitem[item.key] = item.value
|
||||
filtersearch.push(objitem)
|
||||
@@ -564,7 +580,7 @@ export default defineComponent({
|
||||
filtersearch2: filtersearch2,
|
||||
filtersearch3or: filtersearch3or,
|
||||
// @ts-ignore
|
||||
filtercustom: props.filtercustom,
|
||||
filtercustom: filtercustom,
|
||||
sortBy: myobj,
|
||||
descending,
|
||||
userId: userStore.my._id,
|
||||
@@ -765,7 +781,7 @@ export default defineComponent({
|
||||
colsel.value = colclicksel.value
|
||||
// console.log('colsel', colsel)
|
||||
SaveValue(newVal, valinitial)
|
||||
colsel.value = { name: '', field: '' }
|
||||
colsel.value = { name: '', field: '', sortable: false }
|
||||
}
|
||||
|
||||
|
||||
@@ -889,8 +905,12 @@ export default defineComponent({
|
||||
|
||||
// console.log('DATA=', mydata.data)
|
||||
|
||||
|
||||
// @ts-ignore
|
||||
newRecord.value = props.defaultnewrec()
|
||||
if (props.defaultnewrec) {
|
||||
// @ts-ignore
|
||||
newRecord.value = props.defaultnewrec()
|
||||
}
|
||||
newRecord.value['userId'] = userStore.my._id
|
||||
newRecord.value['idapp'] = process.env.APP_ID
|
||||
// globalStore.saveTable(mydata).then(ris => console.log('RISULT', ris))
|
||||
@@ -914,6 +934,10 @@ export default defineComponent({
|
||||
function saveFieldValue(mydata: any) {
|
||||
// console.log('saveFieldValue', mydata)
|
||||
|
||||
if (newRecordBool.value){
|
||||
return false
|
||||
}
|
||||
|
||||
// Save on Server
|
||||
globalStore.saveFieldValue(mydata).then((esito) => {
|
||||
if (esito) {
|
||||
@@ -1091,7 +1115,7 @@ export default defineComponent({
|
||||
// console.log('changecol', mytable.value)
|
||||
if (!!mytable.value) {
|
||||
let arrcol = []
|
||||
let col: IColGridTable = {name: ''}
|
||||
let col: IColGridTable = {name: '', sortable: false}
|
||||
for (col of mycolumns.value) {
|
||||
if (col.field !== costanti.NOFIELD) {
|
||||
let obj = {
|
||||
@@ -1483,6 +1507,18 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function showDate(mydate: any) {
|
||||
console.log('showDate', mydate)
|
||||
const datestr = tools.getstrVeryShortDate(mydate)
|
||||
if (actualDate.value !== datestr) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
function getActualDate(mydate: any) {
|
||||
return actualDate.value
|
||||
}
|
||||
|
||||
// onMounted(mounted)
|
||||
|
||||
created()
|
||||
@@ -1568,6 +1604,10 @@ export default defineComponent({
|
||||
cmdExt,
|
||||
visupagedialog,
|
||||
myrecdialog,
|
||||
showDate,
|
||||
getActualDate,
|
||||
actualDate,
|
||||
actual,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</q-inner-loading>
|
||||
<q-table
|
||||
:grid="(myvertical === costanti.VISUTABLE_SCHEDA_USER || myvertical === 2 || myvertical === costanti.VISUTABLE_SCHEDA_GROUP)"
|
||||
:grid-header="false"
|
||||
:grid-header="(myvertical === costanti.VISUTABLE_SCHEDA_USER || myvertical === 2 || myvertical === costanti.VISUTABLE_SCHEDA_GROUP) && shared_consts.TABLES_WITH_SORTING.includes(mytable)"
|
||||
flat
|
||||
bordered
|
||||
class="my-sticky-header-table"
|
||||
@@ -57,7 +57,9 @@
|
||||
v-model:selected="selected">
|
||||
|
||||
|
||||
<template v-slot:header="props">
|
||||
<template
|
||||
v-if="!(myvertical === costanti.VISUTABLE_SCHEDA_USER || myvertical === 2 || myvertical === costanti.VISUTABLE_SCHEDA_GROUP)"
|
||||
v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th>
|
||||
</q-th>
|
||||
@@ -74,8 +76,31 @@
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-else
|
||||
v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th>
|
||||
</q-th>
|
||||
|
||||
<span v-for="col in props.cols" :key="col.name">
|
||||
<q-th
|
||||
v-if="col.sortable"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
class="text-italic text-weight-bold"
|
||||
>
|
||||
<span>
|
||||
{{ col.label }}
|
||||
</span>
|
||||
|
||||
</q-th>
|
||||
</span>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:top-right v-if="tablesList || arrfilters">
|
||||
<span style="display: none">{{actual = null}}</span>
|
||||
|
||||
<q-select
|
||||
v-if="tablesList"
|
||||
v-model="tablesel"
|
||||
@@ -99,6 +124,14 @@
|
||||
|
||||
</q-toggle>
|
||||
</div>
|
||||
|
||||
|
||||
<!--<q-input borderless dense debounce="300" v-model="filter" placeholder="Search">
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>-->
|
||||
|
||||
</template>
|
||||
|
||||
<template v-slot:top-left>
|
||||
@@ -184,12 +217,13 @@
|
||||
>
|
||||
|
||||
<template v-if="item.icon" v-slot:prepend>
|
||||
<q-icon :name="item.icon" />
|
||||
<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)) ">
|
||||
<div
|
||||
v-if="scope.opt[fieldsTable.getLabelByTable(item.table)] || (scope.opt && checkIfShowRec(scope.opt)) ">
|
||||
<q-chip
|
||||
removable
|
||||
dense
|
||||
@@ -262,9 +296,11 @@
|
||||
<div v-if="choose_visutype" class="">
|
||||
<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" label="Scheda"
|
||||
<q-radio v-if="mytable === toolsext.TAB" v-model="myvertical" :val="costanti.VISUTABLE_SCHEDA_GROUP"
|
||||
label="Scheda"
|
||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
||||
<q-radio v-else-if="mytable !== toolsext.TABMYGROUPS && !finder" v-model="myvertical" :val="costanti.VISUTABLE_SCHEDA_USER" label="Scheda"
|
||||
<q-radio v-else-if="mytable !== toolsext.TABMYGROUPS && !finder" v-model="myvertical"
|
||||
:val="costanti.VISUTABLE_SCHEDA_USER" label="Scheda"
|
||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
||||
<q-radio v-if="$q.screen.gt.xs" v-model="myvertical" :val="0" label="Tabella"
|
||||
@update:model-value="tools.setCookie('myv_' + prop_mytable, myvertical) "/>
|
||||
@@ -317,17 +353,28 @@
|
||||
</template>
|
||||
|
||||
<template v-slot:item="props">
|
||||
<div v-if="showType === costanti.SHOW_MYCARD || (myvertical === costanti.VISUTABLE_LISTA && shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel)) ">
|
||||
<div
|
||||
v-if="showType === costanti.SHOW_MYCARD || (myvertical === costanti.VISUTABLE_LISTA && shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel)) ">
|
||||
|
||||
<div v-if="props.row && shared_consts.TABLES_WITH_DATE.includes(tablesel)">
|
||||
|
||||
<div v-if="props.row.dateTimeStart && (tools.getstrVeryShortDate(props.row.dateTimeStart) !== actual)" class="actualdate">
|
||||
<span style="display: none">{{actual = tools.getstrVeryShortDate(props.row.dateTimeStart)}}</span>
|
||||
<q-chip class="text-center shadow-5 glossy bg-orange" icon="fas fa-calendar-day">{{tools.getstrDateLong(props.row.dateTimeStart) }}</q-chip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CMyRecCard
|
||||
:table="tablesel"
|
||||
:prop_myrec="props.row"
|
||||
@cmdext="cmdExt"
|
||||
:visu="visufind"
|
||||
>
|
||||
</CMyRecCard>
|
||||
|
||||
</div>
|
||||
<div v-else-if="((showType === costanti.SHOW_USERINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_USER) || ((myvertical === 2) && (shared_consts.TABLES_VISU_LISTA_USER.includes(tablesel)))" class="fill-all-width">
|
||||
<div
|
||||
v-else-if="((showType === costanti.SHOW_USERINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_USER) || ((myvertical === 2) && (shared_consts.TABLES_VISU_LISTA_USER.includes(tablesel)))"
|
||||
class="fill-all-width">
|
||||
<div>
|
||||
<CMyUser
|
||||
:mycontact="props.row"
|
||||
@@ -352,7 +399,9 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else-if="((showType === costanti.SHOW_GROUPINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_GROUP) || ((myvertical === 2) && (tablesel === 'mygroups'))" class="fill-all-width">
|
||||
<div
|
||||
v-else-if="((showType === costanti.SHOW_GROUPINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_GROUP) || ((myvertical === 2) && (tablesel === 'mygroups'))"
|
||||
class="fill-all-width">
|
||||
<div>
|
||||
|
||||
<CMyGroups
|
||||
@@ -374,7 +423,8 @@
|
||||
style="background: radial-gradient(circle, #ffffff 0%, #bbddff 100%)">
|
||||
<q-bar v-if="!visuinpage && canModifyThisRec(props.row)" dense class="bg-primary text-white full-height">
|
||||
<q-badge v-if="props.row['adType']" :color="fieldsTable.getColByAdType(props.row['adType'])">
|
||||
{{ fieldsTable.getValByTabAndId(tablesel, 'adType', props.row['adType']) }}<q-icon :name="fieldsTable.getIconByAdType(props.row['adType'])" color="white" class="q-ml-xs" />
|
||||
{{ fieldsTable.getValByTabAndId(tablesel, 'adType', props.row['adType']) }}
|
||||
<q-icon :name="fieldsTable.getIconByAdType(props.row['adType'])" color="white" class="q-ml-xs"/>
|
||||
</q-badge>
|
||||
|
||||
<q-space/>
|
||||
@@ -397,10 +447,13 @@
|
||||
<q-card-section class="">
|
||||
<q-list dense>
|
||||
<div v-for="col in mycolumns" :key="col.name">
|
||||
<q-item v-if="showColCheck(col, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(props.row,col.field, col.subfield))"
|
||||
:class="clByCol(col)" class="riduci_pad">
|
||||
<q-item
|
||||
v-if="showColCheck(col, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(props.row,col.field, col.subfield))"
|
||||
:class="clByCol(col)" class="riduci_pad">
|
||||
<q-item-section avatar v-if="col.icon">
|
||||
<q-item-label class="q-table__col"><q-icon :name="col.icon"></q-icon></q-item-label>
|
||||
<q-item-label class="q-table__col">
|
||||
<q-icon :name="col.icon"></q-icon>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section avatar v-if="visuIntestazCol(col)">
|
||||
@@ -501,7 +554,8 @@
|
||||
v-for="col in mycolumns" :key="col.name" class="newrec_fields">
|
||||
|
||||
<div class="text-center q-my-xs" v-if="(col.fieldtype === costanti.FieldType.separator)">
|
||||
<q-btn color="primary" size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'" label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||
<q-btn color="primary" size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'"
|
||||
label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||
</div>
|
||||
<div
|
||||
v-if="showColCheck(col, tools.TIPOVIS_NEW_RECORD, true, 0, newRecord) && col.foredit ">
|
||||
@@ -546,7 +600,8 @@
|
||||
<div
|
||||
v-for="col in mycolumns" :key="col.name">
|
||||
<div class="text-center q-my-xs" v-if="(col.fieldtype === costanti.FieldType.separator)">
|
||||
<q-btn color="primary" size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'" label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||
<q-btn color="primary" size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'"
|
||||
label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="showColCheck(col, tools.TIPOVIS_EDIT_RECORD, false) && col.foredit">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="row q-ma-xs shadow justify-center" style="border-radius: 4px;border: 1px solid rgba(0, 0, 0, 0.12);">
|
||||
<div class="row q-ma-sm shadow justify-center" style="border-radius: 4px;border: 1px solid rgba(0, 0, 0, 0.12);">
|
||||
<CBigBtn
|
||||
v-for="(card, ind) of cardsbig" :key="ind"
|
||||
:label="card.title" :to="card.to" :icon="card.icon" :color="card.color" :text-color="!!card.textcolor ? card.textcolor : ''"
|
||||
|
||||
@@ -44,3 +44,84 @@
|
||||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
$graytext: #555;
|
||||
.cal {
|
||||
color: black;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.25rem;
|
||||
letter-spacing: 0.03333em;
|
||||
|
||||
&__title {
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
&__details {
|
||||
color: black;
|
||||
}
|
||||
|
||||
&__hours {
|
||||
color: blue;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
&__where {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;
|
||||
}
|
||||
}
|
||||
|
||||
&__when {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;;
|
||||
}
|
||||
}
|
||||
|
||||
&__teacher {
|
||||
margin-top: 5px;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;;
|
||||
}
|
||||
}
|
||||
|
||||
&__quota {
|
||||
margin-top: 5px;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&__img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
|
||||
<q-img
|
||||
v-if="tools.getValue(myrec, 'photos', '')"
|
||||
:src="tools.getFullFileName(tools.getValue(myrec, 'photos', ''), table, myrec.username)" class="img" alt="immagine bene"></q-img>
|
||||
:src="tools.getFullFileName(tools.getValue(myrec, 'photos', ''), table, myrec.username)" class="img"
|
||||
alt="immagine bene"></q-img>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
@@ -46,6 +47,23 @@
|
||||
{{ tools.getValue(myrec, mycol.field, mycol.subfield) }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="mycol.name === 'dateTimeStart'" class="text-center cal">
|
||||
|
||||
<div v-if="myrec.dateTimeStart" class="cal__when">
|
||||
<span class="cal__where-title">{{ $t('cal.when') }}:</span>
|
||||
<span v-html="tools.getstrDateTimeEvent(t, myrec, true)"></span>
|
||||
</div>
|
||||
<!--
|
||||
<span class="dateevent" v-if="myrec.dateTimeStart">dal <span class="datainizio">{{
|
||||
tools.getstrVeryShortDate(myrec.dateTimeStart)
|
||||
}}</span> al <span class="datafine">{{ tools.getstrVeryShortDate(myrec.dateTimeEnd) }}</span>
|
||||
</span>--->
|
||||
</div>
|
||||
<div v-else-if="mycol.name === 'dateTimeEnd'">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<CMyFieldRec
|
||||
v-else
|
||||
:table="table"
|
||||
|
||||
@@ -433,8 +433,10 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function savefield(value: any, initialval: any, myq: any) {
|
||||
myvalue.value = value
|
||||
setValDb(myq, props.field, myvalue.value, props.type, props.serv, props.table, props.subfield, props.id, props.indrec, props.mysubsubkey)
|
||||
if (!props.insertMode) {
|
||||
myvalue.value = value
|
||||
setValDb(myq, props.field, myvalue.value, props.type, props.serv, props.table, props.subfield, props.id, props.indrec, props.mysubsubkey)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,3 +2,25 @@
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.text_user_city{
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
font-size: 0.85rem;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
|
||||
.actualdate{
|
||||
|
||||
}
|
||||
|
||||
|
||||
.cardrec{
|
||||
@media (min-width: 500px) {
|
||||
margin: 1px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<template>
|
||||
<div class="q-py-xs centermydiv" :style="`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-section v-if="(table === toolsext.TABMYGOODS) && (myrec.photos.length > 0)" avatar @click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)">
|
||||
|
||||
<q-item-section v-if="(table === toolsext.TABMYGOODS) && (myrec.photos.length > 0)" avatar
|
||||
@click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)">
|
||||
<q-avatar size="60px">
|
||||
<q-img :src="tools.getFullFileName(myrec.photos, table, myrec.username)" :alt="myrec.descr" img-class="imgprofile" height="60px"/>
|
||||
<q-img :src="tools.getFullFileName(myrec.photos, table, myrec.username)" :alt="myrec.descr"
|
||||
img-class="imgprofile" height="60px"/>
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
<q-item-section v-else avatar @click="naviga(`/my/` + myrec.username)">
|
||||
@@ -27,11 +30,12 @@
|
||||
dense
|
||||
class="text-center shadow-5 glossy bg-green chipmodif">{{ rec.descr }}</q-chip></span>
|
||||
|
||||
<!--<span> - {{ myrec.profile.qualifica }}</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>-->
|
||||
</q-item-label>
|
||||
<q-item-label lines="3" v-if="myrec.descr">{{ myrec.descr }}<br>
|
||||
</q-item-label>
|
||||
<q-item-label overline lines="1" style="text-align: right">
|
||||
<q-item-label lines="1" style="text-align: right" class="text_user_city">
|
||||
<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>
|
||||
</q-item-label>
|
||||
@@ -39,16 +43,22 @@
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="myrec.userId === userStore.my._id">
|
||||
<q-item-label>
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-btn rounded icon="fas fa-pencil-alt">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-pencil-alt" v-close-popup
|
||||
<q-item clickable v-close-popup
|
||||
@click="cmdExt(costanti.CMD_MODIFY, myrec._id)">
|
||||
<q-item-section side>
|
||||
<q-icon name="fas fa-pencil-alt"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('reg.edit') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-trash-alt" v-close-popup @click="cmdExt(costanti.CMD_DELETE, myrec._id)">
|
||||
<q-item clickable v-close-popup @click="cmdExt(costanti.CMD_DELETE, myrec._id)">
|
||||
<q-item-section side>
|
||||
<q-icon name="fas fa-trash-alt"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('reg.elimina') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
@@ -52,6 +52,8 @@ export default defineComponent({
|
||||
|
||||
function mounted() {
|
||||
ricarica()
|
||||
|
||||
globalStore.getStatSite()
|
||||
}
|
||||
|
||||
async function ricarica() {
|
||||
|
||||
@@ -345,21 +345,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function getappname() {
|
||||
let mystr = ''
|
||||
if (tools.isTest()){
|
||||
mystr = getAppVersion()
|
||||
} else {
|
||||
let mystr = tools.getsuffisso() + tools.getappname(tools.isMobile())
|
||||
if (!tools.isMobile()) {
|
||||
//if (!tools.isMobile()) {
|
||||
mystr += ' ' + getAppVersion()
|
||||
//}
|
||||
} else {
|
||||
mystr = ''
|
||||
}
|
||||
}
|
||||
|
||||
return mystr
|
||||
return tools.getappname(tools.isMobile()) + ' ' + getAppVersion()
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user