Made reopen button for completed tasks

This commit is contained in:
NPS Agent
2026-05-11 14:33:14 +09:30
parent 4d7541caca
commit d959c89d5f
3 changed files with 22 additions and 5 deletions
+10 -4
View File
@@ -407,7 +407,7 @@ function Modal({ children, onClose, title, eyebrow, wide = false }) {
);
}
function TaskDetail({ task, allAudit = [], onClose, onMove, onPriority, onComplete }) {
function TaskDetail({ task, allAudit = [], onClose, onMove, onPriority, onComplete, onReopen }) {
if (!task) return null;
const assignee = findUser(task.assignee);
const author = findUser(task.addedBy);
@@ -487,9 +487,15 @@ function TaskDetail({ task, allAudit = [], onClose, onMove, onPriority, onComple
</div>
<aside className="detail__side">
<button className="btn btn--primary btn--full" style={{ marginBottom: '1.5rem' }} onClick={onComplete}>
<Icon.Check /> Mark as completed
</button>
{task.status === 'closed' ? (
<button className="btn btn--ghost btn--full" style={{ marginBottom: '1.5rem' }} onClick={onReopen}>
<Icon.Arrow /> Reopen task
</button>
) : (
<button className="btn btn--primary btn--full" style={{ marginBottom: '1.5rem' }} onClick={onComplete}>
<Icon.Check /> Mark as completed
</button>
)}
<Field label="Assigned to">
<div className="picker">