clean up and lint files

This commit is contained in:
2025-01-05 10:29:29 +01:00
parent 54ee9a5b11
commit 189478f078
137 changed files with 1096 additions and 1340 deletions

View File

@@ -4,7 +4,6 @@ import {ShowService} from './show.service';
import {ShowTypePipe} from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
import {ShowSongService} from './show-song.service';
import {Song} from '../../songs/services/song';
import {SongService} from '../../songs/services/song.service';
import {ShowSong} from './show-song';
import {Show} from './show';
import {ChordMode} from '../../../widget-modules/components/song-text/song-text.component';
@@ -32,7 +31,7 @@ export class DocxService {
private showSongService: ShowSongService,
private textRenderingService: TextRenderingService,
private userService: UserService,
private configService: ConfigService,
private configService: ConfigService
) {}
public async create(showId: string, options: DownloadOptions = {}): Promise<void> {

View File

@@ -11,8 +11,7 @@ export class ShowSongDataService {
private collection = 'shows';
private subCollection = 'songs';
public constructor(private dbService: DbService) {
}
public constructor(private dbService: DbService) {}
public list$ = (showId: string, queryFn?: QueryFn): Observable<ShowSong[]> => this.dbService.col$(`${this.collection}/${showId}/${this.subCollection}`, queryFn);
public read$ = (showId: string, songId: string): Observable<ShowSong | null> => this.dbService.doc$(`${this.collection}/${showId}/${this.subCollection}/${songId}`);

View File

@@ -14,9 +14,8 @@ export class ShowSongService {
private showSongDataService: ShowSongDataService,
private songDataService: SongDataService,
private userService: UserService,
private showService: ShowService,
) {
}
private showService: ShowService
) {}
public async new$(showId: string, songId: string, addedLive = false): Promise<string | null> {
const song = await firstValueFrom(this.songDataService.read$(songId));

View File

@@ -9,7 +9,7 @@ describe('ShowService', () => {
() =>
void TestBed.configureTestingModule({
providers: [{provide: ShowDataService, useValue: mockShowDataService}],
}),
})
);
ShowService.SHOW_TYPE_PUBLIC.forEach(type => {

View File

@@ -15,7 +15,10 @@ export class ShowService {
public static SHOW_TYPE_PRIVATE = ['home-group', 'prayer-group', 'misc-private'];
private user: User | null = null;
public constructor(private showDataService: ShowDataService, private userService: UserService) {
public constructor(
private showDataService: ShowDataService,
private userService: UserService
) {
userService.user$.subscribe(_ => (this.user = _));
}
@@ -25,14 +28,14 @@ export class ShowService {
return this.userService.user$.pipe(
switchMap(
() => this.showDataService.list$,
(user: User | null, shows: Show[]) => ({user, shows}),
(user: User | null, shows: Show[]) => ({user, shows})
),
map(s =>
s.shows
.sort((a, b) => a.date.toMillis() - b.date.toMillis())
.filter(_ => !_.archived)
.filter(show => show.published || (show.owner === s.user?.id && !publishedOnly)),
),
.filter(show => show.published || (show.owner === s.user?.id && !publishedOnly))
)
);
}