File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
services/static-webserver/client/source/class/osparc/store Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ qx.Class.define("osparc.store.Study", {
2020
2121 statics : {
2222 __nodeResources : null ,
23+ __nodePricingUnit : null ,
2324
2425 patchStudyData : function ( studyData , fieldKey , value ) {
2526 if ( osparc . data . model . Study . OwnPatch . includes ( fieldKey ) ) {
@@ -200,6 +201,19 @@ qx.Class.define("osparc.store.Study", {
200201 } ,
201202
202203 getSelectedPricingUnit : function ( studyId , nodeId ) {
204+ // init nodePricingUnit if it is null
205+ if ( this . __nodePricingUnit === null ) {
206+ this . __nodePricingUnit = { } ;
207+ }
208+
209+ // check if the pricing unit for this node is already fetched
210+ if (
211+ studyId in this . __nodePricingUnit &&
212+ nodeId in this . __nodePricingUnit [ studyId ]
213+ ) {
214+ return Promise . resolve ( this . __nodePricingUnit [ studyId ] [ nodeId ] ) ;
215+ }
216+
203217 const params = {
204218 url : {
205219 studyId,
You can’t perform that action at this time.
0 commit comments