diff --git a/frontend/src/views/ClubView.vue b/frontend/src/views/ClubView.vue index cf272ad7..e60ec508 100644 --- a/frontend/src/views/ClubView.vue +++ b/frontend/src/views/ClubView.vue @@ -23,7 +23,10 @@
{{ $t('club.noAccess') }}
- +
+ {{ $t('club.accessRequested') }} +
+
@@ -80,7 +83,8 @@ export default { name: '', }, openRequests: [], - accessAllowed: false + accessAllowed: false, + accessRequested: false } }, methods: { @@ -152,12 +156,19 @@ export default { }, async requestAccess() { try { + if (this.accessRequested) return; const clubId = this.getClubId(); const response = await apiClient.get(`/clubs/request/${clubId}`); if (response.status === 200) { + this.accessRequested = true; await this.showInfo(this.$t('messages.info'), this.$t('club.accessRequested'), '', 'info'); } } catch (error) { + if (error?.response?.status === 409) { + this.accessRequested = true; + await this.showInfo(this.$t('messages.info'), this.$t('club.accessRequested'), '', 'info'); + return; + } const message = safeErrorMessage(error, this.$t('club.accessRequestFailed')); await this.showInfo(this.$t('messages.error'), message, '', 'error'); } @@ -230,4 +241,9 @@ ul { .gender-symbol.gender-unknown { color: #444; } .gender-symbol { margin-right: .35rem; opacity: .9; font-size: 1.05em; display: inline-block; width: 1.1em; text-align: center; } .is-test { font-style: italic; } +.access-requested { + margin: 0.5rem 0; + color: #2e7d32; + font-weight: 600; +}