Skip to content

Commit ba9624a

Browse files
authored
🎨 [Frontend] ViP Market: Capitalize some feature fields (#7252)
1 parent d5072d0 commit ba9624a

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
193193
this.__setWorkspacesToList(workspaces);
194194
if (this.getCurrentContext() === "trash") {
195195
if (workspaces.length) {
196-
// Not yet implemented
197-
// this.__header.getChildControl("empty-trash-button").show();
196+
this.__header.getChildControl("empty-trash-button").show();
198197
}
199198
}
200199
})
@@ -240,8 +239,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
240239
this.__setFoldersToList(folders);
241240
if (this.getCurrentContext() === "trash") {
242241
if (folders.length) {
243-
// Not yet implemented
244-
// this.__header.getChildControl("empty-trash-button").show();
242+
this.__header.getChildControl("empty-trash-button").show();
245243
}
246244
}
247245
})
@@ -312,8 +310,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
312310

313311
if (this.getCurrentContext() === "trash") {
314312
if (this._resourcesList.length) {
315-
// Not yet implemented
316-
// this.__header.getChildControl("empty-trash-button").show();
313+
this.__header.getChildControl("empty-trash-button").show();
317314
}
318315
}
319316

services/static-webserver/client/source/class/osparc/vipMarket/AnatomicalModelDetails.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ qx.Class.define("osparc.vipMarket.AnatomicalModelDetails", {
235235
const featuresGrid = new qx.ui.layout.Grid(8, 8);
236236
const featuresLayout = new qx.ui.container.Composite(featuresGrid);
237237
let idx = 0;
238+
const capitalizeField = [
239+
"Sex",
240+
"Species",
241+
"Ethnicity",
242+
"Functionality",
243+
];
238244
[
239245
"Name",
240246
"Version",
@@ -258,8 +264,10 @@ qx.Class.define("osparc.vipMarket.AnatomicalModelDetails", {
258264
row: idx,
259265
});
260266

267+
const value = features[key.toLowerCase()];
268+
const featureValue = capitalizeField.includes(key) ? osparc.utils.Utils.capitalize(value) : value;
261269
const nameLabel = new qx.ui.basic.Label().set({
262-
value: features[key.toLowerCase()],
270+
value: featureValue,
263271
font: "text-14",
264272
alignX: "left",
265273
});

0 commit comments

Comments
 (0)