feat: basic performance report #44

Merged
addison merged 6 commits from 005-002-001-gross-profit-percentage-graph into main 2026-08-15 13:41:51 -04:00
Collaborator

Spec 5.2.1

Changes

  • Added Gross profit percentage page and its print page.
  • As sales invoices and gross profit pages were sharing a lot of code, so extracted some redundant code and used that at both places.
    NOTE: On print screen full width is not possible to show, because charts are shown as svgs with fixed width on paper, and using 100% width cuts it from right that's why, had to give hardcoded width for it.

Testing

  • Make sure you have latest code running.
  • On home screen there must be new card to navigate to gross profit graph. click on it and you must land to graph profit page.
  • Now try applying filters and they must change graph.
  • Click on print page. and try printing graph it must be printed correctly.
# Spec 5.2.1 ## Changes - Added Gross profit percentage page and its print page. - As sales invoices and gross profit pages were sharing a lot of code, so extracted some redundant code and used that at both places. NOTE: On print screen full width is not possible to show, because charts are shown as svgs with fixed width on paper, and using 100% width cuts it from right that's why, had to give hardcoded width for it. ## Testing - [x] Make sure you have latest code running. - [x] On home screen there must be new card to navigate to gross profit graph. click on it and you must land to graph profit page. - [x] Now try applying filters and they must change graph. - [x] Click on print page. and try printing graph it must be printed correctly.
Reapply "feat: add gross profit graph report and related components"
All checks were successful
CI / frontend (pull_request) Successful in 36s
CI / backend (pull_request) Successful in 37s
Amp Review / review (pull_request) Successful in 1s
1d4be06971
This reverts commit b9a4d6fae0.
talha requested review from addison 2026-08-14 10:23:04 -04:00
addison left a comment

This is looking really good!

There seems to be a bug where I can't hover over every bar in the graph. I will hover over a bar and it will show the tooltip for a different bar.

I can't capture a screenshot of this, but it seems to happen frequently.

This is looking really good! There seems to be a bug where I can't hover over every bar in the graph. I will hover over a bar and it will show the tooltip for a different bar. I can't capture a screenshot of this, but it seems to happen frequently.
fix: make gross profit bar tooltips item-specific
All checks were successful
CI / frontend (pull_request) Successful in 38s
CI / backend (pull_request) Successful in 36s
0f988405fc
Amp-Thread-ID: https://ampcode.com/threads/T-01a00269-75e7-71ce-afb2-ed93178f8289
Co-authored-by: Addison Emig <[email protected]>
Owner

It appears that only one tooltip is shown for each day on the x-axis. Hovering over a bar shows the tooltip for the first invoice of that day 🤔

It appears that only one tooltip is shown for each day on the x-axis. Hovering over a bar shows the tooltip for the first invoice of that day 🤔
fix: keep chart bars above cumulative line
All checks were successful
CI / frontend (pull_request) Successful in 35s
CI / backend (pull_request) Successful in 34s
97bc1a0265
Amp-Thread-ID: https://ampcode.com/threads/T-01a00269-75e7-71ce-afb2-ed93178f8289
Co-authored-by: Addison Emig <[email protected]>
Author
Collaborator

@addison wrote in #44 (comment):

It appears that only one tooltip is shown for each day on the x-axis. Hovering over a bar shows the tooltip for the first invoice of that day 🤔

I think, reason is that date is being used as id/key probably, I'll look into it

@addison wrote in https://git.kwila.cloud/kwila/office-extensions/pulls/44#issuecomment-3936: > It appears that only one tooltip is shown for each day on the x-axis. Hovering over a bar shows the tooltip for the first invoice of that day :thinking: I think, reason is that date is being used as id/key probably, I'll look into it
@ -29,2 +29,2 @@
label: "Performance",
description: "Coming soon...",
label: "Gross Profit Graph",
to: "/reports/performance/gross-profit",
Owner

This new page should be titled "Performance" because it will contain more types of graph in the future

The URL should be /reports/performance

Instead of having multiple pages for each performance graph, I think we will show multiple on one page.

Please also rename the page component.

This new page should be titled "Performance" because it will contain more types of graph in the future The URL should be `/reports/performance` Instead of having multiple pages for each performance graph, I think we will show multiple on one page. Please also rename the page component.
addison marked this conversation as resolved
refactor: update gross profit routes and navigation labels
All checks were successful
CI / frontend (pull_request) Successful in 36s
CI / backend (pull_request) Successful in 36s
Amp Review / review (pull_request) Successful in 1s
f2b17be702
talha requested review from addison 2026-08-15 08:22:37 -04:00
@ -0,0 +94,4 @@
return (
<div className="mx-auto flex h-full w-full flex-col">
<PageHeader
title="Gross Profit Percentage Graph"
Owner

We need to update the title of the page to match the nav bar.

Also update the component file name.

We need to update the title of the page to match the nav bar. Also update the component file name.
addison changed title from feat: add gross profit graph report and related components to feat: basic performance report 2026-08-15 08:25:38 -04:00
feat: renamed performance files and title
Some checks failed
CI / frontend (pull_request) Failing after 23s
CI / backend (pull_request) Has been skipped
33405b4a82
Owner

Check formatting - CI failed

Check formatting - CI failed
fix: fixed linting issues
All checks were successful
CI / frontend (pull_request) Successful in 36s
CI / backend (pull_request) Successful in 37s
7152aa1675
addison deleted branch 005-002-001-gross-profit-percentage-graph 2026-08-15 13:41:51 -04:00
addison referenced this pull request from a commit 2026-08-15 13:41:51 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kwila/office-extensions!44
No description provided.