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"
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
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"
TEST_NAME="Paolo"
TEST_SURNAME="Arena"

View File

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

View File

@@ -17,7 +17,7 @@ const webpack = require('webpack')
const helpers = require('./helpers')
const envparser = require('./config/envparser')
const ESLintPlugin = require('eslint-webpack-plugin')
// const ESLintPlugin = require('eslint-webpack-plugin')
module.exports = configure((ctx) => ({
// 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])
// if using workbox in InjectManifest mode
chainWebpackCustomSW(chain) {
chain.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js'] }])
// chain.plugin('eslint-webpack-plugin')
// .use(ESLintPlugin, [{ extensions: ['js'] }])
},
manifest: {

1
quasar.extensions.json Normal file
View File

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

View File

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

View File

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

View File

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

View File

@@ -1,72 +1,82 @@
<template>
<div class="" :style="mystyle">
<q-input
v-model="myvalue"
v-show="false"
color="blue-6"
hide-bottom-space
outlined
borderless
:label="label"
:bg-color="bgcolor"
:readonly="true"
:dense="dense"
mask="####-##-## ##:##"
debounce="500"
@input="changeval"
:input-class="getclass"
>
</q-input>
<div class="" :style="mystyle">
<q-input
v-model="myvalue"
v-show="false"
color="blue-6"
hide-bottom-space
outlined
borderless
:label="label"
:bg-color="bgcolor"
:readonly="true"
:dense="dense"
mask="####-##-## ##:##"
debounce="500"
@input="changeval"
:input-class="getclass"
>
</q-input>
<q-field
:label="label"
stack-label
:value="myvalue"
outlined
:dense="dense"
color="blue-6"
:bg-color="bgcolor"
debounce="500"
:input-class="getclass">
<q-field
:label="label"
stack-label
:value="myvalue"
outlined
:dense="dense"
color="blue-6"
:bg-color="bgcolor"
debounce="500"
:input-class="getclass">
<template v-slot:control>
<div style="">
<div class="self-center full-width no-outline" :style="mystyle" tabindex="0">
{{ getstrDate(myvalue) }}
</div>
</div>
</template>
<template v-slot:append>
<q-icon v-if="canEdit" name="event" class="cursor-pointer">
<q-popup-proxy v-model="showDateTimeScroller" @before-show="Opening" @before-hide="Closing">
<template v-slot:control>
<div style="">
<div class="self-center full-width no-outline" :style="mystyle" tabindex="0">
{{ getstrDate(myvalue) }}
</div>
</div>
</template>
<template v-slot:append>
<q-icon v-if="canEdit" name="event" class="cursor-pointer">
<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
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-popup-proxy>
</q-icon>
</template>
</q-field>
</div>
</q-popup-proxy>
</q-icon>
</template>
</q-field>
</div>
</template>
<script lang="ts" src="./CDateTime.ts">
</script>
<style lang="scss" scoped>
@import './CDateTime.scss';
@import './CDateTime.scss';
</style>

View File

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

View File

@@ -2,12 +2,12 @@
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
<div>
<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 class="q-pa-md q-gutter-md">
<q-card :class="getclass">
<q-card :class="getclass()">
<q-img
:src="getsrcimg(mygallery)" :class="getclimg"
:src="getsrcimg(mygallery)" :class="getclimg()"
:alt="mygallery.alt">
<div class="absolute-bottom text-shadow">
{{ listimages.length }} files
@@ -22,7 +22,7 @@
<div class=" row">
<!--<q-draggable-rows
v-model="order">-->
<div v-for="(mygallery, index) in getlistimages" :key="index">
<div v-for="(mygallery, index) in getlistimages()" :key="index">
<div
class="q-pa-sm q-gutter-sm"
@dragenter="onDragEnter"
@@ -30,7 +30,7 @@
@dragover="onDragOver">
<q-card
:id="mygallery._id" :class="getclass"
:id="mygallery._id" :class="getclass()"
draggable="true"
@dragstart="onDragStart"
@drop="onDrop"
@@ -38,7 +38,7 @@
<q-img
:src="getsrcimg(mygallery)"
:class="getclimg"
:class="getclimg()"
:alt="mygallery.alt">
<div class="absolute-bottom text-shadow">
<!-- <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 { tools } from '../../store/Modules/tools'
@@ -95,6 +95,7 @@ export default defineComponent({
const { t } = useI18n()
const userStore = useUserStore()
const globalStore = useGlobalStore()
const isfinishLoading = computed(() => globalStore.finishLoading)
const mypagination = toRef(props, 'pagination')
@@ -302,7 +303,7 @@ export default defineComponent({
}
function disabilita() {
if ((mytable.value === 'users') && (isTutor)) {
if ((mytable.value === 'users') && (isTutor())) {
return true
}
@@ -323,7 +324,7 @@ export default defineComponent({
}
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)
if (colsel.value) {
if (colsel.value.subfield !== '') {
@@ -340,7 +341,7 @@ export default defineComponent({
}
function SaveValdb(newVal: any, valinitial: any) {
// console.log('SaveValdb', newVal)
console.log('SaveValdb', newVal)
// console.log('SaveValue', newVal, 'rowsel', rowsel)
colsel.value = colclicksel.value
@@ -353,7 +354,7 @@ export default defineComponent({
function showandsel(row: any, col: any, newval: any, valinitial: any) {
// console.log('showandsel', row, col, newval)
rowsel = row
colsel = col
colsel.value = col
idsel = row._id
SaveValue(newval, valinitial)
@@ -369,7 +370,7 @@ export default defineComponent({
}
function SaveValue(newVal: any, valinitial: any) {
// console.log('SaveValue', newVal, 'rowsel', rowsel)
console.log('SaveValue', newVal, 'rowsel', rowsel, 'colsel', colsel.value)
if (colsel.value) {
// Update value in table memory
@@ -384,7 +385,7 @@ export default defineComponent({
const mydata = <any>{
id: idsel,
table: mytable,
table: mytable.value,
fieldsvalue: {}
}
@@ -396,9 +397,7 @@ export default defineComponent({
}
// mydata.fieldsvalue[colsel.value.field][colsel.subfield] = newVal
} 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() {
console.log('createNewRecord')
loading.value = true
const mydata: any = {
table: mytable,
table: mytable.value,
data: {}
}
mydata.data = props.defaultnewrec
if (props.defaultnewrec) {
mydata.data = props.defaultnewrec
}
// const mykey = fieldsTable.getKeyByTable(mytable)
@@ -493,14 +495,14 @@ export default defineComponent({
}
function mounted() {
console.log('GridTable mounted', tablesel)
//console.log('GridTable mounted', tablesel)
if (!!props.tablesList) {
canEdit.value = tools.getCookie(tools.CAN_EDIT, canEdit) === 'true'
tablesel.value = tools.getCookie('tablesel', tablesel)
}
myfilterand.value = props.filterdef
console.log('tablesel', tablesel)
// console.log('tablesel', tablesel)
if (tablesel.value === '') {
if (!!props.tablesList)
@@ -509,7 +511,7 @@ export default defineComponent({
tablesel.value = mytable.value
}
console.log('2) tablesel', tablesel)
// console.log('2) tablesel', tablesel)
changeTable(false)
@@ -518,7 +520,7 @@ export default defineComponent({
function clickFunz(item: any, col: IColGridTable) {
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) {
console.log('changecol', mytable)
console.log('changecol', 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()
if (!!mytable.value) {
const myselcol = tools.getCookie(mytable, '')
const myselcol = tools.getCookie(mytable.value, '')
if (!!myselcol && myselcol.length > 0) {
colVisib.value = myselcol.split('|')
} else {
@@ -682,7 +684,7 @@ export default defineComponent({
console.log('saveNewRecord')
savenewRec.value = true
const mydata = {
table: mytable,
table: mytable.value,
data: {}
}
@@ -705,10 +707,6 @@ export default defineComponent({
}
}
function isfinishLoading() {
return globalStore.finishLoading
}
function getlabelAddRow() {
return props.labelBtnAddRow
}
@@ -765,6 +763,9 @@ export default defineComponent({
myfilter,
disabilita,
newRecordBool,
lists,
refresh,
spinner_visible,
}
}
})

View File

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

View File

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

View File

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

View File

@@ -15,6 +15,7 @@ import { CMyChipList } from '@/components/CMyChipList'
import { CMyToggleList } from '@/components/CMyToggleList'
import { CDateTime } from '@/components/CDateTime'
export default defineComponent({
name: 'CMyFieldDb',
props: {
@@ -185,7 +186,7 @@ export default defineComponent({
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)
myvalue.value = 'true'
else
@@ -228,6 +229,8 @@ export default defineComponent({
tools,
costanti,
myq: $q,
fieldsTable,
globalStore,
}
},
})

View File

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

View File

@@ -3,7 +3,7 @@
<div v-if="mypath && !!rec">
<div class="q-ma-sm q-gutter-sm q-pa-xs">
<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 v-if="!!rec.content" v-html="rec.content"></div>
@@ -11,14 +11,14 @@
</q-video>
<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 v-if="!!rec.content2" v-html="rec.content2"></div>
<q-video v-if="!!rec.video2" :src="rec.video2" :ratio="rec.ratio2"></q-video>
<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 v-if="!!rec.content3" v-html="rec.content3"></div>

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
:label="rec.label"
:color="tools.getColorByIndexBest(index)"
keep-color
@input="changeval">
@update:model-value="changeval">
</q-toggle>
</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[] = [
{
active: true,
@@ -175,6 +346,22 @@ const baseroutes: IListRoutes[] = [
onlyAdmin: true
},
...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,
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: '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: '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' },
]

View File

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

View File

@@ -1,5 +1,5 @@
<template>
<div class="no-border" v-if="isfinishLoading">
<div class="no-border" v-if="finishLoading">
<q-list class="rounded-borders text-primary">
<div v-for="ind1 in getmenu()" :key="ind1">
<!--<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 { useRoute } from 'vue-router'
import MixinMetaTags from '@/mixins/mixin-metatags'
export default defineComponent({
name: 'Mypage',
@@ -11,9 +12,14 @@ export default defineComponent({
const route = useRoute()
const path = computed(() => route.path)
const isfinishLoading = computed(() => globalStore.finishLoading)
const { setmeta } = MixinMetaTags()
async function created() {
// console.log('this.$route.path', this.$route.path)
console.log('MyPage created')
rec.value = await globalStore.loadPage(route.path)
// console.log('mounted', this.rec)
}
@@ -25,10 +31,12 @@ export default defineComponent({
// return tools.metafunc(this)
}
onMounted(created)
created()
return {
rec,
setmeta,
isfinishLoading,
}
},
})

View File

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

View File

@@ -1,5 +1,5 @@
<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>{{
setmeta({
title: 'Uffici',

View File

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

View File

@@ -1,5 +1,5 @@
<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">
<CTitleBanner title="Gallerie"></CTitleBanner>

View File

@@ -1,5 +1,5 @@
<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>{{
setmeta({
title: 'Gruppi',

View File

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

View File

@@ -1,5 +1,5 @@
<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({
title: 'Ordini Ufficio',
description: "",

View File

@@ -1,5 +1,5 @@
<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>{{
setmeta({
title: 'Pagine',

View File

@@ -1,5 +1,5 @@
<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>{{
setmeta({
title: 'Produttori',

View File

@@ -1,5 +1,5 @@
<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>{{
setmeta({
title: 'Prodotti',

View File

@@ -1,5 +1,5 @@
<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>{{
setmeta({
title: 'Condividi',

View File

@@ -1,5 +1,5 @@
<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>{{
setmeta({
title: 'Magazzini',

View File

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

View File

@@ -3156,19 +3156,17 @@ export const tools = {
param2: true,
})
},
AskGiaPartecipatoZoom(mythis: any, user: any) {
AskGiaPartecipatoZoom(mythisq: any, user: any) {
console.log('AskGiaPartecipatoZoom', user.username)
const $q = useQuasar()
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, {
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, {
param1: user,
param2: user,
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)
const $q = useQuasar()
return this.askConfirm($q, 'Action', translate(askaction) + '?', translate('dialog.yes'), translate('dialog.no'), table, action, 0, {
return this.askConfirm(mythisq, 'Action', translate(askaction) + '?', translate('dialog.yes'), translate('dialog.no'), table, action, 0, {
param1: id,
param2: item,
}, this)
@@ -3365,9 +3363,11 @@ export const tools = {
},
getextfile(filename: string) {
const mystr = filename.split('.')
if (mystr)
return mystr.pop()!.toLowerCase()
if (filename) {
const mystr = filename.split('.')
if (mystr)
return mystr.pop()!.toLowerCase()
}
return ''
},

View File

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

View File

@@ -1869,7 +1869,7 @@
"@types/eslint" "*"
"@types/estree" "*"
"@types/eslint@*", "@types/eslint@^7.2.14":
"@types/eslint@*":
version "7.28.0"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.0.tgz#7e41f2481d301c68e14f483fe10b017753ce8d5a"
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"
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:
version "7.32.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"