Implemented markdown based notification message body formatting
This commit is contained in:
@@ -69,7 +69,7 @@ export const UserSearchPicker: React.FC<UserSearchPickerProps> = ({
|
||||
const filtered = activeUsers.filter(u => {
|
||||
if (!term) return true;
|
||||
const email = (u.email || '').toLowerCase();
|
||||
const role = (u.role || '').toLowerCase();
|
||||
const role = String(u.role ?? '').toLowerCase();
|
||||
return email.includes(term) || role.includes(term);
|
||||
});
|
||||
|
||||
@@ -80,7 +80,7 @@ export const UserSearchPicker: React.FC<UserSearchPickerProps> = ({
|
||||
const otherUsers: User[] = [];
|
||||
|
||||
filtered.forEach(u => {
|
||||
const r = (u.role || '').toLowerCase();
|
||||
const r = String(u.role ?? '').toLowerCase();
|
||||
if (r.includes('admin') || r.includes('executive') || r.includes('director')) {
|
||||
adminUsers.push(u);
|
||||
} else if (r.includes('programme') || r.includes('project') || r.includes('manager')) {
|
||||
@@ -178,7 +178,7 @@ export const UserSearchPicker: React.FC<UserSearchPickerProps> = ({
|
||||
id: u.id,
|
||||
email: u.email,
|
||||
name: formattedName,
|
||||
role: u.role || 'User',
|
||||
role: String(u.role ?? 'User'),
|
||||
});
|
||||
setIsDropdownOpen(false);
|
||||
} else {
|
||||
@@ -186,7 +186,7 @@ export const UserSearchPicker: React.FC<UserSearchPickerProps> = ({
|
||||
id: u.id,
|
||||
email: u.email,
|
||||
name: formattedName,
|
||||
role: u.role || 'User',
|
||||
role: String(u.role ?? 'User'),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user