|
|
@@ -15,6 +15,9 @@ class FilterController extends Controller
|
|
|
'reclamations' => 'reclamations_view',
|
|
|
'maf_order' => 'maf_orders_view',
|
|
|
'import' => 'imports',
|
|
|
+ 'responsibles' => 'responsibles',
|
|
|
+ 'users' => 'users',
|
|
|
+ 'contracts' => 'contracts',
|
|
|
];
|
|
|
public function getFilters(FilterRequest $request)
|
|
|
{
|
|
|
@@ -30,8 +33,8 @@ class FilterController extends Controller
|
|
|
|
|
|
if (Schema::hasColumn($dbTable, $column)) {
|
|
|
$q = DB::table($dbTable)->select($column)->distinct();
|
|
|
- if(!in_array($table, ['reclamations', 'import'])) {
|
|
|
- $q->where('year' , year());
|
|
|
+ if (Schema::hasColumn($dbTable, 'year')) {
|
|
|
+ $q->where('year' , year());
|
|
|
}
|
|
|
if (Schema::hasColumn($dbTable, 'deleted_at')) {
|
|
|
$q->whereNull('deleted_at');
|