Announcement

Collapse
No announcement yet.

Idea : v9 about new ehancement introduced Collaborators

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Idea : v9 about new ehancement introduced Collaborators

    Hi Yuri,
    is just a Idea about new ehancement in V9, i think "Collaborators + AssignedUsers"..
    Of course, i have not see the V9, so i can be false

    Maybe make out-of box "Select Filter" like :

    OnlyAsCollaborators


    For me it's not complicate to make a custom select.. like (sample can help other) :

    PHP Code:
    namespace Espo\Custom\Classes\Select\Meeting\BoolFilters;

    use 
    Espo\Core\Select\Bool\Filter;
    use 
    Espo\ORM\Query\SelectBuilder;
    use 
    Espo\ORM\Query\Part\Where\OrGroupBuilder;
    use 
    Espo\ORM\Query\Part\Condition as Cond;
    use 
    Espo\Entities\User;

    class 
    AsAttendee implements Filter
    {
        public function 
    __construct(
            private 
    User $user
        
    ){}

        public function 
    apply(SelectBuilder $queryBuilderOrGroupBuilder $orGroupBuilder): void
        
    {
            
    $queryBuilder
                
    ->leftJoin('users''asAttendee');

            
    $orGroupBuilder
                
    ->add(
                    
    Cond::and(
                        
    Cond::equal(
                            
    Cond::column('asAttendeeMiddle.userId'),
                            
    $this->user->getId()
                        )
                    )
                );
        }
    }
    ​ 
    Maybe if you think is relevant.

    Thanks ... i was waiting with the V9

  • #2
    Hi, We do already have https://github.com/espocrm/espocrm/b...ers/Shared.php
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...
    X