- Dynamic Pages (MyPage)
- Uploading files to the Server FTP.
This commit is contained in:
@@ -39,21 +39,22 @@
|
|||||||
<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-date-time-scroller
|
<q-scroller
|
||||||
v-model="myvalue"
|
v-model="myvalue"
|
||||||
|
view="date-time"
|
||||||
:locale="toolsext.getLocale()"
|
:locale="toolsext.getLocale()"
|
||||||
:hour24-format="true"
|
|
||||||
:rounded-borders="true"
|
:rounded-borders="true"
|
||||||
border-color="#2196f3"
|
border-color="#2196f3"
|
||||||
bar-color="#2196f3"
|
bar-color="#2196f3"
|
||||||
color="white"
|
text-color="white"
|
||||||
background-color="primary"
|
color="primary"
|
||||||
inner-color="primary"
|
minute-interval="5"
|
||||||
inner-background-color="white"
|
inner-text-color="primary"
|
||||||
|
inner-color="white"
|
||||||
:style="scrollerPopupStyle280"
|
:style="scrollerPopupStyle280"
|
||||||
@input="changeval"
|
@input="changeval"
|
||||||
@close="() => { savetoclose(); }"
|
@close="() => { savetoclose(); }"
|
||||||
/>
|
></q-scroller>
|
||||||
|
|
||||||
</q-popup-proxy>
|
</q-popup-proxy>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
|
|||||||
@@ -10,6 +10,17 @@ $graytext: #555;
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.my-event-rel {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
line-height: 1.25rem;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: center;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 4px 2px 4px 2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.flex-container {
|
.flex-container {
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ import { CMySelect } from '../../components/CMySelect/index'
|
|||||||
import { CMyEditor } from '../../components/CMyEditor/index'
|
import { CMyEditor } from '../../components/CMyEditor/index'
|
||||||
import { stop, prevent, stopAndPrevent } from 'quasar/src/utils/event'
|
import { stop, prevent, stopAndPrevent } from 'quasar/src/utils/event'
|
||||||
|
|
||||||
import QDateScroller from '@quasar/quasar-app-extension-qscroller/src/component/QDateScroller'
|
|
||||||
import QDateTimeScroller from '@quasar/quasar-app-extension-qscroller/src/component/QDateTimeScroller'
|
|
||||||
import { CTodo } from '@src/components/todos/CTodo'
|
import { CTodo } from '@src/components/todos/CTodo'
|
||||||
import { SingleProject } from '@src/components/projects/SingleProject'
|
import { SingleProject } from '@src/components/projects/SingleProject'
|
||||||
import { IEvents } from '@src/model'
|
import { IEvents } from '@src/model'
|
||||||
@@ -46,8 +44,6 @@ import { CMyTeacher } from '../CMyTeacher'
|
|||||||
Footer,
|
Footer,
|
||||||
CTitle,
|
CTitle,
|
||||||
CImgText,
|
CImgText,
|
||||||
QDateTimeScroller,
|
|
||||||
QDateScroller,
|
|
||||||
CMySelect,
|
CMySelect,
|
||||||
CMyEditor,
|
CMyEditor,
|
||||||
CDateTime,
|
CDateTime,
|
||||||
@@ -277,7 +273,9 @@ export default class CEventsCalendar extends MixinEvents {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get dayHeight() {
|
get dayHeight() {
|
||||||
if (Screen.height < 500)
|
if (Screen.height < 400)
|
||||||
|
return 80
|
||||||
|
else if (Screen.height < 500)
|
||||||
return 100
|
return 100
|
||||||
if (Screen.height < 700)
|
if (Screen.height < 700)
|
||||||
return 110
|
return 110
|
||||||
@@ -1027,5 +1025,8 @@ export default class CEventsCalendar extends MixinEvents {
|
|||||||
public getTitleEv(event: IEvents) {
|
public getTitleEv(event: IEvents) {
|
||||||
return (!!event.short_tit) ? event.short_tit : event.title
|
return (!!event.short_tit) ? event.short_tit : event.title
|
||||||
}
|
}
|
||||||
|
public getLongTitleEv(event: IEvents) {
|
||||||
|
return event.title
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -403,17 +403,19 @@
|
|||||||
<!--v-touch-swipe.mouse.left.right="handleSwipe" -->
|
<!--v-touch-swipe.mouse.left.right="handleSwipe" -->
|
||||||
|
|
||||||
<!-- the calendar -->
|
<!-- the calendar -->
|
||||||
<q-page v-if="visuAllCal && showfirstN === 0" class="column" style="min-height: 500px !important;">
|
<q-page v-if="visuAllCal && showfirstN === 0" class="column" style="min-height: 200px !important;">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<q-toolbar class="mytoolbar">
|
<q-toolbar class="mytoolbar">
|
||||||
<q-btn color="primary" round icon="keyboard_arrow_left" @click="calendarPrev"/>
|
<q-btn color="primary" round icon="keyboard_arrow_left" @click="calendarPrev"/>
|
||||||
<q-btn color="primary" round icon="keyboard_arrow_right" @click="calendarNext"/>
|
<q-btn color="primary" round icon="keyboard_arrow_right" @click="calendarNext"/>
|
||||||
<q-separator vertical/>
|
<q-separator vertical/>
|
||||||
<q-btn color="primary" :label="$t('dialog.today')" class="q-mx-md" @click="SetToday"></q-btn>
|
<!--<q-btn color="primary" :label="$t('dialog.today')" class="q-mx-md" @click="SetToday"></q-btn>-->
|
||||||
<q-separator vertical/>
|
<q-separator vertical/>
|
||||||
<q-btn label="GG" color="primary" @click="calendarView = 'day'"/>
|
<!--<q-btn label="GG" color="primary" @click="calendarView = 'day'"/>
|
||||||
<q-btn label="Set" color="primary" @click="calendarView = 'week'"/>
|
<q-btn label="Set" color="primary" @click="calendarView = 'week'"/>-->
|
||||||
|
<q-btn label="5 GG" color="primary" @click="calendarView = '5day-agenda'"/>
|
||||||
|
<q-btn label="Sett" color="primary" @click="calendarView = 'week-agenda'"/>
|
||||||
<q-btn label="Mese" color="primary" @click="calendarView = 'month'"/>
|
<q-btn label="Mese" color="primary" @click="calendarView = 'month'"/>
|
||||||
<q-space/>
|
<q-space/>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
@@ -497,23 +499,6 @@
|
|||||||
<template #day-header="{ date }">
|
<template #day-header="{ date }">
|
||||||
<div class="row justify-center">
|
<div class="row justify-center">
|
||||||
<template v-for="(event, index) in eventsMap[date]">
|
<template v-for="(event, index) in eventsMap[date]">
|
||||||
<!--<q-badge-->
|
|
||||||
<!--v-if="event.allday"-->
|
|
||||||
<!--:key="index"-->
|
|
||||||
<!--style="width: 100%; cursor: pointer;"-->
|
|
||||||
<!--class="ellipsis"-->
|
|
||||||
<!--:class="badgeClasses(event, 'header')"-->
|
|
||||||
<!--:style="badgeStyles(event, 'header')"-->
|
|
||||||
<!--@click.stop.prevent="showEvent(event)"-->
|
|
||||||
<!--:draggable="true"-->
|
|
||||||
<!--@dragstart.native="(e) => onDragStart(e, event)"-->
|
|
||||||
<!--@dragend.native="(e) => onDragEnd(e, event)"-->
|
|
||||||
<!--@dragenter.native="(e) => onDragEnter(e, event)"-->
|
|
||||||
<!--@touchmove.native="(e) => {}"-->
|
|
||||||
<!-->-->
|
|
||||||
<!--<q-icon v-if="event.icon" :name="event.icon" class="q-mr-xs"></q-icon>-->
|
|
||||||
<!--<span class="ellipsis">{{ event.title }}</span>-->
|
|
||||||
<!--</q-badge>-->
|
|
||||||
<q-badge
|
<q-badge
|
||||||
:key="index"
|
:key="index"
|
||||||
class="q-ma-xs"
|
class="q-ma-xs"
|
||||||
@@ -526,6 +511,42 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #day-body="{ date, timeStartPos, timeDurationHeight }">
|
<template #day-body="{ date, timeStartPos, timeDurationHeight }">
|
||||||
<template v-for="(event, index) in getEvents(date)">
|
<template v-for="(event, index) in getEvents(date)">
|
||||||
|
<div
|
||||||
|
:key="index"
|
||||||
|
:label="tools.getstrTime(event.dateTimeStart)"
|
||||||
|
class="justify-start q-ma-sm shadow-5 bg-blue-grey-6"
|
||||||
|
>
|
||||||
|
<div v-if="getImgEvent(event)" class="row justify-center"
|
||||||
|
style="margin-top: 30px; width: 100%;">
|
||||||
|
<q-avatar
|
||||||
|
style="margin-top: -25px; margin-bottom: 10px; font-size: 60px; max-height: 50px;">
|
||||||
|
<img :src="getImgEvent(event)" style="border: #a4edf6 solid 5px;">
|
||||||
|
</q-avatar>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 q-px-xs text-white">
|
||||||
|
<strong>{{ tools.getstrTime(event.dateTimeStart) }}</strong>
|
||||||
|
</div>
|
||||||
|
<div v-if="getTitleEv(event)" class="col-12 q-px-xs text-white"
|
||||||
|
style="font-size: 0.75rem;">
|
||||||
|
<q-badge
|
||||||
|
:key="index"
|
||||||
|
multi-line
|
||||||
|
class="my-event-rel justify-center rounded-borders"
|
||||||
|
:class="badgeClasses(event, 'body')"
|
||||||
|
:style="badgeStyles(event, 'body', timeStartPos, timeDurationHeight)"
|
||||||
|
@click.stop.prevent="showEvent(event)"
|
||||||
|
:draggable="tools.isManager()"
|
||||||
|
@dragstart.native="(e) => onDragStart(e, event)"
|
||||||
|
@dragend.native="(e) => onDragEnd(e, event)"
|
||||||
|
@dragenter.native="(e) => onDragEnter(e, event)"
|
||||||
|
@touchmove.native="(e) => {}"
|
||||||
|
>
|
||||||
|
<span class="">{{ getTitleEv(event) }}</span> <br>
|
||||||
|
|
||||||
|
</q-badge>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
<q-badge
|
<q-badge
|
||||||
:key="index"
|
:key="index"
|
||||||
class="my-event justify-center"
|
class="my-event justify-center"
|
||||||
@@ -539,8 +560,14 @@
|
|||||||
@touchmove.native="(e) => {}"
|
@touchmove.native="(e) => {}"
|
||||||
>
|
>
|
||||||
<q-icon v-if="event.icon" :name="event.icon" class="q-mr-xs"></q-icon>
|
<q-icon v-if="event.icon" :name="event.icon" class="q-mr-xs"></q-icon>
|
||||||
<span class="">{{ getTitleEv(event) }}</span>
|
<p class="">{{ getTitleEv(event) }}</p> <br>
|
||||||
</q-badge>
|
<div class="text-center"><img :src="getImgEvent(event)"
|
||||||
|
class="text-center listaev__tdimg_small"
|
||||||
|
:alt="event.title">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</q-badge> -->
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</q-calendar>
|
</q-calendar>
|
||||||
@@ -651,7 +678,8 @@
|
|||||||
|
|
||||||
<q-chip>
|
<q-chip>
|
||||||
<q-avatar v-if="getWhereIcon(event.wherecode)">
|
<q-avatar v-if="getWhereIcon(event.wherecode)">
|
||||||
<img :src="`../../statics/images/avatar/` + getWhereIcon(event.wherecode)" :alt="event.wherecode">
|
<img :src="`../../statics/images/avatar/` + getWhereIcon(event.wherecode)"
|
||||||
|
:alt="event.wherecode">
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
<q-avatar color="blue" font-size="20px" text-color="white" icon="home">
|
<q-avatar color="blue" font-size="20px" text-color="white" icon="home">
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
|
|||||||
@@ -36,6 +36,11 @@
|
|||||||
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
|
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
|
||||||
@input="Savedb"></q-toggle>
|
@input="Savedb"></q-toggle>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.fieldtype === tools.FieldType.html">
|
||||||
|
<div v-html="visuValByType(myvalue, col, row)">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ visuValByType(myvalue, col, row) }}
|
{{ visuValByType(myvalue, col, row) }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ export default class MenuOne extends Vue {
|
|||||||
// return this.$route.path
|
// return this.$route.path
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
get isfinishLoading() {
|
||||||
|
return GlobalStore.state.finishLoading
|
||||||
|
}
|
||||||
|
|
||||||
get tools() {
|
get tools() {
|
||||||
return tools
|
return tools
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="no-border">
|
<div class="no-border" v-if="isfinishLoading">
|
||||||
<q-list class="rounded-borders text-primary">
|
<q-list class="rounded-borders text-primary">
|
||||||
<template v-for="(parent, index) in getmenu">
|
<template v-for="(parent, index) in getmenu">
|
||||||
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
||||||
|
|||||||
@@ -49,6 +49,23 @@ export interface ITeachUname {
|
|||||||
username?: string
|
username?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IMyPage {
|
||||||
|
_id?: string
|
||||||
|
author_username?: string
|
||||||
|
title?: string
|
||||||
|
icon?: string
|
||||||
|
path?: string
|
||||||
|
keywords?: string
|
||||||
|
description?: string
|
||||||
|
content?: string
|
||||||
|
active?: boolean
|
||||||
|
inmenu?: boolean
|
||||||
|
submenu?: boolean
|
||||||
|
l_par?: number,
|
||||||
|
l_child?: number,
|
||||||
|
infooter?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
export interface INewsToSent {
|
export interface INewsToSent {
|
||||||
_id: string
|
_id: string
|
||||||
idapp?: string
|
idapp?: string
|
||||||
@@ -132,6 +149,7 @@ export interface IGlobalState {
|
|||||||
settings: ISettings[],
|
settings: ISettings[],
|
||||||
disciplines: IDiscipline[],
|
disciplines: IDiscipline[],
|
||||||
newstosent: INewsToSent[],
|
newstosent: INewsToSent[],
|
||||||
|
mypage: IMyPage[],
|
||||||
templemail: ITemplEmail[],
|
templemail: ITemplEmail[],
|
||||||
opzemail: ISettings[],
|
opzemail: ISettings[],
|
||||||
mailinglist: IMailinglist[],
|
mailinglist: IMailinglist[],
|
||||||
@@ -324,6 +342,7 @@ export interface ITableRec {
|
|||||||
collabel: string
|
collabel: string
|
||||||
colicon?: string
|
colicon?: string
|
||||||
onlyAdmin?: boolean
|
onlyAdmin?: boolean
|
||||||
|
noshow: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IDataPass {
|
export interface IDataPass {
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ const msgglobal = {
|
|||||||
userlist: 'Lista Utenti',
|
userlist: 'Lista Utenti',
|
||||||
tableslist: 'Lista Tabelle',
|
tableslist: 'Lista Tabelle',
|
||||||
newsletter: 'Newsletter',
|
newsletter: 'Newsletter',
|
||||||
|
pages: 'Pagine',
|
||||||
|
media: 'Media',
|
||||||
},
|
},
|
||||||
manage: {
|
manage: {
|
||||||
menu: 'Gestione',
|
menu: 'Gestione',
|
||||||
@@ -379,6 +381,8 @@ const msgglobal = {
|
|||||||
userlist: 'Lista de usuarios',
|
userlist: 'Lista de usuarios',
|
||||||
tableslist: 'Listado de tablas',
|
tableslist: 'Listado de tablas',
|
||||||
newsletter: 'Newsletter',
|
newsletter: 'Newsletter',
|
||||||
|
pages: 'Páginas',
|
||||||
|
media: 'Medios',
|
||||||
},
|
},
|
||||||
manage: {
|
manage: {
|
||||||
menu: 'Gestionar',
|
menu: 'Gestionar',
|
||||||
@@ -730,6 +734,8 @@ const msgglobal = {
|
|||||||
userlist: 'Liste d\'utilisateurs',
|
userlist: 'Liste d\'utilisateurs',
|
||||||
tableslist: 'Liste des tables',
|
tableslist: 'Liste des tables',
|
||||||
newsletter: 'Newsletter',
|
newsletter: 'Newsletter',
|
||||||
|
pages: 'Pages',
|
||||||
|
media: 'Médias',
|
||||||
},
|
},
|
||||||
manage: {
|
manage: {
|
||||||
menu: 'Gérer',
|
menu: 'Gérer',
|
||||||
@@ -1080,6 +1086,8 @@ const msgglobal = {
|
|||||||
userlist: 'Users List',
|
userlist: 'Users List',
|
||||||
tableslist: 'List of tables',
|
tableslist: 'List of tables',
|
||||||
newsletter: 'Newsletter',
|
newsletter: 'Newsletter',
|
||||||
|
pages: 'Pages',
|
||||||
|
media: 'Medias',
|
||||||
},
|
},
|
||||||
manage: {
|
manage: {
|
||||||
menu: 'Manage',
|
menu: 'Manage',
|
||||||
@@ -1429,6 +1437,8 @@ const msgglobal = {
|
|||||||
userlist: 'Users List',
|
userlist: 'Users List',
|
||||||
tableslist: 'List of tables',
|
tableslist: 'List of tables',
|
||||||
newsletter: 'Newsletter',
|
newsletter: 'Newsletter',
|
||||||
|
pages: 'Pages',
|
||||||
|
media: 'Medias',
|
||||||
},
|
},
|
||||||
manage: {
|
manage: {
|
||||||
menu: 'Manage',
|
menu: 'Manage',
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ function geturl() {
|
|||||||
const miaurl = document.location.href
|
const miaurl = document.location.href
|
||||||
|
|
||||||
if (miaurl.includes('test.')) {
|
if (miaurl.includes('test.')) {
|
||||||
return 'https://test.freeplanet.app/'
|
return 'https://test.associazioneshen.it/'
|
||||||
} else {
|
} else {
|
||||||
if (miaurl.includes('localhost')) {
|
if (miaurl.includes('localhost')) {
|
||||||
return 'http://localhost:8080/'
|
return 'http://localhost:8080/'
|
||||||
} else {
|
} else {
|
||||||
return 'https://freeplanet.app/'
|
return 'https://associazioneshen.it/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,12 +18,12 @@ function getidtrack() {
|
|||||||
if (miaurl.includes('test.') || miaurl.includes('localhost')) {
|
if (miaurl.includes('test.') || miaurl.includes('localhost')) {
|
||||||
return '4c40a07bc88a9c50c9b70dc9c5cd8e2e'
|
return '4c40a07bc88a9c50c9b70dc9c5cd8e2e'
|
||||||
} else {
|
} else {
|
||||||
return '9853abef079fc8330ab188a9cbf07a0c'
|
return 'ccfd6c90e17b6809f9717675764c3f5d' // Associazione Shen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var owa_baseUrl = geturl() + 'owa/';
|
let owa_baseUrl = geturl() + 'owa/';
|
||||||
if (owa_cmds)
|
if (owa_cmds)
|
||||||
var owa_cmds = [];
|
var owa_cmds = [];
|
||||||
else
|
else
|
||||||
@@ -33,11 +33,11 @@ owa_cmds.push(['trackPageView']);
|
|||||||
// owa_cmds.push(['trackClicks']);
|
// owa_cmds.push(['trackClicks']);
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
var _owa = document.createElement('script');
|
const _owa = document.createElement('script');
|
||||||
_owa.type = 'text/javascript';
|
_owa.type = 'text/javascript';
|
||||||
_owa.async = true;
|
_owa.async = true;
|
||||||
owa_baseUrl = ('https:' == document.location.protocol ? window.owa_baseSecUrl || owa_baseUrl.replace(/http:/, 'https:') : owa_baseUrl);
|
owa_baseUrl = ('https:' == document.location.protocol ? window.owa_baseSecUrl || owa_baseUrl.replace(/http:/, 'https:') : owa_baseUrl);
|
||||||
_owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js';
|
_owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js';
|
||||||
var _owa_s = document.getElementsByTagName('script')[0];
|
const _owa_s = document.getElementsByTagName('script')[0];
|
||||||
_owa_s.parentNode.insertBefore(_owa, _owa_s);
|
_owa_s.parentNode.insertBefore(_owa, _owa_s);
|
||||||
}());
|
}());
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import { serv_constants } from '@src/store/Modules/serv_constants'
|
|||||||
import { IUserState } from '@src/model'
|
import { IUserState } from '@src/model'
|
||||||
import { Calendar } from 'element-ui'
|
import { Calendar } from 'element-ui'
|
||||||
import { fieldsTable } from '@src/store/Modules/fieldsTable'
|
import { fieldsTable } from '@src/store/Modules/fieldsTable'
|
||||||
|
import router from '@router'
|
||||||
// import { static_data } from '@src/db/static_data'
|
// import { static_data } from '@src/db/static_data'
|
||||||
|
|
||||||
let stateConnDefault = 'online'
|
let stateConnDefault = 'online'
|
||||||
@@ -75,7 +76,8 @@ const state: IGlobalState = {
|
|||||||
disciplines: [],
|
disciplines: [],
|
||||||
autoplaydisc: 8000,
|
autoplaydisc: 8000,
|
||||||
newstosent: [],
|
newstosent: [],
|
||||||
mailinglist: []
|
mailinglist: [],
|
||||||
|
mypage: []
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getConfig(id) {
|
async function getConfig(id) {
|
||||||
@@ -131,6 +133,12 @@ namespace Getters {
|
|||||||
|
|
||||||
}, 'showtype')
|
}, 'showtype')
|
||||||
|
|
||||||
|
const getPage = b.read((mystate: IGlobalState) => (path) => {
|
||||||
|
// const config = state.arrConfig.find(item => item._id === cat + costanti.CONFIG_ID_SHOW_TYPE_TODOS)
|
||||||
|
return mystate.mypage.find((page) => (`/` + page.path) === path)
|
||||||
|
|
||||||
|
}, 'getPage')
|
||||||
|
|
||||||
const getmenu = b.read((state) => {
|
const getmenu = b.read((state) => {
|
||||||
// console.log('getmenu', cfgrouter.getmenu())
|
// console.log('getmenu', cfgrouter.getmenu())
|
||||||
|
|
||||||
@@ -180,6 +188,8 @@ namespace Getters {
|
|||||||
return GlobalStore.state.opzemail
|
return GlobalStore.state.opzemail
|
||||||
else if (table === tools.TABMAILINGLIST)
|
else if (table === tools.TABMAILINGLIST)
|
||||||
return GlobalStore.state.mailinglist
|
return GlobalStore.state.mailinglist
|
||||||
|
else if (table === tools.TABMYPAGE)
|
||||||
|
return GlobalStore.state.mypage
|
||||||
else if (table === 'bookings')
|
else if (table === 'bookings')
|
||||||
return CalendarStore.state.bookedevent
|
return CalendarStore.state.bookedevent
|
||||||
else if (table === 'users')
|
else if (table === 'users')
|
||||||
@@ -277,6 +287,10 @@ namespace Getters {
|
|||||||
return gettemplemailbyId()
|
return gettemplemailbyId()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get getPage() {
|
||||||
|
return getPage()
|
||||||
|
},
|
||||||
|
|
||||||
get t() {
|
get t() {
|
||||||
return t()
|
return t()
|
||||||
},
|
},
|
||||||
@@ -761,6 +775,7 @@ namespace Actions {
|
|||||||
if (showall) {
|
if (showall) {
|
||||||
GlobalStore.state.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []
|
GlobalStore.state.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []
|
||||||
GlobalStore.state.mailinglist = (res.data.mailinglist) ? [...res.data.mailinglist] : []
|
GlobalStore.state.mailinglist = (res.data.mailinglist) ? [...res.data.mailinglist] : []
|
||||||
|
GlobalStore.state.mypage = (res.data.mypage) ? [...res.data.mypage] : []
|
||||||
}
|
}
|
||||||
|
|
||||||
CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager
|
CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager
|
||||||
@@ -787,6 +802,47 @@ namespace Actions {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function addDynamicPages(context) {
|
||||||
|
|
||||||
|
const arrpagesroute: IListRoutes[] = []
|
||||||
|
for (const page of state.mypage) {
|
||||||
|
arrpagesroute.push({
|
||||||
|
path: '/' + page.path,
|
||||||
|
name: undefined,
|
||||||
|
text: page.title,
|
||||||
|
materialIcon: page.icon,
|
||||||
|
component: () => import('@/root/mypage/mypage.vue'),
|
||||||
|
inmenu: page.inmenu,
|
||||||
|
infooter: page.infooter,
|
||||||
|
level_child: page.l_child,
|
||||||
|
level_parent: page.l_par,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const last = {
|
||||||
|
path: '*',
|
||||||
|
materialIcon: 'fas fa-calendar-plus',
|
||||||
|
name: 'otherpages.error404def',
|
||||||
|
component: () => import('@/root/My404page/My404page.vue'),
|
||||||
|
inmenu: false,
|
||||||
|
infooter: false
|
||||||
|
}
|
||||||
|
|
||||||
|
static_data.routes = [...static_data.routes, ...arrpagesroute, last]
|
||||||
|
|
||||||
|
router.addRoutes([...arrpagesroute, last])
|
||||||
|
}
|
||||||
|
|
||||||
|
async function sendFile(context, formdata) {
|
||||||
|
try {
|
||||||
|
const { data } = await Api.postFormData('/upload', formdata)
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Error sendFile: ', e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
setConta: b.dispatch(setConta),
|
setConta: b.dispatch(setConta),
|
||||||
createPushSubscription: b.dispatch(createPushSubscription),
|
createPushSubscription: b.dispatch(createPushSubscription),
|
||||||
@@ -802,7 +858,8 @@ namespace Actions {
|
|||||||
saveTable: b.dispatch(saveTable),
|
saveTable: b.dispatch(saveTable),
|
||||||
DeleteRec: b.dispatch(DeleteRec),
|
DeleteRec: b.dispatch(DeleteRec),
|
||||||
sendEmailTest: b.dispatch(sendEmailTest),
|
sendEmailTest: b.dispatch(sendEmailTest),
|
||||||
DuplicateRec: b.dispatch(DuplicateRec)
|
DuplicateRec: b.dispatch(DuplicateRec),
|
||||||
|
addDynamicPages: b.dispatch(addDynamicPages)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -688,6 +688,7 @@ namespace Actions {
|
|||||||
|
|
||||||
async function setGlobal(isLogged: boolean) {
|
async function setGlobal(isLogged: boolean) {
|
||||||
console.log('setGlobal')
|
console.log('setGlobal')
|
||||||
|
try {
|
||||||
// state.isLogged = true
|
// state.isLogged = true
|
||||||
if (isLogged) {
|
if (isLogged) {
|
||||||
// console.log('state.isLogged', state.isLogged)
|
// console.log('state.isLogged', state.isLogged)
|
||||||
@@ -708,12 +709,21 @@ namespace Actions {
|
|||||||
if (static_data.functionality.ENABLE_PROJECTS_LOADING)
|
if (static_data.functionality.ENABLE_PROJECTS_LOADING)
|
||||||
await Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true })
|
await Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true })
|
||||||
|
|
||||||
|
console.log('add routes')
|
||||||
|
|
||||||
|
GlobalStore.actions.addDynamicPages()
|
||||||
|
|
||||||
GlobalStore.state.finishLoading = true
|
GlobalStore.state.finishLoading = true
|
||||||
if (tools.isDebug())
|
if (tools.isDebug())
|
||||||
console.log('finishLoading', GlobalStore.state.finishLoading)
|
console.log('finishLoading', GlobalStore.state.finishLoading)
|
||||||
|
|
||||||
// document.dispatchEvent(new Event('custom-post-render-event'))
|
// document.dispatchEvent(new Event('custom-post-render-event'))
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
console.error('Error', e)
|
||||||
|
GlobalStore.state.finishLoading = true
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
// console.log('setGlobal: END')
|
// console.log('setGlobal: END')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,25 @@ export const colmailinglist = [
|
|||||||
AddCol(DeleteRec)
|
AddCol(DeleteRec)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const colmypage = [
|
||||||
|
AddCol({ name: 'title', label_trans: 'pages.title' }),
|
||||||
|
AddCol({ name: 'path', label_trans: 'pages.path' }),
|
||||||
|
AddCol({ name: 'icon', label_trans: 'pages.icon' }),
|
||||||
|
AddCol({ name: 'keywords', label_trans: 'pages.keywords' }),
|
||||||
|
AddCol({ name: 'description', label_trans: 'pages.description' }),
|
||||||
|
AddCol({ name: 'heightimg', label_trans: 'pages.heightimg', fieldtype: tools.FieldType.number }),
|
||||||
|
AddCol({ name: 'imgback', label_trans: 'pages.imgback', fieldtype: tools.FieldType.string }),
|
||||||
|
AddCol({ name: 'content', label_trans: 'pages.content', fieldtype: tools.FieldType.html }),
|
||||||
|
AddCol({ name: 'active', label_trans: 'pages.active', fieldtype: tools.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'inmenu', label_trans: 'pages.inmenu', fieldtype: tools.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'submenu', label_trans: 'pages.submenu', fieldtype: tools.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'l_par', label_trans: 'pages.l_par', fieldtype: tools.FieldType.number }),
|
||||||
|
AddCol({ name: 'l_child', label_trans: 'pages.l_child', fieldtype: tools.FieldType.number }),
|
||||||
|
AddCol({ name: 'infooter', label_trans: 'pages.infooter', fieldtype: tools.FieldType.boolean }),
|
||||||
|
AddCol(DeleteRec),
|
||||||
|
AddCol(DuplicateRec)
|
||||||
|
]
|
||||||
|
|
||||||
export const colopzemail = [
|
export const colopzemail = [
|
||||||
AddCol({ name: 'key', label_trans: 'col.key' }),
|
AddCol({ name: 'key', label_trans: 'col.key' }),
|
||||||
AddCol({ name: 'label_it', label_trans: 'col.label' }),
|
AddCol({ name: 'label_it', label_trans: 'col.label' }),
|
||||||
@@ -338,6 +357,9 @@ export const fieldsTable = {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// IColGridTable
|
// IColGridTable
|
||||||
colTableUsers: [
|
colTableUsers: [
|
||||||
AddCol({ name: 'username', label_trans: 'reg.username' }),
|
AddCol({ name: 'username', label_trans: 'reg.username' }),
|
||||||
@@ -393,14 +415,16 @@ export const fieldsTable = {
|
|||||||
label: 'Newsletter da Inviare',
|
label: 'Newsletter da Inviare',
|
||||||
columns: colnewstosent,
|
columns: colnewstosent,
|
||||||
colkey: '_id',
|
colkey: '_id',
|
||||||
collabel: 'label'
|
collabel: 'label',
|
||||||
|
onlyAdmin: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'templemail',
|
value: 'templemail',
|
||||||
label: 'Template Email',
|
label: 'Template Email',
|
||||||
columns: coltemplemail,
|
columns: coltemplemail,
|
||||||
colkey: '_id',
|
colkey: '_id',
|
||||||
collabel: 'subject'
|
collabel: 'subject',
|
||||||
|
onlyAdmin: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'opzemail',
|
value: 'opzemail',
|
||||||
@@ -423,13 +447,15 @@ export const fieldsTable = {
|
|||||||
columns: colTablePermission,
|
columns: colTablePermission,
|
||||||
colkey: 'value',
|
colkey: 'value',
|
||||||
collabel: 'label',
|
collabel: 'label',
|
||||||
colicon: 'icon'
|
colicon: 'icon',
|
||||||
|
noshow: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'fieldstype',
|
value: 'fieldstype',
|
||||||
label: 'Tipi di Campi',
|
label: 'Tipi di Campi',
|
||||||
colkey: 'value',
|
colkey: 'value',
|
||||||
collabel: 'label'
|
collabel: 'label',
|
||||||
|
noshow: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'settings',
|
value: 'settings',
|
||||||
@@ -443,6 +469,6 @@ export const fieldsTable = {
|
|||||||
|
|
||||||
export const func = {
|
export const func = {
|
||||||
gettablesList() {
|
gettablesList() {
|
||||||
return fieldsTable.tablesList.filter((rec) => (rec.onlyAdmin === UserStore.state.isAdmin) || (!rec.onlyAdmin))
|
return fieldsTable.tablesList.filter((rec) => (rec.onlyAdmin === UserStore.state.isAdmin) || (!rec.onlyAdmin) && (!rec.noshow))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export const tools = {
|
|||||||
TABEVENTS: 'myevents',
|
TABEVENTS: 'myevents',
|
||||||
TABNEWSLETTER: 'newstosent',
|
TABNEWSLETTER: 'newstosent',
|
||||||
TABMAILINGLIST: 'mailinglist',
|
TABMAILINGLIST: 'mailinglist',
|
||||||
|
TABMYPAGE: 'mypage',
|
||||||
TABTEMPLEMAIL: 'templemail',
|
TABTEMPLEMAIL: 'templemail',
|
||||||
TABOPZEMAIL: 'opzemail',
|
TABOPZEMAIL: 'opzemail',
|
||||||
|
|
||||||
@@ -2669,15 +2670,15 @@ export const tools = {
|
|||||||
|
|
||||||
return mywidth
|
return mywidth
|
||||||
} else {
|
} else {
|
||||||
console.log('this.getwidth(mythis) = ', this.getwidth(mythis))
|
// console.log('this.getwidth(mythis) = ', this.getwidth(mythis))
|
||||||
let myw = mywidth + ((this.getwidth(mythis) - mywidth) * 0.6)
|
let myw = mywidth + ((this.getwidth(mythis) - mywidth) * 0.6)
|
||||||
console.log('myw1 = ', myw)
|
// console.log('myw1 = ', myw)
|
||||||
if (myw > maxwidth)
|
if (myw > maxwidth)
|
||||||
myw = maxwidth
|
myw = maxwidth
|
||||||
if (myw > this.getwidth(mythis) - 20)
|
if (myw > this.getwidth(mythis) - 20)
|
||||||
myw = this.getwidth(mythis) - 20
|
myw = this.getwidth(mythis) - 20
|
||||||
|
|
||||||
console.log('myw = ', myw)
|
// console.log('myw = ', myw)
|
||||||
return myw
|
return myw
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2823,7 +2824,8 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
isDebug() {
|
isDebug() {
|
||||||
return process.env.DEV
|
return process.env.DEV
|
||||||
}
|
},
|
||||||
|
|
||||||
|
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
// if (navigator.languages && navigator.languages.length > 0) {
|
// if (navigator.languages && navigator.languages.length > 0) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Component } from 'vue-property-decorator'
|
|||||||
|
|
||||||
import { GlobalStore, UserStore } from '@store'
|
import { GlobalStore, UserStore } from '@store'
|
||||||
|
|
||||||
|
|
||||||
@Component({})
|
@Component({})
|
||||||
export default class TableOnlyView extends Vue {
|
export default class TableOnlyView extends Vue {
|
||||||
public loading: boolean = false
|
public loading: boolean = false
|
||||||
@@ -28,8 +27,7 @@ export default class TableOnlyView extends Vue {
|
|||||||
public filter: string = ''
|
public filter: string = ''
|
||||||
public selected: any[] = []
|
public selected: any[] = []
|
||||||
|
|
||||||
|
public request(props) {
|
||||||
request(props) {
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.serverPagination = props.pagination
|
this.serverPagination = props.pagination
|
||||||
@@ -53,7 +51,7 @@ export default class TableOnlyView extends Vue {
|
|||||||
}, 1500)
|
}, 1500)
|
||||||
}
|
}
|
||||||
|
|
||||||
mounted() {
|
public mounted() {
|
||||||
this.request({
|
this.request({
|
||||||
pagination: this.serverPagination,
|
pagination: this.serverPagination,
|
||||||
filter: this.filter
|
filter: this.filter
|
||||||
|
|||||||
Reference in New Issue
Block a user