@asteby/metacore-runtime-react 18.13.2 → 18.14.0

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.
@@ -64,6 +64,11 @@ export interface RecordHistoryProps {
64
64
  * fine for absolute same-origin paths.
65
65
  */
66
66
  resolveAvatarUrl?: (path: string) => string
67
+ /**
68
+ * Localized label for the badge on each event header (e.g. "Clientes").
69
+ * Falls back to the event's raw `addon_key` when omitted.
70
+ */
71
+ moduleLabel?: string
67
72
  }
68
73
 
69
74
  // ---------------------------------------------------------------------------
@@ -114,6 +119,7 @@ export const RecordHistory: React.FC<RecordHistoryProps> = ({
114
119
  className,
115
120
  onOpenEvent,
116
121
  resolveAvatarUrl,
122
+ moduleLabel,
117
123
  }) => {
118
124
  const dateLocale = locale === 'en' ? enUS : es
119
125
 
@@ -223,9 +229,9 @@ export const RecordHistory: React.FC<RecordHistoryProps> = ({
223
229
  <span className="text-xs text-muted-foreground" title={fullDate}>
224
230
  {timeAgo}
225
231
  </span>
226
- {event.addon_key && (
232
+ {(moduleLabel || event.addon_key) && (
227
233
  <Badge variant="outline" className="text-[10px] px-1.5 py-0 h-4 ml-1">
228
- {event.addon_key}
234
+ {moduleLabel || event.addon_key}
229
235
  </Badge>
230
236
  )}
231
237
  </div>