Basic Task deletion

This commit is contained in:
2024-04-05 22:01:51 -04:00
parent 8464701082
commit b91ba39d06
3 changed files with 29 additions and 7 deletions

View File

@@ -122,7 +122,6 @@
hint="Add a boat, if applicable"
v-model="modifiedTask.boat"
use-input
emit-value
input-debounce="250"
:options="boatList"
option-label="name"
@@ -172,7 +171,6 @@ const defaultTask = <Task>{
volunteers_required: 0,
status: 'ready',
depends_on: [],
boat: '',
};
const { taskId } = props;
@@ -210,7 +208,7 @@ function filterTasks(val: string, update: (cb: () => void) => void): void {
}
function filterTags(
optionVar: Ref<SkillTag[] | TaskTag[] | undefined>,
optionVar: Ref<(SkillTag | TaskTag)[] | undefined>,
optionSrc: SkillTag[] | TaskTag[],
val: string,
update: (cb: () => void) => void

View File

@@ -22,7 +22,7 @@
color="primary"
:disable="loading"
label="Delete task(s)"
@click="deleteTask"
@click="deleteTasks"
/>
<q-space />
<q-input
@@ -137,8 +137,12 @@ const taskStore = useTaskStore();
taskStore.fetchTaskTags();
taskStore.fetchSkillTags();
function deleteTask() {
return;
function deleteTasks() {
selected.value.map((task: Task) => {
console.log('Deleting Task: ' + task.$id);
taskStore.deleteTask(task);
return;
});
}
const filter = ref('');
</script>