Customer portal improvements - #9
Open
VixOrg wants to merge 5 commits into
Open
Conversation
added 4 commits
January 11, 2026 13:57
…timesheet entry on the Details.
…total hours, when the entry rates are not visible. This way admin can chose not to display the rates and price for each entry, while keeping the total amount visible to the clients.
…tomer details. Improved the Details button link to preserve the currently selected month and year in query params
VixOrg
force-pushed
the
customer-portal-improvements
branch
from
January 11, 2026 12:57
3cec0a3 to
a9128f7
Compare
There was a problem hiding this comment.
Pull request overview
This PR enhances the Customer Portal bundle’s timesheet presentation and configurability by adding optional Activity/Tags columns, allowing totals to be displayed even when per-entry rates are hidden, introducing per-project monthly subtotals, and improving navigation (breadcrumbs + preserving selected month/year).
Changes:
- Extend
SharedProjectTimesheetconfiguration (new visibility flags + subtotal/total display options) with form fields, translations, and DB migrations. - Add Activity/Tags data to
TimeRecordand render them in customer/project timesheet tables. - Compute and display per-project monthly duration/rate subtotals; add breadcrumb navigation and preserve month/year in project links.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Entity/SharedProjectTimesheet.php |
Adds new persisted configuration flags and accessors. |
Form/SharedProjectFormType.php |
Exposes new flags in the admin form. |
Migrations/Version20251125165015.php |
Adds DB columns for activity/tags visibility flags. |
Migrations/Version20251126120000.php |
Adds DB column for “show total when entry rate hidden”. |
Migrations/Version20251126150000.php |
Adds DB column for per-project subtotals visibility. |
Model/TimeRecord.php |
Adds activity name + tags extraction/merge behavior. |
Controller/ViewController.php |
Computes and passes projectTotals to the customer view. |
Resources/views/view/customer.html.twig |
Renders activity/tags columns, optional total amount, and project subtotal columns + preserves month/year in project links. |
Resources/views/view/project.html.twig |
Renders breadcrumb + activity/tags columns and optional total amount under duration. |
Resources/translations/messages.en.yaml |
Adds labels for new configuration options. |
Resources/translations/messages.de.yaml |
Adds labels for new configuration options. |
tests/Service/ManageServiceTest.php |
Covers defaults and persistence of new portal flags. |
tests/Model/TimeRecordTest.php |
Adds tests for activity and tag extraction/merge behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+223
to
+231
| } elseif ($this->mergeMode === RecordMergeMode::MODE_MERGE) { | ||
| // Concatenate different activities | ||
| if ($this->activityName !== $activityName) { | ||
| $this->activityName = implode(', ', array_unique([ | ||
| $this->activityName, | ||
| $activityName | ||
| ])); | ||
| } | ||
| } |
Comment on lines
+130
to
+145
| // Calculate per-project duration and rate totals for the selected month | ||
| $projectTotals = []; | ||
| foreach ($timeRecords as $record) { | ||
| $project = $record->getProject(); | ||
| if ($project !== null) { | ||
| $projectId = $project->getId(); | ||
| if (!isset($projectTotals[$projectId])) { | ||
| $projectTotals[$projectId] = [ | ||
| 'duration' => 0, | ||
| 'rate' => 0.0, | ||
| ]; | ||
| } | ||
| $projectTotals[$projectId]['duration'] += $record->getDuration(); | ||
| $projectTotals[$projectId]['rate'] += $record->getRate(); | ||
| } | ||
| } |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


First of all, thank you for this plugin - it is really useful for my setup :)
I have made some improvements to the customer portal plugin in my fork.
I believe these changes might be useful for other users of the plugin too, hence this pull request.
Here are the imrovements made:
No backward compatibility breaking changes.