Skip to content

Add portfolio summary page - #56

Open
haneslinger wants to merge 15 commits into
mainfrom
Add-portifolio-summary-page
Open

Add portfolio summary page#56
haneslinger wants to merge 15 commits into
mainfrom
Add-portifolio-summary-page

Conversation

@haneslinger

@haneslinger haneslinger commented Mar 6, 2026

Copy link
Copy Markdown

In progress portfolio summary page.

Done:

  • Cycle/goal selector, portfolio summary chart, and Partner goals
  • Configure Goals dialog (create/edit cycle goals, area/EUI target columns, portfolio target, commitment, Salesforce partner linkage)
  • Add Cycle Goal dialog and Salesforce portfolio/building integration components
  • Salesforce login callback page
  • Fixed section header styling in the Configure Goals dialog (replaced boxed placeholder headers with proper section labels)

Todo:

  • Full HTML/behavior parity review against the legacy portfolio_summary page (see MIGRATION.md parity crosswalk)
  • Verify Salesforce login callback success/failure states, translations, and navigation cutover
  • Click through with real seeded data + Playwright before closing out

…ry-merge

# Conflicts:
#	cspell.json
#	package.json
#	pnpm-lock.yaml
#	src/app/modules/organizations/settings/salesforce-building-integration/salesforce-building-integration.component.ts
@nllong nllong added enhancement New feature or request and removed do not merge labels Jul 24, 2026
Nicholas Long and others added 5 commits July 23, 2026 21:53
- 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>
@kflemin kflemin changed the title Add portifolio summary page Add portfolio summary page Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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> {

Comment thread src/app/modules/insights/portfolio-summary/portfolio-summary.component.ts Outdated
Comment thread src/@seed/api/goal/goal.service.ts Outdated
Comment thread src/@seed/api/goal/goal.service.ts Outdated
Comment thread src/app/modules/insights/portfolio-summary/portfolio-summary.component.html Outdated
/>
</div>
} @else {
<seed-not-found icon="fa-solid:square-poll-horizontal" message="No Goal Selected"></seed-not-found>
nllong and others added 2 commits July 30, 2026 09:53
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants