1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use LaravelRealtimeChat\Repositories\Team\TeamRepository; |
4
|
|
|
use LaravelRealtimeChat\Repositories\Task\TaskRepository; |
5
|
|
|
class TaskController extends BaseController { |
6
|
|
|
/** |
7
|
|
|
* @var LaravelRealtimeChat\Repositories\TeamRepository |
|
|
|
|
8
|
|
|
*/ |
9
|
|
|
private $teamRepository; |
10
|
|
|
/** |
11
|
|
|
* @var LaravelRealtimeChat\Repositories\TaskRepository |
|
|
|
|
12
|
|
|
*/ |
13
|
|
|
private $taskRepository; |
14
|
|
|
|
15
|
|
|
public function __construct(TeamRepository $teamRepository, TaskRepository $taskRepository) { |
16
|
|
|
$this->teamRepository = $teamRepository; |
|
|
|
|
17
|
|
|
$this->taskRepository = $taskRepository; |
|
|
|
|
18
|
|
|
} |
19
|
|
|
|
20
|
|
View Code Duplication |
public function dashboard() { |
|
|
|
|
21
|
|
|
$channeld = Session::get('channelId'); |
22
|
|
|
$teams = $this->teamRepository->getTeams($channeld); |
23
|
|
|
$projects = $this->taskRepository->getProjects(); |
24
|
|
|
$trackers = $this->taskRepository->getTracker(); |
25
|
|
|
$status = $this->taskRepository->getStatus(); |
26
|
|
|
$priotities = $this->taskRepository->getPriorities(); |
27
|
|
|
$data = array("teams" => $teams, "projects" => $projects,"trackers"=>$trackers,"status"=>$status,"priorities"=>$priotities); |
28
|
|
|
|
29
|
|
|
return View::make('templates/task/dashboard')->with('data', $data); |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @function creates project |
34
|
|
|
@param null |
35
|
|
|
@return null |
36
|
|
|
*/ |
|
|
|
|
37
|
|
|
public function create_project() { |
38
|
|
|
$result = $this->taskRepository->createProject(); |
39
|
|
|
return View::make('templates/greeting')->with('info', $result); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @function creates task |
44
|
|
|
@param null |
45
|
|
|
@return null |
46
|
|
|
*/ |
|
|
|
|
47
|
|
|
public function create_task() { |
48
|
|
|
$result = $this->taskRepository->createTask(); |
49
|
|
|
return $result; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @function returns members |
55
|
|
|
@param null |
56
|
|
|
@return null |
57
|
|
|
*/ |
|
|
|
|
58
|
|
|
public function get_members() { |
59
|
|
|
$enTeamId=Input::get("teamId"); |
|
|
|
|
60
|
|
|
$teamId=$this->teamRepository->getTeamDecodedId($enTeamId); |
61
|
|
|
$members = $this->teamRepository->getMembers($teamId); |
62
|
|
|
/* |
63
|
|
|
* Prepare html select options |
64
|
|
|
*/ |
65
|
|
|
|
66
|
|
|
$data=''; |
67
|
|
|
$data.="<option value=''>Select User</option>"; |
68
|
|
|
foreach($members as $values){ |
69
|
|
|
$memDetail=explode("_",$values); |
70
|
|
|
$data.="<option value=".$memDetail[2].">".$memDetail[0]." ".$memDetail[1]."</option>"; |
71
|
|
|
} |
72
|
|
|
return trim($data,'"'); |
|
|
|
|
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @function rollback task |
77
|
|
|
@param null |
78
|
|
|
@return null |
79
|
|
|
*/ |
|
|
|
|
80
|
|
|
public function rollback_task() { |
81
|
|
|
$result = $this->taskRepository->rollBackTask(); |
82
|
|
|
return $result; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @function filter dashboard data |
87
|
|
|
@param null |
88
|
|
|
@return array dashboard data |
89
|
|
|
*/ |
|
|
|
|
90
|
|
|
public function filter_dashboard() { |
91
|
|
|
$result = $this->taskRepository->filterDashboard(); |
92
|
|
|
return $result; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @function filter grid data |
97
|
|
|
@param null |
98
|
|
|
@return array grid data |
99
|
|
|
*/ |
|
|
|
|
100
|
|
|
public function filter_grid() { |
101
|
|
|
$page = \Input::get('current'); |
102
|
|
|
$rowCount = \Input::get('rowCount'); |
103
|
|
|
|
104
|
|
|
$total=''; |
|
|
|
|
105
|
|
|
$result = $this->taskRepository->filterGrid(); |
106
|
|
|
foreach($result as $values){ |
107
|
|
|
$rows[]=array('un_id'=>$values['un_id'], |
108
|
|
|
'priority_name'=>$values['priority_name'], |
109
|
|
|
'status_name'=>$values['status_name'], |
110
|
|
|
'tracker'=>$values['tracker'], |
111
|
|
|
'assignee'=>$values['first_name']." ".$values['last_name'], |
112
|
|
|
'created_at'=>$values['created_at'], |
113
|
|
|
'start_date'=>$values['start_date'], |
114
|
|
|
'end_date'=>$values['end_date']) ; |
115
|
|
|
} |
116
|
|
|
$data=array('current'=>$page,'rowCount'=>$rowCount,'rows'=>$rows,'total'=>count($rows)); |
|
|
|
|
117
|
|
|
return json_encode($data); |
|
|
|
|
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** @function opens exisiting task |
121
|
|
|
@param null |
122
|
|
|
@return html view |
123
|
|
|
*/ |
|
|
|
|
124
|
|
View Code Duplication |
public function view_assignment() { |
|
|
|
|
125
|
|
|
$trackers = $this->taskRepository->getTracker(); |
126
|
|
|
$status = $this->taskRepository->getStatus(); |
127
|
|
|
$priotities = $this->taskRepository->getPriorities(); |
128
|
|
|
$taskData = $this->taskRepository->getTaskData(); |
129
|
|
|
$members = $this->teamRepository->getMembers($taskData['team_id']); |
130
|
|
|
$data = array("trackers"=>$trackers,"status"=>$status,"priorities"=>$priotities,'members'=>$members,'task_data'=>$taskData); |
131
|
|
|
return View::make('templates/task/create_task_modal')->with('data', $data); |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** @function list of previous updates on a task |
135
|
|
|
@param task parent id |
136
|
|
|
@return html view |
|
|
|
|
137
|
|
|
*/ |
138
|
|
|
public function recent_updates($parent_task_id) { |
139
|
|
|
$result=$this->taskRepository->getUpdates($parent_task_id); |
140
|
|
|
return View::make('templates/task/recent_task_updates')->with("result",$result); |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
|
144
|
|
|
/** @function list of previous updates on a task |
145
|
|
|
@param task parent id |
146
|
|
|
@return html view |
147
|
|
|
*/ |
148
|
|
|
public function get_project_teams() { |
149
|
|
|
$result=$this->taskRepository->getProjectTeams(Input::get('projectId')); |
150
|
|
|
$data=''; |
151
|
|
|
$data.="<option value=''>Select Team</option>"; |
152
|
|
|
foreach($result as $teamDetail){ |
153
|
|
|
|
154
|
|
|
$data.="<option value=".$teamDetail['team_channel_id'].">".$teamDetail['channel_view_name']."</option>"; |
155
|
|
|
} |
156
|
|
|
return trim($data,'"'); |
|
|
|
|
157
|
|
|
} |
158
|
|
|
} |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths