Просмотр исходного кода

fix timestamp and memo display in raid, fix bad signup count

master
peter 5 лет назад
Родитель
Сommit
9ca1c1f354

+ 2
- 1
src/backend/Components/Raid/RaidManager.ts Просмотреть файл

@@ -152,7 +152,8 @@ export class RaidManager
152 152
             .where({
153 153
                 raidid: this.admin.knex.ref('raids.id'),
154 154
                 benched: false,
155
-                late: false
155
+                late: false,
156
+                absent: false
156 157
             })
157 158
             .as('signupcount')
158 159
 

+ 1
- 1
src/backend/Components/User/UserManager.ts Просмотреть файл

@@ -132,7 +132,7 @@ export class UserManager
132 132
     ]
133 133
 
134 134
     initialize = async () => {
135
-        this.exporters = [this.guild, this.item, this.raid, this.character]
135
+        this.exporters = [this, this.guild, this.item, this.raid, this.character]
136 136
         //set up permissions
137 137
         getLogger('UserManager#initialize').debug('setting up permissions')
138 138
 

+ 0
- 4
src/frontend/src/app/frontcraft/pages/pages-layout.component.ts Просмотреть файл

@@ -28,10 +28,6 @@ export class PagesLayoutComponent{
28 28
     icon: 'book-open-outline',
29 29
     title: 'Loot Rules',
30 30
     link: '/frontcraft/rules',
31
-  },{
32
-    icon: "shield",
33
-    title: 'Armory',
34
-    link: '/frontcraft/armory'
35 31
   }]
36 32
   
37 33
   constructor(){}

+ 43
- 0
src/frontend/src/app/frontcraft/pages/raid/raid.component.html Просмотреть файл

@@ -88,6 +88,7 @@
88 88
                                                 [src]="'/assets/images/'+participant.class.toLowerCase()+'.png'" />
89 89
                                             {{ participant.charactername }}
90 90
                                         </a>
91
+
91 92
                                         <ng-template #timeInfo>
92 93
                                             <div style="padding: 10px">
93 94
                                                 {{participant.timestamp | date : 'HH:mm EEE MMM d'}}
@@ -137,6 +138,27 @@
137 138
                                                 [src]="'/assets/images/'+participant.class.toLowerCase()+'.png'" />
138 139
                                             {{ participant.charactername }}
139 140
                                         </a>
141
+                                        <ng-template #timeInfo>
142
+                                            <div style="padding: 10px">
143
+                                                {{participant.timestamp | date : 'HH:mm EEE MMM d'}}
144
+                                                ({{participant.before | date : 'dd'}} days before start)
145
+                                            </div>
146
+                                        </ng-template>
147
+                                        <nb-icon [nbPopover]="timeInfo" nbPopoverTrigger="hover"
148
+                                            style="width: 0.75em; height: 0.75em;" icon="clock-outline"
149
+                                            [status]="participant.before>8.64e+7?(participant.before>2.592e+8?'success':'warning'):'danger'">
150
+                                        </nb-icon>
151
+                                        <ng-template #memoBox>
152
+                                            <div style="padding: 10px">
153
+                                                <p
154
+                                                    style="white-space: pre-line; max-width: 50vw; word-wrap: break-word;">
155
+                                                    {{participant.memo}}
156
+                                                </p>
157
+                                            </div>
158
+                                        </ng-template>
159
+                                        <nb-icon *ngIf="participant.memo" [nbPopover]="memoBox" nbPopoverTrigger="hover"
160
+                                            style="width: 0.75em; height: 0.75em;" icon="message-circle-outline">
161
+                                        </nb-icon>
140 162
                                         <span *ngIf="participant.rank=='Trial'" style="font-size: 9px;">
141 163
                                             Trial
142 164
                                         </span>
@@ -166,6 +188,27 @@
166 188
                                                     [src]="'/assets/images/'+participant.class.toLowerCase()+'.png'" />
167 189
                                                 {{ participant.charactername }}
168 190
                                             </a>
191
+                                            <ng-template #timeInfo>
192
+                                                <div style="padding: 10px">
193
+                                                    {{participant.timestamp | date : 'HH:mm EEE MMM d'}}
194
+                                                    ({{participant.before | date : 'dd'}} days before start)
195
+                                                </div>
196
+                                            </ng-template>
197
+                                            <nb-icon [nbPopover]="timeInfo" nbPopoverTrigger="hover"
198
+                                                style="width: 0.75em; height: 0.75em;" icon="clock-outline"
199
+                                                [status]="participant.before>8.64e+7?(participant.before>2.592e+8?'success':'warning'):'danger'">
200
+                                            </nb-icon>
201
+                                            <ng-template #memoBox>
202
+                                                <div style="padding: 10px">
203
+                                                    <p
204
+                                                        style="white-space: pre-line; max-width: 50vw; word-wrap: break-word;">
205
+                                                        {{participant.memo}}
206
+                                                    </p>
207
+                                                </div>
208
+                                            </ng-template>
209
+                                            <nb-icon *ngIf="participant.memo" [nbPopover]="memoBox" nbPopoverTrigger="hover"
210
+                                                style="width: 0.75em; height: 0.75em;" icon="message-circle-outline">
211
+                                            </nb-icon>
169 212
                                             <span *ngIf="participant.rank=='Trial'" style="font-size: 9px;">
170 213
                                                 Trial
171 214
                                             </span>

Загрузка…
Отмена
Сохранить