-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAcceptedAndFollowUpAppsPercentageChart.php
55 lines (45 loc) · 1.95 KB
/
AcceptedAndFollowUpAppsPercentageChart.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
51
52
53
54
55
<?php
namespace App\Http\Livewire;
use App\Helpers\Semester;
use App\Insights\StudentApplications\StudentDataInsight;
use Livewire\Component;
class AcceptedAndFollowUpAppsPercentageChart extends Component
{
public array $labels;
public array $data;
public array $selected_semesters;
public array $selected_schools;
public $weeks_before_semester_start;
public $weeks_before_semester_end;
public array $filing_statuses_category_1;
public array $filing_statuses_category_2;
protected $listeners = ['refreshData5', 'refreshChart5'];
public function mount()
{
$this->weeks_before_semester_start = 4;
$this->weeks_before_semester_end = 4;
$this->filing_statuses_category_1 = ['accepted', 'follow up'];
$this->filing_statuses_category_2= ['not interested', 'maybe later'];
$this->data = $this->dataset;
$this->labels = ['Accepted & Follow Up', 'Other'];
}
public function refreshChart5($data, $labels) {}
public function refreshData5($selected_semesters, $selected_schools, $weeks_before_semester_start, $weeks_before_semester_end)
{
$this->weeks_before_semester_start = $weeks_before_semester_start;
$this->weeks_before_semester_end = $weeks_before_semester_end;
$this->selected_semesters = $selected_semesters;
$this->selected_schools = $selected_schools;
$this->data = $this->dataset;
$this->emit('refreshChart5', $this->data, $this->labels);
}
public function getDatasetProperty()
{
$report = new StudentDataInsight();
return $report->appsCountForTwoCategoriesOfFilingStatus($this->selected_semesters, $this->selected_schools, $this->filing_statuses_category_1, $this->filing_statuses_category_2, $this->weeks_before_semester_start, $this->weeks_before_semester_end);
}
public function render()
{
return view('livewire.charts.accepted-and-follow-up-apps-percentage-chart');
}
}