merge prod to main

This commit is contained in:
root
2026-05-16 13:44:12 -04:00
parent 663c0cdbda
commit b32fb853f6
901 changed files with 11241 additions and 1340 deletions
View File
View File
+25 -3
View File
@@ -250,6 +250,30 @@
modalInstance.show();
};
const renderNameCell = (user) => {
const td = document.createElement('td');
const fullName = `${user?.firstname ?? ''} ${user?.lastname ?? ''}`.trim();
const label = fullName !== '' ? fullName : '—';
const roleList = Array.isArray(user?.roles)
? user.roles.map((role) => (role || '').toString().toLowerCase())
: [];
const isParent = roleList.includes('parent');
const uid = Number(user?.id || 0);
if (isParent && uid > 0) {
const link = document.createElement('a');
link.href = '#';
link.className = 'text-decoration-none';
link.setAttribute('data-family-guardian-id', String(uid));
link.textContent = label;
td.appendChild(link);
return td;
}
td.textContent = label;
return td;
};
const renderTable = () => {
if (!tableBody) return;
@@ -280,9 +304,7 @@
accountCell.textContent = user.account_id ?? '';
row.appendChild(accountCell);
const nameCell = document.createElement('td');
nameCell.textContent = `${user.firstname ?? ''} ${user.lastname ?? ''}`.trim();
row.appendChild(nameCell);
row.appendChild(renderNameCell(user));
const emailCell = document.createElement('td');
emailCell.textContent = user.email ?? '';
View File
View File
View File
View File
View File