CheckBox, Pages, Editor

This commit is contained in:
Paolo Arena
2021-10-01 03:08:43 +02:00
parent 489c4fecc7
commit 2384e485a5
40 changed files with 413 additions and 205 deletions

View File

@@ -11,7 +11,7 @@ PROVA_PAOLO="PROVA ENV FUNZIONA!"
LANG_DEFAULT="it" LANG_DEFAULT="it"
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF" PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T" MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
MONGODB_HOST="http://192.168.1.6:3000" MONGODB_HOST="http://192.168.1.8:3000"
LOGO_REG="freeplanet-logo-full.svg" LOGO_REG="freeplanet-logo-full.svg"
TEST_NAME="Paolo" TEST_NAME="Paolo"
TEST_SURNAME="Arena" TEST_SURNAME="Arena"

View File

@@ -19,7 +19,7 @@ TEST_EMAIL="paolo@freeplanet.app"
TEST_USERNAME="paoloar77" TEST_USERNAME="paoloar77"
TEST_PASSWORD="passpao1fr@1A" TEST_PASSWORD="passpao1fr@1A"
TEST_APORTADOR="" TEST_APORTADOR=""
PUBLICKEY_PUSH="BNM-cEpTbPVc_ujXf3QOC8ggf7b-X44P44esfJUWqNOFq1XhWCoZJpOi71_cbXC5SnfO9HassQ6OouAYgtBA9Pw" PUBLICKEY_PUSH="BNRBtL3iaLVGW-aQckwQBmh5uKKzcizOZsMjnzCtSuHkssEhbyioEN2E_CwItDLDShMO-OQ1uhK51ty6zG_gCT8"
IN_CONSTRUCTION="0" IN_CONSTRUCTION="0"
DEBUG="1" DEBUG="1"
TELEGRAM_SUPPORT="" TELEGRAM_SUPPORT=""

View File

