Open nunomazer opened 4 months ago
Hi @nunomazer, I see there a lot of new fields in activity for tasks, all of them need been shown in histories tables ? or activity has to have your own screen with all this info ?
Also, regarding the fields, I realized that Spatie doesn't support changing the field names. To maintain the change history, I need to keep the original names of the fields. Therefore, it is not possible to save client_id, project_id, and status_id with different names. Is there a better approach for this, or did I miss something in the Spatie documentation?
Hi @GabrielDantasDs
Yes all this fields should be in the change history, this way we gonna have a real tracking of what is done in tasks.
The way to do with Spatie's package is simple, see the docs, if I'm not wrong it's almost automatic depending on model configuration.
About client and project id, you can add a properties: ->withProperties(['key' => 'value'])
... this way when client id or project id are dirty, you add related names as proprties
Thanks Professor. Now i be able to save all fields like you said, but the history table have more then 10 columns now, and look like little weird in the frontend, some columns break the line and go to below line, like this image, i lost something or that is it ?
obs: i limit all columns to 10 characters and add tooltip on hover.
I think you can create only one column on frontend that shows partial information of the changes, and at clicking on the row, open a modal that shows all the fields changed in a formated way
Add in histories (activities) more fields of tasks:
Pay attention that the create action (first insert of the record) do not need to generate an activity