rename model list to usercollection & fixed redlated errors

This commit is contained in:
X4Lo committed 2024-04-06 08:56:16 +00:00
1 parent 60b517500f
commit b48b395574
37 files changed
+2479 -1210

No files matched your search

@@ -3,7 +3,7 @@
<div class="flex-grow-1 list-item-1">
<h6 class="mb-0 list-title" (click)="redirectTo()">{{list.name}}</h6>
<p class="mb-0">Created: {{getCreatedDate() | dateFormat}}</p>
<p class="mb-0">Contains: {{list.listEntries.length}} title(s)</p>
<p class="mb-0">Contains: {{list.userCollectionEntries.length}} title(s)</p>
</div>
<!-- <div class="form-check form-check-inline me-0">
<input class="form-check-input ms-0" type="checkbox">
@@ -1,6 +1,6 @@
import { Component, Input} from '@angular/core';
import { UserCollection } from '../../../../shared/models/userCollection.model';
import { ListService } from '../../../../core/services/list.service';
import { UserCollectionService } from '../../../../core/services/userCollection.service';
import { Router } from '@angular/router';
import { trigger, transition, style, animate } from '@angular/animations';
@@ -25,7 +25,7 @@ import { trigger, transition, style, animate } from '@angular/animations';
export class UserCollectionsListItemComponent {
@Input() list!: UserCollection;
constructor(private listService: ListService, private router: Router) {}
constructor(private listService: UserCollectionService, private router: Router) {}
getPostPath() {
if (this.list.poster_path == null) return 'https://pic.pnnet.dev/256x256';
@@ -40,7 +40,7 @@ export class UserCollectionsListItemComponent {
}
redirectTo(): void {
this.router.navigate([`/lists/${this.list.id}`]);
this.router.navigate([`/user-collections/${this.list.id}`]);
}
deleteList() {
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { UserCollection } from '../../../../shared/models/userCollection.model';
import { ListService } from '../../../../core/services/list.service';
import { UserCollectionService } from '../../../../core/services/userCollection.service';
@Component({
selector: 'app-userCollections-page',
@@ -16,7 +16,7 @@ export class UserCollectionsPageComponent implements OnInit {
lists: UserCollection[] = [];
listsToShow: UserCollection[] = [];
constructor(private listService: ListService) {}
constructor(private listService: UserCollectionService) {}
ngOnInit() {
this.getLists();