Feature/ab#2095 add config dialog#4
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a configuration dialog to the admin portal, enabling administrators to modify application configuration values after deployment. The feature introduces a new tab in the configuration view with a form for editing configuration items grouped by category.
Changes:
- Added a new "Anwendungskonfiguration" (Application Configuration) tab to the configuration view
- Created ConfigApplication.vue component to display and edit configuration items
- Added ConfigurationItemDTO interface for configuration item data structure
- Extended ConfigurationService with methods to fetch and save all configuration values
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 13 comments.
| File | Description |
|---|---|
| frontend/src/views/ConfigView.vue | Added new configuration tab and imported ConfigApplication component |
| frontend/src/types/configuration/ConfigurationItemDTO.ts | Defined interface for configuration items with fields for key, value, category, and datatype |
| frontend/src/components/config/ConfigApplication.vue | Implemented UI component for displaying and editing configuration values grouped by category |
| frontend/src/api/service/ConfigurationService.ts | Added API methods to fetch all configuration values and save configuration changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function saveConfigValues() { | ||
| ConfigurationService.saveConfiguration(configItems.value).then(() => { | ||
| loadConfigValues(); | ||
| }); | ||
| } |
There was a problem hiding this comment.
After successfully saving configuration values, there's no success feedback shown to the user. Add a success message using snackbarStore.showSuccess similar to other config components like ConfigDienstleister.vue:547-550 and ConfigEmailAddress.vue:223-226.
| <v-card-actions style="position: absolute; bottom: 0; right: 0"> | ||
| <v-spacer></v-spacer> | ||
| <v-btn | ||
| text="Speichern" | ||
| color="secondary" | ||
| variant="elevated" | ||
| @click="saveConfigValues" | ||
| /> | ||
| </v-card-actions> |
There was a problem hiding this comment.
The save button uses absolute positioning (position: absolute; bottom: 0; right: 0) which could overlap with content when there are many configuration items and the user scrolls. The parent v-card has overflow-y-auto, but the absolutely positioned button will remain fixed at the bottom of the v-card, potentially covering content. Consider using a sticky footer or adjusting the padding-bottom on v-card-text to prevent content from being hidden behind the button.
| }, {} as Record<string, ConfigurationItemDTO[]>); | ||
| }); | ||
|
|
||
| loadConfigValues(); |
There was a problem hiding this comment.
The loadConfigValues function is called at the top level of the script setup (line 61) instead of within an onMounted hook. While this works, it's inconsistent with other config components in the codebase (e.g., ConfigDienstleister.vue:383, ConfigEmailAddress.vue:178) which use onMounted for initial data loading. Consider wrapping the call in onMounted for consistency.
Description
Admin portal now has a configuration dialog, with which values can be changed after deployment.
Issue References
Definition of Done