Changeset View
Changeset View
Standalone View
Standalone View
src/resources/js/app.js
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | methods: { | ||||
if (!error.response) { | if (!error.response) { | ||||
console.error(error) | console.error(error) | ||||
} | } | ||||
this.errorPage(status, message) | this.errorPage(status, message) | ||||
} | } | ||||
}, | }, | ||||
price(price, currency) { | price(price, currency) { | ||||
if (currency.toLowerCase() == 'btc') { | |||||
return ((price || 0) / 100).toLocaleString('de-DE', { style: 'currency', currency: 'BTC', minimumFractionDigits: 6, maximumFractionDigits: 9}) | |||||
} | |||||
// TODO: Set locale argument according to the currently used locale | // TODO: Set locale argument according to the currently used locale | ||||
return ((price || 0) / 100).toLocaleString('de-DE', { style: 'currency', currency: currency || 'CHF' }) | return ((price || 0) / 100).toLocaleString('de-DE', { style: 'currency', currency: currency || 'CHF' }) | ||||
}, | }, | ||||
priceLabel(cost, discount, currency) { | priceLabel(cost, discount, currency) { | ||||
let index = '' | let index = '' | ||||
if (discount) { | if (discount) { | ||||
cost = Math.floor(cost * ((100 - discount) / 100)) | cost = Math.floor(cost * ((100 - discount) / 100)) | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |