Commit 0d19995a authored by gxx's avatar gxx

统计新增了获取全部团队

parent 0c45c369
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Contracts\GroupServiceContract;
use App\Contracts\ScheduleServiceContract; use App\Contracts\ScheduleServiceContract;
use App\Contracts\StatisticsServiceContract; use App\Contracts\StatisticsServiceContract;
use App\Contracts\TaskServiceContract; use App\Contracts\TaskServiceContract;
...@@ -16,11 +17,13 @@ use Illuminate\Http\Request; ...@@ -16,11 +17,13 @@ use Illuminate\Http\Request;
class StatisticsController extends Controller class StatisticsController extends Controller
{ {
public function __construct(StatisticsServiceContract $statisticsHandel,TaskServiceContract $taskHandle,ScheduleServiceContract $scheduleHandle) public function __construct(StatisticsServiceContract $statisticsHandel,TaskServiceContract $taskHandle,ScheduleServiceContract $scheduleHandle,
GroupServiceContract $groupHandel)
{ {
$this->mStatistics = $statisticsHandel; $this->mStatistics = $statisticsHandel;
$this->mTask = $taskHandle; $this->mTask = $taskHandle;
$this->mSchedule = $scheduleHandle; $this->mSchedule = $scheduleHandle;
$this->mGroup = $groupHandel;
} }
...@@ -48,8 +51,10 @@ class StatisticsController extends Controller ...@@ -48,8 +51,10 @@ class StatisticsController extends Controller
// 获取所有日程 // 获取所有日程
$schedules = $this->mSchedule->getCount(); $schedules = $this->mSchedule->getCount();
// 获取所有的团队
$groups = $this->mGroup->getAll()->count();
return view('admin/index',compact('newUserCount','newProject','users','projects','tasks','schedules')); return view('admin/index',compact('newUserCount','newProject','users','projects','tasks','schedules','groups'));
} }
......
...@@ -117,7 +117,7 @@ class GroupService implements GroupServiceContract ...@@ -117,7 +117,7 @@ class GroupService implements GroupServiceContract
} }
public function getAll($page) public function getAll($page=8)
{ {
$groups = Group::paginate($page); $groups = Group::paginate($page);
if($groups->isEmpty()){ if($groups->isEmpty()){
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<!-- small box --> <!-- small box -->
<div class="small-box bg-yellow"> <div class="small-box bg-yellow">
<div class="inner" style="background-color: #ebccd1"> <div class="inner" style="background-color: #ebccd1">
<h3> 0 </h3> <h3> {{$groups}} </h3>
<p>全部团队</p> <p>全部团队</p>
</div> </div>
...@@ -116,20 +116,20 @@ ...@@ -116,20 +116,20 @@
</div> </div>
</div> </div>
<!-- ./col --> <!-- ./col -->
<div class="col-lg-3 col-xs-6"> {{--<div class="col-lg-3 col-xs-6">--}}
<!-- small box --> {{--<!-- small box -->--}}
<div class="small-box bg-aqua"> {{--<div class="small-box bg-aqua">--}}
<div class="inner" style="background-color: #afd9ee"> {{--<div class="inner" style="background-color: #afd9ee">--}}
<h3>0</h3> {{--<h3>0</h3>--}}
<p>全部任务</p> {{--<p>全部任务</p>--}}
</div> {{--</div>--}}
<div class="icon"> {{--<div class="icon">--}}
<i class="ion ion-bag"></i> {{--<i class="ion ion-bag"></i>--}}
</div> {{--</div>--}}
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a> {{--<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>--}}
</div> {{--</div>--}}
</div> {{--</div>--}}
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment