From 5669afda64974dc981d7d7560ebcf898eced9c6e Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 21 Apr 2020 13:08:45 +0000 Subject: [PATCH] Restyled by prettier --- Phonebook.Frontend/src/app/app.component.ts | 27 +++-- Phonebook.Frontend/src/app/app.module.ts | 25 ++-- .../dialog-view/dialog-view.component.spec.ts | 5 +- .../dialog-view/dialog-view.component.ts | 8 +- .../src/app/dialogs/dialogs.component.html | 7 +- .../src/app/dialogs/dialogs.component.scss | 4 +- .../src/app/dialogs/dialogs.component.spec.ts | 5 +- .../src/app/dialogs/dialogs.component.ts | 2 +- .../profile-picture.component.ts | 2 +- .../src/app/services/dialog.service.ts | 18 +-- .../src/app/services/release-info.service.ts | 9 +- .../navigation/navigation.component.html | 48 ++++++-- .../navigation/navigation.component.ts | 12 +- .../user-detail/user-detail.component.html | 114 +++++++++++++----- .../user/user-detail/user-detail.component.ts | 14 +-- .../bug-report-consent.component.html | 25 ++-- .../src/app/shared/dialogs/dialogs.module.ts | 8 +- .../display-notification.dialog.html | 44 +++++-- .../release-notification.dialog.ts | 5 +- .../incorrect-user-information.component.html | 4 +- 20 files changed, 260 insertions(+), 126 deletions(-) diff --git a/Phonebook.Frontend/src/app/app.component.ts b/Phonebook.Frontend/src/app/app.component.ts index 163b7c009..b8e5e9753 100644 --- a/Phonebook.Frontend/src/app/app.component.ts +++ b/Phonebook.Frontend/src/app/app.component.ts @@ -14,7 +14,7 @@ import { InitTheme, SetTheme, SetSendFeedback, - SetDisplayedNotificationVersion + SetDisplayedNotificationVersion, } from 'src/app/shared/states/App.state'; import { ReleaseInfoService } from './services/release-info.service'; import { runtimeEnvironment } from 'src/environments/runtime-environment'; @@ -27,7 +27,7 @@ import { DialogService } from 'src/app/services/dialog.service'; @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + styleUrls: ['./app.component.scss'], }) export class AppComponent implements OnInit, OnDestroy { //get url params @@ -107,15 +107,17 @@ export class AppComponent implements OnInit, OnDestroy { this.store.dispatch(new SetDisplayedNotificationVersion(DisplayNotificationDialog.version)); } //subscribe on query param changes, if changed open snackbar - this.activatedRoute.queryParamMap.pipe(untilComponentDestroyed(this)).subscribe((queryParamMap) => { - if (queryParamMap.get('skip_dialog') === 'true') { - if (!this.skippedDialogs) { - this.openJustSkippedDialogsSnackBar(); - } else { - this.openSkippedDialogsSnackBar(); + this.activatedRoute.queryParamMap + .pipe(untilComponentDestroyed(this)) + .subscribe((queryParamMap) => { + if (queryParamMap.get('skip_dialog') === 'true') { + if (!this.skippedDialogs) { + this.openJustSkippedDialogsSnackBar(); + } else { + this.openSkippedDialogsSnackBar(); + } } - } - }); + }); // Ask for Permission to send Bug reports, don't show dialog if dialogs should be skipped if ( @@ -126,7 +128,10 @@ export class AppComponent implements OnInit, OnDestroy { this.dialogService.displayDialog('bug-report-consent'); } - if (DisplayNotificationDialog.version > (this.store.selectSnapshot(AppState.displayedNotificationVersion) | 0)) { + if ( + DisplayNotificationDialog.version > + (this.store.selectSnapshot(AppState.displayedNotificationVersion) | 0) + ) { this.dialogService.displayDialog('notification'); } else if (!this.skippedDialogs) { // Display the Release Dialog only if no notification Dialog is shown, in order to not overwhelm the user with dialogs. diff --git a/Phonebook.Frontend/src/app/app.module.ts b/Phonebook.Frontend/src/app/app.module.ts index beae26da4..771ae3b94 100644 --- a/Phonebook.Frontend/src/app/app.module.ts +++ b/Phonebook.Frontend/src/app/app.module.ts @@ -45,7 +45,7 @@ import { CommonPersonsState, LastPersonsState, SearchState, - TableState + TableState, } from 'src/app/shared/states'; import { environment } from 'src/environments/environment'; // Services @@ -65,7 +65,7 @@ declare const require; NavigationComponent, OnlineBarComponent, DialogsComponent, - DialogViewComponent + DialogViewComponent, ], imports: [ BrowserModule, @@ -81,12 +81,15 @@ declare const require; FeatureFlagModule.forRoot(), NotImplementedModule, MatBadgeModule, - NgxsModule.forRoot([AppState, BookmarksState, LastPersonsState, CommonPersonsState, SearchState, TableState], { - // TODO: Fix https://github.com/T-Systems-MMS/phonebook/issues/95 first. - // developmentMode: !environment.production - }), + NgxsModule.forRoot( + [AppState, BookmarksState, LastPersonsState, CommonPersonsState, SearchState, TableState], + { + // TODO: Fix https://github.com/T-Systems-MMS/phonebook/issues/95 first. + // developmentMode: !environment.production + } + ), NgxsStoragePluginModule.forRoot({ - key: ['appstate', 'bookmarks', 'commonpersons', 'lastpersons', 'tablestate'] + key: ['appstate', 'bookmarks', 'commonpersons', 'lastpersons', 'tablestate'], }), NgxsRouterPluginModule.forRoot(), NgxsLoggerPluginModule.forRoot({ disabled: environment.production }), @@ -100,7 +103,7 @@ declare const require; IeWarningModule, PlatformModule, // Pages - UserPagesModule + UserPagesModule, ], providers: [ { provide: HTTP_INTERCEPTORS, useClass: HttpRedirectToLogin, multi: true }, @@ -115,7 +118,7 @@ declare const require; // }, { provide: MAT_DIALOG_DEFAULT_OPTIONS, - useValue: { panelClass: ['mat-dialog-override', 'mat-typography'] } + useValue: { panelClass: ['mat-dialog-override', 'mat-typography'] }, }, WINDOW_PROVIDER, ServiceWorkerService, @@ -123,8 +126,8 @@ declare const require; MailService, FloorplanService, ReleaseInfoService, - ThemeService + ThemeService, ], - bootstrap: [AppComponent] + bootstrap: [AppComponent], }) export class AppModule {} diff --git a/Phonebook.Frontend/src/app/dialogs/dialog-view/dialog-view.component.spec.ts b/Phonebook.Frontend/src/app/dialogs/dialog-view/dialog-view.component.spec.ts index 94af2e392..c55372a20 100644 --- a/Phonebook.Frontend/src/app/dialogs/dialog-view/dialog-view.component.spec.ts +++ b/Phonebook.Frontend/src/app/dialogs/dialog-view/dialog-view.component.spec.ts @@ -8,9 +8,8 @@ describe('DialogViewComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ DialogViewComponent ] - }) - .compileComponents(); + declarations: [DialogViewComponent], + }).compileComponents(); })); beforeEach(() => { diff --git a/Phonebook.Frontend/src/app/dialogs/dialog-view/dialog-view.component.ts b/Phonebook.Frontend/src/app/dialogs/dialog-view/dialog-view.component.ts index c23852897..26309f54c 100644 --- a/Phonebook.Frontend/src/app/dialogs/dialog-view/dialog-view.component.ts +++ b/Phonebook.Frontend/src/app/dialogs/dialog-view/dialog-view.component.ts @@ -7,14 +7,14 @@ import { ComponentRef, ComponentFactoryResolver, ComponentFactory, - ChangeDetectorRef + ChangeDetectorRef, } from '@angular/core'; import { DialogItem } from 'src/app/dialogs/dialog-item'; @Component({ selector: 'app-dialog-view', templateUrl: './dialog-view.component.html', - styleUrls: ['./dialog-view.component.scss'] + styleUrls: ['./dialog-view.component.scss'], }) export class DialogViewComponent { @Input() title: string; @@ -27,7 +27,9 @@ export class DialogViewComponent { ngAfterViewInit(): void { //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only. //Add 'implements AfterViewInit' to the class. - const factory: ComponentFactory = this.resolver.resolveComponentFactory(this.content.component); + const factory: ComponentFactory = this.resolver.resolveComponentFactory( + this.content.component + ); this.componentRef = this.container.createComponent(factory); this.componentRef.instance.data = this.data; this.cdRef.detectChanges(); diff --git a/Phonebook.Frontend/src/app/dialogs/dialogs.component.html b/Phonebook.Frontend/src/app/dialogs/dialogs.component.html index 8f0dc8e47..b55e8f189 100644 --- a/Phonebook.Frontend/src/app/dialogs/dialogs.component.html +++ b/Phonebook.Frontend/src/app/dialogs/dialogs.component.html @@ -8,6 +8,11 @@

- +
diff --git a/Phonebook.Frontend/src/app/dialogs/dialogs.component.scss b/Phonebook.Frontend/src/app/dialogs/dialogs.component.scss index d03460fac..afa597d28 100644 --- a/Phonebook.Frontend/src/app/dialogs/dialogs.component.scss +++ b/Phonebook.Frontend/src/app/dialogs/dialogs.component.scss @@ -1,7 +1,7 @@ .github-icon { - margin: 0 16px 0 0; + margin: 0 16px 0 0; } .close-button { - float: right; + float: right; } diff --git a/Phonebook.Frontend/src/app/dialogs/dialogs.component.spec.ts b/Phonebook.Frontend/src/app/dialogs/dialogs.component.spec.ts index 488c25383..3c3fd18a0 100644 --- a/Phonebook.Frontend/src/app/dialogs/dialogs.component.spec.ts +++ b/Phonebook.Frontend/src/app/dialogs/dialogs.component.spec.ts @@ -8,9 +8,8 @@ describe('DialogsComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ DialogsComponent ] - }) - .compileComponents(); + declarations: [DialogsComponent], + }).compileComponents(); })); beforeEach(() => { diff --git a/Phonebook.Frontend/src/app/dialogs/dialogs.component.ts b/Phonebook.Frontend/src/app/dialogs/dialogs.component.ts index 9f0b72ba9..91747061e 100644 --- a/Phonebook.Frontend/src/app/dialogs/dialogs.component.ts +++ b/Phonebook.Frontend/src/app/dialogs/dialogs.component.ts @@ -6,7 +6,7 @@ import { DialogItem } from 'src/app/dialogs/dialog-item'; @Component({ selector: 'app-dialogs', templateUrl: './dialogs.component.html', - styleUrls: ['./dialogs.component.scss'] + styleUrls: ['./dialogs.component.scss'], }) export class DialogsComponent implements OnInit { title: string; diff --git a/Phonebook.Frontend/src/app/modules/profile-picture/components/profile-picture/profile-picture.component.ts b/Phonebook.Frontend/src/app/modules/profile-picture/components/profile-picture/profile-picture.component.ts index a39dff42c..78ae90ac7 100644 --- a/Phonebook.Frontend/src/app/modules/profile-picture/components/profile-picture/profile-picture.component.ts +++ b/Phonebook.Frontend/src/app/modules/profile-picture/components/profile-picture/profile-picture.component.ts @@ -12,7 +12,7 @@ import { DialogService } from 'src/app/services/dialog.service'; @Component({ selector: 'app-profile-picture', templateUrl: './profile-picture.component.html', - styleUrls: ['./profile-picture.component.scss'] + styleUrls: ['./profile-picture.component.scss'], }) export class ProfilePictureComponent implements OnInit, OnDestroy { @Input() diff --git a/Phonebook.Frontend/src/app/services/dialog.service.ts b/Phonebook.Frontend/src/app/services/dialog.service.ts index 848b16a5c..1ef589703 100644 --- a/Phonebook.Frontend/src/app/services/dialog.service.ts +++ b/Phonebook.Frontend/src/app/services/dialog.service.ts @@ -14,7 +14,7 @@ import { ProfilePictureEnlargeDialog } from 'src/app/modules/profile-picture/com import { IeWarningComponent } from 'src/app/shared/dialogs/ie-warning/ie-warning.component'; import { IncorrectUserInformationComponent } from 'src/app/shared/dialogs/user-information/incorrect-user-information.component'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DialogService { constructor( @@ -35,7 +35,7 @@ export class DialogService { case 'release-notes': dialogConfig.data = { title: "We've updated to a newer Version!", - content: new DialogItem(ReleaseNotificationDialog) + content: new DialogItem(ReleaseNotificationDialog), }; this.dialog.open(DialogsComponent, dialogConfig); break; @@ -43,7 +43,7 @@ export class DialogService { case 'feedback': dialogConfig.data = { title: 'Leave Feedback, report a Bug or suggest a new Idea', - content: new DialogItem(FeedbackDrawerSheetComponent) + content: new DialogItem(FeedbackDrawerSheetComponent), }; this.dialog.open(DialogsComponent, dialogConfig); break; @@ -51,7 +51,7 @@ export class DialogService { case 'notification': dialogConfig.data = { title: 'Welcome to the new Phonebook!', - content: new DialogItem(DisplayNotificationDialog) + content: new DialogItem(DisplayNotificationDialog), }; this.dialog.open(DialogsComponent, dialogConfig); break; @@ -59,7 +59,7 @@ export class DialogService { case 'bug-report-consent': dialogConfig.data = { title: 'Leave Feedback, report a Bug or suggest a new Idea', - content: new DialogItem(BugReportConsentComponent) + content: new DialogItem(BugReportConsentComponent), }; const matDialogRef = this.dialog.open(DialogsComponent, dialogConfig); matDialogRef.afterClosed().subscribe((consent) => { @@ -73,8 +73,8 @@ export class DialogService { content: new DialogItem(ProfilePictureEnlargeDialog), inputData: { imageUrl: inputData[0], - text: inputData[1] - } + text: inputData[1], + }, }; this.dialog.open(DialogsComponent, dialogConfig); break; @@ -82,7 +82,7 @@ export class DialogService { case 'ie-warning': dialogConfig.data = { title: 'This Website may not function properly in Internet Explorer', - content: new DialogItem(IeWarningComponent) + content: new DialogItem(IeWarningComponent), }; dialogConfig.panelClass = 'color-warn'; this.dialog.open(DialogsComponent, dialogConfig); @@ -92,7 +92,7 @@ export class DialogService { dialogConfig.data = { title: 'Incorrect User Information', content: new DialogItem(IncorrectUserInformationComponent), - inputData: inputData + inputData: inputData, }; this.dialog.open(DialogsComponent, dialogConfig); break; diff --git a/Phonebook.Frontend/src/app/services/release-info.service.ts b/Phonebook.Frontend/src/app/services/release-info.service.ts index 064d6fd34..a1aa607dd 100644 --- a/Phonebook.Frontend/src/app/services/release-info.service.ts +++ b/Phonebook.Frontend/src/app/services/release-info.service.ts @@ -11,7 +11,7 @@ import { VERSION } from 'src/environments/version'; import { DialogService } from 'src/app/services/dialog.service'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class ReleaseInfoService { public newUpdate: boolean = false; //shows that the application was updated @@ -59,7 +59,7 @@ export class ReleaseInfoService { $localize`:ReleaseInfoService|Snack Bar display for a feature update@@ReleaseInfoServiceSnackBarUpdateTitle:We've fixed some Bugs and added some new Features for you, with ❤`, $localize`:ReleaseInfoService|Snack Bar display Action Button for a feature update@@ReleaseInfoServiceSnackBarUpdateButton:Fixed what?`, { - duration: 8000 + duration: 8000, } ) .onAction() @@ -73,7 +73,10 @@ export class ReleaseInfoService { * @param previousVersion * @param nextVersion */ - public static whatVersionIncrement(previousVersion: string, nextVersion: string): VersionIncrement { + public static whatVersionIncrement( + previousVersion: string, + nextVersion: string + ): VersionIncrement { const versionRegex = new RegExp('^(\\d*)\\.(\\d*)\\.(\\d*)$'); const matchedPreviousVersion = versionRegex.exec(previousVersion); const matchedNextVersion = versionRegex.exec(nextVersion); diff --git a/Phonebook.Frontend/src/app/shared/components/navigation/navigation.component.html b/Phonebook.Frontend/src/app/shared/components/navigation/navigation.component.html index 8a672d848..f79cbf5c5 100644 --- a/Phonebook.Frontend/src/app/shared/components/navigation/navigation.component.html +++ b/Phonebook.Frontend/src/app/shared/components/navigation/navigation.component.html @@ -37,7 +37,9 @@ [user]="currentUser" > - My profile + My profile @@ -56,11 +58,17 @@ (click)="sidenav.close()" > info_outline - Information + Information - @@ -106,7 +116,10 @@ >{{ getEnvironmentTag() }} - + v{{ version }} @@ -117,20 +130,31 @@ -
+
{{ (getGreetingMessage() | async) + ' ' + currentUser.Firstname }}!
-
+
diff --git a/Phonebook.Frontend/src/app/shared/components/navigation/navigation.component.ts b/Phonebook.Frontend/src/app/shared/components/navigation/navigation.component.ts index 9aa94fc2d..8bc47081d 100644 --- a/Phonebook.Frontend/src/app/shared/components/navigation/navigation.component.ts +++ b/Phonebook.Frontend/src/app/shared/components/navigation/navigation.component.ts @@ -23,7 +23,7 @@ import { Theme } from 'src/app/shared/models/enumerables/Theme'; selector: 'app-navigation', templateUrl: './navigation.component.html', styleUrls: ['./navigation.component.scss'], - host: { class: 'pb-expand' } + host: { class: 'pb-expand' }, }) export class NavigationComponent implements OnInit, OnDestroy { public version: typeof VERSION = VERSION; @@ -87,9 +87,11 @@ export class NavigationComponent implements OnInit, OnDestroy { .subscribe((hasImage) => { this.hasImage = hasImage; }); - this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((route) => { - this.displayTableSettings = this.router.url.includes('search'); - }); + this.router.events + .pipe(filter((event) => event instanceof NavigationEnd)) + .subscribe((route) => { + this.displayTableSettings = this.router.url.includes('search'); + }); } public openSettings() { @@ -97,7 +99,7 @@ export class NavigationComponent implements OnInit, OnDestroy { if (this.dialog.openDialogs.length === 0) { this.dialog.open(TableSettingsDialog, { height: '90vh', - width: '90vw' + width: '90vw', }); } } diff --git a/Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.html b/Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.html index 942a17156..d10e7604a 100644 --- a/Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.html +++ b/Phonebook.Frontend/src/app/shared/components/user/user-detail/user-detail.component.html @@ -23,7 +23,11 @@ > | - + @@ -34,10 +38,18 @@

- + | - +

@@ -48,7 +60,8 @@ - + chat - Rocket Chat
@@ -103,7 +133,9 @@

Contact Details

@@ -137,7 +169,9 @@

Fax

- +

matTooltip="Happy April Fools' Day." matTooltipPosition="below" i18n-matTooltip=" - Datapoint|Tooltip for april fools' day information Information@@UserDetailComponentAprilFoolDayTooltip" + Datapoint|Tooltip for april fools' day information + Information@@UserDetailComponentAprilFoolDayTooltip" > attach_money

@@ -157,13 +192,20 @@

Further Information

supervisor_account -

+

Direct Supervisor

@@ -179,10 +221,19 @@

- - {{ - assistent - }} + + {{ assistent }}

@@ -274,13 +325,19 @@

> Show Room

- + @@ -289,7 +346,8 @@

@@ -302,15 +360,17 @@

- This is where a coworkers skills would be shown. But this is still work in Progress, you can make it - happen faster! + This is where a coworkers skills would be shown. But this is still work in Progress, + you can make it happen faster! -

+

Sending automatic Bug reports

- +

- If an error occurs while the application is running, an anonymous error report is automatically generated. In - exceptional cases - since this is a preview - the following personal data can still be found in one of the - reports: + If an error occurs while the application is running, an anonymous error report is + automatically generated. In exceptional cases - since this is a preview - the following + personal data can still be found in one of the reports:

@@ -20,13 +27,13 @@

The new Phonebook not only offers you a new design, but also numerous features that make it better than its - predecessor. + >The new Phonebook not only offers you a new design, but also numerous features that make it + better than its predecessor.
@@ -8,7 +8,9 @@ person -

+

You can set a profile picture by yourself

@@ -26,14 +28,20 @@ bookmark_border -

+

Colleagues can be saved as a favorite

- + Just click on the - + icon at one of your colleagues. @@ -42,7 +50,9 @@ settings -

+

Table columns can be sorted and customized

@@ -65,7 +75,9 @@

- + The different ways to share a profile can be found by clicking on the icon. @@ -81,7 +93,9 @@

- + Simply click on the icon in the top right corner and go to the settings. @@ -97,20 +111,26 @@

- + Just go to the profile of a colleague and scroll down.
- +
This site uses cookies to ensure the basic functionality of the app. - + You deactivated cookies and keep getting those dialogs?