Added delete permantly button

This commit is contained in:
NPS Agent
2026-05-11 16:11:20 +09:30
parent 13e92e2b27
commit df2157b6b9
6 changed files with 45 additions and 4 deletions
+11 -1
View File
@@ -407,7 +407,7 @@ function Modal({ children, onClose, title, eyebrow, wide = false }) {
);
}
function TaskDetail({ task, allAudit = [], onClose, onMove, onPriority, onComplete, onReopen, onEditDesc }) {
function TaskDetail({ task, allAudit = [], onClose, onMove, onPriority, onComplete, onReopen, onEditDesc, onDeleteTask }) {
const [editingDesc, setEditingDesc] = React.useState(false);
const [descValue, setDescValue] = React.useState(task ? task.description || '' : '');
@@ -557,6 +557,16 @@ function TaskDetail({ task, allAudit = [], onClose, onMove, onPriority, onComple
<Field label="Reminder">
<div className="meta-row">Thu, May 7 · 4:00 pm</div>
</Field>
<div style={{ marginTop: '2rem', paddingTop: '1.5rem', borderTop: '1px solid var(--border-subtle)' }}>
<button
className="btn btn--ghost btn--full"
style={{ color: 'var(--prio-high-dot)', borderColor: 'transparent' }}
onClick={() => { if (confirm('Are you sure you want to permanently delete this task?')) onDeleteTask(); }}
>
<Icon.Close /> Delete task permanently
</button>
</div>
</aside>
</div>
</Modal>