70 lines
2.2 KiB
TypeScript
70 lines
2.2 KiB
TypeScript
/**
|
|
* Interface canonique Pratique — AEP Pratiques Régénératives
|
|
* Source unique : types/pratique.ts
|
|
* Importée dans pages/pratiques-regeneratives.vue, pages/pratique/[id].vue
|
|
*/
|
|
export interface Pratique {
|
|
id: number
|
|
nom: string
|
|
pays: string // ISO-2 — Europe (FR/BE/...) ou DOM-TOM (GP/MQ/GF/RE/YT/PF/NC/...)
|
|
ville: string
|
|
type: 'agence' | 'cooperative' | 'collectif' | 'reseau' | 'asso' | 'recherche' | 'mouvement' | 'plateforme' | 'inconnu'
|
|
url: string
|
|
lat: number | null
|
|
lng: number | null
|
|
description: string
|
|
criteres: number[] // 1-8
|
|
score: number
|
|
tags: string[]
|
|
source: string
|
|
passe: 1 | 2 | 3
|
|
}
|
|
|
|
export const CRITERES = [
|
|
{ id: 1, label: 'Matériaux' },
|
|
{ id: 2, label: 'Filières' },
|
|
{ id: 3, label: 'Posture' },
|
|
{ id: 4, label: 'Process' },
|
|
{ id: 5, label: 'Politique' },
|
|
{ id: 6, label: 'Modèle éco' },
|
|
{ id: 7, label: 'Vivant' },
|
|
{ id: 8, label: 'Transmission' },
|
|
] as const
|
|
|
|
export const TYPES_ENTITE = [
|
|
'agence',
|
|
'cooperative',
|
|
'collectif',
|
|
'reseau',
|
|
'asso',
|
|
'recherche',
|
|
'mouvement',
|
|
'plateforme',
|
|
'inconnu',
|
|
] as const
|
|
|
|
export const TYPES_ENTITE_LABELS: Record<string, string> = {
|
|
agence: 'Agence',
|
|
cooperative: 'Coopérative',
|
|
collectif: 'Collectif',
|
|
reseau: 'Réseau',
|
|
asso: 'Association',
|
|
recherche: 'Recherche',
|
|
mouvement: 'Mouvement',
|
|
plateforme: 'Plateforme',
|
|
inconnu: 'Autre',
|
|
}
|
|
|
|
export const EUROPE_CODES = ['FR', 'BE', 'UK', 'DE', 'ES', 'NL', 'CH', 'IT', 'PT', 'SE', 'DK', 'FI', 'NO', 'PL', 'CZ', 'AT'] as const
|
|
export const OUTREMER_CODES = ['GP', 'MQ', 'GF', 'RE', 'YT', 'PF', 'NC', 'BL', 'MF', 'PM', 'WF'] as const
|
|
|
|
export const PAYS_LABELS: Record<string, string> = {
|
|
FR: 'France', BE: 'Belgique', UK: 'Royaume-Uni', DE: 'Allemagne',
|
|
ES: 'Espagne', NL: 'Pays-Bas', CH: 'Suisse', IT: 'Italie',
|
|
PT: 'Portugal', SE: 'Suède', DK: 'Danemark', FI: 'Finlande',
|
|
NO: 'Norvège', PL: 'Pologne', CZ: 'Tchéquie', AT: 'Autriche',
|
|
GP: 'Guadeloupe', MQ: 'Martinique', GF: 'Guyane', RE: 'La Réunion',
|
|
YT: 'Mayotte', PF: 'Polynésie française', NC: 'Nouvelle-Calédonie',
|
|
BL: 'Saint-Barthélemy', MF: 'Saint-Martin', PM: 'Saint-Pierre-et-Miquelon', WF: 'Wallis-et-Futuna',
|
|
}
|