add manual time entry feature

This commit is contained in:
Gregor Vostrak
2024-04-24 22:13:22 +02:00
parent 8136f630c9
commit f52a629bac
15 changed files with 261 additions and 28 deletions

View File

@@ -2,7 +2,7 @@ import { defineStore } from 'pinia';
import { getCurrentOrganizationId, getCurrentUserId } from '@/utils/useUser';
import { api } from '../../../openapi.json.client';
import { reactive, ref } from 'vue';
import type { TimeEntry } from '@/utils/api';
import type { CreateTimeEntryBody, TimeEntry } from '@/utils/api';
import dayjs from 'dayjs';
import { useNotificationsStore } from '@/utils/notification';
@@ -83,7 +83,7 @@ export const useTimeEntriesStore = defineStore('timeEntries', () => {
}
}
async function createTimeEntry(timeEntry: TimeEntry) {
async function createTimeEntry(timeEntry: CreateTimeEntryBody) {
const organizationId = getCurrentOrganizationId();
if (organizationId) {
await handleApiRequestNotifications(