@@ -17,7 +17,7 @@ const webpack = require('webpack')
const helpers = require('./helpers') const helpers = require('./helpers')
const envparser = require('./config/envparser') const envparser = require('./config/envparser')
const ESLintPlugin = require('eslint-webpack-plugin') // const ESLintPlugin = require('eslint-webpack-plugin')
module.exports = configure((ctx) => ({ module.exports = configure((ctx) => ({
// https://v2.quasar.dev/quasar-cli/supporting-ts // https://v2.quasar.dev/quasar-cli/supporting-ts
@@ -276,8 +276,8 @@ module.exports = configure((ctx) => ({
// for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts]) // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts])
// if using workbox in InjectManifest mode // if using workbox in InjectManifest mode
chainWebpackCustomSW(chain) { chainWebpackCustomSW(chain) {
chain.plugin('eslint-webpack-plugin') // chain.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }]) // .use(ESLintPlugin, [{ extensions: ['js'] }])
}, },
manifest: { manifest: {

1
quasar.extensions.json Normal file
View File

@@ -0,0 +1 @@
{}

View File

@@ -74,7 +74,7 @@ if (!workbox) {
} }
if (workbox) { if (workbox) {
const debug = true const debug = false
workbox.setConfig({ debug }) workbox.setConfig({ debug })
const precacheList = self.__WB_MANIFEST || []; const precacheList = self.__WB_MANIFEST || [];

View File

@@ -38,7 +38,7 @@ export default {
} }
} }
function created() { async function created() {
try { try {
if (process.env.DEV) { if (process.env.DEV) {
console.info('SESSIONE IN SVILUPPO ! (DEV)') console.info('SESSIONE IN SVILUPPO ! (DEV)')
@@ -67,7 +67,7 @@ export default {
if (chiamaautologin) { if (chiamaautologin) {
// console.log('CHIAMA autologin_FromLocalStorage') // console.log('CHIAMA autologin_FromLocalStorage')
userStore.autologin_FromLocalStorage($router) await userStore.autologin_FromLocalStorage($router)
.then((loadstorage: any) => { .then((loadstorage: any) => {
if (loadstorage) { if (loadstorage) {

View File

@@ -69,7 +69,7 @@ export default defineComponent({
const saveit = ref(false) const saveit = ref(false)
const myvalue = ref(new Date()) const myvalue = ref(new Date())
const valueprec = ref(new Date()) const valueprec = ref(new Date())
const valueDate = toRef(props, 'valueDate') const myvalueDate = toRef(props, 'valueDate')
function getclass() { function getclass() {
return 'calendar_comp ' + props.data_class return 'calendar_comp ' + props.data_class
@@ -80,10 +80,10 @@ export default defineComponent({
saveit.value = false saveit.value = false
valueprec.value = myvalue.value valueprec.value = myvalue.value
if (myvalue.value === undefined) { if (myvalue.value === undefined) {
valueDate.value = new Date() myvalueDate.value = new Date()
myvalue.value = tools.getstrYYMMDDDateTime(valueDate.value) myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value)
} }
// console.log('Opening', valueDate, myvalue) // console.log('Opening', myvalueDate, myvalue)
emit('show') emit('show')
} }
@@ -97,9 +97,11 @@ export default defineComponent({
} }
} }
watch(() => props.valueDate, (value, oldval) => { watch(() => myvalueDate.value, (value, oldval) => {
if (props.valueDate) if (myvalueDate.value) {
myvalue.value = tools.getstrYYMMDDDateTime(props.valueDate) myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value)
console.log('myvalue Date = ', myvalue.value)
}
}) })
@@ -129,7 +131,7 @@ export default defineComponent({
if (props.value !== null) if (props.value !== null)
myvalue.value = props.value myvalue.value = props.value
else else
myvalue.value = tools.getstrYYMMDDDateTime(valueDate.value) myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value)
// console.log('created myvalue', myvalue) // console.log('created myvalue', myvalue)
} }
@@ -166,6 +168,8 @@ export default defineComponent({
Closing, Closing,
Opening, Opening,
getclass, getclass,
myvalue,
showDateTimeScroller,
} }
}, },
}) })

View File

@@ -1,72 +1,82 @@
<template> <template>
<div class="" :style="mystyle"> <div class="" :style="mystyle">
<q-input <q-input
v-model="myvalue" v-model="myvalue"
v-show="false" v-show="false"
color="blue-6" color="blue-6"
hide-bottom-space hide-bottom-space
outlined outlined
borderless borderless
:label="label" :label="label"
:bg-color="bgcolor" :bg-color="bgcolor"
:readonly="true" :readonly="true"
:dense="dense" :dense="dense"
mask="####-##-## ##:##" mask="####-##-## ##:##"
debounce="500" debounce="500"
@input="changeval" @input="changeval"
:input-class="getclass" :input-class="getclass"
> >
</q-input> </q-input>
<q-field <q-field
:label="label" :label="label"
stack-label stack-label
:value="myvalue" :value="myvalue"
outlined outlined
:dense="dense" :dense="dense"
color="blue-6" color="blue-6"
:bg-color="bgcolor" :bg-color="bgcolor"
debounce="500" debounce="500"
:input-class="getclass"> :input-class="getclass">
<template v-slot:control> <template v-slot:control>
<div style=""> <div style="">
<div class="self-center full-width no-outline" :style="mystyle" tabindex="0"> <div class="self-center full-width no-outline" :style="mystyle" tabindex="0">
{{ getstrDate(myvalue) }} {{ getstrDate(myvalue) }}
</div> </div>
</div> </div>
</template> </template>
<template v-slot:append> <template v-slot:append>
<q-icon v-if="canEdit" name="event" class="cursor-pointer"> <q-icon v-if="canEdit" name="event" class="cursor-pointer">
<q-popup-proxy v-model="showDateTimeScroller" @before-show="Opening" @before-hide="Closing"> <q-popup-proxy v-model="showDateTimeScroller" @before-show="Opening" @before-hide="Closing">
<!--
<q-input
v-model="myvalue"
type="datetime"
@input="changeval"
@close="() => { savetoclose(); }"
>
</q-input>
-->
<!--
<q-scroller
v-model="myvalue"
:view="view"
:locale="toolsext.getLocale()"
:rounded-borders="true"
border-color="#2196f3"
bar-color="#2196f3"
text-color="white"
color="primary"
:minute-interval="minuteinterval"
inner-text-color="primary"
inner-color="white"
:style="scrollerPopupStyle280"
@input="changeval"
@close="() => { savetoclose(); }"
></q-scroller>
-->
<q-scroller </q-popup-proxy>
v-model="myvalue" </q-icon>
:view="view" </template>
:locale="toolsext.getLocale()" </q-field>
:rounded-borders="true" </div>
border-color="#2196f3"
bar-color="#2196f3"
text-color="white"
color="primary"
:minute-interval="minuteinterval"
inner-text-color="primary"
inner-color="white"
:style="scrollerPopupStyle280"
@input="changeval"
@close="() => { savetoclose(); }"
></q-scroller>
</q-popup-proxy>
</q-icon>
</template>
</q-field>
</div>
</template> </template>
<script lang="ts" src="./CDateTime.ts"> <script lang="ts" src="./CDateTime.ts">
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import './CDateTime.scss'; @import './CDateTime.scss';
</style> </style>

View File

@@ -211,7 +211,7 @@ export default defineComponent({
} }
function save() { function save() {
emit('showandsave', mylistimages) emit('showandsave', mylistimages.value)
} }
function getsrcimg(mygallery: any) { function getsrcimg(mygallery: any) {
@@ -237,6 +237,8 @@ export default defineComponent({
copytoclipboard, copytoclipboard,
deleteFile, deleteFile,
getsrcimg, getsrcimg,
tools,
uploaded,
} }
} }
}) })

View File

@@ -2,12 +2,12 @@
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> --> <!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
<div> <div>
<div v-if="!edit"> <div v-if="!edit">
<div v-for="(mygallery, index) in getlistimages" :key="index"> <div v-for="(mygallery, index) in getlistimages()" :key="index">
<div v-if="index === 0"> <div v-if="index === 0">
<div class="q-pa-md q-gutter-md"> <div class="q-pa-md q-gutter-md">
<q-card :class="getclass"> <q-card :class="getclass()">
<q-img <q-img
:src="getsrcimg(mygallery)" :class="getclimg" :src="getsrcimg(mygallery)" :class="getclimg()"
:alt="mygallery.alt"> :alt="mygallery.alt">
<div class="absolute-bottom text-shadow"> <div class="absolute-bottom text-shadow">
{{ listimages.length }} files {{ listimages.length }} files
@@ -22,7 +22,7 @@
<div class=" row"> <div class=" row">
<!--<q-draggable-rows <!--<q-draggable-rows
v-model="order">--> v-model="order">-->
<div v-for="(mygallery, index) in getlistimages" :key="index"> <div v-for="(mygallery, index) in getlistimages()" :key="index">
<div <div
class="q-pa-sm q-gutter-sm" class="q-pa-sm q-gutter-sm"
@dragenter="onDragEnter" @dragenter="onDragEnter"
@@ -30,7 +30,7 @@
@dragover="onDragOver"> @dragover="onDragOver">
<q-card <q-card
:id="mygallery._id" :class="getclass" :id="mygallery._id" :class="getclass()"
draggable="true" draggable="true"
@dragstart="onDragStart" @dragstart="onDragStart"
@drop="onDrop" @drop="onDrop"
@@ -38,7 +38,7 @@
<q-img <q-img
:src="getsrcimg(mygallery)" :src="getsrcimg(mygallery)"
:class="getclimg" :class="getclimg()"
:alt="mygallery.alt"> :alt="mygallery.alt">
<div class="absolute-bottom text-shadow"> <div class="absolute-bottom text-shadow">
<!-- <div class="text-h6 text-trans">{{ mygallery.description }} </div> --> <!-- <div class="text-h6 text-trans">{{ mygallery.description }} </div> -->

View File

@@ -1,4 +1,4 @@
import { defineComponent, PropType, ref, watch, toRef, onMounted, toRefs } from 'vue' import { defineComponent, PropType, ref, watch, toRef, onMounted, toRefs, computed } from 'vue'
import { useI18n } from '@src/boot/i18n' import { useI18n } from '@src/boot/i18n'
import { tools } from '../../store/Modules/tools' import { tools } from '../../store/Modules/tools'
@@ -95,6 +95,7 @@ export default defineComponent({
const { t } = useI18n() const { t } = useI18n()
const userStore = useUserStore() const userStore = useUserStore()
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
const isfinishLoading = computed(() => globalStore.finishLoading)
const mypagination = toRef(props, 'pagination') const mypagination = toRef(props, 'pagination')
@@ -302,7 +303,7 @@ export default defineComponent({
} }
function disabilita() { function disabilita() {
if ((mytable.value === 'users') && (isTutor)) { if ((mytable.value === 'users') && (isTutor())) {
return true return true
} }
@@ -323,7 +324,7 @@ export default defineComponent({
} }
function undoVal() { function undoVal() {
console.log('undoVal', 'colsel', colsel, 'valprec', valPrec, 'colkey', colkey, 'selected', rowsel) console.log('undoVal', 'colsel', colsel.value, 'valprec', valPrec, 'colkey', colkey, 'selected', rowsel.value)
// console.table(serverData) // console.table(serverData)
if (colsel.value) { if (colsel.value) {
if (colsel.value.subfield !== '') { if (colsel.value.subfield !== '') {
@@ -340,7 +341,7 @@ export default defineComponent({
} }
function SaveValdb(newVal: any, valinitial: any) { function SaveValdb(newVal: any, valinitial: any) {
// console.log('SaveValdb', newVal) console.log('SaveValdb', newVal)
// console.log('SaveValue', newVal, 'rowsel', rowsel) // console.log('SaveValue', newVal, 'rowsel', rowsel)
colsel.value = colclicksel.value colsel.value = colclicksel.value
@@ -353,7 +354,7 @@ export default defineComponent({
function showandsel(row: any, col: any, newval: any, valinitial: any) { function showandsel(row: any, col: any, newval: any, valinitial: any) {
// console.log('showandsel', row, col, newval) // console.log('showandsel', row, col, newval)
rowsel = row rowsel = row
colsel = col colsel.value = col
idsel = row._id idsel = row._id
SaveValue(newval, valinitial) SaveValue(newval, valinitial)
@@ -369,7 +370,7 @@ export default defineComponent({
} }
function SaveValue(newVal: any, valinitial: any) { function SaveValue(newVal: any, valinitial: any) {
// console.log('SaveValue', newVal, 'rowsel', rowsel) console.log('SaveValue', newVal, 'rowsel', rowsel, 'colsel', colsel.value)
if (colsel.value) { if (colsel.value) {
// Update value in table memory // Update value in table memory
@@ -384,7 +385,7 @@ export default defineComponent({
const mydata = <any>{ const mydata = <any>{
id: idsel, id: idsel,
table: mytable, table: mytable.value,
fieldsvalue: {} fieldsvalue: {}
} }
@@ -396,9 +397,7 @@ export default defineComponent({
} }
// mydata.fieldsvalue[colsel.value.field][colsel.subfield] = newVal // mydata.fieldsvalue[colsel.value.field][colsel.subfield] = newVal
} else { } else {
if (colsel.value) { mydata.fieldsvalue[colsel.value.field!] = newVal
mydata.fieldsvalue[colsel.value.field!] = newVal
}
} }
} }
@@ -456,14 +455,17 @@ export default defineComponent({
} }
async function createNewRecord() { async function createNewRecord() {
console.log('createNewRecord')
loading.value = true loading.value = true
const mydata: any = { const mydata: any = {
table: mytable, table: mytable.value,
data: {} data: {}
} }
mydata.data = props.defaultnewrec if (props.defaultnewrec) {
mydata.data = props.defaultnewrec
}
// const mykey = fieldsTable.getKeyByTable(mytable) // const mykey = fieldsTable.getKeyByTable(mytable)
@@ -493,14 +495,14 @@ export default defineComponent({
} }
function mounted() { function mounted() {
console.log('GridTable mounted', tablesel) //console.log('GridTable mounted', tablesel)
if (!!props.tablesList) { if (!!props.tablesList) {
canEdit.value = tools.getCookie(tools.CAN_EDIT, canEdit) === 'true' canEdit.value = tools.getCookie(tools.CAN_EDIT, canEdit) === 'true'
tablesel.value = tools.getCookie('tablesel', tablesel) tablesel.value = tools.getCookie('tablesel', tablesel)
} }
myfilterand.value = props.filterdef myfilterand.value = props.filterdef
console.log('tablesel', tablesel) // console.log('tablesel', tablesel)
if (tablesel.value === '') { if (tablesel.value === '') {
if (!!props.tablesList) if (!!props.tablesList)
@@ -509,7 +511,7 @@ export default defineComponent({
tablesel.value = mytable.value tablesel.value = mytable.value
} }
console.log('2) tablesel', tablesel) // console.log('2) tablesel', tablesel)
changeTable(false) changeTable(false)
@@ -518,7 +520,7 @@ export default defineComponent({
function clickFunz(item: any, col: IColGridTable) { function clickFunz(item: any, col: IColGridTable) {
if (col.action) { if (col.action) {
tools.ActionRecTable(null, col.action, mytable.value, item._id, item, col.askaction) tools.ActionRecTable($q, col.action, mytable.value, item._id, item, col.askaction)
} }
} }
@@ -548,9 +550,9 @@ export default defineComponent({
} }
function changeCol(newval: any) { function changeCol(newval: any) {
console.log('changecol', mytable) console.log('changecol', mytable.value)
if (!!mytable.value) { if (!!mytable.value) {
tools.setCookie(mytable, colVisib.value.join('|')) tools.setCookie(mytable.value, colVisib.value.join('|'))
} }
} }
@@ -606,7 +608,7 @@ export default defineComponent({
updatedcol() updatedcol()
if (!!mytable.value) { if (!!mytable.value) {
const myselcol = tools.getCookie(mytable, '') const myselcol = tools.getCookie(mytable.value, '')
if (!!myselcol && myselcol.length > 0) { if (!!myselcol && myselcol.length > 0) {
colVisib.value = myselcol.split('|') colVisib.value = myselcol.split('|')
} else { } else {
@@ -682,7 +684,7 @@ export default defineComponent({
console.log('saveNewRecord') console.log('saveNewRecord')
savenewRec.value = true savenewRec.value = true
const mydata = { const mydata = {
table: mytable, table: mytable.value,
data: {} data: {}
} }
@@ -705,10 +707,6 @@ export default defineComponent({
} }
} }
function isfinishLoading() {
return globalStore.finishLoading
}
function getlabelAddRow() { function getlabelAddRow() {
return props.labelBtnAddRow return props.labelBtnAddRow
} }
@@ -765,6 +763,9 @@ export default defineComponent({
myfilter, myfilter,
disabilita, disabilita,
newRecordBool, newRecordBool,
lists,
refresh,
spinner_visible,
} }
} }
}) })

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="q-pa-xs" v-if="isfinishLoading()"> <div class="q-pa-xs" v-if="isfinishLoading">
<div class="centermydiv q-ma-sm" style="text-align: center"> <div class="centermydiv q-ma-sm" style="text-align: center">
<q-btn <q-btn
v-if="mytable && visButtRow()" rounded dense color="primary" v-if="mytable && visButtRow()" rounded dense color="primary"
@@ -47,7 +47,7 @@
</q-tr> </q-tr>
</template> </template>
<template> <template v-slot:top-right>
<div class="q-table__title" style="min-width: 150px;">{{ mytitle }}</div> <div class="q-table__title" style="min-width: 150px;">{{ mytitle }}</div>
<!--<p style="color:red"> Rows: {{ getrows }}</p>--> <!--<p style="color:red"> Rows: {{ getrows }}</p>-->
@@ -56,13 +56,13 @@
v-model="search" filled dense type="search" debounce="500" hint="Search" v-model="search" filled dense type="search" debounce="500" hint="Search"
v-on:keyup.enter="doSearch"> v-on:keyup.enter="doSearch">
<template v-slot:after> <template v-slot:after>
<q-btn v-if="mytable" label="" color="primary" @click="refresh()" icon="search"></q-btn> <q-btn v-if="mytable" label="" color="primary" @click="refresh" icon="search"></q-btn>
</template> </template>
</q-input> </q-input>
<q-toggle <q-toggle
v-if="mytable" v-model="canEdit" :disable="disabilita()" :val="lists.MenuAction.CAN_EDIT_TABLE" v-if="mytable" v-model="canEdit" :disable="disabilita()" :val="lists.MenuAction.CAN_EDIT_TABLE"
class="q-mx-sm" class="q-mx-sm"
:label="$t('grid.editvalues')" @input="changefuncAct"> :label="$t('grid.editvalues')" @update:model-value="changefuncAct">
</q-toggle> </q-toggle>
<q-btn <q-btn
@@ -135,6 +135,7 @@
<div <div
v-if="colVisib.includes(col.field + col.subfield)" class="tdclass"> v-if="colVisib.includes(col.field + col.subfield)" class="tdclass">
<div :class="getclrow(props.row)"> <div :class="getclrow(props.row)">
<CMyPopupEdit <CMyPopupEdit
:canEdit="canEdit" :canEdit="canEdit"
:disable="disabilita()" :disable="disabilita()"
@@ -196,6 +197,7 @@
<div <div
class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb" class="q-ma-sm q-pa-sm colmodif col-grow rounded-borders " style="border: 1px solid #bbb"
@click="colclicksel = mycol"> @click="colclicksel = mycol">
<CMyPopupEdit <CMyPopupEdit
:canEdit="true" :canEdit="true"
:disable="disabilita()" :disable="disabilita()"

View File

@@ -119,8 +119,8 @@ export default defineComponent({
myvalue.value = tools.convertiTagHTMLPerBOT(myvalue.value) myvalue.value = tools.convertiTagHTMLPerBOT(myvalue.value)
console.log('saveval', myvalue) console.log('saveval', myvalue.value)
emit('showandsave', myvalue) emit('showandsave', myvalue.value)
// emit('update:value', myvalue) // emit('update:value', myvalue)
showeditor.value = false showeditor.value = false
} }

View File

@@ -30,7 +30,7 @@
:toolbar="toolbarcomp" :toolbar="toolbarcomp"
debounce="500" debounce="500"
:fonts="myfonts" :fonts="myfonts"
@input="changeval" @update:model-value="changeval"
@paste="evt => pasteCapture(evt)" @paste="evt => pasteCapture(evt)"
@keyup.enter.stop @keyup.enter.stop
v-model="myvalue"> v-model="myvalue">

View File

@@ -15,6 +15,7 @@ import { CMyChipList } from '@/components/CMyChipList'
import { CMyToggleList } from '@/components/CMyToggleList' import { CMyToggleList } from '@/components/CMyToggleList'
import { CDateTime } from '@/components/CDateTime' import { CDateTime } from '@/components/CDateTime'
export default defineComponent({ export default defineComponent({
name: 'CMyFieldDb', name: 'CMyFieldDb',
props: { props: {
@@ -185,7 +186,7 @@ export default defineComponent({
setValDb(myq, props.mykey, myvalue.value, props.type, props.serv, props.table, props.mysubkey, props.id) setValDb(myq, props.mykey, myvalue.value, props.type, props.serv, props.table, props.mysubkey, props.id)
} }
function savefieldboolean($q: any, value: any) { function savefieldboolean(value: any) {
if (myvalue.value === undefined) if (myvalue.value === undefined)
myvalue.value = 'true' myvalue.value = 'true'
else else
@@ -228,6 +229,8 @@ export default defineComponent({
tools, tools,
costanti, costanti,
myq: $q, myq: $q,
fieldsTable,
globalStore,
} }
}, },
}) })

View File

@@ -48,10 +48,10 @@
<CMyChipList <CMyChipList
:type="costanti.FieldType.binary" :type="costanti.FieldType.binary"
:value="myvalue" :value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div> </div>
<!-- Show Value --> <!-- Show Value -->
<div v-else-if="type === costanti.FieldType.nationality"> <div v-else-if="type === costanti.FieldType.nationality">
@@ -86,20 +86,20 @@
<CMyChipList <CMyChipList
:type="type" :type="type"
:value="myvalue" :value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div> </div>
<div v-else-if="type === costanti.FieldType.select"> <div v-else-if="type === costanti.FieldType.select">
<CMyChipList <CMyChipList
myclass="text-center" myclass="text-center"
:type="costanti.FieldType.select" :type="costanti.FieldType.select"
:value="myvalue" :value="myvalue"
:options="db_fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="db_fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
</div> </div>
<div v-else-if="type === costanti.FieldType.html"> <div v-else-if="type === costanti.FieldType.html">
<div v-html="myvalprinted()"> <div v-html="myvalprinted()">
@@ -109,7 +109,7 @@
<div v-else-if="type === costanti.FieldType.boolean"> <div v-else-if="type === costanti.FieldType.boolean">
<q-toggle <q-toggle
dark color="green" v-model="myvalue" :label="col.title" dark color="green" v-model="myvalue" :label="col.title"
@input="savefieldboolean($q)"></q-toggle> @update:model-value="savefieldboolean"></q-toggle>
</div> </div>
<div v-else> <div v-else>
<div v-html="myvalprinted()"></div> <div v-html="myvalprinted()"></div>
@@ -168,10 +168,10 @@
<div v-else-if="type === costanti.FieldType.binary"> <div v-else-if="type === costanti.FieldType.binary">
<CMyToggleList <CMyToggleList
:label="col.title" :label="col.title"
:options="db_fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
v-model:value="myvalue" v-model:value="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"> :optlab="fieldsTable.getLabelByTable(col.jointable)">
</CMyToggleList> </CMyToggleList>
</div> </div>
<div v-else-if="type === costanti.FieldType.html"> <div v-else-if="type === costanti.FieldType.html">
@@ -183,9 +183,9 @@
<CMySelect <CMySelect
:label="col.title" :label="col.title"
v-model:value="myvalue" v-model:value="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:options="db_fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:useinput="false"> :useinput="false">
</CMySelect> </CMySelect>
</div> </div>
@@ -240,10 +240,10 @@
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect"> <div v-else-if="col.fieldtype === costanti.FieldType.multiselect">
<CMyToggleList <CMyToggleList
:label="col.title" :label="col.title"
:options="db_fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
v-model:value="myvalue" v-model:value="myvalue"
:optval="db_fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="db_fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:isarray="true"> :isarray="true">
</CMyToggleList> </CMyToggleList>
@@ -255,12 +255,12 @@
outlined outlined
multiple multiple
options-dense options-dense
:display-value="db_fieldsTable.getTitleByTable(col.jointable)" :display-value="fieldsTable.getTitleByTable(col.jointable)"
emit-value emit-value
map-options map-options
:options="db_fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:option-label="db_fieldsTable.getLabelByTable(col.jointable)" :option-label="fieldsTable.getLabelByTable(col.jointable)"
:option-value="db_fieldsTable.getKeyByTable(col.jointable)" :option-value="fieldsTable.getKeyByTable(col.jointable)"
style="min-width: 150px" style="min-width: 150px"
> >

View File

@@ -3,7 +3,7 @@
<div v-if="mypath && !!rec"> <div v-if="mypath && !!rec">
<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="!!rec.img1" class="text-center"> <div v-if="!!rec.img1" class="text-center">
<q-img :src="`public/`+ rec.img1" class="img"></q-img> <q-img :src="``+ rec.img1" class="img"></q-img>
</div> </div>
<div v-if="!!rec.content" v-html="rec.content"></div> <div v-if="!!rec.content" v-html="rec.content"></div>
@@ -11,14 +11,14 @@
</q-video> </q-video>
<div v-if="!!rec.img2" class="text-center"> <div v-if="!!rec.img2" class="text-center">
<q-img :src="`public/`+ rec.img2" class="img"></q-img> <q-img :src="``+ rec.img2" class="img"></q-img>
</div> </div>
<div v-if="!!rec.content2" v-html="rec.content2"></div> <div v-if="!!rec.content2" v-html="rec.content2"></div>
<q-video v-if="!!rec.video2" :src="rec.video2" :ratio="rec.ratio2"></q-video> <q-video v-if="!!rec.video2" :src="rec.video2" :ratio="rec.ratio2"></q-video>
<div v-if="!!rec.img3" class="text-center"> <div v-if="!!rec.img3" class="text-center">
<q-img :src="`public/`+ rec.img2" class="img"></q-img> <q-img :src="``+ rec.img2" class="img"></q-img>
</div> </div>
<div v-if="!!rec.content3" v-html="rec.content3"></div> <div v-if="!!rec.content3" v-html="rec.content3"></div>

View File

@@ -192,7 +192,6 @@ export default defineComponent({
} }
function Savedb(newVal: any, valinitial: any) { function Savedb(newVal: any, valinitial: any) {
console.log('Savedb')
if (props.col.fieldtype === costanti.FieldType.boolean) { if (props.col.fieldtype === costanti.FieldType.boolean) {
// console.log('myvalue', myvalue, newVal, myvalueprec) // console.log('myvalue', myvalue, newVal, myvalueprec)
@@ -334,6 +333,7 @@ export default defineComponent({
costanti, costanti,
fieldsTable, fieldsTable,
onInput, onInput,
globalStore,
} }
} }
}) })

View File

@@ -104,7 +104,7 @@
:type="costanti.FieldType.binary" :type="costanti.FieldType.binary"
:value="myvalue" :value="myvalue"
@input="changevalRec" @input="changevalRec"
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
@@ -115,7 +115,7 @@
@input="changevalRec" @input="changevalRec"
:type="costanti.FieldType.multiselect" :type="costanti.FieldType.multiselect"
:value="myvalue" :value="myvalue"
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
@@ -126,7 +126,7 @@
myclass="text-center" myclass="text-center"
:type="costanti.FieldType.select" :type="costanti.FieldType.select"
:value="myvalue" :value="myvalue"
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
@@ -135,7 +135,7 @@
<q-toggle <q-toggle
dark color="green" v-model="myvalue" :label="col.title" dark color="green" v-model="myvalue" :label="col.title"
:disable="disable && col.name !== 'profile.saw_zoom_presentation'" :disable="disable && col.name !== 'profile.saw_zoom_presentation'"
@input="changevalRec"></q-toggle> @update:model-value="changevalRec"></q-toggle>
</div> </div>
<div v-else-if="col.fieldtype === costanti.FieldType.html"> <div v-else-if="col.fieldtype === costanti.FieldType.html">
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"> <div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true">
@@ -204,7 +204,7 @@
<CMyChipList <CMyChipList
:type="costanti.FieldType.binary" :type="costanti.FieldType.binary"
:value="myvalue" :value="myvalue"
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
@@ -214,7 +214,7 @@
<CMyChipList <CMyChipList
:type="costanti.FieldType.multiselect" :type="costanti.FieldType.multiselect"
:value="myvalue" :value="myvalue"
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
@@ -224,7 +224,7 @@
myclass="text-center" myclass="text-center"
:type="costanti.FieldType.select" :type="costanti.FieldType.select"
:value="myvalue" :value="myvalue"
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:optval="fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList> :opticon="fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
@@ -233,7 +233,7 @@
<q-toggle <q-toggle
dark color="green" v-model="myvalue" :label="col.title" dark color="green" v-model="myvalue" :label="col.title"
:disable="disable && col.name !== 'profile.saw_zoom_presentation'" :disable="disable && col.name !== 'profile.saw_zoom_presentation'"
@input="Savedb"></q-toggle> @update:model-value="Savedb"></q-toggle>
</div> </div>
<div v-else-if="col.fieldtype === costanti.FieldType.html"> <div v-else-if="col.fieldtype === costanti.FieldType.html">
<div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true"> <div v-html="visuValByType(myvalue, col, row)" @click="visueditor = true">
@@ -268,6 +268,7 @@
v-slot="scope"> v-slot="scope">
<div v-if="col.fieldtype === costanti.FieldType.boolean"> <div v-if="col.fieldtype === costanti.FieldType.boolean">
Boolean:
<q-checkbox v-model="scope.value" :label="col.title"> <q-checkbox v-model="scope.value" :label="col.title">
</q-checkbox> </q-checkbox>
{{ visuValByType(myvalue, col, row) }} {{ visuValByType(myvalue, col, row) }}
@@ -307,7 +308,7 @@
<div v-else-if="col.fieldtype === costanti.FieldType.binary"> <div v-else-if="col.fieldtype === costanti.FieldType.binary">
<CMyToggleList <CMyToggleList
:label="col.title" :label="col.title"
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
v-model:value="myvalue" v-model:value="myvalue"
:optval="fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)"> :optlab="fieldsTable.getLabelByTable(col.jointable)">
@@ -319,7 +320,7 @@
v-model:value="myvalue" v-model:value="myvalue"
:optval="fieldsTable.getKeyByTable(col.jointable)" :optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)" :optlab="fieldsTable.getLabelByTable(col.jointable)"
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:useinput="false"> :useinput="false">
</CMySelect> </CMySelect>
</div> </div>
@@ -377,7 +378,7 @@
:display-value="fieldsTable.getTitleByTable(col.jointable)" :display-value="fieldsTable.getTitleByTable(col.jointable)"
emit-value emit-value
map-options map-options
:options="fieldsTable.getTableJoinByName(col.jointable)" :options="globalStore.getTableJoinByName(col.jointable)"
:option-label="fieldsTable.getLabelByTable(col.jointable)" :option-label="fieldsTable.getLabelByTable(col.jointable)"
:option-value="fieldsTable.getKeyByTable(col.jointable)" :option-value="fieldsTable.getKeyByTable(col.jointable)"
style="min-width: 150px" style="min-width: 150px"

View File

@@ -6,7 +6,7 @@
:label="rec.label" :label="rec.label"
:color="tools.getColorByIndexBest(index)" :color="tools.getColorByIndexBest(index)"
keep-color keep-color
@input="changeval"> @update:model-value="changeval">
</q-toggle> </q-toggle>
</div> </div>
</div> </div>

View File

@@ -109,6 +109,177 @@ const routes_admin: IListRoutes[] = [
} }
] ]
const routes_manager: IListRoutes[] = [
{
active: functionality.BOOKING_EVENTS,
order: 70,
path: '/admin/usereventlist',
materialIcon: 'edit',
name: 'otherpages.admin.usereventlist',
component: () => import('@/rootgen/admin/eventlist/eventlist.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
infooter: true,
onlyManager: true,
onlyConsiglio: true,
onlyAdmin: true
},
{
active: true,
order: 10,
path: '/admin/userlist',
materialIcon: 'fas fa-users',
name: 'otherpages.admin.userlist',
component: () => import('@/rootgen/admin/usersList/usersList.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyManager: true,
onlyTutor: true
},
/*
{
active: true,
order: 10,
path: '/admin/iscritticonacreis',
materialIcon: 'fas fa-users',
name: 'otherpages.admin.iscritticonacreis',
component: () => import('@/rootgen/admin/iscritticonacreis/iscritticonacreis.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyManager: true,
onlyTutor: true
},
*/
{
active: true,
order: 10,
path: '/admin/zoomlist',
materialIcon: 'fas fa-users',
name: 'otherpages.admin.zoomlist',
component: () => import('@/rootgen/admin/zoomList/zoomList.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyManager: true,
onlyTutor: false
},
{
active: true,
order: 27,
path: '/admin/tableslist',
materialIcon: 'fas fa-users',
name: 'otherpages.admin.tableslist',
component: () => import('@/rootgen/admin/tablesList/tablesList.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyAdmin: true,
onlyManager: true
},
{
active: true,
order: 30,
path: '/admin/pages',
materialIcon: 'fas fa-file-alt',
name: 'otherpages.admin.pages',
component: () => import('@/rootgen/admin/pages/pages.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyManager: true,
onlyEditor: true
},
/*{
active: true,
path: '/admin/newsletter',
order: 60,
faIcon: 'fa fa-list-alt',
materialIcon: 'fas fa-users',
name: 'otherpages.admin.newsletter',
routes2: routes_newsletter,
inmenu: false,
submenu: true,
level_parent: 0.5,
level_child: 0.5,
solotitle: true,
onlyAdmin: true,
onlyManager: true
},
{
active: functionality.ENABLE_ECOMMERCE,
path: '/admin/ecommerce',
order: 31,
faIcon: 'fa fa-list-alt',
materialIcon: 'next_week',
name: 'pages.admin_ecommerce',
routes2: routes_admin_ecommerce,
inmenu: false,
submenu: true,
level_parent: 0.5,
level_child: 0.5,
solotitle: true,
onlyAdmin: true,
onlyManager: true,
onlyDepartment: true
},
*/
{
active: true,
order: 35,
path: '/admin/msg_template',
materialIcon: 'fas fa-file-alt',
name: 'msgs.messages',
component: () => import('@/rootgen/admin/msg_template/msg_template.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyAdmin: true,
onlyManager: true
// onlyTutor: true
},
{
active: true,
order: 40,
path: '/admin/gallery',
materialIcon: 'fas fa-file-alt',
name: 'otherpages.admin.gallery',
component: () => import('@/rootgen/admin/gallery/gallery.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyAdmin: true,
onlyManager: true
},
{
active: true,
order: 50,
path: '/admin/media',
materialIcon: 'fas fa-file-alt',
name: 'otherpages.admin.media',
component: () => import('@/rootgen/admin/uploader/uploader.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyAdmin: true,
onlyManager: true
},
]
const baseroutes: IListRoutes[] = [ const baseroutes: IListRoutes[] = [
{ {
active: true, active: true,
@@ -175,6 +346,22 @@ const baseroutes: IListRoutes[] = [
onlyAdmin: true onlyAdmin: true
}, },
...routes_admin, ...routes_admin,
{
active: true,
order: 2110,
path: '/manage',
materialIcon: 'fas fa-users-cog',
name: 'otherpages.manage.menu',
inmenu: true,
routes2: routes_manager,
solotitle: true,
infooter: true,
onlyAdmin: true,
onlyManager: true,
onlyTutor: true,
onlyEditor: true
},
...routes_manager,
{ {
active: true, active: true,
order: 1000, order: 1000,
@@ -274,12 +461,14 @@ const lang_available: ILang[] = [
{ {
label: 'Italiano', icon: 'fa-flag-it', value: 'it', image: '../images/it.png', short: 'IT', label: 'Italiano', icon: 'fa-flag-it', value: 'it', image: '../images/it.png', short: 'IT',
}, },
{ /*{
label: 'English', icon: 'fa-flag-us', value: 'enUs', image: '../images/gb.png', short: 'EN', label: 'English', icon: 'fa-flag-us', value: 'enUs', image: '../images/gb.png', short: 'EN',
}, },
{ {
label: 'Español', icon: 'fa-flag-es', value: 'es', image: '../images/es.png', short: 'ES', label: 'Español', icon: 'fa-flag-es', value: 'es', image: '../images/es.png', short: 'ES',
}, },
*/
// { label: 'Français', icon: 'fa-facebook', value: 'fr', image: '../public/images/fr.png', short: 'FR' } // { label: 'Français', icon: 'fa-facebook', value: 'fr', image: '../public/images/fr.png', short: 'FR' }
// { label: 'German', icon: 'fa-flag-de', value: 'de', image: '../public/images/de.png', short: 'DE' }, // { label: 'German', icon: 'fa-flag-de', value: 'de', image: '../public/images/de.png', short: 'DE' },
] ]

View File

@@ -19,10 +19,12 @@ export default defineComponent({
const route = useRoute() const route = useRoute()
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
const finishLoading = computed(() => globalStore.finishLoading)
const path = computed(() => route.path) const path = computed(() => route.path)
function getmenu(): any { function getmenu(): any {
// console.log('getmenu menuOne!') console.log('getmenu menuOne!')
return globalStore.getmenu return globalStore.getmenu
} }
@@ -44,11 +46,6 @@ export default defineComponent({
}) })
}) })
function isfinishLoading() {
const globalStore = useGlobalStore()
return globalStore.finishLoading
}
/* function replaceUnderlineToSpace(text: string) { /* function replaceUnderlineToSpace(text: string) {
while (text.indexOf('_') !== -1) { while (text.indexOf('_') !== -1) {
text = text.replace('_', ' ') text = text.replace('_', ' ')
@@ -85,7 +82,7 @@ export default defineComponent({
return { return {
getmenu, getmenu,
isfinishLoading, finishLoading,
getmymenuclass, getmymenuclass,
getroute, getroute,
static_data, static_data,

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="no-border" v-if="isfinishLoading"> <div class="no-border" v-if="finishLoading">
<q-list class="rounded-borders text-primary"> <q-list class="rounded-borders text-primary">
<div v-for="ind1 in getmenu()" :key="ind1"> <div v-for="ind1 in getmenu()" :key="ind1">
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>--> <!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->

View File

@@ -2,6 +2,7 @@ import { defineComponent, ref, onMounted, watch, computed } from 'vue'
import { useGlobalStore } from '@store/globalStore' import { useGlobalStore } from '@store/globalStore'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import MixinMetaTags from '@/mixins/mixin-metatags'
export default defineComponent({ export default defineComponent({
name: 'Mypage', name: 'Mypage',
@@ -11,9 +12,14 @@ export default defineComponent({
const route = useRoute() const route = useRoute()
const path = computed(() => route.path) const path = computed(() => route.path)
const isfinishLoading = computed(() => globalStore.finishLoading)
const { setmeta } = MixinMetaTags()
async function created() { async function created() {
// console.log('this.$route.path', this.$route.path) console.log('MyPage created')
rec.value = await globalStore.loadPage(route.path) rec.value = await globalStore.loadPage(route.path)
// console.log('mounted', this.rec) // console.log('mounted', this.rec)
} }
@@ -25,10 +31,12 @@ export default defineComponent({
// return tools.metafunc(this) // return tools.metafunc(this)
} }
onMounted(created) created()
return { return {
rec, rec,
setmeta,
isfinishLoading,
} }
}, },
}) })

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div v-if="isfinishLoading">
<CMyPage <CMyPage
:title="rec.title" :imgbackground="`public/` + rec.imgback" :title="rec.title" :imgbackground="`` + rec.imgback"
:sizes="`max-height: ` + rec.heightimg + `px`"> :sizes="`max-height: ` + rec.heightimg + `px`">
<span>{{ <span>{{
setmeta({ setmeta({

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Uffici" imgbackground="../../public/images/produttori.jpg" sizes="max-height: 120px"> <CMyPage title="Uffici" imgbackground="images/produttori.jpg" sizes="max-height: 120px">
<span>{{ <span>{{
setmeta({ setmeta({
title: 'Uffici', title: 'Uffici',

View File

@@ -1,6 +1,6 @@
<template> <template>
<CMyPage <CMyPage
title="Events" keywords="" description="" imgbackground="../../public/images/calendario_eventi.jpg" title="Events" keywords="" description="" imgbackground="images/calendario_eventi.jpg"
sizes="max-height: 120px"> sizes="max-height: 120px">
<div class="q-ma-sm q-pa-xs"> <div class="q-ma-sm q-pa-xs">

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Gallerie" imgbackground="../../public/images/calendario_eventi.jpg" sizes="max-height: 120px"> <CMyPage title="Gallerie" imgbackground="images/calendario_eventi.jpg" sizes="max-height: 120px">
<div class="q-ma-sm q-gutter-sm"> <div class="q-ma-sm q-gutter-sm">
<CTitleBanner title="Gallerie"></CTitleBanner> <CTitleBanner title="Gallerie"></CTitleBanner>

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Gruppi" imgbackground="../../public/images/produttori.jpg" sizes="max-height: 120px"> <CMyPage title="Gruppi" imgbackground="images/produttori.jpg" sizes="max-height: 120px">
<span>{{ <span>{{
setmeta({ setmeta({
title: 'Gruppi', title: 'Gruppi',

View File

@@ -1,6 +1,6 @@
<template> <template>
<CMyPage <CMyPage
title="Template Messaggi" imgbackground="../../public/images/calendario_eventi.jpg" title="Template Messaggi" imgbackground="images/calendario_eventi.jpg"
sizes="max-height: 100px"> sizes="max-height: 100px">
<span>{{ <span>{{
setmeta({ setmeta({

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Ordini Ufficio" imgbackground="../../public/images/produttori.jpg" sizes="max-height: 120px"> <CMyPage title="Ordini Ufficio" imgbackground="images/produttori.jpg" sizes="max-height: 120px">
<span>{{ setmeta({ <span>{{ setmeta({
title: 'Ordini Ufficio', title: 'Ordini Ufficio',
description: "", description: "",

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Pagine" imgbackground="../../public/images/calendario_eventi.jpg" sizes="max-height: 120px"> <CMyPage title="Pagine" imgbackground="images/calendario_eventi.jpg" sizes="max-height: 120px">
<span>{{ <span>{{
setmeta({ setmeta({
title: 'Pagine', title: 'Pagine',

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Produttori" imgbackground="../../public/images/produttori.jpg" sizes="max-height: 120px"> <CMyPage title="Produttori" imgbackground="images/produttori.jpg" sizes="max-height: 120px">
<span>{{ <span>{{
setmeta({ setmeta({
title: 'Produttori', title: 'Produttori',

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Prodotti" imgbackground="../../public/images/prodotti.jpg" sizes="max-height: 120px"> <CMyPage title="Prodotti" imgbackground="images/prodotti.jpg" sizes="max-height: 120px">
<span>{{ <span>{{
setmeta({ setmeta({
title: 'Prodotti', title: 'Prodotti',

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Condividi" imgbackground="../../public/images/sharewithus.jpg" sizes="max-height: 120px"> <CMyPage title="Condividi" imgbackground="images/sharewithus.jpg" sizes="max-height: 120px">
<span>{{ <span>{{
setmeta({ setmeta({
title: 'Condividi', title: 'Condividi',

View File

@@ -1,5 +1,5 @@
<template> <template>
<CMyPage title="Magazzini" imgbackground="../../public/images/produttori.jpg" sizes="max-height: 120px"> <CMyPage title="Magazzini" imgbackground="images/produttori.jpg" sizes="max-height: 120px">
<span>{{ <span>{{
setmeta({ setmeta({
title: 'Magazzini', title: 'Magazzini',

View File

@@ -33,6 +33,7 @@ export const cfgrouter = {
getmenu(): RouteRecordRaw[] { getmenu(): RouteRecordRaw[] {
const arrroutes: RouteRecordRaw[] = [] const arrroutes: RouteRecordRaw[] = []
for (const route of static_data.routes) { for (const route of static_data.routes) {
tools.addRoute(arrroutes, route) tools.addRoute(arrroutes, route)
} }

View File

@@ -3156,19 +3156,17 @@ export const tools = {
param2: true, param2: true,
}) })
}, },
AskGiaPartecipatoZoom(mythis: any, user: any) { AskGiaPartecipatoZoom(mythisq: any, user: any) {
console.log('AskGiaPartecipatoZoom', user.username) console.log('AskGiaPartecipatoZoom', user.username)
const $q = useQuasar() this.askConfirm(mythisq, translate('steps.zoom_gia_partecipato'), translate('steps.zoom_gia_partecipato'), translate('dialog.yes'), translate('dialog.no'), '', lists.MenuAction.ZOOM_GIA_PARTECIPATO, 0, {
this.askConfirm($q, translate('steps.zoom_gia_partecipato'), translate('steps.zoom_gia_partecipato'), translate('dialog.yes'), translate('dialog.no'), '', lists.MenuAction.ZOOM_GIA_PARTECIPATO, 0, {
param1: user, param1: user,
param2: user, param2: user,
param3: 'Confermato', param3: 'Confermato',
}) })
}, },
ActionRecTable(mythis: any, action: number, table: string, id: string, item: any, askaction: any) { ActionRecTable(mythisq: any, action: number, table: string, id: string, item: any, askaction: any) {
// console.log('ActionRecTable', id) // console.log('ActionRecTable', id)
const $q = useQuasar() return this.askConfirm(mythisq, 'Action', translate(askaction) + '?', translate('dialog.yes'), translate('dialog.no'), table, action, 0, {
return this.askConfirm($q, 'Action', translate(askaction) + '?', translate('dialog.yes'), translate('dialog.no'), table, action, 0, {
param1: id, param1: id,
param2: item, param2: item,
}, this) }, this)
@@ -3365,9 +3363,11 @@ export const tools = {
}, },
getextfile(filename: string) { getextfile(filename: string) {
const mystr = filename.split('.') if (filename) {
if (mystr) const mystr = filename.split('.')
return mystr.pop()!.toLowerCase() if (mystr)
return mystr.pop()!.toLowerCase()
}
return '' return ''
}, },

View File

@@ -287,9 +287,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
for (const page of this.mypage) { for (const page of this.mypage) {
if (page.active) { if (page.active) {
// console.log('page', page.lang) console.log('page', page.lang)
if (this.isMyLang(page)) { if (this.isMyLang(page)) {
// console.log('page', page.lang, 'OK') console.log('page', page.title, 'OK')
arrpagesroute.push({ arrpagesroute.push({
active: true, active: true,
order: page.order ? page.order : 1000, order: page.order ? page.order : 1000,

View File

@@ -1869,7 +1869,7 @@
"@types/eslint" "*" "@types/eslint" "*"
"@types/estree" "*" "@types/estree" "*"
"@types/eslint@*", "@types/eslint@^7.2.14": "@types/eslint@*":
version "7.28.0" version "7.28.0"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.0.tgz#7e41f2481d301c68e14f483fe10b017753ce8d5a" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.0.tgz#7e41f2481d301c68e14f483fe10b017753ce8d5a"
integrity sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A== integrity sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==
@@ -5234,17 +5234,6 @@ eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
eslint-webpack-plugin@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/eslint-webpack-plugin/-/eslint-webpack-plugin-3.0.1.tgz#0990a80e9d5927e7e68365f93426cb340679e88c"
integrity sha512-PAHHDjCg2yWBNoiBPYLZWcv+M83urkslQKER7XvK84lo5YLcihJK6qwnCH2Fkt3eVdX+G1iyGZRlKsIhTiczHw==
dependencies:
"@types/eslint" "^7.2.14"
jest-worker "^27.0.6"
micromatch "^4.0.4"
normalize-path "^3.0.0"
schema-utils "^3.1.0"
eslint@^7.32.0: eslint@^7.32.0:
version "7.32.0" version "7.32.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"