Supabase Removals Frontend
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user