- aggiunto note 'note_ordine_gas'
- corretto bug
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
@@ -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
|
||||
|
||||
3
src/components/CMapComuni/CMapComuni.scss
Executable file
3
src/components/CMapComuni/CMapComuni.scss
Executable file
@@ -0,0 +1,3 @@
|
||||
.map-container {
|
||||
height: 400px;
|
||||
}
|
||||
145
src/components/CMapComuni/CMapComuni.ts
Executable file
145
src/components/CMapComuni/CMapComuni.ts
Executable 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,
|
||||
}
|
||||
}
|
||||
})
|
||||
24
src/components/CMapComuni/CMapComuni.vue
Executable file
24
src/components/CMapComuni/CMapComuni.vue
Executable 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>
|
||||
1
src/components/CMapComuni/index.ts
Executable file
1
src/components/CMapComuni/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMapComuni} from './CMapComuni.vue'
|
||||
3
src/components/CMapUsers/CMapUsers.scss
Executable file
3
src/components/CMapUsers/CMapUsers.scss
Executable file
@@ -0,0 +1,3 @@
|
||||
.map-container {
|
||||
height: 400px;
|
||||
}
|
||||
146
src/components/CMapUsers/CMapUsers.ts
Executable file
146
src/components/CMapUsers/CMapUsers.ts
Executable 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,
|
||||
}
|
||||
}
|
||||
})
|
||||
44
src/components/CMapUsers/CMapUsers.vue
Executable file
44
src/components/CMapUsers/CMapUsers.vue
Executable 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>
|
||||
1
src/components/CMapUsers/index.ts
Executable file
1
src/components/CMapUsers/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMapUsers} from './CMapUsers.vue'
|
||||
@@ -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: {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -8,6 +8,7 @@ const msg_website_es = {
|
||||
products: {
|
||||
quantity: 'Quantità',
|
||||
quantityAvailable: 'Disponibili',
|
||||
stockQty: 'In Magazzino',
|
||||
weight: 'Peso',
|
||||
stars: 'Voto',
|
||||
color: 'Colore',
|
||||
|
||||
@@ -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: '',
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ function getRecordOrdersCartEmpty(): IOrderCart {
|
||||
note: '',
|
||||
note_per_gestore: '',
|
||||
note_per_admin: '',
|
||||
note_ordine_gas: '',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user