Site Configuration by Server Params (confsites and confpages)
This commit is contained in:
@@ -19,11 +19,14 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
const site = ref(globalStore.site)
|
||||
|
||||
return {
|
||||
userStore,
|
||||
tools,
|
||||
costanti,
|
||||
static_data,
|
||||
site,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="!tools.isLogged() && static_data.functionality.ENABLE_REGISTRATION && static_data.functionality.SHOW_REG_BUTTON"
|
||||
v-if="!tools.isLogged() && site.confpages.enableReg && site.confpages.showRegButton"
|
||||
style="margin:20px; text-align: center;">
|
||||
|
||||
<q-btn rounded size="lg" color="primary" @click="tools.openrighttoolbar()">{{ $t('login.enter') }}
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
</q-card-section>
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
rounded v-if="!myevent.nobookable && static_data.functionality.BOOKING_EVENTS"
|
||||
rounded v-if="!myevent.nobookable && site.confpages.bookingEvents"
|
||||
color="primary" @click="addBookEventMenu(myevent)" :disable="!isEventEnabled(myevent)"
|
||||
:label="$t('cal.booking')">
|
||||
</q-btn>
|
||||
@@ -887,13 +887,13 @@
|
||||
:label="$t('event.askinfo')">
|
||||
</q-btn>
|
||||
<!--<q-btn rounded outline class="q-ma-sm"
|
||||
v-if="!event.nobookable && !isAlreadyBooked(event) && static_data.functionality.BOOKING_EVENTS"
|
||||
v-if="!event.nobookable && !isAlreadyBooked(event) && site.confpages.bookingEvents"
|
||||
color="primary" @click="addBookEventMenu(event)"
|
||||
:label="$t('cal.booking')" :disable="!isEventEnabled(event)">
|
||||
</q-btn>-->
|
||||
<q-btn
|
||||
rounded outline class="q-ma-sm"
|
||||
v-if="!event.nobookable && isAlreadyBooked(event) && static_data.functionality.BOOKING_EVENTS"
|
||||
v-if="!event.nobookable && isAlreadyBooked(event) && site.confpages.bookingEvents"
|
||||
text-color="red"
|
||||
@click="EditBookEvent(event)"
|
||||
:label="$t('cal.modifybooking')">
|
||||
|
||||
@@ -1868,16 +1868,6 @@ export default defineComponent({
|
||||
return ''
|
||||
}
|
||||
|
||||
function getLabelFooterByRow(row: any) {
|
||||
if (props.col_footer) {
|
||||
|
||||
const mycol = fieldsTable.getColByTable(tablesel.value, props.col_footer)
|
||||
if (mycol) {
|
||||
return tools.getValueByRemoteField(mycol, row, row[props.col_footer], props.col_tabfooter)
|
||||
}
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
function cmdExt(cmd: any, id: any, val2: any) {
|
||||
console.log('cmd', cmd)
|
||||
@@ -2079,7 +2069,6 @@ export default defineComponent({
|
||||
showColCheck,
|
||||
getValueExtra,
|
||||
shared_consts,
|
||||
getLabelFooterByRow,
|
||||
showfilter,
|
||||
cmdExt,
|
||||
visupagedialog,
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
:groupname="extrafield"
|
||||
:circuitname="circuitname"
|
||||
:labelextra="col_title ? row[col_title] : ''"
|
||||
:labelFooter="col_footer ? getLabelFooterByRow(row) : ''"
|
||||
:labelFooter="col_footer ? tools.getLabelFooterByRow(row, col_footer, tablesel) : ''"
|
||||
>
|
||||
</CMyUser>
|
||||
|
||||
@@ -782,7 +782,7 @@
|
||||
<div v-if="showColCheck(mycol, tools.TIPOVIS_SHOW_RECORD, false)">
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="orange-3" dense>
|
||||
<q-field rounded outlined :bg-color="$q.dark.isActive ? '' : 'orange-3'" dense>
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline" tabindex="0">{{ mycol.label }}</div>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
|
||||
<q-field rounded outlined :bg-color="$q.dark.isActive ? '' : 'blue-4'" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="centermydiv">
|
||||
<div class="self-center full-width no-outline text-center" tabindex="0">{{ mykey }}</div>
|
||||
|
||||
@@ -94,24 +94,26 @@
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input
|
||||
label="Width:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.widthimg"
|
||||
filled
|
||||
dense
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
label="Height:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.heightimg"
|
||||
filled
|
||||
dense
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
label="Lunghezza:"
|
||||
@update:model-value="modifElem"
|
||||
style="width: 100px"
|
||||
v-model="myel.widthimg"
|
||||
filled
|
||||
dense
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
label="Altezza:"
|
||||
@update:model-value="modifElem"
|
||||
style="width: 100px"
|
||||
v-model="myel.heightimg"
|
||||
filled
|
||||
dense
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -124,7 +126,7 @@
|
||||
@update:model-value="modifElem"
|
||||
dense
|
||||
label="Allinea"
|
||||
style="min-width: 150px"
|
||||
style="width: 100px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
@@ -160,13 +162,13 @@
|
||||
<q-select
|
||||
v-if="enableEdit && showFit"
|
||||
rounded
|
||||
style="min-width: 150px"
|
||||
style="width: 100px"
|
||||
outlined
|
||||
v-model="myel.fit"
|
||||
:options="tools.SelectListFit"
|
||||
@update:model-value="modifElem"
|
||||
dense
|
||||
label="Fit"
|
||||
label="Adatta:"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
@@ -174,6 +176,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input
|
||||
dense
|
||||
label="Classe:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.class2"
|
||||
@@ -209,11 +212,12 @@
|
||||
v-if="enableEdit && showAnimation"
|
||||
v-model="myel.anim2"
|
||||
@update:model-value="modifElem"
|
||||
label="Animaz Immagini"
|
||||
label="Animazione Immagini"
|
||||
>
|
||||
</CSelectAnimation>
|
||||
<div class="row">
|
||||
<q-input
|
||||
dense
|
||||
label="Classe Schede:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.class3"
|
||||
@@ -365,6 +369,7 @@
|
||||
<div v-if="myel.type === shared_consts.ELEMTYPE.MARGINI">
|
||||
<div v-if="enableEdit">
|
||||
<q-input
|
||||
dense
|
||||
label="Margine:"
|
||||
class="fa-border"
|
||||
@update:model-value="modifElem"
|
||||
@@ -378,6 +383,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.TITLE">
|
||||
<div v-if="enableEdit">
|
||||
<q-input
|
||||
dense
|
||||
label="Titolo"
|
||||
class="fa-border"
|
||||
@update:model-value="modifElem"
|
||||
@@ -387,6 +393,7 @@
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Style"
|
||||
class="fa-border"
|
||||
@update:model-value="modifElem"
|
||||
@@ -396,6 +403,7 @@
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Immagine:"
|
||||
class="fa-border"
|
||||
@update:model-value="modifElem"
|
||||
@@ -422,6 +430,7 @@
|
||||
</CMyFieldRec>
|
||||
|
||||
<q-input
|
||||
dense
|
||||
label="Title"
|
||||
class="fa-border"
|
||||
@update:model-value="modifElem"
|
||||
@@ -431,6 +440,7 @@
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Sottotitolo"
|
||||
class="fa-border"
|
||||
@update:model-value="modifElem"
|
||||
@@ -444,6 +454,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.IMGPOSTER">
|
||||
<div v-if="enableEdit">
|
||||
<q-input
|
||||
dense
|
||||
label="Velocità"
|
||||
style="max-width: 100px"
|
||||
class="fa-border"
|
||||
@@ -566,6 +577,7 @@
|
||||
</CSelectFontSize>
|
||||
</div>
|
||||
<q-input
|
||||
dense
|
||||
label="Classe:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="rec.class"
|
||||
@@ -598,6 +610,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.HTML">
|
||||
<div v-if="enableEdit">
|
||||
<q-input
|
||||
dense
|
||||
label="Classe:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.class"
|
||||
@@ -646,6 +659,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.IMAGEUPLOAD">
|
||||
<div v-if="enableEdit">
|
||||
<q-input
|
||||
dense
|
||||
label="NomeFile Img:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.image"
|
||||
@@ -665,29 +679,34 @@
|
||||
:fieldtype="costanti.FieldType.image"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
<div class="row">
|
||||
<q-input
|
||||
label="Width:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.widthimg"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
label="Height:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.heightimg"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<div class="">
|
||||
<div class="col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 col-sticky">
|
||||
<q-input
|
||||
dense
|
||||
label="Lunghezza:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.widthimg"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Altezza:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.heightimg"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.VIDEO">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<q-input
|
||||
dense
|
||||
label="NomeFile Video:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.container"
|
||||
@@ -696,6 +715,7 @@
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Ratio:"
|
||||
type="number"
|
||||
@update:model-value="modifElem"
|
||||
@@ -725,6 +745,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.PAGEINTRO">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<q-input
|
||||
dense
|
||||
label="NomeFile Img:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.container"
|
||||
@@ -733,35 +754,39 @@
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
label="Width:"
|
||||
type="number"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
v-model="myel.widthimg"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
label="Height:"
|
||||
type="number"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
v-model="myel.heightimg"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
label="Link:"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
v-model="myel.link"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<div class="col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 col-sticky">
|
||||
<q-input
|
||||
dense
|
||||
label="Lunghezza:"
|
||||
type="number"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
v-model="myel.widthimg"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
label="Altezza:"
|
||||
type="number"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
v-model="myel.heightimg"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Link:"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
v-model="myel.link"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -772,6 +797,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.OPENSTREETMAP">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<q-input
|
||||
dense
|
||||
label="ImgMap:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.container"
|
||||
@@ -781,6 +807,7 @@
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="UrlMap:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.container2"
|
||||
@@ -790,6 +817,7 @@
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Title:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.container3"
|
||||
@@ -799,6 +827,7 @@
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Coordinata Mappa 1:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.containerHtml"
|
||||
@@ -808,6 +837,7 @@
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Coordinata Mappa Big:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.link"
|
||||
@@ -836,6 +866,7 @@
|
||||
-->
|
||||
|
||||
<q-input
|
||||
dense
|
||||
label="Secondi tra un'immagine e l'altra:"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
@@ -866,6 +897,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CALENDAR">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<q-input
|
||||
dense
|
||||
label="Visualizza ultimi N eventi:"
|
||||
@update:model-value="modifElem"
|
||||
debounce="1000"
|
||||
|
||||
@@ -100,7 +100,7 @@ export default defineComponent({
|
||||
type: Object as PropType<IColGridTable> | undefined,
|
||||
required: false,
|
||||
default: () => {
|
||||
return { name: '' }
|
||||
return { }
|
||||
},
|
||||
},
|
||||
id: {
|
||||
@@ -130,7 +130,9 @@ export default defineComponent({
|
||||
const { t } = useI18n()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const col = ref(<IColGridTable> { name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.maxlength, minlength: props.minlength })
|
||||
const col = ref(<IColGridTable>{
|
||||
name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.maxlength, minlength: props.minlength
|
||||
})
|
||||
const row = ref({})
|
||||
|
||||
const { setValDb, getValDb } = MixinBase()
|
||||
@@ -163,9 +165,9 @@ export default defineComponent({
|
||||
} else {
|
||||
// console.log('Tab = ', props.table, 'key=', props.mykey, 'mycolProp', props.mycol)
|
||||
col.value = fieldsTable.getColByTable(props.table, props.mykey)
|
||||
// console.log('MYCOL = ', col.value)
|
||||
}
|
||||
|
||||
// console.log('COL = ', col.value, 'MyCol passed', props.mycol)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
|
||||
<div v-if="title" class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
|
||||
<q-field rounded outlined :bg-color="$q.dark.isActive ? '' : 'blue-4'" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="centermydiv">
|
||||
<div v-if="myimg" class="text-center">
|
||||
@@ -23,6 +23,7 @@
|
||||
<div :class="` q-ma-sm q-pa-sm col-grow popupedit `" :style="withBorder() ? `` : ``">
|
||||
|
||||
<CMyPopupEdit
|
||||
debounce="1000"
|
||||
:fielddb="true"
|
||||
v-bind="$attrs"
|
||||
:rec="rec"
|
||||
|
||||
@@ -12,7 +12,7 @@ import MixinBase from '@/mixins/mixin-base'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyFieldRec',
|
||||
emits: ['save'],
|
||||
emits: ['save', 'update:rec'],
|
||||
props: {
|
||||
table: {
|
||||
type: String,
|
||||
@@ -123,13 +123,27 @@ export default defineComponent({
|
||||
const jointable = ref('')
|
||||
const recordCol = ref(<any>{})
|
||||
|
||||
const myrec = ref(<any>{})
|
||||
|
||||
const mykey = ref('')
|
||||
const mysubkey = ref('')
|
||||
const mysubsubkey = ref('')
|
||||
|
||||
const { setValDb, getValDb } = MixinBase()
|
||||
|
||||
watch(() => myrec.value, (value, oldval) => {
|
||||
emit('update:rec', myrec.value)
|
||||
return true
|
||||
}
|
||||
)
|
||||
|
||||
watch(() => props.rec, (value, oldval) => {
|
||||
myrec.value = props.rec
|
||||
}
|
||||
)
|
||||
|
||||
function mounted() {
|
||||
myrec.value = props.rec
|
||||
mytitle.value = props.title
|
||||
keytab.value = fieldsTable.getKeyByTable(props.table)
|
||||
optlab.value = fieldsTable.getLabelByTable(props.table)
|
||||
@@ -148,21 +162,21 @@ export default defineComponent({
|
||||
|
||||
const arrk = props.field.split('.')
|
||||
if (arrk) {
|
||||
mykey.value = props.field
|
||||
if (arrk.length >= 0)
|
||||
mykey.value = arrk[0]
|
||||
if (arrk.length > 1)
|
||||
mysubkey.value = arrk[1]
|
||||
|
||||
if (arrk.length > 2)
|
||||
mysubsubkey.value = arrk[2]
|
||||
else
|
||||
mykey.value = props.field
|
||||
}
|
||||
// console.log('### table', props.table, 'col.value', col.value, 'field', props.field, 'mykey', mykey.value)
|
||||
console.log('### table', props.table, 'col.value', col.value, 'field', props.field, 'mykey', mykey.value)
|
||||
|
||||
}
|
||||
|
||||
function showandsel(row: any, col: any, newval: any, valinitial: any) {
|
||||
// console.log('showandsel CMyFieldDb', row, col, newval)
|
||||
console.log('showandsel CMyFieldDb', row, col, newval)
|
||||
emit('save', props.rec, newval)
|
||||
|
||||
if (props.nosaveToDb)
|
||||
@@ -236,6 +250,7 @@ export default defineComponent({
|
||||
mysubsubkey,
|
||||
visuElem,
|
||||
getclass,
|
||||
myrec,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-if="visuElem()" :class="mytitle ? `row items-center justify-center q-ma-xs text-center` : ``">
|
||||
<div v-if="mytitle" class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
|
||||
<q-field rounded outlined :bg-color="$q.dark.isActive ? '' : 'blue-4'" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="centermydiv">
|
||||
<div v-if="myimg" class="text-center">
|
||||
@@ -42,7 +42,7 @@
|
||||
:mycol="col"
|
||||
:tablesel="tablesel"
|
||||
:pickup="pickup"
|
||||
v-model:row="rec"
|
||||
v-model:row="myrec"
|
||||
minuteinterval="1"
|
||||
:path="path"
|
||||
:nosaveToDb="nosaveToDb"
|
||||
|
||||
@@ -18,6 +18,7 @@ import { CAccomodation } from '../CAccomodation'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
|
||||
// @ts-ignore
|
||||
// import VueTelInput from 'vue3-tel-input'
|
||||
// import 'vue3-tel-input/dist/vue3-tel-input.css'
|
||||
@@ -237,17 +238,28 @@ export default defineComponent({
|
||||
refresh()
|
||||
})
|
||||
|
||||
|
||||
const myrow = computed(() => {
|
||||
return props.rec && props.isrec ? props.rec : props.row
|
||||
watch(() => props.rec, (newval, oldval) => {
|
||||
refresh()
|
||||
})
|
||||
|
||||
const myrow = ref(<any>null)
|
||||
|
||||
/* const myrow = computed(() => {
|
||||
return props.rec && props.isrec ? props.rec : props.row
|
||||
})
|
||||
*/
|
||||
function crea() {
|
||||
// console.log('crea', isFieldDb(), 'props.mycol', props.mycol)
|
||||
|
||||
if (props.mycol && props.mycol.name) {
|
||||
if (props.mycol && props.mycol.name && props.mycol.name !== 'test') {
|
||||
col.value = props.mycol
|
||||
} else {
|
||||
if (col.value.name === 'test') {
|
||||
col.value.name = props.field
|
||||
if (props.subfield) {
|
||||
col.value.name += '.' + props.subfield
|
||||
}
|
||||
}
|
||||
col.value.jointable = props.jointable
|
||||
if (props.filter)
|
||||
col.value.filter = props.filter
|
||||
@@ -265,7 +277,7 @@ export default defineComponent({
|
||||
myImgGall.value = [myvalue.value]
|
||||
}
|
||||
|
||||
console.log('* col', col.value);
|
||||
// console.log('* col', col.value);
|
||||
}
|
||||
|
||||
if (props.type) {
|
||||
@@ -282,6 +294,20 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
if (props.tablesel) {
|
||||
// let obj = tools.getParamsByTable(props.table)
|
||||
// console.log('OBJ:', obj)
|
||||
if (true) {
|
||||
|
||||
console.log(' CAMPO', props.field + '.' + props.subfield)
|
||||
let myval = tools.getLabelFooterByRow(myrow.value, props.field + '.' + props.subfield, props.table)
|
||||
if (myval)
|
||||
myvalue.value = myval
|
||||
console.log(' RECORD INPUT', myrow.value)
|
||||
console.log(' VALORE OUTPUT: ', myvalue.value)
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('CMyFieldDb crea', myvalue)
|
||||
}
|
||||
|
||||
@@ -317,7 +343,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function addNewValue(value: any) {
|
||||
console.log('addNewValue', value, col.value)
|
||||
// console.log('addNewValue', value, col.value)
|
||||
|
||||
if (col.value.allowNewValue && col.value.jointable) {
|
||||
let myrec: any = {}
|
||||
@@ -341,17 +367,18 @@ export default defineComponent({
|
||||
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
myvalue.value = tools.removespaces_slash(newval)
|
||||
}
|
||||
// console.log('popypedit: changevalRec', newval)
|
||||
// console.log('popuppedit: changevalRec', newval, 'COLName', col.value.name)
|
||||
|
||||
// console.log('row', props.row, 'col', props.mycol, 'newval', newval)
|
||||
// console.log('row[col.value.name]', props.row[col.value.name])
|
||||
if (props.type === costanti.FieldType.image) {
|
||||
// console.log('image', newval)
|
||||
}
|
||||
|
||||
myrow.value[col.value.name] = newval
|
||||
|
||||
// console.log('changevalRec update:row', newval)
|
||||
emit('update:row', props.row)
|
||||
// console.log('changevalRec update:row', myrow.value)
|
||||
emit('update:row', myrow.value)
|
||||
if (props.isInModif)
|
||||
OpenEdit()
|
||||
}
|
||||
@@ -371,11 +398,13 @@ export default defineComponent({
|
||||
|
||||
function mounted() {
|
||||
|
||||
myrow.value = props.rec && props.isrec ? {...props.rec} : {...props.row}
|
||||
|
||||
try {
|
||||
|
||||
// console.log('mounted', 'isFieldDb()', isFieldDb())
|
||||
if (isFieldDb() && !props.isrec) {
|
||||
|
||||
// console.log(' . none...')
|
||||
} else {
|
||||
if (props.subfield !== '') {
|
||||
if (myrow.value[props.field] === undefined) {
|
||||
@@ -392,6 +421,7 @@ export default defineComponent({
|
||||
myvalue.value = myrow.value
|
||||
}
|
||||
}
|
||||
// console.log('props.field', props.field, 'props.subfield', props.subfield, 'myvalue: ', myvalue)
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -761,7 +791,6 @@ export default defineComponent({
|
||||
myImgGall,
|
||||
noPopupeditByCol,
|
||||
getTitleEditor,
|
||||
t,
|
||||
myrow,
|
||||
shared_consts,
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.username_chip">
|
||||
<div class="q-ma-xs">
|
||||
<span v-if="col.extrafield">
|
||||
<span class="extrafield">{{ t(col.extrafield) }}</span>
|
||||
<span class="extrafield">{{ $t(col.extrafield) }}</span>
|
||||
</span>
|
||||
<q-btn
|
||||
v-if="col.tipovisu === costanti.TipoVisu.LINK && myvalue"
|
||||
@@ -145,7 +145,7 @@
|
||||
@keyup.enter.stop
|
||||
@update:model-value="changevalRec"
|
||||
autofocus
|
||||
:label="col.visulabel ? t(col.label_trans) : col.label"
|
||||
:label="col.visulabel ? $t(col.label_trans) : col.label"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
@@ -156,7 +156,7 @@
|
||||
<CLabel
|
||||
v-bind="$attrs"
|
||||
:value="myvalue"
|
||||
:label="t(col.label_trans)"
|
||||
:label="$t(col.label_trans)"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -218,9 +218,9 @@
|
||||
@update:model-value="Savedb"
|
||||
:label="
|
||||
col.visulabel
|
||||
? t(col.label_trans)
|
||||
? $t(col.label_trans)
|
||||
: visulabel
|
||||
? t(col.label_trans)
|
||||
? $t(col.label_trans)
|
||||
: ''
|
||||
"
|
||||
type="number"
|
||||
@@ -233,7 +233,7 @@
|
||||
:symbol="tools.getSymbolByCircuit(row)"
|
||||
:color="tools.getColorByCircuit(row)"
|
||||
:value="myvalue"
|
||||
:label="t(col.label_trans)"
|
||||
:label="$t(col.label_trans)"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
@@ -420,7 +420,7 @@
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
:row="row"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:value="myvalue"
|
||||
@update:value="changevalRec"
|
||||
:tablesel="tablesel"
|
||||
@@ -452,7 +452,7 @@
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
:row="row"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:value="myvalue"
|
||||
@update:value="changevalRec"
|
||||
:tablesel="tablesel"
|
||||
@@ -478,7 +478,7 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.date">
|
||||
<div v-if="myvalue">
|
||||
<CDateTime
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : (col.label_trans ? $t(col.label_trans) : '')"
|
||||
class="cursor-pointer"
|
||||
v-model:value="myvalue"
|
||||
:readonly="false"
|
||||
@@ -501,7 +501,7 @@
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.onlydate">
|
||||
<CDateTime
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
class="cursor-pointer"
|
||||
:valueDate="myvalue"
|
||||
v-model:value="myvalue"
|
||||
@@ -518,7 +518,7 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.binary">
|
||||
<div v-if="isInModif">
|
||||
<span v-if="insertMode">
|
||||
{{ col.label ? col.label : t(col.label_trans) }}:
|
||||
{{ col.label ? col.label : $t(col.label_trans) }}:
|
||||
</span>
|
||||
<CMyToggleList
|
||||
:label="col.titlepopupedit ? col.titlepopupedit : ''"
|
||||
@@ -566,7 +566,7 @@
|
||||
:row="row"
|
||||
:multiple="true"
|
||||
:withToggle="true"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
:filter_table="col.filter_table"
|
||||
:filter_field="col.filter_field"
|
||||
:value_extra="value_extra"
|
||||
@@ -660,7 +660,7 @@
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
:row="row"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:value="myvalue"
|
||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||
:tablesel="
|
||||
@@ -669,6 +669,7 @@
|
||||
: ''
|
||||
"
|
||||
@update:value="changevalRec"
|
||||
@update:model-value="Savedb"
|
||||
:newvaluefunc="addNewValue"
|
||||
:filter_table="col.filter_table"
|
||||
:addnone="col.addnone"
|
||||
@@ -731,7 +732,7 @@
|
||||
:col="col"
|
||||
:row="row"
|
||||
:multiselect_by_server="true"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:arrvalue="myvalue"
|
||||
@update:arrvalue="changevalRec"
|
||||
:addall="false"
|
||||
@@ -770,7 +771,7 @@
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
:row="row"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:value="myvalue"
|
||||
@update:value="changevalRec"
|
||||
:filter_table="col.filter_table"
|
||||
@@ -806,7 +807,7 @@
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.html">
|
||||
<div v-if="isInModif">
|
||||
<q-bar v-if="isInModif" dense class="bg-primary text-white">
|
||||
<span v-if="col.label_trans">{{ t(col.label_trans) }}</span
|
||||
<span v-if="col.label_trans">{{ $t(col.label_trans) }}</span
|
||||
><span v-else> {{ $t('event.testo_di_spiegazione') }}: </span>
|
||||
<q-space />
|
||||
</q-bar>
|
||||
@@ -955,7 +956,7 @@
|
||||
:maxlength="col.maxlength ? col.maxlength : undefined"
|
||||
:minlength="col.minlength ? col.minlength : undefined"
|
||||
v-model="scope.value"
|
||||
:label="col.visulabel ? t(col.label_trans) : ''"
|
||||
:label="col.visulabel ? $t(col.label_trans) : ''"
|
||||
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
|
||||
@keyup.enter.stop
|
||||
autofocus
|
||||
@@ -972,7 +973,7 @@
|
||||
autofocus
|
||||
:label="
|
||||
col.visulabel
|
||||
? t(col.label_trans)
|
||||
? $t(col.label_trans)
|
||||
: visulabel
|
||||
? col.label
|
||||
: ''
|
||||
@@ -989,7 +990,7 @@
|
||||
:symbol="tools.getSymbolByCircuit(row)"
|
||||
:color="tools.getColorByCircuit(row)"
|
||||
:value="scope.value"
|
||||
:label="t(col.label_trans)"
|
||||
:label="$t(col.label_trans)"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
@@ -1002,7 +1003,7 @@
|
||||
autofocus
|
||||
@update:model-value="changevalRec"
|
||||
style="max-width: 100px"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
@@ -1043,7 +1044,7 @@
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
:row="row"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:value="scope.value"
|
||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||
:addnone="col.addnone"
|
||||
@@ -1080,7 +1081,7 @@
|
||||
:col="col"
|
||||
:row="row"
|
||||
:multiselect_by_server="true"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:arrvalue="scope.value"
|
||||
@update:arrvalue="changevalRec"
|
||||
:addall="false"
|
||||
@@ -1157,7 +1158,7 @@
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
:row="row"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:value="scope.value"
|
||||
@update:value="changevalRec"
|
||||
:tablesel="tablesel"
|
||||
@@ -1179,7 +1180,7 @@
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
:row="row"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:value="scope.value"
|
||||
@update:value="changevalRec"
|
||||
:tablesel="tablesel"
|
||||
@@ -1194,7 +1195,7 @@
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.date">
|
||||
<CDateTime
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : (col.label_trans ? $t(col.label_trans) : '')"
|
||||
class="cursor-pointer"
|
||||
v-model:value="myvalue"
|
||||
:readonly="false"
|
||||
@@ -1208,7 +1209,7 @@
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.onlydate">
|
||||
<CDateTime
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
class="cursor-pointer"
|
||||
:valueDate="myvalue"
|
||||
v-model:value="myvalue"
|
||||
@@ -1249,7 +1250,7 @@
|
||||
:type_out="col.field_outtype"
|
||||
:col="col"
|
||||
:row="row"
|
||||
:label="col.label ? col.label : t(col.label_trans)"
|
||||
:label="col.label ? col.label : $t(col.label_trans)"
|
||||
v-model:value="scope.value"
|
||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||
|
||||
@@ -15,6 +15,7 @@ import { CMyPage } from '@/components/CMyPage/index'
|
||||
|
||||
import { IEvents, IOperators } from '@src/model'
|
||||
import MixinEvents from '@/mixins/mixin-events'
|
||||
import { useGlobalStore } from '@src/store/globalStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMySingleEvent',
|
||||
@@ -29,6 +30,9 @@ export default defineComponent({
|
||||
setup(props, { emit }) {
|
||||
|
||||
const selected = ref(false)
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const site = ref(globalStore.site)
|
||||
|
||||
const { isShowPrice, getImgEvent, getStyleByEvent, isAlreadyBooked, getWhereIcon, getWhereName,
|
||||
editable, getContribtypeById, getPrice, isEventEnabled, findEventIndex, UpdateDbByFields,
|
||||
@@ -94,6 +98,7 @@ export default defineComponent({
|
||||
findEventIndex,
|
||||
UpdateDbByFields,
|
||||
selected,
|
||||
site,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -172,13 +172,13 @@
|
||||
</q-btn>
|
||||
<q-btn
|
||||
rounded class="q-mx-sm"
|
||||
v-if="!myevent.nobookable && !isAlreadyBooked(myevent) && static_data.functionality.BOOKING_EVENTS"
|
||||
v-if="!myevent.nobookable && !isAlreadyBooked(myevent) && site.confpages.bookingEvents"
|
||||
color="primary" @click="addBookEventMenu(myevent)"
|
||||
:label="$t('cal.booking')" :disable="!isEventEnabled(myevent)">
|
||||
</q-btn>
|
||||
<q-btn
|
||||
rounded outline class="q-mx-sm"
|
||||
v-if="!myevent.nobookable && isAlreadyBooked(myevent) && static_data.functionality.BOOKING_EVENTS"
|
||||
v-if="!myevent.nobookable && isAlreadyBooked(myevent) && site.confpages.bookingEvents"
|
||||
text-color="red"
|
||||
@click="EditBookEvent(myevent)"
|
||||
:label="$t('cal.modifybooking')">
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div>
|
||||
<div v-if="!tools.isLogged()" style="margin: 5px; padding: 5px" class="home">
|
||||
<q-btn
|
||||
v-if="static_data.functionality.ENABLE_REGISTRATION && static_data.functionality.ENABLE_REG_BY_BOT"
|
||||
v-if="site.confpages.enableReg && site.confpages.enableRegByBot"
|
||||
type="a" rounded size="lg" color="primary" href="/bot" :label="$t('reg.submit')" class="buttreg">
|
||||
</q-btn>
|
||||
<q-btn
|
||||
|
||||
@@ -1,39 +1,41 @@
|
||||
<template>
|
||||
<div v-if="!!myrec">
|
||||
{{label}}
|
||||
<q-bar dense class="bg-blue text-white">
|
||||
{{ label }}
|
||||
</q-bar>
|
||||
<div class="row">
|
||||
<q-select
|
||||
rounded
|
||||
style="width: 150px"
|
||||
outlined
|
||||
v-model="myrec.name"
|
||||
:options="tools.SelectListAnimation"
|
||||
@update:model-value="updateClass"
|
||||
dense
|
||||
label="Tipo:"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
rounded
|
||||
style="width: 150px"
|
||||
outlined
|
||||
v-model="myrec.name"
|
||||
:options="tools.SelectListAnimation"
|
||||
@update:model-value="updateClass"
|
||||
dense
|
||||
label="Tipo:"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
|
||||
<q-select
|
||||
rounded
|
||||
style="width: 150px"
|
||||
outlined
|
||||
v-model="myrec.timingtype"
|
||||
:options="tools.SelectListTimingType"
|
||||
@update:model-value="updateClass"
|
||||
dense
|
||||
label="Timing:"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
rounded
|
||||
style="width: 150px"
|
||||
outlined
|
||||
v-model="myrec.timingtype"
|
||||
:options="tools.SelectListTimingType"
|
||||
@update:model-value="updateClass"
|
||||
dense
|
||||
label="Timing:"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
<q-select
|
||||
rounded
|
||||
style="min-width: 150px"
|
||||
style="width: 150px"
|
||||
outlined
|
||||
v-model="myrec.clduration"
|
||||
:options="tools.SelectListSpeed"
|
||||
@@ -47,7 +49,7 @@
|
||||
|
||||
<q-select
|
||||
rounded
|
||||
style="min-width: 150px"
|
||||
style="width: 150px"
|
||||
outlined
|
||||
v-model="myrec.cldelay"
|
||||
:options="tools.SelectListDelay"
|
||||
|
||||
@@ -20,7 +20,8 @@ export default defineComponent({
|
||||
props: {
|
||||
showregbutt: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
@@ -35,6 +36,8 @@ export default defineComponent({
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
const site = ref(globalStore.site)
|
||||
|
||||
const myForm = ref(null)
|
||||
|
||||
const iswaitingforRes = ref(false)
|
||||
@@ -151,6 +154,7 @@ export default defineComponent({
|
||||
signin,
|
||||
getlinkforgetpwd,
|
||||
myForm,
|
||||
site,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -64,14 +64,14 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="static_data.functionality.ENABLE_REGISTRATION && showregbutt && static_data.functionality.ENABLE_REG_BY_BOT"
|
||||
v-if="site.confpages.enableReg && showregbutt && site.confpages.enableRegByBot"
|
||||
style="margin-top:10px; text-align: center;">
|
||||
Se non sei ancora Registrato:<br>
|
||||
<q-btn type="a" rounded size="md" color="primary" href="/bot" :label="$t('reg.submit')">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="static_data.functionality.ENABLE_REGISTRATION && showregbutt"
|
||||
v-else-if="site.confpages.enableReg && showregbutt"
|
||||
style="margin-top:10px; text-align: center;">
|
||||
Se non sei ancora Registrato:<br>
|
||||
<q-btn rounded size="md" color="primary" to="/signup" :label="$t('reg.submit')">
|
||||
|
||||
@@ -91,8 +91,8 @@ export default defineComponent({
|
||||
const signup = reactive(<ISignupOptions>{
|
||||
email: process.env.TEST_EMAIL || '',
|
||||
username: process.env.TEST_USERNAME || '',
|
||||
name: static_data.functionality.SHOW_NAMESURNAME ? (process.env.TEST_NAME || '') : '',
|
||||
surname: static_data.functionality.SHOW_NAMESURNAME ? (process.env.TEST_SURNAME || '') : '',
|
||||
name: '',
|
||||
surname: '',
|
||||
password: process.env.TEST_PASSWORD || '',
|
||||
repeatPassword: process.env.TEST_PASSWORD || '',
|
||||
terms: !process.env.PROD,
|
||||
|
||||
@@ -14,7 +14,8 @@ export default defineComponent({
|
||||
props: {
|
||||
showregbutt: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
|
||||
@@ -11,8 +11,6 @@ import { tools } from '@store/Modules/tools'
|
||||
import { CVerifyEmail } from '@src/components/CVerifyEmail'
|
||||
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
|
||||
|
||||
import { static_data } from '@src/db/static_data'
|
||||
|
||||
import MixinUsers from '@/mixins/mixin-users'
|
||||
|
||||
|
||||
@@ -28,11 +26,13 @@ export default defineComponent({
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const site = ref(globalStore.site)
|
||||
|
||||
return {
|
||||
userStore,
|
||||
globalStore,
|
||||
tools,
|
||||
static_data,
|
||||
site,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</q-banner>
|
||||
</div>
|
||||
<div v-else-if="userStore.isOldRegNotFinished()">
|
||||
<div v-if="static_data.functionality.ENABLE_REG_NEED_TELEGRAM && !tools.isTelegOk()">
|
||||
<div v-if="site.confpages.enabledRegNeedTelegram && !tools.isTelegOk()">
|
||||
<h3>La Verifica su Telegram non è stata completata, pertanto se ancora non avete inserito nessun annuncio (Bene, Servizio, ecc...), è consigliato cancellare la vecchia registrazione per ripetere con una nuova registrazione.</h3><br>
|
||||
<h3>Per contattare il supporto tecnico e farvi cancellare la registrazione: "Help - RISO", clicca qui sotto:</h3><br>
|
||||
<h4><a href="https://t.me/+dTHFNIwkc_phNmQ8" target="_blank"><strong>Entra in Supporto Tecnico su Telegram: (Help - RISO)</strong></a></h4>
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
</div>
|
||||
|
||||
<FormNewsletter
|
||||
v-if="static_data.functionality.SHOW_NEWSLETTER"
|
||||
v-if="site.confpages.showNL"
|
||||
:idwebsite="tools.appid()"
|
||||
:locale="toolsext.getLocale()"
|
||||
>
|
||||
|
||||
@@ -14,42 +14,42 @@
|
||||
indicator-color="transparent"
|
||||
>
|
||||
<q-route-tab
|
||||
v-if="site.footer_mobile?.show_buttHome"
|
||||
v-if="site.confpages.showButtHome"
|
||||
to="/"
|
||||
class="mylabfooter"
|
||||
:label="$t('tabdown.home')"
|
||||
icon="fas fa-home"
|
||||
/>
|
||||
<q-route-tab
|
||||
v-if="static_data.functionality.ENABLE_VIEW_GROUPS"
|
||||
v-if="site.confpages.showViewGroups"
|
||||
class="mylabfooter"
|
||||
:label="$t('tabdown.groups')"
|
||||
to="/groups"
|
||||
icon="fas fa-users"
|
||||
/>
|
||||
<q-route-tab
|
||||
v-if="static_data.functionality.ENABLE_CIRCUITS"
|
||||
v-if="site.confpages.showViewCircuits"
|
||||
class="mylabfooter"
|
||||
:label="$t('tabdown.circuits')"
|
||||
to="/circuits"
|
||||
icon="fas fa-coins"
|
||||
/>
|
||||
<q-route-tab
|
||||
v-if="static_data.functionality.ENABLE_VIEW_USERS"
|
||||
v-if="site.confpages.showViewUsers"
|
||||
class="mylabfooter"
|
||||
:label="$t('tabdown.friends')"
|
||||
to="/friends"
|
||||
icon="fas fa-user-friends"
|
||||
/>
|
||||
<q-route-tab
|
||||
v-if="static_data.functionality.ENABLE_VIEW_BOOKINGS"
|
||||
v-if="site.confpages.bookingEvents"
|
||||
class="mylabfooter"
|
||||
:label="$t('tabdown.bookings')"
|
||||
to="/admin/eventlist"
|
||||
icon="fas fa-calendar-plus"
|
||||
/>
|
||||
<q-route-tab
|
||||
v-if="site.footer_mobile.show_profile"
|
||||
v-if="site.confpages.showViewProfile"
|
||||
class="mylabfooter"
|
||||
:label="$t('tabdown.profile')"
|
||||
:to="`/my/`+getMyUsername()"
|
||||
|
||||
@@ -94,6 +94,8 @@ export default defineComponent({
|
||||
dark.value = tools.getCookie('darkmode', false, false, false) === '-1'
|
||||
|
||||
$q.dark.set(dark.value)
|
||||
|
||||
BeforeMount()
|
||||
}
|
||||
|
||||
watch(() => globalStore.finishLoading, (value: any, oldval: any) => {
|
||||
@@ -218,9 +220,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function setshortlang(mylang: string) {
|
||||
static_data.lang_available.forEach((langavail) => {
|
||||
static_data.lang_available.forEach((langavail: any) => {
|
||||
if (langavail.value === mylang) {
|
||||
// console.log('static_data.lang_available[indrec].short', static_data.lang_available[indrec].short, static_data.lang_available[indrec].value)
|
||||
langshort.value = langavail.short
|
||||
return langshort.value
|
||||
}
|
||||
@@ -280,7 +281,7 @@ export default defineComponent({
|
||||
const lang = computed({
|
||||
get: () => $q.lang.isoName,
|
||||
set: mylang => {
|
||||
console.log('set lang', $q.lang.getLocale())
|
||||
console.log('set lang', $q.lang.getLocale(), 'passato', mylang)
|
||||
$q.lang.set(snakeToCamel(mylang))
|
||||
// tools.showNotif($q, 'IMPOSTA LANG= ' + $i18n.locale)
|
||||
// console.log('IMPOSTA LANG= ' + $i18n.locale)
|
||||
@@ -334,7 +335,7 @@ export default defineComponent({
|
||||
const color = (value === 'online') ? 'positive' : 'warning'
|
||||
const statoconn = t('connection.conn') + ' ' + ((value === 'online') ? t('connection.online') : t('connection.offline'))
|
||||
|
||||
if (static_data.functionality.SHOW_IF_IS_SERVER_CONNECTION) {
|
||||
if (site.confpages.showConnected) {
|
||||
|
||||
if (!!oldValue) {
|
||||
tools.showNotif($q, statoconn, {
|
||||
@@ -389,6 +390,8 @@ export default defineComponent({
|
||||
|
||||
function BeforeMount() {
|
||||
// Estrai la Lang dal Localstorage
|
||||
if (!globalStore.finishLoading)
|
||||
return;
|
||||
|
||||
// console.log('$q.i18n=', $q.i18n, '$q.getLocale()=', $q.lang.isoName)
|
||||
const mybrowserLang = getLangAtt()
|
||||
@@ -572,6 +575,8 @@ export default defineComponent({
|
||||
getColorText,
|
||||
costanti,
|
||||
dark,
|
||||
iconConn,
|
||||
clIconConn,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -52,14 +52,6 @@
|
||||
<img :src="imglogo()" height="27" alt="Immagine Logo" />
|
||||
</q-avatar>
|
||||
<div class="q-mx-sm titlesite">{{ getappname() }}</div>
|
||||
<div v-if="site.confpages.show_darkopt" class="text-h7">
|
||||
<q-toggle
|
||||
size="xs"
|
||||
v-model="dark"
|
||||
:label="dark ? 'Scuro' : 'Chiaro'"
|
||||
>
|
||||
</q-toggle>
|
||||
</div>
|
||||
</q-toolbar-title>
|
||||
|
||||
<!--
|
||||
@@ -75,10 +67,13 @@
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div v-if="site.confpages.show_darkopt" class="text-h7">
|
||||
<q-toggle :icon="'fas fa-moon'" v-model="dark"> </q-toggle>
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="
|
||||
!isonline() &&
|
||||
static_data.functionality.SHOW_IF_IS_SERVER_CONNECTION
|
||||
site.confpages.showConnected
|
||||
"
|
||||
flat
|
||||
dense
|
||||
@@ -91,7 +86,7 @@
|
||||
|
||||
<q-btn-dropdown
|
||||
stretch
|
||||
v-if="static_data.lang_available.length > 1"
|
||||
v-if="isfinishLoading && static_data.lang_available.length > 1"
|
||||
flat
|
||||
:label="langshort"
|
||||
auto-close
|
||||
@@ -114,13 +109,13 @@
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
|
||||
<div v-if="static_data.functionality.SHOW_MESSAGES">
|
||||
<div v-if="site.confpages.showMsgs">
|
||||
<message-popover></message-popover>
|
||||
</div>
|
||||
<div v-if="static_data.functionality.SHOW_COINS">
|
||||
<div v-if="site.confpages.showCoins">
|
||||
<coinsPopover v-model="rightCoinsOpen"></coinsPopover>
|
||||
</div>
|
||||
<div v-if="static_data.functionality.SHOW_NOTIF">
|
||||
<div v-if="site.confpages.showNotif">
|
||||
<notifPopover v-model="rightNotifOpen"></notifPopover>
|
||||
</div>
|
||||
|
||||
@@ -133,7 +128,7 @@
|
||||
|
||||
<q-btn
|
||||
class="q-mx-xs"
|
||||
v-if="static_data.functionality.ENABLE_ECOMMERCE && tools.isLogged()"
|
||||
v-if="site.confpages.enableEcommerce && tools.isLogged()"
|
||||
round
|
||||
dense
|
||||
flat
|
||||
@@ -153,7 +148,7 @@
|
||||
<q-btn
|
||||
class="q-mx-xs"
|
||||
v-if="
|
||||
static_data.functionality.ENABLE_ECOMMERCE &&
|
||||
site.confpages.enableEcommerce &&
|
||||
tools.isLogged() &&
|
||||
getnumOrdersCart() > 0
|
||||
"
|
||||
@@ -175,7 +170,7 @@
|
||||
|
||||
<q-btn
|
||||
class="q-mx-xs"
|
||||
v-if="static_data.functionality.SHOW_USER_MENU && !tools.isLogged()"
|
||||
v-if="site.confpages.showUserMenu && !tools.isLogged()"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
@@ -185,7 +180,7 @@
|
||||
</q-btn>
|
||||
<q-avatar
|
||||
v-else-if="
|
||||
static_data.functionality.SHOW_USER_MENU &&
|
||||
site.confpages.showUserMenu &&
|
||||
tools.isLogged() &&
|
||||
getMyImg()
|
||||
"
|
||||
@@ -214,10 +209,6 @@
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<!--<q-btn
|
||||
class="q-mx-xs iconprofile_small" v-if="static_data.functionality.SHOW_USER_MENU && isLogged()" round dense flat
|
||||
@click="rightDrawerOpen = !rightDrawerOpen" :icon="getMyImgforIcon()" :color="getcolormenu()">
|
||||
</q-btn>-->
|
||||
</q-toolbar>
|
||||
</q-header>
|
||||
|
||||
@@ -235,7 +226,7 @@
|
||||
|
||||
<!-- USER BAR -->
|
||||
<q-drawer
|
||||
v-if="static_data.functionality.ENABLE_ECOMMERCE"
|
||||
v-if="site.confpages.enableEcommerce"
|
||||
v-model="rightCartOpen"
|
||||
side="right"
|
||||
elevated
|
||||
@@ -257,7 +248,7 @@
|
||||
</q-drawer>
|
||||
<!-- USER BAR -->
|
||||
<q-drawer
|
||||
v-if="static_data.functionality.SHOW_USER_MENU"
|
||||
v-if="site.confpages.showUserMenu"
|
||||
v-model="rightDrawerOpen"
|
||||
side="right"
|
||||
elevated
|
||||
@@ -396,7 +387,7 @@
|
||||
<div v-show="!tools.isLogged()">
|
||||
<div class="q-ma-md" style="">
|
||||
<CSigninNoreg
|
||||
:showregbutt="static_data.functionality.SHOW_REG_BUTTON"
|
||||
:showregbutt="site.confpages.showRegButton"
|
||||
>
|
||||
</CSigninNoreg>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user