@@ -30,8 +30,10 @@ qx.Class.define("osparc.study.NodePricingUnits", {
3030 layout : new qx . ui . layout . VBox ( )
3131 } ) ;
3232
33- this . __studyId = studyId ;
34- this . __nodeId = nodeId ;
33+ this . set ( {
34+ studyId,
35+ nodeId,
36+ } ) ;
3537 if ( node instanceof osparc . data . model . Node ) {
3638 this . __nodeKey = node . getKey ( ) ;
3739 this . __nodeVersion = node . getVersion ( ) ;
@@ -43,6 +45,20 @@ qx.Class.define("osparc.study.NodePricingUnits", {
4345 }
4446 } ,
4547
48+ properties : {
49+ studyId : {
50+ check : "String" ,
51+ init : null ,
52+ nullable : false ,
53+ } ,
54+
55+ nodeId : {
56+ check : "String" ,
57+ init : null ,
58+ nullable : false ,
59+ } ,
60+ } ,
61+
4662 statics : {
4763 patchPricingUnitSelection : function ( studyId , nodeId , planId , selectedUnitId ) {
4864 const params = {
@@ -58,8 +74,6 @@ qx.Class.define("osparc.study.NodePricingUnits", {
5874 } ,
5975
6076 members : {
61- __studyId : null ,
62- __nodeId : null ,
6377 __nodeKey : null ,
6478 __nodeVersion : null ,
6579 __nodeLabel : null ,
@@ -69,8 +83,8 @@ qx.Class.define("osparc.study.NodePricingUnits", {
6983 const nodeKey = this . __nodeKey ;
7084 const nodeVersion = this . __nodeVersion ;
7185 const nodeLabel = this . __nodeLabel ;
72- const studyId = this . __studyId ;
73- const nodeId = this . __nodeId ;
86+ const studyId = this . getStudyId ( ) ;
87+ const nodeId = this . getNodeId ( ) ;
7488
7589 const plansParams = {
7690 url : osparc . data . Resources . getServiceUrl (
@@ -101,7 +115,7 @@ qx.Class.define("osparc.study.NodePricingUnits", {
101115 unitButtons . addListener ( "changeSelectedUnitId" , e => {
102116 unitButtons . setEnabled ( false ) ;
103117 const selectedPricingUnitId = e . getData ( ) ;
104- this . self ( ) . patchPricingUnitSelection ( this . __studyId , this . __nodeId , pricingPlans [ "pricingPlanId" ] , selectedPricingUnitId )
118+ this . self ( ) . patchPricingUnitSelection ( studyId , nodeId , pricingPlans [ "pricingPlanId" ] , selectedPricingUnitId )
105119 . finally ( ( ) => unitButtons . setEnabled ( true ) ) ;
106120 } ) ;
107121 }
0 commit comments