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

Add participants via member number #4069

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -11,9 +11,27 @@ describe(`SearchUsersPresenterService`, () => {
let presenter: MockPresenterService;

const testUsers = [
{ id: 2, username: `johnDoe`, email: `[email protected]`, first_name: `John`, last_name: `Doe` },
{ id: 3, username: `jd`, email: `[email protected]`, first_name: `Joanna`, last_name: `Doe` },
{ id: 4, username: `johnsSecondAccount`, email: `[email protected]`, first_name: `John`, last_name: `Doe` },
{
id: 2,
username: `johnDoe`,
email: `[email protected]`,
first_name: `John`,
last_name: `Doe`
},
{
id: 3,
username: `jd`,
email: `[email protected]`,
first_name: `Joanna`,
last_name: `Doe`
},
{
id: 4,
username: `johnsSecondAccount`,
email: `[email protected]`,
first_name: `John`,
last_name: `Doe`
},
{ id: 5, username: `rando`, first_name: `Rando`, last_name: `Mized` }
];

Expand All @@ -37,7 +55,10 @@ describe(`SearchUsersPresenterService`, () => {
!search ||
typeof search !== `object` ||
Object.keys(search).some(
key => ![`username`, `saml_id`, `first_name`, `last_name`, `email`].includes(key)
key =>
![`username`, `saml_id`, `first_name`, `last_name`, `email`, `member_number`].includes(
key
)
)
)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class SearchUsersPresenterService {
permissionScope,
permissionRelatedId,
searchCriteria: users.map(entry => ({
member_number: entry.member_number,
username: entry.username,
first_name: entry.first_name,
last_name: entry.last_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,26 @@ <h2>{{ 'Personal information' | translate }}</h2>
<input formControlName="last_name" matInput type="text" />
</mat-form-field>
</div>
<!-- E-Mail -->
<mat-form-field class="full-width">
<mat-label>{{ 'Email' | translate }}</mat-label>
<input autocomplete="off" formControlName="email" matInput name="email" type="email" />
<mat-error>{{ 'Please enter a valid email address!' | translate }}</mat-error>
</mat-form-field>
<div class="full-width first-line">
<!-- E-Mail -->
<mat-form-field>
<mat-label>{{ 'Email' | translate }}</mat-label>
<input
autocomplete="off"
formControlName="email"
matInput
name="email"
type="email"
/>
<mat-error>{{ 'Please enter a valid email address!' | translate }}</mat-error>
</mat-form-field>

<!-- Membership number -->
<mat-form-field>
<mat-label>{{ 'Membership number' | translate }}</mat-label>
<input formControlName="member_number" matInput type="text" />
</mat-form-field>
</div>
<!-- username -->
<mat-form-field class="full-width">
<mat-label>{{ 'Username' | translate }}</mat-label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export class ParticipantCreateWizardComponent extends BaseMeetingComponent imple
username: [``],
first_name: [``],
last_name: [``],
member_number: [``],
email: [``, createEmailValidator()]
},
{
Expand Down