@tekkare/romulus 0.1.267 → 0.1.268

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
- "version": "0.1.266",
7
+ "version": "0.1.267",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -171,6 +171,17 @@ const DRUG_VIEWS: Record<string, string> = {
171
171
  const TRIALS = { fr: "Essais cliniques", en: "Clinical trials" };
172
172
  const MATCHING = { fr: "Expertises", en: "Expertise" };
173
173
 
174
+ /**
175
+ * La specialite principale d'un professionnel : l'annuaire range une liste
176
+ * d'objets (`hcp_specialty_type`, `hcp_specialty_label_regroup`), jamais une
177
+ * chaine. Lue telle quelle, la ligne d'un projet affichait « [object Object] ».
178
+ */
179
+ function hcpSpecialty(value: unknown): string {
180
+ const specs: any[] = Array.isArray(value) ? value : value ? [value] : [];
181
+ const principal = specs.find((s) => s?.hcp_specialty_type === "PRINCIPAL") ?? specs[0];
182
+ return typeof principal === "string" ? principal : String(principal?.hcp_specialty_label_regroup ?? "");
183
+ }
184
+
174
185
  const T = {
175
186
  description: tab("study-description", "Description de l'étude", "Study description"),
176
187
  investigators: tab("investigators", "Investigateurs", "Investigators"),
@@ -286,7 +297,7 @@ export const OIP_RESOURCE_SPECS: OipResourceSpec[] = [
286
297
  icon: "UserCircle",
287
298
  source: ["hcp_code", "hcp_first_name", "hcp_family_name", "specialty", "address"],
288
299
  title: (s) => `${s.hcp_first_name || ""} ${s.hcp_family_name || ""}`.trim() || String(s.hcp_code),
289
- subtitle: (s) => [s.specialty, s.address?.[0]?.hcp_city].filter(Boolean).join(" · "),
300
+ subtitle: (s) => [hcpSpecialty(s.specialty), s.address?.[0]?.hcp_city].filter(Boolean).join(" · "),
290
301
  path: (s) => `/hcps/${s.hcp_code}/informations`,
291
302
  },
292
303
  // L'_id de l'annuaire est `10_<RPPS>` ; la page de la fiche, le RPPS seul.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.267",
3
+ "version": "0.1.268",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",