auto migrate standalone components
This commit is contained in:
@@ -6,9 +6,8 @@ describe('AppComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
imports: [RouterTestingModule],
|
imports: [RouterTestingModule, AppComponent],
|
||||||
declarations: [AppComponent],
|
}).compileComponents();
|
||||||
}).compileComponents();
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
|
|||||||
import {fader} from './animations';
|
import {fader} from './animations';
|
||||||
import {ScrollService} from './services/scroll.service';
|
import {ScrollService} from './services/scroll.service';
|
||||||
import {register} from 'swiper/element/bundle';
|
import {register} from 'swiper/element/bundle';
|
||||||
|
import {RouterOutlet} from '@angular/router';
|
||||||
|
import {NavigationComponent} from './widget-modules/components/application-frame/navigation/navigation.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@@ -9,7 +11,7 @@ import {register} from 'swiper/element/bundle';
|
|||||||
styleUrls: ['./app.component.less'],
|
styleUrls: ['./app.component.less'],
|
||||||
animations: [fader],
|
animations: [fader],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: false,
|
imports: [RouterOutlet, NavigationComponent],
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
public constructor(private scrollService: ScrollService) {
|
public constructor(private scrollService: ScrollService) {
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
import {BrowserModule} from '@angular/platform-browser';
|
|
||||||
import {NgModule} from '@angular/core';
|
|
||||||
|
|
||||||
import {AppRoutingModule} from './app-routing.module';
|
|
||||||
import {AppComponent} from './app.component';
|
|
||||||
import {ServiceWorkerModule} from '@angular/service-worker';
|
|
||||||
import {environment} from '../environments/environment';
|
|
||||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
|
||||||
import {ApplicationFrameModule} from './widget-modules/components/application-frame/application-frame.module';
|
|
||||||
import {AngularFireModule} from '@angular/fire/compat';
|
|
||||||
import {AngularFirestoreModule} from '@angular/fire/compat/firestore';
|
|
||||||
import {AngularFireStorageModule} from '@angular/fire/compat/storage';
|
|
||||||
import {AngularFireDatabaseModule} from '@angular/fire/compat/database';
|
|
||||||
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';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [AppComponent],
|
|
||||||
imports: [
|
|
||||||
BrowserModule,
|
|
||||||
BrowserAnimationsModule,
|
|
||||||
AppRoutingModule,
|
|
||||||
ServiceWorkerModule.register('ngsw-worker.js', {
|
|
||||||
enabled: environment.production,
|
|
||||||
}),
|
|
||||||
BrowserAnimationsModule,
|
|
||||||
|
|
||||||
ApplicationFrameModule,
|
|
||||||
|
|
||||||
AngularFireModule.initializeApp(environment.firebase),
|
|
||||||
AngularFirestoreModule.enablePersistence({synchronizeTabs: true}),
|
|
||||||
AngularFireStorageModule,
|
|
||||||
AngularFireDatabaseModule,
|
|
||||||
AngularFireAuthModule,
|
|
||||||
AngularFireAuthGuardModule,
|
|
||||||
FontAwesomeModule,
|
|
||||||
],
|
|
||||||
providers: [{provide: MAT_DATE_LOCALE, useValue: 'de-DE'}],
|
|
||||||
bootstrap: [AppComponent],
|
|
||||||
})
|
|
||||||
export class AppModule {
|
|
||||||
}
|
|
||||||
@@ -9,8 +9,8 @@ describe('BrandComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [BrandComponent],
|
imports: [BrandComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
import { LogoComponent } from '../../widget-modules/components/logo/logo.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-brand',
|
selector: 'app-brand',
|
||||||
templateUrl: './brand.component.html',
|
templateUrl: './brand.component.html',
|
||||||
styleUrls: ['./brand.component.less'],
|
styleUrls: ['./brand.component.less'],
|
||||||
standalone: false,
|
imports: [LogoComponent],
|
||||||
})
|
})
|
||||||
export class BrandComponent {
|
export class BrandComponent {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {NgModule} from '@angular/core';
|
|||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {BrandComponent} from './brand.component';
|
import {BrandComponent} from './brand.component';
|
||||||
import {RouterModule, Routes} from '@angular/router';
|
import {RouterModule, Routes} from '@angular/router';
|
||||||
import {LogoModule} from '../../widget-modules/components/logo/logo.module';
|
|
||||||
import {NewUserComponent} from './new-user/new-user.component';
|
import {NewUserComponent} from './new-user/new-user.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
@@ -18,8 +18,7 @@ const routes: Routes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [BrandComponent, NewUserComponent],
|
imports: [CommonModule, RouterModule.forChild(routes), BrandComponent, NewUserComponent],
|
||||||
imports: [CommonModule, RouterModule.forChild(routes), LogoModule],
|
|
||||||
})
|
})
|
||||||
export class BrandModule {
|
export class BrandModule {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('NewUserComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [NewUserComponent],
|
imports: [NewUserComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,18 @@ import {Component} from '@angular/core';
|
|||||||
import {UserService} from '../../../services/user/user.service';
|
import {UserService} from '../../../services/user/user.service';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
import {User} from '../../../services/user/user';
|
import {User} from '../../../services/user/user';
|
||||||
|
import { BrandComponent } from '../brand.component';
|
||||||
|
import { NgIf, AsyncPipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-new-user',
|
selector: 'app-new-user',
|
||||||
templateUrl: './new-user.component.html',
|
templateUrl: './new-user.component.html',
|
||||||
styleUrls: ['./new-user.component.less'],
|
styleUrls: ['./new-user.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
BrandComponent,
|
||||||
|
NgIf,
|
||||||
|
AsyncPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class NewUserComponent {
|
export class NewUserComponent {
|
||||||
public user$: Observable<User | null> | null = null;
|
public user$: Observable<User | null> | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('GuestComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [GuestComponent],
|
imports: [GuestComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,22 @@ import {ActivatedRoute} from '@angular/router';
|
|||||||
import {map, switchMap} from 'rxjs/operators';
|
import {map, switchMap} from 'rxjs/operators';
|
||||||
import {Song} from '../songs/services/song';
|
import {Song} from '../songs/services/song';
|
||||||
import {ConfigService} from '../../services/config.service';
|
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';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-guest',
|
selector: 'app-guest',
|
||||||
templateUrl: './guest.component.html',
|
templateUrl: './guest.component.html',
|
||||||
styleUrls: ['./guest.component.less'],
|
styleUrls: ['./guest.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
NgFor,
|
||||||
|
SongTextComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
DatePipe,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class GuestComponent {
|
export class GuestComponent {
|
||||||
public show$ = this.currentRoute.params.pipe(
|
public show$ = this.currentRoute.params.pipe(
|
||||||
|
|||||||
@@ -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';
|
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [GuestComponent],
|
imports: [
|
||||||
imports: [
|
CommonModule,
|
||||||
CommonModule,
|
RouterModule.forChild([
|
||||||
RouterModule.forChild([
|
{
|
||||||
{
|
path: ':id',
|
||||||
path: ':id',
|
component: GuestComponent,
|
||||||
component: GuestComponent,
|
},
|
||||||
},
|
]),
|
||||||
]),
|
SongTextComponent,
|
||||||
SongTextComponent,
|
ShowTypePipe,
|
||||||
ShowTypePipe,
|
GuestComponent,
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
})
|
})
|
||||||
export class GuestModule {}
|
export class GuestModule {}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('LegalComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [LegalComponent],
|
imports: [LegalComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Song} from '../../../songs/services/song';
|
import {Song} from '../../../songs/services/song';
|
||||||
import {Config} from '../../../../services/config';
|
import {Config} from '../../../../services/config';
|
||||||
|
import { NgIf } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-legal',
|
selector: 'app-legal',
|
||||||
templateUrl: './legal.component.html',
|
templateUrl: './legal.component.html',
|
||||||
styleUrls: ['./legal.component.less'],
|
styleUrls: ['./legal.component.less'],
|
||||||
standalone: false,
|
imports: [NgIf],
|
||||||
})
|
})
|
||||||
export class LegalComponent {
|
export class LegalComponent {
|
||||||
@Input() public song: Song | null = null;
|
@Input() public song: Song | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('LogoComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [LogoComponent],
|
imports: [LogoComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-logo',
|
selector: 'app-logo',
|
||||||
templateUrl: './logo.component.html',
|
templateUrl: './logo.component.html',
|
||||||
styleUrls: ['./logo.component.less'],
|
styleUrls: ['./logo.component.less'],
|
||||||
standalone: false,
|
|
||||||
})
|
})
|
||||||
export class LogoComponent {
|
export class LogoComponent {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('MonitorComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [MonitorComponent],
|
imports: [MonitorComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -13,13 +13,26 @@ import {PresentationBackground, Show} from '../../shows/services/show';
|
|||||||
import {GlobalSettings} from '../../../services/global-settings';
|
import {GlobalSettings} from '../../../services/global-settings';
|
||||||
import {ShowSongService} from '../../shows/services/show-song.service';
|
import {ShowSongService} from '../../shows/services/show-song.service';
|
||||||
import {openFullscreen} from '../../../services/fullscreen';
|
import {openFullscreen} from '../../../services/fullscreen';
|
||||||
|
import { NgIf, AsyncPipe, DatePipe } from '@angular/common';
|
||||||
|
import { LogoComponent } from './logo/logo.component';
|
||||||
|
import { SongTextComponent } from '../../../widget-modules/components/song-text/song-text.component';
|
||||||
|
import { LegalComponent } from './legal/legal.component';
|
||||||
|
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-monitor',
|
selector: 'app-monitor',
|
||||||
templateUrl: './monitor.component.html',
|
templateUrl: './monitor.component.html',
|
||||||
styleUrls: ['./monitor.component.less'],
|
styleUrls: ['./monitor.component.less'],
|
||||||
animations: [songSwitch],
|
animations: [songSwitch],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
LogoComponent,
|
||||||
|
SongTextComponent,
|
||||||
|
LegalComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
DatePipe,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class MonitorComponent implements OnInit {
|
export class MonitorComponent implements OnInit {
|
||||||
public song: Song | null = null;
|
public song: Song | null = null;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {CommonModule} from '@angular/common';
|
|||||||
import {PresentationRoutingModule} from './presentation-routing.module';
|
import {PresentationRoutingModule} from './presentation-routing.module';
|
||||||
import {MonitorComponent} from './monitor/monitor.component';
|
import {MonitorComponent} from './monitor/monitor.component';
|
||||||
import {RemoteComponent} from './remote/remote.component';
|
import {RemoteComponent} from './remote/remote.component';
|
||||||
import {CardModule} from '../../widget-modules/components/card/card.module';
|
|
||||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
import {MatFormFieldModule} from '@angular/material/form-field';
|
||||||
import {MatSelectModule} from '@angular/material/select';
|
import {MatSelectModule} from '@angular/material/select';
|
||||||
import {LegalComponent} from './monitor/legal/legal.component';
|
import {LegalComponent} from './monitor/legal/legal.component';
|
||||||
@@ -15,19 +15,17 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
|||||||
import {LogoComponent} from './monitor/logo/logo.component';
|
import {LogoComponent} from './monitor/logo/logo.component';
|
||||||
import {SelectComponent} from './select/select.component';
|
import {SelectComponent} from './select/select.component';
|
||||||
import {MatInputModule} from '@angular/material/input';
|
import {MatInputModule} from '@angular/material/input';
|
||||||
import {UserNameModule} from '../../services/user/user-name/user-name.module';
|
|
||||||
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
|
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
|
||||||
import {AddSongComponent} from '../../widget-modules/components/add-song/add-song.component';
|
import {AddSongComponent} from '../../widget-modules/components/add-song/add-song.component';
|
||||||
import {SectionTypePipe} from '../../widget-modules/pipes/section-type-translator/section-type.pipe';
|
import {SectionTypePipe} from '../../widget-modules/pipes/section-type-translator/section-type.pipe';
|
||||||
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [MonitorComponent, RemoteComponent, LegalComponent, LogoComponent, SelectComponent],
|
exports: [RemoteComponent],
|
||||||
exports: [RemoteComponent],
|
imports: [
|
||||||
imports: [
|
|
||||||
CommonModule,
|
CommonModule,
|
||||||
PresentationRoutingModule,
|
PresentationRoutingModule,
|
||||||
CardModule,
|
|
||||||
MatFormFieldModule,
|
MatFormFieldModule,
|
||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
ShowTypePipe,
|
ShowTypePipe,
|
||||||
@@ -40,7 +38,7 @@ import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show
|
|||||||
AddSongComponent,
|
AddSongComponent,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
UserNameModule,
|
MonitorComponent, RemoteComponent, LegalComponent, LogoComponent, SelectComponent,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class PresentationModule {}
|
export class PresentationModule {}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('RemoteComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [RemoteComponent],
|
imports: [RemoteComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,20 @@ import {TextRenderingService} from '../../songs/services/text-rendering.service'
|
|||||||
import {Section} from '../../songs/services/section';
|
import {Section} from '../../songs/services/section';
|
||||||
import {GlobalSettings} from '../../../services/global-settings';
|
import {GlobalSettings} from '../../../services/global-settings';
|
||||||
import {LineType} from '../../songs/services/line-type';
|
import {LineType} from '../../songs/services/line-type';
|
||||||
|
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||||
|
import { MatButton } from '@angular/material/button';
|
||||||
|
import { RouterLink } from '@angular/router';
|
||||||
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { MatSelect } from '@angular/material/select';
|
||||||
|
import { MatOption } from '@angular/material/core';
|
||||||
|
import { MatSlider, MatSliderThumb } from '@angular/material/slider';
|
||||||
|
import { AddSongComponent } from '../../../widget-modules/components/add-song/add-song.component';
|
||||||
|
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
import { SectionTypePipe } from '../../../widget-modules/pipes/section-type-translator/section-type.pipe';
|
||||||
|
|
||||||
export interface PresentationSong {
|
export interface PresentationSong {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -21,12 +35,33 @@ export interface PresentationSong {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-remote',
|
selector: 'app-remote',
|
||||||
templateUrl: './remote.component.html',
|
templateUrl: './remote.component.html',
|
||||||
styleUrls: ['./remote.component.less'],
|
styleUrls: ['./remote.component.less'],
|
||||||
animations: [fade],
|
animations: [fade],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
CardComponent,
|
||||||
|
NgFor,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
FormsModule,
|
||||||
|
MatButton,
|
||||||
|
RouterLink,
|
||||||
|
FaIconComponent,
|
||||||
|
MatSelect,
|
||||||
|
MatOption,
|
||||||
|
MatSlider,
|
||||||
|
MatSliderThumb,
|
||||||
|
AddSongComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
DatePipe,
|
||||||
|
ShowTypePipe,
|
||||||
|
SectionTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class RemoteComponent {
|
export class RemoteComponent {
|
||||||
public show: Show | null = null;
|
public show: Show | null = null;
|
||||||
|
|||||||
@@ -5,13 +5,27 @@ import {Show} from '../../shows/services/show';
|
|||||||
import {GlobalSettingsService} from '../../../services/global-settings.service';
|
import {GlobalSettingsService} from '../../../services/global-settings.service';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
import {fade} from '../../../animations';
|
import {fade} from '../../../animations';
|
||||||
|
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatButton } from '@angular/material/button';
|
||||||
|
import { UserNameComponent } from '../../../services/user/user-name/user-name.component';
|
||||||
|
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-select',
|
selector: 'app-select',
|
||||||
templateUrl: './select.component.html',
|
templateUrl: './select.component.html',
|
||||||
styleUrls: ['./select.component.less'],
|
styleUrls: ['./select.component.less'],
|
||||||
animations: [fade],
|
animations: [fade],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
CardComponent,
|
||||||
|
NgFor,
|
||||||
|
MatButton,
|
||||||
|
UserNameComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
DatePipe,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class SelectComponent implements OnInit {
|
export class SelectComponent implements OnInit {
|
||||||
public visible = false;
|
public visible = false;
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ describe('ArchiveDialogComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ArchiveDialogComponent],
|
imports: [ArchiveDialogComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ArchiveDialogComponent);
|
fixture = TestBed.createComponent(ArchiveDialogComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
import { CdkScrollable } from '@angular/cdk/scrolling';
|
||||||
|
import { MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
|
||||||
|
import { MatButton } from '@angular/material/button';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-archive-dialog',
|
selector: 'app-archive-dialog',
|
||||||
templateUrl: './archive-dialog.component.html',
|
templateUrl: './archive-dialog.component.html',
|
||||||
styleUrls: ['./archive-dialog.component.less'],
|
styleUrls: ['./archive-dialog.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
CdkScrollable,
|
||||||
|
MatDialogContent,
|
||||||
|
MatDialogActions,
|
||||||
|
MatButton,
|
||||||
|
MatDialogClose,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class ArchiveDialogComponent {
|
export class ArchiveDialogComponent {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,45 @@ import {ShowDataService} from '../services/show-data.service';
|
|||||||
import {Observable, take} from 'rxjs';
|
import {Observable, take} from 'rxjs';
|
||||||
import {Show} from '../services/show';
|
import {Show} from '../services/show';
|
||||||
import {ShowService} from '../services/show.service';
|
import {ShowService} from '../services/show.service';
|
||||||
import {FormControl, FormGroup, Validators} from '@angular/forms';
|
import { FormControl, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {map, switchMap} from 'rxjs/operators';
|
import {map, switchMap} from 'rxjs/operators';
|
||||||
import firebase from 'firebase/compat/app';
|
import firebase from 'firebase/compat/app';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
|
||||||
|
import { MatSelect } from '@angular/material/select';
|
||||||
|
import { MatOptgroup, MatOption } from '@angular/material/core';
|
||||||
|
import { NgFor } from '@angular/common';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker } from '@angular/material/datepicker';
|
||||||
|
import { ButtonRowComponent } from '../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../widget-modules/components/button/button.component';
|
||||||
|
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
import Timestamp = firebase.firestore.Timestamp;
|
import Timestamp = firebase.firestore.Timestamp;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit',
|
selector: 'app-edit',
|
||||||
templateUrl: './edit.component.html',
|
templateUrl: './edit.component.html',
|
||||||
styleUrls: ['./edit.component.less'],
|
styleUrls: ['./edit.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
CardComponent,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatSelect,
|
||||||
|
MatOptgroup,
|
||||||
|
NgFor,
|
||||||
|
MatOption,
|
||||||
|
MatInput,
|
||||||
|
MatDatepickerInput,
|
||||||
|
MatDatepickerToggle,
|
||||||
|
MatSuffix,
|
||||||
|
MatDatepicker,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class EditComponent implements OnInit {
|
export class EditComponent implements OnInit {
|
||||||
public shows$: Observable<Show[]>;
|
public shows$: Observable<Show[]>;
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ describe('FilterComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [FilterComponent],
|
imports: [FilterComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {KeyValue} from '@angular/common';
|
import { KeyValue, NgFor } from '@angular/common';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {UntypedFormBuilder, UntypedFormGroup} from '@angular/forms';
|
import { UntypedFormBuilder, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {FilterValues} from './filter-values';
|
import {FilterValues} from './filter-values';
|
||||||
import {Show} from '../../services/show';
|
import {Show} from '../../services/show';
|
||||||
import {ShowService} from '../../services/show.service';
|
import {ShowService} from '../../services/show.service';
|
||||||
@@ -10,12 +10,25 @@ import {combineLatest, Observable} from 'rxjs';
|
|||||||
import {dynamicSort, onlyUnique} from '../../../../services/filter.helper';
|
import {dynamicSort, onlyUnique} from '../../../../services/filter.helper';
|
||||||
import {UserService} from '../../../../services/user/user.service';
|
import {UserService} from '../../../../services/user/user.service';
|
||||||
import {isEqual} from 'lodash';
|
import {isEqual} from 'lodash';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatSelect } from '@angular/material/select';
|
||||||
|
import { MatOption, MatOptgroup } from '@angular/material/core';
|
||||||
|
import { ShowTypePipe } from '../../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-filter',
|
selector: 'app-filter',
|
||||||
templateUrl: './filter.component.html',
|
templateUrl: './filter.component.html',
|
||||||
styleUrls: ['./filter.component.less'],
|
styleUrls: ['./filter.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatSelect,
|
||||||
|
NgFor,
|
||||||
|
MatOption,
|
||||||
|
MatOptgroup,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class FilterComponent {
|
export class FilterComponent {
|
||||||
@Input() public route = '/shows/';
|
@Input() public route = '/shows/';
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('ListItemComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [ListItemComponent],
|
imports: [ListItemComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,19 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Show} from '../../services/show';
|
import {Show} from '../../services/show';
|
||||||
|
import { NgIf, DatePipe } from '@angular/common';
|
||||||
|
import { UserNameComponent } from '../../../../services/user/user-name/user-name.component';
|
||||||
|
import { ShowTypePipe } from '../../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-list-item',
|
selector: 'app-list-item',
|
||||||
templateUrl: './list-item.component.html',
|
templateUrl: './list-item.component.html',
|
||||||
styleUrls: ['./list-item.component.less'],
|
styleUrls: ['./list-item.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
UserNameComponent,
|
||||||
|
DatePipe,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class ListItemComponent {
|
export class ListItemComponent {
|
||||||
@Input() public show: Show | null = null;
|
@Input() public show: Show | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('ListComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [ListComponent],
|
imports: [ListComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -4,15 +4,33 @@ import {Show} from '../services/show';
|
|||||||
import {fade} from '../../../animations';
|
import {fade} from '../../../animations';
|
||||||
import {ShowService} from '../services/show.service';
|
import {ShowService} from '../services/show.service';
|
||||||
import {FilterValues} from './filter/filter-values';
|
import {FilterValues} from './filter/filter-values';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||||
import {map} from 'rxjs/operators';
|
import {map} from 'rxjs/operators';
|
||||||
|
import { RoleDirective } from '../../../services/user/role.directive';
|
||||||
|
import { ListHeaderComponent } from '../../../widget-modules/components/list-header/list-header.component';
|
||||||
|
import { NgIf, NgFor, AsyncPipe } from '@angular/common';
|
||||||
|
import { FilterComponent } from './filter/filter.component';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { ListItemComponent } from './list-item/list-item.component';
|
||||||
|
import { SortByPipe } from '../../../widget-modules/pipes/sort-by/sort-by.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-list',
|
selector: 'app-list',
|
||||||
templateUrl: './list.component.html',
|
templateUrl: './list.component.html',
|
||||||
styleUrls: ['./list.component.less'],
|
styleUrls: ['./list.component.less'],
|
||||||
animations: [fade],
|
animations: [fade],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
RoleDirective,
|
||||||
|
ListHeaderComponent,
|
||||||
|
NgIf,
|
||||||
|
FilterComponent,
|
||||||
|
CardComponent,
|
||||||
|
NgFor,
|
||||||
|
ListItemComponent,
|
||||||
|
RouterLink,
|
||||||
|
AsyncPipe,
|
||||||
|
SortByPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class ListComponent {
|
export class ListComponent {
|
||||||
public shows$ = this.showService.list$();
|
public shows$ = this.showService.list$();
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('NewComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [NewComponent],
|
imports: [NewComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,42 @@ import {ShowDataService} from '../services/show-data.service';
|
|||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
import {Show} from '../services/show';
|
import {Show} from '../services/show';
|
||||||
import {ShowService} from '../services/show.service';
|
import {ShowService} from '../services/show.service';
|
||||||
import {UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
import { UntypedFormControl, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
|
||||||
|
import { MatSelect } from '@angular/material/select';
|
||||||
|
import { MatOptgroup, MatOption } from '@angular/material/core';
|
||||||
|
import { NgFor } from '@angular/common';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker } from '@angular/material/datepicker';
|
||||||
|
import { ButtonRowComponent } from '../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../widget-modules/components/button/button.component';
|
||||||
|
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-new',
|
selector: 'app-new',
|
||||||
templateUrl: './new.component.html',
|
templateUrl: './new.component.html',
|
||||||
styleUrls: ['./new.component.less'],
|
styleUrls: ['./new.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
CardComponent,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatSelect,
|
||||||
|
MatOptgroup,
|
||||||
|
NgFor,
|
||||||
|
MatOption,
|
||||||
|
MatInput,
|
||||||
|
MatDatepickerInput,
|
||||||
|
MatDatepickerToggle,
|
||||||
|
MatSuffix,
|
||||||
|
MatDatepicker,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class NewComponent implements OnInit {
|
export class NewComponent implements OnInit {
|
||||||
public shows$: Observable<Show[]>;
|
public shows$: Observable<Show[]>;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('ShowComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [ShowComponent],
|
imports: [ShowComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -25,20 +25,60 @@ import {
|
|||||||
faUser,
|
faUser,
|
||||||
faUsers,
|
faUsers,
|
||||||
} from '@fortawesome/free-solid-svg-icons';
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';
|
import { CdkDragDrop, moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
|
||||||
import {fade} from '../../../animations';
|
import {fade} from '../../../animations';
|
||||||
import {MatDialog} from '@angular/material/dialog';
|
import {MatDialog} from '@angular/material/dialog';
|
||||||
import {ArchiveDialogComponent} from '../dialog/archive-dialog/archive-dialog.component';
|
import {ArchiveDialogComponent} from '../dialog/archive-dialog/archive-dialog.component';
|
||||||
import {closeFullscreen, openFullscreen} from '../../../services/fullscreen';
|
import {closeFullscreen, openFullscreen} from '../../../services/fullscreen';
|
||||||
import {GuestShowService} from '../../guest/guest-show.service';
|
import {GuestShowService} from '../../guest/guest-show.service';
|
||||||
import {ShareDialogComponent} from '../dialog/share-dialog/share-dialog.component';
|
import {ShareDialogComponent} from '../dialog/share-dialog/share-dialog.component';
|
||||||
|
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { UserNameComponent } from '../../../services/user/user-name/user-name.component';
|
||||||
|
import { MatCheckbox } from '@angular/material/checkbox';
|
||||||
|
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||||
|
import { MenuButtonComponent } from '../../../widget-modules/components/menu-button/menu-button.component';
|
||||||
|
import { MatTooltip } from '@angular/material/tooltip';
|
||||||
|
import { SongComponent } from './song/song.component';
|
||||||
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { AddSongComponent } from '../../../widget-modules/components/add-song/add-song.component';
|
||||||
|
import { ButtonRowComponent } from '../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { RoleDirective } from '../../../services/user/role.directive';
|
||||||
|
import { OwnerDirective } from '../../../services/user/owner.directive';
|
||||||
|
import { ButtonComponent } from '../../../widget-modules/components/button/button.component';
|
||||||
|
import { MatMenuTrigger, MatMenu } from '@angular/material/menu';
|
||||||
|
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-show',
|
selector: 'app-show',
|
||||||
templateUrl: './show.component.html',
|
templateUrl: './show.component.html',
|
||||||
styleUrls: ['./show.component.less'],
|
styleUrls: ['./show.component.less'],
|
||||||
animations: [fade],
|
animations: [fade],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
CardComponent,
|
||||||
|
UserNameComponent,
|
||||||
|
MatCheckbox,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
FormsModule,
|
||||||
|
MenuButtonComponent,
|
||||||
|
MatTooltip,
|
||||||
|
CdkDropList,
|
||||||
|
NgFor,
|
||||||
|
CdkDrag,
|
||||||
|
SongComponent,
|
||||||
|
FaIconComponent,
|
||||||
|
AddSongComponent,
|
||||||
|
ButtonRowComponent,
|
||||||
|
RoleDirective,
|
||||||
|
OwnerDirective,
|
||||||
|
ButtonComponent,
|
||||||
|
MatMenuTrigger,
|
||||||
|
MatMenu,
|
||||||
|
AsyncPipe,
|
||||||
|
DatePipe,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class ShowComponent implements OnInit, OnDestroy {
|
export class ShowComponent implements OnInit, OnDestroy {
|
||||||
public show$: Observable<Show | null> | null = null;
|
public show$: Observable<Show | null> | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('SongComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [SongComponent],
|
imports: [SongComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,43 @@ import {Component, Input, OnInit, ViewChild} from '@angular/core';
|
|||||||
import {ShowSongService} from '../../services/show-song.service';
|
import {ShowSongService} from '../../services/show-song.service';
|
||||||
import {ShowSong} from '../../services/show-song';
|
import {ShowSong} from '../../services/show-song';
|
||||||
import {getScale} from '../../../songs/services/key.helper';
|
import {getScale} from '../../../songs/services/key.helper';
|
||||||
import {UntypedFormControl} from '@angular/forms';
|
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {ChordMode} from '../../../../widget-modules/components/song-text/song-text.component';
|
import { ChordMode, SongTextComponent } from '../../../../widget-modules/components/song-text/song-text.component';
|
||||||
import {Show} from '../../services/show';
|
import {Show} from '../../services/show';
|
||||||
import {faEraser, faPenToSquare, faSave, faTrash} from '@fortawesome/free-solid-svg-icons';
|
import {faEraser, faPenToSquare, faSave, faTrash} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {fade} from '../../../../animations';
|
import {fade} from '../../../../animations';
|
||||||
import {MatSelect} from '@angular/material/select';
|
import {MatSelect} from '@angular/material/select';
|
||||||
|
import { NgIf, NgFor } from '@angular/common';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatOption } from '@angular/material/core';
|
||||||
|
import { MenuButtonComponent } from '../../../../widget-modules/components/menu-button/menu-button.component';
|
||||||
|
import { MatTooltip } from '@angular/material/tooltip';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||||
|
import { ButtonRowComponent } from '../../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../../widget-modules/components/button/button.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-song',
|
selector: 'app-song',
|
||||||
templateUrl: './song.component.html',
|
templateUrl: './song.component.html',
|
||||||
styleUrls: ['./song.component.less'],
|
styleUrls: ['./song.component.less'],
|
||||||
animations: [fade],
|
animations: [fade],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
MatFormField,
|
||||||
|
MatSelect,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
NgFor,
|
||||||
|
MatOption,
|
||||||
|
MenuButtonComponent,
|
||||||
|
MatTooltip,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
CdkTextareaAutosize,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
SongTextComponent,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class SongComponent implements OnInit {
|
export class SongComponent implements OnInit {
|
||||||
@Input() public show: Show | null = null;
|
@Input() public show: Show | null = null;
|
||||||
|
|||||||
@@ -3,15 +3,15 @@ import {CommonModule} from '@angular/common';
|
|||||||
|
|
||||||
import {ShowsRoutingModule} from './shows-routing.module';
|
import {ShowsRoutingModule} from './shows-routing.module';
|
||||||
import {NewComponent} from './new/new.component';
|
import {NewComponent} from './new/new.component';
|
||||||
import {CardModule} from '../../widget-modules/components/card/card.module';
|
|
||||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
import {MatFormFieldModule} from '@angular/material/form-field';
|
||||||
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||||
import {MatInputModule} from '@angular/material/input';
|
import {MatInputModule} from '@angular/material/input';
|
||||||
import {ListComponent} from './list/list.component';
|
import {ListComponent} from './list/list.component';
|
||||||
import {ListItemComponent} from './list/list-item/list-item.component';
|
import {ListItemComponent} from './list/list-item/list-item.component';
|
||||||
import {ListHeaderModule} from '../../widget-modules/components/list-header/list-header.module';
|
|
||||||
import {MatCheckboxModule} from '@angular/material/checkbox';
|
import {MatCheckboxModule} from '@angular/material/checkbox';
|
||||||
import {ButtonRowModule} from '../../widget-modules/components/button-row/button-row.module';
|
|
||||||
import {MatButtonModule} from '@angular/material/button';
|
import {MatButtonModule} from '@angular/material/button';
|
||||||
import {MatDatepickerModule} from '@angular/material/datepicker';
|
import {MatDatepickerModule} from '@angular/material/datepicker';
|
||||||
import {MatSelectModule} from '@angular/material/select';
|
import {MatSelectModule} from '@angular/material/select';
|
||||||
@@ -19,14 +19,14 @@ import {MatNativeDateModule} from '@angular/material/core';
|
|||||||
import {ShowComponent} from './show/show.component';
|
import {ShowComponent} from './show/show.component';
|
||||||
import {SongComponent} from './show/song/song.component';
|
import {SongComponent} from './show/song/song.component';
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||||
import {MenuButtonModule} from '../../widget-modules/components/menu-button/menu-button.module';
|
|
||||||
import {NgxMatSelectSearchModule} from 'ngx-mat-select-search';
|
import {NgxMatSelectSearchModule} from 'ngx-mat-select-search';
|
||||||
import {ButtonModule} from '../../widget-modules/components/button/button.module';
|
|
||||||
import {OwnerModule} from '../../services/user/owner.module';
|
|
||||||
import {UserNameModule} from '../../services/user/user-name/user-name.module';
|
|
||||||
import {MatMenuModule} from '@angular/material/menu';
|
import {MatMenuModule} from '@angular/material/menu';
|
||||||
import {DragDropModule} from '@angular/cdk/drag-drop';
|
import {DragDropModule} from '@angular/cdk/drag-drop';
|
||||||
import {RoleModule} from '../../services/user/role.module';
|
|
||||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||||
import {FilterComponent} from './list/filter/filter.component';
|
import {FilterComponent} from './list/filter/filter.component';
|
||||||
import {EditComponent} from './edit/edit.component';
|
import {EditComponent} from './edit/edit.component';
|
||||||
@@ -38,38 +38,30 @@ import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show
|
|||||||
import {SortByPipe} from '../../widget-modules/pipes/sort-by/sort-by.pipe';
|
import {SortByPipe} from '../../widget-modules/pipes/sort-by/sort-by.pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [NewComponent, ListComponent, ListItemComponent, ShowComponent, SongComponent, FilterComponent, EditComponent, ArchiveDialogComponent],
|
imports: [
|
||||||
imports: [
|
|
||||||
CommonModule,
|
CommonModule,
|
||||||
ShowsRoutingModule,
|
ShowsRoutingModule,
|
||||||
CardModule,
|
|
||||||
MatFormFieldModule,
|
MatFormFieldModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
ListHeaderModule,
|
|
||||||
MatCheckboxModule,
|
MatCheckboxModule,
|
||||||
ButtonRowModule,
|
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
MatDatepickerModule,
|
MatDatepickerModule,
|
||||||
MatNativeDateModule,
|
MatNativeDateModule,
|
||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
ShowTypePipe,
|
ShowTypePipe,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
MenuButtonModule,
|
|
||||||
FormsModule,
|
FormsModule,
|
||||||
SongTextComponent,
|
SongTextComponent,
|
||||||
NgxMatSelectSearchModule,
|
NgxMatSelectSearchModule,
|
||||||
AddSongComponent,
|
AddSongComponent,
|
||||||
ButtonModule,
|
|
||||||
OwnerModule,
|
|
||||||
UserNameModule,
|
|
||||||
MatMenuModule,
|
MatMenuModule,
|
||||||
DragDropModule,
|
DragDropModule,
|
||||||
RoleModule,
|
|
||||||
SortByPipe,
|
SortByPipe,
|
||||||
MatTooltipModule,
|
MatTooltipModule,
|
||||||
MatDialogModule,
|
MatDialogModule,
|
||||||
],
|
NewComponent, ListComponent, ListItemComponent, ShowComponent, SongComponent, FilterComponent, EditComponent, ArchiveDialogComponent,
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
})
|
})
|
||||||
export class ShowsModule {}
|
export class ShowsModule {}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('FilterComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [FilterComponent],
|
imports: [FilterComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,35 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {UntypedFormBuilder, UntypedFormGroup} from '@angular/forms';
|
import { UntypedFormBuilder, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {SongService} from '../../services/song.service';
|
import {SongService} from '../../services/song.service';
|
||||||
import {FilterValues} from './filter-values';
|
import {FilterValues} from './filter-values';
|
||||||
import {Song} from '../../services/song';
|
import {Song} from '../../services/song';
|
||||||
import {KEYS} from '../../services/key.helper';
|
import {KEYS} from '../../services/key.helper';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { MatSelect } from '@angular/material/select';
|
||||||
|
import { MatOption } from '@angular/material/core';
|
||||||
|
import { NgFor } from '@angular/common';
|
||||||
|
import { LegalTypePipe } from '../../../../widget-modules/pipes/legal-type-translator/legal-type.pipe';
|
||||||
|
import { KeyPipe } from '../../../../widget-modules/pipes/key-translator/key.pipe';
|
||||||
|
import { SongTypePipe } from '../../../../widget-modules/pipes/song-type-translater/song-type.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-filter',
|
selector: 'app-filter',
|
||||||
templateUrl: './filter.component.html',
|
templateUrl: './filter.component.html',
|
||||||
styleUrls: ['./filter.component.less'],
|
styleUrls: ['./filter.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
MatSelect,
|
||||||
|
MatOption,
|
||||||
|
NgFor,
|
||||||
|
LegalTypePipe,
|
||||||
|
KeyPipe,
|
||||||
|
SongTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class FilterComponent {
|
export class FilterComponent {
|
||||||
public filterFormGroup: UntypedFormGroup;
|
public filterFormGroup: UntypedFormGroup;
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ describe('SongListComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [SongListComponent],
|
imports: [SongListComponent],
|
||||||
providers: [{provide: SongService, useValue: mockSongService}],
|
providers: [{ provide: SongService, useValue: mockSongService }],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -4,19 +4,35 @@ import {Song} from '../services/song';
|
|||||||
import {map} from 'rxjs/operators';
|
import {map} from 'rxjs/operators';
|
||||||
import {combineLatest, Observable} from 'rxjs';
|
import {combineLatest, Observable} from 'rxjs';
|
||||||
import {fade} from '../../../animations';
|
import {fade} from '../../../animations';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||||
import {filterSong} from '../../../services/filter.helper';
|
import {filterSong} from '../../../services/filter.helper';
|
||||||
import {FilterValues} from './filter/filter-values';
|
import {FilterValues} from './filter/filter-values';
|
||||||
import {ScrollService} from '../../../services/scroll.service';
|
import {ScrollService} from '../../../services/scroll.service';
|
||||||
import {faBalanceScaleRight, faCheck, faPencilRuler} from '@fortawesome/free-solid-svg-icons';
|
import {faBalanceScaleRight, faCheck, faPencilRuler} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { NgIf, NgFor, AsyncPipe } from '@angular/common';
|
||||||
|
import { ListHeaderComponent } from '../../../widget-modules/components/list-header/list-header.component';
|
||||||
|
import { FilterComponent } from './filter/filter.component';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { RoleDirective } from '../../../services/user/role.directive';
|
||||||
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-songs',
|
selector: 'app-songs',
|
||||||
templateUrl: './song-list.component.html',
|
templateUrl: './song-list.component.html',
|
||||||
styleUrls: ['./song-list.component.less'],
|
styleUrls: ['./song-list.component.less'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
animations: [fade],
|
animations: [fade],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
ListHeaderComponent,
|
||||||
|
FilterComponent,
|
||||||
|
CardComponent,
|
||||||
|
NgFor,
|
||||||
|
RouterLink,
|
||||||
|
RoleDirective,
|
||||||
|
FaIconComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class SongListComponent implements OnInit, OnDestroy {
|
export class SongListComponent implements OnInit, OnDestroy {
|
||||||
public anyFilterActive = false;
|
public anyFilterActive = false;
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {SongListComponent} from './song-list.component';
|
|
||||||
import {CardModule} from '../../../widget-modules/components/card/card.module';
|
|
||||||
import {RouterModule} from '@angular/router';
|
|
||||||
import {ListHeaderModule} from '../../../widget-modules/components/list-header/list-header.module';
|
|
||||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
|
||||||
import {MatInputModule} from '@angular/material/input';
|
|
||||||
import {FilterComponent} from './filter/filter.component';
|
|
||||||
import {ReactiveFormsModule} from '@angular/forms';
|
|
||||||
import {MatSelectModule} from '@angular/material/select';
|
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
|
||||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
|
||||||
import {RoleModule} from '../../../services/user/role.module';
|
|
||||||
import {KeyPipe} from '../../../widget-modules/pipes/key-translator/key.pipe';
|
|
||||||
import {LegalTypePipe} from '../../../widget-modules/pipes/legal-type-translator/legal-type.pipe';
|
|
||||||
import {SongTypePipe} from '../../../widget-modules/pipes/song-type-translater/song-type.pipe';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [SongListComponent, FilterComponent],
|
|
||||||
exports: [SongListComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
RouterModule,
|
|
||||||
|
|
||||||
CardModule,
|
|
||||||
LegalTypePipe,
|
|
||||||
ListHeaderModule,
|
|
||||||
MatFormFieldModule,
|
|
||||||
MatInputModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
MatSelectModule,
|
|
||||||
FontAwesomeModule,
|
|
||||||
MatTooltipModule,
|
|
||||||
RoleModule,
|
|
||||||
KeyPipe,
|
|
||||||
SongTypePipe,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class SongListModule {}
|
|
||||||
@@ -9,8 +9,8 @@ describe('EditFileComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [EditFileComponent],
|
imports: [EditFileComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,26 @@ import {map, switchMap} from 'rxjs/operators';
|
|||||||
import {FileDataService} from '../../../services/file-data.service';
|
import {FileDataService} from '../../../services/file-data.service';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
import {File} from '../../../services/file';
|
import {File} from '../../../services/file';
|
||||||
|
import { CardComponent } from '../../../../../widget-modules/components/card/card.component';
|
||||||
|
import { NgIf, NgStyle, NgFor, AsyncPipe } from '@angular/common';
|
||||||
|
import { MatIconButton } from '@angular/material/button';
|
||||||
|
import { MatIcon } from '@angular/material/icon';
|
||||||
|
import { FileComponent } from './file/file.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit-file',
|
selector: 'app-edit-file',
|
||||||
templateUrl: './edit-file.component.html',
|
templateUrl: './edit-file.component.html',
|
||||||
styleUrls: ['./edit-file.component.less'],
|
styleUrls: ['./edit-file.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
CardComponent,
|
||||||
|
NgIf,
|
||||||
|
NgStyle,
|
||||||
|
MatIconButton,
|
||||||
|
MatIcon,
|
||||||
|
NgFor,
|
||||||
|
FileComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class EditFileComponent {
|
export class EditFileComponent {
|
||||||
public selectedFiles: FileList | null = null;
|
public selectedFiles: FileList | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('FileComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [FileComponent],
|
imports: [FileComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,19 @@ import {Observable} from 'rxjs';
|
|||||||
import {File} from '../../../../services/file';
|
import {File} from '../../../../services/file';
|
||||||
import {faTrashAlt} from '@fortawesome/free-solid-svg-icons';
|
import {faTrashAlt} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {FileService} from '../../../../services/file.service';
|
import {FileService} from '../../../../services/file.service';
|
||||||
|
import { MatIconButton } from '@angular/material/button';
|
||||||
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { AsyncPipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-file',
|
selector: 'app-file',
|
||||||
templateUrl: './file.component.html',
|
templateUrl: './file.component.html',
|
||||||
styleUrls: ['./file.component.less'],
|
styleUrls: ['./file.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
MatIconButton,
|
||||||
|
FaIconComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class FileComponent {
|
export class FileComponent {
|
||||||
public url$: Observable<string> | null = null;
|
public url$: Observable<string> | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('EditSongComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [EditSongComponent],
|
imports: [EditSongComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,64 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {Song} from '../../../services/song';
|
import {Song} from '../../../services/song';
|
||||||
import {UntypedFormGroup} from '@angular/forms';
|
import { UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {ActivatedRoute, Router, RouterStateSnapshot} from '@angular/router';
|
import {ActivatedRoute, Router, RouterStateSnapshot} from '@angular/router';
|
||||||
import {SongService} from '../../../services/song.service';
|
import {SongService} from '../../../services/song.service';
|
||||||
import {EditService} from '../edit.service';
|
import {EditService} from '../edit.service';
|
||||||
import {first, map, switchMap} from 'rxjs/operators';
|
import {first, map, switchMap} from 'rxjs/operators';
|
||||||
import {KEYS} from '../../../services/key.helper';
|
import {KEYS} from '../../../services/key.helper';
|
||||||
import {COMMA, ENTER} from '@angular/cdk/keycodes';
|
import {COMMA, ENTER} from '@angular/cdk/keycodes';
|
||||||
import {MatChipInputEvent} from '@angular/material/chips';
|
import { MatChipInputEvent, MatChipGrid, MatChipRow, MatChipInput } from '@angular/material/chips';
|
||||||
import {faExternalLinkAlt, faSave, faTimesCircle} from '@fortawesome/free-solid-svg-icons';
|
import {faExternalLinkAlt, faSave, faTimesCircle} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {MatDialog} from '@angular/material/dialog';
|
import {MatDialog} from '@angular/material/dialog';
|
||||||
import {SaveDialogComponent} from './save-dialog/save-dialog.component';
|
import {SaveDialogComponent} from './save-dialog/save-dialog.component';
|
||||||
|
import { NgIf, NgFor } from '@angular/common';
|
||||||
|
import { CardComponent } from '../../../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { MatSelect } from '@angular/material/select';
|
||||||
|
import { MatOption } from '@angular/material/core';
|
||||||
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||||
|
import { SongTextComponent } from '../../../../../widget-modules/components/song-text/song-text.component';
|
||||||
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { MatTooltip } from '@angular/material/tooltip';
|
||||||
|
import { ButtonRowComponent } from '../../../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../../../widget-modules/components/button/button.component';
|
||||||
|
import { SongTypePipe } from '../../../../../widget-modules/pipes/song-type-translater/song-type.pipe';
|
||||||
|
import { LegalOwnerPipe } from '../../../../../widget-modules/pipes/legal-owner-translator/legal-owner.pipe';
|
||||||
|
import { LegalTypePipe } from '../../../../../widget-modules/pipes/legal-type-translator/legal-type.pipe';
|
||||||
|
import { KeyPipe } from '../../../../../widget-modules/pipes/key-translator/key.pipe';
|
||||||
|
import { StatusPipe } from '../../../../../widget-modules/pipes/status-translater/status.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit-song',
|
selector: 'app-edit-song',
|
||||||
templateUrl: './edit-song.component.html',
|
templateUrl: './edit-song.component.html',
|
||||||
styleUrls: ['./edit-song.component.less'],
|
styleUrls: ['./edit-song.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
CardComponent,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
MatSelect,
|
||||||
|
NgFor,
|
||||||
|
MatOption,
|
||||||
|
CdkTextareaAutosize,
|
||||||
|
SongTextComponent,
|
||||||
|
MatChipGrid,
|
||||||
|
MatChipRow,
|
||||||
|
FaIconComponent,
|
||||||
|
MatChipInput,
|
||||||
|
MatSuffix,
|
||||||
|
MatTooltip,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
SongTypePipe,
|
||||||
|
LegalOwnerPipe,
|
||||||
|
LegalTypePipe,
|
||||||
|
KeyPipe,
|
||||||
|
StatusPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class EditSongComponent implements OnInit {
|
export class EditSongComponent implements OnInit {
|
||||||
public song: Song | null = null;
|
public song: Song | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('SaveDialogComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [SaveDialogComponent],
|
declarations: [SaveDialogComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('EditComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [EditComponent],
|
imports: [EditComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
import {Component, ViewChild} from '@angular/core';
|
import {Component, ViewChild} from '@angular/core';
|
||||||
import {EditSongComponent} from './edit-song/edit-song.component';
|
import {EditSongComponent} from './edit-song/edit-song.component';
|
||||||
|
import { EditFileComponent } from './edit-file/edit-file.component';
|
||||||
|
import { HistoryComponent } from './history/history.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit',
|
selector: 'app-edit',
|
||||||
templateUrl: './edit.component.html',
|
templateUrl: './edit.component.html',
|
||||||
styleUrls: ['./edit.component.less'],
|
styleUrls: ['./edit.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
EditSongComponent,
|
||||||
|
EditFileComponent,
|
||||||
|
HistoryComponent,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class EditComponent {
|
export class EditComponent {
|
||||||
@ViewChild(EditSongComponent) public editSongComponent: EditSongComponent | null = null;
|
@ViewChild(EditSongComponent) public editSongComponent: EditSongComponent | null = null;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {EditComponent} from './edit.component';
|
import {EditComponent} from './edit.component';
|
||||||
import {CardModule} from '../../../../widget-modules/components/card/card.module';
|
|
||||||
import {ReactiveFormsModule} from '@angular/forms';
|
import {ReactiveFormsModule} from '@angular/forms';
|
||||||
import {MatInputModule} from '@angular/material/input';
|
import {MatInputModule} from '@angular/material/input';
|
||||||
import {MatCheckboxModule} from '@angular/material/checkbox';
|
import {MatCheckboxModule} from '@angular/material/checkbox';
|
||||||
import {MatSelectModule} from '@angular/material/select';
|
import {MatSelectModule} from '@angular/material/select';
|
||||||
import {MatButtonModule} from '@angular/material/button';
|
import {MatButtonModule} from '@angular/material/button';
|
||||||
import {ButtonRowModule} from '../../../../widget-modules/components/button-row/button-row.module';
|
|
||||||
import {RouterModule} from '@angular/router';
|
import {RouterModule} from '@angular/router';
|
||||||
import {EditSongComponent} from './edit-song/edit-song.component';
|
import {EditSongComponent} from './edit-song/edit-song.component';
|
||||||
import {EditFileComponent} from './edit-file/edit-file.component';
|
import {EditFileComponent} from './edit-file/edit-file.component';
|
||||||
@@ -15,7 +15,7 @@ import {MatIconModule} from '@angular/material/icon';
|
|||||||
import {FileComponent} from './edit-file/file/file.component';
|
import {FileComponent} from './edit-file/file/file.component';
|
||||||
import {MatChipsModule} from '@angular/material/chips';
|
import {MatChipsModule} from '@angular/material/chips';
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||||
import {ButtonModule} from '../../../../widget-modules/components/button/button.module';
|
|
||||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||||
import {SaveDialogComponent} from './edit-song/save-dialog/save-dialog.component';
|
import {SaveDialogComponent} from './edit-song/save-dialog/save-dialog.component';
|
||||||
import {MatDialogModule} from '@angular/material/dialog';
|
import {MatDialogModule} from '@angular/material/dialog';
|
||||||
@@ -28,22 +28,18 @@ import {SongTypePipe} from '../../../../widget-modules/pipes/song-type-translate
|
|||||||
import {StatusPipe} from '../../../../widget-modules/pipes/status-translater/status.pipe';
|
import {StatusPipe} from '../../../../widget-modules/pipes/status-translater/status.pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [EditComponent, EditSongComponent, EditFileComponent, FileComponent, SaveDialogComponent, HistoryComponent],
|
declarations: [SaveDialogComponent],
|
||||||
exports: [EditComponent],
|
exports: [EditComponent],
|
||||||
bootstrap: [SaveDialogComponent],
|
bootstrap: [SaveDialogComponent],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
CardModule,
|
|
||||||
SongTypePipe,
|
SongTypePipe,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
RouterModule,
|
RouterModule,
|
||||||
|
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
MatCheckboxModule,
|
MatCheckboxModule,
|
||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
ButtonRowModule,
|
|
||||||
|
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
LegalOwnerPipe,
|
LegalOwnerPipe,
|
||||||
LegalTypePipe,
|
LegalTypePipe,
|
||||||
@@ -51,10 +47,10 @@ import {StatusPipe} from '../../../../widget-modules/pipes/status-translater/sta
|
|||||||
MatChipsModule,
|
MatChipsModule,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
StatusPipe,
|
StatusPipe,
|
||||||
ButtonModule,
|
|
||||||
MatTooltipModule,
|
MatTooltipModule,
|
||||||
MatDialogModule,
|
MatDialogModule,
|
||||||
SongTextComponent,
|
SongTextComponent,
|
||||||
],
|
EditComponent, EditSongComponent, EditFileComponent, FileComponent, HistoryComponent,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class EditModule {}
|
export class EditModule {}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('HistoryComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [HistoryComponent],
|
imports: [HistoryComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,19 @@ import {first, map, switchMap} from 'rxjs/operators';
|
|||||||
import {ActivatedRoute} from '@angular/router';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
import {SongService} from '../../../services/song.service';
|
import {SongService} from '../../../services/song.service';
|
||||||
import {Song} from '../../../services/song';
|
import {Song} from '../../../services/song';
|
||||||
|
import { NgIf, NgFor, DatePipe } from '@angular/common';
|
||||||
|
import { CardComponent } from '../../../../../widget-modules/components/card/card.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-history',
|
selector: 'app-history',
|
||||||
templateUrl: './history.component.html',
|
templateUrl: './history.component.html',
|
||||||
styleUrls: ['./history.component.less'],
|
styleUrls: ['./history.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
CardComponent,
|
||||||
|
NgFor,
|
||||||
|
DatePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class HistoryComponent implements OnInit {
|
export class HistoryComponent implements OnInit {
|
||||||
public song: Song | null = null;
|
public song: Song | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('FileComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [FileComponent],
|
imports: [FileComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,13 @@ import {Component, Input} from '@angular/core';
|
|||||||
import {File} from '../../services/file';
|
import {File} from '../../services/file';
|
||||||
import {AngularFireStorage} from '@angular/fire/compat/storage';
|
import {AngularFireStorage} from '@angular/fire/compat/storage';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
|
import { AsyncPipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-file',
|
selector: 'app-file',
|
||||||
templateUrl: './file.component.html',
|
templateUrl: './file.component.html',
|
||||||
styleUrls: ['./file.component.less'],
|
styleUrls: ['./file.component.less'],
|
||||||
standalone: false,
|
imports: [AsyncPipe],
|
||||||
})
|
})
|
||||||
export class FileComponent {
|
export class FileComponent {
|
||||||
public url$: Observable<string> | null = null;
|
public url$: Observable<string> | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('NewComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [NewComponent],
|
imports: [NewComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,29 @@
|
|||||||
import {Component, OnDestroy, OnInit} from '@angular/core';
|
import {Component, OnDestroy, OnInit} from '@angular/core';
|
||||||
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
import {faSave} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
import { UntypedFormControl, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {SongService} from '../../services/song.service';
|
import {SongService} from '../../services/song.service';
|
||||||
import {Song} from '../../services/song';
|
import {Song} from '../../services/song';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
import {Subscription} from 'rxjs';
|
import {Subscription} from 'rxjs';
|
||||||
|
import { CardComponent } from '../../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { ButtonRowComponent } from '../../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../../widget-modules/components/button/button.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-new',
|
selector: 'app-new',
|
||||||
templateUrl: './new.component.html',
|
templateUrl: './new.component.html',
|
||||||
styleUrls: ['./new.component.less'],
|
styleUrls: ['./new.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
CardComponent,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class NewComponent implements OnInit, OnDestroy {
|
export class NewComponent implements OnInit, OnDestroy {
|
||||||
public faSave = faSave;
|
public faSave = faSave;
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {NewComponent} from './new.component';
|
|
||||||
import {CardModule} from '../../../../widget-modules/components/card/card.module';
|
|
||||||
import {ReactiveFormsModule} from '@angular/forms';
|
|
||||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
|
||||||
import {MatInputModule} from '@angular/material/input';
|
|
||||||
import {ButtonRowModule} from '../../../../widget-modules/components/button-row/button-row.module';
|
|
||||||
import {ButtonModule} from '../../../../widget-modules/components/button/button.module';
|
|
||||||
import {AutofocusModule} from '../../../../widget-modules/directives/autofocus/autofocus.module';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [NewComponent],
|
|
||||||
imports: [CommonModule, CardModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, ButtonRowModule, ButtonModule, AutofocusModule],
|
|
||||||
})
|
|
||||||
export class NewModule {
|
|
||||||
}
|
|
||||||
@@ -15,9 +15,9 @@ describe('SongComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [SongComponent],
|
imports: [SongComponent],
|
||||||
providers: [{provide: ActivatedRoute, useValue: mockActivatedRoute}],
|
providers: [{ provide: ActivatedRoute, useValue: mockActivatedRoute }],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||||
import {SongService} from '../services/song.service';
|
import {SongService} from '../services/song.service';
|
||||||
import {distinctUntilChanged, map, switchMap} from 'rxjs/operators';
|
import {distinctUntilChanged, map, switchMap} from 'rxjs/operators';
|
||||||
import {Song} from '../services/song';
|
import {Song} from '../services/song';
|
||||||
@@ -12,12 +12,45 @@ import {faEdit, faFileCirclePlus, faTrash} from '@fortawesome/free-solid-svg-ico
|
|||||||
import {ShowService} from '../../shows/services/show.service';
|
import {ShowService} from '../../shows/services/show.service';
|
||||||
import {Show} from '../../shows/services/show';
|
import {Show} from '../../shows/services/show';
|
||||||
import {ShowSongService} from '../../shows/services/show-song.service';
|
import {ShowSongService} from '../../shows/services/show-song.service';
|
||||||
|
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { RoleDirective } from '../../../services/user/role.directive';
|
||||||
|
import { SongTextComponent } from '../../../widget-modules/components/song-text/song-text.component';
|
||||||
|
import { MatChipListbox, MatChipOption } from '@angular/material/chips';
|
||||||
|
import { ButtonRowComponent } from '../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../widget-modules/components/button/button.component';
|
||||||
|
import { MatMenuTrigger, MatMenu } from '@angular/material/menu';
|
||||||
|
import { FileComponent } from './file/file.component';
|
||||||
|
import { SongTypePipe } from '../../../widget-modules/pipes/song-type-translater/song-type.pipe';
|
||||||
|
import { LegalOwnerPipe } from '../../../widget-modules/pipes/legal-owner-translator/legal-owner.pipe';
|
||||||
|
import { StatusPipe } from '../../../widget-modules/pipes/status-translater/status.pipe';
|
||||||
|
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-song',
|
selector: 'app-song',
|
||||||
templateUrl: './song.component.html',
|
templateUrl: './song.component.html',
|
||||||
styleUrls: ['./song.component.less'],
|
styleUrls: ['./song.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
CardComponent,
|
||||||
|
RoleDirective,
|
||||||
|
SongTextComponent,
|
||||||
|
MatChipListbox,
|
||||||
|
NgFor,
|
||||||
|
MatChipOption,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
RouterLink,
|
||||||
|
MatMenuTrigger,
|
||||||
|
MatMenu,
|
||||||
|
FileComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
DatePipe,
|
||||||
|
SongTypePipe,
|
||||||
|
LegalOwnerPipe,
|
||||||
|
StatusPipe,
|
||||||
|
ShowTypePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class SongComponent implements OnInit {
|
export class SongComponent implements OnInit {
|
||||||
public song$: Observable<Song | null> | null = null;
|
public song$: Observable<Song | null> | null = null;
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {SongComponent} from './song.component';
|
|
||||||
import {CardModule} from '../../../widget-modules/components/card/card.module';
|
|
||||||
import {MatButtonModule} from '@angular/material/button';
|
|
||||||
import {ButtonRowModule} from '../../../widget-modules/components/button-row/button-row.module';
|
|
||||||
import {RouterModule} from '@angular/router';
|
|
||||||
import {MatChipsModule} from '@angular/material/chips';
|
|
||||||
import {RoleModule} from '../../../services/user/role.module';
|
|
||||||
import {ButtonModule} from '../../../widget-modules/components/button/button.module';
|
|
||||||
import {FileComponent} from './file/file.component';
|
|
||||||
import {MatMenuModule} from '@angular/material/menu';
|
|
||||||
import {SongTextComponent} from '../../../widget-modules/components/song-text/song-text.component';
|
|
||||||
import {LegalOwnerPipe} from '../../../widget-modules/pipes/legal-owner-translator/legal-owner.pipe';
|
|
||||||
import {ShowTypePipe} from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
|
||||||
import {SongTypePipe} from '../../../widget-modules/pipes/song-type-translater/song-type.pipe';
|
|
||||||
import {StatusPipe} from '../../../widget-modules/pipes/status-translater/status.pipe';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [SongComponent, FileComponent],
|
|
||||||
exports: [SongComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
CardModule,
|
|
||||||
RouterModule,
|
|
||||||
|
|
||||||
SongTypePipe,
|
|
||||||
MatButtonModule,
|
|
||||||
ButtonRowModule,
|
|
||||||
LegalOwnerPipe,
|
|
||||||
SongTextComponent,
|
|
||||||
MatChipsModule,
|
|
||||||
RoleModule,
|
|
||||||
StatusPipe,
|
|
||||||
ButtonModule,
|
|
||||||
MatMenuModule,
|
|
||||||
ShowTypePipe,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class SongModule {}
|
|
||||||
@@ -2,14 +2,14 @@ import {NgModule} from '@angular/core';
|
|||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
|
|
||||||
import {SongsRoutingModule} from './songs-routing.module';
|
import {SongsRoutingModule} from './songs-routing.module';
|
||||||
import {SongListModule} from './song-list/song-list.module';
|
|
||||||
import {SongModule} from './song/song.module';
|
|
||||||
import {EditModule} from './song/edit/edit.module';
|
import {EditModule} from './song/edit/edit.module';
|
||||||
import {NewModule} from './song/new/new.module';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [],
|
declarations: [],
|
||||||
imports: [CommonModule, SongsRoutingModule, SongListModule, SongModule, EditModule, NewModule],
|
imports: [CommonModule, SongsRoutingModule, EditModule],
|
||||||
})
|
})
|
||||||
export class SongsModule {
|
export class SongsModule {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('InfoComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [InfoComponent],
|
imports: [InfoComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,39 @@ import {ChordMode} from '../../../widget-modules/components/song-text/song-text.
|
|||||||
import {faSignOutAlt} from '@fortawesome/free-solid-svg-icons';
|
import {faSignOutAlt} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {RolePipe} from './role.pipe';
|
import {RolePipe} from './role.pipe';
|
||||||
import {roles} from '../../../services/user/roles';
|
import {roles} from '../../../services/user/roles';
|
||||||
|
import { NgIf, AsyncPipe } from '@angular/common';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatFormField, MatLabel, MatHint } from '@angular/material/form-field';
|
||||||
|
import { MatSelect } from '@angular/material/select';
|
||||||
|
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||||
|
import { MatOption } from '@angular/material/core';
|
||||||
|
import { ButtonRowComponent } from '../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../widget-modules/components/button/button.component';
|
||||||
|
import { RouterLink } from '@angular/router';
|
||||||
|
import { RoleDirective } from '../../../services/user/role.directive';
|
||||||
|
import { UsersComponent } from './users/users.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-info',
|
selector: 'app-info',
|
||||||
templateUrl: './info.component.html',
|
templateUrl: './info.component.html',
|
||||||
styleUrls: ['./info.component.less'],
|
styleUrls: ['./info.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
CardComponent,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatSelect,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
FormsModule,
|
||||||
|
MatOption,
|
||||||
|
MatHint,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
RouterLink,
|
||||||
|
RoleDirective,
|
||||||
|
UsersComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class InfoComponent implements OnInit {
|
export class InfoComponent implements OnInit {
|
||||||
public user$: Observable<User | null> | null = null;
|
public user$: Observable<User | null> | null = null;
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
import {Pipe, PipeTransform} from '@angular/core';
|
import {Pipe, PipeTransform} from '@angular/core';
|
||||||
import {roles} from '../../../services/user/roles';
|
import {roles} from '../../../services/user/roles';
|
||||||
|
|
||||||
@Pipe({
|
@Pipe({ name: 'role', })
|
||||||
name: 'role',
|
|
||||||
standalone: false,
|
|
||||||
})
|
|
||||||
export class RolePipe implements PipeTransform {
|
export class RolePipe implements PipeTransform {
|
||||||
public transform(role: roles): string {
|
public transform(role: roles): string {
|
||||||
switch (role) {
|
switch (role) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('UserComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [UserComponent],
|
imports: [UserComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,34 @@ import {User} from '../../../../../services/user/user';
|
|||||||
import {UserService} from '../../../../../services/user/user.service';
|
import {UserService} from '../../../../../services/user/user.service';
|
||||||
import {ROLE_TYPES} from '../../../../../services/user/roles';
|
import {ROLE_TYPES} from '../../../../../services/user/roles';
|
||||||
import {faTimes} from '@fortawesome/free-solid-svg-icons';
|
import {faTimes} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { NgIf, NgFor } from '@angular/common';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||||
|
import { MatSelect } from '@angular/material/select';
|
||||||
|
import { MatOption } from '@angular/material/core';
|
||||||
|
import { MatIconButton } from '@angular/material/button';
|
||||||
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { RolePipe } from '../../role.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-user',
|
selector: 'app-user',
|
||||||
templateUrl: './user.component.html',
|
templateUrl: './user.component.html',
|
||||||
styleUrls: ['./user.component.less'],
|
styleUrls: ['./user.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
NgIf,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
FormsModule,
|
||||||
|
MatSelect,
|
||||||
|
NgFor,
|
||||||
|
MatOption,
|
||||||
|
MatIconButton,
|
||||||
|
FaIconComponent,
|
||||||
|
RolePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class UserComponent {
|
export class UserComponent {
|
||||||
public id = '';
|
public id = '';
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('UsersComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [UsersComponent],
|
imports: [UsersComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,22 @@ import {Component} from '@angular/core';
|
|||||||
import {UserService} from '../../../../services/user/user.service';
|
import {UserService} from '../../../../services/user/user.service';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
import {User} from '../../../../services/user/user';
|
import {User} from '../../../../services/user/user';
|
||||||
|
import { CardComponent } from '../../../../widget-modules/components/card/card.component';
|
||||||
|
import { NgFor, AsyncPipe } from '@angular/common';
|
||||||
|
import { UserComponent } from './user/user.component';
|
||||||
|
import { SortByPipe } from '../../../../widget-modules/pipes/sort-by/sort-by.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-users',
|
selector: 'app-users',
|
||||||
templateUrl: './users.component.html',
|
templateUrl: './users.component.html',
|
||||||
styleUrls: ['./users.component.less'],
|
styleUrls: ['./users.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
CardComponent,
|
||||||
|
NgFor,
|
||||||
|
UserComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
SortByPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class UsersComponent {
|
export class UsersComponent {
|
||||||
public users$: Observable<User[]>;
|
public users$: Observable<User[]>;
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
import {Pipe, PipeTransform} from '@angular/core';
|
import {Pipe, PipeTransform} from '@angular/core';
|
||||||
|
|
||||||
@Pipe({
|
@Pipe({ name: 'authMessage', })
|
||||||
name: 'authMessage',
|
|
||||||
standalone: false,
|
|
||||||
})
|
|
||||||
export class AuthMessagePipe implements PipeTransform {
|
export class AuthMessagePipe implements PipeTransform {
|
||||||
public transform(code: string): string {
|
public transform(code: string): string {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('LoginComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [LoginComponent],
|
imports: [LoginComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
import { UntypedFormControl, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {Router} from '@angular/router';
|
import { Router, RouterLink } from '@angular/router';
|
||||||
import {UserService} from '../../../services/user/user.service';
|
import {UserService} from '../../../services/user/user.service';
|
||||||
import {faSignInAlt, faUserPlus} from '@fortawesome/free-solid-svg-icons';
|
import {faSignInAlt, faUserPlus} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { LogoComponent } from '../../../widget-modules/components/logo/logo.component';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { NgIf } from '@angular/common';
|
||||||
|
import { MatButton } from '@angular/material/button';
|
||||||
|
import { AuthMessagePipe } from './auth-message.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
templateUrl: './login.component.html',
|
templateUrl: './login.component.html',
|
||||||
styleUrls: ['./login.component.less'],
|
styleUrls: ['./login.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
LogoComponent,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
NgIf,
|
||||||
|
MatButton,
|
||||||
|
RouterLink,
|
||||||
|
AuthMessagePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class LoginComponent implements OnInit {
|
export class LoginComponent implements OnInit {
|
||||||
public form: UntypedFormGroup = new UntypedFormGroup({
|
public form: UntypedFormGroup = new UntypedFormGroup({
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('LogoutComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [LogoutComponent],
|
imports: [LogoutComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,9 @@ import {Router} from '@angular/router';
|
|||||||
import {UserService} from '../../../services/user/user.service';
|
import {UserService} from '../../../services/user/user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-logout',
|
selector: 'app-logout',
|
||||||
templateUrl: './logout.component.html',
|
templateUrl: './logout.component.html',
|
||||||
styleUrls: ['./logout.component.less'],
|
styleUrls: ['./logout.component.less'],
|
||||||
standalone: false,
|
|
||||||
})
|
})
|
||||||
export class LogoutComponent implements AfterViewInit {
|
export class LogoutComponent implements AfterViewInit {
|
||||||
public constructor(private userService: UserService, private router: Router) {
|
public constructor(private userService: UserService, private router: Router) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('NewComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [NewComponent],
|
imports: [NewComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,26 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {UserService} from '../../../services/user/user.service';
|
import {UserService} from '../../../services/user/user.service';
|
||||||
import {faUserPlus} from '@fortawesome/free-solid-svg-icons';
|
import {faUserPlus} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { ButtonRowComponent } from '../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../widget-modules/components/button/button.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-new',
|
selector: 'app-new',
|
||||||
templateUrl: './new.component.html',
|
templateUrl: './new.component.html',
|
||||||
styleUrls: ['./new.component.less'],
|
styleUrls: ['./new.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
CardComponent,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class NewComponent implements OnInit {
|
export class NewComponent implements OnInit {
|
||||||
public form: UntypedFormGroup = this.fb.group({
|
public form: UntypedFormGroup = this.fb.group({
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('PasswordSendComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [PasswordSendComponent],
|
imports: [PasswordSendComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-password-send',
|
selector: 'app-password-send',
|
||||||
templateUrl: './password-send.component.html',
|
templateUrl: './password-send.component.html',
|
||||||
styleUrls: ['./password-send.component.less'],
|
styleUrls: ['./password-send.component.less'],
|
||||||
standalone: false,
|
imports: [CardComponent],
|
||||||
})
|
})
|
||||||
export class PasswordSendComponent {
|
export class PasswordSendComponent {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('PasswordComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [PasswordComponent],
|
imports: [PasswordComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,31 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
import { UntypedFormControl, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
import {UserService} from '../../../services/user/user.service';
|
import {UserService} from '../../../services/user/user.service';
|
||||||
import {faWindowRestore} from '@fortawesome/free-solid-svg-icons';
|
import {faWindowRestore} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||||
|
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||||
|
import { MatInput } from '@angular/material/input';
|
||||||
|
import { ButtonRowComponent } from '../../../widget-modules/components/button-row/button-row.component';
|
||||||
|
import { ButtonComponent } from '../../../widget-modules/components/button/button.component';
|
||||||
|
import { NgIf } from '@angular/common';
|
||||||
|
import { AuthMessagePipe } from '../login/auth-message.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-password',
|
selector: 'app-password',
|
||||||
templateUrl: './password.component.html',
|
templateUrl: './password.component.html',
|
||||||
styleUrls: ['./password.component.less'],
|
styleUrls: ['./password.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
CardComponent,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatFormField,
|
||||||
|
MatLabel,
|
||||||
|
MatInput,
|
||||||
|
ButtonRowComponent,
|
||||||
|
ButtonComponent,
|
||||||
|
NgIf,
|
||||||
|
AuthMessagePipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class PasswordComponent implements OnInit {
|
export class PasswordComponent implements OnInit {
|
||||||
public form: UntypedFormGroup = new UntypedFormGroup({
|
public form: UntypedFormGroup = new UntypedFormGroup({
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import {NgModule} from '@angular/core';
|
|||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {LoginComponent} from './login/login.component';
|
import {LoginComponent} from './login/login.component';
|
||||||
import {UserRoutingModule} from './user-routing.module';
|
import {UserRoutingModule} from './user-routing.module';
|
||||||
import {CardModule} from '../../widget-modules/components/card/card.module';
|
|
||||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
import {MatFormFieldModule} from '@angular/material/form-field';
|
||||||
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||||
import {MatInputModule} from '@angular/material/input';
|
import {MatInputModule} from '@angular/material/input';
|
||||||
import {ButtonRowModule} from '../../widget-modules/components/button-row/button-row.module';
|
|
||||||
import {MatButtonModule} from '@angular/material/button';
|
import {MatButtonModule} from '@angular/material/button';
|
||||||
import {AuthMessagePipe} from './login/auth-message.pipe';
|
import {AuthMessagePipe} from './login/auth-message.pipe';
|
||||||
import {InfoComponent} from './info/info.component';
|
import {InfoComponent} from './info/info.component';
|
||||||
@@ -16,32 +16,27 @@ import {MatSelectModule} from '@angular/material/select';
|
|||||||
import {PasswordComponent} from './password/password.component';
|
import {PasswordComponent} from './password/password.component';
|
||||||
import {PasswordSendComponent} from './password-send/password-send.component';
|
import {PasswordSendComponent} from './password-send/password-send.component';
|
||||||
import {UsersComponent} from './info/users/users.component';
|
import {UsersComponent} from './info/users/users.component';
|
||||||
import {RoleModule} from '../../services/user/role.module';
|
|
||||||
import {UserComponent} from './info/users/user/user.component';
|
import {UserComponent} from './info/users/user/user.component';
|
||||||
import {NewComponent} from './new/new.component';
|
import {NewComponent} from './new/new.component';
|
||||||
import {ButtonModule} from '../../widget-modules/components/button/button.module';
|
|
||||||
import {LogoModule} from '../../widget-modules/components/logo/logo.module';
|
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||||
import {SortByPipe} from '../../widget-modules/pipes/sort-by/sort-by.pipe';
|
import {SortByPipe} from '../../widget-modules/pipes/sort-by/sort-by.pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [LoginComponent, AuthMessagePipe, InfoComponent, LogoutComponent, RolePipe, PasswordComponent, PasswordSendComponent, UsersComponent, UserComponent, NewComponent],
|
imports: [
|
||||||
imports: [
|
|
||||||
CommonModule,
|
CommonModule,
|
||||||
UserRoutingModule,
|
UserRoutingModule,
|
||||||
CardModule,
|
|
||||||
MatFormFieldModule,
|
MatFormFieldModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
ButtonRowModule,
|
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
RoleModule,
|
|
||||||
ButtonModule,
|
|
||||||
LogoModule,
|
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
SortByPipe,
|
SortByPipe,
|
||||||
],
|
LoginComponent, AuthMessagePipe, InfoComponent, LogoutComponent, RolePipe, PasswordComponent, PasswordSendComponent, UsersComponent, UserComponent, NewComponent,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class UserModule {}
|
export class UserModule {}
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
import {Directive, ElementRef, Input, OnInit, TemplateRef, ViewContainerRef} from '@angular/core';
|
import {Directive, ElementRef, Input, OnInit, TemplateRef, ViewContainerRef} from '@angular/core';
|
||||||
import {UserService} from './user.service';
|
import {UserService} from './user.service';
|
||||||
|
|
||||||
@Directive({
|
@Directive({ selector: '[appOwner]', })
|
||||||
selector: '[appOwner]',
|
|
||||||
standalone: false,
|
|
||||||
})
|
|
||||||
export class OwnerDirective implements OnInit {
|
export class OwnerDirective implements OnInit {
|
||||||
private currentUserId: string | null = null;
|
private currentUserId: string | null = null;
|
||||||
private iAppOwner: string | null = null;
|
private iAppOwner: string | null = null;
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {OwnerDirective} from './owner.directive';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [OwnerDirective],
|
|
||||||
exports: [OwnerDirective],
|
|
||||||
imports: [CommonModule],
|
|
||||||
})
|
|
||||||
export class OwnerModule {
|
|
||||||
}
|
|
||||||
@@ -4,10 +4,7 @@ import {UserService} from './user.service';
|
|||||||
import {User} from './user';
|
import {User} from './user';
|
||||||
import {combineLatest} from 'rxjs';
|
import {combineLatest} from 'rxjs';
|
||||||
|
|
||||||
@Directive({
|
@Directive({ selector: '[appRole]', })
|
||||||
selector: '[appRole]',
|
|
||||||
standalone: false,
|
|
||||||
})
|
|
||||||
export class RoleDirective implements OnInit {
|
export class RoleDirective implements OnInit {
|
||||||
@Input() public appRole: roles[] = [];
|
@Input() public appRole: roles[] = [];
|
||||||
private currentUser: User | null = null;
|
private currentUser: User | null = null;
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {RoleDirective} from './role.directive';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [RoleDirective],
|
|
||||||
exports: [RoleDirective],
|
|
||||||
imports: [CommonModule],
|
|
||||||
})
|
|
||||||
export class RoleModule {
|
|
||||||
}
|
|
||||||
@@ -9,8 +9,8 @@ describe('UserNameComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [UserNameComponent],
|
imports: [UserNameComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,13 @@ import {Component, Input} from '@angular/core';
|
|||||||
import {UserService} from '../user.service';
|
import {UserService} from '../user.service';
|
||||||
import {map} from 'rxjs/operators';
|
import {map} from 'rxjs/operators';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
|
import { AsyncPipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-user-name',
|
selector: 'app-user-name',
|
||||||
templateUrl: './user-name.component.html',
|
templateUrl: './user-name.component.html',
|
||||||
styleUrls: ['./user-name.component.less'],
|
styleUrls: ['./user-name.component.less'],
|
||||||
standalone: false,
|
imports: [AsyncPipe],
|
||||||
})
|
})
|
||||||
export class UserNameComponent {
|
export class UserNameComponent {
|
||||||
public name$: Observable<string | null> | null = null;
|
public name$: Observable<string | null> | null = null;
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {UserNameComponent} from './user-name.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [UserNameComponent],
|
|
||||||
exports: [UserNameComponent],
|
|
||||||
imports: [CommonModule],
|
|
||||||
})
|
|
||||||
export class UserNameModule {
|
|
||||||
}
|
|
||||||
@@ -9,8 +9,8 @@ describe('AddSongComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [AddSongComponent],
|
imports: [AddSongComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from '@angular/common';
|
|
||||||
import {NavigationComponent} from './navigation/navigation.component';
|
|
||||||
import {RouterModule} from '@angular/router';
|
|
||||||
import {FilterComponent} from './navigation/filter/filter.component';
|
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
|
||||||
import {LinkComponent} from './navigation/link/link.component';
|
|
||||||
import {FormsModule} from '@angular/forms';
|
|
||||||
import {RoleModule} from '../../../services/user/role.module';
|
|
||||||
import {BrandComponent} from './navigation/brand/brand.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [NavigationComponent, FilterComponent, LinkComponent, BrandComponent],
|
|
||||||
imports: [CommonModule, RouterModule, FontAwesomeModule, FormsModule, RoleModule],
|
|
||||||
exports: [NavigationComponent],
|
|
||||||
})
|
|
||||||
export class ApplicationFrameModule {
|
|
||||||
}
|
|
||||||
@@ -9,8 +9,8 @@ describe('BrandComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [BrandComponent],
|
imports: [BrandComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-brand',
|
selector: 'app-brand',
|
||||||
templateUrl: './brand.component.html',
|
templateUrl: './brand.component.html',
|
||||||
styleUrls: ['./brand.component.less'],
|
styleUrls: ['./brand.component.less'],
|
||||||
standalone: false,
|
|
||||||
})
|
})
|
||||||
export class BrandComponent {
|
export class BrandComponent {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('FilterComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [FilterComponent],
|
imports: [FilterComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {ActivatedRoute, Params, Router} from '@angular/router';
|
import {ActivatedRoute, Params, Router} from '@angular/router';
|
||||||
|
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-filter',
|
selector: 'app-filter',
|
||||||
templateUrl: './filter.component.html',
|
templateUrl: './filter.component.html',
|
||||||
styleUrls: ['./filter.component.less'],
|
styleUrls: ['./filter.component.less'],
|
||||||
standalone: false,
|
imports: [ReactiveFormsModule, FormsModule],
|
||||||
})
|
})
|
||||||
export class FilterComponent {
|
export class FilterComponent {
|
||||||
public value = '';
|
public value = '';
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('LinkComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [LinkComponent],
|
imports: [LinkComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {IconProp} from '@fortawesome/fontawesome-svg-core';
|
import {IconProp} from '@fortawesome/fontawesome-svg-core';
|
||||||
import {faCross} from '@fortawesome/free-solid-svg-icons';
|
import {faCross} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { RouterLinkActive, RouterLink } from '@angular/router';
|
||||||
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-link',
|
selector: 'app-link',
|
||||||
templateUrl: './link.component.html',
|
templateUrl: './link.component.html',
|
||||||
styleUrls: ['./link.component.less'],
|
styleUrls: ['./link.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
RouterLinkActive,
|
||||||
|
RouterLink,
|
||||||
|
FaIconComponent,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class LinkComponent {
|
export class LinkComponent {
|
||||||
@Input() public text: string | null = null;
|
@Input() public text: string | null = null;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('NavigationComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [NavigationComponent],
|
imports: [NavigationComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,25 @@ import {Component} from '@angular/core';
|
|||||||
import {faChalkboard, faMusic, faPersonBooth, faUserCog} from '@fortawesome/free-solid-svg-icons';
|
import {faChalkboard, faMusic, faPersonBooth, faUserCog} from '@fortawesome/free-solid-svg-icons';
|
||||||
import {fromEvent, Observable} from 'rxjs';
|
import {fromEvent, Observable} from 'rxjs';
|
||||||
import {distinctUntilChanged, map, shareReplay, startWith} from 'rxjs/operators';
|
import {distinctUntilChanged, map, shareReplay, startWith} from 'rxjs/operators';
|
||||||
|
import { BrandComponent } from './brand/brand.component';
|
||||||
|
import { RouterLink } from '@angular/router';
|
||||||
|
import { RoleDirective } from '../../../../services/user/role.directive';
|
||||||
|
import { LinkComponent } from './link/link.component';
|
||||||
|
import { FilterComponent } from './filter/filter.component';
|
||||||
|
import { AsyncPipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-navigation',
|
selector: 'app-navigation',
|
||||||
templateUrl: './navigation.component.html',
|
templateUrl: './navigation.component.html',
|
||||||
styleUrls: ['./navigation.component.less'],
|
styleUrls: ['./navigation.component.less'],
|
||||||
standalone: false,
|
imports: [
|
||||||
|
BrandComponent,
|
||||||
|
RouterLink,
|
||||||
|
RoleDirective,
|
||||||
|
LinkComponent,
|
||||||
|
FilterComponent,
|
||||||
|
AsyncPipe,
|
||||||
|
],
|
||||||
})
|
})
|
||||||
export class NavigationComponent {
|
export class NavigationComponent {
|
||||||
public faSongs = faMusic;
|
public faSongs = faMusic;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ describe('ButtonRowComponent', () => {
|
|||||||
beforeEach(
|
beforeEach(
|
||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
void TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
declarations: [ButtonRowComponent],
|
imports: [ButtonRowComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user