Skip to content

Commit 0946308

Browse files
committed
patchNode prop
1 parent 94dc2fd commit 0946308

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

services/static-webserver/client/source/class/osparc/study/NodePricingUnits.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,17 @@ qx.Class.define("osparc.study.NodePricingUnits", {
5959
},
6060

6161
pricingPlanId: {
62-
check: "String",
62+
check: "Number",
6363
init: null,
6464
nullable: false,
6565
},
66+
67+
patchNode: {
68+
check: "Boolean",
69+
init: true,
70+
nullable: false,
71+
event: "changePatchNode",
72+
},
6673
},
6774

6875
statics: {
@@ -123,11 +130,13 @@ qx.Class.define("osparc.study.NodePricingUnits", {
123130
this._add(pricingUnitButtons);
124131
}
125132
pricingUnitButtons.addListener("changeSelectedUnitId", e => {
126-
pricingUnitButtons.setEnabled(false);
127-
const pricingPlanId = this.getPricingPlanId();
128-
const selectedPricingUnitId = e.getData();
129-
this.self().patchPricingUnitSelection(studyId, nodeId, pricingPlanId, selectedPricingUnitId)
130-
.finally(() => pricingUnitButtons.setEnabled(true));
133+
if (this.isPatchNode()) {
134+
pricingUnitButtons.setEnabled(false);
135+
const pricingPlanId = this.getPricingPlanId();
136+
const selectedPricingUnitId = e.getData();
137+
this.self().patchPricingUnitSelection(studyId, nodeId, pricingPlanId, selectedPricingUnitId)
138+
.finally(() => pricingUnitButtons.setEnabled(true));
139+
}
131140
});
132141
}
133142
})

0 commit comments

Comments
 (0)