annoucement banners, calendar pdf export, vehicle booking quck-add, even quick-add

This commit is contained in:
Matthias Hochmeister
2026-03-12 11:47:08 +01:00
parent 71a04aee89
commit cd68bd3795
15 changed files with 997 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import { api } from './api';
import type { Banner } from '../types/banner.types';
interface Resp<T> { success: boolean; data: T; }
export const bannerApi = {
getActive: () => api.get<Resp<Banner[]>>('/api/banners/active').then(r => r.data.data),
getAll: () => api.get<Resp<Banner[]>>('/api/banners').then(r => r.data.data),
create: (data: Omit<Banner, 'id'|'created_at'>) => api.post<Resp<Banner>>('/api/banners', data).then(r => r.data.data),
delete: (id: string) => api.delete(`/api/banners/${id}`).then(() => undefined),
};