Feature: Gasthund-Zugang für Sitter

- sitting_subscriptions Tabelle (dog_id, owner_id, sitter_id, valid_until)
- POST/DELETE/GET /api/sitting-access — Zugang gewähren/widerrufen/auflisten
- GET /api/dogs gibt Gasthunde zurück (is_guest=True, sitting_until, owner_name)
- Diary POST erlaubt Sitter-Schreibzugang; PATCH/DELETE nur für Besitzer
- Dog-Switcher: GAST-Badge bei fremden Hunden
- Dog-Profil: Sitter-Zugang-Sektion (nur für Besitzer), Freund auswählen + Datum
- Diary Detail-View: Bearbeiten-Button für Gasthunde ausgeblendet
This commit is contained in:
rene 2026-04-19 10:29:21 +02:00
parent eef787cc72
commit 289158b2cd
10 changed files with 327 additions and 18 deletions

View file

@ -510,6 +510,15 @@ const API = (() => {
deactivate(id) { return del(`/services/${id}`); },
};
// ----------------------------------------------------------
// GASTHUND-ZUGANG
// ----------------------------------------------------------
const sittingAccess = {
grant: (data) => post('/sitting-access', data),
revoke: (id) => del(`/sitting-access/${id}`),
my: () => get('/sitting-access/my'),
};
const importData = {
notestation(dogId, file) {
const fd = new FormData();
@ -542,7 +551,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, services, ratings,
friends, chat, webcal, importData, sharing, widget, notifications, services, ratings, sittingAccess,
subscribeToPush, getLocation,
APIError,
};