diff --git a/apps/frontend/src/components/data/AnmeldungenTable.vue b/apps/frontend/src/components/data/AnmeldungenTable.vue
index c916b2a2..93679c1f 100644
--- a/apps/frontend/src/components/data/AnmeldungenTable.vue
+++ b/apps/frontend/src/components/data/AnmeldungenTable.vue
@@ -141,8 +141,8 @@ const { execute: updateAnmeldung } = useAsyncState(
weitereIntoleranzen: anmeldung.essgewohnheiten.weitereIntoleranzen,
},
}
+ await apiClient.person.patch.mutate(data)
if (loggedInAccount.value?.role === 'ADMIN') {
- await apiClient.person.verwaltungPatch.mutate(data)
await apiClient.anmeldung.verwaltungPatch.mutate({
id: selectedAnmeldungId.value,
data: {
@@ -150,7 +150,6 @@ const { execute: updateAnmeldung } = useAsyncState(
},
})
} else {
- await apiClient.person.gliederungPatch.mutate(data)
await apiClient.anmeldung.gliederungPatch.mutate({
id: selectedAnmeldungId.value,
data: {
diff --git a/apps/frontend/src/components/forms/person/PersonPhotoUpload.vue b/apps/frontend/src/components/forms/person/PersonPhotoUpload.vue
index a7312edf..59f5e448 100644
--- a/apps/frontend/src/components/forms/person/PersonPhotoUpload.vue
+++ b/apps/frontend/src/components/forms/person/PersonPhotoUpload.vue
@@ -35,7 +35,7 @@ async function onFileChanged(event: Event) {
if (!file) return
const res = await handleUpload(file)
- await apiClient.person.verwaltungPatch.mutate({
+ await apiClient.person.patch.mutate({
id: props.person.id,
data: {
photoId: res.id,
@@ -46,7 +46,7 @@ async function onFileChanged(event: Event) {
}
async function handleFileDelete() {
- await apiClient.person.verwaltungPatch.mutate({
+ await apiClient.person.patch.mutate({
id: props.person.id,
data: {
photoId: null,
diff --git a/apps/frontend/src/components/forms/unterveranstaltung/FormUnterveranstaltungLandingSettings.vue b/apps/frontend/src/components/forms/unterveranstaltung/FormUnterveranstaltungLandingSettings.vue
index 0ba156ea..1f191f3f 100644
--- a/apps/frontend/src/components/forms/unterveranstaltung/FormUnterveranstaltungLandingSettings.vue
+++ b/apps/frontend/src/components/forms/unterveranstaltung/FormUnterveranstaltungLandingSettings.vue
@@ -152,7 +152,6 @@ async function onFileChanged($event: Event) {
async function deleteHeroImages(image, index) {
heroImages.value.splice(index, 1)
if (!image.added) {
- console.log('deleteHeroImages', image)
deletedHeroImagesIds.value.push(image.id)
}
}
diff --git a/apps/frontend/src/views/Anmeldung/FotoUpload.vue b/apps/frontend/src/views/Anmeldung/FotoUpload.vue
index 83cddbca..70dba903 100644
--- a/apps/frontend/src/views/Anmeldung/FotoUpload.vue
+++ b/apps/frontend/src/views/Anmeldung/FotoUpload.vue
@@ -7,12 +7,18 @@ import Loading from '@/components/UIComponents/Loading.vue'
import { handlePublicPhotoUpload } from '@/helpers/handleUpload'
import { injectUnterveranstaltung } from '@/layouts/AnmeldungLayout.vue'
import { useAsyncState } from '@vueuse/core'
-import { ref, watch } from 'vue'
+import { computed, ref, useTemplateRef, watch } from 'vue'
+import { dayjs } from '@codeanker/helpers'
+import cn from '@/helpers/cn'
const route = useRoute()
+const uploader = useTemplateRef('uploader')
+
const unterveranstaltung = injectUnterveranstaltung()
+const meldeschlussErreicht = computed(() => dayjs().isAfter(unterveranstaltung.value.meldeschluss))
+
const anmeldungId = route.params.anmeldungId as string
const accessToken = route.query.accessToken as string
@@ -27,14 +33,32 @@ const { state, execute, error } = useAsyncState(
{ immediate: false }
)
+const { state: currentPhotoUrl, execute: loadPhoto } = useAsyncState(
+ async () => {
+ if (!state.value?.person.photoId) {
+ return null
+ }
+ return await apiClient.file.fileGetUrl.query({ id: state.value.person.photoId })
+ },
+ null,
+ { immediate: false }
+)
+
watch(unterveranstaltung, (unterveranstaltung) => {
if (unterveranstaltung) {
execute()
}
})
+watch(state, (state) => {
+ if (state?.person.photoId) {
+ loadPhoto()
+ }
+})
+
const uploadPending = ref(false)
const uploadSuccess = ref(false)
+const uploadError = ref
()
async function upload(toUploadFile: File) {
uploadPending.value = true
try {
@@ -43,16 +67,20 @@ async function upload(toUploadFile: File) {
anmeldungId: parseInt(anmeldungId),
accessToken,
})
- console.log(res)
await apiClient.anmeldung.anmeldungFotoUpload.mutate({
unterveranstaltungId: unterveranstaltung.value.id,
anmeldungId: parseInt(anmeldungId),
accessToken,
fileId: res.id,
})
+ await execute()
+ await loadPhoto()
uploadSuccess.value = true
} catch (error) {
console.error(error)
+ if (error instanceof Error) {
+ uploadError.value = error
+ }
}
uploadPending.value = false
}
@@ -60,17 +88,12 @@ async function upload(toUploadFile: File) {
-
Fotoupload
-
Ein Fehler ist aufgetreten
{{ error }}
-
- Das Bild wurde hochgeladen!
-
Lade Daten …
@@ -78,37 +101,108 @@ async function upload(toUploadFile: File) {
Die angegeben Daten konnten nicht verifiziert werden. Wahrscheinlich ist der Zugangstoken falsch!
-
-
- Vielen Dank für die Anmeldung von {{ state.person.firstname }} {{ state.person.lastname }} zur
- Veranstaltung {{ state.unterveranstaltung.veranstaltung.name }}
-
+
+
+
Fotoupload
+
+ Vielen Dank für die Anmeldung von {{ state.person.firstname }} {{ state.person.lastname }} zur
+ Veranstaltung {{ state.unterveranstaltung.veranstaltung.name }}.
+
+
+
+ Leider ist der Meldeschluss bereits erreicht.
+
+
+
+ Lade hier ein Bild von {{ state.person.firstname }} {{ state.person.lastname }} hoch. Dieses wird
+ dann bspw. für Teilnehmendenausweise verwendet.
+
+
+ Wichtig: Bitte achte darauf, dass das Foto möglichst quadratisch ist (gleiche Höhe wie
+ Breite).
+
+
+
+
+ dein Bild wird hochgeladen
+
+
+
{{ uploadError.message }}
+
+
+ Das Bild wurde hochgeladen!
+
-
-
-
-
- dein Bild wird hochgeladen
-
-
+ Aktuelles Foto
+
-
+
+
+
diff --git a/apps/frontend/src/views/Verwaltung/Accounts/AccountList.vue b/apps/frontend/src/views/Verwaltung/Accounts/AccountList.vue
index ab0fc6b6..0f4e3fdf 100644
--- a/apps/frontend/src/views/Verwaltung/Accounts/AccountList.vue
+++ b/apps/frontend/src/views/Verwaltung/Accounts/AccountList.vue
@@ -171,18 +171,20 @@ function changeTab(index: number) {
Account anlegen
- router.push({ name: 'Verwaltung Accountdetails', params: { accountId: account.id } })
- "
- />
+
+ router.push({ name: 'Verwaltung Accountdetails', params: { accountId: account.id } })
+ "
+ />
+
diff --git a/apps/frontend/src/views/Verwaltung/Persons/PersonDetail.vue b/apps/frontend/src/views/Verwaltung/Persons/PersonDetail.vue
index 2fc76b25..984620a6 100644
--- a/apps/frontend/src/views/Verwaltung/Persons/PersonDetail.vue
+++ b/apps/frontend/src/views/Verwaltung/Persons/PersonDetail.vue
@@ -41,7 +41,7 @@ const { execute: update } = useAsyncState(
})
.map((entry) => entry[0] as NahrungsmittelIntoleranz)
- await apiClient.person.verwaltungPatch.mutate({
+ await apiClient.person.patch.mutate({
id: person.value!.id,
data: {
gliederungId: anmeldung.gliederung.id,
diff --git a/package.json b/package.json
index 40ac46ed..6f338a97 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "codeanker-project",
"author": "CODEANKER GmbH",
- "version": "2.0.1",
+ "version": "2.1.1",
"description": "",
"license": "CC-BY-3.0-DE",
"workspaces": [
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ad8f165c..366332ca 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -6,9 +6,6 @@ settings:
catalogs:
default:
- '@eslint/js':
- specifier: ^9.17.0
- version: 9.19.0
'@tiptap/extension-document':
specifier: ^2.11.0
version: 2.11.5
@@ -36,9 +33,6 @@ catalogs:
'@trpc/client':
specifier: 11.0.0-rc.682
version: 11.0.0-rc.682
- '@trpc/server':
- specifier: 11.0.0-rc.682
- version: 11.0.0-rc.682
'@types/node':
specifier: ^22.10.2
version: 22.10.2
@@ -51,9 +45,6 @@ catalogs:
typescript:
specifier: ^5.7.2
version: 5.7.2
- typescript-eslint:
- specifier: ^8.18.2
- version: 8.18.2
vue:
specifier: ^3.5.13
version: 3.5.13
@@ -334,6 +325,9 @@ importers:
http2-proxy:
specifier: ^5.0.53
version: 5.0.53
+ human-filetypes:
+ specifier: ^1.1.3
+ version: 1.1.3
intl-tel-input:
specifier: ^24.4.0
version: 24.8.2
@@ -3321,6 +3315,9 @@ packages:
resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==}
engines: {node: '>= 14'}
+ human-filetypes@1.1.3:
+ resolution: {integrity: sha512-vtGxjtt0pdKULyCD3juFr0gjxSU3tJb995/oZN84LHP45HGryg1/2xJCLvoKw6zEpWfVCZiFNaGLOF16u28Bbg==}
+
husky@8.0.3:
resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==}
engines: {node: '>=14'}
@@ -7822,6 +7819,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ human-filetypes@1.1.3: {}
+
husky@8.0.3: {}
iconv-lite@0.4.24: