add edit/delete episode seens in episode seen history
This commit is contained in:
1 parent
dbeb0ee524
commit
a3f1b16376
9 files changed
+326
-57
No files matched your search
@@ -13,6 +13,7 @@ import {
|
||||
transition,
|
||||
animate,
|
||||
} from '@angular/animations';
|
||||
import { formatDate } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-seen-modal',
|
||||
@@ -36,7 +37,7 @@ import {
|
||||
]),
|
||||
],
|
||||
})
|
||||
export class SeenModalComponent {
|
||||
export class SeenModalComponent implements OnInit {
|
||||
public watchDate: string = '';
|
||||
public watchedWith: string = '';
|
||||
|
||||
@@ -45,6 +46,15 @@ export class SeenModalComponent {
|
||||
@Inject(MAT_DIALOG_DATA) public data: any
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.data == null) {
|
||||
this.watchDate = formatDate(new Date(), 'yyyy-MM-dd', 'en-US');
|
||||
return; // ? no initial data was passed
|
||||
}
|
||||
this.watchDate = this.data.watchDate.toString().substring(0, 10);
|
||||
this.watchedWith = this.data.watchedWith.split(', ').join('\n');
|
||||
}
|
||||
|
||||
onConfirm(): void {
|
||||
this.dialogRef.close({
|
||||
watchDate: this.watchDate,
|
||||
|
||||
Reference in new issue
Block a user