@@ -188,7 +188,7 @@ |
||
| 188 | 188 | })); |
| 189 | 189 | }, |
| 190 | 190 | function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
| 191 | - } |
|
| 191 | + } |
|
| 192 | 192 | ); |
| 193 | 193 | |
| 194 | 194 | CRUD::addFilter([ // select2_multiple filter |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | ], |
| 94 | 94 | false, |
| 95 | 95 | function () { // if the filter is active |
| 96 | - CRUD::addClause('where', 'action', true); |
|
| 97 | - } |
|
| 96 | + CRUD::addClause('where', 'action', true); |
|
| 97 | + } |
|
| 98 | 98 | ); |
| 99 | 99 | |
| 100 | 100 | CRUD::addFilter( |
@@ -114,9 +114,9 @@ discard block |
||
| 114 | 114 | CRUD::addClause('where', 'commentable_type', '=', $value); |
| 115 | 115 | }, |
| 116 | 116 | function () { // if the filter is not active |
| 117 | - CRUD::addClause('where', 'commentable_type', '=', Student::class); |
|
| 118 | - $this->crud->getRequest()->request->add(['commentable_type' => Student::class]); // to make the filter look active |
|
| 119 | - } |
|
| 117 | + CRUD::addClause('where', 'commentable_type', '=', Student::class); |
|
| 118 | + $this->crud->getRequest()->request->add(['commentable_type' => Student::class]); // to make the filter look active |
|
| 119 | + } |
|
| 120 | 120 | ); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | CRUD::addClause('where', 'teacher_id', $value); |
| 79 | 79 | }, |
| 80 | 80 | function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
| 81 | - } |
|
| 81 | + } |
|
| 82 | 82 | ); |
| 83 | 83 | |
| 84 | 84 | CRUD::addFilter( |
@@ -89,10 +89,10 @@ discard block |
||
| 89 | 89 | ], |
| 90 | 90 | false, |
| 91 | 91 | function ($value) { // if the filter is active, apply these constraints |
| 92 | - $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR); |
|
| 93 | - CRUD::addClause('where', 'date', '>=', $dates->from); |
|
| 94 | - CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59'); |
|
| 95 | - } |
|
| 92 | + $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR); |
|
| 93 | + CRUD::addClause('where', 'date', '>=', $dates->from); |
|
| 94 | + CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59'); |
|
| 95 | + } |
|
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -119,15 +119,15 @@ discard block |
||
| 119 | 119 | ], |
| 120 | 120 | false, |
| 121 | 121 | function ($value) { // if the filter is active, apply these constraints |
| 122 | - $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR); |
|
| 123 | - |
|
| 124 | - if ($dates->from) { |
|
| 125 | - CRUD::addClause('where', 'start', '>=', $dates->from); |
|
| 126 | - } |
|
| 127 | - if ($dates->to) { |
|
| 128 | - CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59'); |
|
| 129 | - } |
|
| 130 | - } |
|
| 122 | + $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR); |
|
| 123 | + |
|
| 124 | + if ($dates->from) { |
|
| 125 | + CRUD::addClause('where', 'start', '>=', $dates->from); |
|
| 126 | + } |
|
| 127 | + if ($dates->to) { |
|
| 128 | + CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59'); |
|
| 129 | + } |
|
| 130 | + } |
|
| 131 | 131 | ); |
| 132 | 132 | |
| 133 | 133 | CRUD::addFilter( |
@@ -138,10 +138,10 @@ discard block |
||
| 138 | 138 | ], |
| 139 | 139 | false, |
| 140 | 140 | function ($value) { // if the filter is active, apply these constraints |
| 141 | - $this->crud->query->where('course_id', null); |
|
| 142 | - }, |
|
| 141 | + $this->crud->query->where('course_id', null); |
|
| 142 | + }, |
|
| 143 | 143 | function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
| 144 | - } |
|
| 144 | + } |
|
| 145 | 145 | ); |
| 146 | 146 | |
| 147 | 147 | CRUD::addFilter( |
@@ -152,8 +152,8 @@ discard block |
||
| 152 | 152 | ], |
| 153 | 153 | false, |
| 154 | 154 | function ($value) { // if the filter is active, apply these constraints |
| 155 | - CRUD::addClause('unassigned'); |
|
| 156 | - } |
|
| 155 | + CRUD::addClause('unassigned'); |
|
| 156 | + } |
|
| 157 | 157 | ); |
| 158 | 158 | |
| 159 | 159 | CRUD::addFilter( |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | CRUD::addClause('where', 'teacher_id', $value); |
| 168 | 168 | }, |
| 169 | 169 | function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit) |
| 170 | - } |
|
| 170 | + } |
|
| 171 | 171 | ); |
| 172 | 172 | } |
| 173 | 173 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $q->where('firstname', 'like', '%'.$searchTerm.'%') |
| 59 | 59 | ->orWhere('lastname', 'like', '%'.$searchTerm.'%') |
| 60 | 60 | ->orWhere('email', 'like', '%'.$searchTerm.'%') |
| 61 | - ->orWhere('idnumber', 'like', '%'.$searchTerm.'%'); |
|
| 61 | + ->orWhere('idnumber', 'like', '%'.$searchTerm.'%'); |
|
| 62 | 62 | }); |
| 63 | 63 | }); |
| 64 | 64 | }, |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | ], |
| 96 | 96 | false, |
| 97 | 97 | function () { |
| 98 | - CRUD::addClause('noResult'); |
|
| 99 | - } |
|
| 98 | + CRUD::addClause('noResult'); |
|
| 99 | + } |
|
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | CRUD::addFilter( |