Skip to content

A free open source IT asset/license management system

Remove checkout date for now

Marcus Moore6c80ba906d47
diff --git a/app/Http/Controllers/Reports/CustomComponentReportController.php b/app/Http/Controllers/Reports/CustomComponentReportController.php
index 8090e4093c..0f941be46d 100644
--- a/app/Http/Controllers/Reports/CustomComponentReportController.php
+++ b/app/Http/Controllers/Reports/CustomComponentReportController.php
@@ -155,10 +155,10 @@ class CustomComponentReportController extends Controller
}
}
- if ($request->filled('checkout_date')) {
- // todo: checkout date
- $row[] = '';
- }
+ // if ($request->filled('checkout_date')) {
+ // // todo: checkout date
+ // $row[] = '';
+ // }
if ($request->filled('created_at')) {
$row[] = $component->created_at;
@@ -283,9 +283,9 @@ class CustomComponentReportController extends Controller
}
// todo: has to have include_assignments enabled
- if ($request->filled('checkout_date')) {
- $header[] = trans('admin/hardware/table.checkout_date');
- }
+ // if ($request->filled('checkout_date')) {
+ // $header[] = trans('admin/hardware/table.checkout_date');
+ // }
if ($request->filled('created_at')) {
$header[] = trans('general.created_at');
diff --git a/tests/Feature/Reporting/Custom/CustomComponentReportTest.php b/tests/Feature/Reporting/Custom/CustomComponentReportTest.php
index 6e6853afbc..42155ba462 100644
--- a/tests/Feature/Reporting/Custom/CustomComponentReportTest.php
+++ b/tests/Feature/Reporting/Custom/CustomComponentReportTest.php
@@ -97,8 +97,6 @@ class CustomComponentReportTest extends TestCase
public function test_custom_component_report_headers()
{
- $this->markTestIncomplete();
-
$this->sendRequest([
'id' => '1',
'company' => '1',
@@ -143,15 +141,10 @@ class CustomComponentReportTest extends TestCase
trans('general.state'),
trans('general.country'),
trans('general.zip'),
- trans('admin/hardware/table.checkout_date'),
trans('general.created_at'),
trans('general.updated_at'),
trans('general.deleted'),
trans('general.notes'),
- trans('admin/hardware/form.name'),
- trans('admin/hardware/form.tag'),
- trans('admin/reports/general.custom_export.asset_company'),
- trans('admin/reports/general.custom_export.asset_serial'),
]);
}
@@ -593,7 +586,7 @@ class CustomComponentReportTest extends TestCase
public function test_does_not_included_assignments_by_default()
{
- $this->markTestIncomplete();
+ $this->markTestIncomplete('Need to honor include_assignments not being passed');
[$assetA, $assetB] = Asset::factory()
->count(2)
@@ -611,6 +604,13 @@ class CustomComponentReportTest extends TestCase
])
->assertOk()
->assertCsvHeader()
+ ->assertDontSeeTextInStreamedResponse([
+ trans('admin/hardware/table.checkout_date'),
+ trans('admin/hardware/form.name'),
+ trans('admin/hardware/form.tag'),
+ trans('admin/reports/general.custom_export.asset_company'),
+ trans('admin/reports/general.custom_export.asset_serial'),
+ ])
->assertSeeTextInStreamedResponse('Component A')
->assertSeeTextInStreamedResponse('Component B')
->assertSeeTextInStreamedResponse('Component C')
@@ -638,6 +638,14 @@ class CustomComponentReportTest extends TestCase
])
->assertOk()
->assertCsvHeader()
+ ->assertSeeTextInStreamedResponse([
+ // todo:
+ // trans('admin/hardware/table.checkout_date'),
+ trans('admin/hardware/form.name'),
+ trans('admin/hardware/form.tag'),
+ trans('admin/reports/general.custom_export.asset_company'),
+ trans('admin/reports/general.custom_export.asset_serial'),
+ ])
->assertSeeTextInStreamedResponse('Component A')
->assertSeeTextInStreamedResponse('Component B')
->assertSeeTextInStreamedResponse('Component C')