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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user