Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5de4597c3 |
No files matched your search
@@ -66,7 +66,7 @@ def create_order(customer_id: ID, order_lines: List[OrderLineInput], is_external
|
|||||||
product.inventory_amount -= ol.amount
|
product.inventory_amount -= ol.amount
|
||||||
product.save()
|
product.save()
|
||||||
|
|
||||||
if not is_external and user.profile.balance <= order_sum:
|
if not is_external and user.profile.balance < order_sum:
|
||||||
return InsufficientFunds(
|
return InsufficientFunds(
|
||||||
message="Du har ikke nok penger på bok.", amount_lacking=abs(order_sum - user.profile.balance)
|
message="Du har ikke nok penger på bok.", amount_lacking=abs(order_sum - user.profile.balance)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { NavLink } from "react-router-dom";
|
|||||||
import styles from "./Header.module.css";
|
import styles from "./Header.module.css";
|
||||||
|
|
||||||
const ADMIN_URL = `${import.meta.env.VITE_API_URL}/admin/`;
|
const ADMIN_URL = `${import.meta.env.VITE_API_URL}/admin/`;
|
||||||
const LOGOUT_URL = `${import.meta.env.VITE_API_URL}/`.replace("://", "://none:none@");
|
|
||||||
|
|
||||||
const navLinkStyles = ({ isActive }: { isActive: boolean }) => clsx(styles.navLink, { [styles.active]: isActive });
|
const navLinkStyles = ({ isActive }: { isActive: boolean }) => clsx(styles.navLink, { [styles.active]: isActive });
|
||||||
|
|
||||||
@@ -49,11 +48,6 @@ export const Header = (): JSX.Element => {
|
|||||||
Admin
|
Admin
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a href={LOGOUT_URL} className={styles.navLink}>
|
|
||||||
Logg ut
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Reference in new issue
Block a user