- Creazione "AbitareGliIblei"

- Mappa Interattiva con i markers
This commit is contained in:
Surya Paolo
2024-07-31 15:02:30 +02:00
parent 3ab18b591f
commit 822585cf33
252 changed files with 3600294 additions and 4300 deletions

View File

@@ -262,7 +262,7 @@ export const costanti = {
small: true,
table: '',
},
/*{
{
visible: false,
title: ' Attività ',
subtitle: 'Artigiani, Aziende, Società, Negozi',
@@ -275,7 +275,7 @@ export const costanti = {
visuonstat: true,
small: false,
showfavorite: true,
},*/
},
],
GROUPCARDS: [
@@ -409,6 +409,7 @@ export const costanti = {
image: 3000,
image_and_filename: 3100,
imgcard: 3500,
coordinates: 3800,
select_by_server: 4000,
multiselect_by_server: 4010,
nationality: 4096,

View File

@@ -1261,6 +1261,13 @@ export const colAttivita = [
isadvanced_field: true,
numpag_carousel: 3,
}),
AddCol({
name: 'coordinate_gps',
label_trans: 'attivita.coordinate_gps',
fieldtype: costanti.FieldType.coordinates,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
required: false,
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
@@ -1314,8 +1321,6 @@ export const colAttivita = [
}),
AddCol({ name: 'website', label_trans: 'attivita.website' }),
AddCol({ name: 'coordinate_gps', label_trans: 'attivita.coordinate_gps', fieldtype: costanti.FieldType.string }),
AddCol({
name: 'logo',
label_trans: 'attivita.logo',

View File

@@ -0,0 +1,19 @@
// geocoding.ts
export const getCityFromCoordinates = async (lat: number, lon: number): Promise<string | null> => {
const url = `https://nominatim.openstreetmap.org/reverse?lat=${lat}&lon=${lon}&format=json`;
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error('Errore nella richiesta di geocoding');
}
const data = await response.json();
// Controlla se la città è presente nei risultati
return data.address?.city || data.address?.town || data.address?.village || null;
} catch (error) {
console.error('Errore durante il geocoding:', error);
return null;
}
};

View File

@@ -73,6 +73,7 @@ export const tools = {
COOK_MAP_CENTER_LAT: 'MAP_LAT',
COOK_MAP_CENTER_LONG: 'MAP_LONG',
COOK_MAP_ZOOM: 'MAP_Z',
COOK_CATEGORIA: 'CATEG',
FRIENDS_SEARCH: 'FR_SE',
GROUP_SEARCH: 'GR_SE',
@@ -6561,7 +6562,7 @@ export const tools = {
userStore.my.profile.useraccounts = res.useraccounts
}
$router.push('/circuits')
tools.showPositiveNotif($q, t('circuit.coins_sent', {qty: sendcoinrec.qty, symbol: circuit.symbol, dest}))
tools.showPositiveNotif($q, t('circuit.coins_sent', { qty: sendcoinrec.qty, symbol: circuit.symbol, dest }))
//tools.showPositiveNotif($q, t('circuit.coins_sendrequest_sent'))
} else {
tools.showNegativeNotif($q, res.errormsg)
@@ -8687,8 +8688,27 @@ export const tools = {
},
getRecByVersioneProd(versione: number) {
return shared_consts.VERSIONI_PRODOTTO.find((rec: any) => rec.value === versione)
return shared_consts.VERSIONI_PRODOTTO.find((rec: any) => rec.value === versione)
},
convertToDecimal6(stringValue: string) {
// Converti la stringa in un numero
try {
const numberValue = parseFloat(stringValue);
// Controlla se la conversione è un numero valido
if (isNaN(numberValue)) {
// console.error('Valore non valido:', stringValue);
return 0
}
// Usa toFixed per creare un numero con 6 decimali
return parseFloat(numberValue.toFixed(6));
} catch (error) {
console.error('Errore durante la conversione:', error);
return 0
}
}
// FINE !