gbrits / laravel-nova-checklist-field

This package is made to allow you to easily create checklists in Laravel Nova. All you need is a text/json column on you model to store the items. It expands on the original e2consult/novachecklists to provide Nova 4.0 support.
2 stars 0 forks source link

logUsers show current user on view #2

Open werner-h opened 1 month ago

werner-h commented 1 month ago

Thanks for your awesome Nova package, it works quitly fine. But there is a bug regarding the logUsers() function.

In the database the user name is correctly stored but on Nova view it shows the current user instead of the user which marked the task completed.

werner-h commented 1 month ago

Hi found the file with bug (Item.vue):

secondLineText(){
                if(this.completedAt && this.field.user){
                    return `Completed by ${this.field.user} - ${this.completedAt}`;
                }
                if(this.field.show_timestamps && this.completedAt){
                    return this.completedAt;
                }
                if(this.field.user){
                    return this.item.completed_by;
                }
                return null
            }

Please update to:

secondLineText(){
                if(this.completedAt && this.field.user){
                    return `Completed by ${this.item.completed_by} - ${this.completedAt}`;
                }
                if(this.field.show_timestamps && this.completedAt){
                    return this.completedAt;
                }
                if(this.field.user){
                    return this.item.completed_by;
                }
                return null
            }