Friends Notification

Starting Group Create Notification...
This commit is contained in:
Paolo Arena
2022-07-28 21:47:55 +02:00
parent 68106e69fc
commit a509eefd7e
13 changed files with 1395 additions and 0 deletions

70
src/common/axios.ts Executable file
View File

@@ -0,0 +1,70 @@
import axios, {
AxiosError,
AxiosRequestConfig,
AxiosResponse,
} from 'axios'
// import { default as VueRouter } from 'vue-router'
import { serv_constants } from '@src/store/Modules/serv_constants'
// import { TokenHelper } from "./token-helper";
let initialized = false
interface IRequestConfig extends AxiosRequestConfig {
ignore: number[]
}
function handle(status: number, exclude: number[]) {
if (exclude.length === 0) return true
return exclude.find(o => o === status) === undefined
}
export function UseAxios(router: any) { // VueRouter
if (!initialized) {
// @ts-ignore
axios.interceptors.request.use((config: IRequestConfig) => {
// @ts-ignore
if (!config.headers.Authorization) {
// append authorization header
/* ++Todo: disattivato per ora...
let bearerToken = TokenHelper.getBearerToken()
if (bearerToken.Authorization)
Object.assign(config.headers, bearerToken)
*/
}
// ensure axios does not follow redirects, so custom response interceptor below can push to app login page
if (!config.maxRedirects || (config.maxRedirects === 5)) {
config.maxRedirects = 0
}
return config
})
axios.interceptors.response.use(undefined, (config: AxiosError) => {
// @ts-ignore
const { response } = config
const exclude = (<IRequestConfig>config.config).ignore || []
if (response) {
if (response.status === 401 && handle(response.status, exclude)) {
const location: string = response.headers.location || response.headers.Location
if (location) {
const redirectTo = `/${location}`
window.setTimeout(() => router.replace(redirectTo), 200)
}
}
if (response.status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN && handle(response.status, exclude)) {
window.setTimeout(() => router.replace('/forbidden'), 200)
}
}
return config
})
initialized = true
}
}

89
src/db/db_data.js Executable file
View File

@@ -0,0 +1,89 @@
import { IEvents } from '../model';
export const db_data = {
URL_FACEBOOK: 'https://www.facebook.com/associazioneshen',
userdata: {
calendar_editable: false,
},
events: [
{
title: 'Scambi Reiki',
details: 'Nelle serate esperienziali è possibile <span class="boldhigh">Dare e Ricevere</span> un trattamento completo.<br />'
+ 'Possono partecipare le persone che hanno già preso parte al <span class="boldhigh">seminario di 1° livello</span>, ma anche <span class="boldhigh">tutti quelli che hanno il desiderio di conoscere il Reiki</span> e sperimentarlo per la prima volta: in questo caso invitiamo gli interessati a contattarci per un appuntamento prima dellinizio della serata per ricevere le informazioni pratiche.',
date: '2019-07-11',
time: '21:00',
duration: 120,
side: 'left',
bgcolor: 'orange',
icon: 'fas fa-praying-hands',
img: 'images/reiki/reikisfondo.jpg',
where: 'Centro Shen',
// whereicon: 'shen.png',
teacher: 'Cristina Barattoni',
avatar: 'cristina.png',
infoextra: '',
linkpdf: 'files/eventi/Reiki_aMICHI.pdf',
},
{
title: 'Scambi Reiki',
details: 'Nelle serate esperienziali è possibile <span class="boldhigh">Dare e Ricevere</span> un trattamento completo.<br />'
+ 'Possono partecipare le persone che hanno già preso parte al <span class="boldhigh">seminario di 1° livello</span>, ma anche <span class="boldhigh">tutti quelli che hanno il desiderio di conoscere il Reiki</span> e sperimentarlo per la prima volta: in questo caso invitiamo gli interessati a contattarci per un appuntamento prima dellinizio della serata per ricevere le informazioni pratiche.',
date: '2019-07-20',
time: '21:00',
duration: 120,
side: 'left',
bgcolor: 'orange',
icon: 'fas fa-praying-hands',
img: 'images/reiki/reikisfondo.jpg',
where: 'Centro Shen',
// whereicon: 'shen.png',
teacher: 'Cristina Barattoni',
avatar: 'cristina.png',
infoextra: '',
linkpdf: '',
},
{
title: 'Seminario Reiki 1° Livello',
details: 'I seminari vengono organizzati volutamente in gruppi poco numerosi.\n'
+ 'Si crea così un ambiente accogliente e tranquillo con un atmosfera conviviale.<br />'
+ ''
+ 'Per info vedi <a href="reiki/seminari">Seminari Reiki</a>',
date: '2019-07-22',
days: 2,
time: '9:00',
side: 'left',
bgcolor: 'red',
icon: 'fas fa-chalkboard-teacher',
img: 'images/reiki/reikisfondo.jpg',
where: 'Centro Shen',
// whereicon: 'shen.png',
teacher: 'Cristina Barattoni',
avatar: 'cristina.png',
teacher2: 'Elisa Ghizzardi',
avatar2: 'elisa.png',
infoextra: 'sabato e domenica dalle 10.00 alle 18.00',
linkpdf: '',
},
{
title: 'Presentazione Corsi per Operatori del Massaggio del Benessere',
details: 'Vieni alla presentazione dei Corsi!<br>10 settembre a Ravenna, 17 settembre a Lugo',
date: '2019-09-10',
time: '20:30',
duration: 120,
side: 'left',
bgcolor: 'blue',
icon: 'fas fa-praying-hands',
img: 'images/scuolaopbenessere/img1.jpg',
where: 'Centro Shen',
// whereicon: 'shen.png',
teacher: 'Operatori',
avatar: 'cristina.png',
avatar2: 'elisa.png',
infoextra: '',
linkpdf: '',
},
],
}

31
src/pages/Error404.vue Normal file
View File

@@ -0,0 +1,31 @@
<template>
<div class="fullscreen bg-blue text-white text-center q-pa-md flex flex-center">
<div>
<div style="font-size: 30vh">
404
</div>
<div class="text-h2" style="opacity:.4">
Oops. Nothing here...
</div>
<q-btn
class="q-mt-xl"
color="white"
text-color="blue"
unelevated
to="/"
label="Go Home"
no-caps
/>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
name: 'Error404',
});
</script>

49
src/pages/Index.vue Normal file
View File

@@ -0,0 +1,49 @@
<template>
<q-page class="row items-center justify-evenly">
<example-component
title="Example component"
active
:todos="todos"
:meta="meta"
/>
</q-page>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import { Todo, Meta } from '@/components/models'
import ExampleComponent from '../components/CompositionComponent.vue'
export default defineComponent({
name: 'PageIndex',
components: { ExampleComponent },
setup() {
const todos = ref<Todo[]>([
{
id: 1,
content: 'ct1',
},
{
id: 2,
content: 'ct2',
},
{
id: 3,
content: 'ct3',
},
{
id: 4,
content: 'ct4',
},
{
id: 5,
content: 'ct5',
},
])
const meta = ref<Meta>({
totalCount: 1200,
})
return { todos, meta }
},
})
</script>

0
src/root/home/home.scss Executable file
View File

21
src/root/home/home.ts Executable file
View File

@@ -0,0 +1,21 @@
import {
defineComponent, ref, computed,
} from 'vue'
import { tools } from '@src/store/Modules/tools'
import { CSkill } from '@/components/CSkill'
import { CChartMap } from '@src/components/CChartMap'
import { CMapsEsempio } from '@src/components/CMapsEsempio'
export default defineComponent({
name: 'Home',
components: { CSkill, CChartMap, CMapsEsempio },
setup() {
return {
tools,
}
},
})

26
src/root/home/home.vue Executable file
View File

@@ -0,0 +1,26 @@
<template>
<q-page class="">
<h1>Inizio:</h1>
<CSkill>
</CSkill>
<!--<CChartMap
title="Mappa"
subtitle="cartina..."
serie1="Serie 1"
>
</CChartMap>-->
<!--<CMapsEsempio></CMapsEsempio>-->
</q-page>
</template>
<script lang="ts" src="./home.ts">
</script>
<style lang="scss" scoped>
@import './home.scss';
</style>

View File

