obligation.active)
.map((obligation) => t(`obligation.${obligation.code}` as const))
.join(', ')}
/>
) : (
{t('admin.users.noProfile')}
)}
{lastActivityAt
? // A full date, not "15 ene": in a console the year is part of the fact.
t('admin.users.lastActivity', { date: lastActivityAt.slice(0, 10) })
: t('admin.users.noActivity')}
{t('admin.users.openErrors')}
{recentErrors.length === 0 ? (
{t('admin.users.noErrors')}
) : (
{recentErrors.map((error) => (
{t(`admin.errors.stage.${error.stage}` as const)}
{error.message}
{error.createdAt.slice(0, 10)}
))}
)}
{/* The queue itself, for the rows this summary does not show. */}
{t('admin.errors.goToQueue')}
{viewerRole === 'superadmin' ? : null}
{t('admin.role.confirm', { email: user.email, role: t(`admin.role.${role}` as const) })}
) : null}
{change.isError ? (
{t('common.error.generic')}
) : null}
{change.isSuccess ?
{t('admin.role.saved')}
: null}
);
}
/**
* Label above value. Side by side across a wide card, a right aligned value ends up next
* to the following pair's label and the two read as one field.
*/
function Row({ label, value }: { label: string; value: string }) {
return (
{label}
{value}
);
}
function docOf(ruc: string | null, rucDv: string | null, ci: string | null): string {
if (ruc) return rucDv ? `${ruc}-${rucDv}` : ruc;
return ci ?? '';
}