generated from nhcarrigan/template
feat: add retired category
This commit is contained in:
@@ -66,6 +66,7 @@ import { Show, ShowStatus, ShowType, CreateShowDto, UpdateShowDto, Comment, Sugg
|
||||
<option [value]="ShowStatus.watching">Currently Watching</option>
|
||||
<option [value]="ShowStatus.completed">Completed</option>
|
||||
<option [value]="ShowStatus.wantToWatch">Want to Watch</option>
|
||||
<option [value]="ShowStatus.retired">Retired</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -214,6 +215,7 @@ import { Show, ShowStatus, ShowType, CreateShowDto, UpdateShowDto, Comment, Sugg
|
||||
<option [value]="ShowStatus.watching">Currently Watching</option>
|
||||
<option [value]="ShowStatus.completed">Completed</option>
|
||||
<option [value]="ShowStatus.wantToWatch">Want to Watch</option>
|
||||
<option [value]="ShowStatus.retired">Retired</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -469,6 +471,13 @@ import { Show, ShowStatus, ShowType, CreateShowDto, UpdateShowDto, Comment, Sugg
|
||||
>
|
||||
Want to Watch ({{ wantToWatchCount() }})
|
||||
</button>
|
||||
<button
|
||||
(click)="setFilter(ShowStatus.retired)"
|
||||
[class.active]="statusFilter() === ShowStatus.retired"
|
||||
class="filter-btn"
|
||||
>
|
||||
Retired ({{ retiredCount() }})
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (loading()) {
|
||||
@@ -1279,6 +1288,7 @@ export class ShowsListComponent implements OnInit {
|
||||
watchingCount = computed(() => this.shows().filter(show => show.status === ShowStatus.watching).length);
|
||||
completedCount = computed(() => this.shows().filter(show => show.status === ShowStatus.completed).length);
|
||||
wantToWatchCount = computed(() => this.shows().filter(show => show.status === ShowStatus.wantToWatch).length);
|
||||
retiredCount = computed(() => this.shows().filter(show => show.status === ShowStatus.retired).length);
|
||||
|
||||
allTags = computed(() => {
|
||||
const tagsSet = new Set<string>();
|
||||
@@ -1409,6 +1419,7 @@ export class ShowsListComponent implements OnInit {
|
||||
case ShowStatus.watching: return 'Currently Watching';
|
||||
case ShowStatus.completed: return 'Completed';
|
||||
case ShowStatus.wantToWatch: return 'Want to Watch';
|
||||
case ShowStatus.retired: return 'Retired';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user