diff --git a/.commit b/.commit index 8207edb5a..1f3a8e7c6 100644 --- a/.commit +++ b/.commit @@ -1 +1 @@ -b00a5f060ee4690c7173491ceb2116c39f93ebb7 +47d44c74207f3d773d1ffa718dc102fa887f1cab diff --git a/.sync-history b/.sync-history index c14be39c8..a7f049007 100644 --- a/.sync-history +++ b/.sync-history @@ -1,6 +1 @@ -9259609ee 2024-02-16 Merged PR 64916: 445342 - Fix hyperivew navigation -4fd65a01d 2024-02-15 Merged PR 64883: 444602-account-sidesheet-filtering -102e1446b 2024-02-14 Merged PR 64891: 446290 - Fix edit fk autocomplete data loading -7675877fb 2024-02-13 Merged PR 64855: 446162 - Fix history comparison datepicker -ef7cca96b 2024-02-13 Merged PR 64848: 446188 - Fix history timeline bug -fcca26d50 2024-02-12 Merged PR 64833: Develop hyerpview navigation \ No newline at end of file +41487b63c 2024-02-29 Merged PR 65170: #446439 - Develop new request url params \ No newline at end of file diff --git a/imxweb/custom-theme/custom-theme.scss b/imxweb/custom-theme/custom-theme.scss index 50b3b256a..de5f4f0c6 100644 --- a/imxweb/custom-theme/custom-theme.scss +++ b/imxweb/custom-theme/custom-theme.scss @@ -2,6 +2,7 @@ $theme_font_family: 'Source Sans Pro, "Helvetica Neue", sans-serif' !default; @use 'sass:math'; @use '@angular/material' as mat; +@use '@elemental-ui/core/src/styles/theming/theme' as theme; @import '@elemental-ui/core/src/styles/functions/to_number'; @@ -38,6 +39,4 @@ $theme: mat.define-light-theme( ) ); -.custom-theme { - @include mat.all-component-themes($theme); -} \ No newline at end of file +@include theme.theme('custom-theme', $theme); diff --git a/imxweb/imx-modules/imx-api-aad.tgz b/imxweb/imx-modules/imx-api-aad.tgz index df5702649..a642a0ab1 100644 Binary files a/imxweb/imx-modules/imx-api-aad.tgz and b/imxweb/imx-modules/imx-api-aad.tgz differ diff --git a/imxweb/imx-modules/imx-api-aob.tgz b/imxweb/imx-modules/imx-api-aob.tgz index 079fe701e..c56353b6c 100644 Binary files a/imxweb/imx-modules/imx-api-aob.tgz and b/imxweb/imx-modules/imx-api-aob.tgz differ diff --git a/imxweb/imx-modules/imx-api-apc.tgz b/imxweb/imx-modules/imx-api-apc.tgz index a91d40317..68124e7f8 100644 Binary files a/imxweb/imx-modules/imx-api-apc.tgz and b/imxweb/imx-modules/imx-api-apc.tgz differ diff --git a/imxweb/imx-modules/imx-api-att.tgz b/imxweb/imx-modules/imx-api-att.tgz index 208844dfe..4f3caf4b4 100644 Binary files a/imxweb/imx-modules/imx-api-att.tgz and b/imxweb/imx-modules/imx-api-att.tgz differ diff --git a/imxweb/imx-modules/imx-api-cpl.tgz b/imxweb/imx-modules/imx-api-cpl.tgz index 8341810c7..4a0677067 100644 Binary files a/imxweb/imx-modules/imx-api-cpl.tgz and b/imxweb/imx-modules/imx-api-cpl.tgz differ diff --git a/imxweb/imx-modules/imx-api-dpr.tgz b/imxweb/imx-modules/imx-api-dpr.tgz index d543fafba..bfd20e551 100644 Binary files a/imxweb/imx-modules/imx-api-dpr.tgz and b/imxweb/imx-modules/imx-api-dpr.tgz differ diff --git a/imxweb/imx-modules/imx-api-hds.tgz b/imxweb/imx-modules/imx-api-hds.tgz index 8c1a7b2dd..bba3ce95d 100644 Binary files a/imxweb/imx-modules/imx-api-hds.tgz and b/imxweb/imx-modules/imx-api-hds.tgz differ diff --git a/imxweb/imx-modules/imx-api-o3e.tgz b/imxweb/imx-modules/imx-api-o3e.tgz index c7834f876..6e2a5935c 100644 Binary files a/imxweb/imx-modules/imx-api-o3e.tgz and b/imxweb/imx-modules/imx-api-o3e.tgz differ diff --git a/imxweb/imx-modules/imx-api-o3t.tgz b/imxweb/imx-modules/imx-api-o3t.tgz index f89d40c87..3a0ddb76c 100644 Binary files a/imxweb/imx-modules/imx-api-o3t.tgz and b/imxweb/imx-modules/imx-api-o3t.tgz differ diff --git a/imxweb/imx-modules/imx-api-olg.tgz b/imxweb/imx-modules/imx-api-olg.tgz index 2d4620e77..db36d77cd 100644 Binary files a/imxweb/imx-modules/imx-api-olg.tgz and b/imxweb/imx-modules/imx-api-olg.tgz differ diff --git a/imxweb/imx-modules/imx-api-pol.tgz b/imxweb/imx-modules/imx-api-pol.tgz index 9fbf5feb0..30a794265 100644 Binary files a/imxweb/imx-modules/imx-api-pol.tgz and b/imxweb/imx-modules/imx-api-pol.tgz differ diff --git a/imxweb/imx-modules/imx-api-qbm.tgz b/imxweb/imx-modules/imx-api-qbm.tgz index 184148a16..d97914308 100644 Binary files a/imxweb/imx-modules/imx-api-qbm.tgz and b/imxweb/imx-modules/imx-api-qbm.tgz differ diff --git a/imxweb/imx-modules/imx-api-qer.tgz b/imxweb/imx-modules/imx-api-qer.tgz index 4dd12aa46..114a4d653 100644 Binary files a/imxweb/imx-modules/imx-api-qer.tgz and b/imxweb/imx-modules/imx-api-qer.tgz differ diff --git a/imxweb/imx-modules/imx-api-rmb.tgz b/imxweb/imx-modules/imx-api-rmb.tgz index e39c7b266..2bdbb5a43 100644 Binary files a/imxweb/imx-modules/imx-api-rmb.tgz and b/imxweb/imx-modules/imx-api-rmb.tgz differ diff --git a/imxweb/imx-modules/imx-api-rms.tgz b/imxweb/imx-modules/imx-api-rms.tgz index 15ec3a970..e214f843e 100644 Binary files a/imxweb/imx-modules/imx-api-rms.tgz and b/imxweb/imx-modules/imx-api-rms.tgz differ diff --git a/imxweb/imx-modules/imx-api-rps.tgz b/imxweb/imx-modules/imx-api-rps.tgz index c3ae53cd1..e9b966344 100644 Binary files a/imxweb/imx-modules/imx-api-rps.tgz and b/imxweb/imx-modules/imx-api-rps.tgz differ diff --git a/imxweb/imx-modules/imx-api-sac.tgz b/imxweb/imx-modules/imx-api-sac.tgz index 09d55c1a3..6041a60e3 100644 Binary files a/imxweb/imx-modules/imx-api-sac.tgz and b/imxweb/imx-modules/imx-api-sac.tgz differ diff --git a/imxweb/imx-modules/imx-api-tsb.tgz b/imxweb/imx-modules/imx-api-tsb.tgz index 1275e227e..4cb4cfef1 100644 Binary files a/imxweb/imx-modules/imx-api-tsb.tgz and b/imxweb/imx-modules/imx-api-tsb.tgz differ diff --git a/imxweb/imx-modules/imx-api-uci.tgz b/imxweb/imx-modules/imx-api-uci.tgz index b3b93c2a5..a4bb73659 100644 Binary files a/imxweb/imx-modules/imx-api-uci.tgz and b/imxweb/imx-modules/imx-api-uci.tgz differ diff --git a/imxweb/imx-modules/imx-api.tgz b/imxweb/imx-modules/imx-api.tgz index 09b3a69aa..78e874d66 100644 Binary files a/imxweb/imx-modules/imx-api.tgz and b/imxweb/imx-modules/imx-api.tgz differ diff --git a/imxweb/imx-modules/imx-qbm-dbts.tgz b/imxweb/imx-modules/imx-qbm-dbts.tgz index 9dba18a0a..e55521c45 100644 Binary files a/imxweb/imx-modules/imx-qbm-dbts.tgz and b/imxweb/imx-modules/imx-qbm-dbts.tgz differ diff --git a/imxweb/projects/att/src/lib/decision/attestation-case.component.ts b/imxweb/projects/att/src/lib/decision/attestation-case.component.ts index f86dcfa4b..9aa42e029 100644 --- a/imxweb/projects/att/src/lib/decision/attestation-case.component.ts +++ b/imxweb/projects/att/src/lib/decision/attestation-case.component.ts @@ -38,6 +38,7 @@ import { BaseReadonlyCdr, ClassloggerService, ColumnDependentReference, + MetadataService, SnackBarService, SystemInfoService, } from 'qbm'; @@ -107,6 +108,7 @@ export class AttestationCaseComponent implements OnDestroy, OnInit { private readonly busyService: EuiLoadingService, private readonly systemInfoService: SystemInfoService, private readonly logger: ClassloggerService, + private readonly metadataService: MetadataService, authentication: AuthenticationService ) { this.case = data.case; @@ -228,12 +230,20 @@ export class AttestationCaseComponent implements OnDestroy, OnInit { }); } - public setRelatedOptions(): void { + public async setRelatedOptions(): Promise { this.relatedOptions = - this.data.case.data?.RelatedObjects.map((relatedObject) => { - const objectType = DbObjectKey.FromXml(relatedObject.ObjectKey); - return { ObjectKey: relatedObject.ObjectKey, Display: `${relatedObject.Display} - ${objectType.TableName}` }; - }) || []; + (await Promise.all( + this.data.case.data?.RelatedObjects.map(async (relatedObject) => { + const objectType = DbObjectKey.FromXml(relatedObject.ObjectKey); + if (!this.metadataService.tables[objectType.TableName]) { + await this.metadataService.update([objectType.TableName]); + } + return { + ObjectKey: relatedObject.ObjectKey, + Display: `${relatedObject.Display} - ${this.metadataService.tables[objectType.TableName].DisplaySingular}`, + }; + }) + )) || []; } public setHyperviewObject(selectedRelatedObject: AttestationRelatedObject): void { diff --git a/imxweb/projects/qbm/src/lib/data-source-toolbar/data-source-toolbar.component.ts b/imxweb/projects/qbm/src/lib/data-source-toolbar/data-source-toolbar.component.ts index c70c96f29..c208e8f4f 100644 --- a/imxweb/projects/qbm/src/lib/data-source-toolbar/data-source-toolbar.component.ts +++ b/imxweb/projects/qbm/src/lib/data-source-toolbar/data-source-toolbar.component.ts @@ -480,16 +480,8 @@ export class DataSourceToolbarComponent implements OnChanges, OnInit, OnDestroy this.addSearchFilter(filter); }); - const tree = config?.Filter?.find((elem) => elem.ColumnName === this.columnForTree); - if (tree) { - const display = this.filterTreeItems.Elements.find((elem) => elem.Filter.Value1 === tree.Value1)?.Display; - this.currentFilterData = [{ display, filter: tree }]; - if (this.settings.navigationState.filter) { - this.settings.navigationState.filter.push(tree); - } else { - this.settings.navigationState.filter = [tree]; - } - } + this.addTreeFilterFromConfig(config); + this.addCustomFilterFromConfig(config); if (config?.GroupBy) { this.applyGroupBy(config); @@ -1277,7 +1269,7 @@ export class DataSourceToolbarComponent implements OnChanges, OnInit, OnDestroy if (filterdata) { //Get all filter, that were not associaed with the tree filter const otherFilter = (this.settings.navigationState.filter ?? []).filter( - (elem) => elem.ColumnName !== filterdata[0].filter.ColumnName + (elem) => elem.ColumnName !== filterdata[0].filter.ColumnName, ); this.currentFilterData = filterdata; this.filterTreeSelectionChanged.emit(this.currentFilterData.map((filter) => filter.filter).concat(otherFilter)); // combine the two filter again @@ -1334,6 +1326,8 @@ export class DataSourceToolbarComponent implements OnChanges, OnInit, OnDestroy if (this.filtersCurrentlyApplied) { this.clearFilters(false); } + + this.filterWizardExpression = null; if (emit) { this.navigationStateChanged.emit(this.settings.navigationState); } @@ -1348,7 +1342,7 @@ export class DataSourceToolbarComponent implements OnChanges, OnInit, OnDestroy this.currentFilterData = []; if (emit) { this.filterTreeSelectionChanged.emit( - this.settings.navigationState.filter?.filter((elem) => elem.ColumnName != currentTree.ColumnName) + this.settings.navigationState.filter?.filter((elem) => elem.ColumnName != currentTree.ColumnName), ); } } @@ -1600,6 +1594,43 @@ export class DataSourceToolbarComponent implements OnChanges, OnInit, OnDestroy this.settingsChanged.emit(this.settings); } + /** + * @ignore Used internally + * Checks, if there is a tree filter defined in the config. + * If a tree filter is defined, it initializes the currentFilterData object and adds the parameter to the navigation. + * @param config the configuration, that should be loaded. + */ + private addTreeFilterFromConfig(config: DSTViewConfig): void { + const tree = config?.Filter?.find((elem) => elem.ColumnName === this.columnForTree); + if (tree) { + const display = this.filterTreeItems.Elements.find((elem) => elem.Filter.Value1 === tree.Value1)?.Display; + this.currentFilterData = [{ display, filter: tree }]; + if (this.settings.navigationState.filter) { + this.settings.navigationState.filter.push(tree); + } else { + this.settings.navigationState.filter = [tree]; + } + } + } + + /** + * @ignore Used internally + * Checks, if there is a custom filter defined in the config. + * If a custom filter is defined, it initializes the filterWizardExpression object and adds the parameter to the navigation. + * @param config the configuration, that should be loaded. + */ + private addCustomFilterFromConfig(config: DSTViewConfig): void { + const expression = config?.Filter?.find((elem) => elem.Expression != null); + if (expression) { + this.filterWizardExpression = { Expression: expression.Expression }; + if (this.settings.navigationState.filter) { + this.settings.navigationState.filter.push(expression); + } else { + this.settings.navigationState.filter = [expression]; + } + } + } + /** * @ignore Used internally * Sets any initial values for the supplied filters and makes a call to update the navigation state @@ -1720,6 +1751,7 @@ export class DataSourceToolbarComponent implements OnChanges, OnInit, OnDestroy if ( this.isEnterDisabled || filter?.ColumnName === this.columnForTree || + filter?.Expression != null || (!filter && (!this.searchControl.value || (!!this.searchControl.value && this.searchControl.value?.length === 0))) ) { // Here we return early if there is nothing to search over diff --git a/imxweb/projects/qbm/src/lib/data-source-toolbar/filter-wizard/predefined-filter/predefined-filter.component.html b/imxweb/projects/qbm/src/lib/data-source-toolbar/filter-wizard/predefined-filter/predefined-filter.component.html index b5cdaa0ec..2f9606b86 100644 --- a/imxweb/projects/qbm/src/lib/data-source-toolbar/filter-wizard/predefined-filter/predefined-filter.component.html +++ b/imxweb/projects/qbm/src/lib/data-source-toolbar/filter-wizard/predefined-filter/predefined-filter.component.html @@ -1,4 +1,4 @@ - +

