Skip to content

Commit a0d9a1d

Browse files
committed
priceDollars
1 parent 6828736 commit a0d9a1d

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

services/static-webserver/client/source/class/osparc/desktop/credits/BuyCreditsStepper.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ qx.Class.define("osparc.desktop.credits.BuyCreditsStepper", {
3131
this.removeAll();
3232
this.__form = new osparc.desktop.credits.BuyCreditsForm(this.__paymentMethods);
3333
this.__form.addListener("submit", e => {
34-
const { amountDollars: priceDollars, osparcCredits, paymentMethodId } = e.getData();
34+
const {
35+
amountDollars: priceDollars,
36+
osparcCredits, paymentMethodId
37+
} = e.getData();
3538
const params = {
3639
url: {
3740
walletId: this.__personalWallet.getWalletId()

services/static-webserver/client/source/class/osparc/desktop/credits/TransactionsTableModel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ qx.Class.define("osparc.desktop.credits.TransactionsTableModel", {
8787
rawData.forEach(rawRow => {
8888
data.push({
8989
date: osparc.utils.Utils.formatDateAndTime(new Date(rawRow.createdAt)),
90-
price: rawRow.priceDollars ? rawRow.priceDollars.toFixed(2) : 0,
91-
credits: rawRow.osparcCredits ? rawRow.osparcCredits.toFixed(2) * 1 : 0,
90+
price: rawRow.priceDollars ? parseFloat(rawRow.priceDollars).toFixed(2) : 0,
91+
credits: rawRow.osparcCredits ? parseFloat(rawRow.osparcCredits).toFixed(2) * 1 : 0,
9292
status: this.__addColorTag(rawRow.completedStatus),
9393
comment: rawRow.comment,
9494
invoice: rawRow.invoiceUrl ? this.__createPdfIconWithLink(rawRow.walletId, rawRow.paymentId) : ""

services/static-webserver/client/source/class/osparc/pricing/UnitData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ qx.Class.define("osparc.pricing.UnitData", {
2929
this.set({
3030
pricingUnitId: unitData.pricingUnitId ? unitData.pricingUnitId : null,
3131
unitName: unitData.unitName,
32-
currentCostPerUnit: unitData.currentCostPerUnit,
32+
currentCostPerUnit: parseFloat(unitData.currentCostPerUnit),
3333
comment: unitData.comment ? unitData.comment : "",
3434
awsSpecificInfo: unitData.specificInfo && unitData.specificInfo["aws_ec2_instances"] ? unitData.specificInfo["aws_ec2_instances"].toString() : "",
3535
unitExtraInfo: unitData.unitExtraInfo,

services/static-webserver/client/source/class/osparc/pricing/UnitEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ qx.Class.define("osparc.pricing.UnitEditor", {
5050
this.set({
5151
pricingUnitId: pricingUnitData.pricingUnitId,
5252
unitName: pricingUnitData.unitName,
53-
costPerUnit: pricingUnitData.currentCostPerUnit,
53+
costPerUnit: parseFloat(pricingUnitData.currentCostPerUnit),
5454
comment: pricingUnitData.comment ? pricingUnitData.comment : "",
5555
specificInfo: pricingUnitData.specificInfo && pricingUnitData.specificInfo["aws_ec2_instances"] ? pricingUnitData.specificInfo["aws_ec2_instances"].toString() : "",
5656
default: pricingUnitData.default

0 commit comments

Comments
 (0)