refactor : rename TaskType to TaskTag across the stack

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-13 08:20:21 +01:00
parent dbae1f7536
commit 56275a9ebe
16 changed files with 216 additions and 117 deletions

View File

@@ -7,7 +7,10 @@
@click="emit('click')"
>
<div class="flex items-start justify-between gap-2">
<h4 class="text-sm font-semibold text-neutral-900">{{ task.title }}</h4>
<div class="min-w-0">
<span v-if="task.project && task.number" class="text-xs font-medium text-neutral-400">{{ task.project.code }}{{ task.number }}</span>
<h4 class="text-sm font-semibold text-neutral-900">{{ task.title }}</h4>
</div>
<button
class="shrink-0 transition-colors"
:class="isTimerOnTask ? 'text-[#F18619] hover:text-[#d97314]' : 'text-neutral-400 hover:text-primary-500'"
@@ -26,12 +29,12 @@
{{ task.priority.label }}
</span>
<span
v-for="type in task.types"
:key="type.id"
v-for="tag in task.tags"
:key="tag.id"
class="rounded-full px-2 py-0.5 text-xs font-semibold text-white"
:style="{ backgroundColor: type.color }"
:style="{ backgroundColor: tag.color }"
>
{{ type.label }}
{{ tag.label }}
</span>
<span
v-if="task.assignee"

View File

@@ -1,5 +1,5 @@
<template>
<AppDrawer v-model="isOpen" :title="isEditing ? 'Modifier un type' : 'Ajouter un type'">
<AppDrawer v-model="isOpen" :title="isEditing ? 'Modifier un tag' : 'Ajouter un tag'">
<form @submit.prevent="handleSubmit" class="flex flex-col gap-2">
<MalioInputText
v-model="form.label"
@@ -26,12 +26,12 @@
</template>
<script setup lang="ts">
import type { TaskType, TaskTypeWrite } from '~/services/dto/task-type'
import { useTaskTypeService } from '~/services/task-types'
import type { TaskTag, TaskTagWrite } from '~/services/dto/task-tag'
import { useTaskTagService } from '~/services/task-tags'
const props = defineProps<{
modelValue: boolean
item: TaskType | null
item: TaskTag | null
}>()
const emit = defineEmits<{
@@ -69,7 +69,7 @@ watch(() => props.modelValue, (open) => {
}
})
const { create, update } = useTaskTypeService()
const { create, update } = useTaskTagService()
async function handleSubmit() {
touched.label = true
@@ -77,7 +77,7 @@ async function handleSubmit() {
isSubmitting.value = true
try {
const payload: TaskTypeWrite = {
const payload: TaskTagWrite = {
label: form.label.trim(),
color: form.color,
}