Enhance logging and error handling in FalukantService and FamilyView

- Added detailed logging for partner search and creation processes in FalukantService to improve traceability and debugging.
- Refactored the partner search logic to use a dynamic where clause for better readability and maintainability.
- Implemented error handling in FamilyView's loadGifts method to ensure an empty array is returned on API errors, enhancing user experience.
This commit is contained in:
Torsten Schulz (local)
2026-01-09 14:32:27 +01:00
parent 3722bcf8c8
commit c80cc8ec86
2 changed files with 81 additions and 33 deletions

View File

@@ -295,8 +295,13 @@ export default {
},
async loadGifts() {
const response = await apiClient.get('/api/falukant/family/gifts');
this.gifts = response.data;
try {
const response = await apiClient.get('/api/falukant/family/gifts');
this.gifts = response.data || [];
} catch (error) {
console.error('Error loading gifts:', error);
this.gifts = []; // Leeres Array bei Fehler
}
},
async sendGift() {