Skip to content

Commit

Permalink
bug: Fix filter function (#3859)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
FirestarJes and github-actions[bot] authored Dec 20, 2024
1 parent f650a40 commit dcc76de
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,10 @@
"CONSOLIDATION_REQUESTED": "<b>{{ auditedBy }}</b> har oprettet sammenlægning med <b>{{ currentOwner }} • {{ currentOwnerGln }}</b>. <b>{{ previousOwner }} • {{ previousOwnerGln }}</b> ophører d. <b>{{ previousOwnerStopsAt }}</b>",
"CONSOLIDATION_COMPLETED": "Sammenlægning med <b>{{ currentOwner }} • {{ currentOwnerGln }}</b> er udført"
},
"Discontinued": {
"CONSOLIDATION_REQUESTED": "{{ marketParticipant.actorsOverview.drawer.tabs.history.changeTypes.ToBeDiscontinued.CONSOLIDATION_COMPLETED }}",
"CONSOLIDATION_COMPLETED": "{{ marketParticipant.actorsOverview.drawer.tabs.history.changeTypes.ToBeDiscontinued.CONSOLIDATION_COMPLETED }}"
},
"Active": {
"CONSOLIDATION_REQUESTED": "<b>{{ auditedBy }}</b> har oprettet sammenlægning med <b>{{ previousOwner }} • {{ previousOwnerGln }}</b>. <b>{{ previousOwner }} • {{ previousOwnerGln }} </b> ophører d. <b>{{ previousOwnerStopsAt }}</b>",
"CONSOLIDATION_COMPLETED": "Sammenlægning med <b>{{ previousOwner }} • {{ previousOwnerGln }}</b> er udført"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,10 @@
"CONSOLIDATION_REQUESTED": "<b>{{ auditedBy }}</b> has requested consolidation with <b>{{ currentOwner }} • {{ currentOwnerGln }}</b>. <b>{{ previousOwner }} • {{ previousOwnerGln }}</b> will cease on <b>{{ previousOwnerStopsAt }}</b>",
"CONSOLIDATION_COMPLETED": "Consolidation with <b>{{ currentOwner }} • {{ currentOwnerGln }}</b> has been completed"
},
"Discontinued": {
"CONSOLIDATION_REQUESTED": "{{ marketParticipant.actorsOverview.drawer.tabs.history.changeTypes.ToBeDiscontinued.CONSOLIDATION_REQUESTED }}",
"CONSOLIDATION_COMPLETED": "{{ marketParticipant.actorsOverview.drawer.tabs.history.changeTypes.ToBeDiscontinued.CONSOLIDATION_COMPLETED }}"
},
"Active": {
"CONSOLIDATION_REQUESTED": "<b>{{ auditedBy }}</b> has requested consolidation with <b>{{ previousOwner }} • {{ previousOwnerGln }}</b>. <b>{{ previousOwner }} • {{ previousOwnerGln }} </b> will cease on <b>{{ previousOwnerStopsAt }}</b>",
"CONSOLIDATION_COMPLETED": "Consolidation with <b>{{ previousOwner }} • {{ previousOwnerGln }}</b> has been completed"
Expand Down
11 changes: 11 additions & 0 deletions libs/dh/market-participant/grid-areas/src/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ export class DhGridAreasComponent {
const statuses = this.selectedGridAreaStatus();
const gridAreas = this.gridAreas();

this.dataSource.filterPredicate = (data, filter) => {
const lowerCaseFilter = filter.toLowerCase();
return (
data.code.toLowerCase().includes(lowerCaseFilter) ||
data.actor?.toLowerCase().includes(lowerCaseFilter) ||
data.organization?.toLowerCase().includes(lowerCaseFilter) ||
data.priceArea.toLowerCase().includes(lowerCaseFilter) ||
data.type.toLowerCase().includes(lowerCaseFilter) ||
data.status.toLowerCase().includes(lowerCaseFilter)
);
};
this.dataSource.data = gridAreas.filter(
(gridArea) =>
(gridArea.type === this.selectedGridAreaType() || this.selectedGridAreaType() === null) &&
Expand Down

0 comments on commit dcc76de

Please sign in to comment.