Skip to content

Commit

Permalink
Merge branch 'main' into 2934-forms
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel committed Dec 12, 2023
2 parents 0067a38 + bbf5b34 commit 2012802
Show file tree
Hide file tree
Showing 82 changed files with 732 additions and 770 deletions.
3 changes: 2 additions & 1 deletion client/src/app/domain/models/users/user.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export const userHeadersAndVerboseNames: { [key in keyof User]?: any } = {
username: _(`Username`),
default_password: _(`Initial password`),
is_active: _(`Active`),
is_physical_person: _(`Natural person`)
is_physical_person: _(`Natural person`),
saml_id: _(`SSO identification`)
};
2 changes: 1 addition & 1 deletion client/src/app/gateways/error-mapping/error-map.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ErrorMapService {
} else {
console.warn(`ErrorMapService has found no matches for "${errorMessage}"`);
}
return `${this.translate.instant(`Error`)}: ${errorMsg}`;
return `${this.translate.instant(`Error`)}: ${this.translate.instant(errorMsg)}`;
}

private getHttpErrorMap(options: GetHttpErrorMapOptions): ErrorMap | null {
Expand Down
2 changes: 2 additions & 0 deletions client/src/app/gateways/repositories/users/user-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ export class UserAction {
public static readonly MERGE_TOGETHER = `user.merge_together`;
public static readonly ACCOUNT_JSON_UPLOAD = `account.json_upload`;
public static readonly ACCOUNT_IMPORT = `account.import`;
public static readonly PARTICIPANT_JSON_UPLOAD = `participant.json_upload`;
public static readonly PARTICIPANT_IMPORT = `participant.import`;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { RepositoryServiceCollectorService } from '../repository-service-collect

export type RawUser = FullNameInformation & Identifiable & Displayable & { fqid: Fqid; meeting_user_id?: Id };

export type GeneralUser = User & MeetingUser;
export type GeneralUser = ViewUser & ViewMeetingUser;

/**
* Unified type name for state fields like `is_active`, `is_physical_person` and `is_present_in_meetings`.
Expand Down Expand Up @@ -506,6 +506,14 @@ export class UserRepositoryService extends BaseRepository<ViewUser, User> {
return this.createAction<BackendImportRawPreview | void>(UserAction.ACCOUNT_IMPORT, payload);
}

public participantJsonUpload(payload: { [key: string]: any }): Action<BackendImportRawPreview> {
return this.createAction<BackendImportRawPreview>(UserAction.PARTICIPANT_JSON_UPLOAD, payload);
}

public participantImport(payload: { id: number; import: boolean }[]): Action<BackendImportRawPreview | void> {
return this.createAction<BackendImportRawPreview | void>(UserAction.PARTICIPANT_IMPORT, payload);
}

private sanitizePayload(payload: any): any {
const temp = { ...payload };
for (const key of Object.keys(temp).filter(field => !this.isFieldAllowedToBeEmpty(field))) {
Expand Down
62 changes: 0 additions & 62 deletions client/src/app/site/base/base-user-import-list.component.ts

This file was deleted.

65 changes: 0 additions & 65 deletions client/src/app/site/base/base-user-import.service.ts

This file was deleted.

12 changes: 8 additions & 4 deletions client/src/app/site/base/base.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,21 @@ export abstract class BaseComponent extends BaseUiComponent implements OnDestroy
} else {
errorNotification = message;
}
this.messageSnackBar = this.matSnackBar.open(errorNotification, this.translate.instant(`OK`), {
duration: 0
});
this.messageSnackBar = this.matSnackBar.open(
this.translate.instant(errorNotification),
this.translate.instant(`OK`),
{
duration: 0
}
);
};

/**
* Opens the snack bar with the given message.
* This snack bar will only dismiss if the user clicks the 'OK'-button.
*/
protected raiseWarning = (message: string): void => {
this.messageSnackBar = this.matSnackBar.open(message, this.translate.instant(`OK`));
this.messageSnackBar = this.matSnackBar.open(this.translate.instant(message), this.translate.instant(`OK`));
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export class GlobalHeadbarComponent {
) {}

public openSearch(): void {
this.dialog.open(GlobalSearchComponent);
this.dialog.open(GlobalSearchComponent, {
position: {
top: `5vh`
}
});
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
<div class="search-form-container">
<os-rounded-input
[(ngModel)]="searchTerm"
(clickSubmit)="searchChange()"
placeholder="{{ 'Search' | translate }}"
[hasSubmit]="true"
[autofocus]="true"
></os-rounded-input>
<div class="close-button-container">
<button mat-icon-button mat-dialog-close tabindex="-1"><mat-icon>close</mat-icon></button>
</div>

<div matDialogTitle class="search-form-container">
<div class="search-top-form">
<div class="search-input-container">
<os-rounded-input
[(ngModel)]="searchTerm"
(clickSubmit)="searchChange()"
(inputCleared)="searchCleared()"
placeholder="{{ 'Search' | translate }}"
[hasSubmit]="true"
[autofocus]="true"
></os-rounded-input>
</div>
<div *ngIf="isMobile" class="search-filter-toggle">
<button mat-icon-button (click)="filterOpen = !filterOpen"><mat-icon>filter_list</mat-icon></button>
</div>
</div>
<div class="search-hint">
<mat-hint>{{ 'To start your search press Enter or the search icon' | translate }}</mat-hint>
</div>

<section class="filters" [formGroup]="currentFilters">
<section *ngIf="filterOpen || !isMobile" class="filters" [formGroup]="currentFilters">
<mat-radio-group *ngIf="operator.knowsMultipleMeetings" class="filter-section" formControlName="meetingFilter">
<mat-radio-button *ngIf="inMeeting" class="filter" value="current">
{{ 'This meeting' | translate }}
Expand All @@ -30,7 +42,7 @@
</div>

<mat-dialog-content class="search-results">
<ng-container *ngIf="searching === null">
<ng-container>
<section class="search-results-category">
<div *ngFor="let result of filteredResults" class="search-results-entry divider-bottom">
<div class="breadcrumb">
Expand Down Expand Up @@ -96,7 +108,7 @@ <h3 *ngIf="result.title" [innerHtml]="result.title"></h3>
<h3 *ngIf="noResults" class="search-no-results">{{ 'No results found' | translate }}</h3>
</ng-container>
<ng-container *ngIf="searching !== null">
<div class="spinner-container">
<div class="spinner-container" [ngClass]="{ 'overlay-spinner': filteredResults.length > 0 }">
<mat-spinner></mat-spinner>
</div>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
.search-form-container {
width: 800px;
max-width: 100%;
padding-bottom: 24px;
.search-top-form {
display: flex;
.search-input-container {
flex-grow: 1;
}
.search-filter-toggle {
flex-shrink: 1;
}
}
}

.search-hint {
Expand All @@ -12,9 +20,19 @@
display: flex;
justify-content: center;
padding: 15px;
&.overlay-spinner {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
background: rgba(0, 0, 0, 0.2);
padding: 80px 0;
}
}

.search-results {
position: relative;
width: 848px;
max-width: calc(100% + 48px);
margin: 0 -24px -24px -24px;
Expand Down Expand Up @@ -69,7 +87,7 @@
::ng-deep mark {
color: inherit;
background: none;
font-weight: bolder;
font-weight: 500;
}

::ng-deep :not(h3, h3 > span) > mark {
Expand Down Expand Up @@ -112,3 +130,29 @@
}
}
}

.mat-dialog-title {
line-height: inherit;
font-size: inherit;
font-weight: inherit;
}

.mat-dialog-content {
max-height: calc(75vh - 193px);
}

.close-button-container {
position: relative;
height: 25px;
> button {
position: absolute;
top: -15px;
right: -15px;
}
}

@media (max-width: 959.99px) {
.mat-dialog-content {
max-height: calc(75vh - 120px);
}
}
Loading

0 comments on commit 2012802

Please sign in to comment.