Updated some pages

This commit is contained in:
Erik Tiekstra
2021-04-07 14:04:58 +02:00
committed by Erik Tiekstra
parent 5448643d8e
commit cee9168c3c
16 changed files with 349 additions and 955 deletions
@@ -1,6 +1,7 @@
export enum IconType {
HOME = 'home', // Custom
SETTINGS = 'settings', // Custom
PLUS = 'plus', // Custom
USER = 'user',
USERS = 'users',
BELL = 'bell',
@@ -13,6 +13,10 @@ const routes: Routes = [
path: 'personal',
loadChildren: () => import('./pages/staff-list/staff-list.module').then(m => m.StaffListModule),
},
{
path: 'skapa-konto',
loadChildren: () => import('./pages/create-account/create-account.module').then(m => m.CreateAccountModule),
},
];
@NgModule({
@@ -0,0 +1,10 @@
<section class="create-account">
<digi-typography>
<h1>Skapa nytt konto</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>
</digi-typography>
</section>
@@ -0,0 +1,27 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { CreateAccountComponent } from './create-account.component';
describe('CreateAccountComponent', () => {
let component: CreateAccountComponent;
let fixture: ComponentFixture<CreateAccountComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CreateAccountComponent],
imports: [RouterTestingModule],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(CreateAccountComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'dafa-create-account',
templateUrl: './create-account.component.html',
styleUrls: ['./create-account.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CreateAccountComponent {}
@@ -0,0 +1,11 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CreateAccountComponent } from './create-account.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [CreateAccountComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: CreateAccountComponent }])],
})
export class CreateAccountModule {}
@@ -6,5 +6,9 @@
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>
<digi-button>
Skapa nytt konto
<dafa-icon [icon]="iconType.PLUS"></dafa-icon>
</digi-button>
</digi-typography>
</section>
@@ -1,4 +1,5 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { IconType } from '@dafa-enums/icon-type.enum';
@Component({
selector: 'dafa-staff-list',
@@ -6,4 +7,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
styleUrls: ['./staff-list.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class StaffListComponent {}
export class StaffListComponent {
iconType = IconType;
}
@@ -1,11 +1,12 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { IconModule } from '@dafa-shared/components/icon/icon.module';
import { StaffListComponent } from './staff-list.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [StaffListComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: StaffListComponent }])],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: StaffListComponent }]), IconModule],
})
export class StaffListModule {}
@@ -17,6 +17,7 @@ describe('ParticipantsListComponent', () => {
beforeEach(() => {
fixture = TestBed.createComponent(ParticipantsListComponent);
component = fixture.componentInstance;
component.participants = [];
fixture.detectChanges();
});
@@ -1,4 +1,5 @@
import { DigiNgSkeletonBaseModule } from '@af/digi-ng/_skeleton/skeleton-base';
import { HttpClientModule } from '@angular/common/http';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { ParticipantsListModule } from './components/participants-list/participants-list.module';
@@ -12,7 +13,7 @@ describe('ParticipantsComponent', () => {
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ParticipantsComponent],
imports: [RouterTestingModule, DigiNgSkeletonBaseModule, ParticipantsListModule],
imports: [RouterTestingModule, HttpClientModule, DigiNgSkeletonBaseModule, ParticipantsListModule],
}).compileComponents();
})
);
@@ -17,6 +17,13 @@
fill="currentColor"
></path>
</svg>
<svg *ngIf="icon === iconType.PLUS" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="25" height="25">
<path
fill="currentColor"
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
></path>
</svg>
</digi-ng-icon-custom>
<ng-template #DigiNgIcon>
@@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/c
import { IconSize } from '@dafa-enums/icon-size.enum';
import { IconType } from '@dafa-enums/icon-type.enum';
const CUSTOM_ICONS: IconType[] = [IconType.HOME, IconType.SETTINGS];
const CUSTOM_ICONS: IconType[] = [IconType.HOME, IconType.SETTINGS, IconType.PLUS];
@Component({
selector: 'dafa-icon',