Skip to content

Commit

Permalink
fix(pci-object-storage): round price to integer
Browse files Browse the repository at this point in the history
ref: TAPC-2792

Signed-off-by: Simon Chaumet <[email protected]>
  • Loading branch information
SimonChaumet committed Feb 4, 2025
1 parent 828daab commit d6ecde4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ export default class PciStoragesContainersAddController {
maximumFractionDigits: 2,
},
);
this.OffsiteReplicationPriceFormatter = new Intl.NumberFormat(
this.coreConfig.getUserLocale().replace('_', '-'),
{
style: 'currency',
currency: this.coreConfig.getUser().currency.code,
maximumFractionDigits: 0,
},
);

this.featureFlipLocalzoneContainer();
this.setOffersPrices();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ <h2 class="oui-header__description mb-5">
data-on-offsite-replication-change="$ctrl.handleOffsiteReplicationChange(replication)"
data-offsite-replication-price="$ctrl.OFFSITE_REPLICATION_PRICE"
data-estimated-price="$ctrl.DEPLOYMENT_PRICE"
data-price-formatter="$ctrl.PriceFormatter"
data-price-formatter="$ctrl.OffsiteReplicationPriceFormatter"
></pci-project-storages-offsite-replication>
</oui-step-form>

Expand Down

0 comments on commit d6ecde4

Please sign in to comment.