DEV Community

loading...
Cover image for Track Your Work Accomplishments: Delete Journal Entries

Track Your Work Accomplishments: Delete Journal Entries

raddevus profile image raddevus ・2 min read

This is an update to my original DOHackathon entry article here at Dev.to.

You can try out the Core Competency App at the DigitalOcean link https://core-co-doc-ngkxu.ondigitalocean.app

Enhancements Needed

My entry in the #DOHackathon needed at least two obvious enhancements:

  1. Ability to delete Journal Entries
  2. Ability to set your Secret ID as the permanent ID on your device -- Completed (see article here at Dev.to)

This article will focus on the first enhancement listed above.

Allow User To Delete Entries

It's possible that user created a Journal Entry that they no longer want. Maybe the user was just testing the Accomplishment Tracker and now wants to use it and they want to delete those test entries.

New Journal View

I've added some entries to my Journal that we can delete.
Alt Text

Select And Delete

Now, all the user has to do is:

  1. Select the checkbox next to each item they want to delete
  2. Press the [Delete Selected Entries] button

Alt Text

A popup dialog will appear so the user can confirm that they want to delete them. If the user clicks the [Cancel] button the entries will not be deleted, of course.

Once the user clicks the [Delete] button to confirm, then the entries will be permanently removed and the Journal Entry view will be updated appropriately. This is all done locally so there is not ugly flashing/blinking redraw.

Alt Text

That's it. Now you can get rid of any accidental or incorrect entries. Try it out and let me know what you think.

Discussion (0)

pic
Editor guide