Skip to content

Cleanup and Admin Page#68

Open
kflemin wants to merge 2 commits into
mainfrom
cleanup
Open

Cleanup and Admin Page#68
kflemin wants to merge 2 commits into
mainfrom
cleanup

Conversation

@kflemin
Copy link
Copy Markdown
Contributor

@kflemin kflemin commented May 21, 2026

A collection of cleanup and feature tasks across the app — column rename, admin page
implementation, dark mode fixes, and various UI polish.

Column Rename (Organization → Columns)

  • Added renameColumn() API method and RenameColumnResponse type
  • Implemented rename modal with conflict detection, overwrite option, and user acknowledgement
  • Wired into the column list page

Admin Page (Profile → Admin)

  • Implemented full admin page with 5 sections: org table, create org, create user, add user to
    org, remove user from org
  • Create org includes owner user selector and refreshes the nav org dropdown
  • Create user includes org-dependent access level and access level instance cascading dropdowns
  • Uses SnackBarService for notifications (consistent with rest of app)
  • Proper form reset after submission (no spurious validation errors)
  • Added getAllOrganizations, createOrganization, deleteOrganization, deleteOrganizationInventory,
    addUserToOrganization to OrganizationService
  • Added getAllUsers to UserService with UserBrief type

Property Detail Display Field

  • Fixed getViewDisplayField() to check extra_data columns
  • Property name (from org default display field) is now the main title

Matching Criteria Rework

  • Matching criteria can only be changed if the org has no inventory or only the base access level
  • Added pending removals with undo, locked state indicator

Dataset Detail Upload Buttons

  • Added "+ Data File" and "+ Meter Data" action buttons on the dataset detail page

Dark Mode Fixes

  • Added global .dark CSS overrides for mat-mdc-table components (header, cell, paginator text)
  • Fixed ~30 organization template files with proper dark mode icon/text colors
  • Fixed grid controls hover states and profile page link colors

UI Polish

  • Dashboard: missing EUI/GFA count of 0 no longer shows in red
  • Dataset buttons: switched to filled fa-solid:plus icon (visible on primary buttons)
  • Import settings: added left padding to settings container
  • Profile pages: consistent dark mode text colors

Copy link
Copy Markdown
Contributor

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 bundles several app-wide cleanup tasks and new features, centered around adding admin management tooling, improving column management workflows, and polishing UI/dark-mode behavior across multiple pages.

