Riattivato il Calendario (ma ancora non lo rendo visibile)

aggiunto campi: DateTimeStart e DateTimeEnd negli Eventi
Aggiunto Filtro Data
This commit is contained in:
paoloar77
2022-02-24 19:13:06 +01:00
parent 7b3a5a2ba8
commit 430408f7bf
64 changed files with 1061 additions and 473 deletions

View File

@@ -75,7 +75,7 @@ export default {
.then((loadstorage: any) => {
if (loadstorage) {
if ($q.screen.gt.xs) {
if ($q.screen.gt.sm) {
globalStore.setleftDrawerOpen(true)
}

View File

@@ -1,7 +1,7 @@
import axios from 'axios'
import { boot } from 'quasar/wrappers'
// const api = axios.create({ baseURL: 'https://api.example.com' })
const api = axios.create({ baseURL: process.env.MONGODB_HOST })
export default boot(({ app }) => {
// for use inside Vue files (Options API) through this.$axios and this.$api
@@ -10,7 +10,7 @@ export default boot(({ app }) => {
// ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
// so you won't necessarily have to import axios in each vue file
// app.config.globalProperties.$api = api
app.config.globalProperties.$api = api
// ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
// so you can easily perform requests against your app's API
//

View File

@@ -1,7 +1,7 @@
import { boot } from 'quasar/wrappers'
// @ts-ignore
import Plugin from '@quasar/quasar-ui-qcalendar/src/QCalendarDay.js'
// import '@quasar/quasar-ui-qcalendar/src/css/calendar-day.sass'
import Plugin from '@quasar/quasar-ui-qcalendar/src/QCalendarMonth'
import '@quasar/quasar-ui-qcalendar/dist/index.css'
export default boot(({ app }) => {
app.use(Plugin)

View File

@@ -91,6 +91,9 @@ export const shared_consts = {
TABLES_USER_INCLUDE_MY: ['mygroups'],
TABLES_GETCOMPLETEREC: ['myskills', 'mybachecas', 'mygoods'],
TABLES_WITH_FILTER_FIELD: ['caldate'],
TABLES_WITH_DATE: ['mybachecas'],
TABLES_WITH_SORTING: ['mybachecas'],
TABLES_PERM_NEWREC: ['skills', 'goods', 'subskills', 'mygroups'],
TABLES_REC_ID: ['skills', 'goods', 'subskills'],

View File

@@ -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%;
}

View File

@@ -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>

View File

@@ -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',

View File

@@ -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,
}
}
})

View File

@@ -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">

View File

@@ -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 : ''"

View File

@@ -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;
}
}

View File

@@ -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"

View File

@@ -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)
}
}

View File

@@ -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;
}
}

View File

@@ -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>

View File

