adminSetAbsent
This commit is contained in:
@@ -72,6 +72,10 @@
|
|||||||
<nb-card-header>Tanks ({{raid.tanks.length}})</nb-card-header>
|
<nb-card-header>Tanks ({{raid.tanks.length}})</nb-card-header>
|
||||||
<nb-card-body>
|
<nb-card-body>
|
||||||
<div *ngFor="let participant of raid.tanks">
|
<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
|
<button (click)="setBench(participant)" *ngIf="manageRaid" nbButton outline
|
||||||
status="warning" size="tiny">
|
status="warning" size="tiny">
|
||||||
B
|
B
|
||||||
@@ -122,6 +126,10 @@
|
|||||||
<nb-card-header>Healers ({{raid.healers.length}})</nb-card-header>
|
<nb-card-header>Healers ({{raid.healers.length}})</nb-card-header>
|
||||||
<nb-card-body>
|
<nb-card-body>
|
||||||
<div *ngFor="let participant of raid.healers">
|
<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
|
<button (click)="setBench(participant)" *ngIf="manageRaid" nbButton outline
|
||||||
status="warning" size="tiny">
|
status="warning" size="tiny">
|
||||||
B
|
B
|
||||||
@@ -171,6 +179,10 @@
|
|||||||
<nb-card-header>{{group.key}} ({{group.value.length}})</nb-card-header>
|
<nb-card-header>{{group.key}} ({{group.value.length}})</nb-card-header>
|
||||||
<nb-card-body>
|
<nb-card-body>
|
||||||
<div *ngFor="let participant of group.value">
|
<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
|
<button (click)="setBench(participant)" *ngIf="manageRaid" nbButton outline
|
||||||
status="warning" size="tiny">
|
status="warning" size="tiny">
|
||||||
B
|
B
|
||||||
@@ -206,8 +218,9 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<nb-icon *ngIf="participant.memo" [nbPopover]="memoBox" nbPopoverTrigger="hover"
|
<nb-icon *ngIf="participant.memo" [nbPopover]="memoBox"
|
||||||
style="width: 0.75em; height: 0.75em;" icon="message-circle-outline">
|
nbPopoverTrigger="hover" style="width: 0.75em; height: 0.75em;"
|
||||||
|
icon="message-circle-outline">
|
||||||
</nb-icon>
|
</nb-icon>
|
||||||
<span *ngIf="participant.rank=='Trial'" style="font-size: 9px;">
|
<span *ngIf="participant.rank=='Trial'" style="font-size: 9px;">
|
||||||
Trial
|
Trial
|
||||||
|
|||||||
@@ -247,4 +247,24 @@ export class FrontcraftRaidComponent
|
|||||||
.then(_ => this.refresh())
|
.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