-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStudentAppsViewedNotViewedChart.php
50 lines (38 loc) · 1.32 KB
/
StudentAppsViewedNotViewedChart.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace App\Http\Livewire;
use App\Helpers\Semester;
use App\Insights\StudentApplications\StudentDataInsight;
use Livewire\Component;
class StudentAppsViewedNotViewedChart extends Component
{
public array $labels;
public array $data;
public array $selected_semesters;
public array $selected_schools;
public $selected_filing_statuses;
protected $listeners = ['refreshData4', 'refreshChart4'];
public function mount()
{
$data = $this->dataset;
$this->data = $data['datasets'];
$this->labels = $data['labels'];
}
public function refreshChart4($data, $labels) {}
public function refreshData4($selected_semesters, $selected_schools) {
$this->selected_semesters = $selected_semesters;
$this->selected_schools = $selected_schools;
$data = $this->dataset;
$this->data = $data['datasets'];
$this->labels = $data['labels'];
$this->emit('refreshChart4', $this->data, $this->labels);
}
public function getDatasetProperty()
{
$report = new StudentDataInsight();
return $report->appsCountViewedAndNotViewed($this->selected_semesters, $this->selected_schools);
}
public function render()
{
return view('livewire.charts.student-apps-viewed-not-viewed-chart');
}
}