Compare commits
51 Commits
master
...
aggio_0.6.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
701e1f1968 | ||
|
|
6fad472211 | ||
|
|
edcd244397 | ||
|
|
0365c58326 | ||
|
|
eb53557090 | ||
|
|
c28c6c4d8b | ||
|
|
9745133e81 | ||
|
|
396028748d | ||
|
|
79cde5c905 | ||
|
|
175bba7720 | ||
|
|
59af1d0b8b | ||
|
|
de937c73f7 | ||
|
|
422a3b6e88 | ||
|
|
af04e022eb | ||
|
|
37c2f08510 | ||
|
|
80610b3627 | ||
|
|
7a9689125b | ||
|
|
3f808189e3 | ||
|
|
a250700c8b | ||
|
|
c8e0f7922f | ||
|
|
19860aa438 | ||
|
|
1f5be4624f | ||
|
|
239cfbe835 | ||
|
|
d59eb86d0c | ||
|
|
5c2b28939b | ||
|
|
0234e2323a | ||
|
|
f79c3b1d77 | ||
|
|
d5831e3dbf | ||
|
|
cfa2457147 | ||
|
|
97ee2a1129 | ||
|
|
f62ac90b34 | ||
|
|
8176902363 | ||
|
|
23fd5fc5ef | ||
|
|
e58f7249a6 | ||
|
|
567f7b4be7 | ||
|
|
98c0218ef7 | ||
|
|
42d68eb4b8 | ||
|
|
3d77cf671d | ||
|
|
2acf161d5d | ||
|
|
b98cda2110 | ||
|
|
a9367d5aef | ||
|
|
d684d7a46f | ||
|
|
815ca0d565 | ||
|
|
4d40efc73a | ||
|
|
865e1ad738 | ||
|
|
d5d005a714 | ||
|
|
98dcea5526 | ||
|
|
ce4bf65fc4 | ||
|
|
3f9f608d4e | ||
|
|
61451ef994 | ||
|
|
a8677dc644 |
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.46"
|
||||
APP_VERSION="0.6.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.46"
|
||||
APP_VERSION="0.6.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
27
.env.test.risosrv
Executable file
@@ -0,0 +1,27 @@
|
||||
APP_VERSION="0.6.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
DIRECTORY_SERVER=test.freeplanet_serverside
|
||||
SERVERDIR_WEBSITE="splendidus.it/riso"
|
||||
APP_URL="https://riso.splendidus.it"
|
||||
URL_FACEBOOK=""
|
||||
PROVA_PAOLO=""
|
||||
LANG_DEFAULT="it"
|
||||
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
|
||||
MONGODB_HOST="https://splendidus.it:3001"
|
||||
LOGO_REG='riso-logo-full.png'
|
||||
TEST_NAME=""
|
||||
TEST_SURNAME=""
|
||||
TEST_EMAIL=""
|
||||
TEST_USERNAME=""
|
||||
TEST_PASSWORD=""
|
||||
TEST_APORTADOR=""
|
||||
PUBLICKEY_PUSH="BGXRf1TgcqocqD6J7qnRgCG7AvM2lxAoW7peb7UEzB4SxBb6DxGRdJ0UvD9ewnrB9KrSrh0-aDCODXBm7sZ1DDs"
|
||||
IN_CONSTRUCTION="0"
|
||||
DEBUG="1"
|
||||
TELEGRAM_SUPPORT=""
|
||||
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
||||
TEST_CELL=""
|
||||
ISTEST=1
|
||||
@@ -212,27 +212,16 @@ 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, 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>' +
|
||||
'<span><a href="https://paypal.me/paoloarena/2" target="_blank">2€</a></span>' +
|
||||
'<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><em>clicca sull\'importo per fare una <strong>donazione</strong> </em><br>' +
|
||||
'1) Tramite <strong><a href="https://paypal.me/paoloarena" target="_blank">Paypal</a></strong>:<br>' +
|
||||
'<br>2) Tramite <strong>Satispay</strong>: <a href="https://www.satispay.com/app/match/link/money-box/S6Y-SVN--62712D42-35B0-4BB9-8511-410C2AB8CD45" target="_blank">Clicca qui</a><br>' +
|
||||
'<div style="font-size: 1rem; background-color: white; color: blue; border: solid 2px #f00; margin: 5px; padding: 5px; border-radius: 10px; " ' +
|
||||
'class="row justify-around">' +
|
||||
'Se ancora non hai Satispay <a href="https://www.satispay.com/promo/PAOLOARENA4">Richiedila cliccando qui</a></br>' +
|
||||
'E\' consigliata se hai un conto bancario come alternativa alla costosa carta di credito/debito</br>' +
|
||||
'👉🏻 <strong>Registrandoti entrambi riceviamo un Bonus di 5 €</strong></br>' +
|
||||
'</div>' +
|
||||
'<br>3) Tramite <strong>Bonifico Bancario</strong>:<br>' +
|
||||
'(Scrivi a Surya (<a href="mailto:surya@riso.app">surya@riso.app</a>) per ricevere le coordinate</br>' +
|
||||
'(Scrivi a Surya (<a href="https://t.me/surya1977">@surya1977</a>) per le coordinate</br>' +
|
||||
'' +
|
||||
'4) 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>' +
|
||||
'4) In alternativa scegli tu una forma di Dono <br />' +
|
||||
'Grazie Mille per l\'Aiuto ed il Supporto' +
|
||||
'<br>',
|
||||
},
|
||||
|
||||
BIN
_ALL_SITES/comunitanuovomondo.app/logo_nuovomondo.jpeg
Normal file
|
After Width: | Height: | Size: 51 KiB |
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.46"
|
||||
APP_VERSION="0.6.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.46"
|
||||
APP_VERSION="0.6.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 43 KiB |
BIN
_ALL_SITES/riso.app/images/badge-96x96.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.46"
|
||||
APP_VERSION="0.6.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="14"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<section :class="$q.dark.isActive ? `bg-black` : `bg-white` + ` padding_gallery text-grey-10 text-center`">
|
||||
<section :class="($q.dark.isActive) ? `bg-black` : `bg-white`) + ` padding_gallery text-grey-10 text-center`">
|
||||
|
||||
<q-carousel
|
||||
swipeable
|
||||
|
||||
32
aaa.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
|
||||
TRA CIRCUITI:
|
||||
Fai la Transazione
|
||||
|
||||
Le transazioni extraterritoriali fuori dal circuito devono andare in altra.
|
||||
|
||||
- Rita di VICENZA sia partito (con 10) paga a VITERBO.
|
||||
|
||||
TRANSAZIONI EXTRATERRITORIALI.
|
||||
sul circuito Viterbo mi compare la lista delle transazioni extraterr., suddivise per territorio.
|
||||
e posso scambiare con quelli di Vicenza.
|
||||
|
||||
|
||||
Possibilità di ricevere i RIS da chiunque.
|
||||
|
||||
OSPITE
|
||||
RESIDENTI
|
||||
|
||||
|
||||
- Rita di VICENZA offre un Servizio a Pietro di AGRIGENTO.
|
||||
- a Sergio gli appare anche Pietro di AGRIGENTO.
|
||||
-
|
||||
|
||||
RITA -10 VICENZA
|
||||
RITA +20 AGRIGENTO
|
||||
SERGIO +10 VICENZA
|
||||
|
||||
|
||||
PROFILO:
|
||||
il "invia monete" compare a tutti, almeno devi essere collegato in 1 circuito.
|
||||
|
||||
@@ -19,7 +19,7 @@ if [[ $risposta == "Y" || $risposta == "y" ]]; then
|
||||
echo "Sincronizzazione in remoto..."
|
||||
|
||||
echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..."
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a dist/pwa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a --exclude 'upload' dist/pwa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
echo "Finito $SERVERDIR_WEBSITE "
|
||||
|
||||
fi
|
||||
|
||||
@@ -19,7 +19,7 @@ sleep 1
|
||||
npm run buildpwa
|
||||
|
||||
echo "Sincronizzazione $SERVERDIR_WEBSITE in remoto..."
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a dist/pwa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a --exclude 'upload' dist/pwa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
|
||||
cp .env.prod.bak .env.production
|
||||
|
||||
|
||||
27
deploy_risosrv_on_test_server.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
source ./.env.test.risosrv
|
||||
|
||||
msg="*** Sincronizzazione ??? $DIRECTORY_LOCAL e $SERVERDIR_WEBSITE (Y/N) ? "
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
read -p "$msg" risposta
|
||||
else
|
||||
risposta=$1
|
||||
fi
|
||||
|
||||
cp .env.production .env.prod.bak
|
||||
cp .env.test.risosrv .env.production
|
||||
|
||||
sleep 1
|
||||
|
||||
npm run buildpwa
|
||||
|
||||
echo "Sincronizzazione $SERVERDIR_WEBSITE in remoto..."
|
||||
rsync -e 'ssh -p 5522' -a --exclude 'upload' dist/pwa/ root@risosrv:/home/$SERVERDIR_WEBSITE
|
||||
|
||||
cp .env.prod.bak .env.production
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "Finito $SERVERDIR_WEBSITE"
|
||||
92
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "0.5.3",
|
||||
"version": "0.6.1",
|
||||
"description": "Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.",
|
||||
"productName": "Riso",
|
||||
"author": "Paolo Arena",
|
||||
@@ -22,48 +22,48 @@
|
||||
"generate-sw": "workbox generateSW workbox-config.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@quasar/extras": "^1.15.8",
|
||||
"@quasar/quasar-ui-qcalendar": "^4.0.0-beta.13",
|
||||
"@vue-leaflet/vue-leaflet": "^0.7.0",
|
||||
"@vue/compat": "^3.2.45",
|
||||
"@vue/compiler-sfc": "^3.2.45",
|
||||
"@quasar/extras": "^1.16.2",
|
||||
"@quasar/quasar-ui-qcalendar": "^4.0.0-beta.16",
|
||||
"@vue-leaflet/vue-leaflet": "^0.9.0",
|
||||
"@vue/compat": "^3.2.47",
|
||||
"@vue/compiler-sfc": "^3.2.47",
|
||||
"@vue/eslint-config-standard": "7.0.0",
|
||||
"@vuelidate/core": "^2.0.0",
|
||||
"@vuelidate/validators": "^2.0.0",
|
||||
"acorn": "^8.8.1",
|
||||
"@vuelidate/core": "^2.0.2",
|
||||
"@vuelidate/validators": "^2.0.2",
|
||||
"acorn": "^8.8.2",
|
||||
"animate.css": "^4.1.1",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"axios": "^1.2.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"axios": "^1.3.5",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"chart.js": "3.9.1",
|
||||
"core-js": "^3.26.1",
|
||||
"core-js": "^3.30.0",
|
||||
"crypto": "^1.0.1",
|
||||
"date-fns": "^2.29.3",
|
||||
"dotenv": "^16.0.3",
|
||||
"echarts": "5.3.3",
|
||||
"echarts": "5.4.2",
|
||||
"eslint-plugin-quasar": "^1.1.0",
|
||||
"eslint-plugin-standard": "^5.0.0",
|
||||
"graphql": "^16.6.0",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"gsap": "^3.11.3",
|
||||
"jquery": "^3.6.2",
|
||||
"gsap": "^3.11.5",
|
||||
"jquery": "^3.6.4",
|
||||
"js-cookie": "^3.0.1",
|
||||
"localforage": "^1.10.0",
|
||||
"lodash": "^4.17.21",
|
||||
"normalize.css": "^8.0.1",
|
||||
"npm": "^9.2.0",
|
||||
"npm": "^9.6.4",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^2.0.28",
|
||||
"pinia": "^2.0.33",
|
||||
"prerender-spa-plugin": "^3.4.0",
|
||||
"quasar": "^2.11.0",
|
||||
"quasar": "^2.11.10",
|
||||
"quasar-extras": "^2.0.9",
|
||||
"register-service-worker": "^1.7.2",
|
||||
"vee-validate": "^4.7.3",
|
||||
"vue": "^3.2.45",
|
||||
"vee-validate": "^4.8.4",
|
||||
"vue": "^3.2.47",
|
||||
"vue-chart-3": "^3.1.8",
|
||||
"vue-class-component": "^8.0.0-rc.1",
|
||||
"vue-country-code": "^1.1.3",
|
||||
"vue-echarts": "^6.3.1",
|
||||
"vue-echarts": "^6.5.4",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-idb": "^0.2.0",
|
||||
"vue-loader": "^17.0.1",
|
||||
@@ -72,6 +72,7 @@
|
||||
"vue-scroll-reveal": "^1.0.11",
|
||||
"vue-social-sharing": "^4.0.0-alpha4",
|
||||
"vue-svgicon": "^4.0.0-alpha.3",
|
||||
"vue-timeago3": "^2.3.0",
|
||||
"vue2-dragula": "^2.5.5",
|
||||
"vuex": "^4.1.0",
|
||||
"vuex-router-sync": "^6.0.0-rc.1"
|
||||
@@ -81,56 +82,49 @@
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
"@types/dotenv": "^8.2.0",
|
||||
"@types/googlemaps": "^3.43.3",
|
||||
"@types/jest": "^29.2.4",
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"@types/node": "18.11.16",
|
||||
"@types/jest": "^29.5.0",
|
||||
"@types/js-cookie": "^3.0.3",
|
||||
"@types/node": "18.15.11",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/vue-tel-input": "^2.1.2",
|
||||
"@types/vuelidate": "^0.7.15",
|
||||
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
||||
"@typescript-eslint/parser": "^5.46.1",
|
||||
"eslint": "^8.30.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"@types/vuelidate": "^0.7.16",
|
||||
"@typescript-eslint/eslint-plugin": "^5.57.1",
|
||||
"@typescript-eslint/parser": "^5.57.1",
|
||||
"eslint": "^8.37.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-vue": "^9.8.0",
|
||||
"eslint-plugin-vue": "^9.10.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"http-proxy-middleware": "^2.0.6",
|
||||
"jest": "^29.3.1",
|
||||
"jest": "^29.5.0",
|
||||
"json-loader": "^0.5.7",
|
||||
"node-sass": "7.0.1",
|
||||
"npm-check-updates": "^16.6.0",
|
||||
"node-sass": "7.0.0",
|
||||
"npm-check-updates": "^16.10.7",
|
||||
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
||||
"postcss": "^8.4.20",
|
||||
"postcss-loader": "^7.0.2",
|
||||
"sass-loader": "^13.2.0",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-loader": "^7.2.4",
|
||||
"sass-loader": "^13.2.2",
|
||||
"strip-ansi": "=7.0.1",
|
||||
"ts-jest": "^29.0.3",
|
||||
"ts-jest": "^29.1.0",
|
||||
"ts-loader": "^9.4.2",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-standard": "^9.0.0",
|
||||
"tslint-loader": "^3.5.4",
|
||||
"typescript": "^4.9.4",
|
||||
"typescript": "^5.0.3",
|
||||
"vue-cli-plugin-element-ui": "^1.1.4",
|
||||
"vueify": "^9.4.1",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack": "^5.78.0",
|
||||
"workbox-webpack-plugin": "^6.5.4"
|
||||
},
|
||||
"browser": {
|
||||
"crypto": false
|
||||
},
|
||||
"browserslist": [
|
||||
"last 30 Chrome versions",
|
||||
"last 30 Firefox versions",
|
||||
"last 4 Edge versions",
|
||||
"last 30 Safari versions",
|
||||
"last 30 Android versions",
|
||||
"last 30 ChromeAndroid versions",
|
||||
"last 30 FirefoxAndroid versions",
|
||||
"last 18 iOS versions",
|
||||
"last 11 Opera versions"
|
||||
"> 0.05%",
|
||||
"not dead"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 16.14.0",
|
||||
|
||||
BIN
public/images/1ris_rosso.png
Normal file
|
After Width: | Height: | Size: 133 KiB |
BIN
public/images/1ris_rosso_100.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
public/images/badge-96x96.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 4.4 KiB |
BIN
public/images/favicon-96x96.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
public/images/install_app_on_android_1.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/images/install_app_on_android_2.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/images/install_app_on_android_3.jpg
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/images/install_app_on_ios_1.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
public/images/install_app_on_ios_1b.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
public/images/install_app_on_ios_2.jpg
Normal file
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 34 KiB |
BIN
public/images/riso-android-icon-36x36.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 151 KiB |
BIN
public/images/riso-android-icon-72x72.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 34 KiB |
1
public/upload
Symbolic link
@@ -0,0 +1 @@
|
||||
/Users/suryapaolo/backups/upload
|
||||
@@ -37,7 +37,7 @@ module.exports = configure((ctx) => ({
|
||||
// --> boot files are part of "main.js"
|
||||
// https://v2.quasar.dev/quasar-cli/boot-files
|
||||
// boot: ['vue-i18n', 'vue-meta', 'axios', 'vee-validate', 'myconfig', 'local-storage', 'error-handler', 'globalroutines', 'vue-idb', 'dragula', 'guard'],
|
||||
boot: ['i18n', 'axios', 'vee-validate', 'myconfig', 'local-storage', 'error-handler', 'globalroutines', 'calendar', 'social-sharing'],
|
||||
boot: ['i18n', 'axios', 'vee-validate', 'myconfig', 'local-storage', 'error-handler', 'globalroutines', 'calendar', 'social-sharing', 'timeago'],
|
||||
|
||||
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
|
||||
css: [
|
||||
@@ -238,8 +238,7 @@ module.exports = configure((ctx) => ({
|
||||
'Ripple',
|
||||
'ClosePopup',
|
||||
],
|
||||
// Quasar plugins
|
||||
plugins: [
|
||||
_plugins: [
|
||||
'Meta',
|
||||
'Dialog',
|
||||
'Notify',
|
||||
@@ -247,13 +246,25 @@ module.exports = configure((ctx) => ({
|
||||
'Loading',
|
||||
'AppVisibility',
|
||||
],
|
||||
get plugins_1() {
|
||||
return this._plugins;
|
||||
},
|
||||
set plugins_1(value) {
|
||||
this._plugins = value;
|
||||
},
|
||||
get plugins() {
|
||||
return this._plugins;
|
||||
},
|
||||
set plugins(value) {
|
||||
this._plugins = value;
|
||||
},
|
||||
iconSet: 'fontawesome-v5',
|
||||
lang: 'it', // Quasar language
|
||||
},
|
||||
|
||||
// animations: 'all', // --- includes all animations
|
||||
animations: 'all', // --- includes all animations
|
||||
// https://v2.quasar.dev/options/animations
|
||||
animations: [],
|
||||
// animations: [],
|
||||
|
||||
// https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
|
||||
ssr: {
|
||||
@@ -282,7 +293,7 @@ module.exports = configure((ctx) => ({
|
||||
pwa: {
|
||||
workboxPluginMode: 'InjectManifest', // 'GenerateSW' or 'InjectManifest'
|
||||
workboxOptions: {}, // only for GenerateSW
|
||||
extendGenerateSWOptions (cfg) {
|
||||
extendGenerateSWOptions(cfg) {
|
||||
cfg.skipWaiting = false
|
||||
cfg.clientsClaim = false
|
||||
},
|
||||
@@ -299,8 +310,11 @@ module.exports = configure((ctx) => ({
|
||||
description: 'Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.',
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
background_color: '#ffffff',
|
||||
background_color: '#fff',
|
||||
theme_color: '#027be3',
|
||||
scope: "/",
|
||||
id: "/?homescreen=1",
|
||||
start_url: "/?homescreen=1",
|
||||
icons: [
|
||||
{
|
||||
src: 'images/riso-android-icon-512x512.png',
|
||||
@@ -348,6 +362,10 @@ module.exports = configure((ctx) => ({
|
||||
type: 'image/png',
|
||||
},
|
||||
],
|
||||
related_applications: [{
|
||||
"platform": "webapp",
|
||||
"url": "https://www.riso.app/manifest.json"
|
||||
}]
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@ if [[ $risposta == "Y" || $risposta == "y" ]]; then
|
||||
|
||||
|
||||
echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..."
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a dist/pwa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a --exclude 'upload' dist/pwa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
echo "Finito $SERVERDIR_WEBSITE "
|
||||
fi
|
||||
|
||||
11
send_pwa_to_risotest.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
source .env.test.risosrv
|
||||
|
||||
cp .env.test.risosrv .env.production
|
||||
|
||||
echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..."
|
||||
rsync -e 'ssh -p 5522' -a --exclude 'upload' dist/pwa/ root@risosrv:/home/$SERVERDIR_WEBSITE/
|
||||
echo "Finito $SERVERDIR_WEBSITE"
|
||||
|
||||
cp .env.prod.bak .env.production
|
||||
@@ -5,7 +5,7 @@ source ./.env.test
|
||||
cp .env.test .env.production
|
||||
|
||||
echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..."
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a dist/pwa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a --exclude 'upload' dist/pwa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
echo "Finito $SERVERDIR_WEBSITE"
|
||||
|
||||
cp .env.prod.bak .env.production
|
||||
|
||||
@@ -9,6 +9,6 @@ if [[ $risposta == "Y" || $risposta == "y" ]]; then
|
||||
|
||||
|
||||
echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..."
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a dist/spa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
sshpass -p $SERVERPW_WEBSITE rsync -e 'ssh -p 8855' -a --exclude 'upload' dist/spa/ ftpadmin@servereng:/var/www/$SERVERDIR_WEBSITE/
|
||||
echo "Finito $SERVERDIR_WEBSITE "
|
||||
fi
|
||||
|
||||
@@ -18,7 +18,7 @@ import { CacheableResponsePlugin } from 'workbox-cacheable-response'
|
||||
import { ExpirationPlugin } from 'workbox-expiration'
|
||||
|
||||
console.log(
|
||||
' [ VER-0.5.4 ] _---------________------ PAO: this is my custom service worker')
|
||||
' [ VER-0.6.1 ] _---------________------ PAO: this is my custom service worker')
|
||||
|
||||
importScripts('js/idb.js')
|
||||
importScripts('js/storage.js')
|
||||
@@ -36,7 +36,7 @@ let port = 3000
|
||||
if (self.location.hostname.startsWith('test')) {
|
||||
port = 3001
|
||||
}
|
||||
console.log('SW- app ver 0.5.4')
|
||||
console.log('SW- app ver 0.6.1')
|
||||
|
||||
const cfgenv = {
|
||||
serverweb: `${self.location.protocol}//${self.location.hostname}:${port}`,
|
||||
@@ -617,7 +617,7 @@ self.addEventListener('push', (event) => {
|
||||
options = {
|
||||
body: data.content,
|
||||
icon: data.icon ? data.icon : '/images/android-chrome-192x192.png',
|
||||
badge: data.badge ? data.badge : '/images/android-chrome-192x192.png',
|
||||
badge: data.badge ? data.badge : '/images/badge-96x96.png',
|
||||
data: {
|
||||
url: data.url,
|
||||
},
|
||||
@@ -633,7 +633,7 @@ self.addEventListener('push', (event) => {
|
||||
options = {
|
||||
body: text,
|
||||
icon: '/images/android-chrome-192x192.png',
|
||||
badge: '/images/android-chrome-192x192.png',
|
||||
badge: '/images/badge-96x96.png',
|
||||
data: {
|
||||
url: '/',
|
||||
},
|
||||
|
||||
@@ -28,6 +28,7 @@ export default {
|
||||
const $q = useQuasar()
|
||||
const userStore = useUserStore()
|
||||
const $router = useRouter()
|
||||
const $route = useRoute()
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -79,15 +80,21 @@ export default {
|
||||
|
||||
|
||||
function mounted() {
|
||||
console.log('app mounted')
|
||||
darkcookie.value = tools.getCookie('darkmode', false, false, false) === '-1'
|
||||
|
||||
globalStore.homescreen = $route.query.homescreen ? $route.query.homescreen : ''
|
||||
|
||||
scroll()
|
||||
tools.checkApp()
|
||||
}
|
||||
|
||||
|
||||
|
||||
async function created() {
|
||||
tools.initprompt()
|
||||
|
||||
tools.checkApp()
|
||||
|
||||
try {
|
||||
if (process.env.DEV) {
|
||||
console.info('SESSIONE IN SVILUPPO ! (DEV)')
|
||||
|
||||
7
src/boot/timeago.ts
Executable file
@@ -0,0 +1,7 @@
|
||||
//@ts-ignore
|
||||
import timeago from 'vue-timeago3'
|
||||
import { boot } from 'quasar/wrappers'
|
||||
|
||||
export default boot(({ app }) => {
|
||||
app.use(timeago)
|
||||
})
|
||||
@@ -1 +1 @@
|
||||
/home/paolo/myproject/freeplanet_serverside/src/server/tools/shared_nodejs.js
|
||||
../../../freeplanet_serverside/src/server/tools/shared_nodejs.js
|
||||
@@ -39,12 +39,14 @@ export const shared_consts = {
|
||||
MAINVIEW: 130,
|
||||
CHECKAPPRUNNING: 135,
|
||||
DASHBOARD: 140,
|
||||
CSENDRISTO: 150,
|
||||
STATUSREG: 160,
|
||||
CHECKIFISLOGGED: 170,
|
||||
INFO_VERSION: 180,
|
||||
BOTT_CONDIVIDI: 190,
|
||||
BUTTON: 195,
|
||||
PRESENTAZIONE: 200,
|
||||
MYACTIVITIES: 205,
|
||||
NOTIFATTOP: 210,
|
||||
CHART: 220,
|
||||
CHECKNEWVERSION: 230,
|
||||
@@ -54,6 +56,7 @@ export const shared_consts = {
|
||||
REGISTRATION: 258,
|
||||
BTN_LOGIN: 260,
|
||||
FOOTER: 270,
|
||||
PROFILETUTORIAL: 280,
|
||||
},
|
||||
|
||||
QUERYTYPE_MYGROUP: 1,
|
||||
@@ -63,6 +66,10 @@ export const shared_consts = {
|
||||
QUERYTYPE_REFUSED_USER_CIRCUIT: 12,
|
||||
QUERYTYPE_LIST_MOVEMENTS: 15,
|
||||
QUERYTYPE_LIST_ALLMOVEMENTS: 16,
|
||||
QUERYTYPE_LIST_MOVEMENTS_GROUPNAME: 17,
|
||||
QUERYTYPE_LIST_MOVEMENTS_CONTOCOM: 18,
|
||||
QUERYTYPE_GROUP_CIRCUIT: 20,
|
||||
QUERYTYPE_REFUSED_GROUP_CIRCUIT: 22,
|
||||
|
||||
FILTER_EXTRALIST_NOT_REGISTERED: 1,
|
||||
FILTER_EXTRALIST_NOT_CONTACTED: 2,
|
||||
@@ -87,18 +94,22 @@ export const shared_consts = {
|
||||
FILTER_USER_NO_VERIFIED_APORTADOR: 2097152,
|
||||
FILTER_USER_SI_TELEGRAM_ID: 4194304,
|
||||
FILTER_USER_WITHOUT_USERNAME_TELEGRAM: 8388608,
|
||||
FILTER_USER_PROVINCE: 16777216,
|
||||
|
||||
OPTIONS_SEARCH_ONLY_FULL_WORDS: 1,
|
||||
OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2,
|
||||
OPTIONS_SEARCH_USER_ALL_WORDS: 4,
|
||||
OPTIONS_ADD_COUNT_FAVORITE: 8,
|
||||
|
||||
FRIENDSCMD: {
|
||||
SETTRUST: 121,
|
||||
REQFRIEND: 125,
|
||||
SETFRIEND: 132,
|
||||
SETHANDSHAKE: 133,
|
||||
REMOVE_FROM_MYFRIENDS: 144,
|
||||
REFUSE_REQ_FRIEND: 145,
|
||||
CANCEL_REQ_FRIEND: 146,
|
||||
REMOVE_FROM_MYHANDSHAKE: 147,
|
||||
BLOCK_USER: 155,
|
||||
UNBLOCK_USER: 156,
|
||||
REPORT_USER: 158,
|
||||
@@ -160,19 +171,29 @@ export const shared_consts = {
|
||||
TABLES_MYGOODS: 'mygoods',
|
||||
TABLES_MYEVENTS: 'myevents',
|
||||
|
||||
MYTABS: [{id: 0, table: 'none' },
|
||||
{id: 1, table: 'myskills'},
|
||||
{id: 2, table: 'mybachecas' },
|
||||
{id: 3, table: 'myhosps'} ,
|
||||
{id: 4, table: 'mygoods'},
|
||||
{id: 5, table: 'myevents'}
|
||||
],
|
||||
|
||||
TABLES_ENABLE_GETREC_BYID: ['mybachecas', 'myhosps'],
|
||||
|
||||
TABLES_USER_INCLUDE_MY: ['mygroups'],
|
||||
TABLES_GETCOMPLETEREC: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||
TABLES_INSERT_ALMOST_ONE_TO_ENABLE_CIRCUIT: ['myskills', 'myhosps', 'mygoods'],
|
||||
TABLES_WITH_FILTER_FIELD: ['caldate'],
|
||||
TABLES_WITH_SPECIAL_FILTER: ['pub_to_share'],
|
||||
COL_WITH_FILTER_GTE: ['numMaxPeopleHosp'],
|
||||
TABLES_WITH_DATE: ['mybachecas', 'myhosps'],
|
||||
TABLES_WITH_SORTING: ['mybachecas', 'myhosps'],
|
||||
TABLES_REC_ID: ['skills', 'goods', 'subskills', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||
TABLES_FAVORITE_BOOKMARK: ['myskills', 'mygoods', 'mybachecas', 'myhosps'],
|
||||
|
||||
// costanti.VISUTABLE_SCHEDA_USER, VISUTABLE_SCHEDA_GROUP, VISUTABLE_USER_TABGROUP, VISUTABLE_USER_TABCIRCUIT
|
||||
VERTIC_SHOW_GRID: [-1, 2, -3, -4, -5],
|
||||
// costanti.VISUTABLE_SCHEDA_USER, VISUTABLE_SCHEDA_GROUP, VISUTABLE_USER_TABGROUP, VISUTABLE_USER_TABCIRCUIT, VISUTABLE_GROUP_CIRCUIT
|
||||
VERTIC_SHOW_GRID: [-1, 2, -3, -4, -5, -6],
|
||||
|
||||
TABLES_UPDATE_LASTIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'bots'],
|
||||
TABLES_FINDER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
|
||||
@@ -181,6 +202,9 @@ export const shared_consts = {
|
||||
|
||||
TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'users'],
|
||||
|
||||
TABLES_ORDER_DATE_UPDATED: ['myskills', 'myhosps', 'mygoods'],
|
||||
TABLES_ORDER_DESCR: ['mygroups'],
|
||||
|
||||
TABLES_VISU_IMG: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
|
||||
TABLES_DIRECTORY_A_PARTE: ['mygroups'],
|
||||
TABLES_WITH_ADMINS: ['mygroups', 'circuits'],
|
||||
@@ -517,6 +541,14 @@ export const shared_consts = {
|
||||
value: 23,
|
||||
label: 'Asciugacapelli',
|
||||
},
|
||||
{
|
||||
value: 24,
|
||||
label: 'Riscaldamento a legna',
|
||||
},
|
||||
{
|
||||
value: 25,
|
||||
label: 'Riscaldamento a gas',
|
||||
},
|
||||
],
|
||||
|
||||
Regions: [
|
||||
@@ -996,6 +1028,9 @@ export const shared_consts = {
|
||||
StatusNotifs: {
|
||||
STATUS_FRIENDS_ACCEPTED: 1,
|
||||
STATUS_FRIENDS_REFUSED: 2,
|
||||
STATUS_FRIENDS_REPORTED: 3,
|
||||
STATUS_HANDSHAKE_ACCEPTED: 10,
|
||||
STATUS_HANDSHAKE_REFUSED: 11,
|
||||
},
|
||||
|
||||
GroupsNotifs: {
|
||||
@@ -1007,6 +1042,21 @@ export const shared_consts = {
|
||||
STATUS_GROUPS_REMOVED: 7,
|
||||
},
|
||||
|
||||
CircuitsNotif: {
|
||||
STATUS_NONE: 0,
|
||||
STATUS_NEW: 51,
|
||||
STATUS_ACCEPTED: 53,
|
||||
STATUS_REFUSED: 54,
|
||||
STATUS_BLOCKED: 55,
|
||||
STATUS_DELETED: 56,
|
||||
STATUS_REMOVED: 57,
|
||||
STATUS_SENDCOINSREQ: 58,
|
||||
STATUS_COINS_ACCEPTED: 60,
|
||||
STATUS_COINS_REFUSED: 61,
|
||||
STATUS_COINS_ACCEPTED_SENT: 62,
|
||||
STATUS_COINS_REFUSED_SENT: 63,
|
||||
},
|
||||
|
||||
QualiNotifs: {
|
||||
CIRCUITS: 1,
|
||||
OTHERS: 2,
|
||||
@@ -1062,6 +1112,9 @@ export const shared_consts = {
|
||||
TYPEDIR_MSGS: 7,
|
||||
ID_MSGS_NEW_REC: 1,
|
||||
|
||||
TYPEDIR_HANDSHAKE: 10,
|
||||
ID_HANDSHAKE_ACCEPTED: 2,
|
||||
|
||||
TYPEDIR_TEST: 444,
|
||||
ID_TEST_NEW_REC: 1,
|
||||
},
|
||||
@@ -1216,6 +1269,11 @@ export const shared_consts = {
|
||||
FASE3_MONETA_ABILITATA: 3,
|
||||
},
|
||||
|
||||
CIRCUIT_PARAMS: {
|
||||
SCOPERTO_MIN_GRP: 200,
|
||||
SCOPERTO_MAX_GRP: 400,
|
||||
},
|
||||
|
||||
FontsInstalled: [
|
||||
{
|
||||
label: 'Arial',
|
||||
@@ -1276,6 +1334,14 @@ export const shared_consts = {
|
||||
value: 140,
|
||||
label: 'Dashboard',
|
||||
},
|
||||
{
|
||||
value: 150,
|
||||
label: 'SendCoinTo',
|
||||
},
|
||||
{
|
||||
value: 280,
|
||||
label: 'Tutorial',
|
||||
},
|
||||
],
|
||||
|
||||
TypesElemAdminTools: [
|
||||
@@ -1307,6 +1373,10 @@ export const shared_consts = {
|
||||
value: 200,
|
||||
label: 'Presentazione',
|
||||
},
|
||||
{
|
||||
value: 205,
|
||||
label: 'Attività',
|
||||
},
|
||||
{
|
||||
value: 210,
|
||||
label: 'Notifiche in Top',
|
||||
@@ -1486,4 +1556,41 @@ export const shared_consts = {
|
||||
return ['_id', 'username', 'group', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'notask_verif', 'verified_by_aportador', 'trust_modified', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
|
||||
},
|
||||
|
||||
getProjectForAll(proj_add: string) {
|
||||
let proj = {
|
||||
idContribType: 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
adType: 1,
|
||||
photos: 1,
|
||||
note: 1,
|
||||
descr: 1,
|
||||
date_created: 1,
|
||||
date_updated: 1,
|
||||
userId: 1,
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
lasttimeonline: 1,
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.mycircuits': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
};
|
||||
|
||||
if (proj_add)
|
||||
proj = Object.assign({}, proj, proj_add);
|
||||
|
||||
return proj;
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export default defineComponent({
|
||||
title: String,
|
||||
mylist: {
|
||||
type: [Array, String, undefined, null] as PropType<IAccomodation[] | string | undefined | null>,
|
||||
required: true,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
emits: ['showandsave'],
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
<template>
|
||||
<div class="bordo_stondato_blu">
|
||||
<CTitleBanner class="column" title="Tipi di ospitalità"></CTitleBanner>
|
||||
<div class="">
|
||||
|
||||
|
||||
<div class="">
|
||||
<q-btn
|
||||
v-if="isInModif"
|
||||
rounded label="Aggiungi Letti" color="positive" @click="add_newbed()">
|
||||
</q-btn>
|
||||
|
||||
<div v-for="(myaccom, index) in getlist()" :key="index">
|
||||
<div v-if="isInModif" class="row justify-center bordo_stondato_small">
|
||||
@@ -17,6 +13,8 @@
|
||||
v-model:value="myaccom.num"
|
||||
optval="value"
|
||||
optlab="label"
|
||||
style="min-width:80px;"
|
||||
|
||||
:sola_lettura="!isInModif"
|
||||
:options="shared_consts.People" :useinput="false"
|
||||
>
|
||||
@@ -58,6 +56,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="isInModif"
|
||||
rounded label="Aggiungi Letti" color="positive" @click="add_newbed()">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div v-if="numcol === 3" class="col-xs-4 col-sm-4 col-md-3 col-lg-2">
|
||||
<div class="q-ma-sm">
|
||||
<q-btn v-if="!small" :flat="flat" class="mybox_3" :color="color" rounded push :to="to" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 180)">
|
||||
<q-btn v-if="!small" :flat="flat" class="mybox_3" :color="color" rounded push :to="tools.updateLink(to)" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 180)">
|
||||
<q-icon class="q-ma-sm" :name="icon"/>
|
||||
<div class="q-ma-sm my-text_3 text-cls no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
<q-btn v-if="small" :flat="flat" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 180)">
|
||||
<q-btn v-if="small" :flat="flat" class="mybox_small" :color="color" rounded push :to="tools.updateLink(to)" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 180)">
|
||||
<q-icon class="q-ma-sm" :name="icon" size="sm"/>
|
||||
<div class="q-ma-xs my-text-small text-cls no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
@@ -13,11 +13,11 @@
|
||||
</div>
|
||||
<div v-else class="col-xs-6 col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="q-ma-sm">
|
||||
<q-btn v-if="!small" :flat="flat" class="mybox" :color="color" rounded push :to="to" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 0)">
|
||||
<q-btn v-if="!small" :flat="flat" class="mybox" :color="color" rounded push :to="tools.updateLink(to)" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 0)">
|
||||
<q-icon class="q-ma-sm" size="3rem" :name="icon"/>
|
||||
<div class="q-ma-sm text-h5-diff text-cls no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
<q-btn v-if="small" :flat="flat" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 0)">
|
||||
<q-btn v-if="small" :flat="flat" class="mybox_small" :color="color" rounded push :to="tools.updateLink(to)" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 0)">
|
||||
<q-icon class="q-ma-sm" :name="icon" size="sm"/>
|
||||
<div class="q-ma-xs my-text-small text-cls no-wrap"><span v-html="label"></span></div>
|
||||
</q-btn>
|
||||
|
||||
@@ -24,23 +24,30 @@ export default defineComponent({
|
||||
const finishLoading = computed(() => globalStore.finishLoading)
|
||||
|
||||
const deferredPrompt = computed(() => globalStore.deferredPrompt)
|
||||
const homescreen = computed(() => globalStore.homescreen)
|
||||
|
||||
function initprompt() {
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
event.preventDefault()
|
||||
console.log('beforeinstallprompt !')
|
||||
// Stash the event so it can be triggered later.
|
||||
globalStore.deferredPrompt = event
|
||||
})
|
||||
}
|
||||
|
||||
const viewiOS = ref(false)
|
||||
const viewAndroid = ref(false)
|
||||
|
||||
function installApp() {
|
||||
if (globalStore.deferredPrompt)
|
||||
if (globalStore.deferredPrompt) {
|
||||
globalStore.deferredPrompt.prompt()
|
||||
|
||||
// Wait for the user to respond to the prompt
|
||||
globalStore.deferredPrompt.userChoice.then((choiceResult: any)=>{
|
||||
if (choiceResult.outcome === 'accepted') {
|
||||
globalStore.deferredPrompt = null;
|
||||
// console.log('User accepted the A2HS prompt');
|
||||
} else {
|
||||
// console.log('User dismissed the A2HS prompt');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
initprompt()
|
||||
tools.checkApp()
|
||||
}
|
||||
|
||||
@@ -54,6 +61,9 @@ export default defineComponent({
|
||||
installApp,
|
||||
isAppRunning,
|
||||
deferredPrompt,
|
||||
viewiOS,
|
||||
viewAndroid,
|
||||
homescreen,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,15 +1,106 @@
|
||||
<template>
|
||||
<div v-if="finishLoading && !isAppRunning && deferredPrompt" class="row justify-center">
|
||||
<div v-if="false && tools.isDebugOn()" class="bg-red text-white">
|
||||
<span> isAppRunning: {{ isAppRunning }} - </span>
|
||||
<span> deferredPrompt: {{ deferredPrompt }} - </span>
|
||||
<span> homescreen: {{ homescreen }} </span>
|
||||
</div>
|
||||
<div v-if="finishLoading" class="row justify-center">
|
||||
<div v-if="!isAppRunning" class="q-ma-sm">
|
||||
<!-- App not running -->
|
||||
|
||||
<q-btn
|
||||
v-if="deferredPrompt"
|
||||
glossy
|
||||
size="xl"
|
||||
label="Installa App"
|
||||
@click="installApp"
|
||||
icon="fas fa-mobile-alt"
|
||||
color="white"
|
||||
text-color="green"
|
||||
/>
|
||||
color="green"
|
||||
text-color="white"
|
||||
></q-btn>
|
||||
<div v-else>
|
||||
<div v-if="$q.platform.is.ios && $q.platform.is.safari && !tools.isDevelop()">
|
||||
<q-btn
|
||||
glossy
|
||||
size="xl"
|
||||
label="Installa App"
|
||||
@click="viewiOS = !viewiOS"
|
||||
icon="fab fa-apple"
|
||||
color="green"
|
||||
text-color="white"
|
||||
></q-btn>
|
||||
|
||||
<q-slide-transition>
|
||||
<!-- Mostra spiegazione per iOS -->
|
||||
<div v-if="viewiOS">
|
||||
<q-img
|
||||
src="images/install_app_on_ios_1.png"
|
||||
fit="contain"
|
||||
style="min-width: 350px"
|
||||
class="q-my-sm"
|
||||
></q-img
|
||||
><br />
|
||||
|
||||
<q-img
|
||||
src="images/install_app_on_ios_1b.jpg"
|
||||
class="q-mb-md"
|
||||
></q-img
|
||||
><br />
|
||||
|
||||
<q-img
|
||||
src="images/install_app_on_ios_2.jpg"
|
||||
fit="contain"
|
||||
></q-img>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
<div v-if="$q.platform.is.android">
|
||||
<q-btn
|
||||
v-if="!tools.isDevelop()"
|
||||
glossy
|
||||
size="lg"
|
||||
label="Installa App"
|
||||
@click="viewAndroid = !viewAndroid"
|
||||
icon="fab fa-android"
|
||||
color="green"
|
||||
text-color="white"
|
||||
></q-btn>
|
||||
|
||||
<q-slide-transition>
|
||||
<!-- Mostra spiegazione per Android -->
|
||||
<div v-if="viewAndroid">
|
||||
<div class="q-ma-sm text-h6"> 1) Cliccare sui 3 puntini verticali<br>
|
||||
2) Cliccare sulla voce 'Installa App' o 'Schermata Home'<br>
|
||||
3) Andare sulla schermata HOME e cliccare sull'icona di RISO.
|
||||
</div>
|
||||
<q-img
|
||||
src="images/install_app_on_android_1.jpg"
|
||||
fit="contain"
|
||||
style="min-width: 350px"
|
||||
class="q-my-sm"
|
||||
></q-img
|
||||
><br />
|
||||
<q-img
|
||||
src="images/install_app_on_android_2.jpg"
|
||||
fit="contain"
|
||||
style="min-width: 350px"
|
||||
class="q-my-sm"
|
||||
></q-img
|
||||
><br />
|
||||
><br />
|
||||
<q-img
|
||||
src="images/install_app_on_android_3.jpg"
|
||||
fit="contain"
|
||||
style="min-width: 350px"
|
||||
class="q-my-sm"
|
||||
></q-img
|
||||
><br />
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row justify-center">
|
||||
<CBigBtn
|
||||
|
||||
@@ -6,12 +6,18 @@ import { useI18n } from '@/boot/i18n'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { costanti } from '@store/Modules/costanti'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
|
||||
import { CRegistration } from '@/components/CRegistration'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CCheckIfIsLogged',
|
||||
components: { },
|
||||
props: {},
|
||||
components: { CRegistration },
|
||||
props: {
|
||||
showalways: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -1,40 +1,132 @@
|
||||
<template>
|
||||
<div v-if="!tools.isLogged()">
|
||||
<div v-if="showalways || (!showalways && !tools.isLogged())">
|
||||
<div class="q-pa-md q-gutter-sm">
|
||||
|
||||
<div id="logo" class="text-center">
|
||||
<img id="logoimg" :src="tools.getimglogo()" alt="logo APP">
|
||||
<q-img
|
||||
id="logoimg"
|
||||
:src="tools.getimglogo()"
|
||||
class="q-my-sm"
|
||||
alt="logo APP"
|
||||
style="height: 100px; width: 100px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-banner rounded class="bg-primary text-white">
|
||||
<div class="text-h6 text-center">
|
||||
Accedi al menu inserendo le tue credenziali per entrare 🔑<br>
|
||||
<div class="text-center">
|
||||
<q-btn push color="white" text-color="blue" label="Clicca qui per Accedere" @click="tools.openrighttoolbar()"/>
|
||||
</div>
|
||||
<br>
|
||||
Entra anche nel <a href="https://riso.app/gruppi_territoriali"><strong>Canale e Gruppo Telegram di RISO</strong></a> scegliendo la tua provincia !
|
||||
</div>
|
||||
<br>
|
||||
<q-banner
|
||||
v-if="site.confpages.videoPromo"
|
||||
rounded
|
||||
dense
|
||||
size="lg"
|
||||
class="bg-grey-3 shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="mybanner bg-blue text-white">Video di Presentazione:</div>
|
||||
<br />
|
||||
<q-video :src="site.confpages.videoPromo" :ratio="16 / 9"> </q-video>
|
||||
</q-banner>
|
||||
|
||||
<q-banner
|
||||
v-if="site.confpages.PDFPromo"
|
||||
rounded
|
||||
dense
|
||||
size="lg"
|
||||
class="bg-grey-3 shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="mybanner bg-blue text-white">PDF Presentazione RISO:</div>
|
||||
<br />
|
||||
<template v-slot:action>
|
||||
<q-btn
|
||||
type="a"
|
||||
rounded
|
||||
icon="fab fa-telegram"
|
||||
color="primary"
|
||||
:href="site.confpages.PDFPromo"
|
||||
target="_blank"
|
||||
label="Scarica PDF"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
</q-banner>
|
||||
|
||||
<div class="text-h6 text-center">
|
||||
<transition-group
|
||||
name="fade"
|
||||
mode="out-in"
|
||||
appear
|
||||
enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut"
|
||||
>
|
||||
<q-banner
|
||||
:key="1"
|
||||
rounded
|
||||
dense
|
||||
size="lg"
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<template v-slot:avatar>
|
||||
<q-icon :key="2" name="signal_wifi_off" color="primary" />
|
||||
</template>
|
||||
<div class="mybanner" :key="3">
|
||||
Accedi per Unirti alla RETE e al Circuito di scambio RIS
|
||||
</div>
|
||||
<template v-slot:action>
|
||||
<q-btn
|
||||
rounded
|
||||
icon="fas fa-user"
|
||||
color="primary"
|
||||
@click="tools.openrighttoolbar()"
|
||||
>{{ $t('login.enter') }}
|
||||
</q-btn>
|
||||
<CRegistration />
|
||||
</template>
|
||||
</q-banner>
|
||||
</transition-group>
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
size="lg"
|
||||
class="shadow-5"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="mybanner" :key="3">
|
||||
👉🏻 Entra nel canale Telegram per unirti al gruppo Provinciale:
|
||||
</div>
|
||||
<template v-slot:action>
|
||||
<q-btn
|
||||
type="a"
|
||||
rounded
|
||||
icon="fab fa-telegram"
|
||||
color="primary"
|
||||
href="https://t.me/+pZ40VpmL1NhkZjE0"
|
||||
target="_blank"
|
||||
label="Progetto RISO"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
</q-banner>
|
||||
</div>
|
||||
<br />
|
||||
<q-banner rounded class="bg-green-8 text-white">
|
||||
<div class="text-h6 text-center">
|
||||
Visualizza la pagina di Aiuto<br>
|
||||
Visualizza la pagina di Aiuto<br />
|
||||
<div class="text-center">
|
||||
<q-btn :color="$q.dark.isActive ? `black` : `white`" push glossy :text-color="$q.dark.isActive ? `white` : `black`" label="Pagina Aiuto" to="/faq"/>
|
||||
<q-btn
|
||||
:color="$q.dark.isActive ? `black` : `white`"
|
||||
push
|
||||
glossy
|
||||
:text-color="$q.dark.isActive ? `white` : `black`"
|
||||
label="Pagina Aiuto"
|
||||
to="/istruzioni"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-banner>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="!tools.isLogged() && site.confpages.enableReg && site.confpages.showRegButton"
|
||||
style="margin:20px; text-align: center;">
|
||||
|
||||
<q-btn rounded size="lg" color="primary" @click="tools.openrighttoolbar()">{{ $t('login.enter') }}
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
0
src/components/CContactUser/CContactUser.scss
Executable file
73
src/components/CContactUser/CContactUser.ts
Executable file
@@ -0,0 +1,73 @@
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { defineComponent, PropType, ref } from 'vue'
|
||||
import { IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { CLabel } from '@/components/CLabel'
|
||||
import { CSendCoins } from '@/components/CSendCoins'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CContactUser',
|
||||
props: {
|
||||
myuser: {
|
||||
type: Object as PropType<IUserFields>,
|
||||
required: true,
|
||||
},
|
||||
showBtnActivities: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
components: { CLabel, CSendCoins },
|
||||
setup(props) {
|
||||
const $q = useQuasar()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const showsendCoinTo = ref(false)
|
||||
const showingtooltip = ref(false)
|
||||
|
||||
function myusername() {
|
||||
return userStore.my.username
|
||||
}
|
||||
|
||||
function getLinkUserTelegram() {
|
||||
|
||||
if (props.myuser) {
|
||||
if (!!props.myuser.profile.username_telegram) {
|
||||
return 'https://t.me/' + props.myuser.profile.username_telegram
|
||||
}
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
function getLinkWebSite() {
|
||||
if (props.myuser) {
|
||||
let mysite = props.myuser.profile.website!
|
||||
if (mysite) {
|
||||
if (!mysite.startsWith('http')) {
|
||||
mysite = 'https://' + mysite
|
||||
}
|
||||
}
|
||||
return mysite
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
tools,
|
||||
userStore,
|
||||
shared_consts,
|
||||
showsendCoinTo,
|
||||
getLinkUserTelegram,
|
||||
getLinkWebSite,
|
||||
myusername,
|
||||
showingtooltip,
|
||||
}
|
||||
},
|
||||
})
|
||||
125
src/components/CContactUser/CContactUser.vue
Executable file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
|
||||
<div class="row justify-evenly items-center q-pa-sm q-ma-sm">
|
||||
<div class="q-ma-sx">
|
||||
<q-btn
|
||||
v-if="getLinkUserTelegram()"
|
||||
icon="fab fa-telegram"
|
||||
color="blue"
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('msgs.telegrammsg')"
|
||||
:href="tools.isUserOk() ? getLinkUserTelegram() : null"
|
||||
@click="!tools.isUserOk() ? (showingtooltip = !showingtooltip) : false"
|
||||
target="__blank"
|
||||
>
|
||||
</q-btn>
|
||||
<div v-else-if="myuser.email" class="row q-ma-sx">
|
||||
<CLabel
|
||||
v-bind="$attrs"
|
||||
:copy="true"
|
||||
:value="tools.isUserOk() ? myuser.email : ''"
|
||||
:label="$t('reg.email')"
|
||||
/>
|
||||
|
||||
<q-btn
|
||||
outline
|
||||
icon="fas fa-envelope"
|
||||
:color="$q.dark.isActive ? `shite` : `black`"
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
size="md"
|
||||
:label="$t('msgs.send_email')"
|
||||
:href="tools.isUserOk() ? tools.getemailto(myuser.email) : null"
|
||||
@click="
|
||||
!tools.isUserOk() ? (showingtooltip = !showingtooltip) : false
|
||||
"
|
||||
target="__blank"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-ma-sx">
|
||||
<q-btn
|
||||
v-if="
|
||||
userStore.getMyCircuitsInCommonByUser(myuser).length > 0 &&
|
||||
((myuser.username !== userStore.my.username) || userStore.hoContiCollettiviDaAmministrare() || userStore.hoContiComunitariDaAmministrare())
|
||||
"
|
||||
icon="fas fa-coins"
|
||||
color="green"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('circuit.sendcoins')"
|
||||
@click="showsendCoinTo = true"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-if="myuser._id" class="q-ma-sx">
|
||||
<q-btn
|
||||
v-if="getLinkWebSite()"
|
||||
icon="fas fa-globe"
|
||||
color="blue"
|
||||
type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('reg.website')"
|
||||
:href="tools.isUserOk() ? getLinkWebSite() : null"
|
||||
@click="!tools.isUserOk() ? (showingtooltip = !showingtooltip) : false"
|
||||
target="__blank"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="myrow justify-evenly items-center q-pa-sm q-ma-sm">
|
||||
<div v-if="myuser._id" class="col-12">
|
||||
<q-btn
|
||||
v-if="myuser.username === myusername()"
|
||||
icon="fas fa-link"
|
||||
color="blue"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('reg.link_reg_and_msg')"
|
||||
@click="
|
||||
tools.sendMsgTelegramCmd(
|
||||
$q,
|
||||
$t,
|
||||
shared_consts.MsgTeleg.SHARE_MSGREG,
|
||||
true
|
||||
);
|
||||
"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div
|
||||
v-if="showBtnActivities"
|
||||
class="col-md-6 col-sm-6 q-ma-xs col-xs-12 text-center"
|
||||
>
|
||||
<q-btn
|
||||
icon="fas fa-house-user"
|
||||
size="md"
|
||||
color="orange"
|
||||
:label="$t('profile.myactivities')"
|
||||
:to="`/attivita/` + myuser.username"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-tooltip v-if="showingtooltip" class="bg-red text-body2 text-bold" :offset="[10, 10]" v-model="showingtooltip"
|
||||
>Per contattare la persona:<br />Entra ed Accedi a RISO</q-tooltip
|
||||
>
|
||||
</div>
|
||||
<div v-if="showsendCoinTo">
|
||||
<CSendCoins
|
||||
:showprop="showsendCoinTo"
|
||||
:to_user="myuser"
|
||||
@close="showsendCoinTo = false"
|
||||
>
|
||||
</CSendCoins>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CContactUser.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CContactUser.scss';
|
||||
</style>
|
||||
1
src/components/CContactUser/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CContactUser} from './CContactUser.vue'
|
||||
0
src/components/CCurrencyV2/CCurrencyV2.scss
Executable file
122
src/components/CCurrencyV2/CCurrencyV2.ts
Executable file
@@ -0,0 +1,122 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
|
||||
import { date, useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
|
||||
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CCurrencyV2',
|
||||
components: { CCurrencyValue, CMyFieldDb },
|
||||
emits: ['save'],
|
||||
props: {
|
||||
small: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
tips: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
symbol: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
color_border: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
valueextra: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
paramTypeAccount: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
myrecparam: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
admin: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const changeParamValue = ref(false)
|
||||
|
||||
const showingtooltip = ref(false)
|
||||
|
||||
const myvalue = ref(<any>null)
|
||||
|
||||
function created() {
|
||||
// created
|
||||
myvalue.value = props.modelValue
|
||||
}
|
||||
|
||||
function changedParamValue(value: boolean) {
|
||||
changeParamValue.value = value
|
||||
}
|
||||
|
||||
function save(value: any) {
|
||||
|
||||
// ricarico
|
||||
emit('save', value)
|
||||
|
||||
myvalue.value = value
|
||||
|
||||
}
|
||||
|
||||
onMounted(created)
|
||||
|
||||
return {
|
||||
showingtooltip,
|
||||
t,
|
||||
tools,
|
||||
changeParamValue,
|
||||
changedParamValue,
|
||||
costanti,
|
||||
save,
|
||||
myvalue,
|
||||
}
|
||||
},
|
||||
})
|
||||
47
src/components/CCurrencyV2/CCurrencyV2.vue
Executable file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div v-if="myrecparam">
|
||||
<CCurrencyValue
|
||||
:symbol="symbol"
|
||||
:color="color"
|
||||
:color_border="color_border"
|
||||
v-model="myvalue"
|
||||
:icon="icon"
|
||||
:label="label"
|
||||
:tips="tips"
|
||||
:paramTypeAccount="paramTypeAccount"
|
||||
:myrecparam="myrecparam"
|
||||
@changedParamValue="changedParamValue"
|
||||
:admin="admin"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
<q-dialog v-model="changeParamValue">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title class="text-h7">
|
||||
{{ $t('account.settings') }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<CMyFieldDb
|
||||
v-if="myrecparam"
|
||||
table="accounts"
|
||||
:title="tools.getStrByParamTypeAccount(paramTypeAccount)"
|
||||
:id="myrecparam._id"
|
||||
:rec="myrecparam"
|
||||
:mykey="tools.getFieldByParamTypeAccount(paramTypeAccount)"
|
||||
:type="tools.getTypeByParamTypeAccount(paramTypeAccount)"
|
||||
@save="save"
|
||||
/>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCurrencyV2.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCurrencyV2.scss';
|
||||
</style>
|
||||
1
src/components/CCurrencyV2/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CCurrencyV2} from './CCurrencyV2.vue'
|
||||
@@ -4,9 +4,18 @@ import { tools } from '@src/store/Modules/tools'
|
||||
import { date, useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CCurrencyValue',
|
||||
components: { },
|
||||
emits: ['changedParamValue' ],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
small: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -45,17 +54,27 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
value: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
valueextra: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
paramTypeAccount: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
myrecparam: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
admin: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
@@ -66,13 +85,13 @@ export default defineComponent({
|
||||
// created
|
||||
}
|
||||
|
||||
|
||||
onMounted(created)
|
||||
|
||||
return {
|
||||
showingtooltip,
|
||||
t,
|
||||
tools,
|
||||
costanti,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,19 +1,52 @@
|
||||
<template>
|
||||
<div v-if="small">
|
||||
<q-chip
|
||||
dense class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||
dense
|
||||
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||
size="md"
|
||||
:color="value > 0 ? `green` : value === 0 ? `gray` : `red`" text-color="white"
|
||||
icon="fas fa-coins">
|
||||
{{ tools.roundDec2(value) }} <span class="text-currency"> <em class="q-pa-xxs text-white rounded-borders shadow-2" :style="`background-color: ` + (color ? color : '#ff5500')">{{ symbol }}</em></span>
|
||||
:color="modelValue > 0 ? `green` : modelValue === 0 ? `gray` : `red`"
|
||||
text-color="white"
|
||||
icon="fas fa-coins"
|
||||
>
|
||||
{{ tools.roundDec2(modelValue) }}
|
||||
<span class="text-currency"
|
||||
> <em
|
||||
class="q-pa-xxs text-white rounded-borders shadow-2"
|
||||
:style="`background-color: ` + (color ? color : '#ff5500')"
|
||||
>{{ symbol }}</em
|
||||
></span
|
||||
>
|
||||
</q-chip>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="value !== null" :class="`text-h5 ` + small ? `bordo_stondato_small`: `bordo_stondato_stretto` + ` full-width`"
|
||||
:style="(!$q.screen.lt.sm && !small ? `min-width: 250px; ` : small ? ` max-width: 120px;` : ``) + (color_border ? `border-color: ` + color_border + `!important;`: '')">
|
||||
<div class="text-center text-h7-dense text-italic text-grey-14">
|
||||
<div
|
||||
v-if="modelValue !== null"
|
||||
:class="
|
||||
`text-h5 ` +
|
||||
(small ? `bordo_stondato_small` : `bordo_stondato_stretto`) +
|
||||
` full-width`
|
||||
"
|
||||
:style="
|
||||
(!$q.screen.lt.sm && !small
|
||||
? `min-width: 250px; `
|
||||
: small
|
||||
? ` max-width: 120px;`
|
||||
: ``) +
|
||||
(color_border ? `border-color: ` + color_border + `!important;` : '')
|
||||
"
|
||||
>
|
||||
<div
|
||||
:class="
|
||||
`text-center text-h7-dense text-italic ` +
|
||||
($q.dark.isActive ? `text-grey-6` : `text-grey-14`)
|
||||
"
|
||||
>
|
||||
<span v-if="small">
|
||||
<em class="q-px-xs text-white rounded-borders" :style="`background-color: ` + (color ? color : '#ff5500')">{{ symbol }}</em>
|
||||
<em
|
||||
class="q-px-xs text-white rounded-borders"
|
||||
:style="`background-color: ` + (color ? color : '#ff5500')"
|
||||
>{{ symbol }}</em
|
||||
>
|
||||
</span>
|
||||
<span v-else>{{ label }}</span>
|
||||
</div>
|
||||
@@ -24,36 +57,51 @@
|
||||
:readonly="readonly"
|
||||
type="number"
|
||||
rounded
|
||||
:class="!small ? `q-px-sm text-h5`: `q-px-xs text-h7`"
|
||||
:color="value > 0 ? `green` : `red`"
|
||||
:class="!small ? `q-px-sm text-h5` : `q-px-xs text-h7`"
|
||||
:color="modelValue > 0 ? `green` : `red`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<!--<img src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">-->
|
||||
<q-btn v-if="tips && !small"
|
||||
<q-btn
|
||||
v-if="tips && !small"
|
||||
icon="fas fa-info"
|
||||
color="primary" text-color="white"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
round
|
||||
size="sm"
|
||||
@click="showingtooltip = !showingtooltip"
|
||||
>
|
||||
|
||||
</q-btn>
|
||||
<q-icon v-else name="fas fa-coins" :size="small ? `xs`: `sm`"/>
|
||||
<q-icon v-else name="fas fa-coins" :size="small ? `xs` : `sm`" />
|
||||
</template>
|
||||
<template v-slot:control>
|
||||
<div :class="`align_elem_right `+ small ? `text-h7` : ``">{{ valueextra }}{{ tools.roundDec2(value) }}
|
||||
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{ tips }}</q-tooltip>
|
||||
<div :class="`align_elem_right ` + (small ? `text-h7` : ``)">
|
||||
{{ valueextra }}{{ tools.roundDec2(modelValue) }}
|
||||
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{
|
||||
tips
|
||||
}}</q-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<div v-if="!small" :class="small ? `text-h7-dense` : `text-h7`">
|
||||
<em class="q-px-sm text-white rounded-borders" :style="`background-color: ` + (color ? color : '#ff5500')">{{ symbol }}</em>
|
||||
<em
|
||||
class="q-px-sm text-white rounded-borders"
|
||||
:style="`background-color: ` + (color ? color : '#ff5500')"
|
||||
>{{ symbol }}</em
|
||||
>
|
||||
</div>
|
||||
<div v-if="paramTypeAccount && admin">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
icon="fas fa-pencil-alt"
|
||||
size="sm"
|
||||
@click="$emit('changedParamValue', true)"
|
||||
></q-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
.progress-base {
|
||||
height: 8px;
|
||||
height: 5px;
|
||||
border-radius: 3px;
|
||||
background-color: #e9ecef;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="q-ma-md">
|
||||
<div class="row q-my-md shadow" style="border-radius: 4px;border: 1px solid rgba(0, 0, 0, 0.12);">
|
||||
<div class="q-ma-xs">
|
||||
<div
|
||||
class="row q-my-sm shadow"
|
||||
style="border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.12)"
|
||||
>
|
||||
<!--<div class="col-md-3 col-lg-3 col-sm-12 col-xs-12 box_4" style="border-left: 1px solid #efefef;"
|
||||
v-bind:class="{'border-top': $q.platform.is.mobile}">
|
||||
<q-card class="no-shadow q-pa-sm">
|
||||
@@ -28,53 +31,110 @@
|
||||
</q-card>
|
||||
</div>-->
|
||||
|
||||
<div v-for="(rec, index) of visustat" :class="`col-md-3 col-lg-3 col-sm-6 col-xs-6 text-` + rec.color"
|
||||
style="border-left: 1px solid #efefef;" :key="index"
|
||||
<div
|
||||
v-for="(rec, index) of visustat"
|
||||
:class="`col-md-3 col-lg-3 col-sm-6 col-xs-6 text-` + rec.color"
|
||||
style="border-left: 1px solid #efefef"
|
||||
:key="index"
|
||||
>
|
||||
<q-card class="no-shadow q-pa-sm">
|
||||
<q-item class="q-pb-none q-pt-xs cursor-pointer" :to="rec.to">
|
||||
<q-card class="no-shadow q-pa-xs">
|
||||
<q-item class="q-pb-none q-pt-xs cursor-pointer" :to="tools.updateLink(rec.to)">
|
||||
<q-item-section>
|
||||
<q-item-label class="text-h4" style="font-weight: 500;letter-spacing: 3px;">
|
||||
{{ calcstat.numByTab[rec.table] }}
|
||||
</q-item-label>
|
||||
<q-item-label :class="(!$q.dark.isActive? 'text-grey-7':'text-white') + ` title_view_shadow`" style="letter-spacing: 1px;">
|
||||
<q-item-label
|
||||
:class="
|
||||
(!$q.dark.isActive ? 'text-grey-9' : 'text-white') +
|
||||
` title_view_shadow`
|
||||
"
|
||||
style="letter-spacing: 1px"
|
||||
>
|
||||
{{ rec.title }}
|
||||
</q-item-label>
|
||||
<q-item-label lines="3" no-wrap
|
||||
v-if="rec.subtitle"
|
||||
:class="
|
||||
(!$q.dark.isActive ? 'text-grey-8' : 'text-white') +
|
||||
` title_view_subtitle`
|
||||
"
|
||||
>
|
||||
|
||||
<span v-html="rec.subtitle"></span>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
<q-icon :name="rec.icon" :class="`text-` + rec.color" size="50px"></q-icon>
|
||||
<q-item-section side class="small_side" style="right: 4px; position: absolute; ">
|
||||
<q-img v-if="rec.image" :src="rec.image" style="width: 27px;"></q-img>
|
||||
<q-icon
|
||||
v-else
|
||||
:name="rec.icon"
|
||||
:class="`text-` + rec.color"
|
||||
size="27px"
|
||||
></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item class="q-py-xs" style="min-height: unset">
|
||||
<q-item-section>
|
||||
<div class="progress-base q-my-sm">
|
||||
<div class="progress-base" :style="tools.getbackgroundGradient(rec.color, 45)"></div>
|
||||
<div
|
||||
class="progress-base"
|
||||
:style="tools.getbackgroundGradient(rec.color, 45)"
|
||||
></div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-my-md shadow" style="border-radius: 4px;border: 1px solid rgba(0, 0, 0, 0.12);">
|
||||
<div v-for="(rec, index) of visulinks" :class="`col-md-3 col-lg-3 col-sm-6 col-xs-6 text-` + rec.color"
|
||||
style="border-left: 1px solid #efefef;" :key="index"
|
||||
|
||||
<div class="row" style="margin-top: 4px important; font-size: 0.75rem">
|
||||
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="row q-my-md shadow"
|
||||
style="border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.12)"
|
||||
>
|
||||
<q-card class="no-shadow q-pa-sm">
|
||||
<q-item class="q-pb-none q-pt-xs cursor-pointer" :to="rec.to">
|
||||
<div
|
||||
v-for="(rec, index) of visulinks"
|
||||
:class="`col-md-3 col-lg-3 col-sm-6 col-xs-6 text-` + rec.color"
|
||||
style="border-left: 1px solid #efefef"
|
||||
:key="index"
|
||||
>
|
||||
<q-card class="no-shadow q-pa-xxs">
|
||||
<q-item class="q-pb-none q-pt-xs cursor-pointer" :to="tools.updateLink(rec.to)">
|
||||
<q-item-section>
|
||||
<q-item-label :class="(!$q.dark.isActive? 'text-grey-7':'text-white') + ` title_view_shadow`" style="letter-spacing: 0.5px;">
|
||||
<q-item-label lines="3"
|
||||
:class="
|
||||
(!$q.dark.isActive ? 'text-grey-9' : 'text-white') +
|
||||
` title_view_small_shadow`
|
||||
"
|
||||
style="letter-spacing: 0.5px"
|
||||
>
|
||||
{{ rec.title }}
|
||||
</q-item-label>
|
||||
<q-item-label
|
||||
v-if="rec.subtitle"
|
||||
:class="
|
||||
(!$q.dark.isActive ? 'text-grey-8' : 'text-white') +
|
||||
` title_view_subtitle`
|
||||
"
|
||||
style="letter-spacing: 0.2px"
|
||||
>
|
||||
<span v-html="rec.subtitle"></span>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
<q-icon :name="rec.icon" :class="`text-` + rec.color" size="50px"></q-icon>
|
||||
<q-img v-if="rec.image" :src="rec.image" style="width: 35px"></q-img>
|
||||
<q-icon
|
||||
v-else
|
||||
:name="rec.icon"
|
||||
:class="`text-` + rec.color"
|
||||
size="20px"
|
||||
></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1062,7 +1062,7 @@
|
||||
|
||||
<div class="q-mt-md">
|
||||
<div v-if="!mysingleevent && getNumEvents() > 0">
|
||||
<p class="text-subtitle1 text-red bg-amber text-center">
|
||||
<p class="text-subtitle1 text-white bg-primary text-center">
|
||||
LISTA PROSSIMI
|
||||
<span v-if="showfirstN > 0">{{ showfirstN }}</span> EVENTI:
|
||||
</p>
|
||||
@@ -1227,7 +1227,7 @@
|
||||
|
||||
<q-btn
|
||||
:text-color="$q.dark.isActive ? `white` : `black`"
|
||||
icon="fas fa-share-alt"
|
||||
icon="fas fa-link"
|
||||
label="Condividi"
|
||||
@click="condividipag(`/event/${event.typol}/${event._id}`)"
|
||||
></q-btn>
|
||||
@@ -1248,9 +1248,9 @@
|
||||
|
||||
<p
|
||||
:class="
|
||||
`listaev__details` + $q.dark.isActive
|
||||
`listaev__details` + ($q.dark.isActive
|
||||
? `_darktheme`
|
||||
: ``
|
||||
: ``)
|
||||
"
|
||||
v-html="event.details"
|
||||
></p>
|
||||
|
||||
@@ -81,6 +81,7 @@ export default defineComponent({
|
||||
const myoptions = ref(<any>[])
|
||||
|
||||
|
||||
|
||||
const col = ref(<IColGridTable>{})
|
||||
|
||||
/*
|
||||
@@ -144,6 +145,14 @@ export default defineComponent({
|
||||
return { sortBy: 'dateTimeStart', descending: false, page: 1, rowsNumber: 20, rowsPerPage: 20 }
|
||||
else if (props.table === toolsext.TABMOVEMENTS)
|
||||
return { sortBy: 'transactionDate', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 }
|
||||
else if (props.table === toolsext.TABCIRCUITS)
|
||||
return { sortBy: 'numMembers', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 }
|
||||
else if (props.table === toolsext.TABUSER)
|
||||
return userStore.getMypaginationMembers()
|
||||
else if (shared_consts.TABLES_ORDER_DATE_UPDATED.includes(props.table))
|
||||
return { sortBy: 'date_updated', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 } // date_updated
|
||||
else if (shared_consts.TABLES_ORDER_DESCR.includes(props.table))
|
||||
return { sortBy: 'desc', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 10 }
|
||||
|
||||
return { sortBy: 'date_created', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 }
|
||||
})
|
||||
@@ -180,32 +189,32 @@ export default defineComponent({
|
||||
|
||||
const hint = computed(() => {
|
||||
if (props.table === toolsext.TABMYGOODS)
|
||||
return 'nome del Bene o settore da cercare'
|
||||
return 'digita il nome del Bene o del settore'
|
||||
else if (props.table === toolsext.TABMYSKILLS)
|
||||
return 'nome del Servizio o settore da cercare'
|
||||
return 'digita il nome del Servizio o del settore'
|
||||
else if (props.table === toolsext.TABMYGROUPS)
|
||||
return 'nome del Gruppo da cercare'
|
||||
return 'digita il nome del Gruppo'
|
||||
else if (props.table === toolsext.TABCIRCUITS)
|
||||
return 'nome del Circuito da cercare'
|
||||
return 'digita il nome della provincia'
|
||||
else if (props.table === toolsext.TABMYBACHECAS)
|
||||
return 'nome dell\'Evento da cercare'
|
||||
return 'digita il nome dell\'Evento'
|
||||
else if (props.table === toolsext.TABMYHOSPS)
|
||||
return 'nome dell\'Ospitalità da cercare'
|
||||
return 'digita delle parole da cercare nella descrizione dell\'Ospitalità'
|
||||
|
||||
return 'nome da cercare'
|
||||
return 'digita una parola da cercare'
|
||||
})
|
||||
|
||||
const visuType = computed(() => {
|
||||
if (props.table === toolsext.TABMYGOODS)
|
||||
return $q.screen.gt.xs
|
||||
return false
|
||||
else if (props.table === toolsext.TABMYSKILLS)
|
||||
return $q.screen.gt.xs
|
||||
return false
|
||||
else if (props.table === toolsext.TABMYGROUPS)
|
||||
return $q.screen.gt.xs
|
||||
return false
|
||||
else if (props.table === toolsext.TABMYBACHECAS)
|
||||
return $q.screen.gt.xs
|
||||
return false
|
||||
|
||||
return $q.screen.gt.xs
|
||||
return false // $q.screen.gt.xs
|
||||
})
|
||||
|
||||
const noMsgRecord = computed(() => {
|
||||
@@ -601,7 +610,8 @@ export default defineComponent({
|
||||
table: 'regions',
|
||||
key: 'idReg',
|
||||
type: costanti.FieldType.select,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI),
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'regions_hosp', costanti.FILTER_TUTTI),
|
||||
keycookie: '_hosp',
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
filter: null,
|
||||
@@ -613,7 +623,8 @@ export default defineComponent({
|
||||
table: 'provinces',
|
||||
key: 'idProvince',
|
||||
type: costanti.FieldType.select,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'provinces_hosp', costanti.FILTER_TUTTI),
|
||||
keycookie: '_hosp',
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
filter: getFilterProvinceByRegion,
|
||||
@@ -625,7 +636,8 @@ export default defineComponent({
|
||||
table: 'cities',
|
||||
key: 'idCity',
|
||||
type: costanti.FieldType.select_by_server,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'cities_hosp', costanti.FILTER_TUTTI),
|
||||
keycookie: '_hosp',
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
useinput: true,
|
||||
@@ -634,18 +646,6 @@ export default defineComponent({
|
||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||
tablesel: 'cities',
|
||||
},
|
||||
{
|
||||
label: 'Visiblità',
|
||||
table: 'pub_to_share',
|
||||
key: 'pub_to_share',
|
||||
type: costanti.FieldType.select,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'pub_to_share', shared_consts.PUBTOSHARE.ALL, true),
|
||||
addall: false,
|
||||
arrvalue: [],
|
||||
useinput: true,
|
||||
filter: null,
|
||||
tablesel: 'pub_to_share',
|
||||
},
|
||||
{
|
||||
label: 'Tipologia',
|
||||
table: toolsext.TABTYPEHOSP,
|
||||
@@ -1042,6 +1042,7 @@ export default defineComponent({
|
||||
mycities: 1,
|
||||
sector: 1,
|
||||
recCatGrp: 1,
|
||||
|
||||
}
|
||||
},
|
||||
lookup3: {
|
||||
@@ -1099,6 +1100,7 @@ export default defineComponent({
|
||||
groupnameId: 1,
|
||||
path: 1,
|
||||
name: 1,
|
||||
strProv: 1,
|
||||
subname: 1,
|
||||
longdescr: 1,
|
||||
regulation: 1,
|
||||
@@ -1115,6 +1117,8 @@ export default defineComponent({
|
||||
status: 1,
|
||||
transactionsEnabled: 1,
|
||||
qta_max_default: 1,
|
||||
fido_scoperto_default_grp: 1,
|
||||
qta_max_default_grp: 1,
|
||||
valuta_per_euro: 1,
|
||||
symbol: 1,
|
||||
idCity: 1,
|
||||
@@ -1155,6 +1159,9 @@ export default defineComponent({
|
||||
mygood: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -1176,6 +1183,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
@@ -1222,6 +1230,9 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
dateTimeStart: 1,
|
||||
@@ -1239,12 +1250,13 @@ export default defineComponent({
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
lasttimeonline: 1,
|
||||
lasttimeonline: 1,
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
@@ -1297,6 +1309,9 @@ lasttimeonline: 1,
|
||||
accomodation: 1,
|
||||
preferences: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
photos: 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
@@ -1310,7 +1325,7 @@ lasttimeonline: 1,
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
lasttimeonline: 1,
|
||||
lasttimeonline: 1,
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
@@ -1343,6 +1358,9 @@ lasttimeonline: 1,
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -1358,12 +1376,13 @@ lasttimeonline: 1,
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
lasttimeonline: 1,
|
||||
lasttimeonline: 1,
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
@@ -1388,6 +1407,14 @@ lasttimeonline: 1,
|
||||
}
|
||||
}
|
||||
|
||||
function mySortFieldsAvailable() {
|
||||
if (props.table === toolsext.TABUSER) {
|
||||
return userStore.getSortFieldsAvailable()
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
function getdefaultnewrec(): any {
|
||||
if (props.table === toolsext.TABMYSKILLS) {
|
||||
return tools.getdefaultnewrec_MySkill()
|
||||
@@ -1437,6 +1464,7 @@ lasttimeonline: 1,
|
||||
hint,
|
||||
strextra,
|
||||
myoptions,
|
||||
mySortFieldsAvailable,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<q-input
|
||||
v-model="search"
|
||||
filled
|
||||
dense
|
||||
type="search"
|
||||
debounce="500"
|
||||
:hint="t('finder.search_skill')"
|
||||
@@ -23,7 +22,6 @@
|
||||
>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
dense
|
||||
label=""
|
||||
color="primary"
|
||||
@click="doSearch"
|
||||
@@ -36,6 +34,7 @@
|
||||
<CGridTableRec
|
||||
v-if="searchList.length > 0"
|
||||
:prop_mytable="table"
|
||||
:options="tools.optionsTable(table)"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="col"
|
||||
:prop_colkey="prop_colkey"
|
||||
@@ -49,6 +48,7 @@
|
||||
:nodataLabel="noMsgRecord"
|
||||
:prop_search="true"
|
||||
:finder="true"
|
||||
labelElemFind="trovati"
|
||||
:choose_visutype="visuType"
|
||||
:butt_modif_new="true && !noButtAdd"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
|
||||
@@ -56,8 +56,8 @@
|
||||
:filtercustom="filtercustom"
|
||||
:prop_searchList="searchList"
|
||||
:defaultnewrec="getdefaultnewrec"
|
||||
:selector="selector"
|
||||
labelBtnAddRow="NONE"
|
||||
:prop_SortFieldsAvailable="mySortFieldsAvailable"
|
||||
:labelBtnAddExtra="noButtAdd ? `` : ``"
|
||||
:extraparams="extraparams()"
|
||||
>
|
||||
|
||||
65
src/components/CGalleryImages/CGalleryImages.scss
Executable file
@@ -0,0 +1,65 @@
|
||||
$heightBtn: 100%;
|
||||
$grayshadow: #555;
|
||||
|
||||
.text-subtitle-gallery {
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.75rem;
|
||||
letter-spacing: .00937em;
|
||||
text-shadow: .1rem .1rem .1rem $grayshadow;
|
||||
}
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
.text-subtitle-gallery {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.myimg {
|
||||
border-radius: 10px !important;
|
||||
height: 200px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.myimg-modify {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
|
||||
.barwidth{
|
||||
width: 250px !important;
|
||||
}
|
||||
|
||||
|
||||
.q-img {
|
||||
&__image {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.my-card-gallery {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
min-width: 200px;
|
||||
padding: 0.5rem 0.5rem;
|
||||
height: 350px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.my-card-gallery-noModif {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
min-width: 200px;
|
||||
padding: 1rem 1rem;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.my-card-gallery-view {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 0.25rem 0.25rem;
|
||||
margin: auto;
|
||||
}
|
||||
40
src/components/CGalleryImages/CGalleryImages.ts
Executable file
@@ -0,0 +1,40 @@
|
||||
import { defineComponent, ref, PropType, watch, onMounted, computed } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { IGallery, IImgGallery } from 'model'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CGalleryImages',
|
||||
props: {
|
||||
imgGallery: {
|
||||
type: Object as PropType<IImgGallery[] | string | undefined | null>,
|
||||
required: true,
|
||||
},
|
||||
directory: {
|
||||
type: String,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
components: { CMyPage },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const slide = ref(0)
|
||||
const autoplay = ref(5000)
|
||||
|
||||
return {
|
||||
tools,
|
||||
costanti,
|
||||
slide,
|
||||
autoplay,
|
||||
}
|
||||
}
|
||||
})
|
||||
30
src/components/CGalleryImages/CGalleryImages.vue
Executable file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<q-carousel
|
||||
swipeable
|
||||
animated
|
||||
:autoplay="autoplay"
|
||||
transition-prev="slide-right"
|
||||
transition-next="slide-left"
|
||||
@mouseenter="autoplay = false"
|
||||
@mouseleave="autoplay = 5000"
|
||||
:arrows="imgGallery.length > 1"
|
||||
v-model="slide"
|
||||
:thumbnails="imgGallery.length > 1"
|
||||
infinite
|
||||
>
|
||||
<q-carousel-slide
|
||||
v-for="(myimg, index) in imgGallery"
|
||||
:name="index"
|
||||
:key="index"
|
||||
:img-src="directory + '/' + myimg.imagefile"
|
||||
>
|
||||
</q-carousel-slide>
|
||||
</q-carousel>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CGalleryImages.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CGalleryImages.scss';
|
||||
</style>
|
||||
1
src/components/CGalleryImages/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CGalleryImages} from './CGalleryImages.vue'
|
||||
@@ -36,6 +36,8 @@ import { costanti } from '@costanti'
|
||||
import translate from '@/globalroutines/util'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { CMyCardPopup } from '@/components/CMyCardPopup'
|
||||
import { CMyCardGood } from '@/components/CMyCardGood'
|
||||
import { CMyCardService } from '@/components/CMyCardService'
|
||||
import { CMyCardGrpPopup } from '@/components/CMyCardGrpPopup'
|
||||
import { CMyCardCircuitPopup } from '@/components/CMyCardCircuitPopup'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -62,6 +64,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
prop_showfilter: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
hint: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -102,6 +109,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
finder_noNullFilters: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
vertical: {
|
||||
type: Number,
|
||||
required: false,
|
||||
@@ -197,6 +209,18 @@ export default defineComponent({
|
||||
return { sortBy: 'desc', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 10 }
|
||||
},
|
||||
},
|
||||
prop_SortFieldsAvailable: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
margin_right: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
defaultnewrec: {
|
||||
type: Function,
|
||||
required: false,
|
||||
@@ -246,11 +270,26 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
noaut: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
hidetitleIfEmpty: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
labelElemFind: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'elementi trovati',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
|
||||
CMyRecCircuitCard
|
||||
CMyRecCircuitCard, CMyCardService, CMyCardGood
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
@@ -277,6 +316,7 @@ export default defineComponent({
|
||||
const search = ref('')
|
||||
|
||||
const tablesel = ref('')
|
||||
const showSpin = ref(false)
|
||||
|
||||
const loading = ref(false)
|
||||
const editOn = computed({
|
||||
@@ -335,6 +375,9 @@ export default defineComponent({
|
||||
|
||||
const myvertical = ref(props.vertical)
|
||||
|
||||
const ordinam = ref('')
|
||||
const ordinam_desc = ref(false)
|
||||
|
||||
|
||||
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
|
||||
// console.log('valoriopt', item.table)
|
||||
@@ -396,6 +439,14 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => ordinam.value, (to: any, from: any) => {
|
||||
if (pagination.value.sortBy !== ordinam.value) {
|
||||
tools.setCookie('s_ordinam_' + props.prop_mytable, ordinam.value)
|
||||
// pagination.value.sortBy = getObjSort(ordinam.value, ordinam_desc.value)
|
||||
// refresh()
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => showfilter.value, (newval: any, from: any) => {
|
||||
tools.setCookie('s_adv', newval ? '1' : '0')
|
||||
})
|
||||
@@ -511,7 +562,11 @@ export default defineComponent({
|
||||
|
||||
function searchval(newval: any, table: any) {
|
||||
console.log('REFRR searchval', newval, table)
|
||||
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
||||
const myrecfilt = searchList.value.find((rec) => rec.table === table)
|
||||
let keycookie = tools.COOK_SEARCH + table
|
||||
if (myrecfilt && myrecfilt.keycookie)
|
||||
keycookie += myrecfilt.keycookie
|
||||
tools.setCookie(keycookie, newval)
|
||||
|
||||
if (table === toolsext.TABSKILLS) {
|
||||
const recSector = searchList.value.find((rec) => rec.table === 'sectors')
|
||||
@@ -570,12 +625,65 @@ export default defineComponent({
|
||||
return returnedCount
|
||||
}
|
||||
|
||||
function getOrderByField(field: string, precorder: number): number {
|
||||
if ((field === 'date_reg') || (field === 'numMembers')) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return precorder ? precorder : 1;
|
||||
}
|
||||
|
||||
function getObjSort(sortBy: any, descending: any) {
|
||||
let myobj: any = {}
|
||||
if (tools.isObject(sortBy)) {
|
||||
return sortBy
|
||||
} else if (sortBy) {
|
||||
sortBy = sortBy + ''
|
||||
descending = descending + ''
|
||||
let arrsort = (sortBy && sortBy.indexOf(',') > 0) ? sortBy.split(',') : [];
|
||||
let arrdescending = (descending && descending.lenght > 1 && descending.indexOf(',') > 0) ? descending.split(',') : [];
|
||||
if (arrsort.length > 0) {
|
||||
for (let i = 0; i < arrsort.length; i++) {
|
||||
let field = arrsort[i].trim()
|
||||
let risdesc = (tools.isArray(arrdescending) && (arrdescending.length > i)) ? parseInt(arrdescending[i].trim()) : 1;
|
||||
myobj[field] = getOrderByField(field, risdesc)
|
||||
}
|
||||
} else {
|
||||
myobj[sortBy] = getOrderByField(sortBy, descending ? -1 : 1)
|
||||
}
|
||||
}
|
||||
|
||||
return myobj
|
||||
}
|
||||
|
||||
function getNumFilterSelected(): number {
|
||||
let numfilter = 0
|
||||
|
||||
|
||||
for (const item of searchList.value) {
|
||||
if (!item.notinsearch) {
|
||||
if (item.value && item.value !== -100) {
|
||||
// console.log(item.label, item.value)
|
||||
numfilter++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return numfilter
|
||||
}
|
||||
|
||||
// emulate ajax call
|
||||
// SELECT * FROM ... WHERE...LIMIT...
|
||||
async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, sortBy: any, descending: any) {
|
||||
// console.log('fetchFromServer')
|
||||
|
||||
// console.log('sortBy', sortBy)
|
||||
let myobj: any = {}
|
||||
if (sortBy) {
|
||||
if (tools.isObject(sortBy)) {
|
||||
myobj = sortBy
|
||||
} else if (tools.isArray(sortBy)) {
|
||||
myobj = getObjSort(sortBy, descending)
|
||||
} else if (sortBy) {
|
||||
myobj = {}
|
||||
if (descending) {
|
||||
myobj[sortBy] = -1
|
||||
@@ -584,8 +692,6 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('sortBy', sortBy)
|
||||
|
||||
const filtersearch: any[] = []
|
||||
const filtersearch2: any[] = []
|
||||
const filtersearch3or: any[] = []
|
||||
@@ -809,7 +915,7 @@ export default defineComponent({
|
||||
}*/
|
||||
}
|
||||
// if ((false && nosearch && props.finder) || (props.finder_noNull && nosearch)) {
|
||||
if (props.finder_noNull && nosearch) {
|
||||
if ((props.finder_noNull || (props.finder_noNullFilters && getNumFilterSelected() === 0)) && nosearch) {
|
||||
returnedData.value = []
|
||||
returnedCount = 0
|
||||
return true
|
||||
@@ -841,10 +947,10 @@ export default defineComponent({
|
||||
// @ts-ignore
|
||||
filter_gte,
|
||||
sortBy: myobj,
|
||||
descending,
|
||||
userId: userStore.my._id,
|
||||
codeId: '',
|
||||
options: props.options,
|
||||
noaut: props.noaut,
|
||||
}
|
||||
|
||||
params.codeId = mycodeid.value
|
||||
@@ -931,10 +1037,13 @@ export default defineComponent({
|
||||
// don't forfunction to update local pagination object
|
||||
pagination.value.page = page
|
||||
pagination.value.rowsPerPage = rowsPerPage
|
||||
//pagination.value.sortBy = getObjSort(sortBy, descending)
|
||||
pagination.value.sortBy = sortBy
|
||||
ordinam.value = sortBy
|
||||
ordinam_desc.value = descending
|
||||
pagination.value.descending = descending
|
||||
|
||||
console.log('pagination', pagination)
|
||||
// console.log('pagination', pagination)
|
||||
|
||||
// ...and turn of loading indicator
|
||||
loading.value = false
|
||||
@@ -945,10 +1054,17 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function onUpdateData(index: number, myprops: any, done: any) {
|
||||
const { page, rowsPerPage, rowsNumber, sortBy, descending } = myprops.pagination
|
||||
let { page, rowsPerPage, rowsNumber, sortBy, descending } = myprops.pagination
|
||||
const myfilternow = myfilter.value
|
||||
const myfilterandnow = myfilterand.value
|
||||
|
||||
if (ordinam.value) {
|
||||
sortBy = ordinam.value
|
||||
descending = ordinam_desc.value
|
||||
}
|
||||
|
||||
sortBy = getObjSort(sortBy, descending)
|
||||
|
||||
savefilter()
|
||||
|
||||
if (!mytable.value) {
|
||||
@@ -999,7 +1115,9 @@ export default defineComponent({
|
||||
// don't forfunction to update local pagination object
|
||||
pagination.value.page = page
|
||||
pagination.value.rowsPerPage = rowsPerPage
|
||||
pagination.value.sortBy = sortBy
|
||||
pagination.value.sortBy = getObjSort(sortBy, descending)
|
||||
ordinam.value = sortBy
|
||||
ordinam_desc.value = descending
|
||||
pagination.value.descending = descending
|
||||
|
||||
// console.log('pagination', pagination)
|
||||
@@ -1391,6 +1509,17 @@ export default defineComponent({
|
||||
tablesel.value = mytable.value
|
||||
}
|
||||
|
||||
if (!shared_consts.TABLES_ORDER_DATE_UPDATED.includes(tablesel.value) &&
|
||||
!shared_consts.TABLES_ORDER_DESCR.includes(tablesel.value)) {
|
||||
console.log('get cookie)')
|
||||
let v1 = tools.getCookie('s_ordinam_' + tablesel.value, null)
|
||||
if (v1)
|
||||
ordinam.value = v1
|
||||
let v2 = tools.getCookie('s_ordinam_des_' + tablesel.value, null)
|
||||
if (v2)
|
||||
ordinam_desc.value = v2
|
||||
}
|
||||
|
||||
// console.log('2) tablesel', tablesel.value)
|
||||
|
||||
changeTable(tablesel.value)
|
||||
@@ -1650,6 +1779,10 @@ export default defineComponent({
|
||||
// console.log('REFRR - doSearch')
|
||||
refresh()
|
||||
}
|
||||
function doSort() {
|
||||
|
||||
refresh()
|
||||
}
|
||||
|
||||
function changefuncAct(newval: any) {
|
||||
if (!disabilita()) {
|
||||
@@ -2172,6 +2305,12 @@ export default defineComponent({
|
||||
showNotification,
|
||||
editOn,
|
||||
newRecordBoolOld,
|
||||
showSpin,
|
||||
userStore,
|
||||
doSort,
|
||||
ordinam,
|
||||
ordinam_desc,
|
||||
getNumFilterSelected,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div v-if="tools.isDebugOn()">
|
||||
|
||||
</div>
|
||||
<div v-if="tools.isDebugOn()"></div>
|
||||
<div :class="$q.screen.lt.sm ? `` : `q-pa-xs`" v-if="isfinishLoading">
|
||||
<q-toggle
|
||||
v-if="tools.isManager()"
|
||||
@@ -10,7 +8,11 @@
|
||||
icon="fas fa-pencil-alt"
|
||||
>
|
||||
</q-toggle>
|
||||
<div class="centermydiv q-my-sm" style="text-align: center">
|
||||
<div
|
||||
v-if="mytable && visButtRow()"
|
||||
class="centermydiv q-my-sm"
|
||||
style="text-align: center"
|
||||
>
|
||||
<q-btn
|
||||
v-if="mytable && visButtRow()"
|
||||
rounded
|
||||
@@ -26,7 +28,9 @@
|
||||
v-if="butt_modif_new || mytitle"
|
||||
:class="$q.screen.lt.sm ? `` : `q-gutter-md q-ma-xs` + ` row`"
|
||||
>
|
||||
<div class="q-table__title" style="min-width: 150px">{{ mytitle }}</div>
|
||||
<div class="q-table__title" style="min-width: 150px">
|
||||
{{ mytitle }}
|
||||
</div>
|
||||
<q-space></q-space>
|
||||
<div v-if="butt_modif_new">
|
||||
<q-btn
|
||||
@@ -46,6 +50,7 @@
|
||||
<q-btn
|
||||
v-if="mytable && labelBtnAddExtra"
|
||||
rounded
|
||||
outline
|
||||
size="md"
|
||||
color="primary"
|
||||
class="centermydiv q-mb-sm"
|
||||
@@ -73,7 +78,7 @@
|
||||
-->
|
||||
</div>
|
||||
<q-slide-transition>
|
||||
<div v-show="showfilter">
|
||||
<div v-show="showfilter || prop_showfilter">
|
||||
<div
|
||||
v-show="searchList"
|
||||
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `"
|
||||
@@ -244,7 +249,9 @@
|
||||
color="positive"
|
||||
icon="fas fa-filter"
|
||||
@click="showfilter = !showfilter"
|
||||
></q-btn>
|
||||
><q-badge v-if="getNumFilterSelected()" color="red" floating transparent> {{ getNumFilterSelected() }} </q-badge>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
dense
|
||||
color="orange"
|
||||
@@ -252,7 +259,21 @@
|
||||
@click="showNotification"
|
||||
></q-btn>
|
||||
</template>
|
||||
<template v-if="searchList && finder" v-slot:after>
|
||||
<template v-slot:after>
|
||||
<q-select
|
||||
v-if="prop_SortFieldsAvailable.length > 0"
|
||||
:behavior="'menu'"
|
||||
rounded
|
||||
outlined
|
||||
dense
|
||||
v-model="ordinam"
|
||||
:options="prop_SortFieldsAvailable"
|
||||
label="Ordinamento:"
|
||||
emit-value
|
||||
map-options
|
||||
style="min-width: 120px"
|
||||
>
|
||||
</q-select>
|
||||
<q-btn
|
||||
dense
|
||||
label=""
|
||||
@@ -294,7 +315,7 @@
|
||||
{{ pagination.rowsNumber }} elemento trovato
|
||||
</div>
|
||||
<div v-if="pagination.rowsNumber > 1 && prop_search">
|
||||
{{ pagination.rowsNumber }} elementi trovati
|
||||
{{ pagination.rowsNumber }} {{ labelElemFind }}
|
||||
</div>
|
||||
|
||||
<div v-if="choose_visutype && $q.screen.gt.xs" class="">
|
||||
@@ -384,6 +405,7 @@
|
||||
:prop_myrec="row"
|
||||
@cmdext="cmdExt"
|
||||
:editOn="editOn"
|
||||
:margin_right="margin_right"
|
||||
>
|
||||
</CMyRecCard>
|
||||
</div>
|
||||
@@ -419,16 +441,18 @@
|
||||
v-else-if="
|
||||
(showType === costanti.SHOW_GROUPINFO &&
|
||||
myvertical !== costanti.VISUTABLE_SCHEDA_GROUP) ||
|
||||
(myvertical === 2 && tablesel === 'mygroups')
|
||||
(myvertical === 2 && tablesel === 'mygroups') ||
|
||||
myvertical === costanti.VISUTABLE_GROUP_CIRCUIT
|
||||
"
|
||||
class="fill-all-width"
|
||||
>
|
||||
<div>
|
||||
<CMyGroups
|
||||
v-model="filtergrp"
|
||||
:circuitname="circuitname"
|
||||
:finder="false"
|
||||
:mygrp="row"
|
||||
:visu="costanti.FIND_GROUP"
|
||||
:visu="visufind ? visufind : costanti.FIND_GROUP"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -438,16 +462,21 @@
|
||||
"
|
||||
>
|
||||
<div class="q-pa-xs row items-start q-gutter-xs">
|
||||
<q-card
|
||||
class="my-card text-white"
|
||||
:style="
|
||||
`background: radial-gradient(circle, #cccccc 0%, ` +
|
||||
(tools.isEntrataByRecMov(row) ? `#aaffaa` : `#ffaaaa`) +
|
||||
` 100%)`
|
||||
"
|
||||
>
|
||||
<q-card class="my-card text-black">
|
||||
<q-toolbar class="bg-primary text-white" style="min-height: 30px">
|
||||
<q-toolbar-title>
|
||||
<span class="q-ma-sm">
|
||||
<q-icon
|
||||
v-if="tools.isEntrataByRecMov(row)"
|
||||
name="fas fa-box-tissue"
|
||||
color="green"
|
||||
></q-icon>
|
||||
<q-icon
|
||||
v-else
|
||||
name="fas fa-share-square"
|
||||
color="red"
|
||||
></q-icon>
|
||||
</span>
|
||||
{{
|
||||
tools.isEntrataByRecMov(row)
|
||||
? t('movement.movin')
|
||||
@@ -461,7 +490,15 @@
|
||||
v-if="
|
||||
showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true, 1, row)
|
||||
"
|
||||
class="tdclass"
|
||||
:class="
|
||||
!col.extrafield ||
|
||||
(col.extrafield &&
|
||||
(col.tipovisu !== costanti.TipoVisu.LINK ||
|
||||
(col.tipovisu === costanti.TipoVisu.LINK &&
|
||||
userStore.getImgByProfile(row, true, col))))
|
||||
? `tdclass`
|
||||
: ``
|
||||
"
|
||||
>
|
||||
<div :class="getclrow(row)">
|
||||
<CMyPopupEdit
|
||||
@@ -489,7 +526,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<template v-slot:loading>
|
||||
<div class="text-center">
|
||||
<div v-if="!hidetitleIfEmpty" class="text-center">
|
||||
<q-spinner-dots color="primary" size="40px" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -1034,7 +1071,7 @@
|
||||
</q-table>
|
||||
|
||||
<q-page-sticky
|
||||
v-if="mytable && butt_modif_new"
|
||||
v-if="mytable && butt_modif_new && !hidetitleIfEmpty"
|
||||
position="bottom-right"
|
||||
:offset="[18, 68]"
|
||||
>
|
||||
@@ -1051,8 +1088,10 @@
|
||||
<q-dialog
|
||||
v-model="visupagedialog"
|
||||
@hide="hidewindow"
|
||||
class="q-ma-sm"
|
||||
:maximized="$q.screen.lt.sm"
|
||||
>
|
||||
|
||||
<CMyCardGrpPopup
|
||||
v-if="mytable === toolsext.TABMYGROUPS"
|
||||
:table="mytable"
|
||||
@@ -1065,6 +1104,9 @@
|
||||
:prop_myrec="myrecdialog"
|
||||
>
|
||||
</CMyCardCircuitPopup>
|
||||
<CMyCardService v-else-if="shared_consts.TABLES_FAVORITE_BOOKMARK.includes(mytable)"
|
||||
:table="mytable" :prop_myrec="myrecdialog">
|
||||
</CMyCardService>
|
||||
<CMyCardPopup v-else :table="mytable" :prop_myrec="myrecdialog">
|
||||
</CMyCardPopup>
|
||||
</q-dialog>
|
||||
@@ -1131,7 +1173,7 @@
|
||||
>
|
||||
<q-card class="dialog_card">
|
||||
<q-bar dense class="bg-primary text-white">
|
||||
Nuovo:
|
||||
Nuovo {{ mytitle }}:
|
||||
<q-space />
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
@@ -1205,7 +1247,7 @@
|
||||
>
|
||||
<q-card class="dialog_card">
|
||||
<q-bar dense class="bg-primary text-white">
|
||||
Nuovo:
|
||||
Nuovo {{ mytitle }}:
|
||||
<q-space />
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
@@ -1334,7 +1376,7 @@
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<br />
|
||||
<span v-if="!hidetitleIfEmpty"> <br /></span>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./CGridTableRec.ts">
|
||||
|
||||
25
src/components/CInfoAccount/CInfoAccount.scss
Executable file
@@ -0,0 +1,25 @@
|
||||
.myflex{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.container{
|
||||
vertical-align: center;
|
||||
padding: 5px;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.element{
|
||||
font-weight: bold;
|
||||
vertical-align: center;
|
||||
padding: 5px;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
|
||||
.title_param{
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
.iconcirc {
|
||||
margin-right: 4px;
|
||||
}
|
||||
117
src/components/CInfoAccount/CInfoAccount.ts
Executable file
@@ -0,0 +1,117 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { IMyGroup, IImgGallery, IUserFields, IUserProfile, IFriends, ICircuit, IAccount } from 'model'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { CSaldo } from '@/components/CSaldo'
|
||||
import { CSendCoins } from '@/components/CSendCoins'
|
||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||
import { CCurrencyV2 } from '@/components/CCurrencyV2'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CInfoAccount',
|
||||
emits: ['setCmd'],
|
||||
components: {CUserNonVerif, CSaldo, CSendCoins, CCurrencyValue, CCurrencyV2 },
|
||||
props: {
|
||||
grp: {
|
||||
type: Object as PropType<IMyGroup>,
|
||||
required: true,
|
||||
},
|
||||
circuitname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
admin: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
account: {
|
||||
type: Object as PropType<IAccount>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, { emit }) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const $router = useRouter()
|
||||
|
||||
const myaccount = ref(<IAccount|undefined>undefined)
|
||||
|
||||
const circuitStore = useCircuitStore()
|
||||
|
||||
const table = ref(toolsext.TABMYGROUPS)
|
||||
|
||||
const circuit = ref(<ICircuit | null | undefined>null)
|
||||
|
||||
watch(() => props.grp, (newval, oldval) => {
|
||||
mounted()
|
||||
})
|
||||
|
||||
function mounted() {
|
||||
circuit.value = circuitStore.getCircuitByName(props.circuitname)
|
||||
|
||||
if (props.account) {
|
||||
myaccount.value = props.account
|
||||
} else {
|
||||
myaccount.value = props.grp.account
|
||||
}
|
||||
}
|
||||
|
||||
function getImgGroup(group: IMyGroup) {
|
||||
return userStore.getImgByGroup(group)
|
||||
}
|
||||
|
||||
function naviga(path: string) {
|
||||
$router.push(path)
|
||||
}
|
||||
|
||||
function setCmd(cmd: number, myusername: string, value: any = '') {
|
||||
emit('setCmd', cmd, myusername, value)
|
||||
}
|
||||
|
||||
function myusername() {
|
||||
return userStore.my.username
|
||||
}
|
||||
|
||||
async function save(value: any) {
|
||||
console.log('save and mounted')
|
||||
await tools.loadCircuits()
|
||||
// ricarico
|
||||
mounted()
|
||||
|
||||
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
costanti,
|
||||
getImgGroup,
|
||||
naviga,
|
||||
setCmd,
|
||||
shared_consts,
|
||||
userStore,
|
||||
tools,
|
||||
table,
|
||||
myusername,
|
||||
circuit,
|
||||
circuitStore,
|
||||
t,
|
||||
myaccount,
|
||||
save,
|
||||
}
|
||||
},
|
||||
})
|
||||
99
src/components/CInfoAccount/CInfoAccount.vue
Executable file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div v-if="myaccount && circuit">
|
||||
<q-card-section>
|
||||
<div class="text-h6">{{ t('groups.infoaccount') }}</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator />
|
||||
|
||||
<CSaldo
|
||||
v-if="tools.isUserOk() && myaccount"
|
||||
:account="myaccount"
|
||||
:symbol="circuit.symbol"
|
||||
:color="circuit.color"
|
||||
:saldo="myaccount.saldo"
|
||||
:qtarem="myaccount ? circuitStore.getRemainingCoinsToSend(myaccount) : 0"
|
||||
>
|
||||
</CSaldo>
|
||||
|
||||
<q-card-section>
|
||||
<div v-if="myaccount.date_created" class="container">
|
||||
<q-icon name="fas fa-lightbulb" class="iconcirc"></q-icon>
|
||||
{{
|
||||
$t('shared.createddate', {
|
||||
date: tools.getstrDateYY(myaccount.date_created),
|
||||
})
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
!!myaccount.date_updated &&
|
||||
tools.getstrDate(myaccount.date_updated) !==
|
||||
tools.getstrDate(myaccount.date_created)
|
||||
"
|
||||
class="container"
|
||||
>
|
||||
<q-icon name="fas fa-pencil-alt" class="iconcirc"></q-icon>
|
||||
<span class="element">{{
|
||||
$t('shared.lastmodify', {
|
||||
date: tools.getstrDateYY(myaccount.date_updated),
|
||||
})
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
<div :class="$q.screen.lt.sm ? '' : 'row'">
|
||||
<div class="sezioni">
|
||||
<CCurrencyV2
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
color_border="red"
|
||||
v-model="myaccount.fidoConcesso"
|
||||
icon="fas fa-battery-quarter"
|
||||
:label="t('circuit.fido_scoperto_default')"
|
||||
:tips="t('circuit.fido_scoperto_default_tips')"
|
||||
:paramTypeAccount="costanti.ParamTypeAccount.FIDO_CONCESSO"
|
||||
:myrecparam="myaccount"
|
||||
:admin="admin"
|
||||
@save="save"
|
||||
>
|
||||
</CCurrencyV2>
|
||||
</div>
|
||||
<div class="sezioni">
|
||||
<CCurrencyV2
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
color_border="green"
|
||||
v-model="myaccount.qta_maxConcessa"
|
||||
icon="fas fa-battery-quarter"
|
||||
:label="t('circuit.qta_max_default')"
|
||||
:tips="t('circuit.qta_max_default_tips')"
|
||||
:paramTypeAccount="costanti.ParamTypeAccount.QTA_MAXCONCESSA"
|
||||
:myrecparam="myaccount"
|
||||
:admin="admin"
|
||||
@save="save"
|
||||
>
|
||||
</CCurrencyV2>
|
||||
</div>
|
||||
<div v-if="myaccount.totTransato" class="sezioni">
|
||||
<CCurrencyValue
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
color_border="blue"
|
||||
v-model="myaccount.totTransato"
|
||||
icon="fas fa-battery-quarter"
|
||||
:label="t('circuit.totTransato')"
|
||||
:tips="t('circuit.totTransato_tips')"
|
||||
>
|
||||
</CCurrencyValue>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CInfoAccount.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CInfoAccount.scss';
|
||||
</style>
|
||||
1
src/components/CInfoAccount/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export { default as CInfoAccount } from './CInfoAccount.vue'
|
||||
@@ -1,22 +1,42 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="row q-ma-sm shadow justify-center" style="border-radius: 4px;border: 1px solid rgba(0, 0, 0, 0.12);">
|
||||
<div v-if="tools.isUserOk()">
|
||||
<div
|
||||
class="row q-ma-sm shadow justify-center"
|
||||
style="border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.12)"
|
||||
>
|
||||
<CBigBtn
|
||||
v-for="(card, ind) of cardsbig" :key="ind"
|
||||
:label="card.title" :to="card.to" :icon="card.icon" :color="card.color" :text-color="!!card.textcolor ? card.textcolor : ''"
|
||||
v-for="(card, ind) of cardsbig"
|
||||
:key="ind"
|
||||
:label="card.title"
|
||||
:to="card.to"
|
||||
:icon="card.icon"
|
||||
:color="card.color"
|
||||
:text-color="!!card.textcolor ? card.textcolor : ''"
|
||||
:small="card.small"
|
||||
:numcol="2"
|
||||
:hint="card.hint" :disable="card.disable">
|
||||
:hint="card.hint"
|
||||
:disable="card.disable"
|
||||
>
|
||||
</CBigBtn>
|
||||
</div>
|
||||
<div class="row shadow justify-center" style="border-radius: 4px;border: 1px solid rgba(0, 0, 0, 0.12);">
|
||||
<div
|
||||
class="row shadow justify-center"
|
||||
style="border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.12)"
|
||||
>
|
||||
<CBigBtn
|
||||
v-for="(card, ind) of cardssmall" :key="ind"
|
||||
v-for="(card, ind) of cardssmall"
|
||||
:key="ind"
|
||||
glossy
|
||||
:label="card.title" :to="card.to" :icon="card.icon" :color="card.color" :text-color="!!card.textcolor ? card.textcolor : ''"
|
||||
:label="card.title"
|
||||
:to="card.to"
|
||||
:icon="card.icon"
|
||||
:color="card.color"
|
||||
:text-color="!!card.textcolor ? card.textcolor : ''"
|
||||
:small="card.small"
|
||||
:numcol="3"
|
||||
:hint="card.hint" :disable="card.disable">
|
||||
:hint="card.hint"
|
||||
:disable="card.disable"
|
||||
>
|
||||
</CBigBtn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
0
src/components/CMyActivities/CMyActivities.scss
Executable file
240
src/components/CMyActivities/CMyActivities.ts
Executable file
@@ -0,0 +1,240 @@
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CLabel } from '@/components/CLabel'
|
||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { CMyGroup } from '@/components/CMyGroup'
|
||||
import { CMyCircuit } from '@/components/CMyCircuit'
|
||||
import { CContactUser } from '@src/components/CContactUser'
|
||||
import { CNotifAtTop } from '@src/components/CNotifAtTop'
|
||||
import { CTimeAgo } from '@src/components/CTimeAgo'
|
||||
import { CSendCoins } from '@/components/CSendCoins'
|
||||
import { CMyUser } from '@/components/CMyUser'
|
||||
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRoute, 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'
|
||||
import { IBookmark, ICircuit, IFavorite, IMyCircuit, IMyGroup, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
import MixinUsers from '@/mixins/mixin-users'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyActivities',
|
||||
components: {
|
||||
CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec, CMyUser,
|
||||
CMyGroup, CLabel, CMyCircuit, CSendCoins, CNotifAtTop, CCheckIfIsLogged,
|
||||
CTimeAgo, CContactUser
|
||||
},
|
||||
props: {
|
||||
},
|
||||
setup(props) {
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const $route = useRoute()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const site = ref(globalStore.site)
|
||||
|
||||
const { getRefLink } = MixinUsers()
|
||||
|
||||
const animation = ref('fade')
|
||||
const mytab = ref('my')
|
||||
|
||||
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
|
||||
const filtroutente = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
const caricato = ref(false)
|
||||
|
||||
const myuser = ref(<IUserFields | null>null)
|
||||
|
||||
const actualcard = ref('mygoods')
|
||||
|
||||
const notifStore = useNotifStore()
|
||||
|
||||
const mycards = computed(() => {
|
||||
return costanti.MAINCARDS.filter((rec: any) => rec.table)
|
||||
})
|
||||
const optionsMainCards = ref({})
|
||||
|
||||
const listgroupsfiltered = ref(<IMyGroup[]>[])
|
||||
const listcircuitsfiltered = ref(<IMyCircuit[]>[])
|
||||
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
}
|
||||
|
||||
function myusername() {
|
||||
return userStore.my.username
|
||||
}
|
||||
|
||||
async function loadProfile() {
|
||||
console.log('loadProfile...', username.value)
|
||||
try {
|
||||
// Carica il profilo di quest'utente
|
||||
if (username.value) {
|
||||
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
|
||||
// console.log('loadUserProfile = ', ris)
|
||||
myuser.value = ris
|
||||
if (myuser.value) {
|
||||
filtroutente.value = [{ userId: myuser.value._id }]
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
|
||||
try {
|
||||
listgroupsfiltered.value = globalStore.mygroups.filter((grp: IMyGroup) => myuser.value!.profile.mygroups.findIndex((rec: IMyGroup) => rec.groupname === grp.groupname) >= 0)
|
||||
} catch (e) {
|
||||
listgroupsfiltered.value = []
|
||||
}
|
||||
|
||||
try {
|
||||
listcircuitsfiltered.value = myuser.value.profile.mycircuits
|
||||
} catch (e) {
|
||||
listcircuitsfiltered.value = []
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
caricato.value = true
|
||||
|
||||
optionsMainCards.value = tools.getoptionsMainCards(true)
|
||||
} catch (e) {
|
||||
console.error('ERR loadProfile', e)
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => username.value, (to: any, from: any) => {
|
||||
loadProfile()
|
||||
})
|
||||
|
||||
watch(() => actualcard.value, (to: any, from: any) => {
|
||||
loadProfile()
|
||||
})
|
||||
|
||||
function mounted() {
|
||||
loadProfile()
|
||||
}
|
||||
|
||||
function getImgUser() {
|
||||
if (myuser.value)
|
||||
return userStore.getImgByProfile(myuser.value)
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
function checkifShow(col: string) {
|
||||
//++Todo: checkifShow Permessi !
|
||||
return true
|
||||
}
|
||||
|
||||
function getLinkUserTelegram() {
|
||||
|
||||
if (myuser.value) {
|
||||
if (!!myuser.value.profile.username_telegram) {
|
||||
return 'https://t.me/' + myuser.value.profile.username_telegram
|
||||
}
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
function getLinkWebSite() {
|
||||
if (myuser.value) {
|
||||
let site = myuser.value.profile.website!
|
||||
if (site) {
|
||||
if (!site.startsWith('http')) {
|
||||
site = 'https://' + site
|
||||
}
|
||||
}
|
||||
return site
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
function isMyRecord(username: string) {
|
||||
return username === userStore.my.username
|
||||
}
|
||||
|
||||
function getlinkpage() {
|
||||
if (myuser.value)
|
||||
return self.location.host + '/attivita/' + myuser.value.username
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
function filtrofavorite(table: string) {
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
if (myuser.value && myuser.value.profile.favorite) {
|
||||
let arrfav = myuser.value.profile.favorite.filter((rec: IBookmark) => rec.tab === tab)
|
||||
if (arrfav)
|
||||
return myuser.value.profile.favorite ? [{ _id: { $in: arrfav.map((rec: any) => rec.id) } }] : []
|
||||
}
|
||||
return []
|
||||
}
|
||||
function filtrobookmark(table: string) {
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
if (myuser.value && myuser.value.profile.bookmark) {
|
||||
let arrfav = myuser.value.profile.bookmark.filter((rec: IBookmark) => rec.tab === tab)
|
||||
if (arrfav)
|
||||
return myuser.value.profile.bookmark ? [{ _id: { $in: arrfav.map((rec: any) => rec.id) } }] : []
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
username,
|
||||
profile,
|
||||
tools,
|
||||
costanti,
|
||||
myuser,
|
||||
shared_consts,
|
||||
getImgUser,
|
||||
checkifShow,
|
||||
getLinkUserTelegram,
|
||||
getLinkWebSite,
|
||||
filtroutente,
|
||||
filtrofavorite,
|
||||
filtrobookmark,
|
||||
showPic,
|
||||
myusername,
|
||||
userStore,
|
||||
t,
|
||||
static_data,
|
||||
animation,
|
||||
isMyRecord,
|
||||
getRefLink,
|
||||
fieldsTable,
|
||||
mycards,
|
||||
actualcard,
|
||||
caricato,
|
||||
listgroupsfiltered,
|
||||
idnotif,
|
||||
site,
|
||||
listcircuitsfiltered,
|
||||
optionsMainCards,
|
||||
getlinkpage,
|
||||
mytab,
|
||||
}
|
||||
}
|
||||
})
|
||||
239
src/components/CMyActivities/CMyActivities.vue
Executable file
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="!caricato"
|
||||
class="fit column no-wrap justify-evenly items-center content-start"
|
||||
>
|
||||
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade" />
|
||||
<q-card flat bordered style="width: 250px">
|
||||
<div class="text-h6">
|
||||
<q-skeleton :animation="animation" />
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-grey text-center">
|
||||
{{ username }}
|
||||
</div>
|
||||
<div class="col-12 text-h7">
|
||||
<q-skeleton :animation="animation" />
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation" />
|
||||
</div>
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation" />
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="myuser">
|
||||
<div v-if="tools.isUserOk() || tools.isLogged()">
|
||||
<CNotifAtTop />
|
||||
</div>
|
||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||
<div
|
||||
v-if="myuser && myuser.date_reg"
|
||||
class="fit column no-wrap justify-evenly items-center content-start"
|
||||
>
|
||||
<div class="">
|
||||
<q-avatar size="140px">
|
||||
<q-img
|
||||
:src="myuser.profile ? getImgUser(myuser.profile) : ''"
|
||||
:alt="username"
|
||||
img-class="imgprofile"
|
||||
height="140px"
|
||||
@click="showPic = true"
|
||||
/>
|
||||
<q-badge
|
||||
v-if="tools.isUserOnline(myuser)"
|
||||
align="top"
|
||||
floating
|
||||
color="green"
|
||||
>online</q-badge
|
||||
>
|
||||
</q-avatar>
|
||||
</div>
|
||||
|
||||
<div class="last_access">
|
||||
OnLine: <CTimeAgo :datetime="myuser.lasttimeonline" />
|
||||
</div>
|
||||
|
||||
<div v-if="myuser.reported">
|
||||
<CTitleBanner
|
||||
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
|
||||
bgcolor="bg-red"
|
||||
clcolor="text-white"
|
||||
>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
|
||||
<div v-if="site && site.confpages && site.confpages.showNameSurname">
|
||||
<div class="text-h6">
|
||||
<span v-if="checkifShow('name') && myuser.name">
|
||||
{{ myuser.name }}</span
|
||||
>
|
||||
<span v-if="checkifShow('surname') && myuser.surname"
|
||||
> {{ myuser.surname }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ myuser.username }}
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<CContactUser :myuser="myuser" :showBtnActivities="false" />
|
||||
|
||||
<CTitleBanner
|
||||
v-if="site.confpages.showCompetenze"
|
||||
class=""
|
||||
:title="$t('profile.skills')"
|
||||
bgcolor="bg-primary"
|
||||
clcolor="text-white"
|
||||
myclass="myshad"
|
||||
:canopen="true"
|
||||
>
|
||||
<q-tabs
|
||||
v-model="mytab"
|
||||
inline-label
|
||||
dense
|
||||
class="shadow-2"
|
||||
>
|
||||
<q-tab name="my" icon="far fa-user" />
|
||||
<q-tab name="favorite" icon="favorite" content-class="text-red" />
|
||||
<q-tab name="bookmark" icon="bookmark" content-class="text-teal" />
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels
|
||||
v-model="mytab"
|
||||
animated
|
||||
swipeable
|
||||
vertical
|
||||
transition-prev="jump-up"
|
||||
transition-next="jump-up"
|
||||
>
|
||||
<q-tab-panel name="my">
|
||||
<div
|
||||
v-for="(card, ind) of mycards"
|
||||
:key="ind"
|
||||
:name="card.table"
|
||||
>
|
||||
<q-card class="q-my-md">
|
||||
<div v-if="card.table === 'mygroups'">
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(grp, index) in listgroupsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm q-mx-none"
|
||||
clickable
|
||||
>
|
||||
<CMyGroup
|
||||
:mygrp="grp"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:noaut="true"
|
||||
>
|
||||
</CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
<div v-else-if="card.table === 'circuits'">
|
||||
<div class="text-h6">{{ card.title }}</div>
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(circuit, index) in listcircuitsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm q-mx-none"
|
||||
clickable
|
||||
>
|
||||
<CMyCircuit
|
||||
:mycircuit="circuit"
|
||||
:visu="costanti.USER_CIRCUITS"
|
||||
:noaut="true"
|
||||
>
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CSkill
|
||||
:table="card.table"
|
||||
:filtercustom="filtroutente"
|
||||
:butt_modif_new="isMyRecord(myuser.username)"
|
||||
:visuinpage="true"
|
||||
:noaut="true"
|
||||
:title="card.title"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="favorite">
|
||||
<div
|
||||
v-for="(card, ind) of mycards"
|
||||
:key="ind"
|
||||
:name="card.table"
|
||||
>
|
||||
<q-card class="q-my-md">
|
||||
|
||||
<div v-if="card.showfavorite && filtrofavorite(card.table)">
|
||||
<CSkill
|
||||
:table="card.table"
|
||||
:filtercustom="filtrofavorite(card.table)"
|
||||
:butt_modif_new="false"
|
||||
:visuinpage="true"
|
||||
:noaut="false"
|
||||
:title="card.title"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="bookmark">
|
||||
<div
|
||||
v-for="(card, ind) of mycards"
|
||||
:key="ind"
|
||||
:name="card.table"
|
||||
>
|
||||
<q-card class="q-my-md">
|
||||
<div v-if="card.showfavorite && filtrobookmark(card.table)">
|
||||
<CSkill
|
||||
:table="card.table"
|
||||
:filtercustom="filtrobookmark(card.table)"
|
||||
:butt_modif_new="isMyRecord(myuser.username)"
|
||||
:visuinpage="true"
|
||||
:noaut="true"
|
||||
:title="card.title"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!tools.isLogged()">
|
||||
<CCheckIfIsLogged></CCheckIfIsLogged>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="showPic" full-height full-width>
|
||||
<img :src="getImgUser()" :alt="username" class="full-width" />
|
||||
</q-dialog>
|
||||
<q-page-sticky position="top-right" :offset="[18, 18]">
|
||||
<q-btn
|
||||
fab
|
||||
glossy
|
||||
class="semi-transparent"
|
||||
icon="fas fa-link"
|
||||
color="primary"
|
||||
@click="tools.copyToClip($q, getlinkpage(), true)"
|
||||
/>
|
||||
</q-page-sticky>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyActivities.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyActivities.scss';
|
||||
</style>
|
||||
1
src/components/CMyActivities/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMyActivities} from './CMyActivities.vue'
|
||||
@@ -61,7 +61,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec && props.idRec > 0) {
|
||||
if (props.idRec) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<div class="q-ma-sm">
|
||||
<q-btn
|
||||
v-if="myrec._id"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`" icon="fas fa-share-alt"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`" icon="fas fa-link"
|
||||
label="Condividi"
|
||||
@click="condividipag"></q-btn>
|
||||
</div>
|
||||
|
||||
127
src/components/CMyCardGood/CMyCardGood.scss
Normal file
@@ -0,0 +1,127 @@
|
||||
.profile {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
.myrow{
|
||||
display: flex;
|
||||
@media (max-width: 600px) {
|
||||
flex-flow: column;
|
||||
}
|
||||
}
|
||||
|
||||
.qualifica{
|
||||
border: solid 2px #4198ef;
|
||||
border-radius: 1rem;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
.text-bacheca{
|
||||
margin: 10px;
|
||||
border: solid 2px #4198ef;
|
||||
border-radius: 1rem;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
.note-bacheca{
|
||||
border: solid 2px #C10015;
|
||||
border-radius: 1rem;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
.img {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
max-height: 500px;
|
||||
max-width: 350px;
|
||||
@media (max-width: 500px) {
|
||||
max-height: 500px;
|
||||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
$graytext: #555;
|
||||
.cal {
|
||||
color: black;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.25rem;
|
||||
letter-spacing: 0.03333em;
|
||||
|
||||
&__title {
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
&__details {
|
||||
color: black;
|
||||
}
|
||||
|
||||
&__hours {
|
||||
color: blue;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
&__where {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;
|
||||
}
|
||||
}
|
||||
|
||||
&__when {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;;
|
||||
}
|
||||
}
|
||||
|
||||
&__teacher {
|
||||
margin-top: 5px;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;;
|
||||
}
|
||||
}
|
||||
|
||||
&__quota {
|
||||
margin-top: 5px;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&__img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
136
src/components/CMyCardGood/CMyCardGood.ts
Normal file
@@ -0,0 +1,136 @@
|
||||
import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CMyUser } from '@/components/CMyUser'
|
||||
import { CGalleryImages } from '@/components/CGalleryImages'
|
||||
import { CAccomodation } from '@/components/CAccomodation'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useCalendarStore } from '@store/CalendarStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { IColGridTable, IImgGallery, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { colCitys, fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyCardGood',
|
||||
components: { CProfile, CTitleBanner,
|
||||
CMyFieldDb, CDateTime, CMyPage, CMyFieldRec, CAccomodation,
|
||||
CMyUser, CGalleryImages },
|
||||
props: {
|
||||
table: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
prop_myrec: {
|
||||
type: Object as PropType<any>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
idRec: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0
|
||||
},
|
||||
nopopup: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const calendarStore = useCalendarStore()
|
||||
const notifStore = useNotifStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const $q = useQuasar()
|
||||
const $route = useRoute()
|
||||
const { t } = useI18n()
|
||||
|
||||
const showPic = ref(false)
|
||||
|
||||
const myrec = ref(<any>{})
|
||||
const col = ref(<IColGridTable>{})
|
||||
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
}
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
})
|
||||
|
||||
} else {
|
||||
myrec.value = props.prop_myrec
|
||||
}
|
||||
|
||||
col.value = fieldsTable.getArrColsByTable(props.table)
|
||||
}
|
||||
|
||||
watch(() => props.idRec, (to: any, from: any) => {
|
||||
load()
|
||||
})
|
||||
|
||||
function mounted() {
|
||||
load()
|
||||
}
|
||||
|
||||
function getlinkpage() {
|
||||
return self.location.host + tools.getPathByTable(props.table, myrec.value._id)
|
||||
}
|
||||
function condividipag() {
|
||||
const mystr = getlinkpage()
|
||||
tools.copyStringToClipboard($q, mystr, true)
|
||||
tools.sendMsgTelegramCmd($q, t, shared_consts.MsgTeleg.SHARE_TEXT, false, mystr)
|
||||
return true
|
||||
}
|
||||
|
||||
function showBadge() {
|
||||
if (shared_consts.TABLES_SHOW_ADTYPE.includes(props.table)) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
profile,
|
||||
tools,
|
||||
costanti,
|
||||
myrec,
|
||||
shared_consts,
|
||||
globalStore,
|
||||
showPic,
|
||||
userStore,
|
||||
t,
|
||||
fieldsTable,
|
||||
colCitys,
|
||||
toolsext,
|
||||
col,
|
||||
condividipag,
|
||||
showBadge,
|
||||
getlinkpage,
|
||||
calendarStore,
|
||||
}
|
||||
}
|
||||
})
|
||||
252
src/components/CMyCardGood/CMyCardGood.vue
Normal file
@@ -0,0 +1,252 @@
|
||||
<template>
|
||||
<div v-if="myrec._id" class="fulldiv">
|
||||
<div class="q-pa-sm row items-start q-gutter-sm full-height fulldiv">
|
||||
<q-card class="my-card fulldiv" bordered>
|
||||
<CGalleryImages
|
||||
v-if="myrec.photos.length > 0"
|
||||
:imgGallery="myrec.photos"
|
||||
:directory="'upload/' + tools.getDirectoryGall(myrec, table, '')"
|
||||
>
|
||||
</CGalleryImages>
|
||||
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
:color="userStore.isFavorite(myrec._id, table) ? 'red' : ''"
|
||||
icon="favorite"
|
||||
@click="
|
||||
userStore.setFavorite($q, t, myrec._id, toolsext.TABMYGOODS)
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
:color="userStore.isBookmarked(myrec._id, table) ? 'teal' : ''"
|
||||
icon="bookmark"
|
||||
@click="
|
||||
userStore.setBookmark($q, t, myrec._id, toolsext.TABMYGOODS)
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="share"
|
||||
@click="tools.copyToClip($q, getlinkpage(), true)"
|
||||
/>
|
||||
</q-card-actions>
|
||||
<q-separator />
|
||||
|
||||
<q-list>
|
||||
<q-item clickable>
|
||||
<q-item-section avatar>
|
||||
<div v-if="showBadge()" class="text-center">
|
||||
<q-chip
|
||||
dense
|
||||
:color="fieldsTable.getColByAdType(myrec.adType)"
|
||||
text-color="white"
|
||||
>{{
|
||||
fieldsTable.getValByTabAndId(table, 'adType', myrec.adType)
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label class="text-bold text-h7">{{
|
||||
myrec.descr
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="category" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-chip
|
||||
v-if="myrec.sectorGood && myrec.sectorGood[0].descr"
|
||||
class="glossy"
|
||||
color="blue"
|
||||
text-color="white"
|
||||
dense
|
||||
>
|
||||
<span class="cal__quota-content">{{
|
||||
myrec.sectorGood[0].descr
|
||||
}}</span>
|
||||
</q-chip>
|
||||
<q-chip
|
||||
v-if="myrec.recGood.length > 0 && myrec.recGood[0].descr"
|
||||
class="glossy"
|
||||
dense
|
||||
color="blue"
|
||||
text-color="white"
|
||||
>
|
||||
<span class="cal__quota-content">{{
|
||||
myrec.recGood[0].descr
|
||||
}}</span>
|
||||
</q-chip>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item-label v-if="myrec.note"
|
||||
><div v-html="myrec.note" class="clBorderService"></div
|
||||
></q-item-label>
|
||||
|
||||
<q-card class="my-card clBorderUser" bordered>
|
||||
<CMyUser
|
||||
:mycontact="myrec"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUser>
|
||||
</q-card>
|
||||
<q-item v-if="myrec.mycities[0].comune">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="amber" name="fas fa-map-marker-alt" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<span v-for="(city, index) in myrec.mycities" :key="index">
|
||||
<span v-if="city.comune">
|
||||
{{ city.comune }} ({{ city.prov }})</span
|
||||
><span v-if="myrec.mycities.length > 1"> - </span>
|
||||
</span>
|
||||
</q-item-label>
|
||||
<q-item-label v-if="myrec.profile.qualifica" caption>{{
|
||||
myrec.biografia
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="myrec.website">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-globe" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">
|
||||
<span v-html="tools.getlinkhref(myrec.website, 'Visita il Sito Web')"
|
||||
/></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="myrec.idContribType && myrec.idContribType.length > 0">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="green" name="fas fa-hand-holding" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<span
|
||||
v-for="(reccontr, index) in myrec.idContribType"
|
||||
:key="index"
|
||||
>
|
||||
<q-chip
|
||||
dense
|
||||
:color="calendarStore.getColByContribType(reccontr)"
|
||||
text-color="white"
|
||||
>
|
||||
{{ calendarStore.getContribtypeById(reccontr) }}
|
||||
</q-chip>
|
||||
</span>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="far fa-edit" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
><span v-if="myrec.date_updated">{{
|
||||
tools.getstrDateMonthLong(myrec.date_updated)
|
||||
}}</span
|
||||
><span v-else>{{
|
||||
tools.getstrDateMonthLong(myrec.date_created)
|
||||
}}</span></q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="false">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="red" name="local_gas_station" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label></q-item-label>
|
||||
<q-item-label caption>Fill your gas tank.</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-separator />
|
||||
<div class="q-mb-xl"></div>
|
||||
<q-card-actions
|
||||
v-if="$q.screen.gt.sm"
|
||||
class="text-center justify-center"
|
||||
>
|
||||
<q-btn
|
||||
v-if="myrec.profile.username_telegram"
|
||||
:label="$t('dialog.contact')"
|
||||
color="primary"
|
||||
icon="far fa-comment"
|
||||
target="_blank"
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
size="md"
|
||||
rounded
|
||||
:href="
|
||||
tools.isUserOk()
|
||||
? tools.getHttpForTelegram(myrec.profile.username_telegram)
|
||||
: null
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
rounded
|
||||
outline
|
||||
:label="$t('dialog.close')"
|
||||
color="primary"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
<div
|
||||
v-if="!$q.screen.gt.sm"
|
||||
class="row absolute-bottom text-shadow custom-caption q-px-md buttons_bottom"
|
||||
>
|
||||
<q-btn
|
||||
v-if="myrec.profile.username_telegram"
|
||||
:label="$t('dialog.contact')"
|
||||
color="primary"
|
||||
icon="far fa-comment"
|
||||
target="_blank"
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
size="md"
|
||||
rounded
|
||||
:href="
|
||||
tools.isUserOk()
|
||||
? tools.getHttpForTelegram(myrec.profile.username_telegram)
|
||||
: null
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
rounded
|
||||
outline
|
||||
:label="$t('dialog.close')"
|
||||
color="primary"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyCardGood.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyCardGood.scss';
|
||||
</style>
|
||||
|
||||
1
src/components/CMyCardGood/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default as CMyCardGood } from './CMyCardGood.vue'
|
||||
@@ -61,7 +61,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec && props.idRec > 0) {
|
||||
if (props.idRec) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="q-ma-sm">
|
||||
<q-btn
|
||||
v-if="myrec._id"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`" icon="fas fa-share-alt"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`" icon="fas fa-link"
|
||||
label="Condividi"
|
||||
@click="condividipag"></q-btn>
|
||||
</div>
|
||||
|
||||
@@ -34,9 +34,9 @@ export default defineComponent({
|
||||
default: null,
|
||||
},
|
||||
idRec: {
|
||||
type: Number,
|
||||
type: String,
|
||||
required: false,
|
||||
default: 0
|
||||
default: ''
|
||||
},
|
||||
nopopup: {
|
||||
type: Boolean,
|
||||
@@ -66,7 +66,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec > 0) {
|
||||
if (props.idRec) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
@@ -87,8 +87,11 @@ export default defineComponent({
|
||||
load()
|
||||
}
|
||||
|
||||
function getlinkpage() {
|
||||
return self.location.host + tools.getPathByTable(props.table, myrec.value._id)
|
||||
}
|
||||
function condividipag() {
|
||||
const mystr = self.location.host + tools.getPathByTable(props.table, myrec.value._id)
|
||||
const mystr = getlinkpage()
|
||||
tools.copyStringToClipboard($q, mystr, true)
|
||||
tools.sendMsgTelegramCmd($q, t, shared_consts.MsgTeleg.SHARE_TEXT, false, mystr)
|
||||
return true
|
||||
@@ -120,6 +123,7 @@ export default defineComponent({
|
||||
col,
|
||||
condividipag,
|
||||
showBadge,
|
||||
getlinkpage,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
|
||||
<q-card class="dialog_card q-mb-lg" v-if="myrec._id">
|
||||
<q-card class="dialog_card q-mb-lg" v-if="myrec && myrec._id">
|
||||
|
||||
<q-footer
|
||||
v-if="!nopopup"
|
||||
@@ -112,11 +112,24 @@
|
||||
<div class="q-ma-sm">
|
||||
<q-btn
|
||||
v-if="myrec._id"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`" icon="fas fa-share-alt"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`" icon="fas fa-link"
|
||||
label="Condividi"
|
||||
@click="condividipag"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<q-page-sticky
|
||||
position="top-right"
|
||||
:offset="[18, 18]"
|
||||
>
|
||||
<q-btn
|
||||
fab
|
||||
glossy
|
||||
class="semi-transparent"
|
||||
icon="fas fa-link"
|
||||
color="primary"
|
||||
@click="tools.copyToClip($q, getlinkpage(), true)"
|
||||
/>
|
||||
</q-page-sticky>
|
||||
|
||||
<br><br>
|
||||
</q-card-section>
|
||||
|
||||
127
src/components/CMyCardService/CMyCardService.scss
Normal file
@@ -0,0 +1,127 @@
|
||||
.profile {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
.myrow{
|
||||
display: flex;
|
||||
@media (max-width: 600px) {
|
||||
flex-flow: column;
|
||||
}
|
||||
}
|
||||
|
||||
.qualifica{
|
||||
border: solid 2px #4198ef;
|
||||
border-radius: 1rem;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
.text-bacheca{
|
||||
margin: 10px;
|
||||
border: solid 2px #4198ef;
|
||||
border-radius: 1rem;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
.note-bacheca{
|
||||
border: solid 2px #C10015;
|
||||
border-radius: 1rem;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
.img {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
max-height: 500px;
|
||||
max-width: 350px;
|
||||
@media (max-width: 500px) {
|
||||
max-height: 500px;
|
||||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
$graytext: #555;
|
||||
.cal {
|
||||
color: black;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.25rem;
|
||||
letter-spacing: 0.03333em;
|
||||
|
||||
&__title {
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
&__details {
|
||||
color: black;
|
||||
}
|
||||
|
||||
&__hours {
|
||||
color: blue;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
&__where {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;
|
||||
}
|
||||
}
|
||||
|
||||
&__when {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;;
|
||||
}
|
||||
}
|
||||
|
||||
&__teacher {
|
||||
margin-top: 5px;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;;
|
||||
}
|
||||
}
|
||||
|
||||
&__quota {
|
||||
margin-top: 5px;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&__img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
}
|
||||