add support for archiving projects and marking tasks as done

This commit is contained in:
Gregor Vostrak
2024-07-02 17:01:12 +02:00
parent 0f32e42002
commit 6593a8c24f
15 changed files with 285 additions and 71 deletions

View File

@@ -33,6 +33,13 @@ function deleteProject() {
useProjectsStore().deleteProject(props.project.id);
}
function archiveProject() {
useProjectsStore().updateProject(props.project.id, {
...props.project,
is_archived: !props.project.is_archived,
});
}
const billableRateInfo = computed(() => {
if (props.project.is_billable) {
if (props.project.billable_rate) {
@@ -84,6 +91,7 @@ const showEditProjectModal = ref(false);
<ProjectMoreOptionsDropdown
:project="project"
@edit="showEditProjectModal = true"
@archive="archiveProject"
@delete="deleteProject"></ProjectMoreOptionsDropdown>
</div>
</TableRow>