- aggiunto note 'note_ordine_gas'

- corretto bug
This commit is contained in:
Surya Paolo
2024-03-26 15:37:01 +01:00
parent 9be104f605
commit 6856c4cc8e
81 changed files with 565 additions and 214 deletions

View File

@@ -1,6 +1,6 @@
APP_VERSION="1.0.33"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
APP_ID="17"
DIRECTORY_LOCAL="newfreeplanet"
DIRECTORY_SERVER="freeplanet_serverside"
SERVERDIR_WEBSITE=""
@@ -12,7 +12,7 @@ LANG_DEFAULT="it"
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
MONGODB_HOST="https://localhost:3000"
LOGO_REG='riso-logo-full.png'
LOGO_REG='piuchebuono-logo-full.png'
TEST_NAME="Paolo"
TEST_SURNAME="Arena"
TEST_EMAIL=""

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 258 KiB

View File

@@ -16,62 +16,69 @@
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
"fix": "eslint --ext .ts,.vue --ignore-path .gitignore ./ --fix > file.out.txt",
"pwa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev -m pwa",
"pwa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=6096 DEBUG=v8:* quasar dev -m pwa",
"spa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev --debug",
"debug": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev --mode debug",
"test": "echo \"No test specified\" && exit 0",
"generate-sw": "workbox generateSW workbox-config.js"
},
"dependencies": {
"@cubejs-client/core": "^0.31.0",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-json-strings": "^7.18.6",
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
"@cubejs-client/core": "^0.35.0",
"@quasar/extras": "^1.16.9",
"@quasar/quasar-ui-qcalendar": "^4.0.0-beta.19",
"@vue-leaflet/vue-leaflet": "^0.10.1",
"@vue/compat": "^3.3.9",
"@vue/compiler-sfc": "^3.3.9",
"@vue/eslint-config-standard": "7.0.0",
"@types/leaflet": "^1.9.8",
"@vue/compat": "^3.4.21",
"@vue/compiler-sfc": "^3.4.21",
"@vue/eslint-config-standard": "^7.0.0",
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"acorn": "^8.11.2",
"acorn": "^8.11.3",
"animate.css": "^4.1.1",
"autoprefixer": "^10.4.16",
"axios": "^1.6.2",
"autoprefixer": "^10.4.19",
"axios": "^1.6.8",
"bcryptjs": "^2.4.3",
"chart.js": "^4.0.0",
"core-js": "^3.33.3",
"chart.js": "^4.4.2",
"core-js": "^3.36.1",
"crypto": "^1.0.1",
"date-fns": "^2.30.0",
"dotenv": "^16.3.1",
"echarts": "5.4.2",
"crypto-browserify": "^3.12.0",
"date-fns": "^3.6.0",
"dotenv": "^16.4.5",
"echarts": "5.5.0",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-quasar": "^1.1.0",
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6",
"gsap": "^3.12.3",
"gsap": "^3.12.5",
"jquery": "^3.7.1",
"js-cookie": "^3.0.5",
"leaflet": "^1.9.4",
"leaflet.markercluster": "^1.5.3",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"normalize.css": "^8.0.1",
"npm": "^10.2.4",
"npm": "^10.5.0",
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"prerender-spa-plugin": "^3.4.0",
"quasar": "^2.12.07",
"quasar": "^2.15.1",
"quasar-extras": "^2.0.9",
"register-service-worker": "^1.7.2",
"typescript-eslint": "^0.0.1-alpha.0",
"vee-validate": "^4.12.2",
"vue": "^3.3.9",
"typescript-eslint": "^7.3.1",
"vee-validate": "^4.12.6",
"vue": "^3.4.21",
"vue-class-component": "^8.0.0-rc.1",
"vue-country-code": "^1.1.3",
"vue-echarts": "^6.6.1",
"vue-i18n": "^9.8.0",
"vue-echarts": "^6.6.9",
"vue-i18n": "^9.10.2",
"vue-idb": "^0.2.0",
"vue-image-zoomer": "^2.2.3",
"vue-loader": "^17.3.1",
"vue-loader": "^17.4.2",
"vue-property-decorator": "^10.0.0-rc.3",
"vue-router": "^4.2.5",
"vue-router": "^4.3.0",
"vue-scroll-reveal": "^2.1.0",
"vue-social-sharing": "^4.0.0-alpha4",
"vue-svgicon": "^4.0.0-alpha.3",
@@ -82,46 +89,44 @@
"vuex-router-sync": "^6.0.0-rc.1"
},
"devDependencies": {
"@quasar/app-webpack": "^3.12.3",
"@babel/core": "^7.24.3",
"@quasar/app-webpack": "^3.12.4",
"@types/bcryptjs": "^2.4.6",
"@types/dotenv": "^8.2.0",
"@types/googlemaps": "^3.43.3",
"@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.16",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.2",
"@types/jest": "^29.5.12",
"@types/js-cookie": "^3.0.6",
"@types/node": "20.11.30",
"@types/nprogress": "^0.2.3",
"@types/vue-tel-input": "^2.1.6",
"@types/vuelidate": "^0.7.21",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.19.2",
"eslint-plugin-vue": "^8.7.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.3",
"html-webpack-plugin": "^5.6.0",
"http-proxy-middleware": "^2.0.6",
"jest": "^29.7.0",
"json-loader": "^0.5.7",
"node-sass": "^9.0.0",
"npm-check-updates": "^16.14.11",
"npm-check-updates": "^16.14.17",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"parcel": "^2.6.2",
"postcss": "^8.4.31",
"postcss-loader": "^7.3.3",
"sass-loader": "^13.3.2",
"parcel": "^2.12.0",
"postcss": "^8.4.38",
"postcss-loader": "^8.1.1",
"sass-loader": "^14.1.1",
"strip-ansi": "=7.1.0",
"ts-jest": "^29.1.1",
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
"tslint": "^6.1.3",
"tslint-config-standard": "^9.0.0",
"tslint-loader": "^3.5.4",
"typescript": "^5.3.2",
"typescript": "5.3.2",
"vue-cli-plugin-element-ui": "^1.1.4",
"vueify": "^9.4.1",
"webpack": "^5.89.0",
"webpack": "^5.91.0",
"workbox-webpack-plugin": "^6.5.4"
},
"browser": {

View File

@@ -1 +1 @@
TERMINA DI LAVORARE SU piuchebuono.app: (Sovrascrivo !)
TERMINA DI LAVORARE SU riso.app: (Sovrascrivo !)

View File

@@ -1,8 +1,8 @@
{
"name": "riso",
"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",
"name": "piuchebuono",
"version": "2.0.1",
"description": "PiuCheBuono",
"productName": "PiuCheBuono",
"author": "Paolo Arena",
"private": true,
"keywords": [],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

BIN
public/images/foto1.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 87 KiB

BIN
public/images/foto2.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 140 KiB

BIN
public/images/foto3.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
public/images/noi4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -94,6 +94,7 @@ module.exports = configure((ctx) => ({
transpileDependencies: [
/quasar-ui-qcalendar[\\/]src/
],
devtool: 'source-map',
chainWebpack(chain, { isServer, isClient }) {
chain.resolve.alias
@@ -147,9 +148,8 @@ module.exports = configure((ctx) => ({
},
devServer: {
https: false,
port: 8084,
port: 8088,
open: false, // opens browser window automatically
hot: false, // Disable hot module replacement
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
@@ -295,8 +295,8 @@ module.exports = configure((ctx) => ({
workboxPluginMode: 'InjectManifest', // 'GenerateSW' or 'InjectManifest'
workboxOptions: {}, // only for GenerateSW
extendGenerateSWOptions(cfg) {
cfg.skipWaiting = false
cfg.clientsClaim = false
cfg.skipWaiting = true
cfg.clientsClaim = true
},
// for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts])
// if using workbox in InjectManifest mode
@@ -306,9 +306,9 @@ module.exports = configure((ctx) => ({
},
manifest: {
name: 'Riso',
short_name: 'Riso',
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.',
name: 'Più che Buono',
short_name: 'PiuCheBuono',
description: 'PiuCheBuono è un GAS e Bottega',
display: 'standalone',
orientation: 'portrait',
background_color: '#fff',
@@ -318,54 +318,54 @@ module.exports = configure((ctx) => ({
start_url: "/?homescreen=1",
icons: [
{
src: 'images/riso-android-icon-512x512.png',
src: 'images/pcb-android-icon-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'images/riso-android-icon-384x384.png',
src: 'images/pcb-android-icon-384x384.png',
sizes: '384x384',
type: 'image/png',
},
{
src: 'images/riso-android-icon-192x192.png',
src: 'images/pcb-android-icon-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'images/riso-android-icon-144x144.png',
src: 'images/pcb-android-icon-144x144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: 'images/riso-android-icon-96x96.png',
src: 'images/pcb-android-icon-96x96.png',
sizes: '96x96',
type: 'image/png',
},
{
src: 'images/riso-apple-icon-120x120.png',
src: 'images/pcb-apple-icon-120x120.png',
sizes: '120x120',
type: 'image/png',
},
{
src: 'images/riso-apple-icon-144x144.png',
src: 'images/pcb-apple-icon-144x144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: 'images/riso-apple-icon-152x152.png',
src: 'images/pcb-apple-icon-152x152.png',
sizes: '152x152',
type: 'image/png',
},
{
src: 'images/riso-apple-icon-180x180.png',
src: 'images/pcb-apple-icon-180x180.png',
sizes: '180x180',
type: 'image/png',
},
],
related_applications: [{
"platform": "webapp",
"url": "https://www.riso.app/manifest.json"
"url": "https://www.piuchebuono.app/manifest.json"
}]
},
},
@@ -400,7 +400,7 @@ module.exports = configure((ctx) => ({
builder: {
// https://www.electron.build/configuration/configuration
appId: 'Riso',
appId: 'PiuCheBuono',
},
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain

View File

@@ -5,4 +5,21 @@ $heightBtn: 100%;
}
.insert{
cursor:pointer;
}
.note_ordine_gas{
margin: 5px;
border: 1px solid #007bff; /* Un bordo solido blu */
background-color: #e9f5ff; /* Un colore di sfondo leggermente blu */
border-radius: 8px; /* Angoli arrotondati per un aspetto moderno */
padding: 20px; /* Spaziatura all'interno del box */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Una leggera ombreggiatura per farlo "sollevare" */
color: #333; /* Colore del testo scuro per alta leggibilità */
margin: 20px 0; /* Margine sopra e sotto per distanziarlo da altri contenuti */
font-size: 16px; /* Dimensione del testo */
}
.strong {
color: #d9534f; /* Rosso */
font-weight: bold; /* Testo in grassetto */
}

View File

@@ -35,6 +35,13 @@
@input="change_field('note')"
>
</q-input>
<div
v-if="recOrderCart.note_ordine_gas"
class="note_ordine_gas"
v-html="recOrderCart.note_ordine_gas"
>
</div>
</div>
<div class="text-center">
<q-btn

View File

@@ -0,0 +1,3 @@
.map-container {
height: 400px;
}

View File

@@ -0,0 +1,145 @@
import { tools } from '@store/Modules/tools'
import { useQuasar } from 'quasar'
import { PropType, defineComponent, onMounted, ref, computed } from 'vue'
import 'leaflet/dist/leaflet.css'
// @ts-ignore
import * as L from 'leaflet'
import 'leaflet.markercluster/dist/MarkerCluster.css'
import 'leaflet.markercluster/dist/MarkerCluster.Default.css'
import 'leaflet.markercluster'
// import comuniData from './comuni-data.geojson';
import { useUserStore } from '@src/store/UserStore'
export default defineComponent({
name: 'CMapComuni',
setup(props, { emit }) {
const $q = useQuasar()
const userStore = useUserStore()
const iconWidth = ref(25)
const iconHeight = ref(40)
const map = ref(<any>null)
const zoom = ref(6)
const arrprovince = ref(<any>[])
const comuniData = ref('')
const initialMap = ref(<any>null);
const myIcon = L.icon({
iconUrl: 'images/icon.png',
iconSize: [30, 30],
iconAnchor: [22, 35],
popupAnchor: [-6, -36],
shadowUrl: 'images/marker-shadow.png',
shadowSize: [60, 30],
shadowAnchor: [22, 35]
});
function mywidth() {
return tools.getwidth($q) - 20
}
function myheight() {
return $q.screen.height - 50
}
const iconSize = computed(() => {
return [iconWidth.value, iconHeight.value];
})
function changeIcon() {
iconWidth.value += 2;
if (iconWidth.value > iconHeight.value) {
iconWidth.value = Math.floor(iconHeight.value / 2);
}
}
function getColor(d: any) {
return d > 1000 ? '#800026' :
d > 500 ? '#BD0026' :
d > 200 ? '#E31A1C' :
d > 100 ? '#FC4E2A' :
d > 50 ? '#FD8D3C' :
d > 20 ? '#FEB24C' :
d > 10 ? '#FED976' :
'#FFEDA0';
}
function styleFunction(feature: any) {
// Qui verrà implementata la logica per determinare il colore basato sul numero di utenti
// esempio semplice:
const userCount = getUserCountForComune(feature.properties.NOME_COM); // Assicurati di implementare getUserCountForComune
const density = userCount / feature.properties.area; // supponendo che 'area' sia un campo esistente
return {
fillColor: getColor(density),
weight: 2,
opacity: 1,
color: 'white',
fillOpacity: 0.7
};
}
function getUserCountForComune(comuneName: string) {
// Implementa questa funzione per ottenere il numero di utenti per il dato comune
// Si può utilizzare una richiesta a un API o una mappa locale, a seconda di come sono archiviati i dati
const trovataprov = arrprovince.value.find((prov: any) => prov.descr === comuneName)
if (trovataprov) {
return trovataprov.userCount
}
return 0; // stub, implementazione di esempio
}
onMounted(async () => {
// Ottengo la lista degli utenti con i lat e long
arrprovince.value = await userStore.getProvincesForMap()
initialMap.value = L.map('map',
{
zoomControl: true, zoom: zoom.value, zoomAnimation: false,
fadeAnimation: true, markerZoomAnimation: true,
center: [42.71, 12.934],
}
);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 13,
attribution: ''
}).addTo(initialMap.value);
});
function log(str: string) {
console.log(str)
}
function getCoordinates(e: any) {
// Ottieni la latitudine e la longitudine dal click
const lat = e.latlng.lat
const lng = e.latlng.lng
// Fai qualcosa con le coordinate, ad esempio stamparle in console
console.log(`Latitudine: ${lat}, Longitudine: ${lng}`)
}
return {
mywidth,
myheight,
map,
iconWidth,
iconHeight,
iconSize,
changeIcon,
zoom,
log,
styleFunction,
getCoordinates,
arrprovince,
comuniData,
}
}
})

View File

@@ -0,0 +1,24 @@
<template>
<div>
comuniData: {{comuniData}}
<div
v-if="arrprovince"
id="map"
:style="`height:${myheight()}px; width:99%`"
>
<l-map :zoom="zoom" :center="center">
<l-tile-layer :url="url"></l-tile-layer>
<l-geo-json
:geojson="comuniData"
:options="{ style: styleFunction }"
></l-geo-json>
</l-map>
</div>
</div>
</template>
<script lang="ts" src="./CMapComuni.ts">
</script>
<style lang="scss" scoped>
@import './CMapComuni.scss';
</style>

View File

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

View File

@@ -0,0 +1,3 @@
.map-container {
height: 400px;
}

View File

@@ -0,0 +1,146 @@
import { tools } from '@store/Modules/tools'
import { useQuasar } from 'quasar'
import { PropType, defineComponent, onMounted, ref, computed } from 'vue'
import 'leaflet/dist/leaflet.css'
// @ts-ignore
import * as L from 'leaflet'
import 'leaflet.markercluster/dist/MarkerCluster.css'
import 'leaflet.markercluster/dist/MarkerCluster.Default.css'
import 'leaflet.markercluster'
import { useUserStore } from '@src/store/UserStore'
export default defineComponent({
name: 'CMapUsers',
setup(props, { emit }) {
const $q = useQuasar()
const userStore = useUserStore()
const iconWidth = ref(25)
const iconHeight = ref(40)
const map = ref(<any>null)
const zoom = ref(6)
const arrprovince = ref(<any>[])
const initialMap = ref(<any>null);
const myIcon = L.icon({
iconUrl: 'images/icon.png',
iconSize: [30, 30],
iconAnchor: [22, 35],
popupAnchor: [-6, -36],
shadowUrl: 'images/marker-shadow.png',
shadowSize: [60, 30],
shadowAnchor: [22, 35]
});
function mywidth() {
return tools.getwidth($q) - 20
}
function myheight() {
return $q.screen.height - 50
}
const iconUrl = computed(() => {
return `https://placekitten.com/${iconWidth.value}/${iconHeight.value}`;
})
const iconSize = computed(() => {
return [iconWidth.value, iconHeight.value];
})
function changeIcon() {
iconWidth.value += 2;
if (iconWidth.value > iconHeight.value) {
iconWidth.value = Math.floor(iconHeight.value / 2);
}
}
function getColor(d: any) {
return d > 1000 ? '#800026' :
d > 500 ? '#BD0026' :
d > 200 ? '#E31A1C' :
d > 100 ? '#FC4E2A' :
d > 50 ? '#FD8D3C' :
d > 20 ? '#FEB24C' :
d > 10 ? '#FED976' :
'#FFEDA0';
}
function style(feature: any) {
return {
fillColor: getColor(feature.properties.density),
weight: 2,
opacity: 1,
color: 'white',
dashArray: '3',
fillOpacity: 0.7
};
}
onMounted(async () => {
// Ottengo la lista degli utenti con i lat e long
arrprovince.value = await userStore.getProvincesForMap()
initialMap.value = L.map('map',
{
zoomControl: true, zoom: zoom.value, zoomAnimation: false,
fadeAnimation: true, markerZoomAnimation: true,
center: [42.71, 12.934],
}
);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 13,
attribution: ''
}).addTo(initialMap.value);
// @ts-ignore
const markers = L.markerClusterGroup();
for (const provincia of arrprovince.value) {
if (provincia.lat && provincia.long && provincia.userCount > 1) {
// @ts-ignore
let each_marker = new L.marker(
[provincia.lat, provincia.long], { icon: myIcon })
.bindPopup(`<strong> ${provincia.descr}:
${provincia.userCount} utenti </strong>`);
markers.addLayer(each_marker);
}
}
initialMap.value.addLayer(markers);
});
function log(str: string) {
console.log(str)
}
function getCoordinates(e: any) {
// Ottieni la latitudine e la longitudine dal click
const lat = e.latlng.lat
const lng = e.latlng.lng
// Fai qualcosa con le coordinate, ad esempio stamparle in console
console.log(`Latitudine: ${lat}, Longitudine: ${lng}`)
}
return {
mywidth,
myheight,
map,
iconWidth,
iconHeight,
iconUrl,
iconSize,
changeIcon,
zoom,
log,
getCoordinates,
arrprovince,
}
}
})

View File

@@ -0,0 +1,44 @@
<template>
<div>
<div v-if="arrprovince" id="map" :style="`height:${myheight()}px; width:99%`">
</div>
<!--
<div :style="`height:${myheight()}px; width:99%`">
<l-map
v-model="zoom"
v-model:zoom="zoom"
:center="[42.71, 12.934]"
@move="log('move')"
@click="getCoordinates"
>
<l-tile-layer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
></l-tile-layer>
<l-control-layers />
<span v-for="provincia in arrprovince" :key="provincia.nome">
<l-marker-cluster :options="clusterOptions">
<l-marker
v-if="provincia.userCount > 0"
:lat-lng="[provincia.lat, provincia.long]"
>
<l-popup
>{{ provincia.descr }}:
{{ provincia.userCount }} utenti</l-popup
>
</l-marker>
</l-marker-cluster>
</span>
</l-map>
<button @click="changeIcon">New kitten icon</button>
</div>
-->
</div>
</template>
<script lang="ts" src="./CMapUsers.ts">
</script>
<style lang="scss" scoped>
@import './CMapUsers.scss';
</style>

View File

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

View File

@@ -17,8 +17,8 @@ import { CECommerce } from '@/components/CECommerce'
import { CAITools } from '@/components/CAITools'
import { CCatalogo } from '@/components/CCatalogo'
// import { CMapMarker } from '@src/components/CMapMarker.off'
// import { CMapUsers } from '@/components/CMapUsers'
// import { CMapComuni } from '@/components/CMapComuni'
import { CMapUsers } from '@/components/CMapUsers'
import { CMapComuni } from '@/components/CMapComuni'
import { COpenStreetMap } from '@src/components/COpenStreetMap'
import { CCardCarousel } from '@src/components/CCardCarousel'
import { CMyPage } from '@src/components/CMyPage'
@@ -60,7 +60,8 @@ export default defineComponent({
CMyProfileTutorial, CSendRISTo,
CTitleBanner, CShareSocial, CCheckAppRunning, CRegistration,
CVisuVideoPromoAndPDF, CECommerce, CCatalogo, CAITools,
// CMapUsers, CMapComuni, //CMapMarker,
CMapComuni, CMapUsers,
// , //CMapMarker,
},
emits: ['selElemClick'],
props: {

View File

@@ -565,13 +565,13 @@
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPAUTENTI">
<div v-if="editOn" class="elemEdit">MAPPA UTENTI:</div>
<!--<CMapUsers
></CMapUsers>-->
<CMapUsers
></CMapUsers>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPACOMUNI">
<div v-if="editOn" class="elemEdit">MAPPA COMUNI:</div>
<!--<CMapComuni
></CMapComuni>-->
<CMapComuni
></CMapComuni>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.TOOLSAI">
<div v-if="editOn" class="elemEdit">STRUMENTI AI:</div>

View File

@@ -300,9 +300,9 @@
</div>
</q-card-section>
<q-card-section
v-if="complete && myproduct.producer && myproduct.producer.city"
v-if="complete && myproduct.producer"
>
<div>
<div v-if="myproduct.producer.city">
<div class="text-grey text-title row items-center q-mt-sm">
<q-icon name="map" class="q-mr-xs" />
{{ t('products.origine') }}:
@@ -325,7 +325,7 @@
</div>
</q-card-section>
<q-card-section v-if="myproduct.note" class="q-pa-none">
<q-card-section v-if="myproduct.productInfo.note" class="q-pa-none">
<q-item>
<q-item-section avatar>
<q-icon color="black" name="fas fa-book" />
@@ -334,17 +334,20 @@
<q-item-section>
<q-item-label class="">
<CMyValueDb
v-if="editOn"
title=""
:editOn="editOn"
table="products"
:id="myproduct._id"
:rec="myproduct"
table="productinfos"
:id="myproduct.productInfo._id"
:rec="myproduct.productInfo"
mykey="note"
debounce="1000"
:save="updateproductmodif()"
:type="costanti.FieldType.string"
>
</CMyValueDb>
<div v-if="!editOn" v-html="myproduct.productInfo.note">
</div>
</q-item-label>
</q-item-section>
</q-item>

View File

@@ -8,6 +8,8 @@ const msg_website_enUs = {
products: {
quantity: 'Quantità',
quantityAvailable: 'Disponibili',
stockQty: 'In Magazzino',
stockBloccatiQty: 'Bloccati In Magazzino',
weight: 'Peso',
stars: 'Voto',
color: 'Colore',
@@ -36,6 +38,7 @@ const msg_website_enUs = {
productslist: 'Lista Prodotti',
collabora: 'Collabora',
storehouses: 'Magazzino',
providers: 'Fornitori',
departments: 'Uffici',
orders: 'Ordini Ricevuti',
orders2: 'Ordini Ricevuti',

View File

@@ -8,6 +8,7 @@ const msg_website_es = {
products: {
quantity: 'Quantità',
quantityAvailable: 'Disponibili',
stockQty: 'In Magazzino',
weight: 'Peso',
stars: 'Voto',
color: 'Colore',

View File

@@ -1,9 +1,9 @@
const msg_website_it = {
ws: {
sitename: 'Riso',
siteshortname: 'RISO',
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.',
keywords: 'riso, piattaforma di scambio, rete italiana scambio orizzontale, riso app, riso piattaforma, scambio e baratto, momenta RIS',
sitename: 'Più che Buono',
siteshortname: 'Più che Buono',
description: '',
keywords: '',
},
hours: {
descr: 'Descrizione',
@@ -16,23 +16,35 @@ const msg_website_it = {
pages: {
home: 'Home',
profile: 'Profilo',
install_site: 'Installa Sito',
profile2: 'ProfiloU',
mypage2: 'mypage2',
myservice2: 'myservice2',
myhosps2: 'myhosps2',
mygood2: 'mygood2',
catalogo: 'Catalogo',
fundraising: 'Sostieni il Progetto',
notifs: 'Configura le Notifiche',
unsubscribe: 'Disiscriviti',
unsubscribe_user: 'Disiscriviti User',
test: 'Test',
projects: 'Progetti',
report: 'Report Ore',
producer: 'Produttore',
orderinfo: 'Ordini Effettuati',
products: 'Prodotti',
cash: 'Cassa',
productInfos: 'Info Prodotti',
listinoprodotti: 'Listino Prodotti',
productslist: 'Lista Prodotti',
collabora: 'Collabora',
categories: 'Categorie',
storehouses: 'Magazzino',
providers: 'Fornitori',
catprods: 'Categorie',
subcatprods: 'Sotto-Categorie',
gasordine: 'Gas Ordine',
scontisticas: 'Scontistica',
departments: 'Uffici',
orders: 'Ordini Ricevuti',
orders2: 'Ordini Ricevuti',
@@ -121,9 +133,11 @@ const msg_website_it = {
only_residenti: 'Solo Residenti',
only_consiglio: 'Solo Consiglieri',
color: 'Colore',
gasordini: 'Gas Ordini',
gestoreordini: 'Gestore Ordini',
},
msg: {
myAppName: 'Riso',
myAppName: 'Più che Buono',
myAppDescription: 'Il primo Vero Social Libero, Equo e Solidale, dove Vive Consapevolezza e Aiuto Comunitario. Gratuito',
underconstruction: 'App in costruzione...',
myDescriz: '',

View File

@@ -7,30 +7,6 @@ import {
import { func } from '@store/Modules/fieldsTable'
// const SHOW_PROJINTHEMENU = false
//
// let arrlistafavourite = []
// let arrlistaprojtutti = []
// let arrlistaprojmiei = []
// if (SHOW_PROJINTHEMENU) {
// arrlistaprojtutti = Projects.getters.listaprojects(RouteNames.projectsall)
// arrlistaprojmiei = Projects.getters.listaprojects(RouteNames.myprojects)
// arrlistafavourite = Projects.getters.listaprojects(RouteNames.favouriteprojects)
// }
// PROGETTI -> FAVORITI :
// if (arrlistafavourite.length > 0) {
// arrMenu.push({
// icon: 'favorite_border',
// nametranslate: 'pages.' + RouteNames.favouriteprojects,
// urlroute: RouteNames.favouriteprojects,
// level_parent: 0.0,
// level_child: 0.5,
// routes2: arrlistafavourite,
// idelem: ''
// })
// }
const firstPage = {
active: true,
order: 5,
@@ -57,72 +33,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
inmenu: true,
infooter: true,
},
{
active: true,
order: 400,
path: '/test',
materialIcon: 'fas fa-test',
name: 'mypages.test',
component: () => import('@/views/testServer/testServer.vue'),
inmenu: false,
infooter: false,
},
{
active: true,
order: 12,
path: '/goods',
materialIcon: 'fas fa-tshirt',
name: 'mypages.goods',
component: () => import('@/root/goods/goods.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
active: true,
order: 15,
path: '/services',
materialIcon: 'fas fa-house-user',
name: 'mypages.services',
component: () => import('@/root/services/services.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
active: true,
order: 15,
path: '/provapao',
materialIcon: 'fas fa-house-user',
name: 'mypages.provapao',
component: () => import('@/root/provapao/provapao.vue'),
meta: { requiresAuth: true },
inmenu: false,
infooter: false,
},
{
active: true,
order: 15,
path: '/hosps',
materialIcon: 'fas fa-bed',
name: 'mypages.hosp',
component: () => import('@/root/hosp/hosp.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
active: site.confpages && site.confpages.enableCircuits,
order: 16,
path: '/circuits',
materialIcon: 'fas fa-coins',
name: 'mypages.circuits',
component: () => import('@/views/user/mycircuits/mycircuits.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
/*{
active: true,
order: 20,
path: '/events',
@@ -132,6 +43,17 @@ function getDynamicPages(site: ISites): IListRoutes[] {
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},*/
{
active: site.confpages && site.confpages.showProfile,
order: 120,
path: '/myprofile',
materialIcon: 'fas fa-user',
name: 'pages.profile',
component: () => import('@/views/user/myprofile/myprofile.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
active: true,
@@ -145,18 +67,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
infooter: false,
},
{
active: true,
order: 120,
path: '/myprofile',
materialIcon: 'fas fa-user',
name: 'pages.profile',
component: () => import('@/views/user/myprofile/myprofile.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
active: true,
active: site.confpages && site.confpages.showProfile,
order: 120,
path: '/editprofile',
materialIcon: 'fas fa-user',
@@ -167,7 +78,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
infooter: false,
},
{
active: true,
active: site.confpages && site.confpages.showiscrittiMenu,
order: 130,
path: '/friends',
materialIcon: 'fas fa-user-friends',
@@ -177,6 +88,19 @@ function getDynamicPages(site: ISites): IListRoutes[] {
inmenu: true,
infooter: true,
},
{
active: site.confpages && site.confpages.enableCircuits,
order: 16,
path: '/circuits',
materialIcon: 'fas fa-coins',
name: 'mypages.circuits',
component: () => import('@/views/user/mycircuits/mycircuits.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
onlyAdmin: true,
onlyManager: true,
},
{
active: site.confpages && site.confpages.enableGroups,
order: 132,
@@ -187,6 +111,8 @@ function getDynamicPages(site: ISites): IListRoutes[] {
meta: { requiresAuth: true },
inmenu: true,
infooter: false,
onlyAdmin: true,
onlyManager: true,
},
{
active: true,

View File

@@ -213,6 +213,7 @@ export interface IGasordine {
referent?: string,
city?: string,
img?: string,
note_ordine_gas?: string
dataora_chiusura_ordini?: Date,
data_arrivo_merce?: Date,
dataora_ritiro?: Date,
@@ -271,6 +272,7 @@ export interface IOrderCart {
note: string
note_per_gestore: string
note_per_admin: string
note_ordine_gas: string
}
export interface IShareWithUs {

View File

@@ -1739,6 +1739,7 @@ const msg_it = {
gas: {
name: 'Ordine Gas',
dataora_chiusura_ordini: 'Chiusura Ordini',
note_ordine_gas: 'Note Ordine GAS',
data_arrivo_merce: 'Arrivo Merce',
dataora_ritiro: 'Ritiro dal',
ordina_sul_gas: 'Gruppo di Acquisto',

View File

@@ -513,6 +513,7 @@ export const colTableGasordine = [
AddCol({ name: 'city', label_trans: 'store.city' }),
AddCol({ name: 'img', label_trans: 'store.img' }),
AddCol({ name: 'dataora_chiusura_ordini', label_trans: 'gas.dataora_chiusura_ordini', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'note_ordine_gas', label_trans: 'gas.note_ordine_gas', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'data_arrivo_merce', label_trans: 'gas.data_arrivo_merce', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'dataora_ritiro', label_trans: 'gas.dataora_ritiro', fieldtype: costanti.FieldType.date }),
AddCol(DeleteRec),

View File

@@ -4270,7 +4270,7 @@ export const tools = {
getCookie(mytok: any, def?: any, convertint: any = false, convertbool: any = false) {
const ris = Cookies.get(mytok)
console.log('getCookie', mytok, ris)
// console.log('getCookie', mytok, ris)
if (ris === 'null')
return def

View File

@@ -32,6 +32,7 @@ function getRecordOrdersCartEmpty(): IOrderCart {
note: '',
note_per_gestore: '',
note_per_admin: '',
note_ordine_gas: '',
}
}

View File

@@ -67,7 +67,7 @@ export default defineComponent({
watch(() => cat.value, (newval, oldval) => {
calcArrProducts()
})
watch(() => idGasSel.value, (newval, oldval) => {
calcArrProducts()
})
@@ -88,7 +88,7 @@ export default defineComponent({
function calcArrProducts() {
// console.log('calcArrProducts')
refreshpage.value = true
let arrprod = productStore.getProducts(cosa.value)
let catstr = cat.value;
@@ -102,22 +102,24 @@ export default defineComponent({
} else {
arrprod = arrprod.filter((product: IProduct) => {
let lowerName = product.productInfo.name!.toLowerCase();
let hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
if (product && product.productInfo) {
let lowerName = product.productInfo.name!.toLowerCase();
let hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
let productgassel = true
if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) {
productgassel = (product.idGasordine === gasselstr)
let productgassel = true
if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) {
productgassel = (product.idGasordine === gasselstr)
}
// Use a regular expression to match whole words
let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
let nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i');
// Check if any word in lowerName starts with lowerSearchText
let anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria && productgassel;
}
// Use a regular expression to match whole words
let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
let nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i');
// Check if any word in lowerName starts with lowerSearchText
let anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria && productgassel;
});
}
@@ -176,7 +178,7 @@ export default defineComponent({
return riscat
}
function onLoadScroll(index: number, done: any) {
if (index >= 1) {
@@ -184,7 +186,7 @@ export default defineComponent({
const step = 10
let mynrec = numRecLoaded.value + step
if (mynrec > arrProducts.value.length)
mynrec = arrProducts.value.length

View File

@@ -100,7 +100,7 @@
<q-btn
push
dense
:size="tools.isMobile() ? '1rem' : '1.25rem'"
:size="tools.isMobile() ? '0.9rem' : '1.05rem'"
:color="idGasSel === recgas._id ? 'primary' : undefined"
:text-color="idGasSel === recgas._id ? 'white' : 'black'"
:label="recgas.name"