Merge pull request #22 in TEA/dafa-web-monorepo from feature/TV-252-and-TV-255-login-sidor to develop
Squashed commit of the following: commit 39d7130c131ac7a7dda050e5894f4762e841627f Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 08:40:44 2021 +0200 Update mock-login.component.html commit 6012a7f526e3b9410a364c39a74e6c9a9ae2426a Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 9 10:59:35 2021 +0200 Fixat enligt kommentarer commit 3c76368b772f37498e419299554bcb4b5f519164 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 9 10:03:49 2021 +0200 Bytt ut jwt-referenser commit 853387f8cc18e38387bed50ed2d65342ec68dcc2 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 9 09:50:16 2021 +0200 merge with develop commit 553431a880f97eda948b13a2b967c8dee4cf9dd3 Merge: 8b1cca348801a9Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Jun 9 09:46:17 2021 +0200 Merge branch 'develop' into feature/TV-252-and-TV-255-login-sidor # Conflicts: # apps/dafa-web/src/app/data/models/employee.model.ts # apps/dafa-web/src/app/data/models/participant.model.ts # apps/dafa-web/src/app/data/models/sort.model.ts # apps/dafa-web/src/app/pages/administration/pages/employee-card/employee-card.component.ts # apps/dafa-web/src/app/pages/administration/pages/employees/components/employees-list/employees-list.component.ts # apps/dafa-web/src/app/pages/administration/pages/employees/employees.component.html # apps/dafa-web/src/app/services/api/employee.service.ts # apps/dafa-web/src/app/services/api/participants.service.ts # apps/dafa-web/src/app/services/api/user.service.ts # apps/dafa-web/src/app/utils/sort.util.ts # mock-api/dafa-web/server.js commit 8b1cca3553be37cb9bf68f67ae4612095e2b67d8 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 8 16:44:07 2021 +0200 fix basic styling at login and logout pages commit cdad17716bac1510d34c9d4bc8653455b6c16d24 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 8 16:34:12 2021 +0200 Bryter ut logged-in-shell commit bf294eefe448d3c708c6299154f376e264b53c81 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 8 16:14:18 2021 +0200 extract logged in shell to own component commit b44e6f0dc6e45f4f27fb4375ecfc59bc35ba745c Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 8 16:14:03 2021 +0200 auth interceptor commit 1540759b97afe18b47d86ea5f33d5cc29663ba3a Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 8 15:05:41 2021 +0200 lägg till skelett för ciam landing sida och en mock-login-sida commit d211f7cdb46bea0d9ac1d6400c7171b924ddff77 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 8 15:03:59 2021 +0200 return singular token commit e0e725cee778d488fd3ec467d28592c1c8e9e3eb Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Jun 8 14:20:36 2021 +0200 add auth check and an API to get the token http://localhost:4200/api/get-token?code=auth_code_from_CIAM_with_all_permissions commit 4055d3a14eda9737ef76ed5e85ea35480e19e71c Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Jun 7 15:20:26 2021 +0200 updates after PR comments commit f515ed6d06087f62de7522745691429d7ca91153 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Jun 7 12:07:50 2021 +0200 Now using Sort interface again commit 5c793a5a7579a520c3792bb3d13c00bb68dbfcd4 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Jun 7 11:54:27 2021 +0200 Fixed bug showing wrong amount in pagination component commit 7c55751147e05c1279b75356dc143b069e63e6b2 Merge: 11eab63a701888Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Jun 7 11:42:59 2021 +0200 Updated after merge with develop commit 11eab6330191a140c2cfd7094838495793e02719 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Jun 7 11:23:52 2021 +0200 Added functionality to sort on different columns commit f13422a2aa53a69a243f32f9cd0b7ed6bd3441fc Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Fri Jun 4 11:40:22 2021 +0200 Fixed other mappings after changes in the mock-api commit ba2d3200167281422354f5e3cfdf7720444a9c4c Merge: 6232b32d91b3e6Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Fri Jun 4 10:00:00 2021 +0200 Added paging functionality commit 6232b3274ff73f2da929342a244fbc87430b796f Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Fri Jun 4 09:25:01 2021 +0200 Added meta model and changed services to adapt new API data structure ... and 1 more commit
This commit is contained in:
+3
@@ -1,3 +1,5 @@
|
||||
<dafa-logged-in-shell>
|
||||
|
||||
<section class="employee-card">
|
||||
<digi-typography *ngIf="detailedEmployeeData$ | async as detailedEmployeeData; else loadingRef">
|
||||
<h1>{{ detailedEmployeeData.fullName }}</h1>
|
||||
@@ -102,3 +104,4 @@
|
||||
<span class="dafa__a11y-sr-only">Info saknas</span>
|
||||
</dd>
|
||||
</ng-template>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { LocalDatePipeModule } from '@dafa-shared/pipes/local-date/local-date.module';
|
||||
import { EmployeeCardComponent } from './employee-card.component';
|
||||
import { LoggedInShellModule } from '../../../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
@@ -15,6 +16,7 @@ import { EmployeeCardComponent } from './employee-card.component';
|
||||
DigiNgSkeletonBaseModule,
|
||||
DigiNgLayoutExpansionPanelModule,
|
||||
LocalDatePipeModule,
|
||||
LoggedInShellModule
|
||||
],
|
||||
})
|
||||
export class EmployeeCardModule {}
|
||||
|
||||
+3
-1
@@ -1,4 +1,5 @@
|
||||
<section class="employee-form">
|
||||
<dafa-logged-in-shell>
|
||||
<section class="employee-form">
|
||||
<digi-typography>
|
||||
<h1>Skapa nytt konto</h1>
|
||||
<p>
|
||||
@@ -117,3 +118,4 @@
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
+3
-1
@@ -10,6 +10,7 @@ import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { LocalDatePipeModule } from '@dafa-shared/pipes/local-date/local-date.module';
|
||||
import { EmployeeFormComponent } from './employee-form.component';
|
||||
import { LoggedInShellModule } from '../../../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
@@ -25,6 +26,7 @@ import { EmployeeFormComponent } from './employee-form.component';
|
||||
DigiNgFormSelectModule,
|
||||
DigiNgPopoverModule,
|
||||
DigiNgFormCheckboxModule,
|
||||
],
|
||||
LoggedInShellModule
|
||||
]
|
||||
})
|
||||
export class EmployeeFormModule {}
|
||||
|
||||
+35
-33
@@ -1,38 +1,40 @@
|
||||
<section class="employees">
|
||||
<digi-typography>
|
||||
<h1>Personal</h1>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam magna neque, interdum vel massa eget, condimentum
|
||||
rutrum velit. Sed vitae ullamcorper sem. Aliquam malesuada nunc sed purus mollis scelerisque. Curabitur bibendum
|
||||
leo quis ante porttitor tincidunt. Nam tincidunt imperdiet tortor eu suscipit. Maecenas ut dui est.
|
||||
</p>
|
||||
<dafa-logged-in-shell>
|
||||
<section class="employees">
|
||||
<digi-typography>
|
||||
<h1>Personal</h1>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam magna neque, interdum vel massa eget, condimentum
|
||||
rutrum velit. Sed vitae ullamcorper sem. Aliquam malesuada nunc sed purus mollis scelerisque. Curabitur bibendum
|
||||
leo quis ante porttitor tincidunt. Nam tincidunt imperdiet tortor eu suscipit. Maecenas ut dui est.
|
||||
</p>
|
||||
|
||||
<div class="employees__cta-wrapper">
|
||||
<digi-ng-link-button afText="Skapa nytt konto" afRoute="/administration/skapa-konto"></digi-ng-link-button>
|
||||
</div>
|
||||
<div class="employees__cta-wrapper">
|
||||
<digi-ng-link-button afText="Skapa nytt konto" afRoute="/administration/skapa-konto"></digi-ng-link-button>
|
||||
</div>
|
||||
|
||||
<h2>Personallista</h2>
|
||||
<h2>Personallista</h2>
|
||||
|
||||
<form class="employees__search-wrapper" (ngSubmit)="handleSearchSubmit()">
|
||||
<digi-form-input-search
|
||||
af-label="Sök personal"
|
||||
af-label-description="Sök på namn"
|
||||
(afOnInput)="handleSearchInput($event)"
|
||||
></digi-form-input-search>
|
||||
</form>
|
||||
<form class="employees__search-wrapper" (ngSubmit)="handleSearchSubmit()">
|
||||
<digi-form-input-search
|
||||
af-label="Sök personal"
|
||||
af-label-description="Sök på namn"
|
||||
(afOnInput)="handleSearchInput($event)"
|
||||
></digi-form-input-search>
|
||||
</form>
|
||||
|
||||
<dafa-employees-list
|
||||
*ngIf="employeesData$ | async as employeesData; else loadingRef"
|
||||
[employees]="employeesData.data"
|
||||
[meta]="employeesData.meta"
|
||||
[sort]="sort$ | async"
|
||||
[order]="order$ | async"
|
||||
(sorted)="handleEmployeesSort($event)"
|
||||
(paginated)="setNewPage($event)"
|
||||
></dafa-employees-list>
|
||||
</digi-typography>
|
||||
<dafa-employees-list
|
||||
*ngIf="employeesData$ | async as employeesData; else loadingRef"
|
||||
[employees]="employeesData.data"
|
||||
[meta]="employeesData.meta"
|
||||
[sort]="sort$ | async"
|
||||
[order]="order$ | async"
|
||||
(sorted)="handleEmployeesSort($event)"
|
||||
(paginated)="setNewPage($event)"
|
||||
></dafa-employees-list>
|
||||
</digi-typography>
|
||||
|
||||
<ng-template #loadingRef>
|
||||
<digi-ng-skeleton-base [afCount]="3" afText="Laddar personal"></digi-ng-skeleton-base>
|
||||
</ng-template>
|
||||
</section>
|
||||
<ng-template #loadingRef>
|
||||
<digi-ng-skeleton-base [afCount]="3" afText="Laddar personal"></digi-ng-skeleton-base>
|
||||
</ng-template>
|
||||
</section>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { EmployeesListModule } from './components/employees-list/employees-list.module';
|
||||
import { EmployeesComponent } from './employees.component';
|
||||
import { LoggedInShellModule } from '../../../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
@@ -19,6 +20,7 @@ import { EmployeesComponent } from './employees.component';
|
||||
EmployeesListModule,
|
||||
DigiNgLinkButtonModule,
|
||||
FormsModule,
|
||||
],
|
||||
LoggedInShellModule
|
||||
]
|
||||
})
|
||||
export class EmployeesModule {}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<section class="call-off">Avrop funkar!</section>
|
||||
<dafa-logged-in-shell><section class="call-off">Avrop funkar!</section></dafa-logged-in-shell>
|
||||
|
||||
@@ -2,9 +2,10 @@ import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { CallOffComponent } from './call-off.component';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [CallOffComponent],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: CallOffComponent }])],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: CallOffComponent }]), LoggedInShellModule]
|
||||
})
|
||||
export class CallOffModule {}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<digi-typography>
|
||||
<section class="releases">
|
||||
<h1>Ciam landing</h1>
|
||||
|
||||
<p>Redirecting to /......</p>
|
||||
</section>
|
||||
</digi-typography>
|
||||
@@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { CiamLandingComponent } from './ciam-landing.component';
|
||||
|
||||
describe('ReleasesComponent', () => {
|
||||
let component: CiamLandingComponent;
|
||||
let fixture: ComponentFixture<CiamLandingComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
|
||||
declarations: [CiamLandingComponent],
|
||||
}).compileComponents();
|
||||
})
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CiamLandingComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,38 @@
|
||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { first, map, switchMap } from 'rxjs/operators';
|
||||
import { AuthenticationService } from '@dafa-services/api/authentication.service';
|
||||
|
||||
@Component({
|
||||
selector: 'dafa-ciam-landing',
|
||||
templateUrl: './ciam-landing.component.html',
|
||||
styleUrls: ['./ciam-landing.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class CiamLandingComponent implements OnInit {
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private authenticationService: AuthenticationService
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.queryParams.pipe(
|
||||
first(),
|
||||
map(({code}) => {
|
||||
if (!code) {
|
||||
throw new Error('Expected CIAM to return \'code\' in queryparams.');
|
||||
}
|
||||
return code as string;
|
||||
}),
|
||||
switchMap(code => {
|
||||
return this.authenticationService.login$(code)
|
||||
}))
|
||||
.subscribe(() => {
|
||||
this.router.navigateByUrl('/')
|
||||
})
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { CiamLandingComponent } from './ciam-landing.component';
|
||||
import { DigiNgButtonModule } from '@af/digi-ng/_button/button';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [CiamLandingComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild([{ path: '', component: CiamLandingComponent }]),
|
||||
DigiNgButtonModule
|
||||
]
|
||||
})
|
||||
export class CiamLandingModule {}
|
||||
@@ -0,0 +1,8 @@
|
||||
<digi-typography>
|
||||
<section class="logout">
|
||||
<h1>Du har nu loggats ut</h1>
|
||||
<p>
|
||||
<a [routerLink]="loginUrl">Logga in</a>
|
||||
</p>
|
||||
</section>
|
||||
</digi-typography>
|
||||
@@ -0,0 +1,3 @@
|
||||
.logout {
|
||||
margin: 3rem;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { LogoutComponent } from './logout.component';
|
||||
|
||||
describe('ReleasesComponent', () => {
|
||||
let component: LogoutComponent;
|
||||
let fixture: ComponentFixture<LogoutComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
|
||||
declarations: [LogoutComponent],
|
||||
}).compileComponents();
|
||||
})
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LogoutComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { environment } from '@dafa-environment';
|
||||
import { AuthenticationService } from '@dafa-services/api/authentication.service';
|
||||
|
||||
@Component({
|
||||
selector: 'dafa-logout',
|
||||
templateUrl: './logout.component.html',
|
||||
styleUrls: ['./logout.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class LogoutComponent implements OnInit {
|
||||
loginUrl = environment.loginUrl;
|
||||
|
||||
constructor(
|
||||
private authenticationService: AuthenticationService
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.authenticationService.logout();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { LogoutComponent } from './logout.component';
|
||||
import { DigiNgButtonModule } from '@af/digi-ng/_button/button';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [LogoutComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild([{ path: '', component: LogoutComponent }]),
|
||||
DigiNgButtonModule
|
||||
]
|
||||
})
|
||||
export class LogoutModule {}
|
||||
@@ -1 +1,4 @@
|
||||
|
||||
<dafa-logged-in-shell>
|
||||
<section class="messages">Meddelanden funkar!</section>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -2,9 +2,10 @@ import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { MessagesComponent } from './messages.component';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [MessagesComponent],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: MessagesComponent }])],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: MessagesComponent }]), LoggedInShellModule]
|
||||
})
|
||||
export class MessagesModule {}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<digi-typography>
|
||||
<section class="login__wrapper">
|
||||
<h1>Mock login</h1>
|
||||
<p>Simulera att man loggar in och blir redirectad till /ciam-landing med en Authorization-code som sedan används för att hämta authentication-token:</p>
|
||||
<digi-ng-button [routerLink]="'/ciam-landing'" [queryParams]="{code: 'auth_code_from_CIAM_with_all_permissions'}">
|
||||
Logga in med fullständiga rättigheter
|
||||
</digi-ng-button>
|
||||
</section>
|
||||
</digi-typography>
|
||||
@@ -0,0 +1,3 @@
|
||||
.login__wrapper {
|
||||
margin: 5rem;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { MockLoginComponent } from './mock-login.component';
|
||||
|
||||
describe('ReleasesComponent', () => {
|
||||
let component: MockLoginComponent;
|
||||
let fixture: ComponentFixture<MockLoginComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
|
||||
declarations: [MockLoginComponent],
|
||||
}).compileComponents();
|
||||
})
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(MockLoginComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'dafa-mock-login',
|
||||
templateUrl: './mock-login.component.html',
|
||||
styleUrls: ['./mock-login.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class MockLoginComponent {}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { MockLoginComponent } from './mock-login.component';
|
||||
import { DigiNgButtonModule } from '@af/digi-ng/_button/button';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [MockLoginComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild([{ path: '', component: MockLoginComponent }]),
|
||||
DigiNgButtonModule
|
||||
]
|
||||
})
|
||||
export class MockLoginModule {}
|
||||
@@ -1,3 +1,4 @@
|
||||
<dafa-logged-in-shell>
|
||||
<digi-typography>
|
||||
<section class="page-not-found">
|
||||
<h1>Oj då! Vi kan inte hitta sidan.</h1>
|
||||
@@ -8,3 +9,4 @@
|
||||
</a>
|
||||
</section>
|
||||
</digi-typography>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -2,10 +2,11 @@ import { CommonModule } from '@angular/common';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { PageNotFoundComponent } from './page-not-found.component';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [PageNotFoundComponent],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: PageNotFoundComponent }])],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: PageNotFoundComponent }]), LoggedInShellModule]
|
||||
})
|
||||
export class PageNotFoundModule {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<dafa-logged-in-shell>
|
||||
<section class="participants">
|
||||
<digi-typography>
|
||||
<h1>Mina deltagare</h1>
|
||||
@@ -40,3 +41,4 @@
|
||||
<digi-ng-skeleton-base [afCount]="3" afText="Laddar deltagare"></digi-ng-skeleton-base>
|
||||
</ng-template>
|
||||
</section>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { ParticipantsListModule } from './components/participants-list/participants-list.module';
|
||||
import { ParticipantsComponent } from './participants.component';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
@@ -15,6 +16,7 @@ import { ParticipantsComponent } from './participants.component';
|
||||
FormsModule,
|
||||
DigiNgSkeletonBaseModule,
|
||||
ParticipantsListModule,
|
||||
],
|
||||
LoggedInShellModule
|
||||
]
|
||||
})
|
||||
export class ParticipantsModule {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<dafa-logged-in-shell>
|
||||
<digi-typography>
|
||||
<section class="releases">
|
||||
<h1>Releaser</h1>
|
||||
@@ -8,3 +9,4 @@
|
||||
<markdown src="assets/CHANGELOG.md"></markdown>
|
||||
</section>
|
||||
</digi-typography>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { MarkdownModule } from 'ngx-markdown';
|
||||
import { ReleasesComponent } from './releases.component';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
@@ -11,6 +12,7 @@ import { ReleasesComponent } from './releases.component';
|
||||
CommonModule,
|
||||
MarkdownModule.forChild(),
|
||||
RouterModule.forChild([{ path: '', component: ReleasesComponent }]),
|
||||
],
|
||||
LoggedInShellModule
|
||||
]
|
||||
})
|
||||
export class ReleasesModule {}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
<dafa-logged-in-shell>
|
||||
<section class="settings">Inställningar funkar!</section>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -2,9 +2,10 @@ import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { SettingsComponent } from './settings.component';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [SettingsComponent],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: SettingsComponent }])],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: SettingsComponent }]), LoggedInShellModule]
|
||||
})
|
||||
export class SettingsModule {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<dafa-logged-in-shell>
|
||||
<section class="start">
|
||||
<digi-typography>
|
||||
<h1>Välkommen till Mina Sidor FA</h1>
|
||||
@@ -32,3 +33,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { StartComponent } from './start.component';
|
||||
import { DigiNgCardModule } from '@af/digi-ng/_card/card';
|
||||
import { DigiNgNotificationAlertModule } from '@af/digi-ng/_notification/notification-alert';
|
||||
import { DigiNgLinkInternalModule } from '@af/digi-ng/_link/link-internal';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
@@ -15,6 +16,7 @@ import { DigiNgLinkInternalModule } from '@af/digi-ng/_link/link-internal';
|
||||
DigiNgCardModule,
|
||||
DigiNgNotificationAlertModule,
|
||||
DigiNgLinkInternalModule,
|
||||
],
|
||||
LoggedInShellModule
|
||||
]
|
||||
})
|
||||
export class StartModule {}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
<section class="statistics">Statistik funkar!</section>
|
||||
<dafa-logged-in-shell>
|
||||
<section class="statistics">Statistik funkar!</section>
|
||||
</dafa-logged-in-shell>
|
||||
|
||||
@@ -2,9 +2,10 @@ import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { StatisticsComponent } from './statistics.component';
|
||||
import { LoggedInShellModule } from '../../components/logged-in-shell/logged-in-shell.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [StatisticsComponent],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: StatisticsComponent }])],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: StatisticsComponent }]), LoggedInShellModule]
|
||||
})
|
||||
export class StatisticsModule {}
|
||||
|
||||
Reference in New Issue
Block a user