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

Best method to customise this tool? #18

Open neildcuk opened 3 years ago

neildcuk commented 3 years ago

Hi there — we've just installed the tool in a new project and it's working well. Thank you!

We are wondering if we can customise the view for the table. Finding it a bit stretched on smaller screens, mostly because of the date/time column being very verbose and no forced wrapping on the field values.

Any chance we can amend this locally with some override method?

Screenshot 2021-02-17 at 12 09 00

recycledbeans commented 3 years ago

Hey @neilwhitespace I can't think of a way to override the view since all Nova components are compiled Vue.js files, but you could potentially add custom CSS to add word wrapping and other styling via a theme.

https://nova.laravel.com/docs/3.0/customization/themes.html#theme-css

neildcuk commented 3 years ago

Hi @recycledbeans — Thanks so much for the answer! We'll likely be making a theme for this anyway so will see how much we can do there.

With regards to the date format — any chance it can be customised by a config option somewhere?

recycledbeans commented 3 years ago

I think it's a great idea to have this be configurable, but right now there isn't a way. It would be great to use Moment.js to localize and format the date/time the same way the DateTime field does.

If you have the time and would want to contribute this to the project, I would definitely review and approve a PR for this. If not, I will certainly tag this issue as an improvement and work on it in the near future!