Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(incorrect-information-button): Information button about how incorrect data can be changed #382

Merged
merged 59 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
eb2fc36
feat: add incorrect data button, add translation
Zeroks77 Oct 21, 2019
21e0ee8
fix: fixed translation :)
Zeroks77 Oct 21, 2019
720357f
disable test for Mat dialog
Zeroks77 Oct 21, 2019
f498bda
fix: solve comments
Zeroks77 Oct 22, 2019
11108c8
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/use…
Zeroks77 Oct 22, 2019
735705a
fix: rm space in dialog
Zeroks77 Oct 22, 2019
bf2ca00
fix: resolve comments
Zeroks77 Oct 22, 2019
fd20255
fix: dialog can be closed by clicking anywhere
Zeroks77 Oct 22, 2019
e95d0d6
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/use…
Zeroks77 Oct 24, 2019
81e8195
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/use…
Zeroks77 Oct 24, 2019
f806299
fix: renaming some files, removed some css and resolved comments
Zeroks77 Oct 24, 2019
c4177d2
fix: fix renaming fail
Zeroks77 Oct 24, 2019
c704e8e
fixed file import in module
Zeroks77 Oct 24, 2019
2621ad1
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/Inc…
Zeroks77 Oct 24, 2019
57a8ee8
updated translation
Zeroks77 Oct 24, 2019
32b9c97
asd
Zeroks77 Oct 28, 2019
ad53944
end my suffering
Zeroks77 Oct 28, 2019
293c6c6
Rename Incorrect-user-information.component.scss to incorrect-user-in…
Zeroks77 Oct 28, 2019
19d4a1c
Rename Incorrect-user-information.component.ts to incorrect-user-info…
Zeroks77 Oct 28, 2019
9c8e10e
Rename Incorrect-user-information.component.spec.ts to incorrect-user…
Zeroks77 Oct 28, 2019
6b1e811
Rename Incorrect-user-information.component.html to incorrect-user-in…
Zeroks77 Oct 28, 2019
cbafb3b
rm unnecessary css
Zeroks77 Oct 28, 2019
f8ff5c1
resolved the comments
Zeroks77 Oct 28, 2019
fb81b03
:/
Zeroks77 Oct 28, 2019
f7f74b8
rename dialogData to IncorecctUserInfromationDialogData
Zeroks77 Oct 28, 2019
e6fcb53
fixed typo
Zeroks77 Oct 29, 2019
9f8a8a8
fixed Dialog
Zeroks77 Oct 29, 2019
f2c4273
rm console.log
Zeroks77 Nov 4, 2019
914f56f
resolve comments
Zeroks77 Nov 5, 2019
bdfeea7
change headline
Zeroks77 Nov 6, 2019
f995929
reformat the dialog and add send email button
Zeroks77 Nov 25, 2019
46d157e
add translation
Zeroks77 Nov 25, 2019
b2a03b5
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/inc…
Zeroks77 Nov 25, 2019
37b6d93
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/inc…
Zeroks77 Nov 25, 2019
940a34d
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/inc…
Zeroks77 Nov 25, 2019
f700963
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/inc…
Zeroks77 Nov 25, 2019
6c89096
add button to notify your mate
Zeroks77 Nov 27, 2019
b42cfa3
add translation
Zeroks77 Nov 27, 2019
bc211e5
fixed typo
Zeroks77 Nov 27, 2019
571ae57
use mailservice
Zeroks77 Dec 2, 2019
1f6a363
Merge branch 'master' into feat/incorrect_button
Zeroks77 Dec 2, 2019
e85bf8b
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/inc…
Zeroks77 Dec 2, 2019
c5a78c4
add translation for mail
Zeroks77 Dec 2, 2019
d1c1e79
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/inc…
Zeroks77 Dec 3, 2019
43b82b2
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/inc…
Zeroks77 Dec 3, 2019
beaee6d
rename I18n identifier
Zeroks77 Dec 3, 2019
a00dbc4
Merge branch 'feat/incorrect_button' of https://github.com/T-Systems-…
Zeroks77 Dec 3, 2019
62bc58d
Add Translation for Mail Greeting
Zeroks77 Dec 4, 2019
2292376
fix tranlation
Zeroks77 Dec 4, 2019
94df977
rm mat_icon line
Zeroks77 Dec 4, 2019
079a5bb
Translate button
Zeroks77 Dec 4, 2019
0d1821a
change state to translated
Zeroks77 Dec 4, 2019
c50a588
Update Phonebook.Frontend/src/app/shared/dialogs/user-information/inc…
Zeroks77 Dec 4, 2019
9cb85cd
Update Phonebook.Frontend/src/i18n/messages.de.xlf
Zeroks77 Dec 4, 2019
5dfbb13
Update Phonebook.Frontend/src/i18n/messages.de.xlf
Zeroks77 Dec 4, 2019
c044e8d
resolve comments
Zeroks77 Dec 4, 2019
47e33c2
Update Phonebook.Frontend/src/i18n/messages.de.xlf
Zeroks77 Dec 4, 2019
c152d02
fix the fk mail
Zeroks77 Dec 4, 2019
f5e8b94
Merge branch 'feat/incorrect_button' of https://github.com/T-Systems-…
Zeroks77 Dec 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
<!-- Actions -->
<div class="actions">
<div>
<button
mat-icon-button
matTooltip="Found Incorrect Data? Report them!"
Zeroks77 marked this conversation as resolved.
Show resolved Hide resolved
i18n-matTooltip="User-detailComponent|Tooltip Incorrect Data@@UserDetailComponentTooltipDataChange"
(click)="openInformationIncorrectDialog()"
>
<mat-icon>report_problem</mat-icon>
</button>
<button
mat-icon-button
(click)="toggleBookmark()"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
@import 'media-queries';

