Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/multitenancy_main' into feature/…
Browse files Browse the repository at this point in the history
…790_members_einladen
  • Loading branch information
janikEndtner committed Apr 26, 2024
2 parents ed8655f + df79f35 commit 088f785
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 10 deletions.
4 changes: 2 additions & 2 deletions frontend/cypress/e2e/teammanagement.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Team management tests', () => {
it('Opens teammanagement dialog', () => {
//Check if overview contains correct titles of teammanagement
cy.contains('Teamverwaltung');
cy.contains('Team hinzufügen');
cy.contains('Team erfassen');
cy.contains('Alle Teams');
});

Expand Down Expand Up @@ -132,7 +132,7 @@ describe('Team management tests', () => {
it('Search mixed', () => {
cy.get('app-team-management-banner').getByTestId('teamManagementSearch').click().type('puz', { delay: 1 });

cy.contains('.mat-mdc-autocomplete-panel .mat-mdc-optgroup-label', 'Users');
cy.contains('.mat-mdc-autocomplete-panel .mat-mdc-optgroup-label', 'Members');
cy.contains('.mat-mdc-autocomplete-panel .mat-mdc-optgroup-label', 'Teams');
cy.contains('.mat-mdc-autocomplete-panel mat-option', 'Paco Eggimann ([email protected])');
cy.contains('.mat-mdc-autocomplete-panel mat-option', 'Paco Egiman ([email protected])');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@
</span>
<div class="d-flex align-items-center me-md-5 me-1">
<button
routerLinkActive="d-none"
*ngIf="teamManagementVisible$ | async"
routerLink="team-management"
[attr.data-testId]="'team-management'"
class="topBarEntry btn"
class="topBarEntry btn visible-by-default"
>
<mat-icon aria-hidden="false" aria-label="Group icon" fontIcon="group"></mat-icon>
<span class="d-none d-md-flex">Teamverwaltung </span>
</button>

<button *ngIf="!(teamManagementVisible$ | async)" routerLink="/" class="topBarEntry btn visible-by-default">
<mat-icon aria-hidden="false" aria-label="Group icon" fontIcon="group"></mat-icon>
<span class="d-none d-md-flex">OKR Übersicht </span>
</button>

<button class="topBarEntry btn" href="https://wiki.puzzle.ch/Puzzle/OKRs">
<mat-icon aria-hidden="false" aria-label="Help icon" fontIcon="help_outline"></mat-icon>
<span class="d-none d-md-flex"> Hilfe </span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
import { map } from 'rxjs';
import { filter, map, Observable, of, switchMap } from 'rxjs';
import { ConfigService } from '../../config.service';
import { NavigationEnd, Router } from '@angular/router';
import { UserService } from '../../services/user.service';
Expand All @@ -15,6 +15,7 @@ import { getFullNameFromUser } from '../../shared/types/model/User';
export class ApplicationTopBarComponent implements OnInit {
userFullName: string = '';
menuIsOpen = false;
teamManagementVisible$: Observable<boolean> | undefined;

constructor(
private oauthService: OAuthService,
Expand All @@ -36,6 +37,7 @@ export class ApplicationTopBarComponent implements OnInit {
.subscribe();

this.initUserFullName();
this.initTeamManagementVisible();
}

private initUserFullName() {
Expand All @@ -54,4 +56,13 @@ export class ApplicationTopBarComponent implements OnInit {
this.oauthService.logOut();
});
}

private initTeamManagementVisible() {
this.teamManagementVisible$ = this.router.events.pipe(
filter((e): e is NavigationEnd => e instanceof NavigationEnd),
switchMap(() => {
return of(this.router.url.split('?')[0] === '/');
}),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@
</ng-container>
<ng-container matColumnDef="delete">
<td mat-cell *matCellDef="let element">
<button mat-button (click)="remove(element)">entfernen</button>
<div class="d-flex">
<app-puzzle-icon-button
(click)="remove(element)"
icon="delete-icon.svg"
alt="Remove User Icon"
></app-puzzle-icon-button>
</div>
</td>
</ng-container>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="okrBanner" class="container-fluid">
<div class="row first-line">
<div class="col-12">
<a routerLink="/">Zurück zu OKR's</a>
<a routerLink="/">Zurück zur OKR Übersicht</a>
</div>
</div>
<div class="row second-line">
Expand All @@ -19,7 +19,7 @@ <h1>Teamverwaltung</h1>
>
<span class="d-flex align-items-center fw-bold add-text">
<img alt="Add key-result button" class="add-cross-button" src="/assets/icons/new-icon.svg" />
Team hinzufügen
Team erfassen
</span>
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"WEITERE": "+ {{overflow}} weitere",
"INPUT_PLACEHOLDER": "Nach Team oder Member suchen",
"TEAMS": "Teams",
"USERS": "Users"
"USERS": "Members"
},
"PAGINATOR": {
"MEMBERS_PRO_SEITE": "Members pro Seite",
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/style/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,11 @@ table.okr-table {
border: none;
box-shadow: none;
tr {
height: 40px;
$table-height: 40px;
height: $table-height;

> td {
height: $table-height;
border: none;
background-color: $light-grey;
}
Expand Down

0 comments on commit 088f785

Please sign in to comment.