Changes:

  • Added a new Profile → Admin page with organization/user management workflows backed by new OrganizationService/UserService endpoints.
  • Implemented a column rename flow (API + modal) and reworked matching-criteria editing behavior (locking, pending removals + undo).
  • Applied a set of UI polish updates (dark-mode icon/table styling, dataset detail upload actions, inventory detail title/subtitle swap, dashboard count coloring).

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/styles/styles.scss Adds dark-theme overrides for Material table/paginator colors.
src/app/modules/profile/security/security.component.html Dark-mode icon color tweak.
src/app/modules/profile/info/info.component.html Dark-mode icon color tweak.
src/app/modules/profile/developer/developer.component.html Dark-mode icon color tweak.
src/app/modules/profile/admin/admin.component.ts Implements admin page logic, forms, and org/user operations.
src/app/modules/profile/admin/admin.component.html Adds admin UI with 5 expansion-panel sections and a mat-table org view.
src/app/modules/organizations/settings/salesforce/salesforce.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/members/members.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/labels/labels.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/email-templates/email-templates.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/derived-columns/modal/form-modal.component.html Dark-mode icon fill adjustment for delete icon.
src/app/modules/organizations/derived-columns/derived-columns.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/data-quality/inventory/inventory-table.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/data-quality/goal/goal-table.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/cycles/cycles.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/columns/matching-criteria/matching-criteria.component.ts Adds lock state, pending removals, undo, and save payload changes for matching criteria.
src/app/modules/organizations/columns/matching-criteria/matching-criteria.component.html Updates matching criteria UI to show locked state and pending “Adding/Removing” sections.
src/app/modules/organizations/columns/matching-criteria/criteria-list.component.html Dark-mode icon fill adjustment for remove icon.
src/app/modules/organizations/columns/mappings/modal/create-modal.component.html Dark-mode icon fill adjustment for remove icon.
src/app/modules/organizations/columns/mappings/mappings.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/columns/mappings/action-buttons.component.html Dark-mode icon fill adjustments for action icons.
src/app/modules/organizations/columns/list/modal/rename-modal.component.ts Adds rename modal component logic and calls new renameColumn API.
src/app/modules/organizations/columns/list/modal/rename-modal.component.html Adds rename modal UI with warnings, conflict handling, and acknowledgement.
src/app/modules/organizations/columns/list/list.component.ts Wires column list “Rename” action to open the new rename modal and refresh columns.
src/app/modules/organizations/columns/list/list.component.html Adds dark-mode fills and a rename action button in the column list.
src/app/modules/organizations/columns/import-settings/import-settings.component.html Adds left padding and dark-mode icon fill tweaks for delete icons.
src/app/modules/organizations/columns/geocoding/geocoding.component.html Dark-mode icon fill adjustment for remove icon.
src/app/modules/inventory-list/list/grid/grid-controls.component.html Adds dark-mode hover styling for pagination controls.
src/app/modules/inventory-list/groups/detail/dashboard/dashboard.component.html Prevents zero “missing” counts from being styled as warn (red).
src/app/modules/inventory-detail/detail/detail.component.html Swaps page title/subtitle to make display field the main title.
src/app/modules/datasets/dataset/dataset.component.ts Adds “add data file” / “add meter data” actions opening upload modals.
src/app/modules/datasets/dataset/dataset.component.html Exposes two action buttons on dataset detail page.
src/@seed/components/page/page.component.html Dark-mode icon color tweak for page title icon.
src/@seed/api/user/user.types.ts Adds UserBrief type.
src/@seed/api/user/user.service.ts Adds getAllUsers() superuser endpoint wrapper.
src/@seed/api/organization/organization.types.ts Adds admin-oriented organization response types.
src/@seed/api/organization/organization.service.ts Adds admin org CRUD/add-user APIs; updates display field lookup to check extra_data.
src/@seed/api/column/column.types.ts Adds RenameColumnResponse type.
src/@seed/api/column/column.service.ts Adds renameColumn() API method.

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

this.columns = columns.filter((c) => c.table_name === tableName).sort((a, b) => naturalSort(a.display_name, b.display_name))
this.matchingColumns = this.columns.filter((c) => c.is_matching_criteria)
this.availableColumns = this.columns.filter((c) => !c.is_matching_criteria && !c.derived_column && !c.is_extra_data)
this.pendingRemovals = []
Comment on lines +30 to +32
checkNameExists() {
this.nameExists = this.data.allColumnNames.includes(this.newName)
}
</mat-dialog-content>

<div class="flex justify-end" mat-dialog-actions>
<button (click)="close(true)" mat-raised-button color="primary">Done</button>
Comment on lines +163 to +182
if (!this.cycles.length) return
this._dialog
.open(DataUploadModalComponent, {
width: '40rem',
data: { orgId: this.orgId, dataset: this.dataset, cycles: this.cycles },
})
.afterClosed()
.pipe(switchMap(() => this.getDataset()))
.subscribe()
}

addMeterData() {
if (!this.cycles.length) return
this._dialog
.open(MeterDataUploadModalComponent, {
width: '60rem',
data: { orgId: this.orgId, datasetId: this.dataset.id, cycleId: this.cycles[0].id, file: null },
})
.afterClosed()
.pipe(switchMap(() => this.getDataset()))
Comment on lines +7 to +12
action: addDataFile.bind(this),
actionIcon: 'fa-solid:plus',
actionText: 'Data File',
action2: addMeterData.bind(this),
action2Icon: 'fa-solid:plus',
action2Text: 'Meter Data',
Comment on lines +244 to +253
removeUserFromOrg(user: OrganizationUser): void {
const dialogRef = this._dialog.open(DeleteModalComponent, {
width: '400px',
data: { instance: user.email, model: 'User' },
})

dialogRef.afterClosed().subscribe((confirmed) => {
if (confirmed) {
this._organizationService.deleteOrganizationUser(user.user_id, this.selectedRemoveOrgId).subscribe({
complete: () => {
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.

2 participants