Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c7e8afb
searchByEmail
odeimaiz Sep 9, 2025
ed6534a
searchByGroupId
odeimaiz Sep 9, 2025
678ef2f
setContactData
odeimaiz Sep 9, 2025
b77e673
__fetchMyProfile
odeimaiz Sep 9, 2025
31fdced
minor
odeimaiz Sep 9, 2025
741bb7e
PHONE number
odeimaiz Sep 9, 2025
e5cb552
Merge branch 'master' into feature/supporter-searches-users
odeimaiz Sep 10, 2025
c30485a
Merge branch 'feature/supporter-searches-users' of github.com:odeimai…
odeimaiz Sep 10, 2025
70250ad
Contact info
odeimaiz Sep 10, 2025
cc5e006
contact info
odeimaiz Sep 10, 2025
95ae3f0
prop rename phoneNumber -> phone
odeimaiz Sep 10, 2025
eaf0f3d
username -> userName
odeimaiz Sep 10, 2025
67af6b7
minor
odeimaiz Sep 10, 2025
1e68d9f
minor
odeimaiz Sep 10, 2025
8041076
"extra-info"
odeimaiz Sep 10, 2025
6e0be5d
__setExtraInfo
odeimaiz Sep 10, 2025
fa780a3
unused
odeimaiz Sep 10, 2025
b9c8d64
minor
odeimaiz Sep 10, 2025
9fbead4
JsonFormatterWidget
odeimaiz Sep 10, 2025
091f60e
minor
odeimaiz Sep 10, 2025
f817c88
styling
odeimaiz Sep 10, 2025
a46ae7b
with scroll bars_getContentHint
odeimaiz Sep 10, 2025
87a3606
__applyStyles
odeimaiz Sep 10, 2025
0716af3
minor
odeimaiz Sep 10, 2025
d68cb6f
minor
odeimaiz Sep 10, 2025
3067b2a
Merge branch 'master' into feature/supporter-searches-users
odeimaiz Sep 10, 2025
1c6eb98
reuse JsonFormatterWidget
odeimaiz Sep 10, 2025
ee996cd
reuse JsonFormatterWidget
odeimaiz Sep 10, 2025
1a92ef3
Merge branch 'feature/supporter-searches-users' of github.com:odeimai…
odeimaiz Sep 10, 2025
781c98d
convertKeysToTitles
odeimaiz Sep 10, 2025
561fbac
Merge branch 'master' into feature/supporter-searches-users
odeimaiz Sep 10, 2025
31d1b6b
Merge branch 'master' into feature/supporter-searches-users
odeimaiz Sep 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ qx.Class.define("osparc.auth.Data", {
check: "Number"
},

username: {
userName: {
check: "String",
init: null,
nullable: false,
event: "changeUsername",
event: "changeUserName",
},

email: {
Expand Down Expand Up @@ -139,12 +139,12 @@ qx.Class.define("osparc.auth.Data", {
return osparc.utils.Utils.cookie.getCookie("user") === "logout";
},

getFriendlyUsername: function() {
getFriendlyUserName: function() {
const firstName = this.getFirstName();
if (firstName) {
return firstName;
}
return this.getUsername();
return this.getUserName();
},

getFullName: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ qx.Class.define("osparc.auth.Manager", {
const authData = osparc.auth.Data.getInstance();
authData.set({
email: profile["login"],
username: profile["userName"],
userName: profile["userName"],
firstName: profile["first_name"],
lastName: profile["last_name"],
expirationDate: profile["expirationDate"] ? new Date(profile["expirationDate"]) : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ qx.Class.define("osparc.auth.ui.LoginView", {
const email = new qx.ui.form.TextField().set({
required: true
});
email.getContentElement().setAttribute("autocomplete", "username");
email.getContentElement().setAttribute("autocomplete", "userName");
osparc.utils.Utils.setIdToWidget(email, "loginUserEmailFld");
this._form.add(email, " Email", qx.util.Validate.email(), "email");
const focusEmail = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -914,13 +914,13 @@ qx.Class.define("osparc.dashboard.CardBase", {
const currentUserGroupIds = osparc.study.Utils.state.getCurrentGroupIds(state);
const usersStore = osparc.store.Users.getInstance();
const userPromises = currentUserGroupIds.map(userGroupId => usersStore.getUser(userGroupId));
const usernames = [];
const userNames = [];
let toolTip = "";
let image = null;
Promise.all(userPromises)
.then(usersResult => {
usersResult.forEach(user => {
usernames.push(user.getUsername());
userNames.push(user.getUserName());
});
})
.catch(error => {
Expand Down Expand Up @@ -952,8 +952,8 @@ qx.Class.define("osparc.dashboard.CardBase", {
image = "@FontAwesome5Solid/lock/";
break;
}
usernames.forEach(username => {
toolTip += "<br>" + username;
userNames.forEach(userName => {
toolTip += "<br>" + userName;
});
this.__showBlockedCard(image, toolTip);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1131,10 +1131,14 @@ qx.Class.define("osparc.data.Resources", {
},
"poUsers": {
endpoints: {
search: {
searchByEmail: {
method: "GET",
url: statics.API + "/admin/user-accounts:search?email={email}"
},
searchByGroupId: {
method: "GET",
url: statics.API + "/admin/user-accounts:search?primary_group_id={gId}"
},
getPendingUsers: {
method: "GET",
url: statics.API + "/admin/user-accounts?review_status=PENDING"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ qx.Class.define("osparc.data.model.Conversation", {
const extraContext = this.getExtraContext() || {};
extraContext["appointment"] = appointment ? appointment.toISOString() : null;
// OM: Supporters are not allowed to patch the conversation metadata yet
const backendAllowsPatch = osparc.store.Products.getInstance().amIASupportUser() ? false : true;
const backendAllowsPatch = osparc.store.Groups.getInstance().amIASupportUser() ? false : true;
if (backendAllowsPatch) {
return osparc.store.ConversationsSupport.getInstance().patchExtraContext(this.getConversationId(), extraContext)
.then(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ qx.Class.define("osparc.data.model.Group", {
return Object.values(this.getGroupMembers()).find(user => user.getUserId() === userId);
},

getGroupMemberByUsername: function(username) {
return Object.values(this.getGroupMembers()).find(user => user.getUsername() === username);
getGroupMemberByUserName: function(userName) {
return Object.values(this.getGroupMembers()).find(user => user.getUserName() === userName);
},

getGroupMemberByLogin: function(userEmail) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ qx.Class.define("osparc.data.model.User", {

const userId = ("id" in userData) ? parseInt(userData["id"]) : parseInt(userData["userId"]);
const groupId = ("gid" in userData) ? parseInt(userData["gid"]) : parseInt(userData["groupId"]);
const username = userData["userName"] || "-";
const userName = userData["userName"] || "-";
const email = ("login" in userData) ? userData["login"] : userData["email"];
let firstName = "";
if (userData["first_name"]) {
Expand All @@ -48,11 +48,11 @@ qx.Class.define("osparc.data.model.User", {
this.set({
userId,
groupId,
username,
userName,
firstName,
lastName,
email,
phoneNumber: userData["phone"] || null,
phone: userData["phone"] || null,
});

const description = osparc.data.model.User.userDataToDescription(firstName, lastName, email);
Expand All @@ -62,18 +62,11 @@ qx.Class.define("osparc.data.model.User", {
});

if (userData["contact"]) {
const contact = userData["contact"];
this.set({
institution: contact["institution"] || null,
address: contact["address"] || null,
city: contact["city"] || null,
state: contact["state"] || null,
country: contact["country"] || null,
postalCode: contact["postalCode"] || null,
});
const contactData = userData["contact"];
this.setContactData(contactData);
}

// create the thumbnail after setting email and username
// create the thumbnail after setting email and userName
this.set({
thumbnail: this.createThumbnail(),
});
Expand Down Expand Up @@ -108,11 +101,11 @@ qx.Class.define("osparc.data.model.User", {
event: "changeDescription",
},

username: {
userName: {
check: "String",
nullable: false,
init: null,
event: "changeUsername",
event: "changeUserName",
},

firstName: {
Expand All @@ -136,11 +129,11 @@ qx.Class.define("osparc.data.model.User", {
event: "changeEmail",
},

phoneNumber: {
phone: {
check: "String",
nullable: true,
init: null,
event: "changePhoneNumber"
event: "changePhone",
},

thumbnail: {
Expand Down Expand Up @@ -212,11 +205,22 @@ qx.Class.define("osparc.data.model.User", {

members: {
createThumbnail: function(size) {
return osparc.utils.Avatar.emailToThumbnail(this.getEmail(), this.getUsername(), size);
return osparc.utils.Avatar.emailToThumbnail(this.getEmail(), this.getUserName(), size);
},

getFullName: function() {
return this.self().concatFullName(this.getFirstName(), this.getLastName());
},

setContactData: function(contactData) {
this.set({
institution: contactData["institution"] || null,
address: contactData["address"] || null,
city: contactData["city"] || null,
state: contactData["state"] || null,
country: contactData["country"] || null,
postalCode: contactData["postalCode"] || null,
});
},
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ qx.Class.define("osparc.desktop.account.MyAccount", {
if (!userData) {
userData = osparc.auth.Data.getInstance();
}
const username = userData.getUsername();
const userName = userData.getUserName();
const email = userData.getEmail();
const avatarSize = 80;
const img = new qx.ui.basic.Image().set({
source: osparc.utils.Avatar.emailToThumbnail(email, username, avatarSize),
source: osparc.utils.Avatar.emailToThumbnail(email, userName, avatarSize),
maxWidth: avatarSize,
maxHeight: avatarSize,
scale: true,
Expand All @@ -71,12 +71,12 @@ qx.Class.define("osparc.desktop.account.MyAccount", {
});
layout.add(img);

const usernameLabel = new qx.ui.basic.Label().set({
const userNameLabel = new qx.ui.basic.Label().set({
font: "text-14",
alignX: "center"
});
userData.bind("username", usernameLabel, "value");
layout.add(usernameLabel);
userData.bind("userName", userNameLabel, "value");
layout.add(userNameLabel);

const fullNameLabel = new qx.ui.basic.Label().set({
font: "text-13",
Expand Down
Loading
Loading