Кнопка На себя у поля Ответственный в TaskDetail и меню дополнительных действий в TaskChat
This commit is contained in:
@@ -1874,29 +1874,32 @@ const TaskChat = ({ taskId }: TaskChatProps) => {
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
title="Дополнительно"
|
||||
className="shrink-0"
|
||||
>
|
||||
<MoreVertical className="w-4 h-4" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem onClick={() => fileInputRef.current?.click()}>
|
||||
<Paperclip className="w-4 h-4 mr-2" />
|
||||
Прикрепить файл
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => setPollDialogOpen(true)}>
|
||||
<BarChart2 className="w-4 h-4 mr-2" />
|
||||
Создать опрос
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
<Button
|
||||
type="button"
|
||||
type="submit"
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
title="Прикрепить файл"
|
||||
className="shrink-0"
|
||||
>
|
||||
<Paperclip className="w-4 h-4" />
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
onClick={() => setPollDialogOpen(true)}
|
||||
title="Создать опрос"
|
||||
className="shrink-0"
|
||||
>
|
||||
<BarChart2 className="w-4 h-4" />
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
size="sm"
|
||||
disabled={sendMessageMutation.isPending || isUploading || (!form.watch('message')?.trim() && pendingFiles.length === 0)}
|
||||
data-testid="button-send-message"
|
||||
>
|
||||
|
||||
@@ -2366,6 +2366,20 @@ function InlineSystemFields({ task, taskId, formId, getUserName, readOnly, hidde
|
||||
? leftSlot(() => { setAssigneeDropdownOpen(v => !v); setAssigneeSearch(''); })
|
||||
: emptySlot}
|
||||
<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
|
||||
ref={assigneeTriggerRef}
|
||||
role={readOnly ? undefined : 'button'}
|
||||
|
||||
Reference in New Issue
Block a user