Skip to content

Commit 741bb7e

Browse files
committed
PHONE number
1 parent 31fdced commit 741bb7e

File tree

1 file changed

+20
-4
lines changed
  • services/static-webserver/client/source/class/osparc/user

1 file changed

+20
-4
lines changed

services/static-webserver/client/source/class/osparc/user/UserDetails.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ qx.Class.define("osparc.user.UserDetails", {
3333
},
3434

3535
statics: {
36-
WIDTH: 300,
37-
HEIGHT: 200,
36+
WIDTH: 400,
37+
HEIGHT: 300,
3838

3939
GRID_POS: {
4040
USERNAME: 0,
4141
FULLNAME: 1,
4242
EMAIL: 2,
43-
USER_ID: 3,
44-
GROUP_ID: 4,
43+
PHONE: 3,
44+
USER_ID: 4,
45+
GROUP_ID: 5,
4546
}
4647
},
4748

@@ -127,6 +128,19 @@ qx.Class.define("osparc.user.UserDetails", {
127128
});
128129
break;
129130
}
131+
case "phone": {
132+
const title = new qx.ui.basic.Label("Phone");
133+
this.getChildControl("main-info").add(title, {
134+
row: this.self().GRID_POS.PHONE,
135+
column: 0
136+
});
137+
control = new qx.ui.basic.Label();
138+
this.getChildControl("main-info").add(control, {
139+
row: this.self().GRID_POS.PHONE,
140+
column: 1
141+
});
142+
break;
143+
}
130144
case "user-id": {
131145
const title = new qx.ui.basic.Label("User ID");
132146
this.getChildControl("main-info").add(title, {
@@ -172,6 +186,7 @@ qx.Class.define("osparc.user.UserDetails", {
172186
userData["userId"] = -1; // fix this
173187
userData["userName"] = "userName"; // fix this
174188
const user = new osparc.data.model.User(userData);
189+
user.setContactData(userData);
175190
this.setUser(user);
176191
}
177192
})
@@ -188,6 +203,7 @@ qx.Class.define("osparc.user.UserDetails", {
188203
this.getChildControl("username").setValue(user.getUsername());
189204
this.getChildControl("fullname").setValue([user.getFirstName(), user.getLastName()].filter(Boolean).join(" "));
190205
this.getChildControl("email").setValue(user.getEmail());
206+
this.getChildControl("phone").setValue(user.getPhoneNumber());
191207
this.getChildControl("user-id").setValue(String(user.getUserId()));
192208
this.getChildControl("group-id").setValue(String(user.getGroupId()));
193209
},

0 commit comments

Comments
 (0)