Open promatik opened 1 year ago
We solve this tomorrow, if we have the time. This one, we can push as a non-breaking change.
When coming for a Model that is both Subject and Causer, should the selected filters be with AND (default) or should it be OR?
OR 💯
What if I come from the entry button? Both the causer model and subject model are selected with User::class, and model and subject with Demo User entry. How should the filters behave?
I... don't understand the question/dilemma... could you please rephrase?
Basically, when coming from this button;
Entry Activity Log It will default to have everything selected;
Causer Model and Subject Model + Causer and Subject What should be the query?
where (causer_model = X or subject_model = X) AND (causer = Y or subject = Y)
or
where (causer_model = X or subject_model = X) AND causer = Y AND subject = Y
or
where (causer_model = X or subject_model = X or causer = Y or subject = Y)
?
My brain is melting now 😂 I'll come back to this in an hour ahaha
Long story short, after asking @pxpm his opinion, in order to do this, we need to do some nasty stuff 😅
If we have the key to combine the results, in order to have it combined, we need to disable the filters and add the queries manually.
Something like this;
Should we proceed? 😬
Ouch! So let me understand...
Is that correct? If so... I'm ok with it. I like it.
If we could also change the title / heading for this filtered view, so that it makes it clear it's a sub-filtration... that would be great.
Most of the work is done at https://github.com/Laravel-Backpack/activity-log/tree/combined-filter. Me and @tabacitu, we decided not to merge/work on it now because we don't have a proper UI/UX to display this filter.
Feature Request
When coming for a Model that is both Subject and Causer, should the selected filters be with AND (default) or should it be OR?
Should we create that exception?
What if I come from the entry button?
Both the causer model and subject model are selected with
User::class
, and model and subject with Demo User entry. How should the filters behave?