Sprint 19: Social, UX-Verbesserungen, Nerd2Noob-Hilfe

This commit is contained in:
rene 2026-04-17 23:53:50 +02:00
parent 10d30bf565
commit 89d87030a2
18 changed files with 930 additions and 74 deletions

View file

@ -139,6 +139,9 @@ const API = (() => {
symptomCheck(dogId, symptoms) {
return post(`/dogs/${dogId}/health/symptom-check`, { symptoms });
},
gewichtVerlauf(dogId) {
return get(`/dogs/${dogId}/health/gewicht`);
},
};
// ----------------------------------------------------------
@ -230,10 +233,13 @@ const API = (() => {
const q = new URLSearchParams(params).toString();
return get(`/events${q ? '?' + q : ''}`);
},
get(id) { return get(`/events/${id}`); },
create(data) { return post('/events', data); },
update(id, data) { return patch(`/events/${id}`, data); },
delete(id) { return del(`/events/${id}`); },
get(id) { return get(`/events/${id}`); },
create(data) { return post('/events', data); },
update(id, data) { return patch(`/events/${id}`, data); },
delete(id) { return del(`/events/${id}`); },
rsvp(id, status) { return post(`/events/${id}/rsvp`, { status }); },
cancelRsvp(id) { return del(`/events/${id}/rsvp`); },
listRsvp(id) { return get(`/events/${id}/rsvp`); },
};
// ----------------------------------------------------------
@ -445,6 +451,20 @@ const API = (() => {
delete(id) { return del(`/notifications/${id}`); },
};
// ----------------------------------------------------------
// SERVICE-ANGEBOTE (Sitting & Walks Matching)
// ----------------------------------------------------------
const services = {
list(type, lat = null, lon = null, radius = 20) {
const p = new URLSearchParams({ type, radius });
if (lat !== null) { p.set('lat', lat); p.set('lon', lon); }
return get(`/services?${p}`);
},
me() { return get('/services/me'); },
upsert(data) { return post('/services', data); },
deactivate(id) { return del(`/services/${id}`); },
};
const importData = {
notestation(dogId, file) {
const fd = new FormData();
@ -477,7 +497,7 @@ const API = (() => {
get, post, put, patch, del, upload,
auth, dogs, diary, health, tieraerzte, poison,
places, routes, walks, events, sitting, forum, lost, knigge, weather, push,
friends, chat, webcal, importData, sharing, widget, notifications,
friends, chat, webcal, importData, sharing, widget, notifications, services,
subscribeToPush, getLocation,
APIError,
};