💄 Hide trailing decimal zeros
This commit is contained in:
1 parent
19f58211e7
commit
57a6c412d5
3 files changed
+5
-5
No files matched your search
@@ -51,11 +51,11 @@ const Log = () => {
|
|||||||
<td>
|
<td>
|
||||||
{(order.orderlines ?? []).map((line) => (
|
{(order.orderlines ?? []).map((line) => (
|
||||||
<div key={line.id}>
|
<div key={line.id}>
|
||||||
{line.amount}x {line.product.name}
|
{Number(line.amount)}x {line.product.name}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</td>
|
</td>
|
||||||
<td>{order.orderSum}</td>
|
<td>{Number(order.orderSum)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -104,7 +104,7 @@ const Log = () => {
|
|||||||
<td>
|
<td>
|
||||||
{trans.user.firstName} {trans.user.lastName}
|
{trans.user.firstName} {trans.user.lastName}
|
||||||
</td>
|
</td>
|
||||||
<td>{trans.amount}</td>
|
<td>{Number(trans.amount)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export const useRegister = () => {
|
|||||||
setOrder(newOrder);
|
setOrder(newOrder);
|
||||||
};
|
};
|
||||||
|
|
||||||
const total = sumTotal(products, order, selectedUser === USER_EXTERNAL);
|
const total = Number(sumTotal(products, order, selectedUser === USER_EXTERNAL).toFixed(2));
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
let res;
|
let res;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const UserCard = ({ user, onUser, active = false }: UserCardProps): JSX.E
|
|||||||
</div>
|
</div>
|
||||||
<div className={styles.meta}>
|
<div className={styles.meta}>
|
||||||
{user?.firstName || "Ekstern"}
|
{user?.firstName || "Ekstern"}
|
||||||
<span className={styles.balance}>{user?.profile?.balance || ""}</span>
|
<span className={styles.balance}>{Number(user?.profile?.balance) || ""}</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user