File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
services/static-webserver/client/source/class/osparc/pricing Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ qx.Class.define("osparc.pricing.PlanEditor", {
3636 manager . add ( name ) ;
3737
3838 if ( pricingPlan ) {
39- this . __pricingPlan = osparc . utils . Utils . deepCloneObject ( pricingPlan ) ;
39+ this . __pricingPlan = pricingPlan ;
4040 this . set ( {
4141 ppKey : pricingPlan . getPricingPlanKey ( ) ,
4242 name : pricingPlan . getName ( ) ,
@@ -235,7 +235,7 @@ qx.Class.define("osparc.pricing.PlanEditor", {
235235 "classification" : this . getClassification ( ) ,
236236 "isActive" : this . getIsActive ( ) ,
237237 } ;
238- osparc . store . Pricing . getInstance ( ) . putPricingPlan ( this . __pricingPlan [ "pricingPlanId" ] , updateData )
238+ osparc . store . Pricing . getInstance ( ) . putPricingPlan ( this . __pricingPlan . getPricingPlanId ( ) , updateData )
239239 . then ( ( ) => {
240240 osparc . FlashMessenger . logAs ( this . tr ( "Successfully updated" ) ) ;
241241 this . fireEvent ( "done" ) ;
Original file line number Diff line number Diff line change @@ -125,17 +125,17 @@ qx.Class.define("osparc.pricing.Plans", {
125125 } ,
126126
127127 __openUpdatePricingPlan : function ( pricingPlanId ) {
128- osparc . store . Pricing . getInstance ( ) . fetchPricingUnits ( pricingPlanId )
129- . then ( pricingPlan => {
130- const ppEditor = new osparc . pricing . PlanEditor ( pricingPlan ) ;
131- const title = this . tr ( "Pricing Plan Editor" ) ;
132- const win = osparc . ui . window . Window . popUpInWindow ( ppEditor , title , 400 , 250 ) ;
133- ppEditor . addListener ( "done" , ( ) => {
134- win . close ( ) ;
135- this . fetchPlans ( ) ;
136- } ) ;
137- ppEditor . addListener ( "cancel" , ( ) => win . close ( ) ) ;
128+ const pricingPlan = osparc . store . Pricing . getInstance ( ) . getPricingPlan ( pricingPlanId ) ;
129+ if ( pricingPlan ) {
130+ const ppEditor = new osparc . pricing . PlanEditor ( pricingPlan ) ;
131+ const title = this . tr ( "Pricing Plan Editor" ) ;
132+ const win = osparc . ui . window . Window . popUpInWindow ( ppEditor , title , 400 , 250 ) ;
133+ ppEditor . addListener ( "done" , ( ) => {
134+ win . close ( ) ;
135+ this . fetchPlans ( ) ;
138136 } ) ;
137+ ppEditor . addListener ( "cancel" , ( ) => win . close ( ) ) ;
138+ }
139139 }
140140 }
141141} ) ;
You can’t perform that action at this time.
0 commit comments