@@ -52,6 +52,8 @@ export default defineComponent({
function mounted() {
ricarica()
globalStore.getStatSite()
}
async function ricarica() {

View File

@@ -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()
}

View File

@@ -953,3 +953,19 @@ $heightBtn: 100%;
border: 1px solid #bbb;
border-radius: $generic-border-radius
}
.dateevent{
border-radius: 16px;
border: red solid 2px;
padding: 3px;
text-align: right;
font-style: italic;
margin-left: 5px;
font-size: 0.85rem;
color: darkblue;
}
.datainizio, .datafine{
font-weight: bold;
}

View File

@@ -1,7 +1,7 @@
const msg_website_enUs = {
ws: {
sitename: 'InsiemeSiPuò',
siteshortname: 'InsiemeSiPuò',
siteshortname: 'ISP',
botname: 'InsiemeSiPuò BOT',
},
pages: {

View File

@@ -1,7 +1,7 @@
const msg_website_es = {
ws: {
sitename: 'InsiemeSiPuò',
siteshortname: 'InsiemeSiPuò',
siteshortname: 'ISP',
botname: 'InsiemeSiPuò BOT',
},
pages: {

View File

@@ -1,7 +1,7 @@
const msg_website_fr = {
ws: {
sitename: 'InsiemeSiPuò',
siteshortname: 'InsiemeSiPuò',
siteshortname: 'ISP',
botname: 'InsiemeSiPuò BOT',
},
homepage: {

View File

@@ -1,7 +1,7 @@
const msg_website_it = {
ws: {
sitename: 'InsiemeSiPuò',
siteshortname: 'InsiemeSiPuò',
siteshortname: 'ISP',
botname: 'il Bot di InsiemeSiPuò',
},
products: {

View File

@@ -1,7 +1,7 @@
const msg_website_pt = {
ws: {
sitename: 'InsiemeSiPuò',
siteshortname: 'InsiemeSiPuò',
siteshortname: 'ISP',
botname: 'InsiemeSiPuò BOT',
},
pages: {

View File

@@ -1,7 +1,7 @@
const msg_website_si = {
ws: {
sitename: 'InsiemeSiPuò',
siteshortname: 'InsiemeSiPuò',
siteshortname: 'ISP',
botname: 'InsiemeSiPuò BOT',
},
pages: {

View File

@@ -379,17 +379,6 @@ const baseroutes: IListRoutes[] = [
inmenu: true,
infooter: true,
},
{
active: false,
order: 100,
path: '/bacheca',
materialIcon: 'fas fa-bullhorn',
name: 'mypages.bacheca',
component: () => import('@/root/bacheca/bacheca.vue'),
meta: { requiresAuth: true },
inmenu: false,
infooter: false,
},
{
active: true,
order: 12,
@@ -412,6 +401,17 @@ const baseroutes: IListRoutes[] = [
inmenu: true,
infooter: true,
},
{
active: true,
order: 20,
path: '/events',
materialIcon: 'fas fa-bullhorn',
name: 'mypages.events',
component: () => import('@/root/eventi/eventi.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: false,
},
/*{
active: true,
order: 100,
@@ -648,7 +648,7 @@ const baseroutes: IListRoutes[] = [
inmenu: true,
},
{
active: false,
active: true,
order: 80,
path: '/calendario-eventi',
materialIcon: 'event',

View File

@@ -4,10 +4,40 @@ import {
IDepartment, IProducer, IShareWithUs, IStorehouse,
} from '@src/model/Products'
import { IUserFields, IUserProfile } from '@src/model/UserStore'
export interface IPost {
title: string
}
export interface ICheckUser {
verified_email?: boolean
teleg_id?: number
profile?: IUserProfile
}
export interface INotData {
num_reg?: number
num_passeggeri?: number
num_imbarcati?: number
email_non_verif?: number
num_teleg_attivo?: number
num_teleg_pending?: number
num_part_zoom?: number
num_part_accepted?: number
num_modalita_pagamento?: number
arr_nations?: string
lastsreg?: IUserFields[]
checkuser?: ICheckUser | any
numreg_untilday?: number
reg_daily?: string
imbarcati_daily?: string
imbarcati_weekly?: string
reg_weekly?: string
}
export interface IConnData {
downloading_server: number
downloading_indexeddb: number
@@ -270,6 +300,7 @@ export interface IGlobalState {
sectorgoods: ISectorGood[],
catgrps: ICatGrp[],
cities: ICity[],
datastat?: INotData
}
export interface IMenuList {
@@ -509,6 +540,7 @@ export interface IColGridTable {
askaction?: string
foredit?: boolean
fieldtype?: number
fieldtype_real?: number
field_outtype?: number
noshowlabel?: boolean
tipovisu?: number
@@ -751,6 +783,8 @@ export interface IMyBacheca {
// idSubSkill: number[]
idStatusSkill: number[]
idContribType: string[]
dateTimeStart: Date
dateTimeEnd: Date
idCity: number[]
photos: IGallery[]
NumLevel: number
@@ -763,3 +797,4 @@ export interface IMyBacheca {
date_updated?: Date,
}

View File

@@ -1,32 +0,0 @@
import { IUserFields, IUserProfile } from '@src/model/UserStore'
export interface ICheckUser {
verified_email?: boolean
verified_by_aportador?: boolean
teleg_id?: number
profile?: IUserProfile
}
export interface INotData {
num_reg?: number
num_passeggeri?: number
num_imbarcati?: number
email_non_verif?: number
num_teleg_attivo?: number
num_teleg_pending?: number
num_part_zoom?: number
num_part_accepted?: number
num_modalita_pagamento?: number
arr_nations?: string
lastsreg?: IUserFields[]
checkuser?: ICheckUser | any
numreg_untilday?: number
reg_daily?: string
imbarcati_daily?: string
imbarcati_weekly?: string
reg_weekly?: string
}
export interface INotevoleState {
datastat: INotData
}

View File

@@ -1,5 +1,4 @@
export * from './UserStore'
export * from './NotevoleStore'
export * from './MessageStore'
export * from './GlobalStore'
export * from './signin-option'

View File

@@ -22,7 +22,7 @@ import MixinUsers from '@/mixins/mixin-users'
import { colmyBachecas } from '@store/Modules/fieldsTable'
export default defineComponent({
name: 'bacheca',
name: 'eventi',
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage },
setup() {
const globalStore = useGlobalStore()

View File

@@ -4,7 +4,7 @@
<div v-if="isLogged()">
<div v-if="isUserOk()">
<CTitlePage :ind="0" />
<CTitlePage :ind="4" />
<CFinder
:table="toolsext.TABMYBACHECAS">
@@ -23,8 +23,8 @@
</q-page>
</template>
<script lang="ts" src="./bacheca.ts">
<script lang="ts" src="./eventi.ts">
</script>
<style lang="scss" scoped>
@import './bacheca.scss';
@import './eventi.scss';
</style>

View File

@@ -512,6 +512,7 @@ const msg_it = {
photo: 'Foto',
images: 'Immagini',
image: 'Immagine',
date: 'Data',
date_created: 'Creato il',
err: {
required: 'è richiesto',
@@ -622,8 +623,8 @@ const msg_it = {
newproj: 'Titolo Progetto',
newsubproj: 'Titolo Sotto-Progetto',
insertbottom: 'Inserisci Nuovo Project',
shortdescr: 'Breve Descrizione',
longdescr: 'Descrizione',
shortdescr: 'Descrizione',
longdescr: 'Testo',
note: 'Note',
hoursplanned: 'Ore Preventivate',
hoursadded: 'Ore Aggiuntive',
@@ -720,6 +721,7 @@ const msg_it = {
title: 'Titolo',
details: 'Dettagli',
bodytext: 'Testo Evento',
dateCreated: 'Data Inserimento',
dateTimeStart: 'Data Inizio',
dateTimeEnd: 'Data Fine',
bgcolor: 'Colore Sfondo',
@@ -881,6 +883,7 @@ const msg_it = {
friends: 'Amici',
bacheca: 'Bacheca',
services: 'Servizi',
events: 'Eventi',
goods: 'Beni',
test: 'Test',
groups: 'Gruppi',

View File

@@ -43,15 +43,17 @@ export const addAuthHeaders = () => {
// axiosInstance.defaults.headers.Authorization = `Bearer ${LoginModule.userInfos.userToken}`
}
export const removeAuthHeaders = () => {
delete axiosInstance.defaults.headers.Authorization
}
//export const removeAuthHeaders = () => {
// delete axiosInstance.defaults.headers.Authorization
//}
async function Request(type: string, path: string, payload: any): Promise<Types.AxiosSuccess | Types.AxiosError | undefined> {
let ricevuto = false
const userStore = useUserStore()
const globalStore = useGlobalStore()
try {
if (tools.isDebug()) console.log('Axios Request', path, type, tools.notshowPwd(payload))
let response: AxiosResponse
@@ -102,7 +104,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
}
return new Types.AxiosSuccess(response.data, response.status)
} if (type === 'get' || type === 'delete') {
} else if (type === 'get' || type === 'delete') {
// @ts-ignore
response = await axiosInstance[type](path, {
baseURL: globalStore.getServerHost(),
@@ -114,7 +116,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
})
ricevuto = true
return new Types.AxiosSuccess(response.data, response.status)
} if (type === 'postFormData') {
} else if (type === 'postFormData') {
response = await axiosInstance.post(path, payload, {
baseURL: globalStore.getServerHost(),
headers: {

View File

@@ -4,7 +4,7 @@ import { useUserStore } from '@store/UserStore'
export * from './ApiTypes'
import axios from 'axios'
export { addAuthHeaders, removeAuthHeaders, API_URL } from './Instance'
export { addAuthHeaders, API_URL } from './Instance'
// import {AlgoliaSearch} from './AlgoliaController'
import Paths from '@paths'
import { tools } from '@src/store/Modules/tools'

View File

@@ -45,12 +45,12 @@ export const costanti = {
disable: true,
},
{
title: 'Alimenti',
to: '/foods',
icon: 'fas fa-utensils',
color: 'green-5',
hint: '',
disable: true,
title: 'Eventi',
to: '/events',
icon: 'event',
color: 'green',
hint: 'eventi, last minute, offerte di lavoro',
disable: false,
},
{
title: 'Luoghi',
@@ -71,11 +71,11 @@ export const costanti = {
small: true,
},
{
title: 'Eventi',
to: '/bacheca',
icon: 'event',
title: 'Help',
to: '/help',
icon: 'fas fa-users',
color: 'green-7',
hint: 'eventi, last minute, offerte di lavoro',
hint: '',
disable: true,
small: true,
},

View File

@@ -69,6 +69,7 @@ function AddCol(params: IColGridTable) {
action: (params.action === undefined) ? '' : params.action,
foredit: (params.foredit === undefined) ? true : params.foredit,
fieldtype: (params.fieldtype === undefined) ? costanti.FieldType.string : params.fieldtype,
fieldtype_real: (params.fieldtype_real === undefined) ? ((params.fieldtype === undefined) ? costanti.FieldType.string : params.fieldtype) : params.fieldtype_real,
field_outtype: (params.field_outtype === undefined) ? costanti.FieldType.string : params.field_outtype,
tipovisu: (params.tipovisu === undefined) ? costanti.TipoVisu.TESTO : params.tipovisu,
link: (params.link === undefined) ? '' : params.link,
@@ -557,6 +558,11 @@ export const colmyUserGroup = [
jointable: 'friendsandme',
field_outtype: costanti.FieldType.object,
}),
AddCol({ name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
required: false,
visible: false,
sortable: true,
showWhen: 0}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
@@ -579,7 +585,9 @@ export const colmyUserGroup = [
}),
AddCol({
name: 'date_created', label_trans: 'reg.date_created', fieldtype: costanti.FieldType.onlydate,
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist
showWhen: costanti.showWhen.InPage + costanti.showWhen.InView_OnlyifExist,
visible: false,
required: false,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
@@ -630,8 +638,9 @@ export const colmyGoods = [
fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
maxlength: 200,
maxlength: 90,
required: true,
sortable: false,
}),
AddCol({
name: 'idSectorGood',
@@ -678,6 +687,11 @@ export const colmyGoods = [
//icon: 'fas fa-hands-helping',
// isadvanced_field: true,
}),
AddCol({ name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
required: false,
visible: false,
sortable: true,
showWhen: 0}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
@@ -778,8 +792,9 @@ export const colmySkills = [
fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
maxlength: 200,
maxlength: 90,
required: true,
sortable: false,
}),
AddCol({
name: 'idSector',
@@ -822,6 +837,8 @@ export const colmySkills = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
}),
/*AddCol({
name: 'idSubSkill',
label_trans: 'skill.subskill',
@@ -850,6 +867,11 @@ export const colmySkills = [
icon: 'grading',
isadvanced_field: true,
}),
AddCol({ name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
required: false,
visible: false,
sortable: true,
showWhen: 0}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
@@ -885,6 +907,7 @@ export const colmyBachecas = [
noshowlabel: true,
icon: 'mood',
isadvanced_field: true,
sortable: false,
}),
AddCol({
@@ -896,6 +919,7 @@ export const colmyBachecas = [
link: '/my/username',
noshowlabel: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
sortable: false,
}),
AddCol({
name: 'idCity',
@@ -909,6 +933,7 @@ export const colmyBachecas = [
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
sortable: false,
}),
AddCol({
name: 'adType',
@@ -919,15 +944,39 @@ export const colmyBachecas = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
icon: 'fas fa-bullhorn',
noshowlabel: true,
sortable: false,
}),
AddCol(
{
name: 'dateTimeStart',
label_trans: 'event.dateTimeStart',
// jointable: toolsext.TABCALALLDATE,
fieldtype: costanti.FieldType.date,
// fieldtype: costanti.FieldType.select,
// fieldtype_real: costanti.FieldType.onlydate,
// fieldtype: costanti.FieldType.onlydate,
icon: 'fas fa-calendar-day',
}),
AddCol(
{
name: 'dateTimeEnd',
label_trans: 'event.dateTimeEnd',
fieldtype: costanti.FieldType.date,
// jointable: toolsext.TABCALALLDATE,
// fieldtype: costanti.FieldType.select,
// fieldtype_real: costanti.FieldType.onlydate,
icon: 'fas fa-calendar-day',
sortable: false,
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
maxlength: 200,
maxlength: 90,
required: true,
sortable: false,
}),
AddCol({
name: 'idSector',
@@ -938,6 +987,7 @@ export const colmyBachecas = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: true,
icon: 'category',
sortable: false,
}),
AddCol({
name: 'idSkill',
@@ -951,6 +1001,7 @@ export const colmyBachecas = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
allowNewValue: false,
required: false,
sortable: false,
}),
AddCol({
name: 'idContribType',
@@ -962,15 +1013,21 @@ export const colmyBachecas = [
icon: 'fas fa-hand-holding',
//icon: 'fas fa-hands-helping',
isadvanced_field: false,
sortable: false,
}),
AddCol({
/*AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
}),
sortable: false,
}),*/
AddCol({ name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
required: false,
visible: false,
sortable: true,
showWhen: 0}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
@@ -979,17 +1036,20 @@ export const colmyBachecas = [
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true,
sortable: false,
}),
//**ADDFIELD_MYBACHECAS
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
}),
AddCol(DuplicateRec),
AddCol(ModifRec),
@@ -1291,6 +1351,12 @@ const colTablePermission = [
AddCol(DuplicateRec),
]
const colCalDate = [
AddCol({ name: '_id', label_trans: 'rec.date', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'datestr', label_trans: 'reg.date', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'filter', label_trans: 'reg.filter', fieldtype: costanti.FieldType.object }),
]
const colTableGeneric = [
AddCol({ name: 'value', label_trans: 'others.value' }),
AddCol({ name: 'label', label_trans: 'proj.longdescr' }),
@@ -1445,7 +1511,7 @@ export const colTableUsersBase = [
AddCol(DuplicateRec),
]
// IColGridTable
// IColGridTable
export const colTableUsers = [
// AddCol({ name: '_id', label_trans: 'reg.id' }),
AddCol({ name: 'index', label_trans: 'reg.index', fieldtype: costanti.FieldType.number }),
@@ -1973,6 +2039,7 @@ export const colTableUsersISP = [
}),
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'useragent', label_trans: 'reg.useragent', fieldtype: costanti.FieldType.string }),
AddCol({
name: 'perm',
label_trans: 'reg.perm',
@@ -2434,6 +2501,22 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'descr',
},
{
value: toolsext.TABCALDATE,
label: 'Date',
columns: colCalDate,
colkey: '_id',
collabel: 'datestr',
noshow: true,
},
{
value: toolsext.TABCALALLDATE,
label: 'Date',
columns: colCalDate,
colkey: '_id',
collabel: 'datestr',
noshow: true,
},
/*{
value: 'subskills',
label: 'Specializzazione',

View File

@@ -15,6 +15,8 @@ import {
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery,
} from '@model'
import { addToDate } from '@quasar/quasar-ui-qcalendar'
import { lists } from '@store/Modules/lists'
import { costanti } from '@store/Modules/costanti'
import { copyToClipboard, date, Screen, useQuasar, colors, Cookies, scroll } from 'quasar'
@@ -2842,6 +2844,7 @@ export const tools = {
},
addDays(mydate: Date, days: number) {
//++ addToDate ?
return date.addToDate(mydate, { days })
},
@@ -4944,7 +4947,6 @@ export const tools = {
_id: 0,
idSector: 0,
idSkill: 0,
// idSubSkill: [],
idStatusSkill: [],
idContribType: [],
idCity: [],
@@ -4997,9 +4999,10 @@ export const tools = {
_id: 0,
idSector: 0,
idSkill: 0,
// idSubSkill: [],
idStatusSkill: [],
idContribType: [],
dateTimeStart: new Date(),
dateTimeEnd: new Date(),
idCity: [],
NumLevel: 0,
adType: 0,

View File

@@ -63,6 +63,8 @@ export const toolsext = {
TABMYSKILLS: 'myskills',
TABMYGOODS: 'mygoods',
TABMYBACHECAS: 'mybachecas',
TABCALDATE: 'caldate',
TABCALALLDATE: 'calalldate',
TABNAVI: 'navi',
TABLISTAINGRESSO: 'listaingressos',
TABGRADUATORIA: 'graduatorias',

View File

@@ -799,7 +799,7 @@ export const useUserStore = defineStore('UserStore', {
if (isLogged) {
// console.log('this.isLogged', this.isLogged)
globalStore.setleftDrawerOpen(localStorage.getItem(toolsext.localStorage.leftDrawerOpen) === 'true')
// globalStore.setleftDrawerOpen(localStorage.getItem(toolsext.localStorage.leftDrawerOpen) === 'true')
globalStore.setCategorySel(localStorage.getItem(toolsext.localStorage.categorySel))
globalStore.checkUpdates()

View File

@@ -1351,11 +1351,20 @@ export const useGlobalStore = defineStore('GlobalStore', {
return []
},
getValueByTable(col: IColGridTable, val: any) {
if (col.jointable) {
const mylist = this.getTableJoinByName(col.jointable)
const key = fieldsTable.getKeyByTable(col.jointable)
const collab = fieldsTable.getLabelByTable(col.jointable)
getRecordByTableSingle(table: string, val: any) {
if (table) {
const mylist = this.getTableJoinByName(table)
const key = fieldsTable.getKeyByTable(table)
return mylist.find((myrec: any) => myrec[key] === val)
}
},
getValueByTableSingle(table: string, val: any) {
if (table) {
const mylist = this.getTableJoinByName(table)
const key = fieldsTable.getKeyByTable(table)
const collab = fieldsTable.getLabelByTable(table)
// console.table(mylist)
let risultato = ''
@@ -1378,6 +1387,11 @@ export const useGlobalStore = defineStore('GlobalStore', {
return ''
},
getValueByTable(col: IColGridTable, val: any) {
return this.getValueByTableSingle(col.jointable!, val)
},
getMultiValueByTable(col: IColGridTable, arrval: any) {
// console.log('getMultiValueByTable')
if (col.jointable) {
@@ -1400,18 +1414,81 @@ export const useGlobalStore = defineStore('GlobalStore', {
return ''
},
async getStatSite() {
const userStore = useUserStore()
const paramquery = {
locale: tools.getLocale(),
username: userStore.my.username
}
return Api.SendReq('/site/load', 'POST', paramquery)
.then((res) => {
console.log('res', res)
this.datastat = res.data.datastat
return this.datastat
}).catch((error) => {
return null
})
},
getItemDate(num: number, day: number, mystr: string) {
let mydate = tools.addDays(tools.getDateNow(), day);
let mydateend = tools.addDays(mydate, 7);
mydate = tools.getstrYYMMDDDate(mydate)
mydateend = tools.getstrYYMMDDDate(mydateend)
let filter = { dateTimeStart: {$gte: mydate, $lte: mydateend } }
let obj = {_id: num, datestr: mystr, filter }
return obj
},
getArrDateEvent() {
const arr = []
let obj = {}
arr.push(this.getItemDate(1, -7, 'Settimana Scorsa'))
arr.push(this.getItemDate(2, 0, 'Da Oggi a 7 gg.'))
arr.push(this.getItemDate(3, 7, 'La settimana prossima'))
// console.log('Days', arr)
return arr
},
getArrAllDateEvent() {
const arr = []
let obj = {}
for (let i = 0; i < 120; i++) {
let mydate = tools.addDays(tools.getDateNow(), i - 30);
obj ={_id: mydate, datestr: tools.getstrVeryShortDate(mydate) }
arr.push(obj)
}
// console.log('Days', arr)
return arr
},
getTableJoinByName(table: string, addall?: boolean, filter?: any) {
if (table === 'permissions') return [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Tutor, shared_consts.Permissions.Editor, shared_consts.Permissions.Zoomeri, shared_consts.Permissions.Department]
if (table === 'accepted') return [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
if (table === 'fieldstype') return costanti.FieldTypeArr
if (table === 'metodo_pagamento') return tools.SelectMetodiPagamento
if (table === 'bottype') return shared_consts.BotType
if (table === 'visibility') return shared_consts.Visibility
if (table === 'visibilGroup') return shared_consts.VisibilGroup
if (table === 'lang') return shared_consts.Lang
if (table === 'regions') return shared_consts.Regions
if (table === 'provinces') return shared_consts.Provinces
if (table === 'shippings') return shared_consts.Shippings
else if (table === 'accepted') return [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
else if (table === 'fieldstype') return costanti.FieldTypeArr
else if (table === 'metodo_pagamento') return tools.SelectMetodiPagamento
else if (table === 'bottype') return shared_consts.BotType
else if (table === 'visibility') return shared_consts.Visibility
else if (table === 'visibilGroup') return shared_consts.VisibilGroup
else if (table === 'lang') return shared_consts.Lang
else if (table === 'regions') return shared_consts.Regions
else if (table === 'provinces') return shared_consts.Provinces
else if (table === 'shippings') return shared_consts.Shippings
else if (table === toolsext.TABCALDATE) return this.getArrDateEvent()
else if (table === toolsext.TABCALALLDATE) return this.getArrAllDateEvent()
let myarr = this.getListByTable(table)