Skip to content

Commit

Permalink
Quick fix (#833)
Browse files Browse the repository at this point in the history
Reloading on the committee-detail-page works correctly.

Co-authored-by: Emanuel Schütze <emanuel@intevation.de>
  • Loading branch information
GabrielInTheWorld and emanuelschuetze committed Feb 14, 2022
1 parent 53494b0 commit 43501ea
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h1>
<os-committee-meta-info icon="engineering" title="Committee management" *ngIf="canManageCommittee">
<ng-container *ngIf="committee.getManagers() as managers">
<span *ngFor="let manager of managers; let last = last">
<a [routerLink]="['/', 'accounts', manager.id]">{{ manager }}</a>
<a [routerLink]="['/', 'accounts', manager?.id]">{{ manager }}</a>
<span *ngIf="!last">,&nbsp;</span>
</span>
<i class="red-warning-text" *ngIf="managers.length === 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export class CommitteeDetailComponent extends BaseModelContextComponent implemen
viewModelCtor: ViewCommittee,
ids: [this.committeeId],
follow: [
{ idField: `user_ids`, fieldset: `orgaEdit` },
// { idField: { templateIdField: `user_$_management_level`, templateValue: this.committeeId.toString() } },
{ idField: `forward_to_committee_ids` },
{ idField: `receive_forwardings_from_committee_ids` },
{
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/shared/models/event-management/committee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class Committee extends BaseModel<Committee> {
public receive_forwardings_from_committee_ids: Id[]; // (committee/forward_to_committee_ids)[];
public organization_id: Id; // organization/committee_ids;
public organization_tag_ids: Id[]; // (committee/organization_tag_ids)[];
public user_$_management_level: CML[]; // (committee/committee_$_management_level)[]
public user_$_management_level: CML[]; // (user/committee_$_management_level)[]

public constructor(input?: any) {
super(Committee.COLLECTION, input);
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/shared/models/users/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export class User extends BaseDecimalModel<User> {
* @returns A list of committee ids, a user has the queried permission
*/
public committee_management_level_ids(cml: CML): Id[] {
return this[`committee_$${cml}_management_level`];
return this[`committee_$${cml}_management_level`] ?? [];
}

protected getDecimalFields(): (keyof User)[] {
Expand Down
1 change: 0 additions & 1 deletion client/src/app/site/site.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { NavigationEnd, Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { ActiveMeetingService } from 'app/core/core-services/active-meeting.service';
import { HistoryService } from 'app/core/core-services/history.service';
import { OperatorService } from 'app/core/core-services/operator.service';
import { TimeTravelService } from 'app/core/core-services/time-travel.service';
Expand Down

0 comments on commit 43501ea

Please sign in to comment.