feat(taff): scaffold page + types PlateformeTaff V1
- pages/trouver-du-taf.vue : squelette placeholder (branché par T4) - types/plateforme-taff.ts : typage complet (PlateformeTaff, ScoringTaff, helpers) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
103
types/plateforme-taff.ts
Normal file
103
types/plateforme-taff.ts
Normal file
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* Types V1 — Carte 3 AEP "Trouver du taf en archi"
|
||||
* Source : public/data/plateformes-taff.json
|
||||
* Spec figée : 0 INBOX/PROMPTS/cascade-megaboum/MP-TAFF-app-trouver-du-taf.md
|
||||
*/
|
||||
|
||||
export type AxeScore = "✅" | "⚠️" | "❌";
|
||||
|
||||
export type TagGlobal = "recommande" | "sous-reserve" | "a-eviter";
|
||||
|
||||
export type Secteur =
|
||||
| "renovation"
|
||||
| "construction-neuve"
|
||||
| "urbanisme"
|
||||
| "architecture-interieure"
|
||||
| "paysage"
|
||||
| "mar-conseil"
|
||||
| "transversal";
|
||||
|
||||
export type TypePlateforme =
|
||||
| "b2c-mise-en-relation" // V1 cible (Travaux.com, Habitatpresto, etc.)
|
||||
| "appel-offre-public" // V1 onglet bonus light
|
||||
| "communaute-pro"; // backlog V2 (Welow, etc.)
|
||||
|
||||
export type CoutEntree = "gratuit" | "freemium" | "abonnement" | "lead-paye";
|
||||
|
||||
export type ZoneGeo = "france-entiere" | "regional" | string;
|
||||
|
||||
export interface ScoringTaff {
|
||||
remuneration: AxeScore;
|
||||
transparence: AxeScore;
|
||||
pratiques: AxeScore;
|
||||
ecologie: AxeScore;
|
||||
matching: AxeScore;
|
||||
tag_global: TagGlobal;
|
||||
justification_tag: string; // 1-2 phrases pourquoi ce tag
|
||||
}
|
||||
|
||||
export interface Commentaire {
|
||||
id: string;
|
||||
date: string;
|
||||
auteur_pseudo: string;
|
||||
contenu: string;
|
||||
modere: boolean;
|
||||
}
|
||||
|
||||
export interface PlateformeTaff {
|
||||
id: string; // slug-kebab
|
||||
nom: string;
|
||||
url: string;
|
||||
type: TypePlateforme;
|
||||
description: string; // IA 250 mots (5 sections fixes ≤50 mots)
|
||||
description_courte: string; // IA 30 mots (carte preview)
|
||||
|
||||
scoring: ScoringTaff;
|
||||
|
||||
secteurs_servis: Secteur[];
|
||||
zone_geo: ZoneGeo; // si "regional", précise zones
|
||||
cout_entree: CoutEntree;
|
||||
|
||||
date_creation_fiche: string; // ISO
|
||||
date_derniere_maj: string; // ISO — pour pipeline trimestriel
|
||||
source_donnees: string[]; // URLs scrapées
|
||||
flag_validation_jules: boolean; // true si tag ❌ validé manuellement
|
||||
|
||||
commentaires?: Commentaire[];
|
||||
}
|
||||
|
||||
export interface PlateformesTaffData {
|
||||
meta: {
|
||||
version: string;
|
||||
date_generation: string; // ISO
|
||||
total: number;
|
||||
repartition: {
|
||||
recommande: number;
|
||||
sous_reserve: number;
|
||||
a_eviter: number;
|
||||
};
|
||||
repartition_type: {
|
||||
b2c: number;
|
||||
appel_offre_public: number;
|
||||
};
|
||||
};
|
||||
plateformes: PlateformeTaff[];
|
||||
}
|
||||
|
||||
// ── Helpers ────────────────────────────────────────────────────────────────────
|
||||
|
||||
export const FAMILLES_SECTEUR: { id: Secteur; label: string; color: string }[] = [
|
||||
{ id: "renovation", label: "Rénovation", color: "#5a7a4a" },
|
||||
{ id: "construction-neuve", label: "Construction neuve", color: "#3d6a8c" },
|
||||
{ id: "urbanisme", label: "Urbanisme", color: "#6b3fa0" },
|
||||
{ id: "architecture-interieure", label: "Archi intérieure", color: "#a85d3e" },
|
||||
{ id: "paysage", label: "Paysage", color: "#5a7a4a" },
|
||||
{ id: "mar-conseil", label: "MAR / Conseil", color: "#c4a472" },
|
||||
{ id: "transversal", label: "Transversal", color: "#888888" },
|
||||
];
|
||||
|
||||
export const TAG_LABELS: Record<TagGlobal, { label: string; emoji: string; color: string }> = {
|
||||
"recommande": { label: "Recommandé AEP", emoji: "✅", color: "#5a7a4a" },
|
||||
"sous-reserve": { label: "Sous réserve", emoji: "⚠️", color: "#c4a472" },
|
||||
"a-eviter": { label: "À éviter", emoji: "❌", color: "#a85d3e" },
|
||||
};
|
||||
Reference in New Issue
Block a user