mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 12:42:15 +01:00
add projects detail page, task create / delete
This commit is contained in:
@@ -24,6 +24,8 @@ export type CreateProjectBody = ZodiosBodyByAlias<
|
||||
'createProject'
|
||||
>;
|
||||
|
||||
export type CreateTaskBody = ZodiosBodyByAlias<SolidTimeApi, 'createTask'>;
|
||||
|
||||
export type CreateClientBody = ZodiosBodyByAlias<SolidTimeApi, 'createClient'>;
|
||||
|
||||
export type TagIndexResponse = ZodiosResponseByAlias<SolidTimeApi, 'getTags'>;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia';
|
||||
import { getCurrentOrganizationId } from '@/utils/useUser';
|
||||
import { api } from '../../../openapi.json.client';
|
||||
import { reactive, ref } from 'vue';
|
||||
import type { Task } from '@/utils/api';
|
||||
import type { CreateTaskBody, Task } from '@/utils/api';
|
||||
|
||||
export const useTasksStore = defineStore('tasks', () => {
|
||||
const tasks = ref<Task[]>(reactive([]));
|
||||
@@ -31,7 +31,7 @@ export const useTasksStore = defineStore('tasks', () => {
|
||||
}
|
||||
}
|
||||
|
||||
async function createTask(task: Task) {
|
||||
async function createTask(task: CreateTaskBody) {
|
||||
const organizationId = getCurrentOrganizationId();
|
||||
if (organizationId) {
|
||||
await api.createTask(task, {
|
||||
|
||||
Reference in New Issue
Block a user