Compare commits
3 Commits
9d80e017c2
...
d6399c20e1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6399c20e1 | ||
|
|
a972d243f5 | ||
|
|
56bf88f293 |
@@ -34,6 +34,7 @@
|
|||||||
<!-- Delete button -->
|
<!-- Delete button -->
|
||||||
<button
|
<button
|
||||||
v-if="isAdmin"
|
v-if="isAdmin"
|
||||||
|
type="button"
|
||||||
class="absolute right-1 top-1 hidden rounded p-0.5 text-neutral-400 transition-colors hover:bg-red-50 hover:text-red-500 group-hover:block"
|
class="absolute right-1 top-1 hidden rounded p-0.5 text-neutral-400 transition-colors hover:bg-red-50 hover:text-red-500 group-hover:block"
|
||||||
@click.stop="$emit('delete', doc)"
|
@click.stop="$emit('delete', doc)"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ const isOpen = computed({
|
|||||||
})
|
})
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
|
if (confirmDeleteDocOpen.value || confirmDeleteOpen.value) return
|
||||||
isOpen.value = false
|
isOpen.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,6 +391,8 @@ function populateForm(task: Task | null) {
|
|||||||
|
|
||||||
watch(() => props.modelValue, async (open) => {
|
watch(() => props.modelValue, async (open) => {
|
||||||
if (open) {
|
if (open) {
|
||||||
|
confirmDeleteDocOpen.value = false
|
||||||
|
documentToDelete.value = null
|
||||||
populateForm(props.task)
|
populateForm(props.task)
|
||||||
try {
|
try {
|
||||||
clientTickets.value = await clientTicketService.getAll({ project: props.projectId })
|
clientTickets.value = await clientTicketService.getAll({ project: props.projectId })
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<Teleport v-if="modelValue" to="body">
|
<Teleport v-if="modelValue" to="body">
|
||||||
<Transition name="modal" appear>
|
<Transition name="modal" appear>
|
||||||
<div class="fixed inset-0 z-[70] flex items-center justify-center">
|
<div class="fixed inset-0 z-[70] flex items-center justify-center">
|
||||||
<div class="absolute inset-0 bg-black/30" @click="cancel" />
|
<div class="absolute inset-0 bg-black/30" @click.stop="cancel" />
|
||||||
<div class="relative z-10 w-full max-w-md rounded-lg bg-white p-6 shadow-xl">
|
<div class="relative z-10 w-full max-w-md rounded-lg bg-white p-6 shadow-xl">
|
||||||
<h3 class="text-lg font-bold text-neutral-900">{{ $t('taskDocuments.confirmDeleteTitle') }}</h3>
|
<h3 class="text-lg font-bold text-neutral-900">{{ $t('taskDocuments.confirmDeleteTitle') }}</h3>
|
||||||
<p class="mt-3 text-sm text-neutral-600">
|
<p class="mt-3 text-sm text-neutral-600">
|
||||||
|
|||||||
@@ -236,20 +236,20 @@ onMounted(() => {
|
|||||||
<h1 class="text-xl font-bold text-primary-500 sm:text-2xl">{{ $t('myTasks.title') }}</h1>
|
<h1 class="text-xl font-bold text-primary-500 sm:text-2xl">{{ $t('myTasks.title') }}</h1>
|
||||||
<div class="flex gap-1">
|
<div class="flex gap-1">
|
||||||
<button
|
<button
|
||||||
class="rounded-lg p-2 transition-colors"
|
class="flex items-center justify-center rounded-md p-1.5 transition-colors"
|
||||||
:class="viewMode === 'kanban' ? 'bg-primary-500 text-white' : 'text-neutral-400 hover:text-primary-500'"
|
:class="viewMode === 'kanban' ? 'bg-primary-500 text-white' : 'text-neutral-400 hover:text-primary-500'"
|
||||||
:title="$t('myTasks.viewKanban')"
|
:title="$t('myTasks.viewKanban')"
|
||||||
@click="viewMode = 'kanban'"
|
@click="viewMode = 'kanban'"
|
||||||
>
|
>
|
||||||
<Icon name="mdi:view-column-outline" size="20" />
|
<Icon name="mdi:view-column-outline" size="18" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="rounded-lg p-2 transition-colors"
|
class="flex items-center justify-center rounded-md p-1.5 transition-colors"
|
||||||
:class="viewMode === 'list' ? 'bg-primary-500 text-white' : 'text-neutral-400 hover:text-primary-500'"
|
:class="viewMode === 'list' ? 'bg-primary-500 text-white' : 'text-neutral-400 hover:text-primary-500'"
|
||||||
:title="$t('myTasks.viewList')"
|
:title="$t('myTasks.viewList')"
|
||||||
@click="viewMode = 'list'"
|
@click="viewMode = 'list'"
|
||||||
>
|
>
|
||||||
<Icon name="mdi:view-list-outline" size="20" />
|
<Icon name="mdi:view-list-outline" size="18" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class CreateTaskTool
|
|||||||
$task = new Task();
|
$task = new Task();
|
||||||
$task->setProject($project);
|
$task->setProject($project);
|
||||||
$task->setTitle($title);
|
$task->setTitle($title);
|
||||||
$task->setNumber($this->taskRepository->findMaxNumberByProject($project) + 1);
|
$task->setNumber($this->taskRepository->findMaxNumberByProjectForUpdate($project) + 1);
|
||||||
|
|
||||||
if (null !== $description) {
|
if (null !== $description) {
|
||||||
$task->setDescription($description);
|
$task->setDescription($description);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class TaskRepository extends ServiceEntityRepository
|
|||||||
$conn = $this->getEntityManager()->getConnection();
|
$conn = $this->getEntityManager()->getConnection();
|
||||||
|
|
||||||
$result = $conn->fetchOne(
|
$result = $conn->fetchOne(
|
||||||
'SELECT COALESCE(MAX(number), 0) FROM task WHERE project_id = :project FOR UPDATE',
|
'SELECT COALESCE(MAX(number), 0) FROM task WHERE project_id = :project',
|
||||||
['project' => $project->getId()],
|
['project' => $project->getId()],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user