Skip to content

Commit

Permalink
Add comfirmation alert to delete the order
Browse files Browse the repository at this point in the history
  • Loading branch information
lulunac27a committed Mar 29, 2024
1 parent cfe2be5 commit f043b1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ updateList = ->
orderList.innerHTML = html #set order list HTML output

window.deleteOrder = (i) ->
orders.splice i, 1 #remove order from index i
updateList()
if confirm 'Are you sure you want to delete this task named ' + orders[i].names + '?'
orders.splice i, 1 #remove order from index i
updateList()


0 comments on commit f043b1e

Please sign in to comment.