Aufgabenkarten in der Gäste-pwa als swipe-barer Stapel umgesetzt. Sofortiges Freigeben von Foto-Uploads als Event-Einstellung implementiert.
This commit is contained in:
@@ -77,7 +77,10 @@ export type TenantEvent = {
|
||||
active_invites_count?: number;
|
||||
total_invites_count?: number;
|
||||
engagement_mode?: 'tasks' | 'photo_only';
|
||||
settings?: Record<string, unknown> & { engagement_mode?: 'tasks' | 'photo_only' };
|
||||
settings?: Record<string, unknown> & {
|
||||
engagement_mode?: 'tasks' | 'photo_only';
|
||||
guest_upload_visibility?: 'review' | 'immediate';
|
||||
};
|
||||
package?: {
|
||||
id: number | string | null;
|
||||
name: string | null;
|
||||
@@ -1482,6 +1485,22 @@ export async function updatePhotoVisibility(slug: string, id: number, visible: b
|
||||
return normalizePhoto(data.data);
|
||||
}
|
||||
|
||||
export async function updatePhotoStatus(
|
||||
slug: string,
|
||||
id: number,
|
||||
status: 'pending' | 'approved' | 'rejected'
|
||||
): Promise<TenantPhoto> {
|
||||
const response = await authorizedFetch(`${eventEndpoint(slug)}/photos/${id}`, {
|
||||
method: 'PATCH',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ status }),
|
||||
});
|
||||
const data = await jsonOrThrow<PhotoResponse>(response, 'Failed to update photo status');
|
||||
return normalizePhoto(data.data);
|
||||
}
|
||||
|
||||
export async function toggleEvent(slug: string): Promise<TenantEvent> {
|
||||
const response = await authorizedFetch(`${eventEndpoint(slug)}/toggle`, { method: 'POST' });
|
||||
const data = await jsonOrThrow<{ message: string; data: JsonValue }>(response, 'Failed to toggle event');
|
||||
|
||||
Reference in New Issue
Block a user