create task by ticket
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { AttachCircle, Calendar, TickSquare } from "iconsax-react";
|
||||
import { useEffect, useRef, type FC } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Pages } from "../../../config/Pages";
|
||||
import type { Task as TaskType } from "../types";
|
||||
|
||||
type Props = {
|
||||
@@ -9,6 +12,7 @@ type Props = {
|
||||
};
|
||||
|
||||
const Task: FC<Props> = ({ task, isDragging, onClick }) => {
|
||||
const { t } = useTranslation("global");
|
||||
const suppressClickRef = useRef(false);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -37,6 +41,15 @@ const Task: FC<Props> = ({ task, isDragging, onClick }) => {
|
||||
{task.tag}
|
||||
</div>
|
||||
<div className="font-bold text-xs mt-2">{task.title}</div>
|
||||
{task.ticketId ? (
|
||||
<Link
|
||||
to={Pages.ticket.detail + task.ticketId}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="mt-2 inline-flex items-center text-[10px] text-primary hover:underline"
|
||||
>
|
||||
{t("taskmanager.task_detail.related_ticket")}
|
||||
</Link>
|
||||
) : null}
|
||||
<div className="mt-2 flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs">
|
||||
<div className="flex items-center gap-1 text-[10px] min-w-0">
|
||||
<Calendar size={16} color="#292D32" className="shrink-0" />
|
||||
|
||||
Reference in New Issue
Block a user