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

fix: Handle null Telephone Numbers (#579) #767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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 @@ -6,6 +6,6 @@ import { Pipe, PipeTransform } from '@angular/core';
export class TelephonePipe implements PipeTransform {
// TODO: #579
public transform(telephoneNumber: null | string): string {
return telephoneNumber == null ? '' : telephoneNumber.replace(/[^+0-9]/g, '');
return telephoneNumber == null ? 'No phone number' : telephoneNumber.replace(/[^+0-9]/g, '');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that german users will get the message in german.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I am still thinking about a more general message that we could also reuse for other fields (e.g. Team assistant), maybe "not know" @mschwrdtnr @paule96 what do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of you want to use a general message. I would suggest "Not available" and in german "nicht verfügbar"

Copy link
Member

@mschwrdtnr mschwrdtnr Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more generally one could be just "unknown". This will probably make more sense for other fields like your example @DanielHabenicht

}
}