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 @@ import { MatDialog } from '@angular/material/dialog';
import { LibraryService } from '../../../../core/services/library.service';
import { Entry } from '../../../../shared/models/entry.model';
import { trigger, transition, style, animate } from '@angular/animations';
import { ListService } from '../../../../core/services/list.service';
import { UserCollectionService } from '../../../../core/services/userCollection.service';
@Component({
selector: 'app-userCollection-grid-card',
@@ -26,7 +26,7 @@ export class UserCollectionGridCardComponent {
constructor(
private libraryService: LibraryService,
private listService: ListService,
private listService: UserCollectionService,
public dialog: MatDialog
) {}
@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ListService } from '../../../../core/services/list.service';
import { UserCollectionService } from '../../../../core/services/userCollection.service';
import { UserCollection } from '../../../../shared/models/userCollection.model';
import { Entry } from '../../../../shared/models/entry.model';
import { DatePipe } from '@angular/common';
@@ -18,7 +18,7 @@ export class UserCollectionInfoPageComponent {
constructor(
private route: ActivatedRoute,
private listService: ListService,
private listService: UserCollectionService,
private datePipe: DatePipe
) {}
@@ -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();