Ver 0.2.8
Added msg Server error in every pages Nuovo Gruppo non funziona. Corretto altre funzioni del Gruppo Errore del server" Network Error", fare pagina test con altri host per vedere se da lo stesso msg, con IP
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.7"
|
APP_VERSION="0.2.8"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
@@ -26,3 +26,4 @@ TELEGRAM_SUPPORT=""
|
|||||||
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
||||||
TEST_CELL=""
|
TEST_CELL=""
|
||||||
ISTEST=1
|
ISTEST=1
|
||||||
|
BAK_MONGODB_HOST="http://192.168.0.200:3000"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.7"
|
APP_VERSION="0.2.8"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="1"
|
APP_ID="1"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.7"
|
APP_VERSION="0.2.8"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.7"
|
APP_VERSION="0.2.8"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="12"
|
APP_ID="12"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -96,10 +96,11 @@ export const shared_consts = {
|
|||||||
|
|
||||||
TABLES_ID_NUMBER: ['permissions', 'levels', 'adtypes', 'adtypegoods', 'statusSkills', 'sectors', 'sectorgoods', 'catgrps', 'skills', 'subskills', 'cities', 'provinces',
|
TABLES_ID_NUMBER: ['permissions', 'levels', 'adtypes', 'adtypegoods', 'statusSkills', 'sectors', 'sectorgoods', 'catgrps', 'skills', 'subskills', 'cities', 'provinces',
|
||||||
'myskills', 'mybachecas', 'mygoods', 'mygroups'],
|
'myskills', 'mybachecas', 'mygoods', 'mygroups'],
|
||||||
TABLES_USER_ID: ['myskills', 'mybachecas', 'mygoods'],
|
TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'mygoods'],
|
||||||
TABLES_UPDATE_LASTIFIED: ['myskills', 'mybachecas', 'mygoods', 'mybots'],
|
TABLES_UPDATE_LASTIFIED: ['myskills', 'mybachecas', 'mygoods', 'mybots'],
|
||||||
TABLES_FINDER: ['myskills', 'mybachecas', 'mygoods', 'mygroups'],
|
TABLES_FINDER: ['myskills', 'mybachecas', 'mygoods', 'mygroups'],
|
||||||
TABLES_VISU_CMYSRECCARD: ['myskills', 'mybachecas', 'mygoods'],
|
TABLES_VISU_CMYSRECCARD: ['myskills', 'mybachecas', 'mygoods', 'mygroups'],
|
||||||
|
TABLES_SHOW_ADTYPE: ['myskills', 'mybachecas', 'mygoods'],
|
||||||
|
|
||||||
TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas', 'mygoods'],
|
TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas', 'mygoods'],
|
||||||
TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'mygoods', 'users'],
|
TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'mygoods', 'users'],
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<q-item class="q-pb-none q-pt-xs">
|
<q-item class="q-pb-none q-pt-xs">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-h4" style="font-weight: 500;letter-spacing: 3px;">{{ calcstat.numMyBachecas }}</q-item-label>
|
<q-item-label class="text-h4" style="font-weight: 500;letter-spacing: 3px;">{{ calcstat.numMyBachecas }}</q-item-label>
|
||||||
<q-item-label :class="!$q.dark.isActive? 'text-grey-7':'text-white'" style="letter-spacing: 1px;">Dacci un Occhio</q-item-label>
|
<q-item-label :class="!$q.dark.isActive? 'text-grey-7':'text-white'" style="letter-spacing: 1px;">Eventi</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { shared_consts } from '@/common/shared_vuejs'
|
|||||||
import { useI18n } from '@/boot/i18n'
|
import { useI18n } from '@/boot/i18n'
|
||||||
import { toolsext } from '@store/Modules/toolsext'
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||||
|
import { useQuasar } from 'quasar'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CFinder',
|
name: 'CFinder',
|
||||||
@@ -23,12 +24,18 @@ export default defineComponent({
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
showFilterPersonal: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
CMyFieldDb, CGridTableRec,
|
CMyFieldDb, CGridTableRec,
|
||||||
},
|
},
|
||||||
setup(props, { attrs, slots, emit }) {
|
setup(props, { attrs, slots, emit }) {
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
const $q = useQuasar()
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
@@ -36,6 +43,7 @@ export default defineComponent({
|
|||||||
const filtercustom: any = ref([])
|
const filtercustom: any = ref([])
|
||||||
const searchList_Servizi = ref(<ISearchList[]>[])
|
const searchList_Servizi = ref(<ISearchList[]>[])
|
||||||
const searchList_Beni = ref(<ISearchList[]>[])
|
const searchList_Beni = ref(<ISearchList[]>[])
|
||||||
|
const searchList_MyGroups = ref(<ISearchList[]>[])
|
||||||
|
|
||||||
const search = ref('')
|
const search = ref('')
|
||||||
const myrecfiltertoggle = ref(tools.FILTER_ALL)
|
const myrecfiltertoggle = ref(tools.FILTER_ALL)
|
||||||
@@ -74,14 +82,60 @@ export default defineComponent({
|
|||||||
)
|
)
|
||||||
|
|
||||||
const searchList = computed(() => {
|
const searchList = computed(() => {
|
||||||
if (props.table === 'mygoods')
|
if (props.table === toolsext.TABMYGOODS)
|
||||||
return searchList_Beni.value
|
return searchList_Beni.value
|
||||||
else if (props.table === 'myskills')
|
else if (props.table === toolsext.TABMYSKILLS)
|
||||||
return searchList_Servizi.value
|
return searchList_Servizi.value
|
||||||
|
else if (props.table === toolsext.TABMYGROUPS)
|
||||||
|
return searchList_MyGroups.value
|
||||||
|
|
||||||
return searchList_Servizi.value
|
return searchList_Servizi.value
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const showType = computed(() => {
|
||||||
|
if (props.table === toolsext.TABMYGOODS)
|
||||||
|
return costanti.SHOW_MYCARD
|
||||||
|
else if (props.table === toolsext.TABMYSKILLS)
|
||||||
|
return costanti.SHOW_MYCARD
|
||||||
|
else if (props.table === toolsext.TABMYGROUPS)
|
||||||
|
return costanti.SHOW_MYCARD
|
||||||
|
|
||||||
|
return costanti.SHOW_MYCARD
|
||||||
|
})
|
||||||
|
|
||||||
|
const hint = computed(() => {
|
||||||
|
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'
|
||||||
|
else if (props.table === toolsext.TABMYGROUPS)
|
||||||
|
return 'nome del gruppo da cercare'
|
||||||
|
|
||||||
|
return 'nome del gruppo da cercare'
|
||||||
|
})
|
||||||
|
|
||||||
|
const visuType = computed(() => {
|
||||||
|
if (props.table === toolsext.TABMYGOODS)
|
||||||
|
return $q.screen.gt.xs
|
||||||
|
else if (props.table === toolsext.TABMYSKILLS)
|
||||||
|
return $q.screen.gt.xs
|
||||||
|
else if (props.table === toolsext.TABMYGROUPS)
|
||||||
|
return $q.screen.gt.xs
|
||||||
|
|
||||||
|
return $q.screen.gt.xs
|
||||||
|
})
|
||||||
|
|
||||||
|
const noMsgRecord = computed(() => {
|
||||||
|
if (props.table === toolsext.TABMYGOODS)
|
||||||
|
return 'Nessun Bene trovato con i filtri selezionati'
|
||||||
|
else if (props.table === toolsext.TABMYSKILLS)
|
||||||
|
return 'Nessun Servizio trovato con i filtri selezionati'
|
||||||
|
else if (props.table === toolsext.TABMYGROUPS)
|
||||||
|
return 'Nessun Gruppo trovato con i filtri selezionati'
|
||||||
|
|
||||||
|
return 'Nessun dato trovato con i filtri selezionati'
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
|
|
||||||
@@ -433,12 +487,169 @@ export default defineComponent({
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
searchList_MyGroups.value = [
|
||||||
|
{
|
||||||
|
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: 0,
|
||||||
|
addall: true,
|
||||||
|
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
||||||
|
useinput: true,
|
||||||
|
filter: null,
|
||||||
|
// filter: getFilterCitiesByProvince,
|
||||||
|
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||||
|
tablesel: 'cities',
|
||||||
|
icon: 'fas fa-map-marker-alt',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Categorie',
|
||||||
|
table: 'catgrps',
|
||||||
|
key: 'idCatGrp',
|
||||||
|
value: tools.getCookie(tools.COOK_SEARCH + 'catgrps', costanti.FILTER_TUTTI),
|
||||||
|
arrvalue: [],
|
||||||
|
type: costanti.FieldType.select,
|
||||||
|
filter: null,
|
||||||
|
addall: true,
|
||||||
|
useinput: false,
|
||||||
|
icon: 'engineering',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
filtercustom.value = []
|
filtercustom.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function extraparams() {
|
function extraparams() {
|
||||||
if (props.table === 'myskills') {
|
if (props.table === toolsext.TABMYGROUPS) {
|
||||||
|
|
||||||
|
let lk_tab = 'mygroups'
|
||||||
|
let lk_LF = 'userId'
|
||||||
|
let lk_FF = '_id'
|
||||||
|
let lk_as = 'group'
|
||||||
|
let af_objId_tab = 'myId'
|
||||||
|
|
||||||
|
return {
|
||||||
|
lookup1: {
|
||||||
|
lk_tab,
|
||||||
|
lk_LF,
|
||||||
|
lk_FF,
|
||||||
|
lk_as,
|
||||||
|
af_objId_tab,
|
||||||
|
lk_proj: {
|
||||||
|
groupname: 1,
|
||||||
|
title: 1,
|
||||||
|
descr: 1,
|
||||||
|
img: 1,
|
||||||
|
visibility: 1,
|
||||||
|
admins: 1,
|
||||||
|
idCatGrp: 1,
|
||||||
|
photos: 1,
|
||||||
|
idCity: 1,
|
||||||
|
note: 1,
|
||||||
|
website: 1,
|
||||||
|
comune: 1,
|
||||||
|
mycities: 1,
|
||||||
|
sector: 1,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lookup2: {
|
||||||
|
lk_tab: 'cities',
|
||||||
|
lk_LF: 'idCity',
|
||||||
|
lk_FF: '_id',
|
||||||
|
lk_as: 'comune',
|
||||||
|
lk_proj: {
|
||||||
|
groupname: 1,
|
||||||
|
title: 1,
|
||||||
|
descr: 1,
|
||||||
|
img: 1,
|
||||||
|
idCatGrp: 1,
|
||||||
|
visibility: 1,
|
||||||
|
admins: 1,
|
||||||
|
photos: 1,
|
||||||
|
idCity: 1,
|
||||||
|
note: 1,
|
||||||
|
//**ADDFIELD_MYGROUPS
|
||||||
|
website: 1,
|
||||||
|
comune: 1,
|
||||||
|
mycities: 1,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (props.table === toolsext.TABMYGOODS) {
|
||||||
|
return {
|
||||||
|
lookup1: {
|
||||||
|
lk_tab: 'users',
|
||||||
|
lk_LF: 'userId',
|
||||||
|
lk_FF: '_id',
|
||||||
|
lk_as: 'user',
|
||||||
|
af_objId_tab: 'myId',
|
||||||
|
},
|
||||||
|
lookup2: {
|
||||||
|
lk_tab: 'goods',
|
||||||
|
lk_LF: 'idGood',
|
||||||
|
lk_FF: '_id',
|
||||||
|
lk_as: 'recGood',
|
||||||
|
af_objId_tab: '',
|
||||||
|
lk_proj: {
|
||||||
|
recGood: 1,
|
||||||
|
sectorGood: 1,
|
||||||
|
idSectorGood: 1,
|
||||||
|
idGood: 1,
|
||||||
|
mygood: 1,
|
||||||
|
idStatusSkill: 1,
|
||||||
|
idContribType: 1,
|
||||||
|
idCity: 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: 'sectorgoods',
|
||||||
|
lk_LF: 'recGood.idSectorGood',
|
||||||
|
lk_FF: '_id',
|
||||||
|
lk_as: 'sectorgood',
|
||||||
|
af_objId_tab: '',
|
||||||
|
},
|
||||||
|
lookup5: {
|
||||||
|
lk_tab: 'cities',
|
||||||
|
lk_LF: 'idCity',
|
||||||
|
lk_FF: '_id',
|
||||||
|
lk_as: 'mycities',
|
||||||
|
af_objId_tab: '',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return {
|
return {
|
||||||
lookup1: {
|
lookup1: {
|
||||||
lk_tab: 'users',
|
lk_tab: 'users',
|
||||||
@@ -497,64 +708,6 @@ export default defineComponent({
|
|||||||
af_objId_tab: '',
|
af_objId_tab: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
} else if (props.table === 'myskills') {
|
|
||||||
return {
|
|
||||||
lookup1: {
|
|
||||||
lk_tab: 'users',
|
|
||||||
lk_LF: 'userId',
|
|
||||||
lk_FF: '_id',
|
|
||||||
lk_as: 'user',
|
|
||||||
af_objId_tab: 'myId',
|
|
||||||
},
|
|
||||||
lookup2: {
|
|
||||||
lk_tab: 'goods',
|
|
||||||
lk_LF: 'idGood',
|
|
||||||
lk_FF: '_id',
|
|
||||||
lk_as: 'recGood',
|
|
||||||
af_objId_tab: '',
|
|
||||||
lk_proj: {
|
|
||||||
recGood: 1,
|
|
||||||
sectorGood: 1,
|
|
||||||
idSectorGood: 1,
|
|
||||||
idGood: 1,
|
|
||||||
mygood: 1,
|
|
||||||
idStatusSkill: 1,
|
|
||||||
idContribType: 1,
|
|
||||||
idCity: 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: 'sectorgoods',
|
|
||||||
lk_LF: 'recGood.idSectorGood',
|
|
||||||
lk_FF: '_id',
|
|
||||||
lk_as: 'sectorgood',
|
|
||||||
af_objId_tab: '',
|
|
||||||
},
|
|
||||||
lookup5: {
|
|
||||||
lk_tab: 'cities',
|
|
||||||
lk_LF: 'idCity',
|
|
||||||
lk_FF: '_id',
|
|
||||||
lk_as: 'mycities',
|
|
||||||
af_objId_tab: '',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,6 +718,8 @@ export default defineComponent({
|
|||||||
return tools.getdefaultnewrec_MyBacheca()
|
return tools.getdefaultnewrec_MyBacheca()
|
||||||
} else if (props.table === toolsext.TABMYGOODS) {
|
} else if (props.table === toolsext.TABMYGOODS) {
|
||||||
return tools.getdefaultnewrec_MyGoods()
|
return tools.getdefaultnewrec_MyGoods()
|
||||||
|
} else if (props.table === toolsext.TABMYGROUPS) {
|
||||||
|
return tools.getdefaultnewrec_MyGroup()
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -595,6 +750,10 @@ export default defineComponent({
|
|||||||
toolsext,
|
toolsext,
|
||||||
getdefaultnewrec,
|
getdefaultnewrec,
|
||||||
mypagination,
|
mypagination,
|
||||||
|
noMsgRecord,
|
||||||
|
showType,
|
||||||
|
visuType,
|
||||||
|
hint,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
<div class="bi-border-all">
|
<div class="bi-border-all">
|
||||||
<div class="q-ma-xs q-gutter-xs q-pa-xs">
|
<div class="q-ma-xs q-gutter-xs q-pa-xs">
|
||||||
|
|
||||||
<div class="text-center">
|
<div v-if="showFilterPersonal"
|
||||||
|
class="text-center">
|
||||||
<q-btn-toggle
|
<q-btn-toggle
|
||||||
v-model="myrecfiltertoggle"
|
v-model="myrecfiltertoggle"
|
||||||
push
|
push
|
||||||
@@ -36,17 +37,17 @@
|
|||||||
:col_tabfooter="col_tabfooter"
|
:col_tabfooter="col_tabfooter"
|
||||||
:vertical="costanti.VISUTABLE_LISTA"
|
:vertical="costanti.VISUTABLE_LISTA"
|
||||||
:prop_pagination="mypagination"
|
:prop_pagination="mypagination"
|
||||||
:showType="costanti.SHOW_MYCARD"
|
:showType="showType"
|
||||||
:nodataLabel="'Nessun annuncio trovato con i filtri selezionati'"
|
:hint="hint"
|
||||||
|
:nodataLabel="noMsgRecord"
|
||||||
:prop_search="true"
|
:prop_search="true"
|
||||||
:finder="true"
|
:finder="true"
|
||||||
:choose_visutype="$q.screen.gt.xs"
|
:choose_visutype="visuType"
|
||||||
:butt_modif_new="true"
|
:butt_modif_new="true"
|
||||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||||
:arrfilters="arrfilterand"
|
:arrfilters="arrfilterand"
|
||||||
:filtercustom="filtercustom"
|
:filtercustom="filtercustom"
|
||||||
:prop_searchList="searchList"
|
:prop_searchList="searchList"
|
||||||
keyMain="idSkill"
|
|
||||||
:defaultnewrec="getdefaultnewrec"
|
:defaultnewrec="getdefaultnewrec"
|
||||||
:extraparams="extraparams()">
|
:extraparams="extraparams()">
|
||||||
|
|
||||||
|
|||||||
@@ -3,3 +3,9 @@
|
|||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.errore{
|
||||||
|
font-size: 1rem;
|
||||||
|
color: grey;
|
||||||
|
}
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ export default defineComponent({
|
|||||||
// mounted
|
// mounted
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function reloadPage(){
|
||||||
|
$router.go(0)
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -38,6 +42,7 @@ export default defineComponent({
|
|||||||
static_data,
|
static_data,
|
||||||
globalStore,
|
globalStore,
|
||||||
t,
|
t,
|
||||||
|
reloadPage,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="tools.isTest()">
|
<div v-if="globalStore.serverError">
|
||||||
<!--<q-banner
|
<q-banner
|
||||||
rounded
|
rounded
|
||||||
dense
|
dense
|
||||||
class="bg-primary text-white"
|
class="bg-negative text-white"
|
||||||
color="primary q-title"
|
color="primary q-title"
|
||||||
style="text-align: center;">
|
style="text-align: center;">
|
||||||
<template v-slot:avatar>
|
<template v-slot:avatar>
|
||||||
<q-icon name="fas fa-exclamation-triangle" color="yellow" size="xs" />
|
<q-icon name="fas fa-exclamation-triangle" color="yellow" size="xs" />
|
||||||
</template>
|
</template>
|
||||||
<span class="mybanner">Ambiente di Test</span>
|
<span class="mybanner">Errore di Connessione al Server</span>
|
||||||
</q-banner>-->
|
<p v-if="globalStore.serverMsgError" class="errore">{{globalStore.getMsgServerError()}}</p>
|
||||||
|
|
||||||
|
<q-btn
|
||||||
|
size="md"
|
||||||
|
color="secondary" rounded icon="refresh"
|
||||||
|
class="btnNewVersShow" @click="reloadPage" label="Riprova">
|
||||||
|
</q-btn>
|
||||||
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -102,11 +102,13 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
keyMain: {
|
/* keyMain: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
*/
|
||||||
nodataLabel: {
|
nodataLabel: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -530,14 +532,14 @@ export default defineComponent({
|
|||||||
returnedData.value = []
|
returnedData.value = []
|
||||||
returnedCount = 0
|
returnedCount = 0
|
||||||
} else {
|
} else {
|
||||||
if (props.keyMain) {
|
/*if (props.keyMain) {
|
||||||
nosearch = true
|
nosearch = true
|
||||||
filtersearch.forEach((rec: any) => {
|
filtersearch.forEach((rec: any) => {
|
||||||
if (!!rec[props.keyMain]) {
|
if (!!rec[props.keyMain]) {
|
||||||
nosearch = false
|
nosearch = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
// if ((false && nosearch && props.finder) || (props.finder_noNull && nosearch)) {
|
// if ((false && nosearch && props.finder) || (props.finder_noNull && nosearch)) {
|
||||||
if (props.finder_noNull && nosearch) {
|
if (props.finder_noNull && nosearch) {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { useQuasar } from 'quasar'
|
|||||||
import { useI18n } from '@/boot/i18n'
|
import { useI18n } from '@/boot/i18n'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMyGroup',
|
name: 'CMyGroup',
|
||||||
@@ -42,6 +43,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
const grp = ref(<IMyGroup | null>null)
|
const grp = ref(<IMyGroup | null>null)
|
||||||
|
|
||||||
|
const table = ref(toolsext.TABMYGROUPS)
|
||||||
|
|
||||||
watch(() => props.mygrp, (newval, oldval) => {
|
watch(() => props.mygrp, (newval, oldval) => {
|
||||||
mounted()
|
mounted()
|
||||||
})
|
})
|
||||||
@@ -75,6 +78,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
|
|
||||||
|
function getPathByGroup(grp: IMyGroup){
|
||||||
|
return '/' + tools.getDirectoryByTable(table.value) + '/' + grp.groupname
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
grp,
|
grp,
|
||||||
costanti,
|
costanti,
|
||||||
@@ -85,6 +92,7 @@ export default defineComponent({
|
|||||||
userStore,
|
userStore,
|
||||||
tools,
|
tools,
|
||||||
$q,
|
$q,
|
||||||
|
getPathByGroup,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
<div v-if="tools.isUserOk()">
|
<div v-if="tools.isUserOk()">
|
||||||
<div v-if="grp">
|
<div v-if="grp">
|
||||||
<q-item class="q-my-sm" clickable>
|
<q-item class="q-my-sm" clickable>
|
||||||
<q-item-section avatar @click="naviga(`/` + tools.getDirectoryByTable(table) + `/` + grp.groupname)">
|
<q-item-section avatar @click="naviga(getPathByGroup(grp))">
|
||||||
<q-avatar size="60px">
|
<q-avatar size="60px">
|
||||||
<q-img :src="getImgGroup(grp)" :alt="grp.groupname" img-class="imgprofile" height="60px"/>
|
<q-img :src="getImgGroup(grp)" :alt="grp.groupname" img-class="imgprofile" height="60px"/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section @click="naviga(`/` + tools.getDirectoryByTable(table) + `/` + grp.groupname)">
|
<q-item-section @click="naviga(getPathByGroup(grp))">
|
||||||
<q-item-label><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
|
<q-item-label><strong>{{ grp.title }}</strong> ({{ grp.groupname }})
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label v-if="grp.descr" caption lines="1"><em>{{ grp.descr }}</em></q-item-label>
|
<q-item-label v-if="grp.descr" caption lines="1"><em>{{ grp.descr }}</em></q-item-label>
|
||||||
|
|||||||
@@ -49,6 +49,14 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showBadge() {
|
||||||
|
if (shared_consts.TABLES_SHOW_ADTYPE.includes(props.table)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
function getImgUser(profile: IUserFields) {
|
function getImgUser(profile: IUserFields) {
|
||||||
return userStore.getImgByProfile(profile)
|
return userStore.getImgByProfile(profile)
|
||||||
}
|
}
|
||||||
@@ -81,6 +89,7 @@ export default defineComponent({
|
|||||||
fieldsTable,
|
fieldsTable,
|
||||||
cmdExt,
|
cmdExt,
|
||||||
visupage,
|
visupage,
|
||||||
|
showBadge,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</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 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)">
|
||||||
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
|
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
|
||||||
<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"/>
|
||||||
|
|||||||
@@ -22,6 +22,34 @@ export default defineComponent({
|
|||||||
|
|
||||||
const testServer = ref({})
|
const testServer = ref({})
|
||||||
|
|
||||||
|
const myrecfiltertoggle = ref(0)
|
||||||
|
|
||||||
|
const SERVER_TEST = ref([
|
||||||
|
{ key: 1, label: 'Test', host: 'https://test.freeplanet.app:3001' },
|
||||||
|
{ key: 2, label: 'Produzione', host: 'https://freeplanet.app:3000' },
|
||||||
|
{ key: 3, label: 'Locale', host: 'http://192.168.0.200:3000' },
|
||||||
|
])
|
||||||
|
|
||||||
|
watch(() =>
|
||||||
|
myrecfiltertoggle.value, (value: any, oldValue: any) => {
|
||||||
|
if (value) {
|
||||||
|
const trovato = SERVER_TEST.value.find((rec: any) => rec.key === value)
|
||||||
|
if (trovato) {
|
||||||
|
globalStore.serverHost = trovato.host
|
||||||
|
ricarica()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
const getoptions = computed( () => {
|
||||||
|
const arr = []
|
||||||
|
for (const rec of SERVER_TEST.value) {
|
||||||
|
arr.push({label: rec.label, value: rec.key})
|
||||||
|
}
|
||||||
|
|
||||||
|
return arr
|
||||||
|
})
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
ricarica()
|
ricarica()
|
||||||
}
|
}
|
||||||
@@ -36,9 +64,11 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
t,
|
t,
|
||||||
tools,
|
tools,
|
||||||
|
getoptions,
|
||||||
costanti,
|
costanti,
|
||||||
testServer,
|
testServer,
|
||||||
ricarica,
|
ricarica,
|
||||||
|
myrecfiltertoggle,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,9 +6,18 @@
|
|||||||
class="bg-primary text-white"
|
class="bg-primary text-white"
|
||||||
color="primary q-title"
|
color="primary q-title"
|
||||||
style="text-align: center;">
|
style="text-align: center;">
|
||||||
<span class="mybanner">Server: {{testServer}}</span>
|
<p class="mybanner">Server: {{tools.getServerHost()}}</p>
|
||||||
|
<p class="mybanner">Risposta: {{testServer}}</p>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
|
|
||||||
|
<q-btn-toggle
|
||||||
|
v-model="myrecfiltertoggle"
|
||||||
|
push
|
||||||
|
glossy
|
||||||
|
toggle-color="primary"
|
||||||
|
:options="getoptions"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="text-center q-ma-lg">
|
<div class="text-center q-ma-lg">
|
||||||
<q-btn push size="lg" color="primary" rounded label="Ricarica" @click="ricarica"></q-btn>
|
<q-btn push size="lg" color="primary" rounded label="Ricarica" @click="ricarica"></q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ export default defineComponent({
|
|||||||
function getappname() {
|
function getappname() {
|
||||||
let mystr = ''
|
let mystr = ''
|
||||||
if (tools.isTest()){
|
if (tools.isTest()){
|
||||||
mystr = 'Ambiente di TEST'
|
mystr = getAppVersion()
|
||||||
} else {
|
} else {
|
||||||
let mystr = tools.getsuffisso() + tools.getappname(tools.isMobile())
|
let mystr = tools.getsuffisso() + tools.getappname(tools.isMobile())
|
||||||
if (!tools.isMobile()) {
|
if (!tools.isMobile()) {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export default defineComponent({
|
|||||||
t,
|
t,
|
||||||
getMyUsername,
|
getMyUsername,
|
||||||
Username,
|
Username,
|
||||||
|
tools,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-footer
|
<q-footer
|
||||||
|
v-if="tools.isUserOk()"
|
||||||
class="bg-white small-screen-only"
|
class="bg-white small-screen-only"
|
||||||
bordered
|
bordered
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -221,6 +221,8 @@ export interface IGlobalState {
|
|||||||
rightCartOpen: boolean
|
rightCartOpen: boolean
|
||||||
category: string
|
category: string
|
||||||
stateConnection: string
|
stateConnection: string
|
||||||
|
serverError: boolean
|
||||||
|
serverMsgError: any
|
||||||
networkDataReceived: boolean
|
networkDataReceived: boolean
|
||||||
clickcmd?: string
|
clickcmd?: string
|
||||||
cfgServer: ICfgServer[]
|
cfgServer: ICfgServer[]
|
||||||
@@ -256,6 +258,7 @@ export interface IGlobalState {
|
|||||||
TIMER_STATE: number
|
TIMER_STATE: number
|
||||||
URL_RITORNA: string
|
URL_RITORNA: string
|
||||||
URL_RESTORE: string
|
URL_RESTORE: string
|
||||||
|
serverHost?: string
|
||||||
levels: ILevel[],
|
levels: ILevel[],
|
||||||
adtypes: IAdType[],
|
adtypes: IAdType[],
|
||||||
adtypegoods: IAdType[],
|
adtypegoods: IAdType[],
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
|
|
||||||
<CTitleBanner title="Gruppi"></CTitleBanner>
|
<CTitleBanner title="Gruppi"></CTitleBanner>
|
||||||
<CGridTableRec
|
<CGridTableRec
|
||||||
prop_mytable="groups"
|
prop_mytable="groups"
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||||
|
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</CMyPage>
|
</CMyPage>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import axios, { AxiosInstance, AxiosResponse } from 'axios'
|
import axios, { AxiosInstance, AxiosResponse } from 'axios'
|
||||||
// import LoginModule from '../Modules/Auth/LoginStore'
|
// import LoginModule from '../Modules/Auth/LoginStore'
|
||||||
import { tools } from '@src/store/Modules/tools'
|
|
||||||
import { toolsext } from '@src/store/Modules/toolsext'
|
import { toolsext } from '@src/store/Modules/toolsext'
|
||||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||||
import { useGlobalStore } from '@store/globalStore'
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
import { tools } from '@src/store/Modules/tools'
|
||||||
import * as Types from './ApiTypes'
|
import * as Types from './ApiTypes'
|
||||||
|
|
||||||
export const API_URL = process.env.MONGODB_HOST
|
export let API_URL = process.env.MONGODB_HOST
|
||||||
export const axiosInstance: AxiosInstance = axios.create({
|
export const axiosInstance: AxiosInstance = axios.create({
|
||||||
baseURL: API_URL,
|
baseURL: API_URL,
|
||||||
headers: {
|
headers: {
|
||||||
@@ -48,6 +48,7 @@ export const removeAuthHeaders = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function Request(type: string, path: string, payload: any): Promise<Types.AxiosSuccess | Types.AxiosError | undefined> {
|
async function Request(type: string, path: string, payload: any): Promise<Types.AxiosSuccess | Types.AxiosError | undefined> {
|
||||||
|
|
||||||
let ricevuto = false
|
let ricevuto = false
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
@@ -56,6 +57,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
|
|||||||
let response: AxiosResponse
|
let response: AxiosResponse
|
||||||
if (type === 'post' || type === 'put' || type === 'patch') {
|
if (type === 'post' || type === 'put' || type === 'patch') {
|
||||||
response = await axiosInstance[type](path, payload, {
|
response = await axiosInstance[type](path, payload, {
|
||||||
|
baseURL: globalStore.getServerHost(),
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'x-auth': userStore.x_auth_token,
|
'x-auth': userStore.x_auth_token,
|
||||||
@@ -103,6 +105,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
|
|||||||
} if (type === 'get' || type === 'delete') {
|
} if (type === 'get' || type === 'delete') {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
response = await axiosInstance[type](path, {
|
response = await axiosInstance[type](path, {
|
||||||
|
baseURL: globalStore.getServerHost(),
|
||||||
params: payload,
|
params: payload,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
@@ -113,6 +116,7 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
|
|||||||
return new Types.AxiosSuccess(response.data, response.status)
|
return new Types.AxiosSuccess(response.data, response.status)
|
||||||
} if (type === 'postFormData') {
|
} if (type === 'postFormData') {
|
||||||
response = await axiosInstance.post(path, payload, {
|
response = await axiosInstance.post(path, payload, {
|
||||||
|
baseURL: globalStore.getServerHost(),
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'multipart/form-data',
|
'Content-Type': 'multipart/form-data',
|
||||||
'x-auth': userStore.x_auth_token,
|
'x-auth': userStore.x_auth_token,
|
||||||
|
|||||||
@@ -1201,6 +1201,18 @@ export const tools = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getServerHost() {
|
||||||
|
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
|
||||||
|
if (globalStore.serverHost) {
|
||||||
|
return globalStore.serverHost
|
||||||
|
} else {
|
||||||
|
return process.env.MONGODB_HOST
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
getTitlePriority(priority: number): string {
|
getTitlePriority(priority: number): string {
|
||||||
let cl = ''
|
let cl = ''
|
||||||
|
|
||||||
@@ -3384,7 +3396,7 @@ export const tools = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
geturlupload() {
|
geturlupload() {
|
||||||
return process.env.MONGODB_HOST + `/uploadnew/${this.getvers()}/`
|
return tools.getServerHost() + `/uploadnew/${this.getvers()}/`
|
||||||
},
|
},
|
||||||
escapeslash(mystr: string) {
|
escapeslash(mystr: string) {
|
||||||
return mystr.replace(/\//g, '-')
|
return mystr.replace(/\//g, '-')
|
||||||
@@ -4398,7 +4410,7 @@ export const tools = {
|
|||||||
|
|
||||||
async registeredemail(email: string) {
|
async registeredemail(email: string) {
|
||||||
|
|
||||||
const VALIDATE_USER_URL = process.env.MONGODB_HOST + '/email/ck'
|
const VALIDATE_USER_URL = tools.getServerHost() + '/email/ck'
|
||||||
|
|
||||||
let onSuccess = (res: AxiosResponse) => {
|
let onSuccess = (res: AxiosResponse) => {
|
||||||
return res.status !== PayloadMessageTypes.statusfound
|
return res.status !== PayloadMessageTypes.statusfound
|
||||||
@@ -5005,7 +5017,7 @@ export const tools = {
|
|||||||
return 'mywork'
|
return 'mywork'
|
||||||
} else if (table === toolsext.TABMYBACHECAS) {
|
} else if (table === toolsext.TABMYBACHECAS) {
|
||||||
return 'mypage'
|
return 'mypage'
|
||||||
} else if (table === 'mygroups') {
|
} else if (table === toolsext.TABMYGROUPS) {
|
||||||
return 'grp'
|
return 'grp'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
rightDrawerOpen: false,
|
rightDrawerOpen: false,
|
||||||
rightCartOpen: false,
|
rightCartOpen: false,
|
||||||
stateConnection: stateConnDefault,
|
stateConnection: stateConnDefault,
|
||||||
|
serverError: false,
|
||||||
|
serverMsgError: {},
|
||||||
networkDataReceived: false,
|
networkDataReceived: false,
|
||||||
clickcmd: '',
|
clickcmd: '',
|
||||||
cfgServer: [],
|
cfgServer: [],
|
||||||
@@ -778,10 +780,13 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
|
|
||||||
return Api.SendReq('/gettable', 'POST', params)
|
return Api.SendReq('/gettable', 'POST', params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
this.serverError = false
|
||||||
// console.table(res)
|
// console.table(res)
|
||||||
return res.data
|
return res.data
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
this.serverError = true
|
||||||
|
this.serverMsgError = error
|
||||||
console.log('error loadTable', error)
|
console.log('error loadTable', error)
|
||||||
userStore.setErrorCatch(error)
|
userStore.setErrorCatch(error)
|
||||||
return null
|
return null
|
||||||
@@ -1228,7 +1233,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
return Api.SendReq(`/loadsite/${myuserid}/${process.env.APP_ID}/${process.env.APP_VERSION}`, 'GET', null)
|
return Api.SendReq(`/loadsite/${myuserid}/${process.env.APP_ID}/${process.env.APP_VERSION}`, 'GET', null)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log('____________________________ res', res)
|
console.log('____________________________ res', res)
|
||||||
|
this.serverError = false
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
|
||||||
calendarStore.bookedevent = (res.data.bookedevent) ? res.data.bookedevent : []
|
calendarStore.bookedevent = (res.data.bookedevent) ? res.data.bookedevent : []
|
||||||
calendarStore.eventlist = (res.data.eventlist) ? res.data.eventlist : []
|
calendarStore.eventlist = (res.data.eventlist) ? res.data.eventlist : []
|
||||||
calendarStore.operators = (res.data.operators) ? res.data.operators : []
|
calendarStore.operators = (res.data.operators) ? res.data.operators : []
|
||||||
@@ -1304,6 +1311,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
}).then((res) => res).catch((error) => {
|
}).then((res) => res).catch((error) => {
|
||||||
console.log('error dbLoad', error)
|
console.log('error dbLoad', error)
|
||||||
// userStore.setErrorCatch(error)
|
// userStore.setErrorCatch(error)
|
||||||
|
this.serverError = true
|
||||||
|
this.serverMsgError = error
|
||||||
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, toolsext.ERR_GENERICO, error)
|
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, toolsext.ERR_GENERICO, error)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -1432,5 +1441,35 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
|||||||
return myarr
|
return myarr
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getMsgServerError() {
|
||||||
|
if (this.serverError) {
|
||||||
|
if (this.serverMsgError) {
|
||||||
|
if (this.serverMsgError.status === 500) {
|
||||||
|
return 'Errore Interno del Server'
|
||||||
|
} else if (this.serverMsgError.msgerr === '') {
|
||||||
|
return 'Codice Errore ' + this.serverMsgError.status
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return this.serverMsgError.msgerr.message
|
||||||
|
}catch (e) {
|
||||||
|
return this.serverMsgError.msgerr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ''
|
||||||
|
},
|
||||||
|
|
||||||
|
getServerHost() {
|
||||||
|
|
||||||
|
if (this.serverHost) {
|
||||||
|
return this.serverHost
|
||||||
|
} else {
|
||||||
|
return process.env.MONGODB_HOST
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
:filtercustom="filtercustom"
|
:filtercustom="filtercustom"
|
||||||
:prop_searchList="searchList"
|
:prop_searchList="searchList"
|
||||||
:showType="costanti.SHOW_USERINFO"
|
:showType="costanti.SHOW_USERINFO"
|
||||||
keyMain=""
|
|
||||||
:showCol="false"
|
:showCol="false"
|
||||||
:extraparams="extraparams()">
|
:extraparams="extraparams()">
|
||||||
|
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
|
|
||||||
<q-tabs v-model="tabgrp" class="text-blue">
|
<q-tabs v-model="tabgrp" class="text-blue">
|
||||||
<q-tab label="Info" name="info" icon="fas fa-info"></q-tab>
|
<q-tab label="Info" name="info" icon="fas fa-info"></q-tab>
|
||||||
<q-tab v-if="!!mygrp.note && userStore.IsMyGroupByGroupname(mygrp.groupname)" label="Pagina" name="page" icon="fas fa-file-word"></q-tab>
|
<q-tab v-if="!!mygrp.note && userStore.IsMyGroupByGroupname(mygrp.groupname) || tools.iAmAdminGroup(groupname)" label="Pagina" name="page" icon="fas fa-file-word"></q-tab>
|
||||||
<q-tab v-if="userStore.IsMyGroupByGroupname(mygrp.groupname)" label="Iscritti" name="membri" icon="fas fa-users"></q-tab>
|
<q-tab v-if="userStore.IsMyGroupByGroupname(mygrp.groupname) || tools.iAmAdminGroup(groupname)" label="Iscritti" 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="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
|
|
||||||
<q-tab-panel name="page">
|
<q-tab-panel name="page">
|
||||||
<div v-if="mygrp.title">
|
<div v-if="mygrp.note">
|
||||||
<br>
|
<br>
|
||||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
<div v-if="mygrp.note" v-html="mygrp.note">
|
<div v-if="mygrp.note" v-html="mygrp.note">
|
||||||
@@ -142,7 +142,6 @@
|
|||||||
:filtercustom="filtercustom"
|
:filtercustom="filtercustom"
|
||||||
:prop_searchList="searchList"
|
:prop_searchList="searchList"
|
||||||
:showType="costanti.SHOW_USERINFO"
|
:showType="costanti.SHOW_USERINFO"
|
||||||
keyMain=""
|
|
||||||
:showCol="false"
|
:showCol="false"
|
||||||
:extrafield="groupname"
|
:extrafield="groupname"
|
||||||
:extraparams="extraparams()"
|
:extraparams="extraparams()"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { CMyGroups } from '@/components/CMyGroups'
|
import { CMyGroups } from '@/components/CMyGroups'
|
||||||
|
import { CFinder } from '@/components/CFinder'
|
||||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
@@ -13,65 +15,15 @@ import { shared_consts } from '@/common/shared_vuejs'
|
|||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'mygroups',
|
name: 'mygroups',
|
||||||
components: { CMyGroups, CGridTableRec },
|
components: { CMyGroups, CGridTableRec, CFinder },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const $route = useRoute()
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const arrfilterand: any = ref([])
|
|
||||||
const filtercustom: any = ref([])
|
|
||||||
const searchList = ref(<ISearchList[]>[])
|
|
||||||
|
|
||||||
const filter = ref(costanti.FIND_GROUP)
|
const filter = ref(costanti.FIND_GROUP)
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
searchList.value = []
|
|
||||||
filtercustom.value = []
|
|
||||||
arrfilterand.value = []
|
|
||||||
|
|
||||||
searchList.value = [
|
|
||||||
{
|
|
||||||
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: 0,
|
|
||||||
addall: true,
|
|
||||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
|
||||||
useinput: true,
|
|
||||||
filter: null,
|
|
||||||
// filter: getFilterCitiesByProvince,
|
|
||||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
|
||||||
tablesel: 'cities',
|
|
||||||
icon: 'fas fa-map-marker-alt',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Categorie',
|
|
||||||
table: 'catgrps',
|
|
||||||
key: 'idCatGrp',
|
|
||||||
value: tools.getCookie(tools.COOK_SEARCH + 'catgrps', costanti.FILTER_TUTTI),
|
|
||||||
arrvalue: [],
|
|
||||||
type: costanti.FieldType.select,
|
|
||||||
filter: null,
|
|
||||||
addall: true,
|
|
||||||
useinput: false,
|
|
||||||
icon: 'engineering',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.GROUP_SEARCH)
|
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.GROUP_SEARCH)
|
||||||
filter.value = filt_loaded ? filt_loaded : costanti.FIND_GROUP
|
filter.value = filt_loaded ? filt_loaded : costanti.FIND_GROUP
|
||||||
@@ -81,81 +33,14 @@ export default defineComponent({
|
|||||||
tools.setCookie(tools.COOK_SEARCH + tools.GROUP_SEARCH, newval)
|
tools.setCookie(tools.COOK_SEARCH + tools.GROUP_SEARCH, newval)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function getdefaultnewrec(): any {
|
|
||||||
return tools.getdefaultnewrec_MyGroup()
|
|
||||||
}
|
|
||||||
|
|
||||||
function extraparams() {
|
|
||||||
let lk_tab = 'mygroups'
|
|
||||||
let lk_LF = 'userId'
|
|
||||||
let lk_FF = '_id'
|
|
||||||
let lk_as = 'group'
|
|
||||||
let af_objId_tab = 'myId'
|
|
||||||
|
|
||||||
return {
|
|
||||||
lookup1: {
|
|
||||||
lk_tab,
|
|
||||||
lk_LF,
|
|
||||||
lk_FF,
|
|
||||||
lk_as,
|
|
||||||
af_objId_tab,
|
|
||||||
lk_proj: {
|
|
||||||
groupname: 1,
|
|
||||||
title: 1,
|
|
||||||
descr: 1,
|
|
||||||
img: 1,
|
|
||||||
visibility: 1,
|
|
||||||
admins: 1,
|
|
||||||
idCatGrp: 1,
|
|
||||||
photos: 1,
|
|
||||||
idCity: 1,
|
|
||||||
note: 1,
|
|
||||||
website: 1,
|
|
||||||
comune: 1,
|
|
||||||
mycities: 1,
|
|
||||||
sector: 1,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
lookup2: {
|
|
||||||
lk_tab: 'cities',
|
|
||||||
lk_LF: 'idCity',
|
|
||||||
lk_FF: '_id',
|
|
||||||
lk_as: 'comune',
|
|
||||||
lk_proj: {
|
|
||||||
groupname: 1,
|
|
||||||
title: 1,
|
|
||||||
descr: 1,
|
|
||||||
img: 1,
|
|
||||||
idCatGrp: 1,
|
|
||||||
visibility: 1,
|
|
||||||
admins: 1,
|
|
||||||
photos: 1,
|
|
||||||
idCity: 1,
|
|
||||||
note: 1,
|
|
||||||
//**ADDFIELD_MYGROUPS
|
|
||||||
website: 1,
|
|
||||||
comune: 1,
|
|
||||||
mycities: 1,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
filter,
|
filter,
|
||||||
costanti,
|
costanti,
|
||||||
shared_consts,
|
shared_consts,
|
||||||
arrfilterand,
|
|
||||||
filtercustom,
|
|
||||||
searchList,
|
|
||||||
colmyUserGroup,
|
colmyUserGroup,
|
||||||
extraparams,
|
toolsext,
|
||||||
getdefaultnewrec,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,13 +4,20 @@
|
|||||||
v-model="filter"
|
v-model="filter"
|
||||||
:finder="true"
|
:finder="true"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<CFinder
|
||||||
|
:table="toolsext.TABMYGROUPS"
|
||||||
|
:showFilterPersonal="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!--
|
||||||
<CGridTableRec
|
<CGridTableRec
|
||||||
prop_mytable="mygroups"
|
prop_mytable="mygroups"
|
||||||
prop_mytitle=""
|
prop_mytitle=""
|
||||||
:prop_mycolumns="colmyUserGroup"
|
:prop_mycolumns="colmyUserGroup"
|
||||||
prop_colkey="_id"
|
prop_colkey="_id"
|
||||||
col_title="groupname"
|
col_title="groupname"
|
||||||
:vertical="costanti.VISUTABLE_LISTA"
|
:vertical="costanti.VISUTABLE_SCHEDA_GROUP"
|
||||||
nodataLabel=" Nessun Gruppo"
|
nodataLabel=" Nessun Gruppo"
|
||||||
:prop_search="true"
|
:prop_search="true"
|
||||||
hint="nome del gruppo da trovare"
|
hint="nome del gruppo da trovare"
|
||||||
@@ -30,6 +37,7 @@
|
|||||||
:extraparams="extraparams()">
|
:extraparams="extraparams()">
|
||||||
|
|
||||||
</CGridTableRec>
|
</CGridTableRec>
|
||||||
|
-->
|
||||||
</CMyGroups>
|
</CMyGroups>
|
||||||
|
|
||||||
<div v-if="filter === costanti.CREATE_GROUP">
|
<div v-if="filter === costanti.CREATE_GROUP">
|
||||||
|
|||||||
Reference in New Issue
Block a user