Supabase Removals Frontend

This commit is contained in:
2026-02-14 13:14:22 +01:00
parent 55699da42c
commit 6bf336356d
4 changed files with 44 additions and 586 deletions

View File

@@ -41,18 +41,23 @@ export const useStaffTime = () => {
* aber wir nutzen dafür besser die createEntry Funktion unten.
*/
const start = async (description = "Arbeitszeit", time?: string) => {
console.log(auth.user)
await $api('/api/staff/time/event', {
method: 'POST',
body: {
eventtype: 'work_start',
eventtime: time || new Date().toISOString(), // 💡 Fix: Zeit akzeptieren
payload: { description }
payload: { description },
user_id: auth.user?.id
}
})
}
const stop = async () => {
await $api('/api/staff/time/event', { method: 'POST', body: { eventtype: 'work_end', eventtime: new Date().toISOString() } })
await $api('/api/staff/time/event', { method: 'POST', body: { eventtype: 'work_end', eventtime: new Date().toISOString(),
user_id: auth.user?.id } })
}
const submit = async (entry: any) => {