@salesforcedevs/dx-components 1.2.2-avatar-button-6 → 1.2.2-avatar-button-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -307,20 +307,26 @@ export default class AvatarButton extends LightningElement {
|
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
310
|
+
const nextUserInfo: Omit<UserInfo, 'fullName'> = {};
|
|
311
|
+
nextUserInfo.avatarImgSrc = userInfo.photos?.thumbnail;
|
|
312
|
+
nextUserInfo.firstName = userInfo.given_name;
|
|
313
|
+
nextUserInfo.lastName = userInfo.family_name;
|
|
314
|
+
nextUserInfo.username = userInfo.preferred_username;
|
|
315
|
+
nextUserInfo.id = userInfo.user_id;
|
|
316
|
+
nextUserInfo.orgId = userInfo.organization_id;
|
|
316
317
|
|
|
317
318
|
if (userInfo.custom_attributes) {
|
|
318
|
-
|
|
319
|
-
|
|
319
|
+
nextUserInfo.company = userInfo.custom_attributes.CompanyName;
|
|
320
|
+
nextUserInfo.relationship =
|
|
320
321
|
userInfo.custom_attributes.RelationshipToSalesforce;
|
|
321
|
-
|
|
322
|
+
nextUserInfo.role = userInfo.custom_attributes.Role;
|
|
322
323
|
}
|
|
323
324
|
// TODO: Consider displaying initials if no photo. Is there always a photo even if just a default one?
|
|
325
|
+
|
|
326
|
+
this.userInfo = {
|
|
327
|
+
...this.userInfo,
|
|
328
|
+
...nextUserInfo,
|
|
329
|
+
};
|
|
324
330
|
};
|
|
325
331
|
|
|
326
332
|
private requestUserInfo = async () => {
|