Skip to content

Commit 351fee5

Browse files
committed
show classification prop
1 parent cf5c35c commit 351fee5

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

services/static-webserver/client/source/class/osparc/pricing/PlanListItem.js

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ qx.Class.define("osparc.pricing.PlanListItem", {
3030

3131
this.getChildControl("title");
3232
this.getChildControl("description");
33+
this.getChildControl("classification");
3334
this.getChildControl("edit-button");
3435

3536
this.addListener("pointerover", this._onPointerOver, this);
@@ -74,6 +75,12 @@ qx.Class.define("osparc.pricing.PlanListItem", {
7475
event: "changeDescription"
7576
},
7677

78+
classification: {
79+
check: "String",
80+
nullable: true,
81+
event: "changeClassification"
82+
},
83+
7784
isActive: {
7885
check: "Boolean",
7986
apply: "__applyIsActive",
@@ -112,7 +119,8 @@ qx.Class.define("osparc.pricing.PlanListItem", {
112119
case "pp-id":
113120
control = new qx.ui.basic.Label().set({
114121
font: "text-14",
115-
alignY: "middle"
122+
alignY: "middle",
123+
width: 35,
116124
});
117125
this._add(control, {
118126
row: 0,
@@ -123,7 +131,8 @@ qx.Class.define("osparc.pricing.PlanListItem", {
123131
case "pp-key":
124132
control = new qx.ui.basic.Label().set({
125133
font: "text-14",
126-
alignY: "middle"
134+
alignY: "middle",
135+
width: 80,
127136
});
128137
this._add(control, {
129138
row: 0,
@@ -151,14 +160,27 @@ qx.Class.define("osparc.pricing.PlanListItem", {
151160
column: 2
152161
});
153162
break;
163+
case "classification":
164+
control = new qx.ui.basic.Label().set({
165+
font: "text-14",
166+
alignY: "middle",
167+
width: 60,
168+
});
169+
this.bind("classification", control, "value");
170+
this._add(control, {
171+
row: 0,
172+
column: 3,
173+
rowSpan: 2
174+
});
175+
break;
154176
case "is-active":
155177
control = new qx.ui.basic.Label().set({
156178
font: "text-14",
157179
alignY: "middle"
158180
});
159181
this._add(control, {
160182
row: 0,
161-
column: 3,
183+
column: 4,
162184
rowSpan: 2
163185
});
164186
break;
@@ -170,7 +192,7 @@ qx.Class.define("osparc.pricing.PlanListItem", {
170192
control.addListener("tap", () => this.fireEvent("editPricingPlan"));
171193
this._add(control, {
172194
row: 0,
173-
column: 4,
195+
column: 5,
174196
rowSpan: 2
175197
});
176198
break;
@@ -206,7 +228,7 @@ qx.Class.define("osparc.pricing.PlanListItem", {
206228
return;
207229
}
208230
const label = this.getChildControl("is-active");
209-
label.setValue("Active: " + value);
231+
label.setValue(value ? "Active" : "Inactive");
210232
},
211233

212234
/**

services/static-webserver/client/source/class/osparc/pricing/Plans.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ qx.Class.define("osparc.pricing.Plans", {
9393
ctrl.bindProperty("pricingPlanKey", "ppKey", null, item, id);
9494
ctrl.bindProperty("name", "title", null, item, id);
9595
ctrl.bindProperty("description", "description", null, item, id);
96+
ctrl.bindProperty("classification", "classification", null, item, id);
9697
ctrl.bindProperty("isActive", "isActive", null, item, id);
9798
},
9899
configureItem: item => {

0 commit comments

Comments
 (0)