{{ filter.Description || filter.Name }}

diff --git a/imxweb/projects/qbm/src/lib/data-source-toolbar/filter-wizard/predefined-filter/predefined-filter.component.ts b/imxweb/projects/qbm/src/lib/data-source-toolbar/filter-wizard/predefined-filter/predefined-filter.component.ts index d663f7c45..db9b22506 100644 --- a/imxweb/projects/qbm/src/lib/data-source-toolbar/filter-wizard/predefined-filter/predefined-filter.component.ts +++ b/imxweb/projects/qbm/src/lib/data-source-toolbar/filter-wizard/predefined-filter/predefined-filter.component.ts @@ -25,8 +25,6 @@ */ import { AfterViewInit, Component, EventEmitter, Inject, Input, NgZone, OnDestroy, OnInit, Output, QueryList, ViewChildren } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import { MatCardContent } from '@angular/material/card'; import { MatCheckboxChange } from '@angular/material/checkbox'; import { MatSelectChange } from '@angular/material/select'; import { MatTableDataSource } from '@angular/material/table'; @@ -38,7 +36,7 @@ import { DataSourceToolbarSettings } from '../../data-source-toolbar-settings'; import { DSTViewConfig } from '../../data-source-toolbar-view-config.interface'; import { FilterFormState, FilterTypeIdentifier, FilterWizardSidesheetData } from '../filter-wizard.interfaces'; import { FilterWizardService } from '../filter-wizard.service'; - +import * as _ from 'lodash'; @Component({ selector: 'imx-predefined-filter', templateUrl: './predefined-filter.component.html', @@ -103,6 +101,8 @@ export class PredefinedFilterComponent implements OnInit, AfterViewInit, OnDestr public hiddenFilterSet: Set = new Set([]); public filterOptionLengthThreshold = 5; + public filters: DataSourceToolbarFilter[] = []; + /** * This is the mat table datasource. */ @@ -130,8 +130,9 @@ export class PredefinedFilterComponent implements OnInit, AfterViewInit, OnDestr constructor(private readonly filterService: FilterWizardService, @Inject(EUI_SIDESHEET_DATA) public data?: FilterWizardSidesheetData) { // this.hiddenFilters = ['namespace']; this.id = data.id; - this.settings = data.settings; + this.settings = Object.create(data.settings); this.selectedFilters = data.selectedFilters; + this.filters = _.cloneDeep(data.settings.filters); this.internalSelectedFilters = Object.create(this.selectedFilters); this.formState = { canClearFilters: this.selectedFilters.length > 0, dirty: false, filterIdentifier: FilterTypeIdentifier.Predefined }; @@ -241,7 +242,7 @@ export class PredefinedFilterComponent implements OnInit, AfterViewInit, OnDestr * @returns the filter with the selected option */ public getSelectedFilterFromName(filterName: string, value: string): DataSourceToolbarSelectedFilter { - const filter = this.settings.filters?.find((filter) => filter.Name === filterName); + const filter = this.filters?.find((filter) => filter.Name === filterName); if (filter) { filter.CurrentValue = value; const selectedOption = this.findFilterOptionFromValue(value, filter); @@ -286,7 +287,7 @@ export class PredefinedFilterComponent implements OnInit, AfterViewInit, OnDestr * Clears all selected filter values and updates and emits the new navigationState */ private clearFilters(emit = true): void { - this.settings.filters?.forEach((filter) => (filter.CurrentValue = undefined)); + this.filters?.forEach((filter) => (filter.CurrentValue = undefined)); const containsCustomFilters = this.selectedFiltersContainsCustomFilters(); if (containsCustomFilters) { this.customSelectedFilterRemoved.emit(); @@ -321,15 +322,17 @@ export class PredefinedFilterComponent implements OnInit, AfterViewInit, OnDestr */ private updateNavigateStateWithFilters(emit = true): void { this.selectedFilters = Object.create(this.internalSelectedFilters); - this.settings.filters?.forEach((filter) => { + this.filters?.forEach((filter) => { if (filter.CurrentValue) { this.settings.navigationState[filter.Name] = filter.CurrentValue; + this.settings.filters.find(elem=>elem.Name === filter.Name).CurrentValue = filter.CurrentValue; if (filter?.Column) { // This is a local filter and we must filter over this column this.localFilterState.filterColumns[filter.Column] = filter.CurrentValue; } } else { delete this.settings.navigationState[filter.Name]; + delete this.settings.filters.find((elem) => elem.Name === filter.Name).CurrentValue; if (filter?.Column) { delete this.localFilterState.filterColumns[filter.Column]; } diff --git a/imxweb/projects/qbm/src/lib/sidenav-tree/sidenav-tree.component.html b/imxweb/projects/qbm/src/lib/sidenav-tree/sidenav-tree.component.html index 3d06543df..55c8f6e42 100644 --- a/imxweb/projects/qbm/src/lib/sidenav-tree/sidenav-tree.component.html +++ b/imxweb/projects/qbm/src/lib/sidenav-tree/sidenav-tree.component.html @@ -1,4 +1,8 @@ - +
@@ -16,16 +20,17 @@

{{ headerText }}

> - @@ -70,33 +75,27 @@

{{ headerText }}

-
- - -
-
- -
+
+ + +
+
+ +
- +
- {{noResultText | translate}} + {{ noResultText | translate }}
@@ -112,13 +111,7 @@

{{ headerText }}

-