Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
f2076af
Move CustomReportTest to dedicated folder
marcusmoore Apr 27, 2026
49fb899
Scaffold tests
marcusmoore Apr 27, 2026
ca3fa24
Rename CustomReportTest to CustomAssetReportTest
marcusmoore Apr 27, 2026
c14cd27
Update custom asset report url and redirect old url
marcusmoore Apr 27, 2026
282949e
Revert "Update custom asset report url and redirect old url"
marcusmoore Apr 27, 2026
3381d43
Group custom controller routes
marcusmoore Apr 27, 2026
8cd24db
Rename asset report view
marcusmoore Apr 27, 2026
be89075
Stub new report controller and route
marcusmoore Apr 28, 2026
0be05f0
Fill test
marcusmoore Apr 28, 2026
912ccea
WIP: add type to templates
marcusmoore Apr 28, 2026
5275ddb
WIP: begin to build out report page
marcusmoore Apr 28, 2026
767030a
WIP: more template work
marcusmoore Apr 28, 2026
4e5f810
WIP: more template work
marcusmoore Apr 28, 2026
39c35c7
WIP: more template work
marcusmoore Apr 28, 2026
17e39ba
Implement test
marcusmoore Apr 28, 2026
9b95165
Implement test
marcusmoore Apr 28, 2026
3e5c2cd
Disable debugbar when generating report
marcusmoore Apr 28, 2026
2b32ff0
Add 'Customize Report' title to page
marcusmoore May 5, 2026
ba1040e
Consolidate streamed response macros into CustomTestMacros trait
marcusmoore May 5, 2026
99eccd0
Implement accessory report tests
marcusmoore May 5, 2026
d82db19
Fix reference
marcusmoore May 5, 2026
3e05b45
More fixes to form
marcusmoore May 5, 2026
f501ac1
Implement test
marcusmoore May 5, 2026
e0fc313
Scaffold test
marcusmoore May 5, 2026
80f187a
Scaffold tests
marcusmoore May 5, 2026
60b7ea1
WIP: Component report scaffolding
marcusmoore May 5, 2026
2169fe9
Scaffold component custom report page
marcusmoore May 5, 2026
9d5b3df
Fix template
marcusmoore May 6, 2026
e98f73d
Fix test macros
marcusmoore May 6, 2026
2909edf
Write headers to output
marcusmoore May 6, 2026
c30dcb5
Merge branch 'develop' into features/18554-component-report
marcusmoore May 6, 2026
94979a3
Merge branch 'consolidate-test-macros' into features/18554-component-…
marcusmoore May 6, 2026
5ff03ee
Remove duplicate macros
marcusmoore May 6, 2026
698b776
Improve readability and add test
marcusmoore May 6, 2026
7e6ab48
Scaffold test contents
marcusmoore May 6, 2026
48d9f97
Outline test cases
marcusmoore May 6, 2026
54ce566
Fix category select
marcusmoore May 6, 2026
c20c370
Scaffold test case
marcusmoore May 6, 2026
5d88c27
Add csv header helper
marcusmoore May 6, 2026
b528de9
Extract helper method
marcusmoore May 6, 2026
d34dd53
Scaffold additional tests
marcusmoore May 6, 2026
7063bc8
Improve readability
marcusmoore May 6, 2026
ca5afa9
Extract helper
marcusmoore May 6, 2026
dacba47
Add failure message to macros
marcusmoore May 6, 2026
18a1772
Add id, company, category, and name to output
marcusmoore May 6, 2026
796cc8f
Add todo
marcusmoore May 6, 2026
2dd6bd1
Improve messaging
marcusmoore May 7, 2026
244ef8a
Add manufacturer and model number to output
marcusmoore May 7, 2026
ef846f5
Merge branch 'develop' into features/18554-component-report
marcusmoore May 7, 2026
2df39aa
Re-order tests
marcusmoore May 7, 2026
1f19f6b
Implement suppliers
marcusmoore May 7, 2026
c94de01
Implement locations
marcusmoore May 7, 2026
2106256
Sort lines
marcusmoore May 7, 2026
da092d4
Implement name
marcusmoore May 7, 2026
a6e6797
Implement order number
marcusmoore May 7, 2026
de5c555
Implement purchase date
marcusmoore May 7, 2026
556af49
Implement quantity
marcusmoore May 7, 2026
7c9a5fb
Implement quantity
marcusmoore May 7, 2026
1666ee6
Add todos
marcusmoore May 7, 2026
a4bfa9f
Add more todos
marcusmoore May 7, 2026
a1a7969
Implement unit cost
marcusmoore May 7, 2026
16ff4b0
Implement created at
marcusmoore May 7, 2026
9bae1ca
Implement updated at
marcusmoore May 7, 2026
7b21e90
Improve method readability
marcusmoore May 7, 2026
50cfdd5
Improve variable name
marcusmoore May 7, 2026
a4fde63
Parse purchase dates
marcusmoore May 7, 2026
2404dfb
Improve readability
marcusmoore May 7, 2026
fff5004
Handle soft deletes
marcusmoore May 11, 2026
5187f4b
Merge branch 'develop' into features/18554-component-report
marcusmoore May 12, 2026
7c85b46
Fix potential null
marcusmoore May 12, 2026
2b56706
Remove accessory references
marcusmoore May 12, 2026
2492773
Fix filename
marcusmoore May 12, 2026
4a7f9ea
Merge branch 'develop' into features/18554-component-report
marcusmoore Jun 1, 2026
baa9ec1
Implement updated before
marcusmoore Jun 1, 2026
823084d
Update method name
marcusmoore Jun 1, 2026
f902503
Update method name
marcusmoore Jun 1, 2026
15aa9de
Extract method
marcusmoore Jun 1, 2026
d7fa47c
Allow filtering by checkout range
marcusmoore Jun 1, 2026
a47f36f
Extract method
marcusmoore Jun 1, 2026
40c4f45
Implement company scoping tests
marcusmoore Jun 2, 2026
aa1e56b
Scaffold test
marcusmoore Jun 2, 2026
001a59f
Inline variable
marcusmoore Jun 2, 2026
6cf1f32
More scaffolding
marcusmoore Jun 2, 2026
b6ea3b5
Populate test
marcusmoore Jun 2, 2026
3c30fd7
WIP: begin to list assignments
marcusmoore Jun 2, 2026
7585fb5
Fix input name
marcusmoore Jun 2, 2026
e680810
WIP: Render assignments
marcusmoore Jun 2, 2026
dec4ff9
WIP: Populate additional fields
marcusmoore Jun 2, 2026
801cef8
WIP: improve test
marcusmoore Jun 3, 2026
fd411da
Improve assertions
marcusmoore Jun 3, 2026
29753c7
Fix label
marcusmoore Jun 3, 2026
01a87c3
Add some todos
marcusmoore Jun 3, 2026
e8d8188
WIP: Populate most fields correctly
marcusmoore Jun 3, 2026
b3bd6d2
Fix including assets
marcusmoore Jun 3, 2026
1992d03
Simplify assignments
marcusmoore Jun 3, 2026
6c80ba9
Remove checkout date for now
marcusmoore Jun 3, 2026
86a2675
WIP
marcusmoore Jun 3, 2026
357fc27
Add checkout date and assigned quantity
marcusmoore Jun 3, 2026
d10cd9b
Refactor to mapping
marcusmoore Jun 3, 2026
68efc80
Add docblock
marcusmoore Jun 3, 2026
7888e66
Adhere to include_assignments
marcusmoore Jun 3, 2026
4603bde
Add breadcrumb
marcusmoore Jun 4, 2026
ed241ee
Add report to report index
marcusmoore Jun 4, 2026
5b8f840
Add link to custom report to toolbar
marcusmoore Jun 4, 2026
5a1be73
More translations
marcusmoore Jun 4, 2026
d50244d
Merge branch 'develop' into features/18554-component-report
marcusmoore Jun 4, 2026
5f1c459
Allow storing report templates for components
marcusmoore Jun 4, 2026
86ace3a
Fix some page headings
marcusmoore Jun 4, 2026
d234c29
Create and use saved report template select
marcusmoore Jun 4, 2026
d90a742
Enable calendar popup for checkout range
marcusmoore Jun 4, 2026
aa3e95b
Remove help block
marcusmoore Jun 4, 2026
11be96f
Remove prevention of lazy loading
marcusmoore Jun 4, 2026
40f2907
More translations
marcusmoore Jun 4, 2026
9c042ef
Scaffold request
marcusmoore Jun 4, 2026
00fff45
Add validation
marcusmoore Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions app/Http/Controllers/ReportTemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
use UnhandledMatchError;

