Enhance partner search and gift loading functionality in FalukantService and FamilyView

- Added detailed logging for partner search criteria and results in FalukantService to improve debugging and traceability.
- Refactored partner search logic to use a dynamic where clause for better readability and maintainability.
- Implemented error handling in FamilyView for gift loading, ensuring an empty array is set on failure to load gifts, enhancing user experience.
This commit is contained in:
Torsten Schulz (local)
2026-01-09 14:28:01 +01:00
parent 5ddb099f5a
commit 1674086c73
2 changed files with 75 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() {