瀏覽代碼

fix archive raid no reserves

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

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

52
       const raidManager = this.api.get('RaidManager')
52
       const raidManager = this.api.get('RaidManager')
53
       const raiddata = await raidManager.getArchiveRaid(parseInt(param))
53
       const raiddata = await raidManager.getArchiveRaid(parseInt(param))
54
       this.raid = raiddata
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
         ...raiddata.tanks, 
60
         ...raiddata.tanks, 

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

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

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

18
     isSignedup = false
18
     isSignedup = false
19
     islate = false
19
     islate = false
20
     isTier = false
20
     isTier = false
21
+    reservesShown = true
21
     manageRaid
22
     manageRaid
22
     mySignup: (Signup & Character & Spec)
23
     mySignup: (Signup & Character & Spec)
23
 
24
 
36
       tanks: [],
37
       tanks: [],
37
       healers: [],
38
       healers: [],
38
       tokens:{},
39
       tokens:{},
39
-      tier: 'MC'
40
+      tier: 'null'
40
     }
41
     }
41
     tokens = {}
42
     tokens = {}
42
     displayedtokens = {}
43
     displayedtokens = {}
79
       this.uuid = res.uuid
80
       this.uuid = res.uuid
80
     }
81
     }
81
 
82
 
82
- 
83
-
84
     itemSelect = async(item) => {
83
     itemSelect = async(item) => {
85
       this.dialogService.open(FrontcraftBuyTokenComponent, {
84
       this.dialogService.open(FrontcraftBuyTokenComponent, {
86
         context: {
85
         context: {
89
           tier: this.raid.tier,
88
           tier: this.raid.tier,
90
           characterName: this.mySignup.charactername
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
         context: {
105
         context: {
103
           raid: this.raid,
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…
取消
儲存