@@ -27,7 +27,7 @@ qx.Class.define("osparc.study.StudyPricingUnits", {
27
27
28
28
this . __studyData = studyData ;
29
29
30
- this . showPricingUnits ( ) ;
30
+ this . __showPricingUnits ( ) ;
31
31
} ,
32
32
33
33
events : {
@@ -38,7 +38,7 @@ qx.Class.define("osparc.study.StudyPricingUnits", {
38
38
members : {
39
39
__studyData : null ,
40
40
41
- showPricingUnits : function ( ) {
41
+ __showPricingUnits : function ( ) {
42
42
const unitsLoading = ( ) => this . fireEvent ( "loadingUnits" ) ;
43
43
const unitsAdded = ( ) => this . fireEvent ( "unitsReady" ) ;
44
44
unitsLoading ( ) ;
@@ -48,40 +48,16 @@ qx.Class.define("osparc.study.StudyPricingUnits", {
48
48
const workbench = this . __studyData [ "workbench" ] ;
49
49
Object . keys ( workbench ) . forEach ( nodeId => {
50
50
const node = workbench [ nodeId ] ;
51
+ if ( osparc . data . model . Node . isFrontend ( node ) ) {
52
+ return ;
53
+ }
51
54
const nodePricingUnits = new osparc . study . NodePricingUnits ( this . __studyData [ "uuid" ] , nodeId , node ) ;
52
55
this . _add ( nodePricingUnits ) ;
53
56
promises . push ( nodePricingUnits . showPricingUnits ( ) ) ;
54
57
} ) ;
55
58
}
56
59
Promise . all ( promises )
57
60
. then ( ( ) => unitsAdded ( ) ) ;
58
- } ,
59
-
60
- __createPricingUnitsGroup : function ( nodeLabel , pricingPlans , preselectedPricingUnit ) {
61
- if ( pricingPlans && "pricingUnits" in pricingPlans && pricingPlans [ "pricingUnits" ] . length ) {
62
- const pricingUnitsLayout = osparc . study . StudyOptions . createGroupBox ( nodeLabel ) ;
63
-
64
- const unitButtons = new osparc . study . PricingUnits ( pricingPlans [ "pricingUnits" ] , preselectedPricingUnit ) ;
65
- pricingUnitsLayout . add ( unitButtons ) ;
66
-
67
- return {
68
- layout : pricingUnitsLayout ,
69
- unitButtons
70
- } ;
71
- }
72
- return null ;
73
- } ,
74
-
75
- __pricingUnitSelected : function ( nodeId , pricingPlanId , selectedPricingUnitId ) {
76
- const params = {
77
- url : {
78
- studyId : this . __studyData [ "uuid" ] ,
79
- nodeId,
80
- pricingPlanId,
81
- pricingUnitId : selectedPricingUnitId
82
- }
83
- } ;
84
- return osparc . data . Resources . fetch ( "studies" , "putPricingUnit" , params ) ;
85
61
}
86
62
}
87
63
} ) ;
0 commit comments