Refactor FalukantService and update UI components: Removed debug logging from FalukantService, added age requirement messages in i18n files, and improved age validation display in PoliticsView. This enhances user experience and code clarity regarding age eligibility for political applications.
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
|
||||
<!-- OPEN Tab: hier zeigen wir 'openPolitics' -->
|
||||
<div v-else-if="activeTab === 'openPolitics'" class="tab-pane">
|
||||
<p class="politics-age-requirement">{{ $t('falukant.politics.open.ageRequirement') }}</p>
|
||||
<div v-if="loading.openPolitics" class="loading">{{ $t('loading') }}</div>
|
||||
<div v-else class="table-scroll">
|
||||
<table class="politics-table">
|
||||
@@ -65,7 +66,7 @@
|
||||
<th>{{ $t('falukant.politics.open.office') }}</th>
|
||||
<th>{{ $t('falukant.politics.open.region') }}</th>
|
||||
<th>{{ $t('falukant.politics.open.date') }}</th>
|
||||
<th>{{ $t('falukant.politics.open.candidacy') }}</th>
|
||||
<th>{{ $t('falukant.politics.open.candidacyWithAge') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -247,10 +248,6 @@ export default {
|
||||
try {
|
||||
const { data } = await apiClient.get('/api/falukant/politics/open');
|
||||
this.openPolitics = Array.isArray(data) ? data : [];
|
||||
// Debug: Alters-Flag prüfen
|
||||
if (this.openPolitics.length > 0) {
|
||||
console.log('[PoliticsView] loadOpenPolitics: count=', this.openPolitics.length, 'first.canApplyByAge=', this.openPolitics[0].canApplyByAge, 'first.id=', this.openPolitics[0].id);
|
||||
}
|
||||
// Bereits beworbene Positionen vorselektieren, damit die Checkbox
|
||||
// sichtbar markiert bleibt.
|
||||
this.selectedApplications = this.openPolitics
|
||||
@@ -435,6 +432,13 @@ h2 {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.politics-age-requirement {
|
||||
flex: 0 0 auto;
|
||||
margin: 0 0 10px 0;
|
||||
font-size: 0.95em;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
|
||||
Reference in New Issue
Block a user