Skip to content

Commit

Permalink
Merge branch 'main' into 4457-hide-submitters-dropbox-if-missing-perm
Browse files Browse the repository at this point in the history
  • Loading branch information
reiterl committed Dec 17, 2024
2 parents 432920c + 056aa70 commit 1bab56a
Show file tree
Hide file tree
Showing 20 changed files with 340 additions and 119 deletions.
167 changes: 110 additions & 57 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"ngx-material-timepicker": "^13.1.1",
"ngx-papaparse": "^8.0.0",
"pdfjs-dist": "^4.6.82",
"pdfmake": "^0.2.15",
"pdfmake": "^0.2.16",
"pofile": "^1.1.4",
"qrcode": "^1.5.4",
"rxjs": "^7.8.1",
Expand All @@ -111,7 +111,7 @@
"@types/file-saver": "^2.0.7",
"@types/jasmine": "~5.1.5",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.17.9",
"@types/node": "^20.17.10",
"@types/pdfmake": "^0.2.10",
"@types/qrcode": "^1.5.5",
"@types/tinycolor2": "^1.4.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class UserRepositoryService extends BaseRepository<ViewUser, User> {
const data = usersToCreate.map(user => {
const meetingUsers = user.meeting_users as Partial<ViewMeetingUser>[];
return {
user: this.sanitizePayload(this.getBaseUserPayload(user), true),
user: this.sanitizePayload(this.getBaseUserPayloadCreate(user), true),
...(meetingUsers && meetingUsers.length
? {
first_meeting_user: this.sanitizePayload(
Expand Down Expand Up @@ -213,7 +213,7 @@ export class UserRepositoryService extends BaseRepository<ViewUser, User> {
const updates = Array.isArray(dirtyUpdate) ? dirtyUpdate : [dirtyUpdate];
return updates.map(update => ({
id: user.id,
...this.sanitizePayload(this.getBaseUserPayload(update)),
...this.sanitizePayload(this.getBaseUserPayloadUpdate(update)),
...this.sanitizePayload(this.meetingUserRepo.getBaseUserPayload(update))
}));
});
Expand Down Expand Up @@ -248,7 +248,7 @@ export class UserRepositoryService extends BaseRepository<ViewUser, User> {
return this.createAction(UserAction.ASSIGN_MEETINGS, payload);
}

private getBaseUserPayload(partialUser: Partial<ViewUser>): any {
private getBaseUserPayloadUpdate(partialUser: Partial<ViewUser>): any {
const partialPayload: Partial<User> = {
pronoun: partialUser.pronoun,
title: partialUser.title,
Expand All @@ -269,6 +269,12 @@ export class UserRepositoryService extends BaseRepository<ViewUser, User> {
return partialPayload;
}

private getBaseUserPayloadCreate(partialUser: Partial<ViewUser>): any {
const partialPayload = this.getBaseUserPayloadUpdate(partialUser);
partialPayload.is_present_in_meeting_ids = partialUser.is_present_in_meeting_ids;
return partialPayload;
}

public getTitle = (viewUser: ViewUser): string => this.getFullName(viewUser);

/**
Expand Down
9 changes: 6 additions & 3 deletions client/src/app/site/base/base.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ export abstract class BaseComponent extends BaseUiComponent implements OnDestroy
* Set the title in web browser using angulars TitleService
* @param prefix The title prefix. Should be translated here.
*/
public setTitle(prefix: string): void {
const translatedPrefix = this.translate.instant(prefix);
this.titleService.setTitle(translatedPrefix + this.titleSuffix);
public setTitle(prefix: string, nonTranslate?: boolean): void {
let titlePrefix = prefix;
if (!nonTranslate) {
titlePrefix = this.translate.instant(prefix);
}
this.titleService.setTitle(titlePrefix + this.titleSuffix);
}

/**
Expand Down
Loading

0 comments on commit 1bab56a

Please sign in to comment.