class ReportTemplatesController extends Controller
{
Expand All @@ -18,6 +19,7 @@ public function store(Request $request): RedirectResponse
$validated = $request->validate(Arr::except((new ReportTemplate)->getRules(), 'options'));

$report = $request->user()->reportTemplates()->create([
'type' => $validated['type'],
'name' => $validated['name'],
'options' => $request->except(['_token', 'name', 'is_shared']),
'is_shared' => $request->has('is_shared'),
Expand All @@ -33,11 +35,17 @@ public function show(ReportTemplate $reportTemplate)
$this->authorize('reports.view');

$customfields = CustomField::get();
$report_templates = ReportTemplate::orderBy('name')->get();

return view('reports/custom', [
try {
$view = $reportTemplate->getViewPath();
} catch (UnhandledMatchError $e) {
return redirect()
->route('reports.index')
->with('error', 'Saved template type is not valid.');
}

return view($view, [
'customfields' => $customfields,
'report_templates' => $report_templates,
'template' => $reportTemplate,
]);
}
Expand All @@ -52,7 +60,15 @@ public function edit(ReportTemplate $reportTemplate)
->withError(trans('general.report_not_editable'));
}

return view('reports/custom', [
try {
$view = $reportTemplate->getViewPath();
} catch (UnhandledMatchError $e) {
return redirect()
->route('reports.index')
->with('error', 'Saved template type is not valid.');
}

return view($view, [
'customfields' => CustomField::get(),
'template' => $reportTemplate,
]);
Expand Down
Loading
Loading