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

@@ -10,9 +10,8 @@ import {ShowService} from '../shows/services/show.service';
export class GuestShowService {
public constructor(
private showService: ShowService,
private guestShowDataService: GuestShowDataService,
) {
}
private guestShowDataService: GuestShowDataService
) {}
public async share(show: Show, songs: Song[]): Promise<string> {
const data = {

View File

@@ -6,13 +6,11 @@ describe('GuestComponent', () => {
let component: GuestComponent;
let fixture: ComponentFixture<GuestComponent>;
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [GuestComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [GuestComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GuestComponent);

View File

@@ -4,36 +4,28 @@ import {ActivatedRoute} from '@angular/router';
import {map, switchMap} from 'rxjs/operators';
import {Song} from '../songs/services/song';
import {ConfigService} from '../../services/config.service';
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
import { SongTextComponent } from '../../widget-modules/components/song-text/song-text.component';
import { ShowTypePipe } from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
import {AsyncPipe, DatePipe, NgFor, NgIf} from '@angular/common';
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
@Component({
selector: 'app-guest',
templateUrl: './guest.component.html',
styleUrls: ['./guest.component.less'],
imports: [
NgIf,
NgFor,
SongTextComponent,
AsyncPipe,
DatePipe,
ShowTypePipe,
],
selector: 'app-guest',
templateUrl: './guest.component.html',
styleUrls: ['./guest.component.less'],
imports: [NgIf, NgFor, SongTextComponent, AsyncPipe, DatePipe, ShowTypePipe],
})
export class GuestComponent {
public show$ = this.currentRoute.params.pipe(
map(param => param.id as string),
switchMap(id => this.service.read$(id)),
switchMap(id => this.service.read$(id))
);
public config$ = this.configService.get$();
public constructor(
private currentRoute: ActivatedRoute,
private service: GuestShowDataService,
private configService: ConfigService,
) {
}
private configService: ConfigService
) {}
public trackBy = (index: number, show: Song) => show.id;
}

View File

@@ -6,18 +6,18 @@ import {SongTextComponent} from '../../widget-modules/components/song-text/song-
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
@NgModule({
imports: [
CommonModule,
RouterModule.forChild([
{
path: ':id',
component: GuestComponent,
},
]),
SongTextComponent,
ShowTypePipe,
GuestComponent,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [
CommonModule,
RouterModule.forChild([
{
path: ':id',
component: GuestComponent,
},
]),
SongTextComponent,
ShowTypePipe,
GuestComponent,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class GuestModule {}