adminSetAbsent
This commit is contained in:
@@ -72,6 +72,10 @@
|
||||
<nb-card-header>Tanks ({{raid.tanks.length}})</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div *ngFor="let participant of raid.tanks">
|
||||
<button (click)="adminSetAbsent(participant)" *ngIf="manageRaid" nbButton outline
|
||||
status="info" size="tiny">
|
||||
A
|
||||
</button>
|
||||
<button (click)="setBench(participant)" *ngIf="manageRaid" nbButton outline
|
||||
status="warning" size="tiny">
|
||||
B
|
||||
@@ -122,6 +126,10 @@
|
||||
<nb-card-header>Healers ({{raid.healers.length}})</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div *ngFor="let participant of raid.healers">
|
||||
<button (click)="adminSetAbsent(participant)" *ngIf="manageRaid" nbButton
|
||||
outline status="info" size="tiny">
|
||||
A
|
||||
</button>
|
||||
<button (click)="setBench(participant)" *ngIf="manageRaid" nbButton outline
|
||||
status="warning" size="tiny">
|
||||
B
|
||||
@@ -171,6 +179,10 @@
|
||||
<nb-card-header>{{group.key}} ({{group.value.length}})</nb-card-header>
|
||||
<nb-card-body>
|
||||
<div *ngFor="let participant of group.value">
|
||||
<button (click)="adminSetAbsent(participant)" *ngIf="manageRaid" nbButton
|
||||
outline status="info" size="tiny">
|
||||
A
|
||||
</button>
|
||||
<button (click)="setBench(participant)" *ngIf="manageRaid" nbButton outline
|
||||
status="warning" size="tiny">
|
||||
B
|
||||
@@ -206,8 +218,9 @@
|
||||
</p>
|
||||
</div>
|
||||
</ng-template>
|
||||
<nb-icon *ngIf="participant.memo" [nbPopover]="memoBox" nbPopoverTrigger="hover"
|
||||
style="width: 0.75em; height: 0.75em;" icon="message-circle-outline">
|
||||
<nb-icon *ngIf="participant.memo" [nbPopover]="memoBox"
|
||||
nbPopoverTrigger="hover" style="width: 0.75em; height: 0.75em;"
|
||||
icon="message-circle-outline">
|
||||
</nb-icon>
|
||||
<span *ngIf="participant.rank=='Trial'" style="font-size: 9px;">
|
||||
Trial
|
||||
|
||||
@@ -247,4 +247,24 @@ export class FrontcraftRaidComponent
|
||||
.then(_ => this.refresh())
|
||||
}
|
||||
}
|
||||
|
||||
adminSetAbsent(signup: Signup) {
|
||||
|
||||
const manageRaid = this.api.get('manageRaid')
|
||||
if(manageRaid){
|
||||
const signupUpdated:Signup = {
|
||||
benched: false,
|
||||
absent: !signup.absent,
|
||||
late: false,
|
||||
characterid: signup.characterid,
|
||||
raidid: signup.raidid,
|
||||
timestamp: signup.timestamp,
|
||||
id: signup.id,
|
||||
memo: signup.memo
|
||||
}
|
||||
manageRaid.updateSignup(signupUpdated)
|
||||
.then(_ => this.refresh())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user