From a509eefd7ea31f3821207965d221daa81f91ec99 Mon Sep 17 00:00:00 2001 From: Paolo Arena Date: Thu, 28 Jul 2022 21:47:55 +0200 Subject: [PATCH] Friends Notification Starting Group Create Notification... --- src/common/axios.ts | 70 +++++ src/db/db_data.js | 89 ++++++ src/pages/Error404.vue | 31 ++ src/pages/Index.vue | 49 +++ src/root/home/home.scss | 0 src/root/home/home.ts | 21 ++ src/root/home/home.vue | 26 ++ src/root_spec/home_tdv/home_tdv.scss | 452 +++++++++++++++++++++++++++ src/root_spec/home_tdv/home_tdv.ts | 78 +++++ src/root_spec/home_tdv/home_tdv.vue | 220 +++++++++++++ src/views/user/profile/profile.scss | 12 + src/views/user/profile/profile.ts | 81 +++++ src/views/user/profile/profile.vue | 266 ++++++++++++++++ 13 files changed, 1395 insertions(+) create mode 100755 src/common/axios.ts create mode 100755 src/db/db_data.js create mode 100644 src/pages/Error404.vue create mode 100644 src/pages/Index.vue create mode 100755 src/root/home/home.scss create mode 100755 src/root/home/home.ts create mode 100755 src/root/home/home.vue create mode 100755 src/root_spec/home_tdv/home_tdv.scss create mode 100755 src/root_spec/home_tdv/home_tdv.ts create mode 100755 src/root_spec/home_tdv/home_tdv.vue create mode 100755 src/views/user/profile/profile.scss create mode 100755 src/views/user/profile/profile.ts create mode 100755 src/views/user/profile/profile.vue diff --git a/src/common/axios.ts b/src/common/axios.ts new file mode 100755 index 00000000..34a52d71 --- /dev/null +++ b/src/common/axios.ts @@ -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 = (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 + } +} diff --git a/src/db/db_data.js b/src/db/db_data.js new file mode 100755 index 00000000..a6d707ca --- /dev/null +++ b/src/db/db_data.js @@ -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 Dare e Ricevere un trattamento completo.
' + + 'Possono partecipare le persone che hanno già preso parte al seminario di 1° livello, ma anche tutti quelli che hanno il desiderio di conoscere il Reiki e sperimentarlo per la prima volta: in questo caso invitiamo gli interessati a contattarci per un appuntamento prima dell’inizio 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 Dare e Ricevere un trattamento completo.
' + + 'Possono partecipare le persone che hanno già preso parte al seminario di 1° livello, ma anche tutti quelli che hanno il desiderio di conoscere il Reiki e sperimentarlo per la prima volta: in questo caso invitiamo gli interessati a contattarci per un appuntamento prima dell’inizio 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.
' + + '' + + 'Per info vedi Seminari Reiki', + 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!
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: '', + }, + ], +} diff --git a/src/pages/Error404.vue b/src/pages/Error404.vue new file mode 100644 index 00000000..e330c446 --- /dev/null +++ b/src/pages/Error404.vue @@ -0,0 +1,31 @@ + + + diff --git a/src/pages/Index.vue b/src/pages/Index.vue new file mode 100644 index 00000000..d7bd7674 --- /dev/null +++ b/src/pages/Index.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/root/home/home.scss b/src/root/home/home.scss new file mode 100755 index 00000000..e69de29b diff --git a/src/root/home/home.ts b/src/root/home/home.ts new file mode 100755 index 00000000..d652a4a9 --- /dev/null +++ b/src/root/home/home.ts @@ -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, + } + }, +}) diff --git a/src/root/home/home.vue b/src/root/home/home.vue new file mode 100755 index 00000000..a385e5b8 --- /dev/null +++ b/src/root/home/home.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/root_spec/home_tdv/home_tdv.scss b/src/root_spec/home_tdv/home_tdv.scss new file mode 100755 index 00000000..0e32f575 --- /dev/null +++ b/src/root_spec/home_tdv/home_tdv.scss @@ -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; +} diff --git a/src/root_spec/home_tdv/home_tdv.ts b/src/root_spec/home_tdv/home_tdv.ts new file mode 100755 index 00000000..a636bdb8 --- /dev/null +++ b/src/root_spec/home_tdv/home_tdv.ts @@ -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, + } + }, +}) + diff --git a/src/root_spec/home_tdv/home_tdv.vue b/src/root_spec/home_tdv/home_tdv.vue new file mode 100755 index 00000000..d0710b3a --- /dev/null +++ b/src/root_spec/home_tdv/home_tdv.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/src/views/user/profile/profile.scss b/src/views/user/profile/profile.scss new file mode 100755 index 00000000..e75df9f2 --- /dev/null +++ b/src/views/user/profile/profile.scss @@ -0,0 +1,12 @@ +.profile { + width: 100%; + margin: 0 auto; + max-width: 450px; +} + +.myrow{ + display: flex; + @media (max-width: 600px) { + flex-flow: column; + } +} diff --git a/src/views/user/profile/profile.ts b/src/views/user/profile/profile.ts new file mode 100755 index 00000000..330796e6 --- /dev/null +++ b/src/views/user/profile/profile.ts @@ -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, + } + } +}) diff --git a/src/views/user/profile/profile.vue b/src/views/user/profile/profile.vue new file mode 100755 index 00000000..aed5c358 --- /dev/null +++ b/src/views/user/profile/profile.vue @@ -0,0 +1,266 @@ + + + + + + + + +