-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 [Frontend] Connect Anatomical modes to Licensed items (#6911)
- Loading branch information
Showing
29 changed files
with
1,310 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
services/static-webserver/client/source/class/osparc/data/model/PricingPlan.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* ************************************************************************ | ||
osparc - the simcore frontend | ||
https://osparc.io | ||
Copyright: | ||
2024 IT'IS Foundation, https://itis.swiss | ||
License: | ||
MIT: https://opensource.org/licenses/MIT | ||
Authors: | ||
* Odei Maiz (odeimaiz) | ||
************************************************************************ */ | ||
|
||
/** | ||
* Class that stores PricingPlan data. | ||
*/ | ||
|
||
qx.Class.define("osparc.data.model.PricingPlan", { | ||
extend: qx.core.Object, | ||
|
||
/** | ||
* @param pricingPlanData {Object} Object containing the serialized PricingPlan Data | ||
*/ | ||
construct: function(pricingPlanData) { | ||
this.base(arguments); | ||
|
||
this.set({ | ||
pricingPlanId: pricingPlanData.pricingPlanId, | ||
pricingPlanKey: pricingPlanData.pricingPlanKey, | ||
classification: pricingPlanData.classification, | ||
name: pricingPlanData.displayName, | ||
description: pricingPlanData.description, | ||
isActive: pricingPlanData.isActive, | ||
pricingUnits: [], | ||
}); | ||
|
||
if (pricingPlanData.pricingUnits) { | ||
pricingPlanData.pricingUnits.forEach(pricingUnitData => { | ||
const pricingUnit = new osparc.data.model.PricingUnit(pricingUnitData); | ||
this.getPricingUnits().push(pricingUnit); | ||
}); | ||
} | ||
}, | ||
|
||
properties: { | ||
pricingPlanId: { | ||
check: "Number", | ||
nullable: false, | ||
init: null, | ||
event: "changePricingPlanId" | ||
}, | ||
|
||
pricingPlanKey: { | ||
check: "String", | ||
nullable: true, | ||
init: null, | ||
event: "changePricingPlanKey" | ||
}, | ||
|
||
pricingUnits: { | ||
check: "Array", | ||
nullable: true, | ||
init: [], | ||
event: "changePricingunits" | ||
}, | ||
|
||
classification: { | ||
check: ["TIER", "LICENSE"], | ||
nullable: false, | ||
init: null, | ||
event: "changeClassification" | ||
}, | ||
|
||
name: { | ||
check: "String", | ||
nullable: false, | ||
init: null, | ||
event: "changeName" | ||
}, | ||
|
||
description: { | ||
check: "String", | ||
nullable: true, | ||
init: null, | ||
event: "changeDescription" | ||
}, | ||
|
||
isActive: { | ||
check: "Boolean", | ||
nullable: false, | ||
init: false, | ||
event: "changeIsActive" | ||
}, | ||
}, | ||
}); |
91 changes: 91 additions & 0 deletions
91
services/static-webserver/client/source/class/osparc/data/model/PricingUnit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/* ************************************************************************ | ||
osparc - the simcore frontend | ||
https://osparc.io | ||
Copyright: | ||
2024 IT'IS Foundation, https://itis.swiss | ||
License: | ||
MIT: https://opensource.org/licenses/MIT | ||
Authors: | ||
* Odei Maiz (odeimaiz) | ||
************************************************************************ */ | ||
|
||
/** | ||
* Class that stores PricingUnit data. | ||
*/ | ||
|
||
qx.Class.define("osparc.data.model.PricingUnit", { | ||
extend: qx.core.Object, | ||
|
||
/** | ||
* @param pricingUnitData {Object} Object containing the serialized PricingUnit Data | ||
*/ | ||
construct: function(pricingUnitData) { | ||
this.base(arguments); | ||
|
||
this.set({ | ||
pricingUnitId: pricingUnitData.pricingUnitId, | ||
name: pricingUnitData.unitName, | ||
cost: parseFloat(pricingUnitData.currentCostPerUnit), | ||
isDefault: pricingUnitData.default, | ||
extraInfo: pricingUnitData.unitExtraInfo, | ||
specificInfo: pricingUnitData.specificInfo || null, | ||
}); | ||
}, | ||
|
||
properties: { | ||
pricingUnitId: { | ||
check: "Number", | ||
nullable: true, | ||
init: null, | ||
event: "changePricingUnitId" | ||
}, | ||
|
||
classification: { | ||
check: ["TIER", "LICENSE"], | ||
nullable: false, | ||
init: null, | ||
event: "changeClassification" | ||
}, | ||
|
||
name: { | ||
check: "String", | ||
nullable: false, | ||
init: null, | ||
event: "changeName" | ||
}, | ||
|
||
cost: { | ||
check: "Number", | ||
nullable: false, | ||
init: null, | ||
event: "changeCost" | ||
}, | ||
|
||
isDefault: { | ||
check: "Boolean", | ||
nullable: false, | ||
init: false, | ||
event: "changeIsDefault", | ||
}, | ||
|
||
extraInfo: { | ||
check: "Object", | ||
nullable: false, | ||
init: null, | ||
event: "changeExtraInfo", | ||
}, | ||
|
||
specificInfo: { | ||
check: "Object", | ||
nullable: true, | ||
init: null, | ||
event: "changeSpecificInfo", | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.