Skip to content

Conversation

@m4dm4rtig4n
Copy link
Contributor

Summary

  • Hide HC/HP distribution and monthly charts for BASE pricing option
  • Only display time-of-use tariff-specific charts for non-BASE pricing
  • Improve error messaging on consumption page

🤖 Generated with Claude Code

gitbutler-client and others added 2 commits November 30, 2025 22:48
This is a merge commit the virtual branches in your workspace.

Due to GitButler managing multiple virtual branches, you cannot switch back and
forth between git branches and virtual branches easily. 

If you switch to another branch, GitButler will need to be reinitialized.
If you commit on this branch, GitButler will throw it away.

Here are the branches that are currently applied:
 - simulator-with-pdl-type (refs/gitbutler/simulator-with-pdl-type)
 - dashboard-pdl-type (refs/gitbutler/dashboard-pdl-type)
   branch head: d0ace94
For more information about what we're doing here, check out our docs:
https://docs.gitbutler.com/features/branch-management/integration-branch
Hide HC/HP distribution and monthly HC/HP charts for BASE pricing option. Only display these time-of-use tariff-specific charts when the PDL has HC/HP pricing (or other time-based options). Also improve error messaging on consumption page to clarify when no PDLs with consumption option are available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings November 30, 2025 23:35
@m4dm4rtig4n m4dm4rtig4n merged commit 2594908 into main Nov 30, 2025
8 checks passed
Copy link

Copilot AI left a comment

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 adapts the consumption page to conditionally display time-of-use tariff-specific charts based on the user's pricing option. Charts showing HC/HP (Heures Creuses/Heures Pleines - off-peak/peak hours) distribution are now hidden for users with BASE pricing, which doesn't differentiate between time periods. Additionally, the error message for the consumption page has been improved to be more specific.

  • Added BASE pricing option checks to hide HC/HP-specific charts
  • Improved error messaging on consumption page header
  • Maintains existing logic for checking data availability and offpeak hours configuration

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
apps/web/src/pages/Consumption/components/MonthlyHcHp.tsx Added BASE pricing check to hide monthly HC/HP chart when user has BASE tariff
apps/web/src/pages/Consumption/components/HcHpDistribution.tsx Added BASE pricing check to hide HC/HP distribution pie chart when user has BASE tariff
apps/web/src/components/PageHeader.tsx Improved error message for consumption page to clarify "no PDL with consumption option enabled"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{location.pathname === '/production'
? 'Aucun PDL de production non lié trouvé'
: location.pathname === '/consumption'
? 'Aucun PDL avec l\'option consommation activée'
Copy link

Copilot AI Nov 30, 2025

Choose a reason for hiding this comment

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

[nitpick] The French error message should use "l'option" instead of "l'option" to avoid the unnecessary escape character. While both work in JSX, the escape is only needed within string literals in JavaScript/TypeScript, not in JSX text content.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants