A free open source IT asset/license management system
Implement updated at
Marcus Moore9bae1ca59f66
diff --git a/app/Http/Controllers/Reports/CustomComponentReportController.php b/app/Http/Controllers/Reports/CustomComponentReportController.phpindex b395ab8cbf..788ba31b1e 100644--- a/app/Http/Controllers/Reports/CustomComponentReportController.php+++ b/app/Http/Controllers/Reports/CustomComponentReportController.php@@ -103,6 +103,13 @@ class CustomComponentReportController extends Controller$components->whereBetween('components.created_at', [$created_start, $created_end]);}+ if (($request->filled('last_updated_start')) && ($request->filled('last_updated_end'))) {+ $last_updated_start = Carbon::parse($request->input('last_updated_start'))->startOfDay();+ $last_updated_end = Carbon::parse($request->input('last_updated_end'))->endOfDay();++ $components->whereBetween('components.updated_at', [$last_updated_start, $last_updated_end]);+ }+$localConstraints = ['by_model_number' => 'components.model_number','by_name' => 'components.name',@@ -188,13 +195,15 @@ class CustomComponentReportController extends Controller}// todo: checkout date- // todo: created_atif ($request->filled('created_at')) {$row[] = $component->created_at;}- // todo: updated at+ if ($request->filled('updated_at')) {+ $row[] = $component->updated_at;+ }+// todo: deleted// todo: notesdiff --git a/resources/views/reports/custom/component.blade.php b/resources/views/reports/custom/component.blade.phpindex 4934783c42..27cfb3da06 100644--- a/resources/views/reports/custom/component.blade.php+++ b/resources/views/reports/custom/component.blade.php@@ -610,8 +610,6 @@keepEmptyValues: true,});-- // created_start$('.created-range .input-daterange').datepicker({clearBtn: true,todayHighlight: true,@@ -620,6 +618,14 @@keepEmptyValues: true,});+ $('.last_updated-range .input-daterange').datepicker({+ clearBtn: true,+ todayHighlight: true,+ endDate:'0d',+ format: 'yyyy-mm-dd',+ keepEmptyValues: true,+ });+{{--$("#savetemplateform").submit(function(e) {--}}{{-- e.preventDefault(e);--}}diff --git a/tests/Feature/Reporting/Custom/CustomComponentReportTest.php b/tests/Feature/Reporting/Custom/CustomComponentReportTest.phpindex c16229894c..bee65bf738 100644--- a/tests/Feature/Reporting/Custom/CustomComponentReportTest.php+++ b/tests/Feature/Reporting/Custom/CustomComponentReportTest.php@@ -435,8 +435,6 @@ class CustomComponentReportTest extends TestCasepublic function test_limiting_by_updated_at(){- $this->markTestIncomplete();-$this->travel(-60)->days(function () {Component::factory()->create(['name' => 'Component A']);});