dev-partners / laravel-nova-auditable-log

A Laravel Nova resource tool for visualizing the audit log created by the Laravel Auditing package.
51 stars 22 forks source link

Restore view is misleading/confusing #9

Closed ludgerey closed 3 years ago

ludgerey commented 4 years ago

Restore view shows no changes, even if there are some.

The restore button is shown and a click on it opens a modal, but there is nothing to restore. Not sure how it should look like, but either I did something wrong (missing configuration?) or the view is broken.

Bildschirmfoto 2020-01-27 um 15 53 46
recycledbeans commented 4 years ago

Hey @ludgerey I think what you found is that the restore UI is just a bit confusing.

If you update the record again (adding another audit record), you'll see that you can go back to the first version and get it where you need it (clicking on the restore button two rows back from the current). That being said, I do not think this is how most people would think to use the feature, so an improvement is probably necessary (I actually found myself in the same confusion just last week).

I'll put some time on my calendar to make these improvements this week unless you want to make the update and create a PR. Just let me know if you want to do it in the next day or so. Thanks!

ludgerey commented 4 years ago

Oh yeah. Now I get it. It doesn't mean to restore from new to old value. It's more like: "Here you can redo the change that was done".

Maybe just remove the restore button, if it's the latest log entry?

recycledbeans commented 4 years ago

Yeah, that could be one way to resolve this pretty quickly, but I think most people would still expect to be able to rollback from the new value to the old value. I think this is especially the case since the fields on previous audits are potentially different than the last edit.

In any case, it should be resolved this week 👍

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

bernhardh commented 4 years ago

Not sure if its just me, but it doesn't work, or am I doing/expecting something wrong?

Peek 2020-09-18 11-36

I am on v1.0.9 of your package and v 11.0.0 on the auditing package.