Krayin Forum

    Krayin

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Popular
    Log in to post
    • All categories
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All Time
    • Day
    • Week
    • Month
    • S

      How to filter dashboard data by logged-in user (non-admin users should see only their own data)?
      General Discussion • • Segaf

      2
      0
      Votes
      2
      Posts
      29
      Views

      R

      Hello @Segaf

      You can verify this by adding the following code snippet inside the dashboard.php file:

      $items = $this->personRepository
      ->resetModel()
      ->leftJoin('leads', 'persons.id', '=', 'leads.person_id')
      ->select('*', 'persons.id as id')
      ->addSelect(DB::raw('SUM('.$tablePrefix.'leads.lead_value) as revenue'))
      ->whereBetween('leads.closed_at', [$this->startDate, $this->endDate])
      ->having(DB::raw('SUM('.$tablePrefix.'leads.lead_value)'), '>', 0)
      ->groupBy('person_id')
      ->orderBy('revenue', 'DESC')
      ->limit($limit);

      if ($userIds = bouncer()->getAuthorizedUserIds()) {
      $items->whereIn('leads.user_id', $userIds);
      }

      $items = $items->get();

      This will help you to resolve your query. In case of any issue do let us know.

      NOTE : There is no Role based data available in krayin crm also we have group visibility in Krayin

      Warm Regards

    • F

      Problem with emails
      General Discussion • • Filip Studio

      2
      0
      Votes
      2
      Posts
      22
      Views

      R

      Hello @Filip-Studio

      Did you follow all the steps which is mentioned in the Youtube video or you can also check the detailed blog.

      https://www.youtube.com/watch?v=U87Z7xCQzCg

      https://krayincrm.com/how-to-configure-imap-settings-in-krayin-crm/

      Warm Regards

    • C

      Please Release Docker Image for v2.1.5
      General Discussion • • caiosantos12

      1
      0
      Votes
      1
      Posts
      46
      Views

      No one has replied