Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: update main from develop #450

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<!-- Centered Name Beneath Logo -->
<h1>SudoSOS Frontend Monorepo</h1>

[![Uptime](https://uptime.gewis.nl/api/badge/2/uptime)](https://sudosos.gewis.nl/api/v1/ping)
[![Build](https://img.shields.io/github/actions/workflow/status/GEWIS/sudosos-frontend/semver.yml?branch=main&label=Build)](https://github.com/GEWIS/sudosos-frontend/actions/workflows/semver.yml)
[![Latest Release](https://img.shields.io/github/v/tag/GEWIS/sudosos-frontend?label=Latest)](https://github.com/GEWIS/sudosos-frontend/releases)
[![Issues](https://img.shields.io/github/issues/GEWIS/sudosos-frontend)](https://github.com/GEWIS/sudosos-frontend/issues)
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/stores/settings.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const useSettingsStore = defineStore('settings', {
},
async fetchStripe(){
await apiService.stripe.getStripePublicKey().then((res) =>{
this.stripe = res.data;
this.stripe = (res.data as any).publicKey as string;
});
},
async fetchKeys(){
Expand Down
2 changes: 1 addition & 1 deletion apps/point-of-sale/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="manifest" href="favicon/manifest.json">
<script>
// @ts-ignore
window.__BASE_URL__ = ((path) => path !== '//' ? `/${path}/` : '/')
window.__BASE_URL__ = ((path) => path !== '' ? `/${path}/` : '')
(window.location.pathname.split('/')[1] || '');
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
Expand Down
2 changes: 1 addition & 1 deletion apps/point-of-sale/src/components/Cart/CartComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const transactions = ref<BaseTransactionResponse[]>([]);

const getUserRecentTransactions = () => {
transactions.value = [];
if (cartStore.getBuyer) {
if (cartStore.getBuyer && (cartStore.getBuyer.id === authStore.getUser?.id || settings.isBorrelmode)) {
// todo clean up
apiService.user
.getUsersTransactions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
<template>
<div class="flex-column h-full gap-2 mt-2 overflow-y-auto">
<h class="font-medium text-xl">Recent Purchases:</h>
<h1 class="font-medium text-xl" v-if="transactions.length > 0">Recent Purchases:</h1>
<TransactionHistoryRowComponent
v-for="transaction in transactions"
:key="transaction.id"
Expand Down
2 changes: 1 addition & 1 deletion apps/point-of-sale/src/stores/cart.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const useCartStore = defineStore('cart', {
async setBuyer(buyer: BaseUserResponse | null) {
this.buyer = buyer;
if (buyer) {
const response = await apiService.balance.getBalanceId(buyer.id);
const response = await apiService.balance.getBalanceId(buyer.id).catch(this.buyerBalance = null);
this.buyerBalance = response.data.amount;
} else {
this.buyerBalance = null;
Expand Down
7 changes: 6 additions & 1 deletion apps/point-of-sale/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ export default defineConfig(({ mode }) => {
'/api/v1': {
target: PROXY_URL + '/api/v1',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
rewrite: (path) => path.replace(/^\/api\/v1/, ''),
},
'/static': {
target: PROXY_URL + '/static',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/static/, ''),
}
}
}
Expand Down
Loading