@tekkare/romulus 0.1.346 → 0.1.347

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.
@@ -344,6 +344,17 @@ const intlDecisionCount = computed(() =>
344
344
  Object.values(intlRecords.value as Record<string, any[]>).reduce((sum, list) => sum + list.length, 0),
345
345
  );
346
346
 
347
+ // MITM et « SMR & ASMR » lisent les memes documents : un document MITM n'ouvre
348
+ // l'onglet que s'il a de quoi le remplir (produits rattaches, avis SMR / ASMR).
349
+ const hasMitmProducts = computed(() =>
350
+ resultsQueryMitm.value.some((m: any) =>
351
+ (m._source?.molecule ?? []).some((row: any) => row?.brand || row?.drug_label || row?.cis_code),
352
+ ),
353
+ );
354
+ const hasMitmOpinions = computed(() =>
355
+ resultsQueryMitm.value.some((m: any) => (m._source?.smr?.length ?? 0) + (m._source?.asmr?.length ?? 0) > 0),
356
+ );
357
+
347
358
  // Onglets disponibles (l'ordre = l'ordre d'affichage). La MARQUE est le pivot :
348
359
  // HAS n'apparait que s'il existe un avis, ANSM que s'il existe des CIS, etc.
349
360
  const availableTabs = computed(() => {
@@ -351,15 +362,13 @@ const availableTabs = computed(() => {
351
362
  const tabs: { key: string; label: string }[] = [];
352
363
  if (hasMonograph.value) tabs.push({ key: 'monograph', label: en ? 'Monograph' : 'Monographie' });
353
364
  if (resultsQuery.value) tabs.push({ key: 'overview', label: 'HAS' });
354
- if (hasContributions.value) tabs.push({ key: 'contributions', label: en ? 'Patient Contribution' : 'Contribution Patient' });
365
+ // Les avis SMR / ASMR du CIS suivent ceux de la HAS, le MITM garde les CIP.
366
+ if (hasMitmOpinions.value) tabs.push({ key: 'smr', label: 'SMR & ASMR' });
367
+ if (hasContributions.value) tabs.push({ key: 'contributions', label: en ? 'Patient contrib.' : 'Contrib. Patient' });
355
368
  if (resultsQueryPrice.value.length > 0) tabs.push({ key: 'price', label: t('oipDrugs.heart.details.tabs.price') });
356
- if (resultsQueryIntlPrice.value.length > 0 || intlDecisionCount.value > 0) tabs.push({ key: 'international', label: en ? 'International view' : 'Regard international' });
369
+ if (resultsQueryIntlPrice.value.length > 0 || intlDecisionCount.value > 0) tabs.push({ key: 'international', label: en ? 'Intl. view' : 'Regard inter.' });
357
370
  if (resultsQueryAnsm.value.length > 0) tabs.push({ key: 'ansm', label: 'ANSM' });
358
- if (resultsQueryMitm.value.length > 0) {
359
- tabs.push({ key: 'mitm', label: 'MITM' });
360
- // Les avis SMR / ASMR du CIS ont leur onglet, le MITM garde les CIP.
361
- tabs.push({ key: 'smr', label: 'SMR & ASMR' });
362
- }
371
+ if (hasMitmProducts.value) tabs.push({ key: 'mitm', label: 'MITM' });
363
372
  if (resultsQueryPut.value.length > 0) tabs.push({ key: 'put', label: 'PUT' });
364
373
  if (derogatoryRecords.value.length > 0) tabs.push({ key: 'derogatory', label: en ? 'Derogatory access' : 'Accès dérogatoire' });
365
374
  if (resultsQueryLes.value.length > 0) tabs.push({ key: 'les', label: 'LES' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.346",
3
+ "version": "0.1.347",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",