Skip to content

Commit

Permalink
fixed remaining typing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Ruf committed Aug 1, 2024
1 parent 734444f commit 19630ac
Show file tree
Hide file tree
Showing 36 changed files with 262 additions and 82 deletions.
145 changes: 145 additions & 0 deletions src/Resources/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/Resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "^3.4.6",
"ts-node": "^10.9.2",
"typescript": "^5.4.0",
"vite": "^5.3.1",
"vite-plugin-vue-devtools": "^7.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/src/components/balance/BalanceHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:translate-x-min="'-18%'"
class="m-auto w-fit"
>
<template #button="{ open }">
<template>
<button
class="hover:bg-highlight-2 btn-highlight-shadow mx-2 mb-6 mt-4 h-9 items-center rounded-btn bg-highlight px-[34px] text-center text-btn font-bold text-white shadow-btn drop-shadow-btn transition-all duration-300 ease-out active:translate-y-0.5 active:shadow-btn-active"
>
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/src/components/balance/TransactionPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<script setup lang="ts">
import { RadarSpinner } from 'epic-spinners';
import { loadScript, type PayPalNamespace } from '@paypal/paypal-js';
import { loadScript } from '@paypal/paypal-js';
import { transactionStore } from '@/stores/transactionStore';
import { useI18n } from 'vue-i18n';
import { type WatchStopHandle, computed, onMounted, onUnmounted, ref, watch } from 'vue';
Expand Down Expand Up @@ -59,7 +59,7 @@ onMounted(async () => {
if (paypal && paypal.Buttons) {
paypal.Buttons({
onInit: function (data, actions) {
onInit: function (_data, actions) {
periodicFetchActive.value = true;
if (amountFieldValue.value > 0.0) {
actions.enable();
Expand All @@ -78,7 +78,7 @@ onMounted(async () => {
}
);
},
createOrder: function (data, actions) {
createOrder: function (_data, actions) {
checkActiveSession();
return actions.order.create({
purchase_units: [
Expand All @@ -92,7 +92,7 @@ onMounted(async () => {
intent: 'CAPTURE'
});
},
onShippingChange: function (data, actions) {
onShippingChange: function (_data, actions) {
return actions.resolve();
},
onApprove: async function (data, actions) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="flex flex-row content-center items-center justify-end justify-items-end sm:gap-4">
<Popover :translate-x-min="'-50%'">
<template #button="{ open }">
<template>
<ActionButton
:action="Action.EDIT"
:btn-text="t('button.edit')"
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/src/components/costs/CostsTableActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:translate-x-min="'-5%'"
:popup-styles="'right-0'"
>
<template #button="{ open }">
<template>
<ActionButton
:action="Action.CREATE"
:btn-text="''"
Expand Down
21 changes: 14 additions & 7 deletions src/Resources/src/components/dashboard/CombiButtonGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,35 +56,42 @@ import { RadioGroup, RadioGroupDescription, RadioGroupLabel, RadioGroupOption }
import { dashboardStore } from '@/stores/dashboardStore';
import { type Meal } from '@/api/getDashboardData';
interface DishInfo {
id: string | number,
title: string,
description: string,
slug: string
}
const props = defineProps<{
weekID: number | string;
dayID: number | string;
mealID: number | string;
meal: Meal;
}>();
const meal = props.meal !== undefined ? props.meal : dashboardStore.getMeal(props.weekID, props.dayID, props.mealID);
const meal = props.meal ?? dashboardStore.getMeal(props.weekID, props.dayID, props.mealID);
const emit = defineEmits(['addEntry', 'removeEntry']);
const selected = ref();
let dishes = [];
let dishes: DishInfo[] = [];
let oldSlug = '';
if (meal.variations) {
for (const variationID in meal.variations) {
dishes.push({
id: variationID,
id: parseInt(String(variationID)),
title: meal.title.en,
description: meal.variations[variationID].title.en,
slug: meal.variations[variationID].dishSlug
slug: meal.variations[variationID].dishSlug ?? ''
});
}
selected.value = dishes[0];
} else {
dishes.push({
id: props.mealID,
id: parseInt(String(props.mealID)),
title: meal.title.en,
description: meal.description.en,
slug: meal.dishSlug
description: meal.description?.en ?? '',
slug: meal.dishSlug ?? ''
});
selected.value = meal.dishSlug;
emit('addEntry', meal.dishSlug);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="inline-flex divide-x-2 print:block print:h-screen">
<div
v-for="(week, weekID, index) in weeks"
v-for="(weekID, index) in Object.keys(weeks)"
:key="index"
class="w-[585px] flex-initial print:mx-auto print:w-full print:last:hidden"
>
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/src/components/dashboard/DashboardWeekTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class="tabs mb-5 justify-center gap-4"
>
<tab
v-for="(week, weekID, index) in weeks"
v-for="(weekID, index) in Object.keys(weeks)"
:key="`t${String(weekID)}`"
:val="weekID"
:label="t('dashboard.' + index)"
Expand All @@ -26,7 +26,7 @@
:swipeable="true"
>
<tab-panel
v-for="(week, weekID, index) in weeks"
v-for="(weekID, index) in Object.keys(weeks)"
:key="`tp${String(weekID)}`"
:val="weekID"
>
Expand Down
1 change: 0 additions & 1 deletion src/Resources/src/components/dashboard/Day.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
</template>

<script setup lang="ts">
import { type GuestDay } from '@/api/getInvitationData';
import GuestButton from '@/components/dashboard/GuestButton.vue';
import InformationButton from '@/components/dashboard/InformationButton.vue';
import MealData from '@/components/dashboard/MealData.vue';
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/src/components/dashboard/GuestLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const url = ref('');
onMounted(async () => {
const { link, error } =
props.invitation === Invitation.MEAL ? await useGuestLink(props.dayID) : await getEventGuestLink(props.dayID);
if (error.value === false) {
if (error.value === false && link.value !== undefined) {
copyTextToClipboard(link.value.url);
url.value = link.value.url;
}
Expand Down
1 change: 1 addition & 0 deletions src/Resources/src/components/dashboard/MealCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const checkboxCSS = computed(() => {
return cssResult;
case MealState.OFFERING:
cssResult += 'bg-highlight cursor-pointer border-0';
return cssResult;
case MealState.OFFERABLE:
cssResult += 'bg-primary-4 cursor-pointer border-0';
return cssResult;
Expand Down
Loading

0 comments on commit 19630ac

Please sign in to comment.