Skip to content

Commit da92365

Browse files
committed
fix: enhance message generation to handle masked columns in record change notifications
1 parent 1cf905a commit da92365

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

adminforth/spa/src/utils/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,9 @@ export function generateMessageHtmlForRecordChange(changedFields: Record<string,
700700
const items = Object.keys(changedFields || {}).map(key => {
701701
const column = coreStore.resource?.columns?.find((c: any) => c.name === key);
702702
const label = column?.label || key;
703+
if (column?.masked) {
704+
return `<li class="truncate"><strong>${escapeHtml(label)}</strong>: <em>${escapeHtml(t('changed'))}</em></li>`;
705+
}
703706
const oldV = escapeHtml(changedFields[key].oldValue);
704707
const newV = escapeHtml(changedFields[key].newValue);
705708
return `<li class="truncate"><strong>${escapeHtml(label)}</strong>: <span class="af-old-value text-muted">${oldV}</span> &#8594; <span class="af-new-value">${newV}</span></li>`;

0 commit comments

Comments
 (0)