Skip to content

Commit e0c42fa

Browse files
authored
Merge pull request #49 from WINBIGFOX/bugfix/project-stopping
Bugfix/project stopping
2 parents 001d356 + 5e08113 commit e0c42fa

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

app/Http/Controllers/MenubarController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ public function removeProject(ProjectSettings $projectSettings)
9999
$projectSettings->currentProject = null;
100100
$projectSettings->save();
101101

102+
if (TimestampService::getCurrentType() === TimestampTypeEnum::WORK) {
103+
TimestampService::startWork();
104+
}
105+
102106
return redirect()->route('menubar.index');
103107
}
104108
}

resources/js/Pages/MenuBar.vue

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -247,24 +247,10 @@ const removeProject = () => {
247247
<div class="line-clamp-1">
248248
{{ props.currentProject.name }}
249249
</div>
250-
<Button
251-
:as="Link"
252-
:href="route('menubar.storeStop')"
253-
class="text-destructive hover:text-destructive mr-0.5 ml-auto px-2! shadow-none"
254-
method="post"
255-
preserve-scroll
256-
preserve-state
257-
size="sm"
258-
v-if="currentType === 'work'"
259-
variant="outline"
260-
>
261-
<Square class="size-4" />
262-
</Button>
263250
<Button
264251
@click="removeProject"
265252
class="mr-0.5 ml-auto px-2! shadow-none"
266253
size="sm"
267-
v-if="currentType !== 'work'"
268254
variant="outline"
269255
>
270256
<X class="size-4" />
@@ -290,7 +276,6 @@ const removeProject = () => {
290276
</Button>
291277
</div>
292278
<div class="scroll-shadow-y flex grow flex-col gap-1 overflow-y-auto">
293-
<!-- Einzelne Projekte (mit parent_id aber Parent nicht geladen) -->
294279
<template :key="project.id" v-for="project in props.projects">
295280
<div
296281
:style="'--project-color: ' + (project.color ?? '#000000')"

resources/js/Pages/Project/Edit.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const submit = () => {
4747
</script>
4848

4949
<template>
50-
<Head title="Projekt bearbeiten" />
50+
<Head title="Projekt edit" />
5151
<SheetDialog
5252
:close="$t('app.cancel')"
5353
:submit="$t('app.save')"

0 commit comments

Comments
 (0)