+
+
-
+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 0ef7c45..11aa957 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,7 +1,6 @@
-import {ChangeDetectionStrategy, Component, OnInit, ViewChild} from '@angular/core';
+import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
import {fader} from './animations';
import {ScrollService} from './services/scroll.service';
-import {PerfectScrollbarComponent} from 'ngx-perfect-scrollbar';
import {register} from 'swiper/element/bundle';
@Component({
@@ -12,12 +11,7 @@ import {register} from 'swiper/element/bundle';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent implements OnInit {
- @ViewChild('scrollbar', {static: false}) public scrollbar: PerfectScrollbarComponent | null = null;
-
public constructor(private scrollService: ScrollService) {
- scrollService.restoreScrollPosition$.subscribe(pos => {
- if (this.scrollbar && pos) this.scrollbar.directiveRef?.scrollTo(0, pos, 300);
- });
register();
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index e37cedc..6f7f683 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -15,7 +15,6 @@ import {AngularFireAuthModule} from '@angular/fire/compat/auth';
import {AngularFireAuthGuardModule} from '@angular/fire/compat/auth-guard';
import {MAT_DATE_LOCALE} from '@angular/material/core';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
-import {PerfectScrollbarModule} from 'ngx-perfect-scrollbar';
@NgModule({
declarations: [AppComponent],
@@ -37,7 +36,6 @@ import {PerfectScrollbarModule} from 'ngx-perfect-scrollbar';
AngularFireAuthModule,
AngularFireAuthGuardModule,
FontAwesomeModule,
- PerfectScrollbarModule,
],
providers: [{provide: MAT_DATE_LOCALE, useValue: 'de-DE'}],
bootstrap: [AppComponent],
diff --git a/src/app/modules/shows/edit/edit.component.ts b/src/app/modules/shows/edit/edit.component.ts
index c613854..5424a45 100644
--- a/src/app/modules/shows/edit/edit.component.ts
+++ b/src/app/modules/shows/edit/edit.component.ts
@@ -7,6 +7,8 @@ import {FormControl, FormGroup, Validators} from '@angular/forms';
import {ActivatedRoute, Router} from '@angular/router';
import {faSave} from '@fortawesome/free-solid-svg-icons';
import {map, switchMap} from 'rxjs/operators';
+import firebase from 'firebase/compat/app';
+import Timestamp = firebase.firestore.Timestamp;
@Component({
selector: 'app-edit',
@@ -56,7 +58,7 @@ export class EditComponent implements OnInit {
await this.showService.update$(
this.form.value.id as string,
{
- date: this.form.value.date,
+ date: Timestamp.fromDate(this.form.value.date),
showType: this.form.value.showType,
} as Partial
);
diff --git a/src/app/services/db.service.ts b/src/app/services/db.service.ts
index e9ef141..cf70945 100644
--- a/src/app/services/db.service.ts
+++ b/src/app/services/db.service.ts
@@ -21,7 +21,7 @@ export class DbService {
return typeof ref === 'string' ? this.afs.doc(ref) : ref;
}
- public doc$(ref: DocumentPredicate): Observable<(T & {id: string}) | null> {
+ public doc$(ref: DocumentPredicate): Observable<(NonNullable & {id?: string}) | null> {
return this.doc(ref)
.valueChanges({idField: 'id'})
.pipe(map(_ => (_ ? _ : null)));
diff --git a/tsconfig.json b/tsconfig.json
index ce431dd..58255b6 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -12,7 +12,7 @@
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
- "strict": true,
+ "strict": false,
"typeRoots": [
"node_modules/@types"
],