create task by ticket

This commit is contained in:
hamid zarghami
2026-07-20 15:38:08 +03:30
parent 2af7323a6a
commit 65154a1aab
17 changed files with 372 additions and 5 deletions
+13
View File
@@ -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" />