Add portfolio summary page - #56
Open
haneslinger wants to merge 15 commits into
Open
Conversation
…ry-merge # Conflicts: # cspell.json # package.json # pnpm-lock.yaml # src/app/modules/organizations/settings/salesforce-building-integration/salesforce-building-integration.component.ts
- Resolve merge conflicts with main (cspell.json, package.json,
pnpm-lock.yaml, salesforce-building-integration component) by keeping
main's newer Salesforce Building Integration implementation (BB
Salesforce support, barrel imports) under the PR's renamed path.
- Convert new API/component imports to the @seed/api and MaterialImports
barrels per project convention; register goal and salesforce-portfolio
in the @seed/api barrel index.
- Fix missing salesforce-login/salesforce-portfolio-integration .scss
files referenced by styleUrl (never committed) by dropping the
styleUrl instead.
- Add full Transloco translation coverage for all new UI strings across
the portfolio summary, configure-goals, add-cycle,
salesforce-portfolio-integration and salesforce-login templates.
- Fix several crashes found via live testing against a real backend:
- ConfigureGoalsDialogComponent.save() threw when Salesforce
integration was not enabled / no partner was selected.
- AddCycleDialogComponent.submit() threw when no annual report was
selected (Salesforce not enabled).
- PortfolioSummaryComponent.createChart() threw when a goal had no
weighted EUI data yet.
- PortfolioSummaryComponent.openAddCycle() threw because cycle_goals
was never initialized/fetched.
- Removed a stray {{ chart }} interpolation inside the results canvas
that rendered "[object Object]".
- Add GoalService.getCycleGoals() and call it when selecting/updating a
goal so previously created cycle goals load after a refresh (the
Goal API response never embeds cycle_goals).
- Remove leftover console.log debug statements.
Verified with pnpm lint / pnpm build, and by standing up a throwaway
Django backend (docker) with seeded data and exercising the goal
create/edit, add-cycle, and Salesforce settings flows via Playwright.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ry-merge # Conflicts: # public/i18n/en_US.json
- Remove an erroneous p-80 (320px) padding class on the CycleGoal side summary table, which was causing huge, uneven whitespace around that card. Drop the redundant duplicate p-10 alongside p-4 on the goal summary card for the same reason. - Add px-3 py-1 cell padding to the summary table so label/value columns aren't flush against each other. - Wrap the page content in the same content mx-5 my-2 container used by sibling insights pages (Program Overview, Property Insights, Default Reports) instead of leaving it unpadded/flush with the page edge. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an in-progress Angular replacement for the legacy Insights → Portfolio Summary page and splits Salesforce integration settings into building vs portfolio flows, including an OAuth callback route and new typed API services (goal, salesforce-portfolio) under src/@seed/api/.
Changes:
- Implement Portfolio Summary UI (goal/cycle selection, chart + grids) plus Configure Goals / Add Cycle dialogs and supporting API services.
- Add Salesforce portfolio integration settings page + OAuth login callback route; split org settings routes/nav into building vs portfolio integration.
- Update i18n dictionary, spelling dictionary, and migration parity tracking crosswalk.
Reviewed changes
Copilot reviewed 31 out of 36 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/modules/salesforce-login/salesforce-login.component.ts | New OAuth callback component that exchanges the code for a token then redirects. |
| src/app/modules/salesforce-login/salesforce-login.component.html | “Logging in…” callback view. |
| src/app/modules/salesforce-login/salesforce-login.component.spec.ts | Basic component creation test. |
| src/app/modules/organizations/settings/settings.routes.ts | Split Salesforce settings route into building + portfolio integration routes. |
| src/app/modules/organizations/settings/settings.component.ts | Update settings sidenav entries for the split Salesforce routes. |
| src/app/modules/organizations/settings/salesforce-portfolio-integration/salesforce-portfolio-integration.component.ts | New portfolio integration settings component (config + token verification). |
| src/app/modules/organizations/settings/salesforce-portfolio-integration/salesforce-portfolio-integration.component.html | Portfolio integration settings form + connection status UI. |
| src/app/modules/organizations/settings/salesforce-portfolio-integration/salesforce-portfolio-integration.component.spec.ts | Basic component creation test. |
| src/app/modules/organizations/settings/salesforce-building-integration/salesforce-building-integration.component.ts | Rename existing building integration component (selector + class). |
| src/app/modules/organizations/settings/salesforce-building-integration/salesforce-building-integration.component.html | Update page title to “Salesforce Building Integration”. |
| src/app/modules/organizations/settings/salesforce-building-integration/modal/index.ts | Barrel export for new building-integration modals. |
| src/app/modules/organizations/settings/salesforce-building-integration/modal/form-modal.component.ts | New create/edit mapping modal (SEED column ↔ Salesforce field mapping). |
| src/app/modules/organizations/settings/salesforce-building-integration/modal/form-modal.component.html | Template for mapping modal. |
| src/app/modules/organizations/settings/salesforce-building-integration/modal/delete-modal.component.ts | New delete-confirm modal for mappings. |
| src/app/modules/organizations/settings/salesforce-building-integration/modal/delete-modal.component.html | Template for delete-confirm modal. |
| src/app/modules/insights/portfolio-summary/portfolio-summary.types.ts | Dialog data types for portfolio summary dialogs. |
| src/app/modules/insights/portfolio-summary/portfolio-summary.component.ts | Portfolio Summary implementation (services, dialogs, chart, grids). |
| src/app/modules/insights/portfolio-summary/portfolio-summary.component.html | Portfolio Summary page template (selectors, chart, grids, partner note UI). |
| src/app/modules/insights/portfolio-summary/index.ts | Export portfolio summary component + types. |
| src/app/modules/insights/portfolio-summary/configure-goals-dialog/index.ts | Export configure-goals dialog. |
| src/app/modules/insights/portfolio-summary/configure-goals-dialog/configure-goals-dialog.component.ts | Configure Goals dialog (create/edit goals, access level + column selection, Salesforce linkage). |
| src/app/modules/insights/portfolio-summary/configure-goals-dialog/configure-goals-dialog.component.html | Configure Goals dialog template. |
| src/app/modules/insights/portfolio-summary/add-cycle-dialog/index.ts | Export add-cycle dialog. |
| src/app/modules/insights/portfolio-summary/add-cycle-dialog/add-cycle-dialog.component.ts | Add Cycle dialog (cycle + Salesforce annual report selection). |
| src/app/modules/insights/portfolio-summary/add-cycle-dialog/add-cycle-dialog.component.html | Add Cycle dialog template. |
| src/app/app.routes.ts | Add top-level salesforce-login route. |
| src/@seed/api/salesforce-portfolio/salesforce-portfolio.types.ts | New typed models for Salesforce portfolio API endpoints. |
| src/@seed/api/salesforce-portfolio/salesforce-portfolio.service.ts | New API service for Salesforce portfolio endpoints. |
| src/@seed/api/salesforce-portfolio/index.ts | Barrel export for Salesforce portfolio API. |
| src/@seed/api/index.ts | Export new goal and salesforce-portfolio API modules. |
| src/@seed/api/goal/index.ts | Barrel export for goal API. |
| src/@seed/api/goal/goal.types.ts | Goal/CycleGoal/PortfolioSummary/WeightedEUI types. |
| src/@seed/api/goal/goal.service.ts | New goal API service (goals, cycle goals, weighted EUIs, portfolio summary). |
| public/i18n/en_US.json | Add new translation keys used by the portfolio summary + Salesforce integration UI. |
| MIGRATION.md | Add/expand parity crosswalk and update migration tracking notes. |
| .spelling.dic | Add domain terms (euis, kbtu). |
Comments suppressed due to low confidence (2)
src/app/modules/insights/portfolio-summary/configure-goals-dialog/configure-goals-dialog.component.html:116
- euiColumn3 is a FormControl<number | null>, but the "--" option sets value="" (empty string). This can send "" to the backend instead of null and can break numeric expectations.
<mat-option value="">--</mat-option>
src/@seed/api/goal/goal.service.ts:78
- newGoal is implicitly
any. This reduces type safety on API calls and may fail compilation under strict TS settings.
createGoal(newGoal, orgId: number): Observable<Goal> {
| /> | ||
| </div> | ||
| } @else { | ||
| <seed-not-found icon="fa-solid:square-poll-horizontal" message="No Goal Selected"></seed-not-found> |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Remove stray closing brace causing parse error in configure-goals-dialog.component.ts - Implement OnDestroy interface on PortfolioSummaryComponent - Fix Chart generic type mismatch (data is number[], not string[]) - Fix unsafe any assignment / dot-notation in salesforce-login.component.ts - Run prettier --write on the two HTML files flagged by CI Co-authored-by: Copilot <223556219+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.
In progress portfolio summary page.
Done:
Todo:
portfolio_summarypage (seeMIGRATION.mdparity crosswalk)