Added delete permantly button
This commit is contained in:
+11
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user