Skip to content

Commit

Permalink
🔤 typing (App Frontend): Fixes
Browse files Browse the repository at this point in the history
branch: dashboard
  • Loading branch information
Strehk committed Sep 15, 2024
1 parent 819a0f2 commit b8a7e80
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/api/auth/abilities/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { Capitalize } from '@sinclair/typebox';
import { defineAbilitiesForDelegationMemberEntity } from './entities/delegationMember';
import { defineAbilitiesForCommittee } from './entities/committee';

const actions = ['list', 'create', 'read', 'update', 'delete'] as const;
const actions = ['list', 'create', 'read', 'update', 'delete', 'join'] as const;
export const oidcRoles = ['admin', 'member', 'service_user'] as const;

/**
Expand Down
8 changes: 4 additions & 4 deletions src/api/routes/delegation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export const delegation = new Elysia()
where: {
conferenceId_userId: {
conferenceId: delegation.conferenceId,
userId: user.sub
userId: user.sub!
}
}
});
Expand Down Expand Up @@ -431,7 +431,7 @@ export const delegation = new Elysia()
where: {
delegationId_userId: {
delegationId: delegation.id,
userId: user.sub
userId: user.sub!
}
},
data: {
Expand Down Expand Up @@ -472,7 +472,7 @@ export const delegation = new Elysia()
where: {
delegationId_userId: {
delegationId: delegation.id,
userId: user.sub
userId: user.sub!
}
},
select: {
Expand All @@ -485,7 +485,7 @@ export const delegation = new Elysia()
where: {
delegationId_userId: {
delegationId: delegation.id,
userId: user.sub
userId: user.sub!
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/api/routes/singleParticipant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const singleParticipant = new Elysia()
where: {
conferenceId_userId: {
conferenceId: body.conference.connect.id,
userId: user.sub
userId: user.sub!
}
},
create: {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(authenticated)/dashboard/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div
class="carousel carousel-center bg-base-200 dark:bg-base-300 shadow-inner rounded-box w-full space-x-6 p-6"
>
{#each data.conferences.filter((x) => x.status === ('PRE' || 'ACTIVE')) as conference}
{#each data.conferences.filter((x) => x.status === 'PRE' || x.status === 'ACTIVE') as conference}
<ConferenceCard {...conference} btnText="Zur Konferenz" baseSlug="/dashboard" />
{/each}
<a href="/registration" class="carousel-item max-w-96 w-[90%]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
{
title: m.todoEnterDelegationPreferences(),
completed: data.delegationData.appliedForRoles?.length >= 3 ?? undefined,
completed: data.delegationData.appliedForRoles.length >= 3,
help: m.todoEnterDelegationPreferencesHelp()
},
{
Expand Down Expand Up @@ -384,7 +384,7 @@
<TodoTable {todos} />
<button
class="btn btn-success mt-4"
disabled={(todos.filter((x) => x.completed === false).length > 1 ?? true) ||
disabled={(todos.filter((x) => x.completed === false).length > 1) ||
!userIsHeadDelegate}
onclick={completeRegistration}
>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(authenticated)/my-account/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
const onPersonalDataFormSubmit = async (e: Event) => {
e.preventDefault();
await api.user.me.patch({
await api.user({ id: data.user.sub }).patch({
phone,
street,
apartment,
Expand Down

0 comments on commit b8a7e80

Please sign in to comment.