Skip to content

Commit d197315

Browse files
committed
connect to backend
1 parent 41fcd8e commit d197315

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

services/static-webserver/client/source/class/osparc/po/UsersPending.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ qx.Class.define("osparc.po.UsersPending", {
138138
column: 2,
139139
});
140140

141-
pendingUsersLayout.add(new qx.ui.basic.Label(this.tr("Info")).set({
141+
pendingUsersLayout.add(new qx.ui.basic.Label(this.tr("Status")).set({
142142
font: "text-14"
143143
}), {
144144
row: 0,
145145
column: 3,
146146
});
147147

148-
pendingUsersLayout.add(new qx.ui.basic.Label(this.tr("Status")).set({
148+
pendingUsersLayout.add(new qx.ui.basic.Label(this.tr("Info")).set({
149149
font: "text-14"
150150
}), {
151151
row: 0,
@@ -165,24 +165,25 @@ qx.Class.define("osparc.po.UsersPending", {
165165

166166
let row = 1;
167167
pendingUsers.forEach(pendingUser => {
168-
pendingUsersLayout.add(new qx.ui.basic.Label(pendingUser.name), {
168+
console.log("Pending user", pendingUser);
169+
pendingUsersLayout.add(new qx.ui.basic.Label(pendingUser.firstName + " " + pendingUser.lastName), {
169170
row,
170171
column: 0,
171172
});
172173
pendingUsersLayout.add(new qx.ui.basic.Label(pendingUser.email), {
173174
row,
174175
column: 1,
175176
});
176-
pendingUsersLayout.add(new qx.ui.basic.Label(osparc.utils.Utils.formatDateAndTime(new Date(pendingUser.date))), {
177+
pendingUsersLayout.add(new qx.ui.basic.Label(pendingUser.date ? osparc.utils.Utils.formatDateAndTime(new Date(pendingUser.date)) : "-"), {
177178
row,
178179
column: 2,
179180
});
180-
const infoButton = this.self().createInfoButton(pendingUser.info);
181-
pendingUsersLayout.add(infoButton, {
181+
pendingUsersLayout.add(new qx.ui.basic.Label(pendingUser.accountRequestStatus.toLowerCase()), {
182182
row,
183183
column: 3,
184184
});
185-
pendingUsersLayout.add(new qx.ui.basic.Label(pendingUser.status.toLowerCase()), {
185+
const infoButton = this.self().createInfoButton(pendingUser);
186+
pendingUsersLayout.add(infoButton, {
186187
row,
187188
column: 4,
188189
});
@@ -192,7 +193,7 @@ qx.Class.define("osparc.po.UsersPending", {
192193
column: 5,
193194
});
194195

195-
switch (pendingUser.status) {
196+
switch (pendingUser.accountRequestStatus) {
196197
case "PENDING": {
197198
const approveButton = this.self().createApproveButton(pendingUser.email);
198199
buttonsLayout.add(approveButton);

0 commit comments

Comments
 (0)