Кнопка На себя у поля Ответственный в TaskDetail и меню дополнительных действий в TaskChat
This commit is contained in:
@@ -1874,26 +1874,29 @@ const TaskChat = ({ taskId }: TaskChatProps) => {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Button
|
<DropdownMenu>
|
||||||
type="button"
|
<DropdownMenuTrigger asChild>
|
||||||
size="sm"
|
<Button
|
||||||
variant="ghost"
|
type="button"
|
||||||
onClick={() => fileInputRef.current?.click()}
|
size="sm"
|
||||||
title="Прикрепить файл"
|
variant="ghost"
|
||||||
className="shrink-0"
|
title="Дополнительно"
|
||||||
>
|
className="shrink-0"
|
||||||
<Paperclip className="w-4 h-4" />
|
>
|
||||||
</Button>
|
<MoreVertical className="w-4 h-4" />
|
||||||
<Button
|
</Button>
|
||||||
type="button"
|
</DropdownMenuTrigger>
|
||||||
size="sm"
|
<DropdownMenuContent align="end">
|
||||||
variant="ghost"
|
<DropdownMenuItem onClick={() => fileInputRef.current?.click()}>
|
||||||
onClick={() => setPollDialogOpen(true)}
|
<Paperclip className="w-4 h-4 mr-2" />
|
||||||
title="Создать опрос"
|
Прикрепить файл
|
||||||
className="shrink-0"
|
</DropdownMenuItem>
|
||||||
>
|
<DropdownMenuItem onClick={() => setPollDialogOpen(true)}>
|
||||||
<BarChart2 className="w-4 h-4" />
|
<BarChart2 className="w-4 h-4 mr-2" />
|
||||||
</Button>
|
Создать опрос
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
|||||||
@@ -2366,6 +2366,20 @@ function InlineSystemFields({ task, taskId, formId, getUserName, readOnly, hidde
|
|||||||
? leftSlot(() => { setAssigneeDropdownOpen(v => !v); setAssigneeSearch(''); })
|
? leftSlot(() => { setAssigneeDropdownOpen(v => !v); setAssigneeSearch(''); })
|
||||||
: emptySlot}
|
: emptySlot}
|
||||||
<span className="text-muted-foreground shrink-0 text-[13px] leading-5">Ответственный:</span>
|
<span className="text-muted-foreground shrink-0 text-[13px] leading-5">Ответственный:</span>
|
||||||
|
{!readOnly && currentUser && !assignedUserIds.has(currentUser.id) && task.assignedTo !== currentUser.id && (
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
className="h-6 px-1.5 text-xs text-primary hover:text-primary -ml-1"
|
||||||
|
onClick={() => addAssigneeMutation.mutate(currentUser.id)}
|
||||||
|
disabled={addAssigneeMutation.isPending}
|
||||||
|
title="Назначить на себя"
|
||||||
|
>
|
||||||
|
<UserCheck className="w-3 h-3 mr-1" />
|
||||||
|
На себя
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<div
|
<div
|
||||||
ref={assigneeTriggerRef}
|
ref={assigneeTriggerRef}
|
||||||
role={readOnly ? undefined : 'button'}
|
role={readOnly ? undefined : 'button'}
|
||||||
|
|||||||
Reference in New Issue
Block a user