Skip to content

Commit

Permalink
Merge pull request #3762 from deNBI/fix/remove-oneself
Browse files Browse the repository at this point in the history
fix(projectOverview): removing oneself not allowed, subscription object
  • Loading branch information
eKatchko authored Oct 20, 2021
2 parents 308eb2f + fdbda76 commit 14789f3
Show file tree
Hide file tree
Showing 3 changed files with 366 additions and 414 deletions.
74 changes: 3 additions & 71 deletions src/app/projectmanagement/overview.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ <h3>
<tbody>
<tr *ngFor="let member of project_members" [ngStyle]="{'color':isPi(member)}">
<td *ngIf="isAdmin || is_vo_admin">
<input *ngIf="userinfo?.MemberId !== member.memberId" type="checkbox" id="{{member.userId}}"
<input *ngIf="userinfo?.MemberId.toString() !== member.memberId.toString()" type="checkbox" id="{{member.userId}}"
name="member.userId"
[checked]="isMemberChecked(member.memberId)" (change)="checkUnCheckMember(member.memberId);">
</td>
Expand All @@ -583,12 +583,12 @@ <h3>
" class="btn btn-primary" type="button" style="margin: 2px">
<i class="fa fa-plus-circle"></i>&nbsp; Set Admin status
</button>
<button *ngIf="member.IsPi && userinfo?.MemberId !== member.memberId" (click)="removeAdmin( project?.Id,member.userId,member.userName);
<button *ngIf="member.IsPi && userinfo?.MemberId.toString() !== member.memberId.toString()" (click)="removeAdmin( project?.Id,member.userId,member.userName);
notificationModal.show();
" class="btn btn-primary" type="button" style="margin: 2px">
<i class="fa fa-minus-circle"></i>&nbsp; Remove Admin status
</button>
<button [id]="'remove_member_' + member.userName" *ngIf=" userinfo?.MemberId !== member.memberId"
<button [id]="'remove_member_' + member.userName" *ngIf="userinfo?.MemberId.toString() !== member.memberId.toString()"
(click)="removeMember(project?.Id,member.memberId,member.userName);
notificationModal.show();
" class="btn btn-danger" type="button" style="margin: 2px">
Expand All @@ -609,74 +609,6 @@ <h3>
</div>


</div>
<div class="row"
*ngIf="project && (project?.UserIsPi ||project?.UserIsAdmin) && project_application?.project_application_workshop ">

<div class="col"
*ngIf="project && (project?.UserIsPi ||project?.UserIsAdmin)
&& !(project_application | hasstatusinlist:Application_States.TERMINATED)
&& !(project_application | hasstatusinlist:Application_States.DECLINED)
&& !(project_application | hasstatusinlist:Application_States.SUBMITTED)
&& !(project_application | hasstatusinlist:Application_States.WAIT_FOR_CONFIRMATION)">

<div class="card" id="workshioCard">
<div class="card-header">
<i class="fa fa-align-justify"></i>
Workshops
</div>

<div class="card-body" style="max-height: 800px;" *ngIf="!workshopInfosLoaded">

<div class="spinner-border text-primary" style="display:block; margin:auto;"></div>


</div>


<div class="card-body" *ngIf="workshopInfosLoaded">
<div class="btn-group" *ngFor="let info of workshop_infos ">

<button id="select_workshop_{{info?.shortname}}_btn"
[ngClass]="{'btn-outline-success': info.shortname === selected_workshop_info.shortname,
'btn-outline-warning' : info.shortname !== selected_workshop_info.shortname}"
(click)="setSelectedWorkshopInfo(info)"

type="button" style="margin-bottom:5px;margin-right:5px;"
class="btn">{{info.shortname}}
</button>


</div>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>User</th>
<th>Email</th>
<th>Url</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let info of selected_workshop_info?.url_data ">

<td>

{{ info?.user_name }}</td>
<td>{{ info?.user_email }}</td>
<td>{{ info?.resenv_url }}</td>

</tr>


</tbody>
</table>
</div>

</div>

</div>
</div>
</div>
<div class="row">

Expand Down
Loading

0 comments on commit 14789f3

Please sign in to comment.