mat-card-header {
mat-card-title-group {
flex-direction: row-reverse;

.user-picture {
margin: 0 20px 10px 0;
text-align: center;
Expand All @@ -12,13 +10,11 @@ mat-card-header {
align-items: center;
}
}

.actions {
margin: 0 0 0 auto;
display: flex;
}
}

mat-card-content {
.pb-roomplan {
width: 100%;
Expand All @@ -29,19 +25,16 @@ mat-card-content {
display: block;
}
}

@include below-big {
.pb-roomplan {
img {
width: 90%;
}
}
}

.pb-wrap {
flex-flow: wrap;
}

.pb-skills {
height: 200px;
padding-top: 30px;
Expand All @@ -50,7 +43,6 @@ mat-card-content {
flex-flow: column;
align-items: center;
Zeroks77 marked this conversation as resolved.
Show resolved Hide resolved
}

mat-list {
flex: 1;
min-width: 350px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ import { WindowRef } from 'src/app/services/windowRef.service';
import { ColumnDefinitions } from 'src/app/shared/config/columnDefinitions';
import { Person, PersonStatus } from 'src/app/shared/models';
import { BookmarksState, ToggleBookmark } from 'src/app/shared/states';
import { MatDialogConfig, MatDialog } from '@angular/material';
import { IncorrectUserInformationComponent } from 'src/app/shared/dialogs/user-information/incorrect-user-information.component';
import { runtimeEnvironment } from 'src/environments/runtime-environment';

export interface IncorrectUserInformationDialogData {
person: Person;
}
@Component({
selector: 'app-user-detail',
templateUrl: './user-detail.component.html',
Expand Down Expand Up @@ -41,6 +46,7 @@ export class UserDetailComponent implements OnInit, OnDestroy {
private mailService: MailService,
private windowRef: WindowRef,
private store: Store,
private dialog: MatDialog,
private i18n: I18n
) {}

Expand Down Expand Up @@ -89,6 +95,17 @@ export class UserDetailComponent implements OnInit, OnDestroy {
);
}

public openInformationIncorrectDialog(): void {
Zeroks77 marked this conversation as resolved.
Show resolved Hide resolved
const dialogData: IncorrectUserInformationDialogData = {
person: this.person
};
const dialogConfig: MatDialogConfig = {
autoFocus: true,
hasBackdrop: true,
data: dialogData
};
this.dialog.open(IncorrectUserInformationComponent, dialogConfig);
}
public getLink() {
return this.windowRef.getCurrentUrl();
}
Expand Down
11 changes: 7 additions & 4 deletions Phonebook.Frontend/src/app/shared/dialogs/dialogs.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ import { DisplayNotificationDialog } from 'src/app/shared/dialogs/display-notifi
import { ReleaseNotificationDialog } from 'src/app/shared/dialogs/release-notification-dialog/release-notification.dialog';
import { MaterialModule } from 'src/app/shared/material.module';
import { ContributorsModule } from 'src/app/shared/components/contributors/contributors.module';
import { CommonModule } from '@angular/common';
import { IncorrectUserInformationComponent } from 'src/app/shared/dialogs/user-information/incorrect-user-information.component';
import { UserModule } from 'src/app/shared/components/user/user.module';

@NgModule({
declarations: [ReleaseNotificationDialog, DisplayNotificationDialog, BugReportConsentComponent],
imports: [RouterModule, MaterialModule, ContributorsModule],
exports: [ReleaseNotificationDialog, DisplayNotificationDialog, BugReportConsentComponent],
entryComponents: [ReleaseNotificationDialog, DisplayNotificationDialog, BugReportConsentComponent]
declarations: [ReleaseNotificationDialog, DisplayNotificationDialog, BugReportConsentComponent, IncorrectUserInformationComponent],
imports: [CommonModule, RouterModule, MaterialModule, ContributorsModule, UserModule],
DanielHabenicht marked this conversation as resolved.
Show resolved Hide resolved
exports: [ReleaseNotificationDialog, DisplayNotificationDialog, BugReportConsentComponent, IncorrectUserInformationComponent],
entryComponents: [ReleaseNotificationDialog, DisplayNotificationDialog, BugReportConsentComponent, IncorrectUserInformationComponent]
})
export class DialogsModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<div class="">
<h2 mat-dialog-title i18n="User-InformationDialog|Headline@@Headline">Incorrect User Information</h2>
<div mat-dialog-content *ngIf="onMyProfile">
<span i18n="User-InformationDialog|Profile@@Your Profile">
Dear {{ data.person.Firstname }},<br />
unfortunately, you can't change your user information via the Phonebook interface. <br />
If your data is incorrect, please contact your Human Resources department.
</span>
</div>
<div mat-dialog-content *ngIf="!onMyProfile">
<span i18n="User-InformationDialog|Profile@@Colleague Profile">
Is there something wrong with the profile? <br />
Zeroks77 marked this conversation as resolved.
Show resolved Hide resolved
Please let your colleague know that the data is incorrect and that it can be changed through your Human Resources
department.
</span>
</div>
<div *ngIf="!onMyProfile">
<a
mat-raised-button
(click)="sendMail()"
i18n-matTooltip="User-InformationDialog|Button@@SendEmail"
matTooltip="Send your colleague a direct message"
>
<mat-icon mat-list-icon>email</mat-icon>
<span i18n="User-InformationDialog|Profile@@Notify">Notify {{ data.person.Firstname }}</span>
</a>
</div>
<div align="end">
<button mat-button mat-dialog-close cdkFocusInitial i18n="User-InformationDialog|Button@@GotItButton">
Got it!
</button>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { IncorrectUserInformationComponent } from './incorrect-user-information.component';

xdescribe('IncorrectUserInformationComponent', () => {
let component: IncorrectUserInformationComponent;
let fixture: ComponentFixture<IncorrectUserInformationComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ IncorrectUserInformationComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(IncorrectUserInformationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { Component, OnInit, Inject } from '@angular/core';
import { CurrentUserService } from 'src/app/services/api/current-user.service';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { IncorrectUserInformationDialogData } from 'src/app/shared/components/user/user-detail/user-detail.component';
import { WindowRef } from 'src/app/services/windowRef.service';
import { MailService } from 'src/app/services/mail.service';
import { I18n } from '@ngx-translate/i18n-polyfill';

@Component({
selector: 'app-user-information',
templateUrl: './incorrect-user-information.component.html',
styleUrls: ['./incorrect-user-information.component.scss']
})
export class IncorrectUserInformationComponent implements OnInit {
public currentUserId: string = '';
public mailBody : string = '';
constructor(
private i18n: I18n,
private mailService: MailService,
public windowRef: WindowRef,
public currentUserService: CurrentUserService,
public dialogRef: MatDialogRef<IncorrectUserInformationComponent>,
@Inject(MAT_DIALOG_DATA) public data: IncorrectUserInformationDialogData | any

) {}

public ngOnInit() {
this.currentUserService.getCurrentUserId().subscribe(
id => {
this.currentUserId = id;
},
error => {
// do nothing, as the id will never be ''
}
);
}
public get onMyProfile(): boolean {
return this.currentUserId.toLowerCase() === this.data.person.Id.toLowerCase();
}
public sendMail() {
this.mailService.openMail(
this.i18n({
meaning: 'MailToMateSubject',
description: 'Send a mail to your mate if there is something wrong on the profile ',
id: 'User-InformationDialogSubject',
value: 'There is an Issue with your Phonebook-Profile'
}),
this.i18n({
meaning: 'MailToMateGreeting',
description: 'Send a mail to your mate if there is something wrong on the profile ',
id: 'User-InformationDialogGreeting',
value: 'Hi '
})
+ this.data.person.Firstname +
this.i18n({
meaning: 'MailToMateBody',
description: 'Send a mail to your mate if there is something wrong on the profile ',
id: 'User-InformationDialogBody',
value: ', \nwhile browsing your profile I noticed that something is not right: \nPlease contact the HR Department to fix it.This is the Phonebook Link: '
})
+ this.windowRef.getCurrentUrl(),
this.data.person.Contacts.Email
);
}
}
77 changes: 72 additions & 5 deletions Phonebook.Frontend/src/i18n/messages.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<note priority="1" from="description">Button for contacting the private Organization</note>
<note priority="1" from="meaning">FeedbackDrawerSheetComponent</note>
</trans-unit><trans-unit id="FeedbackDrawerSheetComponentButtonPublicGithubFeature" datatype="html">
<source>Suggest an idea or a new feature</source><target state="new">Schlage eine Idee oder ein neues Feature vor</target>
<source>Suggest an idea or a new feature</source><target state="translated">Schlage eine Idee oder ein neues Feature vor</target>
<note priority="1" from="description">Button for suggesting a new feature on Github</note>
<note priority="1" from="meaning">FeedbackDrawerSheetComponent</note>
</trans-unit><trans-unit id="FeedbackDrawerSheetComponentButtonPublicGithubBug" datatype="html">
Expand Down Expand Up @@ -159,6 +159,10 @@
</source><target state="translated">Zustimmen</target>
<note priority="1" from="description">Button to consent sending bug reports</note>
<note priority="1" from="meaning">Bug-report-consentComponent</note>
</trans-unit><trans-unit id="UserDetailComponentTooltipDataChange" datatype="html">
<source>Found Incorrect Data? Report them!</source><target state="translated">Stimmt etwas auf dem Profil nicht? Melde es!</target>
<note priority="1" from="description">Tooltip Incorrect Data</note>
<note priority="1" from="meaning">User-detailComponent</note>
</trans-unit>
<trans-unit id="ChangeProfilePictureComponentChangeButton" datatype="html">
<source>
Expand Down Expand Up @@ -205,25 +209,25 @@
<note priority="1" from="description">Color Theme SubTitle</note>
<note priority="1" from="meaning">SettingsComponent</note>
</trans-unit><trans-unit id="SettingsComponentColorThemeBlueLight" datatype="html">
<source>Blue Light Theme</source><target state="new">
<source>Blue Light Theme</source><target state="translated">
Blau-Hell Farbschema
</target>
<note priority="1" from="description">Color Theme Option: Blue Light</note>
<note priority="1" from="meaning">SettingsComponent</note>
</trans-unit><trans-unit id="SettingsComponentColorThemeBlueDark" datatype="html">
<source>Blue Dark Theme</source><target state="new">
<source>Blue Dark Theme</source><target state="translated">
Blau-Dunkel Farbschema
</target>
<note priority="1" from="description">Color Theme Option: Blue Dark</note>
<note priority="1" from="meaning">SettingsComponent</note>
</trans-unit><trans-unit id="SettingsComponentColorThemeMagentaDark" datatype="html">
<source>Magenta Dark Theme</source><target state="new">
<source>Magenta Dark Theme</source><target state="translated">
Magenta-Dunkel Farbschema
</target>
<note priority="1" from="description">Color Theme Option: Magenta Dark</note>
<note priority="1" from="meaning">SettingsComponent</note>
</trans-unit><trans-unit id="SettingsComponentColorThemeMagentaLight" datatype="html">
<source>Magenta Light Theme</source><target state="new">
<source>Magenta Light Theme</source><target state="translated">
Magenta-Hell Farbschema
</target>
<note priority="1" from="description">Color Theme Option: Magenta Light</note>
Expand Down Expand Up @@ -1238,6 +1242,51 @@ Diese Seite nutzt Cookies, um die Bedienung der Seite zu verbessern. Cookies wer
<source>Skills</source><target state="translated">Skills</target>
<note priority="1" from="description">Tab Headline for Skills</note>
<note priority="1" from="meaning">UserDetailComponent</note>
</trans-unit><trans-unit id="Headline" datatype="html">
<source>Incorrect User Information</source><target state="new">Benutzerinformation</target>
<note priority="1" from="description">Headline</note>
<note priority="1" from="meaning">User-InformationDialog</note>
</trans-unit><trans-unit id="Your Profile" datatype="html">
<source>
Dear <x id="INTERPOLATION" equiv-text="{{ data.person.Firstname }}"/>,<x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br/>"/>
unfortunately, you can't change your user information via the Phonebook interface. <x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br/>"/>
If your data is incorrect, please contact your Human Resources department.
</source><target state="new">
Hallo <x id="INTERPOLATION" equiv-text="{{ data.Firstname }}"/>,<x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br/>"/>
leider kannst du via Phonebook deine Daten nicht ändern. <x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br/>"/>
Falls du deine Daten ändern möchtest wende dich bitte an deine Human Resources Abteilung.
</target>
<note priority="1" from="description">Profile</note>
<note priority="1" from="meaning">User-InformationDialog</note>
</trans-unit><trans-unit id="Colleague Profile" datatype="html">
<source>
Is there something wrong with the profile? <x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br/>"/>
Please let your colleague know that the data is incorrect and that it can be changed through your Human Resources
department.
</source><target state="new">
Stimmt etwas auf dem Profil nicht? <x id="LINE_BREAK" ctype="lb" equiv-text="&lt;br/>"/>
Lass deinen Kollegen wissen, dass er seine Daten über die Human Resources Abteilung ändern lassen kann.
</target>
<note priority="1" from="description">Profile</note>
<note priority="1" from="meaning">User-InformationDialog</note>
</trans-unit><trans-unit id="Notify" datatype="html">
<source>Notify <x id="INTERPOLATION" equiv-text="{{ data.person.Firstname }}"/></source><target state="translated">
Benachrichtige <x id="INTERPOLATION" equiv-text="{{ data.person.Firstname }}"/>
</target>
<note priority="1" from="description">Profile</note>
<note priority="1" from="meaning">User-InformationDialog</note>
</trans-unit><trans-unit id="SendEmail" datatype="html">
<source>Send your colleague a direct message</source><target state="translated">Sende deinem Kollegen direkt eine Nachricht.</target>
<note priority="1" from="description">Button</note>
<note priority="1" from="meaning">User-InformationDialog</note>
</trans-unit><trans-unit id="GotItButton" datatype="html">
<source>
Got it!
</source><target state="new">
Zeroks77 marked this conversation as resolved.
Show resolved Hide resolved
Verstanden!
</target>
<note priority="1" from="description">Button</note>
<note priority="1" from="meaning">User-InformationDialog</note>
</trans-unit>
<trans-unit id="TableComponentColumnOrgUnitLabel" datatype="html">
<source>Change sorting for column Organization Unit</source>
Expand All @@ -1262,6 +1311,24 @@ Diese Seite nutzt Cookies, um die Bedienung der Seite zu verbessern. Cookies wer
<target state="translated">Gebäude</target>
<note priority="1" from="description">Title of Table Column "Building"</note>
<note priority="1" from="meaning">TableComponent</note>
</trans-unit><trans-unit id="User-InformationDialogSubject" datatype="html">
<source>There is an Issue with your Phonebook-Profile</source><target state="translated">Fehler auf deinem Phonebookprofil</target>
<note priority="1" from="description">Send a mail to your mate if there is something wrong on the profile </note>
<note priority="1" from="meaning">MailToMateSubject</note>
</trans-unit><trans-unit id="User-InformationDialogGreeting" datatype="html">
<source>Hi </source><target state="translated">Hallo </target>
<note priority="1" from="description">Send a mail to your mate if there is something wrong on the profile </note>
<note priority="1" from="meaning">MailToMateGreeting</note>
</trans-unit><trans-unit id="User-InformationDialogBody" datatype="html">
<source>,
while browsing your profile I noticed that something is not right:
Please contact the HR Department to fix it.This is the Phonebook Link: </source><target state="translated">,
beim Besuch deines Profils, ist mir aufgefallen, dass es Fehler gibt:

Gib doch dem HR kurz bescheid und lass deine Daten richtig stellen.
Link zu deinem Profil: </target>
<note priority="1" from="description">Send a mail to your mate if there is something wrong on the profile </note>
<note priority="1" from="meaning">MailToMateBody</note>
</trans-unit><trans-unit id="PageInformationNewUrlNoCookies" datatype="html">
<source>Save the site URL as a favourite now in order to not get any more startup-dialogs. Please notice: You won't get any information about updates or releases with the set url parameter.</source>
<target state="translated">Speicher die Seiten-URL jetzt als Favorit um Startdialoge auch zukünftig zu überspringen. Bitte beachte: Mit dem gesetzten Url-Parameter werden keine Dialoge zu Updates oder neuen Features angezeigt.</target>
Expand Down
Loading