Skip to content

Commit

Permalink
HELLODATA-1890 - fix multiselect broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Slawomir Wieczorek committed Nov 29, 2024
1 parent fbac54f commit 08df7be
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion hello-data-portal/hello-data-portal-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"ngx-pipes": "^3.2.2",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primeng": "16.9.1",
"primeng": "17.18.12",
"quill": "^1.3.7",
"rxjs": "^7.8.0",
"tslib": "^2.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export class UserEditComponent extends BaseComponent implements OnInit, OnDestro
}

selectedDashboardsEvent(dashboards: DashboardForUser[], dataDomain: Context) {
console.log('selectedDashboardsEvent', dashboards);
this.store.dispatch(setSelectedDashboardForUser({dashboards, contextKey: dataDomain.contextKey as string}));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ <h2 class="content-block">{{ '@Users overview' | transloco }}</h2>
<td *ngFor="let col of columns">
<ng-container
*ngIf="shouldShowTag(row[col.field], row[col.field + NO_TAG]); else singleValue">
<p-tag *ngFor="let value of row[col.field].split(',')" [value]="value.trim()" class="m-1"
severity="{{getTagSeverity(value)}}"></p-tag>
<p-tag *ngFor="let value of row[col.field].split(',')" [severity]="getTagSeverity(value)" [value]="value.trim()"
class="m-1"></p-tag>
</ng-container>
<ng-template #singleValue>
<ng-container *ngIf="row[col.field] === 'true'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ export class UsersOverviewComponent extends BaseComponent implements OnInit, OnD
return false;
}

getTagSeverity(value: string) {
getTagSeverity(value: string): "success" | "secondary" | "info" | "warning" | "danger" | "contrast" | undefined {
const valTrimmed = value.trim();
if (valTrimmed.includes('Admin')) {
return 'danger';
}
return value.trim().startsWith('BI_') ? '' : 'success';
return value.trim().startsWith('BI_') ? undefined : 'success';
}

translateValue(value: string): string {
Expand Down
8 changes: 4 additions & 4 deletions hello-data-portal/hello-data-portal-ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7579,10 +7579,10 @@ primeicons@^6.0.1:
resolved "https://registry.npmjs.org/primeicons/-/primeicons-6.0.1.tgz#431fa7c79825934eefd62087d8e1faa6a9e376ad"
integrity sha512-KDeO94CbWI4pKsPnYpA1FPjo79EsY9I+M8ywoPBSf9XMXoe/0crjbUK7jcQEDHuc0ZMRIZsxH3TYLv4TUtHmAA==

primeng@16.9.1:
version "16.9.1"
resolved "https://registry.npmjs.org/primeng/-/primeng-16.9.1.tgz#50ee3ed304633c1c5a8ea155f6c0c8be9de7b85c"
integrity sha512-dCkvKoV62xDEyeGaEm8B0qncdKWNz4mDU/Camnr27AafaDNGV0lCA29imgJvZPEmJTmC2wDhtedg7Syfwz4UqA==
primeng@17.18.12:
version "17.18.12"
resolved "https://registry.npmjs.org/primeng/-/primeng-17.18.12.tgz#7514caf46c2ad087b7c04202ab2013e44166b798"
integrity sha512-zElkv9c3209e1j2yNXalfv71gGJeo8c7bUuW3nsvtQZcYsXjdsJvBEhTThVghBdpCUoFYD3cNmTzg3t807cL6A==
dependencies:
tslib "^2.3.0"

Expand Down

0 comments on commit 08df7be

Please sign in to comment.