feat(exports): Added page for exports. (TV-862)

Squashed commit of the following:

commit ee293ecbc763a2e85c383ee628539fb1dbcab515
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Mon Nov 1 13:28:22 2021 +0100

    Moved exports below administration

commit 7dd8756cd031501c302981e51c8aa519092b121c
Merge: ef229931 bdc526ce
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Mon Nov 1 13:20:56 2021 +0100

    Merge branch 'develop' into feature/TV-862-export-page

commit ef229931d978646a864e1d952044e6d31f2adf82
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Fri Oct 29 11:59:06 2021 +0200

    Added exporter page including routing and feature-toggling
This commit is contained in:
Erik Tiekstra
2021-11-01 14:08:07 +01:00
parent 596033f08a
commit 4b4e5a64b2
18 changed files with 185 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ExportsComponent } from './exports.component';
const routes: Routes = [
{ path: '', data: { title: 'Exporter' }, component: ExportsComponent },
{
path: 'deltagare',
data: { title: 'Skapa export för deltagare' },
loadChildren: () => import('./pages/deltagare-export/deltagare-export.module').then(m => m.DeltagareExportModule),
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class ExportsRoutingModule {}

View File

@@ -0,0 +1,10 @@
<msfa-layout>
<section class="exports">
<digi-typography>
<header class="exports__header">
<h1>Exporter</h1>
</header>
<main class="exports__contents"></main>
</digi-typography>
</section>
</msfa-layout>

View File

@@ -0,0 +1,10 @@
@import 'variables/gutters';
.exports {
&__contents {
display: flex;
flex-direction: column;
gap: $digi--layout--gutter--l;
margin-top: $digi--layout--gutter--l;
}
}

View File

@@ -0,0 +1,30 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { ExportsComponent } from './exports.component';
describe('ExportsComponent', () => {
let component: ExportsComponent;
let fixture: ComponentFixture<ExportsComponent>;
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [ExportsComponent],
imports: [HttpClientTestingModule, RouterTestingModule],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(ExportsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'msfa-exports',
templateUrl: './exports.component.html',
styleUrls: ['./exports.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ExportsComponent {}

View File

@@ -0,0 +1,12 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { LayoutModule } from '@msfa-shared/components/layout/layout.module';
import { ExportsComponent } from './exports.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [ExportsComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: ExportsComponent }]), LayoutModule],
})
export class ExportsModule {}

View File

@@ -0,0 +1,10 @@
<msfa-layout>
<section class="deltagare-export">
<digi-typography>
<header class="deltagare-export__header">
<h1>Deltagare export</h1>
</header>
<main class="deltagare-export__contents"></main>
</digi-typography>
</section>
</msfa-layout>

View File

@@ -0,0 +1,10 @@
@import 'variables/gutters';
.deltagare-export {
&__contents {
display: flex;
flex-direction: column;
gap: $digi--layout--gutter--l;
margin-top: $digi--layout--gutter--l;
}
}

View File

@@ -0,0 +1,30 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { DeltagareExportComponent } from './deltagare-export.component';
describe('DeltagareExportComponent', () => {
let component: DeltagareExportComponent;
let fixture: ComponentFixture<DeltagareExportComponent>;
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [DeltagareExportComponent],
imports: [HttpClientTestingModule, RouterTestingModule],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(DeltagareExportComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'msfa-deltagare-export',
templateUrl: './deltagare-export.component.html',
styleUrls: ['./deltagare-export.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DeltagareExportComponent {}

View File

@@ -0,0 +1,12 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { LayoutModule } from '@msfa-shared/components/layout/layout.module';
import { DeltagareExportComponent } from './deltagare-export.component';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
declarations: [DeltagareExportComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: DeltagareExportComponent }]), LayoutModule],
})
export class DeltagareExportModule {}