Skip to content

Commit

Permalink
Merge branch 'master' into introduce-get-wallets-endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis authored Oct 11, 2023
2 parents 3b387e2 + a8d2126 commit 5d1f196
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ qx.Class.define("osparc.po.Invitations", {
});
form.add(userEmail, this.tr("User Email"));

const extraCredits = new qx.ui.form.Spinner().set({
minimum: 0,
maximum: 1000,
value: 0
});
form.add(extraCredits, this.tr("Welcome Credits"));

const withExpiration = new qx.ui.form.CheckBox().set({
value: false
});
Expand Down Expand Up @@ -130,6 +137,9 @@ qx.Class.define("osparc.po.Invitations", {
"guest": userEmail.getValue()
}
};
if (extraCredits.getValue() > 0) {
params.data["extraCredits"] = extraCredits.getValue();
}
if (withExpiration.getValue()) {
params.data["trialAccountDays"] = trialDays.getValue();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,20 @@ qx.Class.define("osparc.study.TierButton", {
value: pricingUnit.unitName,
font: "text-16"
}));
// add tier extra info
// add price info
this._add(new qx.ui.basic.Label().set({
value: qx.locale.Manager.tr("Credits/h") + ": " + pricingUnit.currentCostPerUnit,
font: "text-14"
}));
// add tier extra info
if ("unitExtraInfo" in pricingUnit) {
Object.entries(pricingUnit.unitExtraInfo).forEach(([key, value]) => {
this._add(new qx.ui.basic.Label().set({
value: key + ": " + value,
font: "text-13"
}));
});
}
} else {
this._setLayout(new qx.ui.layout.HBox(5));
this._add(new qx.ui.basic.Label().set({
Expand Down

0 comments on commit 5d1f196

Please sign in to comment.