Skip to content

Customer portal improvements - #9

Open
VixOrg wants to merge 5 commits into
Keleo:mainfrom
VixOrg:customer-portal-improvements
Open

Customer portal improvements#9
VixOrg wants to merge 5 commits into
Keleo:mainfrom
VixOrg:customer-portal-improvements

Conversation

@VixOrg

@VixOrg VixOrg commented Nov 26, 2025

Copy link
Copy Markdown

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:

  • Add possibility to (optionally) display the Activity and Tags of the timesheet entry on the Details.
  • Added possibility to display the monthly total amount just below the 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.
  • Added possibility to display the sub-totals of hours and amounts for each project (configurable)
  • Added breadcrumbs for navigating from Project details back to the Customer details. Improved the Details button link to preserve the currently selected month and year in query params.

No backward compatibility breaking changes.

Victor Nedioglo added 4 commits January 11, 2026 13:57
…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
VixOrg force-pushed the customer-portal-improvements branch from 3cec0a3 to a9128f7 Compare January 11, 2026 12:57
@markmigliorini

markmigliorini commented Apr 16, 2026

Copy link
Copy Markdown

I add csv export button and display the Activity and Tags of the timesheet entry on the Details

2026-04-16 12_04_50-172 22 201 179 - Connessione Desktop remoto

Is possible to share the code ?

also add project filter for client portal

image

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SharedProjectTimesheet configuration (new visibility flags + subtotal/total display options) with form fields, translations, and DB migrations.
  • Add Activity/Tags data to TimeRecord and 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 thread Model/TimeRecord.php
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();
}
}
Comment thread Migrations/Version20251126150000.php Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants