瀏覽代碼

fix archive raid no reserves

master
peter 5 年之前
父節點
當前提交
8189dadfbf

+ 3
- 1
src/frontend/src/app/frontcraft/pages/raid/archive.component.ts 查看文件

@@ -52,7 +52,9 @@ export class FrontcraftArchiveComponent implements OnInit{
52 52
       const raidManager = this.api.get('RaidManager')
53 53
       const raiddata = await raidManager.getArchiveRaid(parseInt(param))
54 54
       this.raid = raiddata
55
-      this.tokens = raiddata.tokens;
55
+      this.isTier = raiddata.tier != null
56
+      this.tokens = raiddata.tokens
57
+      this.displayedtokens = this.tokens;
56 58
 
57 59
       [
58 60
         ...raiddata.tanks, 

+ 2
- 2
src/frontend/src/app/frontcraft/pages/raid/raid.component.html 查看文件

@@ -137,7 +137,7 @@
137 137
         <nb-card  *ngIf="isTier">
138 138
             <nb-card-body>
139 139
                 <nb-tabset>
140
-                    <nb-tab tabTitle="Reserves">
140
+                    <nb-tab tabTitle="Reserves" [active]="reservesShown">
141 141
                         <input type="text" nbInput [(ngModel)]="search" (change)="changeSearch()" placeholder="Search"
142 142
                             fullWidth="true">
143 143
 
@@ -162,7 +162,7 @@
162 162
                             </nb-list-item>
163 163
                         </nb-list>
164 164
                     </nb-tab>
165
-                    <nb-tab tabTitle="Items" *ngIf="isSignedup">
165
+                    <nb-tab tabTitle="Items" *ngIf="isSignedup" [active]="!reservesShown">
166 166
                         <shop [tier]="raid.tier" (onSelect)="itemSelect($event)"></shop>
167 167
                     </nb-tab>
168 168
                 </nb-tabset>

+ 10
- 3
src/frontend/src/app/frontcraft/pages/raid/raid.component.ts 查看文件

@@ -18,6 +18,7 @@ export class FrontcraftRaidComponent implements OnInit, OnDestroy{
18 18
     isSignedup = false
19 19
     islate = false
20 20
     isTier = false
21
+    reservesShown = true
21 22
     manageRaid
22 23
     mySignup: (Signup & Character & Spec)
23 24
 
@@ -36,7 +37,7 @@ export class FrontcraftRaidComponent implements OnInit, OnDestroy{
36 37
       tanks: [],
37 38
       healers: [],
38 39
       tokens:{},
39
-      tier: 'MC'
40
+      tier: 'null'
40 41
     }
41 42
     tokens = {}
42 43
     displayedtokens = {}
@@ -79,8 +80,6 @@ export class FrontcraftRaidComponent implements OnInit, OnDestroy{
79 80
       this.uuid = res.uuid
80 81
     }
81 82
 
82
- 
83
-
84 83
     itemSelect = async(item) => {
85 84
       this.dialogService.open(FrontcraftBuyTokenComponent, {
86 85
         context: {
@@ -89,6 +88,10 @@ export class FrontcraftRaidComponent implements OnInit, OnDestroy{
89 88
           tier: this.raid.tier,
90 89
           characterName: this.mySignup.charactername
91 90
         }
91
+      }).onClose.subscribe(() => {
92
+        this.refresh().then(()=>{
93
+          this.reservesShown = true
94
+        })
92 95
       })
93 96
     }
94 97
 
@@ -102,6 +105,10 @@ export class FrontcraftRaidComponent implements OnInit, OnDestroy{
102 105
         context: {
103 106
           raid: this.raid,
104 107
         } 
108
+      }).onClose.subscribe(() => {
109
+        this.refresh().then(()=>{
110
+          this.reservesShown = false
111
+        })
105 112
       })
106 113
     }
107 114
 

Loading…
取消
儲存