|
@@ -74,12 +74,14 @@ class Presence extends Component
|
|
|
$dow = date('w', strtotime($this->calendar->from));
|
|
$dow = date('w', strtotime($this->calendar->from));
|
|
|
$d = $days[$dow];
|
|
$d = $days[$dow];
|
|
|
|
|
|
|
|
|
|
+ $h = date('H:i', strtotime($this->calendar->from));
|
|
|
|
|
+
|
|
|
// Elenco corsi per tipologia in base al calendario
|
|
// Elenco corsi per tipologia in base al calendario
|
|
|
$courses = \App\Models\Course::where('name', $this->calendar->name)->where('date_from', '<=', $this->calendar->from)->where('date_to', '>=', $this->calendar->to)->pluck('id')->toArray();
|
|
$courses = \App\Models\Course::where('name', $this->calendar->name)->where('date_from', '<=', $this->calendar->from)->where('date_to', '>=', $this->calendar->to)->pluck('id')->toArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
// Elenco utenti iscritti al corso "padre"
|
|
// Elenco utenti iscritti al corso "padre"
|
|
|
- $members_courses = \App\Models\MemberCourse::where('when', 'like', "%" . $d . "%")->whereIn('course_id', $courses)->pluck('member_id')->toArray();
|
|
|
|
|
|
|
+ $members_courses = \App\Models\MemberCourse::where('when', 'like', "%" . $d . "%")->where('when', 'like', '%"from":"' . $h . '"%')->whereIn('course_id', $courses)->pluck('member_id')->toArray();
|
|
|
|
|
|
|
|
if ($this->filter != '')
|
|
if ($this->filter != '')
|
|
|
{
|
|
{
|