💄 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>
|
||||
{(order.orderlines ?? []).map((line) => (
|
||||
<div key={line.id}>
|
||||
{line.amount}x {line.product.name}
|
||||
{Number(line.amount)}x {line.product.name}
|
||||
</div>
|
||||
))}
|
||||
</td>
|
||||
<td>{order.orderSum}</td>
|
||||
<td>{Number(order.orderSum)}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
@@ -104,7 +104,7 @@ const Log = () => {
|
||||
<td>
|
||||
{trans.user.firstName} {trans.user.lastName}
|
||||
</td>
|
||||
<td>{trans.amount}</td>
|
||||
<td>{Number(trans.amount)}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
@@ -53,7 +53,7 @@ export const useRegister = () => {
|
||||
setOrder(newOrder);
|
||||
};
|
||||
|
||||
const total = sumTotal(products, order, selectedUser === USER_EXTERNAL);
|
||||
const total = Number(sumTotal(products, order, selectedUser === USER_EXTERNAL).toFixed(2));
|
||||
|
||||
const onSubmit = async () => {
|
||||
let res;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const UserCard = ({ user, onUser, active = false }: UserCardProps): JSX.E
|
||||
</div>
|
||||
<div className={styles.meta}>
|
||||
{user?.firstName || "Ekstern"}
|
||||
<span className={styles.balance}>{user?.profile?.balance || ""}</span>
|
||||
<span className={styles.balance}>{Number(user?.profile?.balance) || ""}</span>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user