feat: Oracle CRM Page, Synthetic Client Data and Live Snapshot when hitting emotion hotpoint

This commit is contained in:
Sagnik
2026-04-19 00:43:01 +05:30
parent f616a33ab0
commit 4b21c2cad6
197 changed files with 105054 additions and 89 deletions

View File

@@ -21,6 +21,7 @@ import {
getVelocityToken,
isAdminRole,
normalizeVelocityRole,
type VelocityUserProfile,
} from '@/lib/velocityPlatformClient';
import {
@@ -258,7 +259,7 @@ function App() {
if (cancelled) return;
login({
id: me.user_id,
name: me.user_id,
name: resolveVelocityDisplayName(me),
role: normalizeVelocityRole(me.role),
});
setAuthBootstrapped(true);
@@ -287,7 +288,7 @@ function App() {
if (cancelled) return;
login({
id: me.user_id,
name: me.user_id,
name: resolveVelocityDisplayName(me),
role: normalizeVelocityRole(me.role),
});
})
@@ -362,3 +363,17 @@ function formatRoleLabel(role: string | undefined) {
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
.join(' ');
}
function resolveVelocityDisplayName(profile: VelocityUserProfile) {
const fullName = profile.full_name?.trim();
if (fullName) {
return fullName;
}
const email = profile.email?.trim();
if (email) {
return email;
}
return profile.user_id;
}