move formatCurrency to commonjs
This commit is contained in:
parent
1bedaaeecf
commit
479183ea13
@ -1,3 +1,5 @@
|
||||
import {formatCurrency} from "./common.js"
|
||||
|
||||
export function showTable(api) {
|
||||
let token = localStorage.getItem("token");
|
||||
let tbody = document.getElementById("sales-table").getElementsByTagName("tbody")[0];
|
||||
@ -43,11 +45,3 @@ export function showTable(api) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function formatCurrency(amount) {
|
||||
let c = parseFloat(amount/100);
|
||||
return c.toLocaleString("fr-FR", {
|
||||
style:"currency",
|
||||
currency: "EUR",
|
||||
});
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import {formatCurrency} from "./common.js"
|
||||
|
||||
export function showTable(api) {
|
||||
let token = localStorage.getItem("token");
|
||||
let tbody = document.getElementById("subscriptions-table").getElementsByTagName("tbody")[0];
|
||||
@ -44,11 +46,3 @@ export function showTable(api) {
|
||||
});
|
||||
}
|
||||
|
||||
function formatCurrency(amount) {
|
||||
let c = parseFloat(amount/100);
|
||||
return c.toLocaleString("fr-FR", {
|
||||
style:"currency",
|
||||
currency: "EUR",
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -91,3 +91,10 @@ export function checkAuth(api) {
|
||||
}
|
||||
}
|
||||
|
||||
export function formatCurrency(amount) {
|
||||
let c = parseFloat(amount/100);
|
||||
return c.toLocaleString("fr-FR", {
|
||||
style:"currency",
|
||||
currency: "EUR",
|
||||
});
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import {formatCurrency} from "./common.js"
|
||||
|
||||
export function showInfo(api) {
|
||||
let token = localStorage.getItem("token");
|
||||
let id = window.location.pathname.split("/").pop();
|
||||
@ -24,12 +26,3 @@ export function showInfo(api) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function formatCurrency(amount) {
|
||||
let c = parseFloat(amount/100);
|
||||
return c.toLocaleString("fr-FR", {
|
||||
style:"currency",
|
||||
currency: "EUR",
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user