Pannello Utente

Aggiornamento Yarn
This commit is contained in:
Paolo Arena
2022-07-10 01:24:54 +02:00
parent 51e13794c3
commit 42cb624f41
82 changed files with 2379 additions and 1162 deletions

View File

@@ -207,7 +207,7 @@ const msg_website_it = {
+ '<li>👥 Aiutando a creare Gruppi Territoriali nella vostra città, impegnandosi a realizzare progetti per il Bene Comune, in onore ai principi Amorevoli e di condivisione.</li>'
+ '<li>🌱 Sostenendo le persone attorno a voi, e rispettando la nostra vera Casa: Madre Natura e Tutti gli Esseri Viventi. ❤️</li>'
+ '<li>👨🏻‍💻 Con una <strong>piccola donazione</strong> per le spese dei Server</li></ul>' +
'<strong>Tramite Paypal:</strong><br><em>clicca sull\'importo per fare una donazione. </em><br>' +
'<strong>Tramite Paypal:</strong><br>' +
'<div style="font-size: 1.5rem; background-color: white; color: blue; border: solid 2px #f00; margin: 10px; padding: 10px; border-radius: 10px; " ' +
'class="row justify-around">' +
'<span><a href="https://paypal.me/paoloarena/1" target="_blank">1€</a></span>' +
@@ -215,7 +215,7 @@ const msg_website_it = {
'<span><a href="https://paypal.me/paoloarena/5" target="_blank">5€</a></span>' +
'<span><a href="https://paypal.me/paoloarena/10" target="_blank">10€</a></span>' +
'<span><a href="https://paypal.me/paoloarena" target="_blank">scegli</a></span>' +
'</div><br>' +
'</div><em>clicca sull\'importo per fare una <strong>donazione</strong> </em><br>' +
'In alternativa inventati una forma di scambio da donare a Paolo (soprannome <a href="https://t.me/surya1977" target="_blank">Surya</a>)<br />' +
'<span style="color: red; font-size: 2rem;">❤</span> Sono graditi messaggi sia di suggerimenti che di apprezzamenti.<br>' +
'Grazie Mille per l\'Aiuto' +

View File

@@ -4,13 +4,14 @@ import {
IFunctionality,
IPreloadImages,
} from '@model'
import { func } from '@store/Modules/fieldsTable'
const functionality: IFunctionality = {
PWA: true,
SHOW_USER_MENU: true, // Cambiare con true
SHOW_PROFILE: true,
SHOW_REG_BUTTON: false,
ENABLE_REGISTRATION: true, // Cambiare con true
ENABLE_REGISTRATION: true,
ENABLE_REG_NEED_TELEGRAM: true,
SHOW_NEWSLETTER: false,
SHOW_ONLY_POLICY: true,
@@ -18,6 +19,7 @@ const functionality: IFunctionality = {
ENABLE_PROJECTS_LOADING: false,
SHOW_IF_IS_SERVER_CONNECTION: false,
SHOW_MESSAGES: false,
SHOW_NOTIF: true,
BOOKING_EVENTS: true,
ENABLE_ECOMMERCE: false,
ENABLE_REG_ISP: true,
@@ -579,7 +581,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: 'fas fa-user',
name: 'proj.group2',
component: () => import('@/views/user/mygroup/mygroup.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -590,7 +592,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: 'fas fa-user',
name: 'pages.mypage2',
component: () => import('@/views/user/mypagebacheca/mypagebacheca.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -601,7 +603,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: '',
name: 'pages.myservice2',
component: () => import('@/views/user/myservice/myservice.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -612,7 +614,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: '',
name: 'pages.myhosps2',
component: () => import('@/views/user/mypagehosp/mypagehosp.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -623,7 +625,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: '',
name: 'pages.mygood2',
component: () => import('@/views/user/mypagegood/mypagegood.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -709,7 +711,7 @@ const baseroutes: IListRoutes[] = [
infooter: true
},
{
active: functionality.ENABLE_REGISTRATION,
active: functionality.ENABLE_REGISTRATION && functionality.ENABLE_REG_NEED_TELEGRAM,
order: 1000,
path: '/signup/:invited/:usernameteleg/:idteleg',
materialIcon: 'how_to_reg',
@@ -719,6 +721,17 @@ const baseroutes: IListRoutes[] = [
infooter: false,
separator: false
},
/*{
active: functionality.ENABLE_REGISTRATION && !functionality.ENABLE_REG_NEED_TELEGRAM,
order: 1000,
path: '/signup',
materialIcon: 'how_to_reg',
name: 'pages.SignUp',
component: () => import('@/views/login/signup/signup_noteleg.vue'),
inmenu: false,
infooter: false,
separator: false
},*/
{
active: true,
order: 1001,

View File

@@ -6,7 +6,7 @@ import { useUserStore } from '@store/UserStore'
import { Logo } from '../../components/logo'
import { Footer } from '../../components/Footer'
import { LandingFooter } from '../../components/LandingFooter'
import { CMyPage } from '../../components/CMyPage/index'
import { tools } from '@src/store/Modules/tools'
@@ -21,7 +21,7 @@ import { IGallery } from 'model'
export default defineComponent({
name: 'Home_tdv',
components: { Logo, Footer, CMyPage, CCardCarousel, CEventsCalendar, COpenStreetMap },
components: { Logo, LandingFooter, CMyPage, CCardCarousel, CEventsCalendar, COpenStreetMap },
setup() {
const animare = ref(0)

View File

@@ -22,27 +22,27 @@
"generate-sw": "workbox generateSW workbox-config.js"
},
"dependencies": {
"@quasar/extras": "^1.13.6",
"@quasar/extras": "^1.14.2",
"@quasar/quasar-ui-qcalendar": "^4.0.0-beta.13",
"@vue-leaflet/vue-leaflet": "^0.6.1",
"@vue/compat": "^3.2.33",
"@vue/compiler-sfc": "^3.2.33",
"@vue/eslint-config-standard": "6.1.0",
"@vuelidate/core": "^2.0.0-alpha.41",
"@vuelidate/validators": "^2.0.0-alpha.29",
"@vue/compat": "^3.2.37",
"@vue/compiler-sfc": "^3.2.37",
"@vue/eslint-config-standard": "7.0.0",
"@vuelidate/core": "^2.0.0-alpha.42",
"@vuelidate/validators": "^2.0.0-alpha.30",
"acorn": "^8.7.1",
"autoprefixer": "^10.4.7",
"axios": "^0.26.0",
"bcryptjs": "^2.4.3",
"chart.js": "^3.7.1",
"core-js": "^3.22.4",
"chart.js": "^3.8.0",
"core-js": "^3.23.3",
"crypto": "^1.0.1",
"date-fns": "^2.28.0",
"dotenv": "^16.0.0",
"echarts": "^5.3.2",
"dotenv": "^16.0.1",
"echarts": "^5.3.3",
"eslint-plugin-quasar": "^1.1.0",
"eslint-plugin-standard": "^5.0.0",
"graphql": "^16.4.0",
"graphql": "^16.5.0",
"graphql-tag": "^2.12.6",
"gsap": "^3.10.4",
"jquery": "^3.6.0",
@@ -50,24 +50,24 @@
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"normalize.css": "^8.0.1",
"npm": "^8.9.0",
"npm": "^8.13.2",
"nprogress": "^0.2.0",
"pinia": "^2.0.14",
"prerender-spa-plugin": "^3.4.0",
"quasar": "^2.6.6",
"quasar": "^2.7.5",
"quasar-extras": "^2.0.9",
"register-service-worker": "^1.7.2",
"vee-validate": "^4.5.11",
"vue": "^3.2.33",
"vue": "^3.2.37",
"vue-chart-3": "^3.1.8",
"vue-class-component": "^8.0.0-rc.1",
"vue-country-code": "^1.1.3",
"vue-echarts": "^6.0.2",
"vue-echarts": "^6.1.0",
"vue-i18n": "^9.2.0-beta.26",
"vue-idb": "^0.2.0",
"vue-loader": "^17.0.0",
"vue-property-decorator": "^10.0.0-rc.3",
"vue-router": "^4.0.15",
"vue-router": "^4.1.0",
"vue-scroll-reveal": "^1.0.11",
"vue-svgicon": "^4.0.0-alpha.3",
"vue2-dragula": "^2.5.5",
@@ -79,38 +79,38 @@
"@types/bcryptjs": "^2.4.2",
"@types/dotenv": "^8.2.0",
"@types/googlemaps": "^3.43.3",
"@types/jest": "^27.5.0",
"@types/jest": "^28.1.4",
"@types/js-cookie": "^3.0.2",
"@types/node": "17.0.31",
"@types/node": "18.0.1",
"@types/nprogress": "^0.2.0",
"@types/vue-tel-input": "^2.1.2",
"@types/vuelidate": "^0.7.15",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"eslint": "^8.14.0",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^8.7.1",
"eslint-plugin-vue": "^9.1.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"http-proxy-middleware": "^2.0.6",
"jest": "^28.0.3",
"jest": "^28.1.2",
"json-loader": "^0.5.7",
"node-sass": "7.0.1",
"npm-check-updates": "^12.5.11",
"npm-check-updates": "^15.0.3",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"postcss": "^8.4.13",
"postcss-loader": "^6.2.1",
"sass-loader": "^12.6.0",
"postcss": "^8.4.14",
"postcss-loader": "^7.0.0",
"sass-loader": "^13.0.2",
"strip-ansi": "=7.0.1",
"ts-jest": "^28.0.1",
"ts-loader": "^9.3.0",
"ts-jest": "^28.0.5",
"ts-loader": "^9.3.1",
"tslint": "^6.1.3",
"tslint-config-standard": "^9.0.0",
"tslint-loader": "^3.5.4",
"typescript": "^4.6.4",
"typescript": "^4.7.4",
"vue-cli-plugin-element-ui": "^1.1.4",
"vueify": "^9.4.1",
"webpack": "^5.0.0",

View File

@@ -300,13 +300,8 @@ module.exports = configure((ctx) => ({
type: 'image/png',
},
{
src: 'images/riso-android-icon-96x96.png',
sizes: '96x96',
type: 'image/png',
},
{
src: 'images/riso-android-icon-144x144.png',
sizes: '144x144',
src: 'images/riso-android-icon-384x384.png',
sizes: '384x384',
type: 'image/png',
},
{
@@ -315,8 +310,13 @@ module.exports = configure((ctx) => ({
type: 'image/png',
},
{
src: 'images/riso-android-icon-384x384.png',
sizes: '384x384',
src: 'images/riso-android-icon-144x144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: 'images/riso-android-icon-96x96.png',
sizes: '96x96',
type: 'image/png',
},
],
@@ -353,7 +353,7 @@ module.exports = configure((ctx) => ({
builder: {
// https://www.electron.build/configuration/configuration
appId: 'InsiemeSiPuo',
appId: 'Riso',
},
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain

View File

@@ -257,6 +257,7 @@ if (workbox) {
return fetch(args.event.request)
.then((res) => caches.open('dynamic')
.then((cache) => {
console.log('cache', args.event.request.url)
cache.put(args.event.request.url, res.clone())
return res
}))

View File

@@ -4,7 +4,7 @@ import { BannerCookies } from '@/components/BannerCookies'
import { useI18n } from '@src/boot/i18n'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { Header } from '@/components/Header'
import { MyHeader } from '@/components/MyHeader'
import { MyFooter } from '@/components/MyFooter'
import { CFirstPageApp } from '@/components/CFirstPageApp'
import { computed } from 'vue'
@@ -13,7 +13,7 @@ import { tools } from '@store/Modules/tools'
export default {
components: {
appHeader: Header,
appHeader: MyHeader,
appFooter: MyFooter,
CFirstPageApp,
CProvaPao,

View File

@@ -280,10 +280,14 @@ export const shared_consts = {
},
{
value: 8,
label: 'Giardino',
label: 'Yurta',
},
{
value: 9,
label: 'Giardino',
},
{
value: 10,
label: 'Aria aperta',
},
],
@@ -426,6 +430,22 @@ export const shared_consts = {
value: 19,
label: 'Adatto ai neonati (fino ai 2 anni)',
},
{
value: 20,
label: 'Biancheria inclusa',
},
{
value: 21,
label: 'Biancheria su richiesta (a parte)',
},
{
value: 22,
label: 'Asciugamani',
},
{
value: 23,
label: 'Asciugacapelli',
},
],
Regions: [

View File

@@ -2,6 +2,7 @@ import {
defineComponent, onMounted, ref,
} from 'vue'
import { useI18n } from '@src/boot/i18n'
import { useQuasar } from 'quasar'
// PropType,
@@ -18,6 +19,8 @@ export default defineComponent({
setup(props, context) {
const { t } = useI18n();
const $q = useQuasar()
const elementId = ref<string>('id');
const disableDecline = ref<boolean>(true);
const debug = ref<boolean>(false);
@@ -95,6 +98,21 @@ export default defineComponent({
}
const decline = (): void => {
const mytitle = 'Cookies'
const mytext = t('reg.refuse_cookie')
return $q.dialog({
message: mytext,
html: true,
ok: {
label: 'Rifiuta Cookies',
push: true,
},
title: mytitle,
cancel: true,
persistent: false,
}).onOk(() => {
if (!debug.value) {
setCookieStatus('decline')
}
@@ -102,6 +120,11 @@ export default defineComponent({
status.value = 'decline'
isOpen.value = false
context.emit('clicked-decline')
}).onCancel(() => {
//
})
}
const clickInfo = (): void => {

View File

@@ -7,10 +7,12 @@
<template v-slot:action>
<div class="row justify-center margin_buttons_cook q-gutter-lg text-center">
<q-btn label="INFO" to="/policy"></q-btn>
<q-btn color="green" label="ACCETTA" @click="accept"></q-btn>
<q-btn
color="red" label="RIFIUTA"
@click="decline"></q-btn>
<q-btn color="green" label="ACCETTA" @click="accept"></q-btn>
@click="decline">
</q-btn>
</div>
</template>
</q-banner>

View File

@@ -6,7 +6,7 @@ import { useQuasar } from 'quasar'
import { colors, Screen, Platform, date } from 'quasar'
import { EState, IBookedEvent, IBookedEventPage, IEvents, IMessage, IMessagePage, IParamDialog } from '@model'
import { Logo } from '../logo'
import { Footer } from '../Footer'
import { LandingFooter } from '../LandingFooter'
import { CTitle } from '../CTitle'
import { CImgText } from '../CImgText'
import { CMyEditor } from '../CMyEditor'
@@ -44,7 +44,7 @@ export default defineComponent({
},
components: {
Logo,
Footer,
LandingFooter,
CTitle,
CImgText,
CMySelect,

View File

@@ -4,12 +4,12 @@ import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { tools } from '@store/Modules/tools'
import { Footer, Logo } from '@components'
import { LandingFooter, Logo } from '@components'
export default defineComponent({
name: 'CFundRaising',
components: {Logo, Footer},
components: {Logo, LandingFooter},
props: {},
setup() {
const { t } = useI18n();

View File

@@ -13,7 +13,7 @@
</div>
</section>
<Footer></Footer>
<LandingFooter></LandingFooter>
</div>
</q-page>
</template>

View File

@@ -36,6 +36,7 @@ import translate from '@/globalroutines/util'
import { toolsext } from '@store/Modules/toolsext'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { CMyCardGrpPopup } from '@/components/CMyCardGrpPopup'
import { useRouter } from 'vue-router'
export default defineComponent({
name: 'CGridTableRec',
@@ -248,6 +249,8 @@ export default defineComponent({
const startsearch = ref(false)
const $router = useRouter()
const serverData: any = ref([])
const spinner_visible = ref(false)
const searchList = ref(<ISearchList[]>[])
@@ -311,6 +314,16 @@ export default defineComponent({
refresh()
})
$router.beforeResolve((to: any) => {
// console.log('beforeResolve', visupagedialog.value, 'to', to)
if (visupagedialog.value && !to.meta.newpage) {
visupagedialog.value = false
return false
}
})
function setCategBySector(tablecat: string, tabsector: string, newval: any) {
const recSector = searchList.value.find((rec) => rec.table === tabsector)
@@ -1418,44 +1431,70 @@ export default defineComponent({
}
}
function enableSaveNewRec() {
function enableSaveNewRec(newrec: boolean) {
let ok = true
const showmsg = true
let myrec = recModif.value
if (newrec) {
myrec = newRecord.value
}
//mycolumns.value.forEach((col: IColGridTable) => {
let col: IColGridTable
let msg = ''
for (col of mycolumns.value) {
if (!msg) {
if (col.required) {
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
if (tools.isArray(newRecord.value[col.name])) {
if (newRecord.value[col.name].length <= 0) {
return false
if (tools.isArray(myrec[col.name])) {
if (myrec[col.name].length <= 0) {
msg = 'Si prega di compilare il campo \'' + getColMissing(myrec) + '\''
}
} else {
if (!newRecord.value[col.name]) {
if (!myrec[col.name]) {
msg = 'Si prega di compilare il campo \'' + getColMissing(myrec) + '\''
}
}
}
if (!msg && col.maxlength! > 0) {
if (myrec[col.name].length > col.maxlength!) {
msg = t('annunci.maxlength', { name: translate(col.label_trans), maxlength: col.maxlength })
}
}
if (!msg && col.minlength! > 0) {
if (myrec[col.name].length < col.minlength!) {
msg = t('annunci.minlength', { name: translate(col.label_trans), minlength: col.minlength })
}
}
}
}
if (showmsg && msg) {
tools.showNegativeNotif($q, msg, 5000)
return false
}
}
}
}
return ok
}
function getColMissing() {
function getColMissing(myrec: any) {
let col: IColGridTable
for (col of mycolumns.value) {
if (col.required) {
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
if (tools.isArray(newRecord.value[col.name])) {
if (newRecord.value[col.name].length <= 0) {
if (tools.isArray(myrec[col.name])) {
if (myrec[col.name].length <= 0) {
return translate(col.label_trans)
}
} else {
if (!newRecord.value[col.name]) {
if (!myrec[col.name]) {
// console.log('col.name', col.name)
return translate(col.label_trans)
}
@@ -1469,9 +1508,7 @@ export default defineComponent({
async function saveNewRecord() {
// check if the field are setted
if (!enableSaveNewRec()) {
tools.showNeutralNotif($q, 'Si prega di compilare il campo \'' + getColMissing() + '\'', 5000)
if (!enableSaveNewRec(true)) {
return false
}
@@ -1548,6 +1585,11 @@ export default defineComponent({
data: {}
}
if (!enableSaveNewRec(false)) {
return false
}
mydata.data = recModif.value
const oldrec = serverData.value.find((rec: IMySkill) => rec._id === recModif.value._id)

View File

View File

@@ -0,0 +1,55 @@
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useGlobalStore } from '@store/globalStore'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { tools } from '@store/Modules/tools'
import { costanti } from '@costanti'
import { CDateTime } from '@/components/CDateTime'
export default defineComponent({
name: 'CKeyAndValue',
props: {
mykey: {
type: String,
required: true,
},
myvalue: {
type: String,
required: false,
default: '',
},
mydate: {
type: Date,
required: false,
default: null,
},
color: {
type: String,
required: false,
default: '',
},
},
components: { CDateTime },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
const globalStore = useGlobalStore()
function mounted() {
//
}
onMounted(mounted)
return {
tools,
costanti,
fieldsTable,
globalStore,
}
},
})

View File

@@ -0,0 +1,38 @@
<template>
<div class="text-center">
<div class="row items-center justify-center q-gutter-md q-ma-xs">
<div class="q-ma-xs">
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
<template v-slot:control>
<div class="centermydiv">
<div class="self-center full-width no-outline text-center" tabindex="0">{{ mykey }}</div>
</div>
</template>
</q-field>
</div>
<div :class="` q-ma-sm q-pa-sm col-grow `">
<span :style="color ? `background-color: ${color} !important; color: white;` : ``">
<span v-if="mydate">
<CDateTime
v-model:value="mydate"
:canEdit="false">
</CDateTime>
</span>
<span v-else>
{{myvalue}}
</span>
</span>
</div>
</div>
</div>
</template>
<script lang="ts" src="./CKeyAndValue.ts">
</script>
<style lang="scss" scoped>
@import './CKeyAndValue.scss';
</style>

View File

@@ -0,0 +1 @@
export {default as CKeyAndValue} from './CKeyAndValue.vue'

View File

@@ -36,6 +36,11 @@ export default defineComponent({
required: false,
default: 0,
},
minlength: {
type: Number,
required: false,
default: 0,
},
mysubsubkey: {
type: String,
required: false,
@@ -114,7 +119,7 @@ export default defineComponent({
const { t } = useI18n()
const globalStore = useGlobalStore()
const col = ref(<IColGridTable> { name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.maxlength })
const col = ref(<IColGridTable> { name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.maxlength, minlength: props.minlength })
const row = ref({})
const { setValDb, getValDb } = MixinBase()

View File

@@ -4,14 +4,14 @@ import {
import { IMyPage } from '@src/model'
import { useGlobalStore } from '@store/globalStore'
import { Footer } from '@/components/Footer'
import { LandingFooter } from '@/components/LandingFooter'
import { CImgTitle } from '../CImgTitle/index'
import { CTitle } from '../CTitle/index'
export default defineComponent({
name: 'CMyPage',
components: { Footer, CImgTitle, CTitle },
components: { LandingFooter, CImgTitle, CTitle },
props: {
title: String,
mypath: {

View File

@@ -41,7 +41,7 @@
</div>
<slot></slot>
<div v-if="!nofooter">
<Footer></Footer>
<LandingFooter></LandingFooter>
</div>
</div>
</div>

View File

@@ -196,7 +196,8 @@ export default defineComponent({
fieldtype: 0,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView,
visible: true,
maxlength: props.mycol ? props.mycol.maxlength : 0
maxlength: props.mycol ? props.mycol.maxlength : 0,
minlength: props.mycol ? props.mycol.minlength : undefined
})
const { setValDb, getValDb } = MixinBase()

View File

@@ -44,7 +44,7 @@
color="white" text-color="blue"
:icon="col.icon ? col.icon : `fas fa-globe`"
:href="tools.getlinkstd(myvalue)"
:label="myvalue"
:label="tools.firstchars(myvalue, 40)"
target="_blank"
>
</q-btn>
@@ -613,6 +613,7 @@
counter
:type="col.fieldtype === costanti.FieldType.crypted ? 'password' : 'text'"
:maxlength="col.maxlength ? col.maxlength : undefined"
:minlength="col.minlength ? col.minlength : undefined"
v-model="scope.value"
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
@keyup.enter.stop
@@ -841,6 +842,7 @@
<q-input
v-model="scope.value"
:maxlength="col.maxlength ? col.maxlength : undefined"
:minlength="col.minlength ? col.minlength : undefined"
type="password"
@keyup.enter="scope.set"
autofocus>

View File

@@ -43,6 +43,7 @@ export default defineComponent({
mounted()
})
function mounted() {
if (props.prop_myrec) {
myrec.value = props.prop_myrec
@@ -73,6 +74,14 @@ export default defineComponent({
emit('cmdext', cmd, val1, val2)
}
function navigaExt(obj: any) {
cmdExt(costanti.CMD_SHOW_PAGE, obj, null)
//let link = tools.getDirectoryByTable(props.table) + '/' + obj._id
//console.log('link', link)
//$router.push(link)
}
onMounted(mounted)
return {
@@ -81,6 +90,7 @@ export default defineComponent({
costanti,
getImgUser,
naviga,
navigaExt,
setCmd,
shared_consts,
userStore,

View File

@@ -29,7 +29,7 @@
</q-avatar>
</q-item-section>
<q-item-section @click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)">
<q-item-section @click="navigaExt(myrec)">
<q-item-label class="full-width">
<span v-for="(rec, ind) of myrec.recSkill" :key="ind"> <q-chip
dense

View File

@@ -2,7 +2,7 @@ import { defineComponent, PropType, ref } from 'vue'
import { Logo } from '../../components/logo/index'
import { Footer } from '../../components/Footer/index'
import { LandingFooter } from '../../components/LandingFooter/index'
import { tools } from '../../store/Modules/tools'
import { static_data } from '@src/db/static_data'
@@ -14,7 +14,7 @@ import MixinEvents from '@/mixins/mixin-events'
export default defineComponent({
name: 'CMySingleEvent',
components: { Logo, Footer, CImgText, CCard, CMyPage, CMyAvatar, CMyTeacher },
components: { Logo, LandingFooter, CImgText, CCard, CMyPage, CMyAvatar, CMyTeacher },
props: {
myevent: {
type: Object as PropType<IEvents>,

View File

@@ -2,7 +2,7 @@ import { defineComponent, onBeforeUnmount, onMounted, ref } from 'vue'
import { Logo } from '../../components/logo'
import { Footer } from '../../components/Footer'
import { LandingFooter } from '../../components/LandingFooter'
import { toolsext } from '@src/store/Modules/toolsext'
import { CImgTitle } from '../../components/CImgTitle/index'
@@ -17,7 +17,7 @@ import { IColl } from 'model'
export default defineComponent({
name: 'PhotosGallery',
components: { Logo, Footer, CImgTitle },
components: { Logo, LandingFooter, CImgTitle },
props: {
mygallery: {
type: Array,

View File

@@ -4,12 +4,12 @@ import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { tools } from '@store/Modules/tools'
import { Footer, Logo } from '@components'
import { LandingFooter, Logo } from '@components'
export default defineComponent({
name: 'CPresentazione',
components: {Logo, Footer},
components: {Logo, LandingFooter},
props: {},
setup() {
const { t } = useI18n();

View File

@@ -299,11 +299,11 @@
<p class="feat-descr" v-html="t('homepage.freecollabora.descr')"></p></div>
</div>
<div class="col-12 col-sm-5">
<div class="feature-item"><i
aria-hidden="true"
class="q-icon fas fa-hands-helping"> </i><h4>
{{ t('homepage.freesostieni.title') }}</h4>
<p class="feat-descr" v-html="t('homepage.freesostieni.descr')"></p></div>
<div class="feature-item" style="margin-top: 0px !important;">
<div class="text-big" style="margin: 0px !important; padding: 2px !important;" v-html="t('homepage.freesostieni.title')"></div>
<p class="feat-descr" v-html="t('homepage.freesostieni.descr')"></p>
</div>
</div>
<div class="col-12 col-sm-5">
<div class="feature-item"><i
@@ -329,7 +329,7 @@
</div>
</section>
<Footer></Footer>
<LandingFooter></LandingFooter>
</div>
</q-page>
</template>

View File

@@ -97,10 +97,10 @@ export default defineComponent({
userStore.signin($router, signin.value)
.then((riscode: number) => {
console.log('signin FINITO CALL: riscode=', riscode)
if ($q.screen.lt.sm) {
globalStore.setleftDrawerOpen(false)
}
console.log('signin FINITO CALL: riscode=', riscode)
if (riscode === tools.OK) {
if (userStore.isLogged) {
globalStore.rightDrawerOpen = false
@@ -133,7 +133,7 @@ export default defineComponent({
})
.catch((err: any) => {
// console.log('ERROR SIGNIN = ' + error)
console.log('ERROR SIGNIN = ' + err)
emit('checkErrors', err)
})

View File

@@ -1 +0,0 @@
export { default as Footer } from './Footer.vue'

View File

@@ -1 +0,0 @@
export { default as Header } from './Header.vue'

View File

@@ -16,7 +16,7 @@ import { CFacebookFrame } from '@/components/CFacebookFrame'
import MixinBase from '../../mixins/mixin-base'
export default defineComponent({
name: 'Footer',
name: 'LandingFooter',
components: { Logo, FormNewsletter, CFacebookFrame },
setup() {
@@ -25,7 +25,7 @@ export default defineComponent({
const { getarrValDb, getValDb } = MixinBase()
console.log('Footer - INIT')
console.log('LandingFooter - INIT')
function TelegramSupport() {
return globalStore.getValueSettingsByKey('TELEGRAM_SUPPORT', false)

View File

@@ -169,9 +169,9 @@ class="footer_link" @click="navigate" @keypress.enter="navigate"
</div>
</template>
<script lang="ts" src="./Footer.ts">
<script lang="ts" src="./LandingFooter.ts">
</script>
<style lang="scss" scoped>
@import './Footer.scss';
@import './LandingFooter.scss';
</style>

View File

@@ -0,0 +1 @@
export { default as LandingFooter } from './LandingFooter.vue'

View File

@@ -11,6 +11,7 @@ import { boot } from 'quasar/wrappers'
import { useRouter } from 'vue-router'
import { static_data } from '@/db/static_data'
import messagePopover from '../../layouts/toolbar/messagePopover/messagePopover.vue'
import notifPopover from '../../layouts/toolbar/notifPopover/notifPopover.vue'
import drawer from '../../layouts/drawer/drawer.vue'
import { CMyAvatar } from '@/components/CMyAvatar'
import { toolsext } from '@store/Modules/toolsext'
@@ -22,9 +23,9 @@ import MixinUsers from '../../mixins/mixin-users'
import { CMyCart, CSigninNoreg } from '@/components'
export default defineComponent({
name: 'Header',
name: 'MyHeader',
components: {
drawer, messagePopover, CMyAvatar, CSigninNoreg, CMyCart
drawer, messagePopover, CMyAvatar, CSigninNoreg, CMyCart, notifPopover
},
props: {
extraContent: {
@@ -344,7 +345,7 @@ export default defineComponent({
}
function getappname() {
return tools.getappname(tools.isMobile()) + ' ' + getAppVersion()
return tools.getappname(tools.isMobile())
}

View File

@@ -91,6 +91,9 @@
<div v-if="static_data.functionality.SHOW_MESSAGES">
<message-popover></message-popover>
</div>
<div v-if="static_data.functionality.SHOW_NOTIF">
<notif-popover></notif-popover>
</div>
<!--
<div class="right-itens">
@@ -240,9 +243,9 @@
</div>
</template>
<script lang="ts" src="./Header.ts">
<script lang="ts" src="./MyHeader.ts">
</script>
<style lang="scss" scoped>
@import './Header.scss';
@import './MyHeader.scss';
</style>

View File

@@ -0,0 +1 @@
export { default as MyHeader } from './MyHeader.vue'

View File

@@ -1,5 +1,5 @@
import { defineComponent } from 'vue'
import { Footer } from '@/components/Footer'
import { LandingFooter } from '@/components/LandingFooter'
import { toolsext } from '@store/Modules/toolsext'
export default defineComponent({
@@ -14,7 +14,7 @@ export default defineComponent({
lastdataupdate: [String],
country: [String],
},
components: { Footer },
components: { LandingFooter },
setup(props, { emit }) {
return {

View File

@@ -26,11 +26,11 @@ export * from './CSignUp'
export * from './CSingleCart'
export * from './CTitle'
export * from './CTitleBanner'
export * from './Footer'
export * from './LandingFooter'
export * from './FormNewsletter'
export * from './CLineChart'
export * from './CStatusReg'
export * from './Header'
export * from './MyHeader'
export * from './logo'
export * from './testpao'
export * from './CEventsCalendar'
@@ -54,4 +54,5 @@ export * from './CAccomodation'
export * from './COpenStreetMap'
export * from './COperators'
export * from './CFundRaising'
export * from './CKeyAndValue'
// export * from './CPreloadImages'

View File

@@ -50,7 +50,7 @@ ol li::before {
}
li {
color: #2f2c8b;
/*color: #2f2c8b;*/
font-size: 18px;
@media (max-width: 600px) {
font-size: 1rem;

View File

@@ -206,8 +206,8 @@ const msg_website_it = {
+ '<li>📱<strong>Condividendo la APP</strong> a tutti coloro che vogliono far parte insieme della crescita e sviluppo di una Nuova Era</li>'
+ '<li>👥 Aiutando a creare Gruppi Territoriali nella vostra città, impegnandosi a realizzare progetti per il Bene Comune, in onore ai principi Amorevoli e di condivisione.</li>'
+ '<li>🌱 Sostenendo le persone attorno a voi, e rispettando la nostra vera Casa: Madre Natura e Tutti gli Esseri Viventi. ❤️</li>'
+ '<li>👨🏻‍💻 Con una <strong>piccola donazione</strong> per le spese dei Server</li></ul>' +
'<strong>Tramite Paypal:</strong><br>' +
+ '<li>👨🏻‍💻 Con una <strong>piccola donazione</strong> per le spese dei Server, manutenzione e per i continui sviluppi e miglioramenti</li></ul>' +
'1) Tramite <strong>Paypal</strong>:<br>' +
'<div style="font-size: 1.5rem; background-color: white; color: blue; border: solid 2px #f00; margin: 10px; padding: 10px; border-radius: 10px; " ' +
'class="row justify-around">' +
'<span><a href="https://paypal.me/paoloarena/1" target="_blank">1€</a></span>' +
@@ -216,9 +216,14 @@ const msg_website_it = {
'<span><a href="https://paypal.me/paoloarena/10" target="_blank">10€</a></span>' +
'<span><a href="https://paypal.me/paoloarena" target="_blank">scegli</a></span>' +
'</div><em>clicca sull\'importo per fare una <strong>donazione</strong> </em><br>' +
'In alternativa inventati una forma di scambio da donare a Paolo (soprannome <a href="https://t.me/surya1977" target="_blank">Surya</a>)<br />' +
'<br>2) Tramite <strong>Bonifico Bancario</strong>:<br>' +
'Intestato a Paolo Arena<br>' +
'IBAN: IT76O0347501605CC0010311400<br>' +
'Causale: "donazione riso.app"<br><br>' +
'' +
'3) In alternativa scegli tu una forma di scambio da donare a Paolo (per scrivergli su Telegram: <a href="https://t.me/surya1977" target="_blank">Surya Paolo</a>)<br />' +
'<span style="color: red; font-size: 2rem;">❤</span> Sono graditi messaggi sia di suggerimenti che di apprezzamenti.<br>' +
'Grazie Mille per l\'Aiuto' +
'Grazie Mille per l\'Aiuto ed il Supporto' +
'<br>',
},
multiplatform: {

View File

@@ -19,6 +19,7 @@ const functionality: IFunctionality = {
ENABLE_PROJECTS_LOADING: false,
SHOW_IF_IS_SERVER_CONNECTION: false,
SHOW_MESSAGES: false,
SHOW_NOTIF: true,
BOOKING_EVENTS: true,
ENABLE_ECOMMERCE: false,
ENABLE_REG_ISP: true,
@@ -252,6 +253,20 @@ const routes_manager: IListRoutes[] = [
onlyManager: true,
onlyTutor: true
},
{
active: true,
order: 10,
path: '/admin/userpanel',
materialIcon: 'fas fa-users',
name: 'otherpages.admin.userpanel',
component: () => import('@/rootgen/admin/userPanel/userPanel.vue'),
inmenu: true,
submenu: true,
level_parent: 0,
level_child: 0.5,
onlyManager: true,
onlyTutor: true
},
/*
{
active: true,
@@ -580,7 +595,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: 'fas fa-user',
name: 'proj.group2',
component: () => import('@/views/user/mygroup/mygroup.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -591,7 +606,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: 'fas fa-user',
name: 'pages.mypage2',
component: () => import('@/views/user/mypagebacheca/mypagebacheca.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -602,7 +617,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: '',
name: 'pages.myservice2',
component: () => import('@/views/user/myservice/myservice.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -613,7 +628,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: '',
name: 'pages.myhosps2',
component: () => import('@/views/user/mypagehosp/mypagehosp.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},
@@ -624,7 +639,7 @@ const baseroutes: IListRoutes[] = [
materialIcon: '',
name: 'pages.mygood2',
component: () => import('@/views/user/mypagegood/mypagegood.vue'),
meta: { requiresAuth: true },
meta: { requiresAuth: true, newpage: true },
inmenu: false,
infooter: false,
},

View File

@@ -17,10 +17,14 @@ export default defineComponent({
setup(props) {
const $router = useRouter()
const { getNumMsgUnread, getNumMsg, getUsernameChatByMsg, getImgByMsg, getNumNotifUnread } = MixinUsers()
// function lasts_messages (state: IUserState) => IMessage[] {
//
// }
function lasts_messages() {
// ++Todo: lasts_messages
return []
@@ -30,10 +34,6 @@ export default defineComponent({
// $router.replace(`/messages/${ msg.dest.username}`)
}
function getNumNotifUnread() {
return 0
}
function randomDate(): Date {
const myval = Math.floor(Math.random() * 10000000000)
return tools.getstrDateTime(new Date(tools.getTimestampsNow() - myval))
@@ -69,6 +69,12 @@ export default defineComponent({
return {
lasts_messages,
clickChat,
getNumMsgUnread,
getNumMsg,
getUsernameChatByMsg,
getImgByMsg,
getNumNotifUnread,
tools,
}
},
})

View File

@@ -1,16 +1,16 @@
<template>
<div>
<q-btn flat round dense icon="fas fa-comment" class="q-mx-xs">
<q-badge v-if="getNumMsgUnread > 0" floating color="red">{{getNumMsgUnread}}</q-badge>
<q-badge v-if="getNumMsgUnread() > 0" floating color="red">{{getNumMsgUnread()}}</q-badge>
<q-menu self="top right">
<q-list bordered class="rounded-borders" style="max-width: 350px; min-width: 250px;">
<q-item-label header>{{t('msgs.messages')}}</q-item-label>
<q-item-label header>{{$t('msgs.messages')}}</q-item-label>
<q-separator/>
<div v-if="getNumMsg === 0">
<div v-if="getNumMsg() === 0">
<q-item>
{{t('msgs.nomessage')}}
{{$t('msgs.nomessage')}}
</q-item>
</div>
@@ -39,8 +39,8 @@
</q-list>
</q-menu>
</q-btn>
<q-btn v-if="false" flat round dense icon="fas fa-bell">
<q-badge v-if="getNumNotifUnread > 0" floating color="red">{{getNumNotifUnread}}</q-badge>
<q-btn v-if="false" flat round dense icon="fas fa-comment">
<q-badge v-if="getNumNotifUnread() > 0" floating color="red">{{getNumNotifUnread()}}</q-badge>
</q-btn>
</div>
</template>

View File

@@ -0,0 +1,17 @@
.list {
max-width: 400px;
}
.item > img.item-primary:not(.thumbnail) {
border-radius: 10px !important;
}
.item > img.item-primary {
width: 48px;
height: 46px;
}
.item > .item-secondary {
width: 57px;
font-size: 13px;
}

View File

@@ -0,0 +1,107 @@
import { computed, defineComponent, ref } from 'vue'
import {
IChat,
IMessage, IMsgUsers, INotif,
} from '@model'
import './notifPopover.scss'
import { tools } from '@src/store/Modules/tools'
import { useRouter } from 'vue-router'
import MixinUsers from '../../../mixins/mixin-users'
import { useNotifStore } from '@store/NotifStore'
import { useUserStore } from '@store/UserStore'
const namespace = 'notifModule'
export default defineComponent({
name: 'notifPopover',
setup(props) {
const $router = useRouter()
const userStore = useUserStore()
const notifStore = useNotifStore()
const loading = ref(false)
const lasts_notifs = computed(() => notifStore.getlasts_notifs)
const notifsel = ref(<INotif>{
dest: '',
datenotif: new Date()
})
const { getNumNotifUnread, getNumNotif, getUsernameChatByNotif, getImgByNotif, getNotifText } = MixinUsers()
// function lasts_notifs (state: IUserState) => IMessage[] {
//
// }
function clickChat(msg: IMessage) {
// $router.replace(`/notifs/${ msg.dest.username}`)
}
function getlastnotif(username: string): any {
// Get msg for this chat
if (notifStore.last_notifs)
return notifStore.last_notifs.find((rec: INotif) => rec.dest === username)
// return users_msg_saved[username]
}
function getlastdataread(username: string): any {
// Get msg for this
let myrec = getlastnotif(username)
const lastdata: any = (myrec) ? myrec.lastdataread : tools.getLastDateReadReset()
let mydate = ''
if (!tools.isIsoDate(lastdata))
mydate = lastdata.toISOString()
else
return lastdata
// console.log('getlastdataread', mydate)
return mydate
}
function refreshdata(username: string) {
loading.value = true
notifsel.value.dest = ''
return notifStore.updateNotifDataFromServer({
username,
lastdataread: getlastdataread(username)
}).then((ris) => {
notifsel.value.dest = username
loading.value = false
const element = document.getElementById('last')
tools.scrollToElement(element)
// changemsgs('', '')
}).catch((err) => {
loading.value = false
})
}
function mounted() {
refreshdata(userStore.my.username)
}
return {
lasts_notifs,
clickChat,
getNumNotifUnread,
getNumNotif,
getUsernameChatByNotif,
getImgByNotif,
getNotifText,
tools,
}
},
})

View File

@@ -0,0 +1,67 @@
<template>
<div>
<q-btn flat round dense icon="fas fa-bell" class="q-mx-xs">
<q-badge v-if="getNumNotifUnread() > 0" floating color="red">{{ getNumNotifUnread() }}</q-badge>
<q-menu anchor="bottom right" self="top right">
<q-bar class="bg-primary text-white">
{{ $t('notifs.notifs') }}
<q-space/>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-bar>
<div>
Imposta notifiche:<br>
<q-toggle dark v-model="notifs[0]" :label="$t('notifs.warn_province')"/>
</div>
<q-list bordered class="rounded-borders" style="max-width: 350px; min-width: 250px;">
<q-separator/>
<div v-if="getNumNotif() === 0">
<q-item>
{{ $t('notifs.nonotif') }}
</q-item>
</div>
<q-item clickable v-ripple v-for="(notif, index) in lasts_notifs()" :key="index" @click="clickChat(notif)">
<q-item-section avatar>
<q-avatar>
<q-item-label lines="1">{{ getTypeNotif(notif) }}</q-item-label>
</q-avatar>
</q-item-section>
<!--<q-item-section avatar>
<q-avatar>
<img :src="getImgByNotif(notif)" :alt="getUsernameChatByNotif(notif)">
</q-avatar>
</q-item-section>-->
<q-item-section>
<q-item-label lines="1">{{ getUsernameChatByNotif(notif) }}</q-item-label>
<q-item-label caption lines="2">
{{ getNotifText(notif, false) }}
</q-item-label>
</q-item-section>
<q-item-section side top>
{{ tools.getstrDateTimeShort(notif.datenotif) }}
</q-item-section>
</q-item>
<q-separator/>
</q-list>
</q-menu>
</q-btn>
<q-btn v-if="false" flat round dense icon="fas fa-bell">
<q-badge v-if="getNumNotifUnread() > 0" floating color="red">{{ getNumNotifUnread() }}</q-badge>
</q-btn>
</div>
</template>
<script lang="ts" src="./notifPopover.ts">
</script>

View File

@@ -1,4 +1,4 @@
import { IMessage } from '@src/model'
import { IMessage, INotif } from '@src/model'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
@@ -155,6 +155,60 @@ export default function () {
return ris
}
function getNotifText(notif: INotif) {
return notif.descr
}
function getNumNotif() {
// ++Todo: conv
/*
return NotifStore.getlasts_messages().length
*/
return 0
}
function getNumNotifUnread() {
// return userStore.getlasts_messages().length
// ++Todo: conv
// return NotifStore.getnumMsgUnread()
return 0
}
function getUsernameChatByNotif(msg: INotif) {
if (msg) {
if (msg.dest) {
return msg.dest
}
} else {
return ''
}
return ''
}
function getTypeNotif(msg: INotif) {
if (msg) {
if (msg.type) {
return msg.type
}
} else {
return ''
}
return ''
}
function getImgByNotif(msg: INotif) {
const userStore = useUserStore()
//++Todo: Notif
return ''
// @ts-ignore
// return `${userStore.getImgByUsername(this.getUsernameChatByMsg(msg))}`
}
return {
getUsernameChatByMsg,
getMyUsername,
@@ -177,5 +231,11 @@ export default function () {
getMsgText,
paotest,
getRefLink,
getNumNotifUnread,
getNumNotif,
getUsernameChatByNotif,
getTypeNotif,
getImgByNotif,
getNotifText,
}
}

View File

@@ -490,6 +490,7 @@ export interface IFunctionality {
SHOW_NEWSLETTER?: boolean
SHOW_ONLY_POLICY?: boolean
SHOW_MESSAGES?: boolean
SHOW_NOTIF?: boolean
BOOKING_EVENTS?: boolean
ENABLE_REG_AYNI?: boolean
ENABLE_REG_CNM?: boolean
@@ -575,6 +576,7 @@ export interface IColGridTable {
isadvanced_field?: boolean
showWhen?: number
maxlength?: number
minlength?: number
allowchar?: number
filter_table?: string
filter_field?: string

View File

@@ -50,6 +50,19 @@ export const MsgDefault: IMessage = {
status: StatusMessage.None,
}
export const NotifDefault: INotif = {
_id: '',
idapp: '',
type: 0,
sender: '',
dest: '',
descr: '',
datenotif: new Date(),
read: false,
deleted: false,
status: StatusMessage.None,
}
export interface IMessage {
_id?: any
idapp?: string
@@ -64,6 +77,19 @@ export interface IMessage {
options?: number
}
export interface INotif {
_id?: any
idapp?: string
type: number
sender: string,
dest: string,
descr: string
datenotif?: Date
status?: StatusMessage
read?: boolean
deleted?: boolean
}
export interface IChat {
username: string
lasttimeActive?: Date
@@ -79,3 +105,7 @@ export interface IMessageState {
last_msgs: IMessage[]
users_msg: IMsgUsers[]
}
export interface INotifState {
last_notifs: INotif[]
}

View File

@@ -120,6 +120,14 @@ export interface IUserFields {
calcstat?: ICalcStat|null
}
export interface IUserExport {
_id: string
email?: string
username: string
username_telegram: string
firstname_telegram: string
lastname_telegram: string
}
/*
password?: string
lang

View File

@@ -1,15 +0,0 @@
import { reactive } from '@vue/reactivity'
import useValidators from '@/modules/validators'
const errors: any = reactive({})
export default function useFormValidation() {
const { isEmpty, minLength, isEmail } = useValidators()
const validateNameField = (fieldName: string, fieldValue: string) => {
errors[fieldName] = !fieldValue ? isEmpty(fieldName, fieldValue) : minLength(fieldName, fieldValue, 4)
}
const validateEmailField = (fieldName: string, fieldValue: string) => {
errors[fieldName] = !fieldValue ? isEmpty(fieldName, fieldValue) : isEmail(fieldName, fieldValue)
}
return { errors, validateNameField, validateEmailField }
}

View File

@@ -6,7 +6,7 @@ import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { CSkill } from '@/components/CSkill'
import { CFinder } from '@/components/CFinder'
import { Footer } from '@/components/Footer'
import { LandingFooter } from '@/components/LandingFooter'
import { CDashboard } from '@/components/CDashboard'
import { CChartMap } from '@src/components/CChartMap'
import { CUserNonVerif } from '@/components/CUserNonVerif'
@@ -24,7 +24,7 @@ import { colmyBachecas } from '@store/Modules/fieldsTable'
export default defineComponent({
name: 'eventi',
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, Footer },
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, LandingFooter },
setup() {
return {
colmyBachecas,

View File

@@ -21,7 +21,7 @@
</div>
<Footer></Footer>
<LandingFooter></LandingFooter>
</q-page>
</template>

View File

@@ -13,7 +13,7 @@ import { CTitlePage } from '@/components/CTitlePage'
import { CMapsEsempio } from '@src/components/CMapsEsempio'
import { CVerifyEmail } from '@src/components/CVerifyEmail'
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
import { Footer } from '@/components/Footer'
import { LandingFooter } from '@/components/LandingFooter'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { static_data } from '@/db/static_data'
@@ -22,7 +22,7 @@ import MixinUsers from '@/mixins/mixin-users'
export default defineComponent({
name: 'Goods',
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, Footer },
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, LandingFooter },
setup() {
return {

View File

@@ -19,7 +19,7 @@
</div>
</div>
<Footer></Footer>
<LandingFooter></LandingFooter>
</q-page>
</template>

View File

@@ -6,7 +6,7 @@ import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { CSkill } from '@/components/CSkill'
import { CFinder } from '@/components/CFinder'
import { Footer } from '@/components/Footer'
import { LandingFooter } from '@/components/LandingFooter'
import { CDashboard } from '@/components/CDashboard'
import { CChartMap } from '@src/components/CChartMap'
import { CUserNonVerif } from '@/components/CUserNonVerif'
@@ -24,7 +24,7 @@ import { colmyHosp } from '@store/Modules/fieldsTable'
export default defineComponent({
name: 'hosp',
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, Footer },
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, LandingFooter },
setup() {
return {
colmyHosp,

View File

@@ -21,7 +21,7 @@
</div>
<Footer></Footer>
<LandingFooter></LandingFooter>
</q-page>
</template>

View File

@@ -7,7 +7,7 @@ import { CSkill } from '@/components/CSkill'
import { CMainView } from '@/components/CMainView'
import { CDashboard } from '@/components/CDashboard'
import { CChartMap } from '@src/components/CChartMap'
import { Footer } from '@src/components/Footer'
import { LandingFooter } from '@src/components/LandingFooter'
import { CUserNonVerif } from '@/components/CUserNonVerif'
import { CStatusReg } from '@/components/CStatusReg'
import { CCopyBtn } from '@/components/CCopyBtn'
@@ -24,7 +24,7 @@ import MixinMetaTags from '@/mixins/mixin-metatags'
export default defineComponent({
name: 'mainview',
components: { CSkill, CChartMap, CMapsEsempio, CDashboard, CUserNonVerif, CMainView, CCopyBtn, Footer, CCheckIfIsLogged, CStatusReg, CPresentazione },
components: { CSkill, CChartMap, CMapsEsempio, CDashboard, CUserNonVerif, CMainView, CCopyBtn, LandingFooter, CCheckIfIsLogged, CStatusReg, CPresentazione },
setup() {
const globalStore = useGlobalStore()
const userStore = useUserStore()

View File

@@ -94,7 +94,7 @@
</div>
<Footer></Footer>
<LandingFooter></LandingFooter>
</q-page>
</template>

View File

@@ -14,7 +14,7 @@
</PagePolicy>
<Footer></Footer>
<LandingFooter></LandingFooter>
</div>
</q-page>

View File

@@ -13,7 +13,7 @@ import { CUserNonVerif } from '@/components/CUserNonVerif'
import { CMapsEsempio } from '@src/components/CMapsEsempio'
import { CVerifyEmail } from '@src/components/CVerifyEmail'
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
import { Footer } from '@/components/Footer'
import { LandingFooter } from '@/components/LandingFooter'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { static_data } from '@/db/static_data'
@@ -23,7 +23,7 @@ import { costanti } from '@costanti'
export default defineComponent({
name: 'Services',
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, Footer },
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, LandingFooter },
setup() {
return {
tools,

View File

@@ -20,7 +20,7 @@
</div>
<Footer></Footer>
<LandingFooter></LandingFooter>
</q-page>
</template>

View File

@@ -0,0 +1 @@
export {default as userPanel} from './userPanel.vue'

View File

View File

@@ -0,0 +1,72 @@
import { defineComponent, onMounted, ref } from 'vue'
import { CMyPage } from '@/components/CMyPage'
import { CKeyAndValue } from '@/components/CKeyAndValue'
import { CGridTableRec } from '@/components/CGridTableRec'
import { tools } from '@store/Modules/tools'
import { static_data } from '@/db/static_data'
import { fieldsTable } from '@src/store/Modules/fieldsTable'
import { shared_consts } from '@/common/shared_vuejs'
import { useUserStore } from '@store/UserStore'
import { costanti } from '@costanti'
export default defineComponent({
name: 'userPanel',
components: { CMyPage, CKeyAndValue },
setup() {
const arrfilterand: any = ref([])
const search = ref('')
const colVisib = ref('')
const mycolumns = ref([])
const myuser = ref({})
const userStore = useUserStore()
async function mounted() {
//
search.value = tools.getCookie(tools.COOK_SEARCH + 'searchpanel')
await refresh()
}
function changeCol(newval: any) {
//
}
async function refresh() {
if (!!search.value)
myuser.value = await userStore.loadUserPanel(search.value)
else
myuser.value = {}
}
function db_fieldsTable() {
return fieldsTable
}
async function doSearch() {
tools.setCookie(tools.COOK_SEARCH + 'searchpanel', search.value)
await refresh()
}
onMounted(mounted)
return {
arrfilterand,
fieldsTable,
search,
tools,
doSearch,
changeCol,
myuser,
refresh,
mycolumns,
colVisib,
}
}
})

View File

@@ -0,0 +1,105 @@
<template>
<CMyPage img="" :title="$t('otherpages.admin.userpanel')" keywords="" :description="$t('otherpages.admin.userpanel')">
<div
class="row justify-center vertical-middle">
<div class="q-mr-sm full-width">
<q-input
v-model="search" filled dense type="search" debounce="500"
label="Cerca"
v-on:keyup.enter="doSearch"
>
<template v-slot:after>
<q-btn dense label="" color="primary" @click="doSearch" icon="search"></q-btn>
</template>
</q-input>
</div>
<q-space></q-space>
<q-select
v-model="colVisib"
rounded
outlined
multiple
dense
options-dense
:display-value="$t('grid.columns')"
emit-value
map-options
:options="mycolumns"
option-value="name"
@update:model-value="changeCol">
</q-select>
</div>
<div v-if="!!myuser">
username cercato: <em>"{{ search }}"</em><br>
<br>
<div v-if="myuser.verified_by_aportador">
<q-banner
rounded
class="bg-green text-white"
style="text-align: center;"
>
<span class="mybanner">
Verificato da {{ myuser.aportador_solidario }}<br>
</span>
</q-banner>
</div>
<div v-else>
<q-banner
rounded
class="bg-red text-white"
style="text-align: center;"
>
<span class="mybanner">
NON Verificato da {{ myuser.aportador_solidario }}<br>
</span>
</q-banner>
</div>
<CKeyAndValue mykey="Username:" :myvalue="myuser.username"></CKeyAndValue>
<div v-if="!!myuser.profile">
<CKeyAndValue mykey="Email:" :myvalue="myuser.email"></CKeyAndValue>
<div class="q-ml-xs bg-blue text-white text-h6">
<q-banner
dense
rounded class="bg-blue text-white"
style="text-align: center;">
<span class="mybanner">Telegram<br></span>
</q-banner>
<CKeyAndValue mykey="Username Telegram:" :myvalue="myuser.profile.username_telegram"></CKeyAndValue>
<CKeyAndValue mykey="Telegram ID:" :myvalue="myuser.profile.teleg_id"></CKeyAndValue>
<span v-if="myuser.profile.firstname_telegram">
<CKeyAndValue mykey="Nome e Cognome Telegram:" :myvalue="myuser.profile.firstname_telegram + ` ` + myuser.profile.lastname_telegram"></CKeyAndValue>
</span>
</div>
<CKeyAndValue mykey="Invitato da:" :myvalue="myuser.aportador_solidario"></CKeyAndValue>
<CKeyAndValue mykey="Online il:" :mydate="myuser.lasttimeonline"></CKeyAndValue>
<CKeyAndValue mykey="Città di Nascita:" :myvalue="myuser.profile.born_city"></CKeyAndValue>
<CKeyAndValue mykey="Data di Nascita:" :mydate="myuser.profile.dateofbirth"></CKeyAndValue>
<CKeyAndValue mykey="Biografia:" :myvalue="myuser.profile.biografia"></CKeyAndValue>
<CKeyAndValue mykey="qualifica:" :myvalue="myuser.profile.qualifica"></CKeyAndValue>
</div>
</div>
<br>
</CMyPage>
</template>
<script lang="ts" src="./userPanel.ts">
</script>
<style lang="scss" scoped>
@import './userPanel.scss';
</style>

View File

@@ -47,6 +47,7 @@ const msg_it = {
eventlist: 'Le tue Prenotazioni',
usereventlist: 'Prenotazioni Utenti',
userlist: 'Lista Utenti',
userpanel: 'Pannello Utenti',
circuitslist: 'Circuiti',
accountslist: 'Conti',
movslist: 'Movimenti',
@@ -535,6 +536,7 @@ const msg_it = {
pub_updated: 'Aggiornato il',
options: 'Opzioni',
link_telegram: 'Link al Canale/Gruppo Telegram',
refuse_cookie: 'Sei sicuro di rifiutare i Cookies? Se continui dovrai reinserire username e password tutte le volte che entri. I cookies servono per riproporti i filtri che utilizzi solitamente. (E\' Consigliato ACCETTARE i Cookies)',
err: {
required: 'è richiesto',
email: 'inserire una email valida',
@@ -648,7 +650,8 @@ const msg_it = {
newproj: 'Titolo Progetto',
newsubproj: 'Titolo Sotto-Progetto',
insertbottom: 'Inserisci Nuovo Project',
shortdescr: 'Descrizione',
shortdescr: 'Descrizione Breve',
descrapprof: 'Descrizione Approfondita',
longdescr: 'Testo',
note: 'Note',
hoursplanned: 'Ore Preventivate',
@@ -742,6 +745,13 @@ const msg_it = {
messages: 'Messaggi',
nomessage: 'Nessun Messaggio',
},
notifs: {
telegrammsg: 'Telegram',
notif: 'Notifica',
notifs: 'Notifiche',
nonotif: 'Nessuna Notifica',
warn_province: 'Avvisami se nuovo annuncio in provincia',
},
event: {
_id: 'id',
typol: 'Typology',
@@ -841,7 +851,7 @@ const msg_it = {
wrongerr: 'Email non valida',
},
privacy_policy: 'Privacy Policy',
cookies: 'Usiamo i Cookie per una migliore prestazione web. Accetti l\'utilizzo?',
cookies: 'Usiamo i Cookie per una migliore prestazione web. Accetti l\'utilizzo? (Consigliato ACCETTA)',
sites: {
active: 'Attivo',
idapp: 'IdApp',
@@ -973,6 +983,10 @@ const msg_it = {
reg: 'Regione',
link_grp: 'Link Territoriale',
},
annunci: {
maxlength: 'Il campo "{name}" dev\'essere non più lungo di {maxlength} caratteri',
minlength: 'Compilare il campo "{name}" lungo almeno {minlength} caratteri',
},
hosps: {
visibile: 'Pubblica',
typeHosp: 'Tipologia',

View File

@@ -89,6 +89,7 @@ function AddCol(params: IColGridTable) {
remote_key: (params.remote_key === undefined) ? '' : params.remote_key,
remote_field: (params.remote_field === undefined) ? '' : params.remote_field,
maxlength: (params.maxlength === undefined) ? 0 : params.maxlength,
minlength: (params.minlength === undefined) ? 0 : params.minlength,
filter_field: (params.filter_field === undefined) ? '' : params.filter_field,
isadvanced_field: (params.isadvanced_field === undefined) ? false : params.isadvanced_field,
}
@@ -687,6 +688,14 @@ export const colmyGoods = [
required: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
minlength: 50,
isadvanced_field: true,
required: true,
}),
AddCol({
name: 'idSectorGood',
label_trans: 'sectors.name',
@@ -784,12 +793,6 @@ export const colmyGoods = [
*/
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true,
}),
//**ADDFIELD_MYSKILL
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
@@ -864,6 +867,13 @@ export const colmySkills = [
required: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
required: true,
isadvanced_field: true,
}),
AddCol({
name: 'idSector',
label_trans: 'sectors.name',
@@ -952,12 +962,6 @@ export const colmySkills = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
isadvanced_field: true,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true,
}),
//**ADDFIELD_MYSKILL
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
@@ -1076,6 +1080,14 @@ export const colmyHosp = [
required: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true,
required: true,
sortable: false,
}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
@@ -1086,13 +1098,6 @@ export const colmyHosp = [
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true,
sortable: false,
}),
//**ADDFIELD_MYBACHECAS
AddCol({
name: 'link_maplocation', label_trans: 'reg.link_maplocation', isadvanced_field: true, fieldtype: costanti.FieldType.link,
@@ -1194,6 +1199,14 @@ export const colmyBachecas = [
required: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
required: true,
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'idSector',
label_trans: 'sectors.name',
@@ -1257,13 +1270,6 @@ export const colmyBachecas = [
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true,
sortable: false,
}),
//**ADDFIELD_MYBACHECAS
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,

View File

@@ -12,7 +12,7 @@ import {
ITodo,
IUserFields,
Privacy,
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam,
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport,
} from '@model'
import { addToDate } from '@quasar/quasar-ui-qcalendar'
@@ -1945,8 +1945,8 @@ export const tools = {
this.showNotif(q, msg, { color: 'positive', icon: 'notifications' })
},
showNegativeNotif(q: any, msg: string) {
this.showNotif(q, msg, { color: 'negative', icon: 'notifications' }, 10000)
showNegativeNotif(q: any, msg: string, time = 5000) {
this.showNotif(q, msg, { color: 'negative', icon: 'notifications' }, time)
},
showNeutralNotif(q: any, msg: string, time = 10000) {
@@ -3022,7 +3022,7 @@ export const tools = {
},
loginOk($router: Router, route: any, mythisq: any, ispageLogin: boolean) {
// console.log('loginOk')
console.log('loginOk')
const userStore = useUserStore()
if (toolsext.getLocale() !== '') {
@@ -5487,6 +5487,63 @@ export const tools = {
return []
},
loadrecProfile() {
const userStore = useUserStore()
const globalStore = useGlobalStore()
const params: any = {
table: 'exp',
userId: userStore.my._id
}
console.log('loadrecProfile', params)
return globalStore.loadExp(params)
},
async exportListaEmail() {
let myrec = await this.loadrecProfile()
const sep = ';'
let mystr = ''
mystr += 'username' + sep + 'username_telegram' + sep + 'nome_telegram' + sep + 'cognome_telegram' + sep + 'email' + sep + 'verificato_telegram' + sep + 'verificato_invitante' + '\n'
let index = 1
for (const rec of myrec) {
mystr += rec.username + sep
mystr += rec.profile.username_telegram + sep
mystr += rec.profile.firstname_telegram + sep
mystr += rec.profile.lastname_telegram + sep
mystr += rec.email + sep
mystr += (rec.profile.teleg_id) ? 'SI' : 'NO'
mystr += (rec.verified_by_aportador) ? 'SI' : 'NO'
mystr += '\n'
index++
}
// tools.copyStringToClipboard(this, mystr, false)
return mystr
},
get_SI_NO(myvalue: boolean) {
return myvalue ? 'SI' : 'NO'
},
getvalueAll(myval: string | Date) {
const mydate = new Date(myval);
if (mydate instanceof Date && !isNaN(mydate.valueOf())) {
return this.getstrDateTime(mydate)
} else {
return myval
}
}
// getLocale() {
// if (navigator.languages && navigator.languages.length > 0) {

87
src/store/NotifStore.ts Executable file
View File

@@ -0,0 +1,87 @@
import { defineStore } from 'pinia'
import { Api } from '@api'
import { serv_constants } from './Modules/serv_constants'
import { INotif, INotifState } from '../model'
import { tools } from '@src/store/Modules/tools'
import { NotifDefault } from '@src/model'
import { shared_consts } from '@src/common/shared_vuejs'
import { useUserStore } from '@store/UserStore'
export const useNotifStore = defineStore('NotifStore', {
state: (): INotifState => ({
last_notifs: [],
}),
getters: {
getlasts_notifs: (mystate: INotifState) => (): INotif[] => {
const ctrec = (mystate.last_notifs) ? mystate.last_notifs.slice(0, 5) : []
// const ctrec = (mystate.notifs) ? mystate.notifs.slice().reverse().slice(0, 5) : []
return (ctrec)
},
getnumNotifUnread: (mystate: INotifState) => () => {
return mystate.last_notifs.filter((notif) => !notif.read).length
},
},
actions: {
setNotif(notif: INotif) {
// console.log('arrnotif', arrnotif)
if (notif) {
this.last_notifs = [notif, ...this.last_notifs]
}
},
async updateNotifDataFromServer({ username, lastdataread }: {username: string, lastdataread: Date}) {
// console.log('updateNotifDataFromServer', username, lastdataread)
return Api.SendReq(`/sendnotif/${username}/${lastdataread}/${process.env.APP_ID}`, 'GET', null)
.then((res) => {
// console.log('res', res)
return true
})
.catch((error) => {
console.error(error)
return false
})
},
async SendNotifEvent(notif: INotif) {
console.log('SendNotifEvent', notif)
const data: INotif = { ...NotifDefault, ...notif }
data.idapp = process.env.APP_ID
data.type = notif.type
data.sender = notif.sender
data.dest = notif.dest
data.descr = notif.descr
data.datenotif = tools.getDateNow()
data.read = false
// console.log('DOPO:')
// console.table(data)
return Api.SendReq('/sendnotif', 'POST', data)
.then((res) => {
// console.log('res', res)
if (res.status === 200) {
if (res.data.code === serv_constants.RIS_CODE_OK) {
this.setNotif(res.data)
return true
}
}
return false
})
.catch((error) => {
console.error(error)
return false
})
},
},
})

View File

@@ -991,6 +991,21 @@ export const useUserStore = defineStore('UserStore', {
},
async loadUserPanel(username: string) {
const data = {
username
}
return Api.SendReq('/users/panel', 'POST', data)
.then((ris) => {
console.log('out:', ris)
return ris.data
}).catch((error) => {
return {}
})
},
async loadGroup(groupname: string) {
const data = {
groupname

View File

@@ -30,6 +30,7 @@ import urlBase64ToUint8Array from '@src/js/utility'
import translate from '@src/globalroutines/util'
import { useTodoStore } from '@store/Todos'
import { useMessageStore } from './MessageStore'
import { useNotifStore } from './NotifStore'
const stateConnDefault = 'online'
@@ -201,6 +202,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
const calendarStore = useCalendarStore()
const userStore = useUserStore()
const messageStore = useMessageStore()
const notifStore = useNotifStore()
if (table === costanti.TABEVENTS)
return calendarStore.eventlist
@@ -240,6 +242,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
return userStore.groups
else if (table === 'sendmsgs')
return messageStore.last_msgs
else if (table === 'sendnotifs')
return notifStore.last_notifs
else if (table === 'settings')
return state.settings
else if (table === 'levels')
@@ -811,6 +815,19 @@ export const useGlobalStore = defineStore('GlobalStore', {
})
},
async loadExp(params: any) {
// console.log('loadTable', params)
params.filtersearch2 = 'fdsgas1'
return Api.SendReq('/getexp', 'POST', params)
.then((res) => {
return res.data ? res.data : []
})
.catch((error) => {
return []
})
},
loadPickup(params: IParamsPickup) {
console.log('loadPickup', params)
const userStore = useUserStore()

View File

@@ -5,7 +5,7 @@ import { useGlobalStore } from '@store/globalStore'
import { useQuasar } from 'quasar'
import { CMyPage } from '../../../components/CMyPage'
import { Footer } from '../../../components/Footer'
import { LandingFooter } from '../../../components/LandingFooter'
import { CTitleBanner } from '../../../components/CTitleBanner'
@@ -28,7 +28,7 @@ export default defineComponent({
default: false,
},
},
components: { CSignUpIscrizioneConacreis, CMyPage, Footer, CTitleBanner },
components: { CSignUpIscrizioneConacreis, CMyPage, LandingFooter, CTitleBanner },
setup(props, { emit }) {
const userStore = useUserStore()

View File

@@ -14,7 +14,7 @@
</CSignUpIscrizioneConacreis>
</div>
<Footer></Footer>
<LandingFooter></LandingFooter>
</q-page>
</div>
</template>

View File

@@ -1,12 +1,12 @@
import { defineComponent } from 'vue'
import { Footer } from '@/components/Footer'
import { LandingFooter } from '@/components/LandingFooter'
import { useUserStore } from '@store/UserStore'
import MixinUsers from '@/mixins/mixin-users'
export default defineComponent({
name: 'Regok',
components: { Footer },
components: { LandingFooter },
props: {},
setup() {
const userStore = useUserStore()

View File

@@ -43,7 +43,7 @@
<br>
<br>
<Footer></Footer>
<LandingFooter></LandingFooter>
</q-page>
</template>

View File

@@ -44,7 +44,7 @@
<q-item-section>
<q-item-label>{{rec.title}}</q-item-label>
<q-item-label caption v-html="rec.description"></q-item-label>
<q-item-label caption><span v-html="rec.description"></span></q-item-label>
<q-item-label>
<span class="est__price">{{getPrice(rec)}} </span>
</q-item-label>

2193
yarn.lock

File diff suppressed because it is too large Load Diff