change status in modal
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
hamid zarghami
2026-07-14 11:18:20 +03:30
parent 95177b529e
commit a356a3fcbd
3 changed files with 35 additions and 28 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
VITE_TOKEN_NAME = 'admin_token' VITE_TOKEN_NAME = 'admin_token'
VITE_REFRESH_TOKEN_NAME = 'admin_refresh_token' VITE_REFRESH_TOKEN_NAME = 'admin_refresh_token'
VITE_BASE_URL = 'https://api.danakcorp.com' #VITE_BASE_URL = 'https://api.danakcorp.com'
# VITE_BASE_URL = 'http://192.168.99.131:3500' VITE_BASE_URL = 'http://localhost:3500'
@@ -29,32 +29,39 @@ const TaskDetailHeader: FC<Props> = ({
return ( return (
<div className="flex items-center justify-between border-b border-border pb-4"> <div className="flex items-center justify-between border-b border-border pb-4">
<Popover className="relative"> <Popover className="relative">
<PopoverButton {({ close }) => (
disabled={isChangingPhase} <>
className="flex items-center gap-1.5 bg-white/60 rounded-full px-4 py-2 text-xs font-medium cursor-pointer disabled:opacity-50 outline-none" <PopoverButton
> disabled={isChangingPhase}
<span>{selectedColumn?.title ?? ""}</span> className="flex items-center gap-1.5 bg-white/60 rounded-full px-4 py-2 text-xs font-medium cursor-pointer disabled:opacity-50 outline-none"
<ArrowDown2 size={14} color="#292D32" />
</PopoverButton>
<PopoverPanel
anchor="bottom start"
className="z-20 mt-1 min-w-[160px] rounded-xl bg-white shadow-md border border-border py-1 text-sm"
>
{columns.map((column) => (
<button
key={column.id}
type="button"
onClick={() => onPhaseChange(column.id)}
className={clx(
"w-full px-4 py-2.5 text-right transition-colors hover:bg-black/5",
column.id === selectedPhaseId && "font-bold bg-black/5",
)}
> >
{column.title} <span>{selectedColumn?.title ?? ""}</span>
</button> <ArrowDown2 size={14} color="#292D32" />
))} </PopoverButton>
</PopoverPanel>
<PopoverPanel
anchor="bottom start"
className="z-[80] mt-1 min-w-[160px] rounded-xl bg-white shadow-md border border-border py-1 text-sm"
>
{columns.map((column) => (
<button
key={column.id}
type="button"
onClick={() => {
onPhaseChange(column.id);
close();
}}
className={clx(
"w-full px-4 py-2.5 text-right transition-colors hover:bg-black/5",
column.id === selectedPhaseId && "font-bold bg-black/5",
)}
>
{column.title}
</button>
))}
</PopoverPanel>
</>
)}
</Popover> </Popover>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@@ -66,7 +66,7 @@ const TaskDetailModal: FC<Props> = ({ open, task, columns, projectId, onClose, o
if (!task) return null; if (!task) return null;
const selectedPhaseId = taskDetail?.taskPhaseId ?? task.columnId; const selectedPhaseId = task.columnId || taskDetail?.taskPhaseId || "";
const handleTabChange = (tab: TaskDetailTab) => { const handleTabChange = (tab: TaskDetailTab) => {
setActiveTab((prev) => (prev === tab ? null : tab)); setActiveTab((prev) => (prev === tab ? null : tab));