- AbitaregliIblei.it

- Server aggiornamenti agli script.
- Editor HTML corretto un po'.
- Record Mysql per server (appena iniziato)
This commit is contained in:
Surya Paolo
2024-09-06 19:57:17 +02:00
parent 8f4ff8ff9c
commit e9ac281125
50 changed files with 797 additions and 155 deletions

View File

@@ -630,8 +630,8 @@
myrec.mycities[0].comune
"
>
<q-item-section avatar>
<q-icon color="amber" name="fas fa-map-marker-alt" />
<q-item-section avatar>
<q-icon color="amber" name="fas fa-map-marker-alt" />
</q-item-section>
<q-item-section>
<q-item-label>
@@ -652,10 +652,7 @@
}}</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-if="myrec.coordinate_gps"
>
<q-item clickable v-if="myrec.coordinate_gps">
<q-item-section avatar>
<q-icon color="blue" name="fas fa-crosshairs" />
</q-item-section>
@@ -673,7 +670,9 @@
<q-btn
:label="t('attivita.vediinmappa')"
color="primary"
size="sm"
icon="fas fa-map-marker-alt"
size="md"
class="q-my-sm"
@click="showInMap(myrec)"
/>
</q-item-label>

View File

@@ -201,7 +201,7 @@ export default defineComponent({
if (!myel.value.elemsText)
myel.value.elemsText = []
myel.value.elemsText.push({ _id: objectId(), text: '', color: '#ffffff', class: '', size: '', anim: { name: 'FadeIn', clduration: '', cldelay: '', timingtype: 'ease-in-out'} })
myel.value.elemsText.push({ _id: objectId(), text: '', color: '#ffffff', class: '', size: '', anim: { name: 'FadeIn', clduration: '', cldelay: '', timingtype: 'ease-in-out' } })
modifElem()
}
@@ -255,7 +255,7 @@ export default defineComponent({
})
}
} else if ((props.myelem.type === shared_consts.ELEMTYPE.IMGTITLE) ||
(props.myelem.type === shared_consts.ELEMTYPE.IMAGE)) {
(props.myelem.type === shared_consts.ELEMTYPE.IMAGE)) {
myel.value.image = myval
}
modifElem()
@@ -263,11 +263,11 @@ export default defineComponent({
function showAnimation() {
return (myel.value.type === shared_consts.ELEMTYPE.IMAGE)
|| (myel.value.type === shared_consts.ELEMTYPE.IMGTITLE)
|| (myel.value.type === shared_consts.ELEMTYPE.TEXT)
|| (myel.value.type === shared_consts.ELEMTYPE.CARD)
|| (myel.value.type === shared_consts.ELEMTYPE.HTML)
|| (myel.value.type === shared_consts.ELEMTYPE.CAROUSEL_IMGS)
|| (myel.value.type === shared_consts.ELEMTYPE.IMGTITLE)
|| (myel.value.type === shared_consts.ELEMTYPE.TEXT)
|| (myel.value.type === shared_consts.ELEMTYPE.CARD)
|| (myel.value.type === shared_consts.ELEMTYPE.HTML)
|| (myel.value.type === shared_consts.ELEMTYPE.CAROUSEL_IMGS)
}
function updateElem(myvalue: any) {
@@ -278,6 +278,20 @@ export default defineComponent({
modifElem()
}
function generateSizeOptions() {
const options = [];
for (let i = 0; i <= 700; i += 50) {
options.push({ label: `${i}px`, value: `${i}px` });
}
return options;
}
function updateSizeWidth(value: any) {
// Gestisce l'input dell'utente per un nuovo valore
myel.value.widthimg = value; // Aggiorna widthimg con il nuovo valore
modifElem()
}
onMounted(mounted)
return {
@@ -318,6 +332,8 @@ export default defineComponent({
visuadd,
tabadd,
Products,
generateSizeOptions,
updateSizeWidth,
}
},

View File

@@ -59,41 +59,45 @@
>
</q-btn>
</q-bar>
<div class="justify-center row q-ma-xs">
<q-btn
dense
v-if="enableEdit && !disableSave"
icon="fas fa-check"
color="positive"
label="Applica"
size="sm"
:disable="disableSave"
@click="saveElem"
>
</q-btn>
<q-btn
dense
v-if="enableEdit && !disableSave"
icon="fas fa-check"
color="positive"
label="Salva"
size="sm"
:disable="disableSave"
@click="saveElem(true)"
>
</q-btn>
<div class="fixed-button">
<div class="justify-center row q-ma-xs">
<q-btn
dense
v-if="enableEdit && !disableSave"
icon="fas fa-check"
color="positive"
label="Salva Modifiche"
:disable="disableSave"
@click="saveElem"
>
</q-btn>
<!--<q-btn
dense
v-if="enableEdit && !disableSave"
icon="fas fa-check"
color="positive"
label="Salva"
:disable="disableSave"
@click="saveElem(true)"
>
</q-btn>-->
</div>
</div>
<div class="row">
<q-input
<q-select
label="Lunghezza:"
@update:model-value="modifElem"
style="width: 100px"
v-model="myel.widthimg"
emit-value
map-options
:options="generateSizeOptions()"
use-input
use-chips
@input="modifElem"
@new-value="updateSizeWidth"
filled
dense
v-on:keyup.enter="saveElem"
>
</q-input>
style="width: 150px"
/>
<q-input
label="Altezza:"
@update:model-value="modifElem"
@@ -484,15 +488,21 @@
>
</CMyFieldRec>
<div class="row">
<q-input
<q-select
label="Lunghezza Logo:"
@update:model-value="modifElem"
v-model="myel.width"
v-model="myel.widthimg"
emit-value
map-options
:options="generateSizeOptions()"
use-input
use-chips
@input="saveElem"
filled
dense
v-on:keyup.enter="saveElem"
>
</q-input>
@new-value="updateSizeWidth"
style="width: 150px"
/>
<q-input
label="Altezza Logo:"
@update:model-value="modifElem"
@@ -675,15 +685,20 @@
</CMyFieldRec>
<div class="">
<div class="col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 col-sticky">
<q-input
dense
<q-select
label="Lunghezza:"
@update:model-value="modifElem"
v-model="myel.widthimg"
emit-value
map-options
:options="generateSizeOptions()"
@input="modifElem"
filled
v-on:keyup.enter="saveElem"
>
</q-input>
dense
use-input
use-chips
@new-value="updateSizeWidth"
style="width: 150px"
/>
<q-input
dense
label="Altezza:"
@@ -989,8 +1004,9 @@
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
<div v-if="enableEdit" class="row">
<div>Cataloghi:</div><br>
<div>Cataloghi:</div>
<br />
<!--++AddCATALOGO_FIELDS-->
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
@@ -1008,10 +1024,12 @@
map-options
>
</q-select>
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
v-if="enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes"
v-if="
enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes
"
rounded
outlined
v-model="myel.catalogo.excludeproductTypes"
@@ -1041,15 +1059,20 @@
map-options
option-value="_id"
option-label="name"
>
</q-select>
Versione PDF: <q-toggle v-model="myel.catalogo.pdf" color="positive" icon="fas fa-file-pdf"
@update:model-value="modifElem">
</q-toggle>
Versione PDF:
<q-toggle
v-model="myel.catalogo.pdf"
color="positive"
icon="fas fa-file-pdf"
@update:model-value="modifElem"
>
</q-toggle>
</div>
</div>
</div>
<br /><br /><br />
</div>
<div>
<q-dialog

View File

@@ -64,7 +64,7 @@ export default defineComponent({
CMyProfileTutorial, CSendRISTo,
CTitleBanner, CShareSocial, CCheckAppRunning, CRegistration,
CVisuVideoPromoAndPDF, CECommerce, CCatalogo, CAITools,
CMapComuni, CMapUsers, CMapGetCoordinates, CMapEditAddressByCoord,
CMapComuni, CMapUsers, CMapGetCoordinates, CMapEditAddressByCoord,
CDashGroup,
// , //CMapMarker,
},
@@ -123,8 +123,8 @@ export default defineComponent({
const isAppRunning = computed(() => globalStore.isAppRunning)
const coordaddr = ref(<ICoordGPS> { address: '', coordinates: [0, 0] })
const coordaddr = ref(<ICoordGPS>{ address: '', coordinates: [0, 0] })
watch(() => myel.value.order, (value, oldval) => {
mounted()
})

View File

@@ -513,10 +513,10 @@
</q-btn>
</div>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.BOTT_CHAT_TERRITORIALE">
<div v-if="editOn" class="elemEdit">
Bottone Chat Territoriale
</div>
<div
v-else-if="myel.type === shared_consts.ELEMTYPE.BOTT_CHAT_TERRITORIALE"
>
<div v-if="editOn" class="elemEdit">Bottone Chat Territoriale</div>
<div class="row justify-evenly items-center">
<q-btn
v-if="tools.getLinkChatTerritoriale()"
@@ -525,7 +525,11 @@
type="a"
size="md"
rounded
:label="$t('dashboard.link_gruppo_telegram', { prov: tools.getProvincia() })"
:label="
$t('dashboard.link_gruppo_telegram', {
prov: tools.getProvincia(),
})
"
:href="tools.getLinkChatTerritoriale()"
target="__blank"
>
@@ -559,8 +563,7 @@
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
<div v-if="editOn" class="elemEdit">PRODOTTI CATALOGO:</div>
<CCatalogo
:optcatalogo="myel.catalogo"> </CCatalogo>
<CCatalogo :optcatalogo="myel.catalogo"> </CCatalogo>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPA">
<div v-if="editOn" class="elemEdit">MAPPA:</div>
@@ -570,25 +573,22 @@
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPAUTENTI">
<div v-if="editOn" class="elemEdit">MAPPA UTENTI:</div>
<CMapUsers
></CMapUsers>
<CMapUsers></CMapUsers>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPAGETCOORDINATE">
<div v-if="editOn" class="elemEdit">MAPPA COORDINATE:</div>
<CMapGetCoordinates
></CMapGetCoordinates>
<CMapGetCoordinates></CMapGetCoordinates>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.EDITADDRESSBYCOORD">
<div v-if="editOn" class="elemEdit">EDIT ADDRESS BY COORD:</div>
<CMapEditAddressByCoord
<CMapEditAddressByCoord
:editaddress="true"
v-model:model-value="coordaddr"
v-model:model-value="coordaddr"
></CMapEditAddressByCoord>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPACOMUNI">
<div v-if="editOn" class="elemEdit">MAPPA COMUNI:</div>
<CMapComuni
></CMapComuni>
<CMapComuni></CMapComuni>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.TOOLSAI">
<div v-if="editOn" class="elemEdit">STRUMENTI AI:</div>

View File

@@ -24,8 +24,8 @@ export default defineComponent({
const mystyle = ref('')
function mounted() {
console.log('mounted')
console.log(props.src)
// console.log(props.src)
if (props.width)
mystyle.value = 'max-width: ' + props.width + 'px; '

View File

@@ -65,12 +65,14 @@ export default defineComponent({
const globalStore = useGlobalStore()
const $router = useRouter()
const mywidthEditor = ref(400)
const editOn = computed({
get (): boolean {
get(): boolean {
return !!globalStore.editOn ? globalStore.editOn : false
},
set (value: boolean) {
set(value: boolean) {
return globalStore.editOn = value
}
})
@@ -141,6 +143,10 @@ export default defineComponent({
globalStore.changeVisuDrawer(path, edit)
}
function toggleSize() {
mywidthEditor.value = mywidthEditor.value === 400 ? 1200 : 400
}
onMounted(mounted)
return {
@@ -156,6 +162,8 @@ export default defineComponent({
selElem,
saveElem,
changeVisuDrawer,
mywidthEditor,
toggleSize,
}
},

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div v-if="mypathin && !!rec">
<q-toggle
<q-toggle
v-if="tools.isManager()"
v-model="editOn"
dense
@@ -18,8 +18,9 @@
show-if-above
:breakpoint="800"
side="right"
:width="tools.isMobile() ? 350 : 400"
:width="tools.isMobile() ? 350 : mywidthEditor"
elevated
style="transition: 'width 0.3s ease'"
>
<q-bar dense class="q-ma-xs bg-primary text-white">
<q-toolbar-title> Editor </q-toolbar-title>
@@ -29,10 +30,15 @@
size="md"
color="white"
icon="close"
@click="visuEditor = false; selElem = {};"
@click="
visuEditor = false;
selElem = {};
"
></q-btn>
</q-bar>
<q-btn class="q-ma-sm" @click="toggleSize" label="<" color="primary" />
<CMyEditElem
:myelem="selElem"
:editOn="true"
@@ -42,7 +48,7 @@
</CMyEditElem>
</q-drawer>
<div class="q-gutter-xs" style="margin-left: 1px; margin-right: 1px;">
<div class="q-gutter-xs" style="margin-left: 1px; margin-right: 1px">
<div v-if="!!rec.img1" class="text-center">
<q-img :src="`` + rec.img1" class="img"></q-img>
</div>
@@ -76,7 +82,6 @@
<div v-for="(myelem, ind) in myelems" :key="ind">
<div>
<CMyElem
v-if="(myelem.active || editOn) && !!rec.path"
:myelem="myelem"
@@ -120,9 +125,7 @@
<CImgTitle v-if="img" :src="img" :title="title"> </CImgTitle>
</div>
<slot></slot>
<div v-if="!nofooter">
</div>
<div v-if="!nofooter"></div>
</div>
</div>
</div>

View File

@@ -461,7 +461,7 @@ export default defineComponent({
}
function mounted() {
console.log('mounted')
myrow.value = props.rec && props.isrec ? { ...props.rec } : { ...props.row }