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

@@ -1,12 +1,12 @@
<template>
<div>
<div class="flex items-center justify-between">
<h2 class="text-lg font-bold text-neutral-900">Types</h2>
<h2 class="text-lg font-bold text-neutral-900">Tags</h2>
<button
class="rounded-md bg-primary-500 px-4 py-2 text-sm font-semibold text-white hover:bg-secondary-500"
@click="openCreate"
>
+ Ajouter un type
+ Ajouter un tag
</button>
</div>
@@ -14,7 +14,7 @@
:columns="columns"
:items="items"
:loading="isLoading"
empty-message="Aucun type trouvé."
empty-message="Aucun tag trouvé."
deletable
@row-click="openEdit"
@delete="(item) => handleDelete(item.id)"
@@ -27,7 +27,7 @@
</template>
</DataTable>
<TaskTypeDrawer
<TaskTagDrawer
v-model="drawerOpen"
:item="selectedItem"
@saved="onSaved"
@@ -36,8 +36,8 @@
</template>
<script setup lang="ts">
import type { TaskType } from '~/services/dto/task-type'
import { useTaskTypeService } from '~/services/task-types'
import type { TaskTag } from '~/services/dto/task-tag'
import { useTaskTagService } from '~/services/task-tags'
import type { DataTableColumn } from '~/components/ui/DataTable.vue'
@@ -46,11 +46,11 @@ const columns: DataTableColumn[] = [
{ key: 'color', label: 'Couleur' },
]
const { getAll, remove } = useTaskTypeService()
const items = ref<TaskType[]>([])
const { getAll, remove } = useTaskTagService()
const items = ref<TaskTag[]>([])
const isLoading = ref(true)
const drawerOpen = ref(false)
const selectedItem = ref<TaskType | null>(null)
const selectedItem = ref<TaskTag | null>(null)
async function loadItems() {
isLoading.value = true
@@ -66,7 +66,7 @@ function openCreate() {
drawerOpen.value = true
}
function openEdit(item: TaskType) {
function openEdit(item: TaskTag) {
selectedItem.value = item
drawerOpen.value = true
}