mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-18 21:22:15 +01:00
automatically select project after create in time tracker component, fixes ST-457
This commit is contained in:
committed by
Constantin Graf
parent
d080b07e60
commit
5593d141ea
@@ -84,7 +84,11 @@ const isRunningInDifferentOrganization = computed(() => {
|
|||||||
async function createProject(
|
async function createProject(
|
||||||
project: CreateProjectBody
|
project: CreateProjectBody
|
||||||
): Promise<Project | undefined> {
|
): Promise<Project | undefined> {
|
||||||
return await useProjectsStore().createProject(project);
|
const newProject = await useProjectsStore().createProject(project);
|
||||||
|
if (newProject) {
|
||||||
|
currentTimeEntry.value.project_id = newProject.id;
|
||||||
|
}
|
||||||
|
return newProject;
|
||||||
}
|
}
|
||||||
async function createClient(client: CreateClientBody) {
|
async function createClient(client: CreateClientBody) {
|
||||||
return await useClientsStore().createClient(client);
|
return await useClientsStore().createClient(client);
|
||||||
|
|||||||
Reference in New Issue
Block a user