@@ -0,0 +1,452 @@
.testo-banda {
//background: -webkit-gradient(linear, left top, left bottom, from(#3144f0), to(transparent));
//background: linear-gradient(180deg, #3144f0, transparent);
//background: rgba(0, 0, 0, .6)
}
$grayshadow: #555;
$textcol: blue;
$textcol_scuro: darkblue;
p {
margin: 0 0 1.25rem;
//text-shadow: .125rem .125rem .25rem $grayshadow;
}
h4 {
font-size: 1.25rem;
}
.mycard {
visibility: hidden;
}
.landing {
}
.landing_background {
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
background-size: cover
}
.landing > section {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
//padding: 0 16px
}
.intro {
display: flex;
justify-content: space-between;
align-items: stretch;
/* flex-flow: row nowrap; */
padding: 1.25rem 0 1.25rem 0;
margin: .125rem;
* {
width: 100%;
flex: 1;
margin-left: auto;
margin-right: auto;
}
&__associazione {
min-width: 350px;
}
&__comeassociarsi {
min-width: 350px;
}
}
.subtitle {
font-weight: 600;
text-align: center;
letter-spacing: 0.125rem;
text-transform: uppercase;
font-size: 1rem;
}
.landing > section.padding {
padding: 5.62rem 1rem;
}
.landing > section.padding_testo {
padding-top: 1.25rem;
padding-bottom: 1rem;
}
.landing > section.padding_gallery {
padding-top: 3.125rem;
padding-bottom: 5.625rem;
}
.landing > section > div {
position: relative;
width: 100%
}
.maxwidth1200 {
max-width: 1200px;
}
.landing__toolbar {
background: -webkit-gradient(linear, left top, left bottom, from(#000), to(transparent));
background: linear-gradient(180deg, #000, transparent);
padding: 0 !important
}
.landing__toolbar .q-btn {
border-radius: 0 0 .315rem .315rem;
-ms-flex-item-align: stretch;
align-self: stretch
}
.landing__hero {
min-height: 50vh
}
.landing__header {
height: 18vh
}
.landing__arrow {
bottom: 1.5rem;
opacity: .4
}
.landing__front {
background: -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(15%, rgba(0, 0, 0, .6)));
background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6) 15%)
}
.landing__logo {
width: 9.40rem;
height: 9.40rem;
margin-top: 1.315rem;
//-webkit-animation: logo-rotate 240s linear infinite;
//animation: logo-rotate 240s linear infinite
}
.landing__features .q-icon {
font-size: 4rem
}
h4 {
line-height: 1.5;
text-shadow: .25rem .25rem .5rem $grayshadow;
}
.landing__features h4, .landing__features h6 {
margin: 1rem 0
}
.landing__features p {
opacity: .7;
font-size: 1rem;
line-height: 1.5;
}
.landing__footer {
//background: -webkit-gradient(linear, left top, left bottom, color-stop(65%, rgba(0, 0, 0, .1)), to(#000));
background: linear-gradient(180deg, rgba(0, 0, 0, .8) 95%, #FFF);
padding-top: 4.5rem !important;
padding-bottom: 4.5rem !important;
padding-left: 1.25rem;
padding-right: 1.25rem;
color: #9f9f9f;
}
.icon_contact:hover {
color: blue;
border-color: white;
border-width: .0625rem;
}
.landing__footer .doc-link {
color: $textcol;
}
.landing__footer .doc-link:hover {
opacity: .8
}
.landing__swirl-bg {
background-repeat: no-repeat !important;
background-position: top;
background-size: contain !important;
background-image: url(../../../public/images/landing_first_section.png) !important
}
.feat-descr {
font-size: 1.15rem;
}
.feat-descr:hover {
transition: opacity 0.5s ease-in-out;
opacity: 0.9;
}
.q-col-gutter-sm {
padding: 3.125rem 3.125rem;
//margin-left: -48px
}
body.mobile .landing {
//background: unset
}
body.mobile .landing:before {
content: "";
position: fixed;
top: 0;
height: 100vh;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
//background: #000 url(../../public/images/cover.jpg) 50%;
background-size: cover
}
/*
@-webkit-keyframes logo-rotate {
to {
-webkit-transform: rotate(-1turn);
transform: rotate(-1turn)
}
}
@keyframes logo-rotate {
to {
-webkit-transform: rotate(-1turn);
transform: rotate(-1turn)
}
}
*/
.home {
//background-color: rgb(250, 250, 250);
padding: 3.125rem;
display: flex;
//flex-wrap: nowrap;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.btn-start {
margin: 3.125rem;
}
.shadow {
//color: white;
text-shadow: 0.125rem 0.125rem 0.25rem $grayshadow;
}
.text-h1, h1 {
font-size: 3rem;
font-weight: bold;
line-height: 3rem;
letter-spacing: -.01562em;
margin-bottom: 8px !important;
}
.text-h2 {
font-size: 3.75rem;
font-weight: 300;
line-height: 3.75rem;
letter-spacing: -.00833em;
}
.text-weight-bold {
font-weight: 700;
}
.text-vers {
font-size: 0.75rem;
font-weight: 400;
line-height: 1.75rem;
letter-spacing: .00937em;
text-shadow: .25rem .25rem .5rem $grayshadow;
}
.homep-cover-img-1 {
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
//transition: background-image 1s ease-in-out;
}
.homep-cover-img-2 {
background: #000 url(../../../public/images/foto2.jpg) no-repeat 50% fixed;
//transition: background-image 1s ease-in-out;
}
.homep-cover-img-3 {
background: #000 url(../../../public/images/foto3.jpg) no-repeat 50% fixed;
//transition: background-image 1s ease-in-out;
}
.homep-cover-img.hide-filter:before {
opacity: 0
}
.landing__footer-icons {
font-size: 1.75rem
}
.landing__footer-icons a {
margin: 0 .5rem .5rem;
text-decoration: none;
outline: 0;
color: $textcol;
transition: color .28s
}
.landing__footer-icons a:hover {
color: $textcol_scuro;
}
.doc-img {
max-width: 100%;
}
.mylist {
background: #3fdaff;
padding-left: 1.25rem;
}
.clgutter {
margin-top: 1.25rem;
padding: .62rem;
}
.carousel_img_3 {
//background-image: url(../../public/images/cibo_sano.jpg);
background-size: cover !important;
background-position: 50% center !important;
background-repeat: no-repeat !important;
}
@media (max-width: 718px) {
// PER VERSIONE MOBILE
.landing__hero {
text-align: center
}
.landing__header {
height: 7vh
}
.clgutter {
margin-top: 0;
padding: 0;
}
.landing__hero .text-h1, h1 {
font-size: 2rem;
line-height: 2.05rem;
margin-bottom: 1.25rem
}
.landing > section.padding {
padding: 2.5rem 1rem;
}
.landing > section.padding_testo {
padding-top: 1.25rem;
padding-bottom: 1rem;
}
.landing > section.padding_gallery {
padding-top: 3.125rem;
padding-bottom: 5.625rem;
max-width: 800px;
}
.landing > section.padding_gallery > div {
padding-top: 3.125rem;
padding-bottom: 5.625rem;
}
.landing__features h4, .landing__features h6 {
margin: 1.25rem 0
}
h4 {
line-height: 1.4;
text-shadow: 0.25rem 0.25rem 0.5rem $grayshadow;
}
.landing .feature-item {
text-align: center;
margin-top: 1.25rem;
}
.landing__hero-content {
padding-bottom: 11.25rem;
}
.landing__hero2-content {
padding-bottom: 7.25rem;
}
.landing__hero-btns {
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center
}
.q-col-gutter-sm {
padding: .625rem .315rem;
}
.text-subtitle1 {
font-size: 1.25rem;
}
.text-vers {
font-size: 0.6rem;
}
.carousel_img_3 {
//background-image: url(../../public/images/cibo_sano.jpg);
background-size: 620px 620px !important;
background-position: 50% top !important;
background-repeat: no-repeat !important;
}
}
.custom-caption {
text-align: center;
padding: .75rem;
color: $textcol;
background-color: rgba(0, 0, 0, .3);
}
.sfondo-grigio {
padding: 1rem;
color: $textcol;
background-color: rgba(0, 0, 0, .35);
}
.mycontacts {
color: gray;
letter-spacing: 0.078rem;
}
.mycontacts_title {
text-shadow: 0.125rem 0.125rem 0.125rem #555;
font-weight: bold;
color: #999;
letter-spacing: 0.125rem;
}
.mycontacts_text {
color: #999;
letter-spacing: 0.093rem;
}

View File

@@ -0,0 +1,78 @@
import { defineComponent, ref, onMounted, watch, computed } from 'vue'
import { useGlobalStore } from '@store/globalStore'
import { useRoute } from 'vue-router'
import { useUserStore } from '@store/UserStore'
import { Logo } from '../../components/logo'
import { LandingFooter } from '../../components/LandingFooter'
import { CMyPage } from '../../components/CMyPage/index'
import { tools } from '@src/store/Modules/tools'
import { static_data } from '@src/db/static_data'
import { toolsext } from '@src/store/Modules/toolsext'
import { Screen } from 'quasar'
import { CCardCarousel, CEventsCalendar, COpenStreetMap } from '@components'
import MixinBase from '@src/mixins/mixin-base'
import { firstimagehome } from '@src/db/static_data'
import MixinMetaTags from '@/mixins/mixin-metatags'
export default defineComponent({
name: 'Home_tdv',
components: { Logo, LandingFooter, CMyPage, CCardCarousel, CEventsCalendar, COpenStreetMap },
setup() {
const animare = ref(0)
const slide = ref('first')
const slide2 = ref(1)
const getImmagini = ref([
{
title: '', subtitle: '',
alt: 'Elisa e Cristina insieme',
img: '../../statics/images/eventi_esterni/IMG_6035.jpg'
},
])
const userStore = useUserStore()
const globalStore = useGlobalStore()
const { setValDb, getValDb } = MixinBase()
const { setmeta, getsrcbyimg } = MixinMetaTags()
function getheightgallery() {
if (tools.isMobile())
return '400px'
else
return '600px'
}
function created() {
//
}
function getArrDisciplines() {
return globalStore.disciplines.filter((rec: any) => rec.showinhome)
}
created()
return {
tools,
toolsext,
static_data,
animare,
slide,
slide2,
getheightgallery,
getArrDisciplines,
getImmagini,
getValDb,
firstimagehome,
getsrcbyimg,
setmeta,
}
},
})

View File

@@ -0,0 +1,220 @@
<template>
<q-page>
<CMyPage title="Home">
<div class="landing">
<section>
<div class="landing__hero maxwidth1200 text-white">
<q-carousel
animated
:autoplay="animare"
swipeable
infinite
navigation
transition-next="slide-left"
transition-prev="slide-right"
v-model="slide"
:height="getheightgallery()"
width="100%"
>
<q-carousel-slide name="first"
:img-src="getsrcbyimg(firstimagehome())">
<div class="landing__header"></div>
<div class="landing__hero-content row justify-center q-gutter-xs clgutter">
<div class="row">
&nbsp;
</div>
<div class="flex justify-end">
<div class="q-gutter-xs testo-banda clgutter">
<h1 class="text-h1 shadow-max">{{tools.getappname()}}</h1>
<div class="text-subtitle1 shadow text-italic q-pl-sm">
&nbsp;
</div>
<div class="text-subtitle1 shadow-max big text-italic q-pl-sm">
</div>
<div class="text-subtitle2 shadow text-italic q-pl-sm">
</div>
<div>
<br>
<br>
<div v-if="!tools.isLogged()" style="margin: 5px; padding: 5px;" class="home">
<br>
<br>
</div>
</div>
</div>
</div>
</div>
<div class="landing__arrow absolute-bottom text-center">
<i aria-hidden="true"
class="q-icon text-h2 text-white material-icons">expand_more</i>
</div>
</q-carousel-slide>
<q-carousel-slide name="second"
:img-src="getsrcbyimg('images/background2.jpg')" alt="">
<div class="landing__header"></div>
<div class="landing__hero2-content row justify-center q-gutter-xs clgutter">
<div class="row">
<logo></logo>
</div>
<div class="flex justify-end">
<div class="q-gutter-xs testo-banda clgutter">
<h1 class="text-h1 shadow-max">{{tools.getappname()}}</h1>
<h2 class="text-subtitle1 shadow text-italic q-pl-sm">
{{$t('msg.sottoTitoloApp')}}
</h2>
<h2 class="text-subtitle1 shadow-max big text-italic q-pl-sm">
<strong>{{$t('msg.sottoTitoloApp2')}}</strong>
</h2>
<h2 class="text-subtitle2 shadow text-italic q-pl-sm">
{{$t('msg.sottoTitoloApp3')}}
</h2>
</div>
</div>
</div>
<div class="landing__arrow absolute-bottom text-center">
<i aria-hidden="true"
class="q-icon text-h2 text-white material-icons">expand_more</i>
</div>
</q-carousel-slide>
<q-carousel-slide name="third"
:img-src="getsrcbyimg('images/background3.jpg')">
<div class="landing__header"></div>
<div class="landing__hero2-content row justify-center q-gutter-xs clgutter">
<div class="row">
<logo></logo>
</div>
<div class="flex justify-end">
<div class="q-gutter-xs testo-banda clgutter">
<div class="text-h1 shadow-max">{{tools.getappname()}}</div>
<div class="text-subtitle1 shadow text-italic q-pl-sm">
{{$t('msg.sottoTitoloApp')}}
</div>
<div class="text-subtitle1 shadow-max big text-italic q-pl-sm"><strong>{{$t('msg.sottoTitoloApp2')}}</strong>
</div>
<div class="text-subtitle2 shadow text-italic q-pl-sm">
{{$t('msg.sottoTitoloApp3')}}
</div>
<div class="text-subtitle3 shadow text-italic q-pl-sm ">
{{$t('msg.sottoTitoloApp4')}}
</div>
</div>
</div>
</div>
<div class="landing__arrow absolute-bottom text-center">
<!--<i aria-hidden="true"-->
<!--class="q-icon text-h2 text-white material-icons">expand_more</i>-->
</div>
</q-carousel-slide>
</q-carousel>
</div>
</section>
<div class="q-pa-md q-gutter-md">
<div v-if="isLogged && !isVerified" class="text-verified">{{
$t('components.authentication.email_verification.link_sent') }}
</div>
</div>
<CCardCarousel :myarr="getArrDisciplines()">
</CCardCarousel>
<CEventsCalendar :mysingleevent="null" :showfirstN="getValDb('SHOW_LAST_EVENTS', false, 3)">
</CEventsCalendar>
<div v-if="getValDb('VIDEO_HOME', false)" class="row justify-evenly items-center q-gutter-md ">
<div class="text-center">
<h4 class="subtitle text-blue" v-html="getValDb('VIDEO_TITLE', false)"></h4>
<div class="">
<video :width="tools.getwidthscale(mythis, 320, 800)"
:height="tools.getheightbywidth(mythis, 320, 180, 800)" controls>
<source :src="getValDb('VIDEO_HOME', false)" type="video/mp4">
</video>
</div>
<!--<q-video src="../../statics/video/Intervista_Cristina_Barattoni.mp4">-->
<!--</q-video>-->
</div>
</div>
<div v-if="getValDb('YT_VIDEO', false)" class="row justify-evenly items-center q-gutter-md ">
<div class="text-center">
<h4 class="subtitle text-blue" v-html="getValDb('YT_TITLE', false)"></h4>
<div class="">
<div class="">
<iframe
:width="tools.getwidthscale(mythis, getValDb('YT_W', false), 800)"
:height="tools.getheightbywidth(mythis, getValDb('YT_W', false), getValDb('YT_H', false), 800)"
:src="getValDb('YT_VIDEO', false)"
frameborder="0"
allowfullscreen
></iframe>
</div>
</div>
<!--<q-video src="../../statics/video/Intervista_Cristina_Barattoni.mp4">-->
<!--</q-video>-->
</div>
</div>
<section class="maxwidth padding_gallery bg-white text-grey-10 text-center" >
<q-carousel
swipeable
animated
:autoplay="8000"
v-model="slide2"
arrows
thumbnails
infinite
:height="tools.heightgallery()">
<q-carousel-slide v-for="(rec, index) in getImmagini" :key="index" :name="index"
:img-src="rec.img"
:alt="rec.alt"
class="carousel_slide">
<div class="absolute-bottom custom-caption" style="margin-bottom: 70px">
<div class="text-h5"><span
class="text-h6 text-grey-1 shadow-max">{{index + 1}}. </span><span
class="text-h6 text-grey-2 shadow">{{rec.title}}</span></div>
<div class="text-subtitle1"><span class="text-grey-4 shadow">{{rec.subtitle}}</span>
</div>
</div>
</q-carousel-slide>
</q-carousel>
</section>
<div v-if="!tools.isMobile()" style="margin: 60px 60px;"></div>
<COpenStreetMap :imgmap="getValDb('IMGMAP', false)" :urlmap="getValDb('URLMAP', false)" :title="getValDb('MAP_TITLE', false)"
:coordinates="getValDb('COORD_MAP_1', false)" :coord_big="getValDb('COORD_MAP_BIG', false)">
</COpenStreetMap>
<div class="q-ma-md"></div>
</div>
</CMyPage>
</q-page>
</template>
<script lang="ts" src="./home_tdv.ts">
</script>
<style lang="scss" scoped>
@import './home_tdv.scss';
</style>

View File

@@ -0,0 +1,12 @@
.profile {
width: 100%;
margin: 0 auto;
max-width: 450px;
}
.myrow{
display: flex;
@media (max-width: 600px) {
flex-flow: column;
}
}

View File

@@ -0,0 +1,81 @@
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { tools } from '@store/Modules/tools'
import { defineComponent } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
export default defineComponent({
name: 'Profile',
components: { CProfile, CTitleBanner, CMyFieldDb },
props: {},
setup() {
const userStore = useUserStore()
const $router = useRouter()
const globalStore = useGlobalStore()
const $q = useQuasar()
const { t } = useI18n();
function getpayment() {
return userStore.my.profile.paymenttypes
}
function profile() {
return userStore.my.profile
}
function eliminaAccount() {
$q.dialog({
message: t('reg.cancellami', { sitename: t('ws.sitename') }),
cancel: {
label: t('dialog.cancel')
},
ok: {
label: t('dialog.yes'),
push: true
},
title: t('pages.profile')
}).onOk(() => {
$q.dialog({
message: t('reg.cancellami_2', { sitename: t('ws.sitename') }),
cancel: {
label: t('dialog.cancel')
},
ok: {
label: t('dialog.yes'),
push: true
},
title: t('pages.profile')
})
.onOk(() => {
globalStore.DeleteRec({ table: toolsext.TABUSER, id: userStore.my._id })
.then((ris: any) => {
if (ris) {
tools.showPositiveNotif($q, t('reg.account_cancellato'))
userStore.logout()
$router.replace('/')
} else
tools.showNegativeNotif($q, t('db.recfailed'))
})
})
})
}
return {
eliminaAccount,
profile,
getpayment,
tools,
costanti,
}
}
})

View File

@@ -0,0 +1,266 @@
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
<div class="q-gutter-sm q-pa-xs q-pb-md">
<CTitleBanner
class="q-pa-xs" :title="$t('pages.profile')" bgcolor="bg-primary" clcolor="text-white"
myclass="myshad" :canopen="true">
<div class="column">
<div class="myrow">
<CMyFieldDb
:title="$t('reg.name')"
table="users"
mykey="name"
:type="costanti.FieldType.string">
</CMyFieldDb>
<CMyFieldDb
:title="$t('reg.surname')"
table="users"
mykey="surname"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<div class="myrow">
<CMyFieldDb
:title="$t('reg.photo')"
table="users"
mykey="profile"
mysubkey="img"
:type="costanti.FieldType.image">
</CMyFieldDb>
</div>
<div class="myrow">
<CMyFieldDb
:title="$t('reg.username')"
table="users"
mykey="username"
:disable="true"
:type="costanti.FieldType.string">
</CMyFieldDb>
<CMyFieldDb
:title="$t('reg.email')"
table="users"
mykey="email"
:disable="true"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<CMyFieldDb
:title="$t('reg.nationality')"
table="users"
mykey="profile"
mysubkey="nationality"
:type="costanti.FieldType.nationality">
</CMyFieldDb>
<div class="myrow">
<CMyFieldDb
:title="$t('reg.intcode_cell')"
table="users"
mykey="profile"
mysubkey="intcode_cell"
:type="costanti.FieldType.intcode">
</CMyFieldDb>
<CMyFieldDb
:title="$t('reg.cell')"
table="users"
mykey="profile"
mysubkey="cell"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<br/>
<div class="myrow justify-center">
<q-btn
push
rounded
color="primary"
size="md"
to="/requestresetpwd"
:label="$t('reg.modificapassword')">
</q-btn>
</div>
</div>
</CTitleBanner>
<CTitleBanner
class="q-pa-xs" title="Informazioni su di te" bgcolor="bg-primary" clcolor="text-white"
myclass="myshad" :canopen="true">
<div class="column">
<div class="myrow">
<CMyFieldDb
title="Biografia"
table="users"
mykey="profile"
mysubkey="biografia"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
</div>
<!--
<div class="column">
<div class="myrow">
<CMyFieldDb
title="Motivazioni"
table="users"
mykey="profile"
mysubkey="motivazioni"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<div class="myrow">
<CMyFieldDb
title="Competenze e Professionalità"
table="users"
mykey="profile"
mysubkey="competenze_professionalita"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<div class="myrow">
<CMyFieldDb
title="Cosa potrei offrire?"
table="users"
mykey="profile"
mysubkey="cosa_offrire"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<div class="myrow">
<CMyFieldDb
title="Cosa vorrei ricevere?"
table="users"
mykey="profile"
mysubkey="cosa_ricevere"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<div class="myrow">
<CMyFieldDb
title="Altre Comunicazioni"
table="users"
mykey="profile"
mysubkey="altre_comunicazioni"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<div class="myrow">
<CMyFieldDb
title="Come ci hai conosciuto?"
table="users"
mykey="profile"
mysubkey="come_ci_hai_conosciuto"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
</div>
-->
</CTitleBanner>
<!--
<CTitleBanner class="q-pa-xs" :title="$t('pages.payment')" bgcolor="bg-primary" clcolor="text-white"
myclass="myshad" :canopen="true">
<div class="myrow fa-border justify-center items-center">
<CMyFieldDb v-if="costanti.isselectPayeer()"
:title="$t('reg.payeer_id')"
table="users"
mykey="profile"
myimg="statics/images/payeer.jpg"
mysubkey="payeer_id"
:type="costanti.FieldType.string">
</CMyFieldDb>
<CMyFieldDb v-if="costanti.isselectAdvCash()"
:title="$t('reg.advcash_id')"
table="users"
mykey="profile"
mysubkey="advcash_id"
myimg="statics/images/advcash.jpg"
:type="costanti.FieldType.string">
</CMyFieldDb>
<CMyFieldDb v-if="costanti.isselectRevolut()"
:title="$t('reg.revolut')"
table="users"
mykey="profile"
mysubkey="revolut"
myimg="statics/images/revolut.jpg"
:type="costanti.FieldType.string">
</CMyFieldDb>
<CMyFieldDb v-if="costanti.isselectPaypal()"
:title="$t('reg.email_paypal')"
table="users"
mykey="profile"
mysubkey="email_paypal"
myimg="statics/images/paypal.jpg"
:type="costanti.FieldType.string">
</CMyFieldDb>
<CMyFieldDb v-if="costanti.isselectPaypal()"
:title="$t('reg.link_payment')"
table="users"
mykey="profile"
mysubkey="link_payment"
:type="costanti.FieldType.string">
</CMyFieldDb>
<CMyFieldDb :title="$t('reg.country_pay')"
table="users"
mykey="profile"
mysubkey="country_pay"
:type="costanti.FieldType.nationality">
</CMyFieldDb>
<CMyFieldDb :title="$t('reg.note_payment')"
table="users"
mykey="profile"
mysubkey="note_payment"
:type="costanti.FieldType.string">
</CMyFieldDb>
</div>
<CMyFieldDb :title="$t('reg.paymenttype')"
table="users"
mykey="profile"
mysubkey="paymenttypes"
:type="costanti.FieldType.multiselect"
jointable="paymenttypes">
</CMyFieldDb>
</CTitleBanner>
-->
<br><br>
<div class="text-center">
<q-btn rounded size="md" color="negative" @click="eliminaAccount" :label="$t('reg.cancella_account')">
</q-btn>
</div>
</div>
</template>
<script lang="ts" src="./profile.ts">
</script>
<style lang="scss" scoped>
@import './profile.scss';
</style>
<!--<CMyFieldDb :title="$t('reg.username_telegram')"
table="users"
mykey="profile"
mysubkey="username_telegram"
:type="costanti.FieldType.string">
</CMyFieldDb>-->
<!--<CMyFieldDb title="Telegram Id"
table="users"
:readonly="true"
mykey="profile"
mysubkey="teleg_id"
:type="costanti.FieldType.number">
</CMyFieldDb>-->