From 85e52586dc8bd90704bffb9b285a17f03ed7a0c5 Mon Sep 17 00:00:00 2001 From: Katherine Fleming <2205659+kflemin@users.noreply.github.com> Date: Sat, 30 May 2026 00:11:47 -0600 Subject: [PATCH 1/5] access levels functionality --- proxy.conf.mjs | 2 + public/i18n/en_US.json | 9 ++ public/i18n/es.json | 9 ++ public/i18n/fr_CA.json | 9 ++ .../api/organization/organization.service.ts | 9 +- .../api/organization/organization.types.ts | 5 +- .../access-level-tree.component.html | 146 ++++++++++------- .../access-level-tree.component.ts | 75 ++++++++- .../edit-access-levels-dialog.component.html | 150 +++++++++--------- .../edit-access-levels-dialog.component.ts | 3 +- .../rename-instance-dialog.component.html | 76 ++++----- .../rename-instance-dialog.component.ts | 2 +- .../upload-instances-dialog.component.html | 140 ++++++++-------- .../upload-instances-dialog.component.ts | 11 +- src/styles/styles.scss | 47 ++++++ 15 files changed, 431 insertions(+), 262 deletions(-) diff --git a/proxy.conf.mjs b/proxy.conf.mjs index 6f7a578d..91fbeabf 100644 --- a/proxy.conf.mjs +++ b/proxy.conf.mjs @@ -15,8 +15,10 @@ export default { }, onProxyRes: (proxyRes) => { // Fix http-proxy mangling 204 No Content responses + // Some Django endpoints send a JSON body with 204, which causes parse errors if (proxyRes.statusCode === 204) { proxyRes.headers['content-length'] = '0' + delete proxyRes.headers['content-type'] } }, }, diff --git a/public/i18n/en_US.json b/public/i18n/en_US.json index 72a2845c..cad98e7e 100644 --- a/public/i18n/en_US.json +++ b/public/i18n/en_US.json @@ -76,6 +76,7 @@ "Access Levels Instances (ALI)": "Access Levels Instances (ALI)", "Acknowledge": "Acknowledge", "Actions": "Actions", + "Actions for": "Actions for", "Active": "Active", "Actual > Target": "Actual > Target", "Actual Column": "Actual Column", @@ -262,6 +263,8 @@ "Coal (anthracite)": "Coal (anthracite)", "Coal (bituminous)": "Coal (bituminous)", "Coke": "Coke", + "Collapse": "Collapse", + "Collapse All": "Collapse All", "Collapse Tabs": "Collapse Tabs", "Column": "Column", "Column Description": "Column Description", @@ -272,8 +275,10 @@ "Column Mappings": "Column Mappings", "Column Name": "Column Name", "Column Order\/Visibility": "Column Order\/Visibility", + "Column Profiles": "Column Profiles", "Column Settings": "Column Settings", "Column mappings": "Column mappings", + "Columns": "Columns", "Columns to Include in Reports x axis options": "Columns to Include in Reports x axis options", "Columns to Include in Reports y axis options": "Columns to Include in Reports y axis options", "ComStock Mapping": "ComStock Mapping", @@ -358,7 +363,9 @@ "Create a new...": "Create a new...", "Create a user": "Create a user", "Create an Organization to continue": "Create an Organization to continue", + "Create an additional access level before creating new instances here": "Create an additional access level before creating new instances here", "Create an organization": "Create an organization", + "Create child instance": "Create child instance", "Create child instances": "Create child instances", "Create label": "Create label", "Create my account": "Create my account", @@ -584,6 +591,8 @@ "Existing Labels": "Existing Labels", "Existing Properties": "Existing Properties", "Existing Tax Lots": "Existing Tax Lots", + "Expand": "Expand", + "Expand All": "Expand All", "Export": "Export", "Export BuildingSync": "Export BuildingSync", "Export BuildingSync in Excel format": "Export BuildingSync in Excel format", diff --git a/public/i18n/es.json b/public/i18n/es.json index c1facf65..49f3009c 100644 --- a/public/i18n/es.json +++ b/public/i18n/es.json @@ -76,6 +76,7 @@ "Access Levels Instances (ALI)": "Instancias de nivel de acceso (ALI)", "Acknowledge": "Acuse recibo", "Actions": "Acciones", + "Actions for": "Acciones para", "Active": "Activo", "Actual > Target": "Real > Objetivo", "Actual Column": "Columna real", @@ -262,6 +263,8 @@ "Coal (anthracite)": "Carbón (antracita)", "Coal (bituminous)": "Carbón (bituminoso)", "Coke": "Coque", + "Collapse": "Colapsar", + "Collapse All": "Contraer todo", "Collapse Tabs": "Contraer pestañas", "Column": "Columna", "Column Description": "Descripción de la columna", @@ -272,8 +275,10 @@ "Column Mappings": "Asignación de columnas", "Column Name": "Nombre de la columna", "Column Order\/Visibility": "Orden\/Visibilidad de las columnas", + "Column Profiles": "Perfiles de columna", "Column Settings": "Ajustes de columna", "Column mappings": "Mapeos de columnas", + "Columns": "Columnas", "Columns to Include in Reports x axis options": "Columnas a incluir en los informes Opciones del eje x", "Columns to Include in Reports y axis options": "Columnas a incluir en los informes opciones del eje y", "ComStock Mapping": "Cartografía ComStock", @@ -358,7 +363,9 @@ "Create a new...": "Crear un nuevo...", "Create a user": "Crear un usuario", "Create an Organization to continue": "Crear una organización para continuar", + "Create an additional access level before creating new instances here": "Cree un nivel de acceso adicional antes de crear nuevas instancias aquí.", "Create an organization": "Crear una organización", + "Create child instance": "Crear instancia hija", "Create child instances": "Crear instancias secundarias", "Create label": "Crear etiqueta", "Create my account": "Crear mi cuenta", @@ -584,6 +591,8 @@ "Existing Labels": "Etiquetas existentes", "Existing Properties": "Propiedades existentes", "Existing Tax Lots": "Lotes fiscales existentes", + "Expand": "Expandir", + "Expand All": "Expandir todo", "Export": "Exportar", "Export BuildingSync": "Exportar BuildingSync", "Export BuildingSync in Excel format": "Exportar BuildingSync en formato Excel", diff --git a/public/i18n/fr_CA.json b/public/i18n/fr_CA.json index 204cd610..17e5d207 100644 --- a/public/i18n/fr_CA.json +++ b/public/i18n/fr_CA.json @@ -76,6 +76,7 @@ "Access Levels Instances (ALI)": "Instances de niveaux d'accès (ALI)", "Acknowledge": "Reconnaître", "Actions": "Actions", + "Actions for": "Actions pour", "Active": "actif", "Actual > Target": "Réel > Cible", "Actual Column": "Colonne réelle", @@ -262,6 +263,8 @@ "Coal (anthracite)": "Charbon (anthracite)", "Coal (bituminous)": "Charbon (bitumineux)", "Coke": "Coke", + "Collapse": "Effondrement", + "Collapse All": "Tout réduire", "Collapse Tabs": "Réduire les onglets", "Column": "Colonne", "Column Description": "Description de la colonne", @@ -272,8 +275,10 @@ "Column Mappings": "Mappages de colonnes", "Column Name": "Nom de colonne", "Column Order\/Visibility": "L'Ordre Des Colonnes\/Visibilité", + "Column Profiles": "Profils de colonnes", "Column Settings": "Paramètres de colonne", "Column mappings": "Mappages de colonnes", + "Columns": "Colonnes", "Columns to Include in Reports x axis options": "Colonnes à inclure dans les rapports Options de l'axe des x", "Columns to Include in Reports y axis options": "Colonnes à inclure dans les rapports options de l'axe des y", "ComStock Mapping": "Cartographie ComStock", @@ -358,7 +363,9 @@ "Create a new...": "Créer un nouveau...", "Create a user": "Créer un utilisateur", "Create an Organization to continue": "Créer une organisation pour continuer", + "Create an additional access level before creating new instances here": "Créez un niveau d'accès supplémentaire avant de créer de nouvelles instances ici.", "Create an organization": "Créer une organisation", + "Create child instance": "Créer une instance enfant", "Create child instances": "Créer des instances enfants", "Create label": "Créer une étiquette", "Create my account": "Créer mon compte", @@ -584,6 +591,8 @@ "Existing Labels": "Étiquettes existantes", "Existing Properties": "Propriétés existantes", "Existing Tax Lots": "Lots d'impôt existants", + "Expand": "Développer", + "Expand All": "Développer tout", "Export": "Exportation", "Export BuildingSync": "Exporter BuildingSync", "Export BuildingSync in Excel format": "Exporter BuildingSync au format Excel", diff --git a/src/@seed/api/organization/organization.service.ts b/src/@seed/api/organization/organization.service.ts index c40d3712..6d69f880 100644 --- a/src/@seed/api/organization/organization.service.ts +++ b/src/@seed/api/organization/organization.service.ts @@ -218,12 +218,17 @@ export class OrganizationService { deleteAccessLevelInstance(organizationId: number, accessLevelInstanceId: number) { const url = `/api/v3/organizations/${organizationId}/access_levels/${accessLevelInstanceId}/delete_instance/` - return this._httpClient.delete(url).pipe( + return this._httpClient.delete(url).pipe( tap(() => { - // Update accessLevelTree this.getAccessLevelTree(organizationId).subscribe() }), catchError((error: HttpErrorResponse) => { + // The backend returns 204 with a JSON body, which violates HTTP spec and crashes + // the dev proxy parser. The delete still succeeds on the backend, so refresh the tree. + if (error.status === 0 || error.status === 204) { + this.getAccessLevelTree(organizationId).subscribe() + return of(null) + } return this._errorService.handleError(error, 'Failed to delete Access Level Instance') }), ) diff --git a/src/@seed/api/organization/organization.types.ts b/src/@seed/api/organization/organization.types.ts index 50c2a62c..8b296405 100644 --- a/src/@seed/api/organization/organization.types.ts +++ b/src/@seed/api/organization/organization.types.ts @@ -221,8 +221,9 @@ export type CanDeleteInstanceResponse = { } export type UploadAccessLevelInstancesResponse = { - status: 'success'; - tempfile: string; + success: boolean; + tempfile?: string; + message?: string; } export type StartSavingAccessLevelInstancesRequest = { diff --git a/src/app/modules/organizations/access-level-tree/access-level-tree.component.html b/src/app/modules/organizations/access-level-tree/access-level-tree.component.html index 1872e08b..76405c3e 100644 --- a/src/app/modules/organizations/access-level-tree/access-level-tree.component.html +++ b/src/app/modules/organizations/access-level-tree/access-level-tree.component.html @@ -11,41 +11,37 @@ action2Classes: 'inline-flex md:hidden', }" > - + - + -
-
{{ t('Access Levels') }}
+
{{ t('Access Levels') }}
- @if (currentUser.is_ali_root) { -
- -
- } - -
    - @for (level of accessLevelNames; track level) { -
  1. {{ level }}
  2. - } -
- - @if (currentUser.is_ali_root) { - +
+ } + +
    + @for (level of accessLevelNames; track level) { +
  1. {{ level }}
  2. } - +
+ + @if (currentUser.is_ali_root) { + + }
{{ t('Access Level Instances') }}
-
+
@@ -71,14 +67,40 @@ {{ t('No matching instances') }}
} @else { -
-
- {{ accessLevelNames[0] }} + +
+
+ {{ t('Level') }} 1: {{ accessLevelNames[0] }} +
+ @let rootTree = filteredAccessLevelTree ?? accessLevelTree; + @for (root of rootTree; track root.id) { +
+ {{ root.name }} + @if (currentUser.is_ali_root) { + + } +
+ @if (root.children?.length > 0) { + + } + }
- }
@@ -92,55 +114,59 @@ - @for (instance of tree; track instance.id) { - @let isExpanded = expanded.has(instance.id); - @let hasChildren = instance.children?.length > 0; + +
+ {{ t('Level') }} {{ depth + 1 }}: {{ accessLevelNames[depth] }} +
+ @for (instance of tree; track instance.id) { + @let isExpanded = expanded.has(instance.id); + @let hasChildren = instance.children?.length > 0;
@if (hasChildren) { -
- -
+ + } @else { +
} -
- -
{{ instance.name }}
-
+ {{ instance.name }} @if (currentUser.is_ali_root) { - + }
@if (hasChildren && isExpanded) { -
-
- {{ accessLevelNames[depth + 1] }} -
-
} -
- } + } + @@ -154,7 +180,7 @@
}
- -
- - -
- @if (levelsRemoved) { - @let instancesRemoved = instancesToBeRemoved(); - @if (instancesRemoved > 0) { -
- {{ t('Deleting Access Levels will delete all data associated with that level:') }} -
    - @if (instancesRemoved === 1) { -
  • - {{ instancesRemoved }} - {{ t('access level instance will be removed, including all properties attached to that instance') }} -
  • - } @else { -
  • - {{ instancesRemoved }} - {{ t('access level instances will be removed, including all properties attached to those instances') }} -
  • - } -
-
- } }
-
- + + + -
- + @if (levelsRemoved) { + @let instancesRemoved = instancesToBeRemoved(); + @if (instancesRemoved > 0) { + + {{ t('Deleting Access Levels will delete all data associated with that level:') }} +
    + @if (instancesRemoved === 1) { +
  • + {{ instancesRemoved }} + {{ t('access level instance will be removed, including all properties attached to that instance') }} +
  • + } @else { +
  • + {{ instancesRemoved }} + {{ t('access level instances will be removed, including all properties attached to those instances') }} +
  • + } +
+
+ } + } + + @if (submitted) { + + } + + +
+
diff --git a/src/app/modules/organizations/access-level-tree/edit-access-levels-dialog/edit-access-levels-dialog.component.ts b/src/app/modules/organizations/access-level-tree/edit-access-levels-dialog/edit-access-levels-dialog.component.ts index 061a8074..84ff94be 100644 --- a/src/app/modules/organizations/access-level-tree/edit-access-levels-dialog/edit-access-levels-dialog.component.ts +++ b/src/app/modules/organizations/access-level-tree/edit-access-levels-dialog/edit-access-levels-dialog.component.ts @@ -6,6 +6,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog' import { finalize, Subject, takeUntil } from 'rxjs' import type { AccessLevelsByDepth } from '@seed/api' import { OrganizationService } from '@seed/api' +import { AlertComponent } from '@seed/components' import { SharedImports } from '@seed/directives' import { MaterialImports } from '@seed/materials' import { arraysEqual } from '@seed/utils' @@ -15,7 +16,7 @@ import type { EditAccessLevelsData } from '..' selector: 'seed-edit-access-levels-dialog', templateUrl: './edit-access-levels-dialog.component.html', encapsulation: ViewEncapsulation.None, - imports: [CommonModule, FormsModule, MaterialImports, ReactiveFormsModule, SharedImports], + imports: [AlertComponent, CommonModule, FormsModule, MaterialImports, ReactiveFormsModule, SharedImports], }) export class EditAccessLevelsDialogComponent implements OnInit, OnDestroy { private _data = inject(MAT_DIALOG_DATA) as EditAccessLevelsData diff --git a/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.html b/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.html index c1b9b3df..7caf0280 100644 --- a/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.html +++ b/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.html @@ -1,53 +1,45 @@ -
-
-
+
+ +
{{ t('Rename Access Level Instance') }}
+
+ + + + - -
+ {{ t('Name') }} + + @if (nameValidator.hasError('siblingName')) { + {{ t('Name must not match any of its siblings') }} + } + -
-
{{ t('Rename Access Level Instance') }}
-
- - - - @if (nameValidator.hasError('siblingName')) { - {{ t('Name must not match any of its siblings') }} - } - -
-
-
+ @if (submitted) { + + } + -
- +
+
diff --git a/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.ts b/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.ts index 5f8edf84..551b727f 100644 --- a/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.ts +++ b/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.ts @@ -23,7 +23,7 @@ export class RenameInstanceDialogComponent { private _siblingInstanceNames = new Set() originalName = this._data.instance.name hasChildren = this._data.instance.children?.length > 0 - nameValidator = new FormControl('', this._siblingNameValidator()) + nameValidator = new FormControl(this._data.instance.name, this._siblingNameValidator()) submitted = false constructor() { diff --git a/src/app/modules/organizations/access-level-tree/upload-instances-dialog/upload-instances-dialog.component.html b/src/app/modules/organizations/access-level-tree/upload-instances-dialog/upload-instances-dialog.component.html index 4267cb42..1ad4503a 100644 --- a/src/app/modules/organizations/access-level-tree/upload-instances-dialog/upload-instances-dialog.component.html +++ b/src/app/modules/organizations/access-level-tree/upload-instances-dialog/upload-instances-dialog.component.html @@ -1,85 +1,79 @@ -
-
-
- -
- -
-
{{ t('Upload Access Level Instances') }}
+
+
+ +
{{ t('Upload Access Level Instances') }}
+
+ - @if (!inProgress && !completed) { -
- {{ t('ACCESS_LEVEL_STRUCTURE_UPLOAD_TEXT') }} -
-
- - -
- {{ file?.name ?? t('No file selected') }} -
+ + @if (!inProgress && !completed) { +
+ {{ t('ACCESS_LEVEL_STRUCTURE_UPLOAD_TEXT') }} +
+
+ + +
+ {{ file?.name ?? t('No file selected') }}
- @if (isExcelFile()) { -
+
+ @if (isExcelFile()) { +
+ } + } @else if (inProgress) { + +
+ @for (p of progress; track p.message) { +
{{ t(p.message) }}
+
{{ p.value | number: '1.1-1' }}%
} - } @else if (inProgress) { -
- -
- @for (p of progress; track p.message) { -
{{ t(p.message) }}
-
{{ p.value | number: '1.1-1' }}%
- } +
+ } @else { + + @if (errors?.length > 0) { +
{{ t('Errors occurred while importing access level instances:') }}
+
+
    + @for (error of errors; track $index) { +
  • {{ error }}
  • + } +
-
- } @else { - - @if (errors?.length > 0) { -
{{ t('Errors occurred while importing access level instances:') }}
-
-
    - @for (error of errors; track $index) { -
  • {{ error }}
  • - } -
-
- } @else { - {{ t('ACCESS_LEVEL_IMPORT_SUCCESS', { total: totalAccessLevelInstances | number }) }} - } -
- } -
-
+ } @else { + {{ t('ACCESS_LEVEL_IMPORT_SUCCESS', { total: totalAccessLevelInstances | number }) }} + } + + } + -
+
@if (!inProgress && !completed) { - - + } @else { -
@if (type === 'properties') { diff --git a/src/app/modules/inventory-list/list/grid/actions.component.ts b/src/app/modules/inventory-list/list/grid/actions.component.ts index 6870f977..23bb2e79 100644 --- a/src/app/modules/inventory-list/list/grid/actions.component.ts +++ b/src/app/modules/inventory-list/list/grid/actions.component.ts @@ -35,6 +35,7 @@ import { imports: [MenuItemComponent, MaterialImports], }) export class ActionsComponent implements OnDestroy, OnChanges, OnInit { + @Input() accessLevelNames: string[] = [] @Input() cycleId: number @Input() gridApi: GridApi @Input() groupMode = false @@ -47,10 +48,12 @@ export class ActionsComponent implements OnDestroy, OnChanges, OnInit { @Input() type: InventoryType @Output() refreshInventory = new EventEmitter() @Output() selectedAll = new EventEmitter() + @Output() toggleAccessLevels = new EventEmitter() private _inventoryService = inject(InventoryService) private _dialog = inject(MatDialog) private readonly _unsubscribeAll$ = new Subject() hasSelection: boolean + showAccessLevelInstances = true ngOnInit(): void { return @@ -74,6 +77,11 @@ export class ActionsComponent implements OnDestroy, OnChanges, OnInit { console.log('temp action') } + toggleAccessLevelInstances() { + this.showAccessLevelInstances = !this.showAccessLevelInstances + this.toggleAccessLevels.emit() + } + selectAll() { this.gridApi.selectAll() const inventory_type = this.type === 'taxlots' ? 'taxlot' : 'property' diff --git a/src/app/modules/inventory-list/list/grid/grid.component.ts b/src/app/modules/inventory-list/list/grid/grid.component.ts index 955e8bcc..0124f639 100644 --- a/src/app/modules/inventory-list/list/grid/grid.component.ts +++ b/src/app/modules/inventory-list/list/grid/grid.component.ts @@ -18,6 +18,7 @@ import { IconHeaderComponent } from './icon-header.component' imports: [AgGridAngular, CommonModule, InventoryGridControlsComponent], }) export class InventoryGridComponent implements OnChanges { + @Input() accessLevelNames: string[] = [] @Input() columnDefs!: ColDef[] @Input() currentUser: CurrentUser @Input() inventoryType: string @@ -104,13 +105,46 @@ export class InventoryGridComponent implements OnChanges { this.selectionChanged.emit() } + showAccessLevelInstances = true + getColumnDefs() { const stateColumns = this.addHeaderMenu() - - this.columnDefs = [ + const groups: ColGroupDef[] = [ { headerName: 'Shortcuts', children: this.getShortcutColumns() } as ColGroupDef, - { headerName: 'Details', children: stateColumns } as ColGroupDef, ] + + const accessLevelCols = this.getAccessLevelColumns() + if (accessLevelCols.length) { + groups.push({ headerName: 'Access Level', children: accessLevelCols } as ColGroupDef) + } + + groups.push({ headerName: 'Details', children: stateColumns } as ColGroupDef) + this.columnDefs = groups + } + + getAccessLevelColumns(): ColDef[] { + if (!this.accessLevelNames?.length) return [] + // Skip root level (index 0) — it's always the same for all instances + const names = this.accessLevelNames.slice(1) + return names.map((name) => ({ + field: name, + headerName: name, + hide: !this.showAccessLevelInstances, + filter: true, + sortable: false, + resizable: true, + minWidth: 100, + headerClass: 'access-level-header', + cellClass: 'access-level-cell', + })) + } + + toggleAccessLevelInstances() { + this.showAccessLevelInstances = !this.showAccessLevelInstances + if (this.gridApi) { + const names = (this.accessLevelNames ?? []).slice(1) + this.gridApi.setColumnsVisible(names, this.showAccessLevelInstances) + } } getShortcutColumns(): ColDef[] { diff --git a/src/app/modules/inventory-list/list/inventory.component.html b/src/app/modules/inventory-list/list/inventory.component.html index c53816b4..faa2be61 100644 --- a/src/app/modules/inventory-list/list/inventory.component.html +++ b/src/app/modules/inventory-list/list/inventory.component.html @@ -16,6 +16,7 @@
@@ -71,6 +73,7 @@ { + this.accessLevelNames = org.access_level_names ?? [] + }), + ) + .subscribe() + this.profileId$ .pipe( filter(Boolean), @@ -328,6 +339,10 @@ export class InventoryComponent implements OnDestroy, OnInit { this.gridApi = gridApi } + onToggleAccessLevelInstances() { + this.gridComponent?.toggleAccessLevelInstances() + } + onSelectionChanged() { // this.selectedViewIds = this.type === 'taxlots' // ? this.gridApi.getSelectedRows().map(({ taxlot_view_id }: { taxlot_view_id: number }) => taxlot_view_id) diff --git a/src/styles/styles.scss b/src/styles/styles.scss index fd34a43a..855a9787 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -102,6 +102,22 @@ user-select: text; } +.access-level-header { + background-color: rgb(219 234 254) !important; // blue-100 +} + +.access-level-cell { + background-color: rgb(239 246 255) !important; // blue-50 +} + +.dark .access-level-header { + background-color: rgb(30 58 138 / 40%) !important; // blue-900/40 +} + +.dark .access-level-cell { + background-color: rgb(30 64 175 / 20%) !important; // blue-800/20 +} + .mat-mdc-slide-toggle.mat-mdc-slide-toggle-checked:not(.mat-disabled) .mdc-switch__shadow { background-color: rgb(50 170 118); } From a8cd6e1f45bb09ec95dda69b74a942bbb0677647 Mon Sep 17 00:00:00 2001 From: Katherine Fleming <2205659+kflemin@users.noreply.github.com> Date: Mon, 1 Jun 2026 15:09:36 -0600 Subject: [PATCH 3/5] update translation --- public/i18n/fr_CA.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/i18n/fr_CA.json b/public/i18n/fr_CA.json index 17e5d207..35d2cf1a 100644 --- a/public/i18n/fr_CA.json +++ b/public/i18n/fr_CA.json @@ -263,7 +263,7 @@ "Coal (anthracite)": "Charbon (anthracite)", "Coal (bituminous)": "Charbon (bitumineux)", "Coke": "Coke", - "Collapse": "Effondrement", + "Collapse": "Réduire", "Collapse All": "Tout réduire", "Collapse Tabs": "Réduire les onglets", "Column": "Colonne", From bfffd62f9ed66b85cb5d74c929b70f979c74515c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 21:36:53 +0000 Subject: [PATCH 4/5] Remove unused accessLevelNames input --- src/app/modules/inventory-list/list/grid/actions.component.ts | 1 - src/app/modules/inventory-list/list/inventory.component.html | 1 - 2 files changed, 2 deletions(-) diff --git a/src/app/modules/inventory-list/list/grid/actions.component.ts b/src/app/modules/inventory-list/list/grid/actions.component.ts index 23bb2e79..9570a4d5 100644 --- a/src/app/modules/inventory-list/list/grid/actions.component.ts +++ b/src/app/modules/inventory-list/list/grid/actions.component.ts @@ -35,7 +35,6 @@ import { imports: [MenuItemComponent, MaterialImports], }) export class ActionsComponent implements OnDestroy, OnChanges, OnInit { - @Input() accessLevelNames: string[] = [] @Input() cycleId: number @Input() gridApi: GridApi @Input() groupMode = false diff --git a/src/app/modules/inventory-list/list/inventory.component.html b/src/app/modules/inventory-list/list/inventory.component.html index faa2be61..2d7b03a4 100644 --- a/src/app/modules/inventory-list/list/inventory.component.html +++ b/src/app/modules/inventory-list/list/inventory.component.html @@ -16,7 +16,6 @@
Date: Mon, 1 Jun 2026 21:23:54 -0600 Subject: [PATCH 5/5] lint --- .../list/grid/actions.component.html | 3 ++- .../list/grid/grid.component.ts | 7 ++---- .../access-level-tree.component.html | 22 ++++++++++--------- .../edit-access-levels-dialog.component.html | 17 +++++--------- .../rename-instance-dialog.component.html | 16 +++----------- .../upload-instances-dialog.component.html | 2 +- src/styles/styles.scss | 6 +++-- 7 files changed, 30 insertions(+), 43 deletions(-) diff --git a/src/app/modules/inventory-list/list/grid/actions.component.html b/src/app/modules/inventory-list/list/grid/actions.component.html index 5c52d417..e79c16dc 100644 --- a/src/app/modules/inventory-list/list/grid/actions.component.html +++ b/src/app/modules/inventory-list/list/grid/actions.component.html @@ -33,7 +33,8 @@ @if (type === 'properties') { } - + +
@if (type === 'properties') { diff --git a/src/app/modules/inventory-list/list/grid/grid.component.ts b/src/app/modules/inventory-list/list/grid/grid.component.ts index 0124f639..5534f034 100644 --- a/src/app/modules/inventory-list/list/grid/grid.component.ts +++ b/src/app/modules/inventory-list/list/grid/grid.component.ts @@ -43,6 +43,7 @@ export class InventoryGridComponent implements OnChanges { gridApi!: GridApi darkMode: boolean gridTheme$ = this._configService.gridTheme$ + showAccessLevelInstances = true theme: string @@ -105,13 +106,9 @@ export class InventoryGridComponent implements OnChanges { this.selectionChanged.emit() } - showAccessLevelInstances = true - getColumnDefs() { const stateColumns = this.addHeaderMenu() - const groups: ColGroupDef[] = [ - { headerName: 'Shortcuts', children: this.getShortcutColumns() } as ColGroupDef, - ] + const groups: ColGroupDef[] = [{ headerName: 'Shortcuts', children: this.getShortcutColumns() } as ColGroupDef] const accessLevelCols = this.getAccessLevelColumns() if (accessLevelCols.length) { diff --git a/src/app/modules/organizations/access-level-tree/access-level-tree.component.html b/src/app/modules/organizations/access-level-tree/access-level-tree.component.html index 76405c3e..b8e346c7 100644 --- a/src/app/modules/organizations/access-level-tree/access-level-tree.component.html +++ b/src/app/modules/organizations/access-level-tree/access-level-tree.component.html @@ -69,18 +69,19 @@ } @else {
-
+
{{ t('Level') }} 1: {{ accessLevelNames[0] }} -
@let rootTree = filteredAccessLevelTree ?? accessLevelTree; @for (root of rootTree; track root.id) { -
+
{{ root.name }} @if (currentUser.is_ali_root) {
@@ -144,7 +143,10 @@ (keydown.space)="hasChildren && toggleExpand(instance.id); $event.preventDefault()" > @if (hasChildren) { - + } @else {
} diff --git a/src/app/modules/organizations/access-level-tree/edit-access-levels-dialog/edit-access-levels-dialog.component.html b/src/app/modules/organizations/access-level-tree/edit-access-levels-dialog/edit-access-levels-dialog.component.html index c3e998f3..f88d8661 100644 --- a/src/app/modules/organizations/access-level-tree/edit-access-levels-dialog/edit-access-levels-dialog.component.html +++ b/src/app/modules/organizations/access-level-tree/edit-access-levels-dialog/edit-access-levels-dialog.component.html @@ -4,9 +4,7 @@ @@ -19,7 +17,9 @@
@for (control of levels.controls; track $index) {
-
+
{{ $index + 1 }}
@@ -30,7 +30,7 @@ } @if (levels.length > 1 && !submitted) { - } @@ -39,12 +39,7 @@
- diff --git a/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.html b/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.html index 7caf0280..39514444 100644 --- a/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.html +++ b/src/app/modules/organizations/access-level-tree/rename-instance-dialog/rename-instance-dialog.component.html @@ -1,17 +1,12 @@
- +
{{ t('Rename Access Level Instance') }}
- + {{ t('Name') }} -
diff --git a/src/app/modules/organizations/access-level-tree/upload-instances-dialog/upload-instances-dialog.component.html b/src/app/modules/organizations/access-level-tree/upload-instances-dialog/upload-instances-dialog.component.html index 1ad4503a..170ad9d2 100644 --- a/src/app/modules/organizations/access-level-tree/upload-instances-dialog/upload-instances-dialog.component.html +++ b/src/app/modules/organizations/access-level-tree/upload-instances-dialog/upload-instances-dialog.component.html @@ -1,6 +1,6 @@
- +
{{ t('Upload Access Level Instances') }}
diff --git a/src/styles/styles.scss b/src/styles/styles.scss index 855a9787..f3722dbc 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -313,6 +313,7 @@ &[color='primary']:not(:disabled) { background-color: #2196f3 !important; color: #fff !important; + --mdc-filled-button-container-color: #2196f3; --mdc-protected-button-container-color: #2196f3; --mdc-filled-button-label-text-color: #fff; @@ -326,13 +327,14 @@ &.mat-primary:disabled, &[color='primary']:disabled { background-color: rgba(#2196f3, 0.4) !important; - color: rgba(255, 255, 255, 0.7) !important; + color: rgb(255 255 255 / 70%) !important; } &.mat-warn:not(:disabled), &[color='warn']:not(:disabled) { background-color: #ef4444 !important; color: #fff !important; + --mdc-filled-button-container-color: #ef4444; --mdc-protected-button-container-color: #ef4444; @@ -344,7 +346,7 @@ &.mat-warn:disabled, &[color='warn']:disabled { background-color: rgba(#ef4444, 0.4) !important; - color: rgba(255, 255, 255, 0.7) !important; + color: rgb(255 255 255 / 70%) !important; } } }