feat(deltagare): Added deltagare data and models (TV-268)
Squashed commit of the following:
commit 8b61e3edeb644d7a27d322a569e85a7f76667243
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Fri Jul 2 14:26:13 2021 +0200
Removed comments
commit 40dd5f0c186ab4b7b239c054d468f33bd550e0a4
Merge: 3a51568 a11d166
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Fri Jul 2 13:00:59 2021 +0200
Merge branch 'develop' into feature/TV-268-deltagare-data
commit 3a515683513e8152507a744489d79dc62efbc64c
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Fri Jul 2 12:53:03 2021 +0200
Removed wrong data-structure from deltagare-card component
commit 2b2da9fb6b25c980bacfe3f37201f569c05fce8c
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Fri Jul 2 12:19:37 2021 +0200
Added more mock-data to deltagare api
commit 8c52ba5a3a259eb0a4c084eb516180a333bafb45
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Fri Jul 2 11:01:47 2021 +0200
Added highestEducation to mock-api and fixed dynamic mock-api paths
commit a6b372bf05900698dc592ca15853def26cebe841
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Fri Jul 2 08:33:06 2021 +0200
Added fallbackvalues for deltagare
commit 6bbad6826620fc4d95877884fefbb0951216fab0
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Jul 1 16:05:05 2021 +0200
WIP adding mock-data
commit b20e3b057ac50c7f929e8eeaff3a06c5372280a9
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Jul 1 10:30:32 2021 +0200
Added some data to deltagarekort
commit ac15170c089be760bd72a470e9f83603dedba945
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Jul 1 09:40:56 2021 +0200
Added deltagare page and components. Also mapped drivers-licenses
commit 80785b31453553ce78e75b8a76a9ca2758870a0e
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Wed Jun 30 15:52:28 2021 +0200
Added mapping
commit 1b15d0d621b2bb0b3d44d695df12f68637205223
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Wed Jun 30 15:20:53 2021 +0200
Added deltagareCompact in service
commit 20f7de869d0343a5af59acb83964eea224bcf926
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Wed Jun 30 14:57:59 2021 +0200
Added deltagare models and started with service
This commit is contained in:
@@ -19,7 +19,7 @@ const routes: Routes = [
|
|||||||
{
|
{
|
||||||
path: 'deltagare',
|
path: 'deltagare',
|
||||||
data: { title: 'Deltagare' },
|
data: { title: 'Deltagare' },
|
||||||
loadChildren: () => import('./pages/participants/participants.module').then(m => m.ParticipantsModule),
|
loadChildren: () => import('./pages/deltagare/deltagare.module').then(m => m.DeltagareModule),
|
||||||
canActivate: [AuthGuard],
|
canActivate: [AuthGuard],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
import { DeltagareComponent } from './deltagare.component';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: DeltagareComponent,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':deltagareId',
|
||||||
|
loadChildren: () => import('./pages/deltagare-card/deltagare-card.module').then(m => m.DeltagareCardModule),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class DeltagareRoutingModule {}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<dafa-layout>
|
||||||
|
<digi-typography>
|
||||||
|
<section class="deltagare">
|
||||||
|
<h1>Deltagarlista</h1>
|
||||||
|
<p>
|
||||||
|
Här ser du en lista på de deltagare du är tilldelad. Klicka på deltagarens namn för att öppna och se mer
|
||||||
|
information om deltagarna.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a routerLink="1">Klicka för att gå till en test-deltagare från API:et</a>
|
||||||
|
|
||||||
|
<ul *ngIf="allDeltagare$ | async as allDeltagare">
|
||||||
|
<li *ngFor="let deltagare of allDeltagare"><a [routerLink]="deltagare.id">{{deltagare.fullName}}</a></li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
</digi-typography>
|
||||||
|
</dafa-layout>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
.deltagare {
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
import { DeltagareComponent } from './deltagare.component';
|
||||||
|
|
||||||
|
describe('DeltagareComponent', () => {
|
||||||
|
let component: DeltagareComponent;
|
||||||
|
let fixture: ComponentFixture<DeltagareComponent>;
|
||||||
|
|
||||||
|
beforeEach(
|
||||||
|
waitForAsync(() => {
|
||||||
|
void TestBed.configureTestingModule({
|
||||||
|
declarations: [DeltagareComponent],
|
||||||
|
imports: [RouterTestingModule, HttpClientTestingModule],
|
||||||
|
}).compileComponents();
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(DeltagareComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
16
apps/dafa-web/src/app/pages/deltagare/deltagare.component.ts
Normal file
16
apps/dafa-web/src/app/pages/deltagare/deltagare.component.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||||
|
import { Deltagare } from '@dafa-models/deltagare.model';
|
||||||
|
import { DeltagareService } from '@dafa-services/api/deltagare.service';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'dafa-deltagare',
|
||||||
|
templateUrl: './deltagare.component.html',
|
||||||
|
styleUrls: ['./deltagare.component.scss'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
})
|
||||||
|
export class DeltagareComponent {
|
||||||
|
allDeltagare$: Observable<Deltagare[]> = this.deltagareService.allDeltagare$;
|
||||||
|
|
||||||
|
constructor(private deltagareService: DeltagareService) {}
|
||||||
|
}
|
||||||
12
apps/dafa-web/src/app/pages/deltagare/deltagare.module.ts
Normal file
12
apps/dafa-web/src/app/pages/deltagare/deltagare.module.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||||
|
import { LayoutModule } from '@dafa-shared/components/layout/layout.module';
|
||||||
|
import { DeltagareRoutingModule } from './deltagare-routing.module';
|
||||||
|
import { DeltagareComponent } from './deltagare.component';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
declarations: [DeltagareComponent],
|
||||||
|
imports: [CommonModule, DeltagareRoutingModule, LayoutModule],
|
||||||
|
})
|
||||||
|
export class DeltagareModule {}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<dafa-layout>
|
||||||
|
<section class="deltagare-card">
|
||||||
|
<digi-typography *ngIf="deltagare$ | async as deltagare; else loadingRef">
|
||||||
|
<header class="deltagare-card__header">
|
||||||
|
<dafa-back-link [route]="['/deltagare']">Tillbaka till deltagarlistan</dafa-back-link>
|
||||||
|
<h1>{{ deltagare.fullName }}</h1>
|
||||||
|
</header>
|
||||||
|
<p>
|
||||||
|
Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus accusantium sit, reprehenderit, esse suscipit
|
||||||
|
quis similique harum est eum eveniet aspernatur delectus magni asperiores porro aliquam voluptate! Architecto,
|
||||||
|
perferendis commodi.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre>{{deltagare | json}}</pre>
|
||||||
|
|
||||||
|
<div class="deltagare-card__contents">
|
||||||
|
<div class="deltagare-card__column">
|
||||||
|
<h2>Personuppgifter</h2>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>Namn</dt>
|
||||||
|
<dd *ngIf="deltagare.fullName; else emptyDD">{{ deltagare.fullName }}</dd>
|
||||||
|
<dt>Personnummer</dt>
|
||||||
|
<dd *ngIf="deltagare.ssn; else emptyDD">{{ deltagare.ssn }}</dd>
|
||||||
|
<dt>Epostadress</dt>
|
||||||
|
<dd *ngIf="deltagare.email; else emptyDD">{{ deltagare.email }}</dd>
|
||||||
|
<dt>Telefonnummer</dt>
|
||||||
|
<ng-container *ngIf="deltagare.phoneNumbers.length; else emptyDD">
|
||||||
|
<ng-container *ngFor="let phoneNumber of deltagare.phoneNumbers">
|
||||||
|
<dd>{{ phoneNumber.type }}: {{phoneNumber.number}}</dd>
|
||||||
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<h3>Särskilda behov</h3>
|
||||||
|
<p>
|
||||||
|
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Minus, voluptatum quibusdam repellendus animi,
|
||||||
|
quidem, commodi quos porro quia incidunt saepe veritatis voluptatem. Cupiditate, accusamus atque! Illum,
|
||||||
|
quisquam esse? Omnis, quasi!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="deltagare-card__column">
|
||||||
|
<h2>Om tjänsten</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="deltagare-card__column">
|
||||||
|
<h2>Matchningsuppgifter</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="deltagare-card__column">
|
||||||
|
<h2>Körkortsinformation</h2>
|
||||||
|
<dl>
|
||||||
|
<dt>Har körkort</dt>
|
||||||
|
<dd>{{deltagare.driversLicense.licenses.length ? 'Ja' : 'Nej'}}</dd>
|
||||||
|
<ng-container *ngIf="deltagare.driversLicense.licenses.length">
|
||||||
|
<dt>Körkortsklasser</dt>
|
||||||
|
<dd>{{deltagare.driversLicense.licenses.join(', ')}}</dd>
|
||||||
|
<dt>Tillgång till bil</dt>
|
||||||
|
<dd>{{deltagare.driversLicense.accessToCar ? 'Ja' : 'Nej'}}</dd>
|
||||||
|
</ng-container>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="deltagare-card__footer">
|
||||||
|
<dafa-back-link [route]="['/deltagare']">Tillbaka till deltagarlistan</dafa-back-link>
|
||||||
|
</footer>
|
||||||
|
</digi-typography>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<ng-template #loadingRef>
|
||||||
|
<digi-ng-skeleton-base [afCount]="3" afText="Laddar deltagarinformation"></digi-ng-skeleton-base>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template #emptyDD>
|
||||||
|
<dd>
|
||||||
|
<span aria-hidden="true">-</span>
|
||||||
|
<span class="dafa__a11y-sr-only">Info saknas</span>
|
||||||
|
</dd>
|
||||||
|
</ng-template>
|
||||||
|
</dafa-layout>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
@import 'variables/gutters';
|
||||||
|
|
||||||
|
.deltagare-card {
|
||||||
|
&__contents {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: $digi--layout--gutter--xl $digi--layout--gutter--l;
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__column {
|
||||||
|
width: 100%;
|
||||||
|
max-width: var(--digi--typography--text--max-width);
|
||||||
|
}
|
||||||
|
|
||||||
|
dl {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 1fr;
|
||||||
|
gap: 0.5rem 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt,
|
||||||
|
dd {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
grid-column: 1;
|
||||||
|
font-weight: var(--digi--typography--font-weight--semibold);
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
grid-column: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__header,
|
||||||
|
&__footer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
import { DeltagareCardComponent } from './deltagare-card.component';
|
||||||
|
|
||||||
|
describe('DeltagareCardComponent', () => {
|
||||||
|
let component: DeltagareCardComponent;
|
||||||
|
let fixture: ComponentFixture<DeltagareCardComponent>;
|
||||||
|
|
||||||
|
beforeEach(
|
||||||
|
waitForAsync(() => {
|
||||||
|
void TestBed.configureTestingModule({
|
||||||
|
declarations: [DeltagareCardComponent],
|
||||||
|
imports: [RouterTestingModule, HttpClientTestingModule],
|
||||||
|
}).compileComponents();
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(DeltagareCardComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import { IconType } from '@dafa-enums/icon-type.enum';
|
||||||
|
import { Deltagare } from '@dafa-models/deltagare.model';
|
||||||
|
import { DeltagareService } from '@dafa-services/api/deltagare.service';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
import { map, switchMap } from 'rxjs/operators';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'dafa-deltagare-card',
|
||||||
|
templateUrl: './deltagare-card.component.html',
|
||||||
|
styleUrls: ['./deltagare-card.component.scss'],
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
|
})
|
||||||
|
export class DeltagareCardComponent {
|
||||||
|
private _deltagareId$: Observable<string> = this.activatedRoute.params.pipe(
|
||||||
|
map(({ deltagareId }) => deltagareId as string)
|
||||||
|
);
|
||||||
|
deltagare$: Observable<Deltagare> = this._deltagareId$.pipe(
|
||||||
|
switchMap(deltagareId => this.deltagaresService.deltagare$(deltagareId))
|
||||||
|
);
|
||||||
|
iconType = IconType;
|
||||||
|
|
||||||
|
constructor(private activatedRoute: ActivatedRoute, private deltagaresService: DeltagareService) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { DigiNgLinkInternalModule } from '@af/digi-ng/_link/link-internal';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||||
|
import { RouterModule } from '@angular/router';
|
||||||
|
import { BackLinkModule } from '@dafa-shared/components/back-link/back-link.module';
|
||||||
|
import { IconModule } from '@dafa-shared/components/icon/icon.module';
|
||||||
|
import { LayoutModule } from '@dafa-shared/components/layout/layout.module';
|
||||||
|
import { DeltagareCardComponent } from './deltagare-card.component';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
declarations: [DeltagareCardComponent],
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
RouterModule.forChild([{ path: '', component: DeltagareCardComponent }]),
|
||||||
|
LayoutModule,
|
||||||
|
DigiNgLinkInternalModule,
|
||||||
|
IconModule,
|
||||||
|
BackLinkModule,
|
||||||
|
],
|
||||||
|
exports: [DeltagareCardComponent],
|
||||||
|
})
|
||||||
|
export class DeltagareCardModule {}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||||
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
import { LogoutComponent } from './logout.component';
|
||||||
|
|
||||||
|
describe('LogoutComponent', () => {
|
||||||
|
let component: LogoutComponent;
|
||||||
|
let fixture: ComponentFixture<LogoutComponent>;
|
||||||
|
|
||||||
|
beforeEach(
|
||||||
|
waitForAsync(() => {
|
||||||
|
void TestBed.configureTestingModule({
|
||||||
|
declarations: [LogoutComponent],
|
||||||
|
imports: [RouterTestingModule, HttpClientTestingModule],
|
||||||
|
}).compileComponents();
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(LogoutComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
17
apps/dafa-web/src/app/shared/constants/drivers-licenses.ts
Normal file
17
apps/dafa-web/src/app/shared/constants/drivers-licenses.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
export const DRIVERS_LICENSES = [
|
||||||
|
'AM',
|
||||||
|
'A1',
|
||||||
|
'A2',
|
||||||
|
'A',
|
||||||
|
'B',
|
||||||
|
'BE',
|
||||||
|
'B96',
|
||||||
|
'C1',
|
||||||
|
'C',
|
||||||
|
'C1E',
|
||||||
|
'CE',
|
||||||
|
'D1',
|
||||||
|
'D',
|
||||||
|
'D1E',
|
||||||
|
'DE',
|
||||||
|
];
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export const Navigation = {
|
export const NAVIGATION = {
|
||||||
administration: 'Administration',
|
administration: 'Administration',
|
||||||
'skapa-konto': 'Skapa nytt konto',
|
'skapa-konto': 'Skapa nytt konto',
|
||||||
personal: 'Hantera personal',
|
personal: 'Hantera personal',
|
||||||
|
|||||||
16
apps/dafa-web/src/app/shared/enums/address-type.enum.ts
Normal file
16
apps/dafa-web/src/app/shared/enums/address-type.enum.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
export enum AddressType {
|
||||||
|
OFFICIAL = 'Folkbokföringsadress',
|
||||||
|
POSTAL = 'Postadress',
|
||||||
|
UNSPECIFIED = 'Ospecificerad adress',
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAddressType(addressType: 'FBF' | 'EgenAngiven'): AddressType {
|
||||||
|
switch (addressType) {
|
||||||
|
case 'FBF':
|
||||||
|
return AddressType.OFFICIAL;
|
||||||
|
case 'EgenAngiven':
|
||||||
|
return AddressType.POSTAL;
|
||||||
|
default:
|
||||||
|
return AddressType.UNSPECIFIED;
|
||||||
|
}
|
||||||
|
}
|
||||||
17
apps/dafa-web/src/app/shared/enums/phonenumber-type.enum.ts
Normal file
17
apps/dafa-web/src/app/shared/enums/phonenumber-type.enum.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
export enum PhoneNumberType {
|
||||||
|
CELL = 'Mobil',
|
||||||
|
DOMESTIC = 'Hem',
|
||||||
|
WORK = 'Arbete',
|
||||||
|
UNKNOWN = 'Okänd',
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPhoneNumberType(phoneNumberType: 'Mobil' | 'Bostad'): PhoneNumberType {
|
||||||
|
switch (phoneNumberType) {
|
||||||
|
case 'Mobil':
|
||||||
|
return PhoneNumberType.CELL;
|
||||||
|
case 'Bostad':
|
||||||
|
return PhoneNumberType.DOMESTIC;
|
||||||
|
default:
|
||||||
|
return PhoneNumberType.UNKNOWN;
|
||||||
|
}
|
||||||
|
}
|
||||||
20
apps/dafa-web/src/app/shared/models/address.model.ts
Normal file
20
apps/dafa-web/src/app/shared/models/address.model.ts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import { AddressType, getAddressType } from '@dafa-enums/address-type.enum';
|
||||||
|
import { AddressResponse } from './api/address.response.model';
|
||||||
|
|
||||||
|
export interface Address {
|
||||||
|
type: AddressType;
|
||||||
|
street: string;
|
||||||
|
postalCode: string;
|
||||||
|
city: string;
|
||||||
|
country: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToAddress(data: AddressResponse): Address {
|
||||||
|
return {
|
||||||
|
type: getAddressType(data.adresstyp),
|
||||||
|
street: data.gatuadress,
|
||||||
|
postalCode: data.postnummer,
|
||||||
|
city: data.postort,
|
||||||
|
country: data.land,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export interface AddressResponse {
|
||||||
|
adresstyp: 'FBF' | 'EgenAngiven';
|
||||||
|
gatuadress: string;
|
||||||
|
postnummer: string;
|
||||||
|
postort: string;
|
||||||
|
land: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { AddressResponse } from './address.response.model';
|
||||||
|
import { PhoneNumberResponse } from './phonenumber.response.model';
|
||||||
|
|
||||||
|
export interface ContactInformationResponse {
|
||||||
|
fornamn: string;
|
||||||
|
efternamn: string;
|
||||||
|
personnummer: string;
|
||||||
|
epost: string;
|
||||||
|
telekomadresser: PhoneNumberResponse[];
|
||||||
|
adresser: AddressResponse[];
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { ContactInformationResponse } from './contact-information.response.model';
|
||||||
|
import { DisabilitiesResponse } from './disabilities.response.model';
|
||||||
|
import { DriversLicenseResponse } from './drivers-license.response.model';
|
||||||
|
import { EducationsResponse } from './educations.response.model';
|
||||||
|
import { HighestEducationResponse } from './highest-education.response.model';
|
||||||
|
import { TranslatorResponse } from './translator.response.model';
|
||||||
|
import { WorkLanguagesResponse } from './work-languages.response.model';
|
||||||
|
|
||||||
|
export interface DeltagareResponse {
|
||||||
|
id: string;
|
||||||
|
contact: ContactInformationResponse;
|
||||||
|
driverlicense: DriversLicenseResponse;
|
||||||
|
highestEducation: HighestEducationResponse;
|
||||||
|
educations: EducationsResponse;
|
||||||
|
translator: TranslatorResponse;
|
||||||
|
workLanguages: WorkLanguagesResponse;
|
||||||
|
disabilities: DisabilitiesResponse;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { DisabilityResponse } from './disability.response.model';
|
||||||
|
|
||||||
|
export interface DisabilitiesResponse {
|
||||||
|
funktionsnedsattningar: DisabilityResponse[];
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export interface DisabilityResponse {
|
||||||
|
kod: string;
|
||||||
|
funktionsnedsattning: string;
|
||||||
|
beskrivning: string;
|
||||||
|
utgatt: boolean;
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export interface DriversLicenseResponse {
|
||||||
|
korkort: { behorighet: string };
|
||||||
|
tillgang_till_bil: boolean;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export interface EducationLevelResponse {
|
||||||
|
utbildningsniva: string;
|
||||||
|
beskrivning: string;
|
||||||
|
taxonomy_id: number;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export interface EducationResponse {
|
||||||
|
utbildning: string;
|
||||||
|
beskrivning: string;
|
||||||
|
anordnare: string;
|
||||||
|
period_from: string;
|
||||||
|
period_tom: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { EducationResponse } from './education.response.model';
|
||||||
|
|
||||||
|
export interface EducationsResponse {
|
||||||
|
utbildningar: EducationResponse[];
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export interface HighestEducationResponse {
|
||||||
|
utbildningsniva: string;
|
||||||
|
beskrivning_utbildningsniva: string;
|
||||||
|
sun_kod: string;
|
||||||
|
beskrivning_sun_kod: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export interface LanguageResponse {
|
||||||
|
beskrivning: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export interface PhoneNumberResponse {
|
||||||
|
landskod: number;
|
||||||
|
nummer_utan_inledande_nolla: number;
|
||||||
|
telekomtyp: 'Mobil' | 'Bostad';
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export interface SunKodResponse {
|
||||||
|
sun_kod: string;
|
||||||
|
beskrivning: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { LanguageResponse } from './language.response.model';
|
||||||
|
|
||||||
|
export interface TranslatorResponse {
|
||||||
|
sprak: LanguageResponse;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export interface WorkExperienceResponse {
|
||||||
|
yrke: string;
|
||||||
|
beskrivning: string;
|
||||||
|
arbetsgivare: string;
|
||||||
|
period_from: string;
|
||||||
|
period_tom: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { WorkExperienceResponse } from './work-experience.response.model';
|
||||||
|
|
||||||
|
export interface WorkExperiencesResponse {
|
||||||
|
arbetslivserfarenheter: WorkExperienceResponse[];
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { LanguageResponse } from './language.response.model';
|
||||||
|
|
||||||
|
export interface WorkLanguagesResponse {
|
||||||
|
sprak: LanguageResponse[];
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { Address, mapResponseToAddress } from './address.model';
|
||||||
|
import { ContactInformationResponse } from './api/contact-information.response.model';
|
||||||
|
import { mapResponseToPhoneNumber, PhoneNumber } from './phonenumber.model';
|
||||||
|
|
||||||
|
export interface ContactInformation {
|
||||||
|
firstName: string;
|
||||||
|
lastName: string;
|
||||||
|
fullName: string;
|
||||||
|
ssn: string;
|
||||||
|
email: string;
|
||||||
|
phoneNumbers: PhoneNumber[];
|
||||||
|
addresses: Address[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToContactInformation(contactInformation: ContactInformationResponse): ContactInformation {
|
||||||
|
return {
|
||||||
|
firstName: contactInformation.fornamn,
|
||||||
|
lastName: contactInformation.efternamn,
|
||||||
|
fullName: `${contactInformation.fornamn} ${contactInformation.efternamn}`,
|
||||||
|
ssn: `${contactInformation.personnummer.substring(
|
||||||
|
0,
|
||||||
|
contactInformation.personnummer.length - 4
|
||||||
|
)}-${contactInformation.personnummer.substring(contactInformation.personnummer.length - 4)}`,
|
||||||
|
email: contactInformation.epost,
|
||||||
|
phoneNumbers: contactInformation.telekomadresser
|
||||||
|
? contactInformation.telekomadresser.map(phoneNumber => {
|
||||||
|
return mapResponseToPhoneNumber(phoneNumber);
|
||||||
|
})
|
||||||
|
: [],
|
||||||
|
addresses: contactInformation.adresser
|
||||||
|
? contactInformation.adresser.map(address => mapResponseToAddress(address))
|
||||||
|
: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
45
apps/dafa-web/src/app/shared/models/deltagare.model.ts
Normal file
45
apps/dafa-web/src/app/shared/models/deltagare.model.ts
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
import { Address } from './address.model';
|
||||||
|
import { DeltagareResponse } from './api/deltagare.response.model';
|
||||||
|
import { mapResponseToContactInformation } from './contact-information.model';
|
||||||
|
import { Disability, mapResponseToDisability } from './disability.model';
|
||||||
|
import { DriversLicense, mapResponseToDriversLicense } from './drivers-license.model';
|
||||||
|
import { Education, mapResponseToEducation } from './education.model';
|
||||||
|
import { HighestEducation, mapResponseToHighestEducation } from './highest-education.model';
|
||||||
|
import { PhoneNumber } from './phonenumber.model';
|
||||||
|
|
||||||
|
export interface DeltagareCompact {
|
||||||
|
id: string;
|
||||||
|
fullName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Deltagare extends DeltagareCompact {
|
||||||
|
firstName: string;
|
||||||
|
lastName: string;
|
||||||
|
ssn: string;
|
||||||
|
email: string;
|
||||||
|
phoneNumbers: PhoneNumber[];
|
||||||
|
addresses: Address[];
|
||||||
|
driversLicense: DriversLicense;
|
||||||
|
educations: Education[];
|
||||||
|
highestEducation: HighestEducation;
|
||||||
|
translator: string;
|
||||||
|
disabilities: Disability[];
|
||||||
|
workLanguages: string[];
|
||||||
|
// workExperiences: WorkExperience[]; // TODO: Missing from API
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToDeltagare(data: DeltagareResponse): Deltagare {
|
||||||
|
const { id, contact, driverlicense, highestEducation, educations, translator, workLanguages, disabilities } = data;
|
||||||
|
|
||||||
|
return {
|
||||||
|
id,
|
||||||
|
...mapResponseToContactInformation(contact),
|
||||||
|
driversLicense: mapResponseToDriversLicense(driverlicense),
|
||||||
|
highestEducation: highestEducation && mapResponseToHighestEducation(highestEducation),
|
||||||
|
educations: educations && educations.utbildningar.map(education => mapResponseToEducation(education)),
|
||||||
|
translator: translator && translator.sprak.beskrivning,
|
||||||
|
workLanguages: workLanguages && workLanguages.sprak.map(language => language.beskrivning),
|
||||||
|
disabilities:
|
||||||
|
disabilities && disabilities.funktionsnedsattningar.map(disability => mapResponseToDisability(disability)),
|
||||||
|
};
|
||||||
|
}
|
||||||
17
apps/dafa-web/src/app/shared/models/disability.model.ts
Normal file
17
apps/dafa-web/src/app/shared/models/disability.model.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { DisabilityResponse } from './api/disability.response.model';
|
||||||
|
|
||||||
|
export interface Disability {
|
||||||
|
code: string;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToDisability(data: DisabilityResponse): Disability {
|
||||||
|
const { kod, funktionsnedsattning, beskrivning } = data;
|
||||||
|
|
||||||
|
return {
|
||||||
|
code: kod,
|
||||||
|
title: funktionsnedsattning, // TODO: Needed from API
|
||||||
|
description: beskrivning || null, //TODO: Needed from API
|
||||||
|
};
|
||||||
|
}
|
||||||
29
apps/dafa-web/src/app/shared/models/drivers-license.model.ts
Normal file
29
apps/dafa-web/src/app/shared/models/drivers-license.model.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import { DRIVERS_LICENSES } from '@dafa-constants/drivers-licenses';
|
||||||
|
import { DriversLicenseResponse } from './api/drivers-license.response.model';
|
||||||
|
|
||||||
|
export interface DriversLicense {
|
||||||
|
licenses: string[];
|
||||||
|
accessToCar: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
function mapLicensesAsStringToArray(licenses = ''): string[] {
|
||||||
|
const allLicenses = DRIVERS_LICENSES.sort((a, b) => b.length - a.length);
|
||||||
|
let search = licenses;
|
||||||
|
const found: string[] = [];
|
||||||
|
|
||||||
|
allLicenses.forEach(license => {
|
||||||
|
if (search.indexOf(license) >= 0) {
|
||||||
|
found.push(license);
|
||||||
|
search = search.replace(license, '');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToDriversLicense(data: DriversLicenseResponse): DriversLicense {
|
||||||
|
return {
|
||||||
|
licenses: mapLicensesAsStringToArray(data.korkort.behorighet),
|
||||||
|
accessToCar: data.tillgang_till_bil,
|
||||||
|
};
|
||||||
|
}
|
||||||
21
apps/dafa-web/src/app/shared/models/education.model.ts
Normal file
21
apps/dafa-web/src/app/shared/models/education.model.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { EducationResponse } from './api/education.response.model';
|
||||||
|
|
||||||
|
export interface Education {
|
||||||
|
education: string;
|
||||||
|
description: string;
|
||||||
|
organizer: string;
|
||||||
|
dateFrom: string;
|
||||||
|
dateTo: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToEducation(data: EducationResponse): Education {
|
||||||
|
const { utbildning, beskrivning, anordnare, period_from, period_tom } = data;
|
||||||
|
|
||||||
|
return {
|
||||||
|
education: utbildning,
|
||||||
|
description: beskrivning,
|
||||||
|
organizer: anordnare,
|
||||||
|
dateFrom: period_from,
|
||||||
|
dateTo: period_tom,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import { HighestEducationResponse } from './api/highest-education.response.model';
|
||||||
|
|
||||||
|
export interface HighestEducation {
|
||||||
|
level: {
|
||||||
|
code: string;
|
||||||
|
description: string;
|
||||||
|
};
|
||||||
|
sunKod: {
|
||||||
|
code: string;
|
||||||
|
description: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToHighestEducation(data: HighestEducationResponse): HighestEducation {
|
||||||
|
const { utbildningsniva, beskrivning_utbildningsniva, sun_kod, beskrivning_sun_kod } = data;
|
||||||
|
|
||||||
|
return {
|
||||||
|
level: {
|
||||||
|
code: utbildningsniva,
|
||||||
|
description: beskrivning_utbildningsniva,
|
||||||
|
},
|
||||||
|
sunKod: {
|
||||||
|
code: sun_kod,
|
||||||
|
description: beskrivning_sun_kod,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
14
apps/dafa-web/src/app/shared/models/phonenumber.model.ts
Normal file
14
apps/dafa-web/src/app/shared/models/phonenumber.model.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { getPhoneNumberType, PhoneNumberType } from '@dafa-enums/phonenumber-type.enum';
|
||||||
|
import { PhoneNumberResponse } from './api/phonenumber.response.model';
|
||||||
|
|
||||||
|
export interface PhoneNumber {
|
||||||
|
type: PhoneNumberType;
|
||||||
|
number: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToPhoneNumber(data: PhoneNumberResponse): PhoneNumber {
|
||||||
|
return {
|
||||||
|
type: getPhoneNumberType(data.telekomtyp),
|
||||||
|
number: `+${data.landskod}${data.nummer_utan_inledande_nolla}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
21
apps/dafa-web/src/app/shared/models/work-experience.model.ts
Normal file
21
apps/dafa-web/src/app/shared/models/work-experience.model.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { WorkExperienceResponse } from './api/work-experience.response.model';
|
||||||
|
|
||||||
|
export interface WorkExperience {
|
||||||
|
profession: string;
|
||||||
|
description: string;
|
||||||
|
employer: string;
|
||||||
|
dateFrom: string;
|
||||||
|
dateTo: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mapResponseToWorkExperience(data: WorkExperienceResponse): WorkExperience {
|
||||||
|
const { yrke, beskrivning, arbetsgivare, period_from, period_tom } = data;
|
||||||
|
|
||||||
|
return {
|
||||||
|
profession: yrke,
|
||||||
|
description: beskrivning,
|
||||||
|
employer: arbetsgivare,
|
||||||
|
dateFrom: period_from,
|
||||||
|
dateTo: period_tom,
|
||||||
|
};
|
||||||
|
}
|
||||||
152
apps/dafa-web/src/app/shared/services/api/deltagare.service.ts
Normal file
152
apps/dafa-web/src/app/shared/services/api/deltagare.service.ts
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { environment } from '@dafa-environment';
|
||||||
|
import { ContactInformationResponse } from '@dafa-models/api/contact-information.response.model';
|
||||||
|
import { DeltagareResponse } from '@dafa-models/api/deltagare.response.model';
|
||||||
|
import { DisabilitiesResponse } from '@dafa-models/api/disabilities.response.model';
|
||||||
|
import { DriversLicenseResponse } from '@dafa-models/api/drivers-license.response.model';
|
||||||
|
import { EducationsResponse } from '@dafa-models/api/educations.response.model';
|
||||||
|
import { HighestEducationResponse } from '@dafa-models/api/highest-education.response.model';
|
||||||
|
import { TranslatorResponse } from '@dafa-models/api/translator.response.model';
|
||||||
|
import { WorkExperiencesResponse } from '@dafa-models/api/work-experiences.response.model';
|
||||||
|
import { WorkLanguagesResponse } from '@dafa-models/api/work-languages.response.model';
|
||||||
|
import { ContactInformation, mapResponseToContactInformation } from '@dafa-models/contact-information.model';
|
||||||
|
import { Deltagare, DeltagareCompact, mapResponseToDeltagare } from '@dafa-models/deltagare.model';
|
||||||
|
import { Disability, mapResponseToDisability } from '@dafa-models/disability.model';
|
||||||
|
import { DriversLicense, mapResponseToDriversLicense } from '@dafa-models/drivers-license.model';
|
||||||
|
import { Education, mapResponseToEducation } from '@dafa-models/education.model';
|
||||||
|
import { HighestEducation, mapResponseToHighestEducation } from '@dafa-models/highest-education.model';
|
||||||
|
import { mapResponseToWorkExperience, WorkExperience } from '@dafa-models/work-experience.model';
|
||||||
|
import { combineLatest, Observable } from 'rxjs';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
|
const API_HEADERS = { headers: environment.api.headers };
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class DeltagareService {
|
||||||
|
private _apiBaseUrl = `${environment.api.url}/customerinfo`;
|
||||||
|
|
||||||
|
private _fetchAllDeltagare: Observable<DeltagareResponse[]> = this.httpClient
|
||||||
|
.get<{ data: DeltagareResponse[] }>(`${this._apiBaseUrl}`, { ...API_HEADERS })
|
||||||
|
.pipe(
|
||||||
|
map(response => {
|
||||||
|
return response.data;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
public allDeltagare$: Observable<Deltagare[]> = this._fetchAllDeltagare.pipe(
|
||||||
|
map(data => {
|
||||||
|
return data.map(deltagare => mapResponseToDeltagare(deltagare));
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
private _fetchContactInformation$(id: string): Observable<ContactInformation> {
|
||||||
|
return this.httpClient
|
||||||
|
.get<{ data: ContactInformationResponse }>(`${this._apiBaseUrl}/contact/${id}`, { ...API_HEADERS })
|
||||||
|
.pipe(map(response => mapResponseToContactInformation(response.data)));
|
||||||
|
}
|
||||||
|
private _fetchDriversLicense$(id: string): Observable<DriversLicense> {
|
||||||
|
return this.httpClient
|
||||||
|
.get<{ data: DriversLicenseResponse }>(`${this._apiBaseUrl}/driverlicense/${id}`, { ...API_HEADERS })
|
||||||
|
.pipe(map(response => mapResponseToDriversLicense(response.data)));
|
||||||
|
}
|
||||||
|
private _fetchHighestEducation$(id: string): Observable<HighestEducation> {
|
||||||
|
return this.httpClient
|
||||||
|
.get<{ data: HighestEducationResponse }>(`${this._apiBaseUrl}/education/highest/${id}`, { ...API_HEADERS })
|
||||||
|
.pipe(map(response => mapResponseToHighestEducation(response.data)));
|
||||||
|
}
|
||||||
|
private _fetchEducations$(id: string): Observable<Education[]> {
|
||||||
|
return this.httpClient
|
||||||
|
.get<{ data: EducationsResponse }>(`${this._apiBaseUrl}/education/${id}`, { ...API_HEADERS })
|
||||||
|
.pipe(
|
||||||
|
map(response =>
|
||||||
|
response.data.utbildningar
|
||||||
|
? response.data.utbildningar.map(utbildning => mapResponseToEducation(utbildning))
|
||||||
|
: []
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
private _fetchTranslator$(id: string): Observable<string> {
|
||||||
|
return this.httpClient
|
||||||
|
.get<{ data: TranslatorResponse }>(`${this._apiBaseUrl}/translator/${id}`, { ...API_HEADERS })
|
||||||
|
.pipe(map(response => (response.data.sprak ? response.data.sprak.beskrivning : null)));
|
||||||
|
}
|
||||||
|
private _fetchWorkLanguages$(id: string): Observable<string[]> {
|
||||||
|
return this.httpClient
|
||||||
|
.get<{ data: WorkLanguagesResponse }>(`${this._apiBaseUrl}/work/languages/${id}`, { ...API_HEADERS })
|
||||||
|
.pipe(map(response => (response.data.sprak ? response.data.sprak.map(sprak => sprak.beskrivning) : [])));
|
||||||
|
}
|
||||||
|
private _fetchDisabilities$(id: string): Observable<Disability[]> {
|
||||||
|
return this.httpClient
|
||||||
|
.get<{ data: DisabilitiesResponse }>(`${this._apiBaseUrl}/work/disability/${id}`, { ...API_HEADERS })
|
||||||
|
.pipe(
|
||||||
|
map(response =>
|
||||||
|
response.data.funktionsnedsattningar
|
||||||
|
? response.data.funktionsnedsattningar.map(funktionsnedsattning =>
|
||||||
|
mapResponseToDisability(funktionsnedsattning)
|
||||||
|
)
|
||||||
|
: []
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
private _fetchWorkExperiences$(id: string): Observable<WorkExperience[]> {
|
||||||
|
return this.httpClient
|
||||||
|
.get<{ data: WorkExperiencesResponse }>(`${this._apiBaseUrl}/work/${id}`, { ...API_HEADERS })
|
||||||
|
.pipe(
|
||||||
|
map(response =>
|
||||||
|
response.data.arbetslivserfarenheter
|
||||||
|
? response.data.arbetslivserfarenheter.map(erfarenhet => mapResponseToWorkExperience(erfarenhet))
|
||||||
|
: []
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public deltagareCompact$(id: string): Observable<DeltagareCompact> {
|
||||||
|
return this._fetchContactInformation$(id).pipe(
|
||||||
|
map(contactInformation => ({
|
||||||
|
id,
|
||||||
|
fullName: contactInformation.fullName,
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// As TypeScript has some limitations regarding combining Observables this way,
|
||||||
|
// we need to type it manually when exceeding 6 Observables inside a combineLatest.
|
||||||
|
// Read: https://github.com/ReactiveX/rxjs/issues/3601#issuecomment-384711601
|
||||||
|
public deltagare$(id: string): Observable<Deltagare> {
|
||||||
|
return combineLatest([
|
||||||
|
this._fetchContactInformation$(id),
|
||||||
|
this._fetchDriversLicense$(id),
|
||||||
|
this._fetchHighestEducation$(id),
|
||||||
|
this._fetchEducations$(id),
|
||||||
|
this._fetchTranslator$(id),
|
||||||
|
this._fetchWorkLanguages$(id),
|
||||||
|
this._fetchDisabilities$(id),
|
||||||
|
]).pipe(
|
||||||
|
map(
|
||||||
|
([contactInformation, driversLicense, highestEducation, educations, translator, workLanguages, disabilities]: [
|
||||||
|
ContactInformation,
|
||||||
|
DriversLicense,
|
||||||
|
HighestEducation,
|
||||||
|
Education[],
|
||||||
|
string,
|
||||||
|
string[],
|
||||||
|
Disability[]
|
||||||
|
]) => ({
|
||||||
|
id,
|
||||||
|
...contactInformation,
|
||||||
|
driversLicense,
|
||||||
|
highestEducation,
|
||||||
|
educations,
|
||||||
|
translator,
|
||||||
|
workLanguages,
|
||||||
|
disabilities,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(private httpClient: HttpClient) {}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Navigation } from '@dafa-constants/navigation';
|
import { NAVIGATION } from '@dafa-constants/navigation';
|
||||||
|
|
||||||
export function mapPathToPageName(path: string): string {
|
export function mapPathToPageName(path: string): string {
|
||||||
return (Navigation[path] || `${path.charAt(0).toUpperCase()}${path.slice(1)}`) as string;
|
return (NAVIGATION[path] || `${path.charAt(0).toUpperCase()}${path.slice(1)}`) as string;
|
||||||
}
|
}
|
||||||
|
|||||||
129
mock-api/dafa-web/scripts/deltagare.js
Normal file
129
mock-api/dafa-web/scripts/deltagare.js
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import faker from 'faker';
|
||||||
|
import disabilities from './disabilities.js';
|
||||||
|
import educationLevels from './education-levels.js';
|
||||||
|
import languages from './languages.js';
|
||||||
|
import sunKoder from './sun-koder.js';
|
||||||
|
import chooseRandom from './utils/choose-random.util.js';
|
||||||
|
|
||||||
|
faker.locale = 'sv';
|
||||||
|
|
||||||
|
const LANGUAGES = languages.generate();
|
||||||
|
const DRIVERS_LICENSES = ['AM', 'A1', 'A2', 'A', 'B', 'BE', 'B96', 'C1', 'C', 'C1E', 'CE', 'D1', 'D', 'D1E', 'DE'];
|
||||||
|
const EDUCATION_LEVELS = educationLevels.generate();
|
||||||
|
const SUN_KODER = sunKoder.generate();
|
||||||
|
const DISABILITIES = disabilities.generate();
|
||||||
|
const EDUCATIONS = [
|
||||||
|
{
|
||||||
|
utbildning: 'Lingvistik',
|
||||||
|
beskrivning: 'Utbildning inom lingvistik',
|
||||||
|
anordnare: 'Universidade de brasilia',
|
||||||
|
period_from: '201804',
|
||||||
|
period_tom: '202003',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
utbildning: 'Pedagogik',
|
||||||
|
beskrivning: 'Utbildning inom pedagogik',
|
||||||
|
anordnare: 'Faculdade horizonte',
|
||||||
|
period_from: '201403',
|
||||||
|
period_tom: '201803',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
function generateDeltagare(amount = 10) {
|
||||||
|
const allDeltagare = [];
|
||||||
|
|
||||||
|
for (let id = 1; id <= amount; ++id) {
|
||||||
|
const fornamn = faker.name.firstName();
|
||||||
|
const efternamn = faker.name.lastName();
|
||||||
|
|
||||||
|
const korkort = Math.random() > 0.8 && {
|
||||||
|
behorighet: chooseRandom(DRIVERS_LICENSES, faker.datatype.number(3)).join(''),
|
||||||
|
};
|
||||||
|
const educationLevel = EDUCATION_LEVELS[Math.floor(Math.random() * EDUCATION_LEVELS.length)];
|
||||||
|
const sunKod = SUN_KODER[Math.floor(Math.random() * SUN_KODER.length)];
|
||||||
|
|
||||||
|
const deltagare = {
|
||||||
|
id,
|
||||||
|
contact: {
|
||||||
|
fornamn,
|
||||||
|
efternamn,
|
||||||
|
personnummer: `${faker.date
|
||||||
|
.between('1950', '2000')
|
||||||
|
.toISOString()
|
||||||
|
.split('T')[0]
|
||||||
|
.replace(/-/g, '')}${faker.datatype.number({
|
||||||
|
min: 1000,
|
||||||
|
max: 9999,
|
||||||
|
})}`,
|
||||||
|
epost: faker.internet.email(fornamn.toLowerCase(), efternamn.toLowerCase()),
|
||||||
|
telekomadresser: [
|
||||||
|
{
|
||||||
|
landskod: 46,
|
||||||
|
nummer_utan_inledande_nolla: faker.phone.phoneNumber('7########'),
|
||||||
|
telekomtyp: 'Mobil',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
landskod: 46,
|
||||||
|
nummer_utan_inledande_nolla: faker.phone.phoneNumber('#########'),
|
||||||
|
telekomtyp: 'Bostad',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
adresser: [
|
||||||
|
{
|
||||||
|
adresstyp: 'FBF',
|
||||||
|
gatuadress: `${faker.address.streetName()} ${faker.datatype.number(100)}`,
|
||||||
|
postnummer: faker.address.zipCode(),
|
||||||
|
postort: faker.address.city(),
|
||||||
|
land: 'Sverige',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
driverlicense: {
|
||||||
|
korkort,
|
||||||
|
tillgang_till_bil: Math.random() > 0.3 && korkort,
|
||||||
|
},
|
||||||
|
highestEducation: {
|
||||||
|
utbildningsniva: educationLevel.utbildningsniva,
|
||||||
|
beskrivning_utbildningsniva: educationLevel.beskrivning,
|
||||||
|
sun_kod: sunKod.sun_kod,
|
||||||
|
beskrivning_sun_kod: sunKod.beskrivning,
|
||||||
|
},
|
||||||
|
education: {
|
||||||
|
utbildningar: chooseRandom(EDUCATIONS, faker.datatype.number(EDUCATIONS.length)),
|
||||||
|
},
|
||||||
|
translator: {
|
||||||
|
sprak: Math.random() > 0.3 && {
|
||||||
|
beskrivning: LANGUAGES[Math.floor(Math.random() * LANGUAGES.length)].beskrivning,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
workLanguages: {
|
||||||
|
sprak:
|
||||||
|
Math.random() > 0.5
|
||||||
|
? chooseRandom(LANGUAGES, faker.datatype.number(3)).map(language => ({
|
||||||
|
beskrivning: language.beskrivning,
|
||||||
|
}))
|
||||||
|
: [],
|
||||||
|
},
|
||||||
|
disabilities: {
|
||||||
|
funktionsnedsattningar: Math.random() > 0.3 ? chooseRandom(DISABILITIES, faker.datatype.number(3)) : [],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
if (Math.random() > 0.8) {
|
||||||
|
deltagare.contact.adresser.push({
|
||||||
|
adresstyp: 'EgenAngiven',
|
||||||
|
gatuadress: `${faker.address.streetName()} ${faker.datatype.number(100)}`,
|
||||||
|
postnummer: faker.address.zipCode(),
|
||||||
|
postort: faker.address.city(),
|
||||||
|
land: 'Sverige',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
allDeltagare.push(deltagare);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.info('Deltagare generated...');
|
||||||
|
return allDeltagare;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
generate: generateDeltagare,
|
||||||
|
};
|
||||||
128
mock-api/dafa-web/scripts/disabilities.js
Normal file
128
mock-api/dafa-web/scripts/disabilities.js
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
function generateDisabilities() {
|
||||||
|
console.info('Disabilities generated...');
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
kod: '11',
|
||||||
|
funktionsnedsattning: 'Nedsatt funktion i hjärta, kärl eller lungor',
|
||||||
|
beskrivning:
|
||||||
|
'Innebär sjukdom eller skada som påverkar hjärta, kärl eller lungor och medför nedsatt arbetsförmåga.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '20',
|
||||||
|
funktionsnedsattning: 'Hörselskada dövhet (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '21',
|
||||||
|
funktionsnedsattning: 'Barndomsdöv och/eller teckenspråkig',
|
||||||
|
beskrivning: 'Innebär nedsatt arbetsförmåga i en icke teckenspråkig miljö.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '22',
|
||||||
|
funktionsnedsattning: 'Hörselskada',
|
||||||
|
beskrivning:
|
||||||
|
'Hörselskada som medför hörselnedsättning eller vuxendövhet. Omfattar även tinnitus eller ljudkänslighet som medför nedsatt arbetsförmåga.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '30',
|
||||||
|
funktionsnedsattning: 'Synskada (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '31',
|
||||||
|
funktionsnedsattning: 'Grav synskada (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '32',
|
||||||
|
funktionsnedsattning: 'Synsvaghet (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '33',
|
||||||
|
funktionsnedsattning: 'Synnedsättning',
|
||||||
|
beskrivning:
|
||||||
|
'Blindhet eller synnedsättning med synskärpa lägre än 0,3 med bästa glasögonkorrektion eller begränsningar i synfältet. Kan även omfatta andra former av synbegränsningar som medför nedsatt arbetsförmåga.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '40',
|
||||||
|
funktionsnedsattning: 'Rörelsehinder (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '41',
|
||||||
|
funktionsnedsattning: 'Funktionsnedsättning som kräver förflyttningshjälpmedel (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '42',
|
||||||
|
funktionsnedsattning: 'Övriga rörelsenedsättningar (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '43',
|
||||||
|
funktionsnedsattning: 'Nedsatt eller begränsad rörelseförmåga',
|
||||||
|
beskrivning:
|
||||||
|
'Innebär förändringar i skelett, leder, ledband, muskulatur eller nervsystem som medför nedsatt arbetsförmåga. Smärtproblematik som ger upphov till rörelsenedsättning och medför nedsatt arbetsförmåga.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '51',
|
||||||
|
funktionsnedsattning: 'Övriga somatiskt relaterade funktionsnedsättningar',
|
||||||
|
beskrivning:
|
||||||
|
'Innebär kroppslig sjukdom eller skada med påverkan på matsmältning, ämnesomsättning eller endokrina funktioner som medför nedsatt arbetsförmåga. Hit kan även epilepsi, kronisk migrän och psoriasis räknas.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '61',
|
||||||
|
funktionsnedsattning: 'Psykisk funktionsnedsättning',
|
||||||
|
beskrivning: 'Innebär nedsatt arbetsförmåga orsakad av omfattande och varaktig psykisk ohälsa eller sjukdom.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '71',
|
||||||
|
funktionsnedsattning: 'Generellt nedsatt inlärningsförmåga',
|
||||||
|
beskrivning:
|
||||||
|
'Innebär nedsättning av flera kognitiva funktioner som leder till nedsatt arbetsförmåga. Huvudsakligen handlar det om begränsad förmåga till abstrakt tänkande, problemlösning och inlärning samt långsam kognitiv bearbetning.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '81',
|
||||||
|
funktionsnedsattning: 'Socialmedicinsk problematik (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '82',
|
||||||
|
funktionsnedsattning: 'Missbruks- eller beroendeproblematik',
|
||||||
|
beskrivning: 'Innebär nedsatt arbetsförmåga orsakad av omfattande missbruk eller beroende.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '91',
|
||||||
|
funktionsnedsattning: 'Allergi eller överkänslighet',
|
||||||
|
beskrivning:
|
||||||
|
'Överkänslighet som innebär reaktioner med symptom från luftvägar, ögon, mag-tarmkanal eller hud vid kontakt med ämnen och medför nedsatt arbetsförmåga.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '92',
|
||||||
|
funktionsnedsattning: 'Specifik kognitiv funktionsnedsättning',
|
||||||
|
beskrivning:
|
||||||
|
'Innebär begränsningar av en eller några kognitiva funktioner som medför nedsatt arbetsförmåga. Det kan gälla uppmärksamhet, överaktivitet, inlärning, minne, planering, genomförande eller socialt samspel. Det kan även handla om begränsningar inom områden som exempelvis läsning, skrivning, räkning eller språkstörningar.',
|
||||||
|
utgatt: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kod: '93',
|
||||||
|
funktionsnedsattning: 'Förvärvad hjärnskada (utgått)',
|
||||||
|
utgatt: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
generate: generateDisabilities,
|
||||||
|
};
|
||||||
44
mock-api/dafa-web/scripts/education-levels.js
Normal file
44
mock-api/dafa-web/scripts/education-levels.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
function generateEducationLevels() {
|
||||||
|
console.info('Education levels generated...');
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
utbildningsniva: '0',
|
||||||
|
beskrivning: 'Saknar formell grundläggande utbildning',
|
||||||
|
taxonomy_id: 9,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
utbildningsniva: '1',
|
||||||
|
beskrivning: 'Förgymnasial utbildning kortare än 9 år',
|
||||||
|
taxonomy_id: 10,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
utbildningsniva: '2',
|
||||||
|
beskrivning: 'Förgymnasial utbildning 9 (10) år',
|
||||||
|
taxonomy_id: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
utbildningsniva: '3',
|
||||||
|
beskrivning: 'Gymnasial utbildning',
|
||||||
|
taxonomy_id: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
utbildningsniva: '4',
|
||||||
|
beskrivning: 'Eftergymnasial utbildning, kortare än två år',
|
||||||
|
taxonomy_id: 5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
utbildningsniva: '5',
|
||||||
|
beskrivning: 'Eftergymnasial utbildning, två år eller längre',
|
||||||
|
taxonomy_id: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
utbildningsniva: '6',
|
||||||
|
beskrivning: 'Forskarutbildning',
|
||||||
|
taxonomy_id: 4,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
generate: generateEducationLevels,
|
||||||
|
};
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import { authTokens } from './auth-tokens.js';
|
||||||
import authorizations from './authorizations.js';
|
import authorizations from './authorizations.js';
|
||||||
|
import avrop from './avrop.js';
|
||||||
import currentUser from './current-user.js';
|
import currentUser from './current-user.js';
|
||||||
|
import deltagare from './deltagare.js';
|
||||||
import employees from './employees.js';
|
import employees from './employees.js';
|
||||||
import kommuner from './kommuner.js';
|
import kommuner from './kommuner.js';
|
||||||
import languages from './languages.js';
|
import languages from './languages.js';
|
||||||
import organizations from './organizations.js';
|
import organizations from './organizations.js';
|
||||||
import participants from './participants.js';
|
import participants from './participants.js';
|
||||||
import avrop from './avrop.js';
|
|
||||||
import services from './services.js';
|
import services from './services.js';
|
||||||
import { authTokens } from './auth-tokens.js';
|
|
||||||
|
|
||||||
const generatedEmployees = employees.generate(50);
|
const generatedEmployees = employees.generate(50);
|
||||||
|
|
||||||
@@ -19,13 +20,14 @@ const apiData = {
|
|||||||
kommuner: kommuner.generate(),
|
kommuner: kommuner.generate(),
|
||||||
organizations: organizations.generate(),
|
organizations: organizations.generate(),
|
||||||
avrop: avrop.generate(3),
|
avrop: avrop.generate(3),
|
||||||
|
deltagare: deltagare.generate(50),
|
||||||
participants: participants.generate(50).map(participant => ({
|
participants: participants.generate(50).map(participant => ({
|
||||||
...participant,
|
...participant,
|
||||||
employeeId: generatedEmployees[Math.floor(Math.random() * generatedEmployees.length)].id,
|
employeeId: generatedEmployees[Math.floor(Math.random() * generatedEmployees.length)].id,
|
||||||
})),
|
})),
|
||||||
currentUser: currentUser.generate(),
|
currentUser: currentUser.generate(),
|
||||||
authorizations: authorizations.generate(),
|
authorizations: authorizations.generate(),
|
||||||
getTokenFullAccess: authTokens.auth_code_from_CIAM_with_all_permissions
|
getTokenFullAccess: authTokens.auth_code_from_CIAM_with_all_permissions,
|
||||||
};
|
};
|
||||||
|
|
||||||
fs.writeFileSync('api.json', JSON.stringify(apiData, null, '\t'));
|
fs.writeFileSync('api.json', JSON.stringify(apiData, null, '\t'));
|
||||||
|
|||||||
@@ -1,440 +1,440 @@
|
|||||||
function generateLanguages() {
|
function generateLanguages() {
|
||||||
const languages = [
|
const languages = [
|
||||||
// { id: '10283', name: 'Abkhasiska' },
|
// { id: '10283', beskrivning: 'Abkhasiska' },
|
||||||
// { id: '10282', name: 'Acoli' },
|
// { id: '10282', beskrivning: 'Acoli' },
|
||||||
// { id: '10015', name: 'Adangme' },
|
// { id: '10015', beskrivning: 'Adangme' },
|
||||||
// { id: '239', name: 'Afar' },
|
// { id: '239', beskrivning: 'Afar' },
|
||||||
// { id: '10017', name: 'Afrihili' },
|
// { id: '10017', beskrivning: 'Afrihili' },
|
||||||
{ id: '240', name: 'Afrikaans' },
|
{ id: '240', beskrivning: 'Afrikaans' },
|
||||||
// { id: '10265', name: 'Afro-asiatiska språk' },
|
// { id: '10265', beskrivning: 'Afro-asiatiska språk' },
|
||||||
// { id: '242', name: 'Akan' },
|
// { id: '242', beskrivning: 'Akan' },
|
||||||
// { id: '10284', name: 'Akinesiska' },
|
// { id: '10284', beskrivning: 'Akinesiska' },
|
||||||
// { id: '10266', name: 'Akkadiska' },
|
// { id: '10266', beskrivning: 'Akkadiska' },
|
||||||
// { id: '243', name: 'Albanska' },
|
// { id: '243', beskrivning: 'Albanska' },
|
||||||
// { id: '10267', name: 'Aleutiska' },
|
// { id: '10267', beskrivning: 'Aleutiska' },
|
||||||
// { id: '10268', name: 'Algokinspråk' },
|
// { id: '10268', beskrivning: 'Algokinspråk' },
|
||||||
// { id: '10269', name: 'Altaiska språk, andra' },
|
// { id: '10269', beskrivning: 'Altaiska språk, andra' },
|
||||||
// { id: '245', name: 'Amhariska' },
|
// { id: '245', beskrivning: 'Amhariska' },
|
||||||
// { id: '10270', name: 'Apachespråk' },
|
// { id: '10270', beskrivning: 'Apachespråk' },
|
||||||
// { id: '247', name: 'Arabiska' },
|
// { id: '247', beskrivning: 'Arabiska' },
|
||||||
// { id: '248', name: 'Arameiska' },
|
// { id: '248', beskrivning: 'Arameiska' },
|
||||||
// { id: '10271', name: 'Arapaho' },
|
// { id: '10271', beskrivning: 'Arapaho' },
|
||||||
// { id: '10272', name: 'Araukiska' },
|
// { id: '10272', beskrivning: 'Araukiska' },
|
||||||
// { id: '10273', name: 'Arawak' },
|
// { id: '10273', beskrivning: 'Arawak' },
|
||||||
{ id: '249', name: 'Armeniska' },
|
{ id: '249', beskrivning: 'Armeniska' },
|
||||||
// { id: '10274', name: 'Artificiella, andra språk' },
|
// { id: '10274', beskrivning: 'Artificiella, andra språk' },
|
||||||
// { id: '250', name: 'Assamesiska' },
|
// { id: '250', beskrivning: 'Assamesiska' },
|
||||||
// { id: '10517', name: 'Assyriska' },
|
// { id: '10517', beskrivning: 'Assyriska' },
|
||||||
// { id: '10275', name: 'Athapaskspråk' },
|
// { id: '10275', beskrivning: 'Athapaskspråk' },
|
||||||
// { id: '10276', name: 'Australiska språk' },
|
// { id: '10276', beskrivning: 'Australiska språk' },
|
||||||
// { id: '10277', name: 'Austronesiska språk, andra' },
|
// { id: '10277', beskrivning: 'Austronesiska språk, andra' },
|
||||||
// { id: '10278', name: 'Avariska' },
|
// { id: '10278', beskrivning: 'Avariska' },
|
||||||
// { id: '10279', name: 'Avestiska' },
|
// { id: '10279', beskrivning: 'Avestiska' },
|
||||||
// { id: '10280', name: 'Awadhi' },
|
// { id: '10280', beskrivning: 'Awadhi' },
|
||||||
// { id: '251', name: 'Aymara' },
|
// { id: '251', beskrivning: 'Aymara' },
|
||||||
{ id: '252', name: 'Azerbajdzjanska' },
|
{ id: '252', beskrivning: 'Azerbajdzjanska' },
|
||||||
// { id: '10285', name: 'Balinesiska' },
|
// { id: '10285', beskrivning: 'Balinesiska' },
|
||||||
// { id: '10286', name: 'Baltiska språk, andra' },
|
// { id: '10286', beskrivning: 'Baltiska språk, andra' },
|
||||||
// { id: '253', name: 'Baluchiska' },
|
// { id: '253', beskrivning: 'Baluchiska' },
|
||||||
// { id: '254', name: 'Bambara' },
|
// { id: '254', beskrivning: 'Bambara' },
|
||||||
// { id: '10288', name: 'Bamilekespråk' },
|
// { id: '10288', beskrivning: 'Bamilekespråk' },
|
||||||
// { id: '255', name: 'Banda' },
|
// { id: '255', beskrivning: 'Banda' },
|
||||||
// { id: '256', name: 'Bantuspråk, andra' },
|
// { id: '256', beskrivning: 'Bantuspråk, andra' },
|
||||||
// { id: '10289', name: 'Basa' },
|
// { id: '10289', beskrivning: 'Basa' },
|
||||||
// { id: '257', name: 'Basjkiriska' },
|
// { id: '257', beskrivning: 'Basjkiriska' },
|
||||||
// { id: '258', name: 'Baskiska' },
|
// { id: '258', beskrivning: 'Baskiska' },
|
||||||
// { id: '10290', name: 'Batak (Indonésien)' },
|
// { id: '10290', beskrivning: 'Batak (Indonésien)' },
|
||||||
// { id: '10291', name: 'Bedja' },
|
// { id: '10291', beskrivning: 'Bedja' },
|
||||||
// { id: '259', name: 'Bemba' },
|
// { id: '259', beskrivning: 'Bemba' },
|
||||||
// { id: '260', name: 'Bengaliska' },
|
// { id: '260', beskrivning: 'Bengaliska' },
|
||||||
// { id: '261', name: 'Berberspråk, andra' },
|
// { id: '261', beskrivning: 'Berberspråk, andra' },
|
||||||
// { id: '281', name: 'Bhutanesiska' },
|
// { id: '281', beskrivning: 'Bhutanesiska' },
|
||||||
// { id: '263', name: 'Bihariska' },
|
// { id: '263', beskrivning: 'Bihariska' },
|
||||||
// { id: '10293', name: 'Bikol' },
|
// { id: '10293', beskrivning: 'Bikol' },
|
||||||
// { id: '10294', name: 'Bini' },
|
// { id: '10294', beskrivning: 'Bini' },
|
||||||
// { id: '262', name: 'Bislama' },
|
// { id: '262', beskrivning: 'Bislama' },
|
||||||
// { id: '10292', name: 'Bodjpuri' },
|
// { id: '10292', beskrivning: 'Bodjpuri' },
|
||||||
{ id: '265', name: 'Bosniska' },
|
{ id: '265', beskrivning: 'Bosniska' },
|
||||||
// { id: '10295', name: 'Braj' },
|
// { id: '10295', beskrivning: 'Braj' },
|
||||||
// { id: '10296', name: 'Bretonska' },
|
// { id: '10296', beskrivning: 'Bretonska' },
|
||||||
// { id: '10297', name: 'Buginesiska' },
|
// { id: '10297', beskrivning: 'Buginesiska' },
|
||||||
{ id: '266', name: 'Bulgariska' },
|
{ id: '266', beskrivning: 'Bulgariska' },
|
||||||
// { id: '10298', name: 'Burjatiska' },
|
// { id: '10298', beskrivning: 'Burjatiska' },
|
||||||
// { id: '267', name: 'Burmesiska' },
|
// { id: '267', beskrivning: 'Burmesiska' },
|
||||||
// { id: '10299', name: 'Caddo' },
|
// { id: '10299', beskrivning: 'Caddo' },
|
||||||
// { id: '269', name: 'Cebuano' },
|
// { id: '269', beskrivning: 'Cebuano' },
|
||||||
// { id: '10304', name: 'Centralamerikanska indianspråk, andra' },
|
// { id: '10304', beskrivning: 'Centralamerikanska indianspråk, andra' },
|
||||||
// { id: '10305', name: 'Chagatai' },
|
// { id: '10305', beskrivning: 'Chagatai' },
|
||||||
// { id: '10306', name: 'Chamiska språk' },
|
// { id: '10306', beskrivning: 'Chamiska språk' },
|
||||||
// { id: '10307', name: 'Chamorro' },
|
// { id: '10307', beskrivning: 'Chamorro' },
|
||||||
// { id: '10309', name: 'Cherokee' },
|
// { id: '10309', beskrivning: 'Cherokee' },
|
||||||
// { id: '10310', name: 'Cheyenne' },
|
// { id: '10310', beskrivning: 'Cheyenne' },
|
||||||
// { id: '10311', name: 'Chibcha' },
|
// { id: '10311', beskrivning: 'Chibcha' },
|
||||||
// { id: '10313', name: 'Chipewyan' },
|
// { id: '10313', beskrivning: 'Chipewyan' },
|
||||||
// { id: '10314', name: 'Choctaw' },
|
// { id: '10314', beskrivning: 'Choctaw' },
|
||||||
// { id: '10316', name: 'Chuukesiska' },
|
// { id: '10316', beskrivning: 'Chuukesiska' },
|
||||||
// { id: '10319', name: 'Cree' },
|
// { id: '10319', beskrivning: 'Cree' },
|
||||||
// { id: '10326', name: 'Dajak' },
|
// { id: '10326', beskrivning: 'Dajak' },
|
||||||
// { id: '10325', name: 'Dakota' },
|
// { id: '10325', beskrivning: 'Dakota' },
|
||||||
{ id: '274', name: 'Danska' },
|
{ id: '274', beskrivning: 'Danska' },
|
||||||
{ id: '10516', name: 'Dari' },
|
{ id: '10516', beskrivning: 'Dari' },
|
||||||
// { id: '10327', name: 'Delaware' },
|
// { id: '10327', beskrivning: 'Delaware' },
|
||||||
// { id: '277', name: 'Dinka' },
|
// { id: '277', beskrivning: 'Dinka' },
|
||||||
// { id: '278', name: 'Divehi' },
|
// { id: '278', beskrivning: 'Divehi' },
|
||||||
// { id: '10414', name: 'Diverse språk' },
|
// { id: '10414', beskrivning: 'Diverse språk' },
|
||||||
// { id: '10328', name: 'Dogri' },
|
// { id: '10328', beskrivning: 'Dogri' },
|
||||||
// { id: '10329', name: 'Dogrib' },
|
// { id: '10329', beskrivning: 'Dogrib' },
|
||||||
// { id: '10330', name: 'Dravidiska språk, andra' },
|
// { id: '10330', beskrivning: 'Dravidiska språk, andra' },
|
||||||
// { id: '10331', name: 'Duala' },
|
// { id: '10331', beskrivning: 'Duala' },
|
||||||
// { id: '280', name: 'Dyula' },
|
// { id: '280', beskrivning: 'Dyula' },
|
||||||
// { id: '282', name: 'Efik' },
|
// { id: '282', beskrivning: 'Efik' },
|
||||||
{ id: '10333', name: 'Egyptiska' },
|
{ id: '10333', beskrivning: 'Egyptiska' },
|
||||||
// { id: '10334', name: 'Ekajuk' },
|
// { id: '10334', beskrivning: 'Ekajuk' },
|
||||||
// { id: '10335', name: 'Elamitiska' },
|
// { id: '10335', beskrivning: 'Elamitiska' },
|
||||||
{ id: '283', name: 'Engelska' },
|
{ id: '283', beskrivning: 'Engelska' },
|
||||||
{ id: '10338', name: 'Esperanto' },
|
{ id: '10338', beskrivning: 'Esperanto' },
|
||||||
{ id: '285', name: 'Estniska' },
|
{ id: '285', beskrivning: 'Estniska' },
|
||||||
// { id: '286', name: 'Ewe' },
|
// { id: '286', beskrivning: 'Ewe' },
|
||||||
// { id: '10339', name: 'Éwondo' },
|
// { id: '10339', beskrivning: 'Éwondo' },
|
||||||
// { id: '287', name: 'Fang' },
|
// { id: '287', beskrivning: 'Fang' },
|
||||||
// { id: '288', name: 'Fanti' },
|
// { id: '288', beskrivning: 'Fanti' },
|
||||||
// { id: '289', name: 'Färöiska' },
|
// { id: '289', beskrivning: 'Färöiska' },
|
||||||
// { id: '291', name: 'Fidjianska' },
|
// { id: '291', beskrivning: 'Fidjianska' },
|
||||||
// { id: '10447', name: 'Filippinska språk, andra' },
|
// { id: '10447', beskrivning: 'Filippinska språk, andra' },
|
||||||
// { id: '10340', name: 'Finsk-ugriska språk, andra' },
|
// { id: '10340', beskrivning: 'Finsk-ugriska språk, andra' },
|
||||||
{ id: '292', name: 'Finska' },
|
{ id: '292', beskrivning: 'Finska' },
|
||||||
// { id: '10419', name: 'Flera språk' },
|
// { id: '10419', beskrivning: 'Flera språk' },
|
||||||
// { id: '293', name: 'Fon' },
|
// { id: '293', beskrivning: 'Fon' },
|
||||||
// { id: '10448', name: 'Fönikiska' },
|
// { id: '10448', beskrivning: 'Fönikiska' },
|
||||||
{ id: '295', name: 'Franska' },
|
{ id: '295', beskrivning: 'Franska' },
|
||||||
// { id: '296', name: 'Frisiska' },
|
// { id: '296', beskrivning: 'Frisiska' },
|
||||||
// { id: '10342', name: 'Friuliska' },
|
// { id: '10342', beskrivning: 'Friuliska' },
|
||||||
// { id: '298', name: 'Fulfulde' },
|
// { id: '298', beskrivning: 'Fulfulde' },
|
||||||
// { id: '300', name: 'Ga' },
|
// { id: '300', beskrivning: 'Ga' },
|
||||||
// { id: '304', name: 'Gaeliska (Skotsk)' },
|
// { id: '304', beskrivning: 'Gaeliska (Skotsk)' },
|
||||||
// { id: '301', name: 'Galiciska' },
|
// { id: '301', beskrivning: 'Galiciska' },
|
||||||
// { id: '10355', name: 'Gammalgrekiska' },
|
// { id: '10355', beskrivning: 'Gammalgrekiska' },
|
||||||
// { id: '10348', name: 'Gammalhögtyska' },
|
// { id: '10348', beskrivning: 'Gammalhögtyska' },
|
||||||
// { id: '10375', name: 'Gammaliriska' },
|
// { id: '10375', beskrivning: 'Gammaliriska' },
|
||||||
// { id: '10429', name: 'Gammalnorska' },
|
// { id: '10429', beskrivning: 'Gammalnorska' },
|
||||||
// { id: '10337', name: 'Gammelengelska' },
|
// { id: '10337', beskrivning: 'Gammelengelska' },
|
||||||
// { id: '10514', name: 'Gammelfranska' },
|
// { id: '10514', beskrivning: 'Gammelfranska' },
|
||||||
// { id: '10446', name: 'Gammelpersiska' },
|
// { id: '10446', beskrivning: 'Gammelpersiska' },
|
||||||
// { id: '10451', name: 'Gammelprovecanska' },
|
// { id: '10451', beskrivning: 'Gammelprovecanska' },
|
||||||
// { id: '362', name: 'Ganda' },
|
// { id: '362', beskrivning: 'Ganda' },
|
||||||
// { id: '10344', name: 'Gayo' },
|
// { id: '10344', beskrivning: 'Gayo' },
|
||||||
// { id: '10345', name: 'Gbaya' },
|
// { id: '10345', beskrivning: 'Gbaya' },
|
||||||
// { id: '10346', name: 'Geez' },
|
// { id: '10346', beskrivning: 'Geez' },
|
||||||
{ id: '305', name: 'Georgiska' },
|
{ id: '305', beskrivning: 'Georgiska' },
|
||||||
// { id: '10349', name: 'Germanska språk, andra' },
|
// { id: '10349', beskrivning: 'Germanska språk, andra' },
|
||||||
// { id: '318', name: 'Gilbertesiska' },
|
// { id: '318', beskrivning: 'Gilbertesiska' },
|
||||||
// { id: '10351', name: 'Gondi' },
|
// { id: '10351', beskrivning: 'Gondi' },
|
||||||
// { id: '10352', name: 'Gorontalo' },
|
// { id: '10352', beskrivning: 'Gorontalo' },
|
||||||
// { id: '10353', name: 'Gotiska' },
|
// { id: '10353', beskrivning: 'Gotiska' },
|
||||||
// { id: '10354', name: 'Grebo' },
|
// { id: '10354', beskrivning: 'Grebo' },
|
||||||
{ id: '306', name: 'Grekiska' },
|
{ id: '306', beskrivning: 'Grekiska' },
|
||||||
// { id: '307', name: 'Grönländska' },
|
// { id: '307', beskrivning: 'Grönländska' },
|
||||||
// { id: '308', name: 'Guarani' },
|
// { id: '308', beskrivning: 'Guarani' },
|
||||||
// { id: '309', name: 'Gujarati' },
|
// { id: '309', beskrivning: 'Gujarati' },
|
||||||
// { id: '10356', name: "Gwich'in" },
|
// { id: '10356', beskrivning: "Gwich'in" },
|
||||||
// { id: '10357', name: 'Haida' },
|
// { id: '10357', beskrivning: 'Haida' },
|
||||||
// { id: '313', name: 'Hausa' },
|
// { id: '313', beskrivning: 'Hausa' },
|
||||||
// { id: '10358', name: 'Hawaiiska' },
|
// { id: '10358', beskrivning: 'Hawaiiska' },
|
||||||
// { id: '314', name: 'Hebreiska' },
|
// { id: '314', beskrivning: 'Hebreiska' },
|
||||||
// { id: '315', name: 'Herero' },
|
// { id: '315', beskrivning: 'Herero' },
|
||||||
// { id: '10362', name: 'Hettittiska' },
|
// { id: '10362', beskrivning: 'Hettittiska' },
|
||||||
// { id: '10359', name: 'Hiligaynon' },
|
// { id: '10359', beskrivning: 'Hiligaynon' },
|
||||||
// { id: '10360', name: 'Himachali' },
|
// { id: '10360', beskrivning: 'Himachali' },
|
||||||
{ id: '316', name: 'Hindi' },
|
{ id: '316', beskrivning: 'Hindi' },
|
||||||
// { id: '10361', name: 'Hiri Motu' },
|
// { id: '10361', beskrivning: 'Hiri Motu' },
|
||||||
// { id: '10363', name: 'Hmong' },
|
// { id: '10363', beskrivning: 'Hmong' },
|
||||||
// { id: '10364', name: 'Hupa' },
|
// { id: '10364', beskrivning: 'Hupa' },
|
||||||
// { id: '10365', name: 'Iban' },
|
// { id: '10365', beskrivning: 'Iban' },
|
||||||
// { id: '317', name: 'Igbo' },
|
// { id: '317', beskrivning: 'Igbo' },
|
||||||
// { id: '10366', name: 'Ijo' },
|
// { id: '10366', beskrivning: 'Ijo' },
|
||||||
// { id: '10367', name: 'Iloko' },
|
// { id: '10367', beskrivning: 'Iloko' },
|
||||||
// { id: '10369', name: 'Indo-europeiska språk, andra' },
|
// { id: '10369', beskrivning: 'Indo-europeiska språk, andra' },
|
||||||
// { id: '10368', name: 'Indo-iranska språk, andra' },
|
// { id: '10368', beskrivning: 'Indo-iranska språk, andra' },
|
||||||
// { id: '319', name: 'Indonesiska' },
|
// { id: '319', beskrivning: 'Indonesiska' },
|
||||||
// { id: '10370', name: 'Interlingua' },
|
// { id: '10370', beskrivning: 'Interlingua' },
|
||||||
// { id: '10371', name: 'Inuktitut' },
|
// { id: '10371', beskrivning: 'Inuktitut' },
|
||||||
// { id: '10372', name: 'Inupiak' },
|
// { id: '10372', beskrivning: 'Inupiak' },
|
||||||
// { id: '10373', name: 'Iranska språk, andra' },
|
// { id: '10373', beskrivning: 'Iranska språk, andra' },
|
||||||
// { id: '320', name: 'Iriska' },
|
// { id: '320', beskrivning: 'Iriska' },
|
||||||
// { id: '10376', name: 'Irokesarspråk' },
|
// { id: '10376', beskrivning: 'Irokesarspråk' },
|
||||||
// { id: '321', name: 'Isländska' },
|
// { id: '321', beskrivning: 'Isländska' },
|
||||||
{ id: '322', name: 'Italienska' },
|
{ id: '322', beskrivning: 'Italienska' },
|
||||||
// { id: '10506', name: 'Jakutiska' },
|
// { id: '10506', beskrivning: 'Jakutiska' },
|
||||||
// { id: '323', name: 'Japanska' },
|
// { id: '323', beskrivning: 'Japanska' },
|
||||||
// { id: '324', name: 'Javanesiska' },
|
// { id: '324', beskrivning: 'Javanesiska' },
|
||||||
// { id: '325', name: 'Jiddisch' },
|
// { id: '325', beskrivning: 'Jiddisch' },
|
||||||
// { id: '10377', name: 'Judeo-arabisk' },
|
// { id: '10377', beskrivning: 'Judeo-arabisk' },
|
||||||
// { id: '10378', name: 'Judeo-persiska' },
|
// { id: '10378', beskrivning: 'Judeo-persiska' },
|
||||||
// { id: '327', name: 'Kabyliska' },
|
// { id: '327', beskrivning: 'Kabyliska' },
|
||||||
// { id: '10379', name: 'Kachin' },
|
// { id: '10379', beskrivning: 'Kachin' },
|
||||||
// { id: '10518', name: 'Kaldeiska' },
|
// { id: '10518', beskrivning: 'Kaldeiska' },
|
||||||
// { id: '329', name: 'Kamba' },
|
// { id: '329', beskrivning: 'Kamba' },
|
||||||
// { id: '330', name: 'Kanaresiska' },
|
// { id: '330', beskrivning: 'Kanaresiska' },
|
||||||
// { id: '332', name: 'Kanuri' },
|
// { id: '332', beskrivning: 'Kanuri' },
|
||||||
// { id: '10381', name: 'Karakalpak' },
|
// { id: '10381', beskrivning: 'Karakalpak' },
|
||||||
// { id: '333', name: 'Karen' },
|
// { id: '333', beskrivning: 'Karen' },
|
||||||
// { id: '10300', name: 'Karibiska' },
|
// { id: '10300', beskrivning: 'Karibiska' },
|
||||||
// { id: '334', name: 'Kasmiriska' },
|
// { id: '334', beskrivning: 'Kasmiriska' },
|
||||||
// { id: '335', name: 'Katalanska' },
|
// { id: '335', beskrivning: 'Katalanska' },
|
||||||
// { id: '10302', name: 'Kaukasiska språk, andra' },
|
// { id: '10302', beskrivning: 'Kaukasiska språk, andra' },
|
||||||
// { id: '10383', name: 'Kawi' },
|
// { id: '10383', beskrivning: 'Kawi' },
|
||||||
// { id: '337', name: 'Kazakiska' },
|
// { id: '337', beskrivning: 'Kazakiska' },
|
||||||
// { id: '10303', name: 'Keltiska språk, andra' },
|
// { id: '10303', beskrivning: 'Keltiska språk, andra' },
|
||||||
// { id: '10384', name: 'Khasi' },
|
// { id: '10384', beskrivning: 'Khasi' },
|
||||||
// { id: '338', name: 'Khmer' },
|
// { id: '338', beskrivning: 'Khmer' },
|
||||||
// { id: '10385', name: 'Khoisanspråk, andra' },
|
// { id: '10385', beskrivning: 'Khoisanspråk, andra' },
|
||||||
// { id: '10386', name: 'Khotanesiska' },
|
// { id: '10386', beskrivning: 'Khotanesiska' },
|
||||||
// { id: '353', name: 'Kikuyu' },
|
// { id: '353', beskrivning: 'Kikuyu' },
|
||||||
// { id: '10388', name: 'Kimbundu' },
|
// { id: '10388', beskrivning: 'Kimbundu' },
|
||||||
{ id: '339', name: 'Kinesiska' },
|
{ id: '339', beskrivning: 'Kinesiska' },
|
||||||
// { id: '340', name: 'Kinyarwanda' },
|
// { id: '340', beskrivning: 'Kinyarwanda' },
|
||||||
// { id: '341', name: 'Kirgisiska' },
|
// { id: '341', beskrivning: 'Kirgisiska' },
|
||||||
// { id: '342', name: 'Kirundi' },
|
// { id: '342', beskrivning: 'Kirundi' },
|
||||||
// { id: '10389', name: 'Komi' },
|
// { id: '10389', beskrivning: 'Komi' },
|
||||||
// { id: '343', name: 'Kongo' },
|
// { id: '343', beskrivning: 'Kongo' },
|
||||||
// { id: '344', name: 'Konkani' },
|
// { id: '344', beskrivning: 'Konkani' },
|
||||||
// { id: '10317', name: 'Koptiska' },
|
// { id: '10317', beskrivning: 'Koptiska' },
|
||||||
// { id: '345', name: 'Koreanska' },
|
// { id: '345', beskrivning: 'Koreanska' },
|
||||||
// { id: '10318', name: 'Korniska' },
|
// { id: '10318', beskrivning: 'Korniska' },
|
||||||
// { id: '346', name: 'Korsikanska' },
|
// { id: '346', beskrivning: 'Korsikanska' },
|
||||||
// { id: '10390', name: 'Kosraeiska' },
|
// { id: '10390', beskrivning: 'Kosraeiska' },
|
||||||
// { id: '10391', name: 'Kpelle' },
|
// { id: '10391', beskrivning: 'Kpelle' },
|
||||||
// { id: '348', name: 'Kreolska o pidginspråk, portugisisk-baserade,andra' },
|
// { id: '348', beskrivning: 'Kreolska o pidginspråk, portugisisk-baserade,andra' },
|
||||||
// { id: '10321', name: 'Kreolska och pidginspråk, andra' },
|
// { id: '10321', beskrivning: 'Kreolska och pidginspråk, andra' },
|
||||||
// { id: '10322', name: 'Kreolska och pidginspråk, engelsk-baserade, andra' },
|
// { id: '10322', beskrivning: 'Kreolska och pidginspråk, engelsk-baserade, andra' },
|
||||||
// { id: '10323', name: 'Kreolska och pidginspråk, fransk-baserade, andra' },
|
// { id: '10323', beskrivning: 'Kreolska och pidginspråk, fransk-baserade, andra' },
|
||||||
// { id: '350', name: 'Kroatiska' },
|
// { id: '350', beskrivning: 'Kroatiska' },
|
||||||
// { id: '351', name: 'Kru' },
|
// { id: '351', beskrivning: 'Kru' },
|
||||||
// { id: '10392', name: 'Kuanyama' },
|
// { id: '10392', beskrivning: 'Kuanyama' },
|
||||||
// { id: '10393', name: 'Kumykiska' },
|
// { id: '10393', beskrivning: 'Kumykiska' },
|
||||||
{ id: '352', name: 'Kurdiska' },
|
{ id: '352', beskrivning: 'Kurdiska' },
|
||||||
// { id: '10394', name: 'Kurukh' },
|
// { id: '10394', beskrivning: 'Kurukh' },
|
||||||
// { id: '10324', name: 'Kusjittiska språk, andra' },
|
// { id: '10324', beskrivning: 'Kusjittiska språk, andra' },
|
||||||
// { id: '10395', name: 'Kutenai' },
|
// { id: '10395', beskrivning: 'Kutenai' },
|
||||||
// { id: '10315', name: 'Kyrkslaviska' },
|
// { id: '10315', beskrivning: 'Kyrkslaviska' },
|
||||||
// { id: '10396', name: 'Ladino' },
|
// { id: '10396', beskrivning: 'Ladino' },
|
||||||
// { id: '10397', name: 'Lahnda' },
|
// { id: '10397', beskrivning: 'Lahnda' },
|
||||||
// { id: '357', name: 'Lamba' },
|
// { id: '357', beskrivning: 'Lamba' },
|
||||||
// { id: '355', name: 'Lao' },
|
// { id: '355', beskrivning: 'Lao' },
|
||||||
// { id: '10400', name: 'Latin' },
|
// { id: '10400', beskrivning: 'Latin' },
|
||||||
// { id: '10401', name: 'Lesgiska' },
|
// { id: '10401', beskrivning: 'Lesgiska' },
|
||||||
// { id: '356', name: 'Lettiska' },
|
// { id: '356', beskrivning: 'Lettiska' },
|
||||||
// { id: '358', name: 'Lingala' },
|
// { id: '358', beskrivning: 'Lingala' },
|
||||||
// { id: '359', name: 'Litauiska' },
|
// { id: '359', beskrivning: 'Litauiska' },
|
||||||
// { id: '360', name: 'Lozi' },
|
// { id: '360', beskrivning: 'Lozi' },
|
||||||
// { id: '361', name: 'Luba-Katanga' },
|
// { id: '361', beskrivning: 'Luba-Katanga' },
|
||||||
// { id: '10402', name: 'Luba-Lulua' },
|
// { id: '10402', beskrivning: 'Luba-Lulua' },
|
||||||
// { id: '10403', name: 'Luiseno' },
|
// { id: '10403', beskrivning: 'Luiseno' },
|
||||||
// { id: '364', name: 'Lunda' },
|
// { id: '364', beskrivning: 'Lunda' },
|
||||||
// { id: '365', name: 'Luo (Kenya och Tanzania)' },
|
// { id: '365', beskrivning: 'Luo (Kenya och Tanzania)' },
|
||||||
// { id: '10404', name: 'Lushai' },
|
// { id: '10404', beskrivning: 'Lushai' },
|
||||||
// { id: '368', name: 'Luxemburgiska' },
|
// { id: '368', beskrivning: 'Luxemburgiska' },
|
||||||
// { id: '369', name: 'Maduresiska' },
|
// { id: '369', beskrivning: 'Maduresiska' },
|
||||||
// { id: '10405', name: 'Magahi' },
|
// { id: '10405', beskrivning: 'Magahi' },
|
||||||
// { id: '10406', name: 'Maithili' },
|
// { id: '10406', beskrivning: 'Maithili' },
|
||||||
// { id: '10407', name: 'Makassar' },
|
// { id: '10407', beskrivning: 'Makassar' },
|
||||||
// { id: '370', name: 'Makedonska' },
|
// { id: '370', beskrivning: 'Makedonska' },
|
||||||
// { id: '372', name: 'Malagassiska' },
|
// { id: '372', beskrivning: 'Malagassiska' },
|
||||||
// { id: '373', name: 'Malajiska' },
|
// { id: '373', beskrivning: 'Malajiska' },
|
||||||
// { id: '374', name: 'Malayalam' },
|
// { id: '374', beskrivning: 'Malayalam' },
|
||||||
// { id: '376', name: 'Maltesiska' },
|
// { id: '376', beskrivning: 'Maltesiska' },
|
||||||
// { id: '377', name: 'Mandarin' },
|
// { id: '377', beskrivning: 'Mandarin' },
|
||||||
// { id: '10408', name: 'Mandingo' },
|
// { id: '10408', beskrivning: 'Mandingo' },
|
||||||
// { id: '10409', name: 'Manipuriska' },
|
// { id: '10409', beskrivning: 'Manipuriska' },
|
||||||
// { id: '10410', name: 'Manobospråk' },
|
// { id: '10410', beskrivning: 'Manobospråk' },
|
||||||
// { id: '381', name: 'Manx' },
|
// { id: '381', beskrivning: 'Manx' },
|
||||||
// { id: '382', name: 'Maori' },
|
// { id: '382', beskrivning: 'Maori' },
|
||||||
// { id: '383', name: 'Marathi' },
|
// { id: '383', beskrivning: 'Marathi' },
|
||||||
// { id: '384', name: 'Mariska' },
|
// { id: '384', beskrivning: 'Mariska' },
|
||||||
// { id: '10411', name: 'Marshalliska' },
|
// { id: '10411', beskrivning: 'Marshalliska' },
|
||||||
// { id: '385', name: 'Marwariska' },
|
// { id: '385', beskrivning: 'Marwariska' },
|
||||||
// { id: '386', name: 'Masai' },
|
// { id: '386', beskrivning: 'Masai' },
|
||||||
// { id: '387', name: 'Maya' },
|
// { id: '387', beskrivning: 'Maya' },
|
||||||
// { id: '10515', name: 'Meänkieli/Tornedalsfinska' },
|
// { id: '10515', beskrivning: 'Meänkieli/Tornedalsfinska' },
|
||||||
// { id: '10336', name: 'Medelengelska' },
|
// { id: '10336', beskrivning: 'Medelengelska' },
|
||||||
// { id: '10341', name: 'Medelfranska' },
|
// { id: '10341', beskrivning: 'Medelfranska' },
|
||||||
// { id: '10347', name: 'Medelhögtyska' },
|
// { id: '10347', beskrivning: 'Medelhögtyska' },
|
||||||
// { id: '10374', name: 'Medelirisk' },
|
// { id: '10374', beskrivning: 'Medelirisk' },
|
||||||
// { id: '10332', name: 'Medelnederländska' },
|
// { id: '10332', beskrivning: 'Medelnederländska' },
|
||||||
// { id: '388', name: 'Mende' },
|
// { id: '388', beskrivning: 'Mende' },
|
||||||
// { id: '10412', name: 'Micmac' },
|
// { id: '10412', beskrivning: 'Micmac' },
|
||||||
// { id: '10413', name: 'Minangkabau' },
|
// { id: '10413', beskrivning: 'Minangkabau' },
|
||||||
// { id: '10415', name: 'Mohawk' },
|
// { id: '10415', beskrivning: 'Mohawk' },
|
||||||
// { id: '390', name: 'Moldaviska' },
|
// { id: '390', beskrivning: 'Moldaviska' },
|
||||||
// { id: '10417', name: 'Mongo' },
|
// { id: '10417', beskrivning: 'Mongo' },
|
||||||
// { id: '391', name: 'Mongolska' },
|
// { id: '391', beskrivning: 'Mongolska' },
|
||||||
// { id: '10416', name: 'Monkhmerspråk, andra' },
|
// { id: '10416', beskrivning: 'Monkhmerspråk, andra' },
|
||||||
// { id: '393', name: 'Mossi' },
|
// { id: '393', beskrivning: 'Mossi' },
|
||||||
// { id: '10420', name: 'Mundspråk' },
|
// { id: '10420', beskrivning: 'Mundspråk' },
|
||||||
// { id: '10320', name: 'Muskogee' },
|
// { id: '10320', beskrivning: 'Muskogee' },
|
||||||
// { id: '397', name: 'Nauhatl' },
|
// { id: '397', beskrivning: 'Nauhatl' },
|
||||||
// { id: '399', name: 'Nauriska' },
|
// { id: '399', beskrivning: 'Nauriska' },
|
||||||
// { id: '398', name: 'Nauru' },
|
// { id: '398', beskrivning: 'Nauru' },
|
||||||
// { id: '400', name: 'Ndebele Nord' },
|
// { id: '400', beskrivning: 'Ndebele Nord' },
|
||||||
// { id: '10422', name: 'Ndebele Syd' },
|
// { id: '10422', beskrivning: 'Ndebele Syd' },
|
||||||
// { id: '10423', name: 'Ndonga' },
|
// { id: '10423', beskrivning: 'Ndonga' },
|
||||||
{ id: '401', name: 'Nederländska' },
|
{ id: '401', beskrivning: 'Nederländska' },
|
||||||
// { id: '402', name: 'Nepalesiska' },
|
// { id: '402', beskrivning: 'Nepalesiska' },
|
||||||
// { id: '10424', name: 'Newari' },
|
// { id: '10424', beskrivning: 'Newari' },
|
||||||
// { id: '10425', name: 'Nias' },
|
// { id: '10425', beskrivning: 'Nias' },
|
||||||
// { id: '10426', name: 'Niger-Kordofanspråk, andra' },
|
// { id: '10426', beskrivning: 'Niger-Kordofanspråk, andra' },
|
||||||
// { id: '10427', name: 'Nilsahariska, andra' },
|
// { id: '10427', beskrivning: 'Nilsahariska, andra' },
|
||||||
// { id: '10428', name: 'Niuea' },
|
// { id: '10428', beskrivning: 'Niuea' },
|
||||||
// { id: '10430', name: 'Nordamerikanska indianerspråk, andra' },
|
// { id: '10430', beskrivning: 'Nordamerikanska indianerspråk, andra' },
|
||||||
// { id: '10475', name: 'Nordsotho' },
|
// { id: '10475', beskrivning: 'Nordsotho' },
|
||||||
{ id: '404', name: 'Norska' },
|
{ id: '404', beskrivning: 'Norska' },
|
||||||
// { id: '10431', name: 'Nubiska språk' },
|
// { id: '10431', beskrivning: 'Nubiska språk' },
|
||||||
// { id: '405', name: 'Nyamwezi' },
|
// { id: '405', beskrivning: 'Nyamwezi' },
|
||||||
// { id: '406', name: 'Nyanja' },
|
// { id: '406', beskrivning: 'Nyanja' },
|
||||||
// { id: '10432', name: 'Nyankole' },
|
// { id: '10432', beskrivning: 'Nyankole' },
|
||||||
// { id: '10433', name: 'Nyoro' },
|
// { id: '10433', beskrivning: 'Nyoro' },
|
||||||
// { id: '10434', name: 'Nzima' },
|
// { id: '10434', beskrivning: 'Nzima' },
|
||||||
// { id: '407', name: 'Occitanska' },
|
// { id: '407', beskrivning: 'Occitanska' },
|
||||||
// { id: '10435', name: 'Ojibwa' },
|
// { id: '10435', beskrivning: 'Ojibwa' },
|
||||||
// { id: '408', name: 'Oriya' },
|
// { id: '408', beskrivning: 'Oriya' },
|
||||||
// { id: '409', name: 'Oromo' },
|
// { id: '409', beskrivning: 'Oromo' },
|
||||||
// { id: '10436', name: 'Osage' },
|
// { id: '10436', beskrivning: 'Osage' },
|
||||||
// { id: '10437', name: 'Ossetiska' },
|
// { id: '10437', beskrivning: 'Ossetiska' },
|
||||||
// { id: '10438', name: 'Oto-manguespråk' },
|
// { id: '10438', beskrivning: 'Oto-manguespråk' },
|
||||||
// { id: '10492', name: 'Ottomanturkiska' },
|
// { id: '10492', beskrivning: 'Ottomanturkiska' },
|
||||||
// { id: '10439', name: 'Pahlavi' },
|
// { id: '10439', beskrivning: 'Pahlavi' },
|
||||||
// { id: '10440', name: 'Palauiska' },
|
// { id: '10440', beskrivning: 'Palauiska' },
|
||||||
// { id: '10441', name: 'Pali' },
|
// { id: '10441', beskrivning: 'Pali' },
|
||||||
// { id: '10442', name: 'Pampanggo' },
|
// { id: '10442', beskrivning: 'Pampanggo' },
|
||||||
// { id: '10443', name: 'Pangasinan' },
|
// { id: '10443', beskrivning: 'Pangasinan' },
|
||||||
// { id: '10444', name: 'Papiamento' },
|
// { id: '10444', beskrivning: 'Papiamento' },
|
||||||
// { id: '10445', name: 'Papuanska språk, andra' },
|
// { id: '10445', beskrivning: 'Papuanska språk, andra' },
|
||||||
{ id: '412', name: 'Pashto' },
|
{ id: '412', beskrivning: 'Pashto' },
|
||||||
{ id: '414', name: 'Persiska (Farsi)' },
|
{ id: '414', beskrivning: 'Persiska (Farsi)' },
|
||||||
// { id: '10449', name: 'Pohnpei' },
|
// { id: '10449', beskrivning: 'Pohnpei' },
|
||||||
{ id: '415', name: 'Polska' },
|
{ id: '415', beskrivning: 'Polska' },
|
||||||
{ id: '416', name: 'Portugisiska' },
|
{ id: '416', beskrivning: 'Portugisiska' },
|
||||||
// { id: '10450', name: 'Prakrit' },
|
// { id: '10450', beskrivning: 'Prakrit' },
|
||||||
// { id: '417', name: 'Punjabi/Panjabo' },
|
// { id: '417', beskrivning: 'Punjabi/Panjabo' },
|
||||||
// { id: '418', name: 'Quechua' },
|
// { id: '418', beskrivning: 'Quechua' },
|
||||||
// { id: '10453', name: 'Rajasthanisja; marwariska' },
|
// { id: '10453', beskrivning: 'Rajasthanisja; marwariska' },
|
||||||
// { id: '10454', name: 'Rapanui' },
|
// { id: '10454', beskrivning: 'Rapanui' },
|
||||||
// { id: '10455', name: 'Rarotonga' },
|
// { id: '10455', beskrivning: 'Rarotonga' },
|
||||||
// { id: '420', name: 'Retoromanska' },
|
// { id: '420', beskrivning: 'Retoromanska' },
|
||||||
// { id: '421', name: 'Romani' },
|
// { id: '421', beskrivning: 'Romani' },
|
||||||
// { id: '10456', name: 'Romanska språk, andra' },
|
// { id: '10456', beskrivning: 'Romanska språk, andra' },
|
||||||
// { id: '422', name: 'Rumänska' },
|
// { id: '422', beskrivning: 'Rumänska' },
|
||||||
{ id: '424', name: 'Ryska' },
|
{ id: '424', beskrivning: 'Ryska' },
|
||||||
// { id: '10519', name: 'Saho' },
|
// { id: '10519', beskrivning: 'Saho' },
|
||||||
// { id: '10458', name: 'Saliska språk' },
|
// { id: '10458', beskrivning: 'Saliska språk' },
|
||||||
// { id: '10459', name: 'Samaritansk aramaiska' },
|
// { id: '10459', beskrivning: 'Samaritansk aramaiska' },
|
||||||
// { id: '425', name: 'Samiska' },
|
// { id: '425', beskrivning: 'Samiska' },
|
||||||
// { id: '426', name: 'Samoanska' },
|
// { id: '426', beskrivning: 'Samoanska' },
|
||||||
// { id: '10460', name: 'Sandawe' },
|
// { id: '10460', beskrivning: 'Sandawe' },
|
||||||
// { id: '427', name: 'Sango' },
|
// { id: '427', beskrivning: 'Sango' },
|
||||||
// { id: '10461', name: 'Sanskrit' },
|
// { id: '10461', beskrivning: 'Sanskrit' },
|
||||||
// { id: '428', name: 'Santali' },
|
// { id: '428', beskrivning: 'Santali' },
|
||||||
// { id: '430', name: 'Sardiska/Sardiniska' },
|
// { id: '430', beskrivning: 'Sardiska/Sardiniska' },
|
||||||
// { id: '10462', name: 'Sasak' },
|
// { id: '10462', beskrivning: 'Sasak' },
|
||||||
// { id: '10463', name: 'Selkupiska' },
|
// { id: '10463', beskrivning: 'Selkupiska' },
|
||||||
// { id: '10464', name: 'Semitiska språk, andra' },
|
// { id: '10464', beskrivning: 'Semitiska språk, andra' },
|
||||||
// { id: '432', name: 'Serbiska' },
|
// { id: '432', beskrivning: 'Serbiska' },
|
||||||
// { id: '10465', name: 'Serer' },
|
// { id: '10465', beskrivning: 'Serer' },
|
||||||
// { id: '434', name: 'Sesotho/Sesuto/Sotho' },
|
// { id: '434', beskrivning: 'Sesotho/Sesuto/Sotho' },
|
||||||
// { id: '10466', name: 'Shan' },
|
// { id: '10466', beskrivning: 'Shan' },
|
||||||
// { id: '438', name: 'Shona' },
|
// { id: '438', beskrivning: 'Shona' },
|
||||||
// { id: '10467', name: 'Sidamo' },
|
// { id: '10467', beskrivning: 'Sidamo' },
|
||||||
// { id: '10468', name: 'Siksika' },
|
// { id: '10468', beskrivning: 'Siksika' },
|
||||||
// { id: '440', name: 'Sindhi' },
|
// { id: '440', beskrivning: 'Sindhi' },
|
||||||
// { id: '441', name: 'Singalesiska/Sinhala' },
|
// { id: '441', beskrivning: 'Singalesiska/Sinhala' },
|
||||||
// { id: '10469', name: 'Sinotibetanska språk, andra' },
|
// { id: '10469', beskrivning: 'Sinotibetanska språk, andra' },
|
||||||
// { id: '10470', name: 'Sioux-språk' },
|
// { id: '10470', beskrivning: 'Sioux-språk' },
|
||||||
// { id: '444', name: 'Skotska' },
|
// { id: '444', beskrivning: 'Skotska' },
|
||||||
// { id: '10471', name: 'Slaviska (Athapascaniska)' },
|
// { id: '10471', beskrivning: 'Slaviska (Athapascaniska)' },
|
||||||
// { id: '10472', name: 'Slaviska språk, andra' },
|
// { id: '10472', beskrivning: 'Slaviska språk, andra' },
|
||||||
// { id: '445', name: 'Slovakiska' },
|
// { id: '445', beskrivning: 'Slovakiska' },
|
||||||
// { id: '446', name: 'Slovenska' },
|
// { id: '446', beskrivning: 'Slovenska' },
|
||||||
// { id: '10473', name: 'Sogdiska' },
|
// { id: '10473', beskrivning: 'Sogdiska' },
|
||||||
{ id: '447', name: 'Somaliska' },
|
{ id: '447', beskrivning: 'Somaliska' },
|
||||||
// { id: '448', name: 'Songhai' },
|
// { id: '448', beskrivning: 'Songhai' },
|
||||||
// { id: '10474', name: 'Soninke' },
|
// { id: '10474', beskrivning: 'Soninke' },
|
||||||
// { id: '450', name: 'Sorbiska språk' },
|
// { id: '450', beskrivning: 'Sorbiska språk' },
|
||||||
{ id: '451', name: 'Spanska' },
|
{ id: '451', beskrivning: 'Spanska' },
|
||||||
// { id: '10477', name: 'Sukuma' },
|
// { id: '10477', beskrivning: 'Sukuma' },
|
||||||
// { id: '10478', name: 'Sumeriska' },
|
// { id: '10478', beskrivning: 'Sumeriska' },
|
||||||
// { id: '10479', name: 'Sundanesiska' },
|
// { id: '10479', beskrivning: 'Sundanesiska' },
|
||||||
// { id: '453', name: 'Susu' },
|
// { id: '453', beskrivning: 'Susu' },
|
||||||
{ id: '502', name: 'Svenska' },
|
{ id: '502', beskrivning: 'Svenska' },
|
||||||
// { id: '455', name: 'Swahili' },
|
// { id: '455', beskrivning: 'Swahili' },
|
||||||
// { id: '442', name: 'Swazi/Swati' },
|
// { id: '442', beskrivning: 'Swazi/Swati' },
|
||||||
// { id: '10476', name: 'Sydamerikanska indianspråk, andra' },
|
// { id: '10476', beskrivning: 'Sydamerikanska indianspråk, andra' },
|
||||||
// { id: '457', name: 'Syrianska' },
|
// { id: '457', beskrivning: 'Syrianska' },
|
||||||
// { id: '458', name: 'Tadjikiska' },
|
// { id: '458', beskrivning: 'Tadjikiska' },
|
||||||
// { id: '459', name: 'Tagalog' },
|
// { id: '459', beskrivning: 'Tagalog' },
|
||||||
// { id: '460', name: 'Tahitiska' },
|
// { id: '460', beskrivning: 'Tahitiska' },
|
||||||
// { id: '461', name: 'Tamashek' },
|
// { id: '461', beskrivning: 'Tamashek' },
|
||||||
// { id: '463', name: 'Tamil/Tamilska' },
|
// { id: '463', beskrivning: 'Tamil/Tamilska' },
|
||||||
// { id: '465', name: 'Tatariska' },
|
// { id: '465', beskrivning: 'Tatariska' },
|
||||||
// { id: '503', name: 'Teckenspråk' },
|
// { id: '503', beskrivning: 'Teckenspråk' },
|
||||||
// { id: '466', name: 'Telugu' },
|
// { id: '466', beskrivning: 'Telugu' },
|
||||||
// { id: '10481', name: 'Tereno' },
|
// { id: '10481', beskrivning: 'Tereno' },
|
||||||
// { id: '10482', name: 'Tetum' },
|
// { id: '10482', beskrivning: 'Tetum' },
|
||||||
// { id: '469', name: 'Thailändska' },
|
// { id: '469', beskrivning: 'Thailändska' },
|
||||||
// { id: '10480', name: 'Thaispråk, andra' },
|
// { id: '10480', beskrivning: 'Thaispråk, andra' },
|
||||||
// { id: '470', name: 'Tibetanska' },
|
// { id: '470', beskrivning: 'Tibetanska' },
|
||||||
// { id: '471', name: 'Tigre' },
|
// { id: '471', beskrivning: 'Tigre' },
|
||||||
// { id: '472', name: 'Tigrinja/Tigrinska' },
|
// { id: '472', beskrivning: 'Tigrinja/Tigrinska' },
|
||||||
// { id: '467', name: 'Timne' },
|
// { id: '467', beskrivning: 'Timne' },
|
||||||
// { id: '10484', name: 'Tiv' },
|
// { id: '10484', beskrivning: 'Tiv' },
|
||||||
// { id: '473', name: 'Tjeckiska' },
|
// { id: '473', beskrivning: 'Tjeckiska' },
|
||||||
// { id: '10308', name: 'Tjetjenska' },
|
// { id: '10308', beskrivning: 'Tjetjenska' },
|
||||||
// { id: '475', name: 'Tjuvasjiska' },
|
// { id: '475', beskrivning: 'Tjuvasjiska' },
|
||||||
// { id: '10485', name: 'Tlingit' },
|
// { id: '10485', beskrivning: 'Tlingit' },
|
||||||
// { id: '476', name: 'Tok Pisin' },
|
// { id: '476', beskrivning: 'Tok Pisin' },
|
||||||
// { id: '10486', name: 'Tokelau' },
|
// { id: '10486', beskrivning: 'Tokelau' },
|
||||||
// { id: '477', name: 'Tonga (Nyasa)' },
|
// { id: '477', beskrivning: 'Tonga (Nyasa)' },
|
||||||
// { id: '10487', name: 'Tonganska' },
|
// { id: '10487', beskrivning: 'Tonganska' },
|
||||||
// { id: '10488', name: 'Tsimshian' },
|
// { id: '10488', beskrivning: 'Tsimshian' },
|
||||||
// { id: '10312', name: 'Tsjinuksjargong' },
|
// { id: '10312', beskrivning: 'Tsjinuksjargong' },
|
||||||
// { id: '10489', name: 'Tsonga' },
|
// { id: '10489', beskrivning: 'Tsonga' },
|
||||||
// { id: '435', name: 'Tswana' },
|
// { id: '435', beskrivning: 'Tswana' },
|
||||||
// { id: '10491', name: 'Tumbuka' },
|
// { id: '10491', beskrivning: 'Tumbuka' },
|
||||||
// { id: '481', name: 'Turkiska' },
|
// { id: '481', beskrivning: 'Turkiska' },
|
||||||
// { id: '482', name: 'Turkmenska' },
|
// { id: '482', beskrivning: 'Turkmenska' },
|
||||||
// { id: '10493', name: 'Tuvalu' },
|
// { id: '10493', beskrivning: 'Tuvalu' },
|
||||||
// { id: '10494', name: 'Tuvinska' },
|
// { id: '10494', beskrivning: 'Tuvinska' },
|
||||||
// { id: '483', name: 'Twi' },
|
// { id: '483', beskrivning: 'Twi' },
|
||||||
{ id: '484', name: 'Tyska' },
|
{ id: '484', beskrivning: 'Tyska' },
|
||||||
// { id: '10495', name: 'Ugaritiska' },
|
// { id: '10495', beskrivning: 'Ugaritiska' },
|
||||||
// { id: '485', name: 'Uiguriska' },
|
// { id: '485', beskrivning: 'Uiguriska' },
|
||||||
// { id: '486', name: 'Ukrainska' },
|
// { id: '486', beskrivning: 'Ukrainska' },
|
||||||
// { id: '487', name: 'Umbundu' },
|
// { id: '487', beskrivning: 'Umbundu' },
|
||||||
// { id: '488', name: 'Ungerska' },
|
// { id: '488', beskrivning: 'Ungerska' },
|
||||||
// { id: '489', name: 'Urdu' },
|
// { id: '489', beskrivning: 'Urdu' },
|
||||||
// { id: '491', name: 'Uzbekiska' },
|
// { id: '491', beskrivning: 'Uzbekiska' },
|
||||||
// { id: '10496', name: 'Vai' },
|
// { id: '10496', beskrivning: 'Vai' },
|
||||||
// { id: '10497', name: 'Venda' },
|
// { id: '10497', beskrivning: 'Venda' },
|
||||||
// { id: '492', name: 'Vietnamesiska' },
|
// { id: '492', beskrivning: 'Vietnamesiska' },
|
||||||
// { id: '493', name: 'Vitryska' },
|
// { id: '493', beskrivning: 'Vitryska' },
|
||||||
// { id: '10498', name: 'Volapük' },
|
// { id: '10498', beskrivning: 'Volapük' },
|
||||||
// { id: '10499', name: 'Votiska' },
|
// { id: '10499', beskrivning: 'Votiska' },
|
||||||
// { id: '10500', name: 'Wakashan språk' },
|
// { id: '10500', beskrivning: 'Wakashan språk' },
|
||||||
// { id: '10501', name: 'Walamo' },
|
// { id: '10501', beskrivning: 'Walamo' },
|
||||||
// { id: '494', name: 'Walesiska' },
|
// { id: '494', beskrivning: 'Walesiska' },
|
||||||
// { id: '10502', name: 'Waray' },
|
// { id: '10502', beskrivning: 'Waray' },
|
||||||
// { id: '10503', name: 'Washo' },
|
// { id: '10503', beskrivning: 'Washo' },
|
||||||
// { id: '495', name: 'Wolof' },
|
// { id: '495', beskrivning: 'Wolof' },
|
||||||
// { id: '496', name: 'Xhosa/Isixhosa' },
|
// { id: '496', beskrivning: 'Xhosa/Isixhosa' },
|
||||||
// { id: '10507', name: 'Yao' },
|
// { id: '10507', beskrivning: 'Yao' },
|
||||||
// { id: '10508', name: 'Yapese' },
|
// { id: '10508', beskrivning: 'Yapese' },
|
||||||
// { id: '498', name: 'Yoruba' },
|
// { id: '498', beskrivning: 'Yoruba' },
|
||||||
// { id: '10513', name: 'Yupik språk' },
|
// { id: '10513', beskrivning: 'Yupik språk' },
|
||||||
// { id: '499', name: 'Zande/Azande' },
|
// { id: '499', beskrivning: 'Zande/Azande' },
|
||||||
// { id: '10510', name: 'Zapotekiska' },
|
// { id: '10510', beskrivning: 'Zapotekiska' },
|
||||||
// { id: '312', name: 'Zenaga' },
|
// { id: '312', beskrivning: 'Zenaga' },
|
||||||
// { id: '500', name: 'Zhuang' },
|
// { id: '500', beskrivning: 'Zhuang' },
|
||||||
// { id: '501', name: 'Zulu' },
|
// { id: '501', beskrivning: 'Zulu' },
|
||||||
// { id: '10512', name: 'Zuni' },
|
// { id: '10512', beskrivning: 'Zuni' },
|
||||||
];
|
];
|
||||||
|
|
||||||
console.info('Languages generated...');
|
console.info('Languages generated...');
|
||||||
|
|||||||
477
mock-api/dafa-web/scripts/sun-koder.js
Normal file
477
mock-api/dafa-web/scripts/sun-koder.js
Normal file
@@ -0,0 +1,477 @@
|
|||||||
|
function generateSunKoder() {
|
||||||
|
console.info('Sun koder generated...');
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
sun_kod: '010',
|
||||||
|
beskrivning: 'Bred, generell utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '080',
|
||||||
|
beskrivning: 'Läs- och skrivinlärning för vuxna',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '090',
|
||||||
|
beskrivning: 'Personlig utveckling',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '140',
|
||||||
|
beskrivning: 'Pedagogik och lärarutbildning, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '142',
|
||||||
|
beskrivning: 'Pedagogik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '143',
|
||||||
|
beskrivning: 'Lärarutbildning för förskola och fritidsverksamhet',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '144',
|
||||||
|
beskrivning: 'Lärarutbildning för grundskolans lägre åldrar',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '145',
|
||||||
|
beskrivning: 'Ämneslärarutbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '146',
|
||||||
|
beskrivning: 'Lärarutbildning i yrkesämne och praktiskt/estetiskt ämne',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '149',
|
||||||
|
beskrivning: 'Pedagogik och lärarutbildning, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '210',
|
||||||
|
beskrivning: 'Konst och media, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '211',
|
||||||
|
beskrivning: 'Bild- och formkonst',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '212',
|
||||||
|
beskrivning: 'Musik, dans och dramatik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '213',
|
||||||
|
beskrivning: 'Medieproduktion',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '214',
|
||||||
|
beskrivning: 'Formgivning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '215',
|
||||||
|
beskrivning: 'Konsthantverk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '219',
|
||||||
|
beskrivning: 'Konst och media, övrig/ ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '220',
|
||||||
|
beskrivning: 'Humaniora, allmän inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '221',
|
||||||
|
beskrivning: 'Religion',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '222',
|
||||||
|
beskrivning: 'Främmande språk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '223',
|
||||||
|
beskrivning: 'Svenska och litteraturvetenskap',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '225',
|
||||||
|
beskrivning: 'Historia och arkeologi',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '226',
|
||||||
|
beskrivning: 'Filosofi och logik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '229',
|
||||||
|
beskrivning: 'Humaniora, övrig/ospec inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '310',
|
||||||
|
beskrivning: 'Samhälls- och beteendevetenskap, allmän inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '311',
|
||||||
|
beskrivning: 'Psykologi',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '312',
|
||||||
|
beskrivning: 'Sociologi, etnologi och kulturgeografi',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '313',
|
||||||
|
beskrivning: 'Statsvetenskap',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '314',
|
||||||
|
beskrivning: 'Nationalekonomi och ekonomisk historia',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '319',
|
||||||
|
beskrivning: 'Samhälls- och beteende vetenskap, övrig/ospec inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '320',
|
||||||
|
beskrivning: 'Journalistik och information, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '321',
|
||||||
|
beskrivning: 'Journalistik och medievetenskap',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '322',
|
||||||
|
beskrivning: 'Biblioteks- och dokumentationsvetenskap',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '329',
|
||||||
|
beskrivning: 'Journalistik och information, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '340',
|
||||||
|
beskrivning: 'Företagsekonomi, handel, administration, allmän utb.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '341',
|
||||||
|
beskrivning: 'Inköp, försäljning och distribution',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '342',
|
||||||
|
beskrivning: 'Marknadsföring',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '343',
|
||||||
|
beskrivning: 'Bank, försäkring och finansiering',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '344',
|
||||||
|
beskrivning: 'Redovisning och beskattning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '345',
|
||||||
|
beskrivning: 'Ledning och administration',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '346',
|
||||||
|
beskrivning: 'Kontorsservice och sekreterartjänster',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '347',
|
||||||
|
beskrivning: 'Arbetsplatsrelaterad utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '349',
|
||||||
|
beskrivning: 'Företagsekonomi, handel, administration, övrig/ospec utb.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '380',
|
||||||
|
beskrivning: 'Juridik och rättsvetenskap',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '420',
|
||||||
|
beskrivning: 'Biologi och miljövetenskap, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '421',
|
||||||
|
beskrivning: 'Biologi och biokemi',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '422',
|
||||||
|
beskrivning: 'Miljövetenskap',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '429',
|
||||||
|
beskrivning: 'Biologi och miljövetenskap, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '440',
|
||||||
|
beskrivning: 'Fysik, kemi och geovetenskap, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '441',
|
||||||
|
beskrivning: 'Fysik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '442',
|
||||||
|
beskrivning: 'Kemi',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '443',
|
||||||
|
beskrivning: 'Geovetenskap och naturgeografi',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '449',
|
||||||
|
beskrivning: 'Fysik, kemi och geovetenskap, övrig/ospecificerad utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '460',
|
||||||
|
beskrivning: 'Matematik och naturvetenskap, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '461',
|
||||||
|
beskrivning: 'Matematik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '462',
|
||||||
|
beskrivning: 'Statistik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '469',
|
||||||
|
beskrivning: 'Matematik och naturvetenskap, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '480',
|
||||||
|
beskrivning: 'Data, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '481',
|
||||||
|
beskrivning: 'Datavetenskap och systemvetenskap',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '482',
|
||||||
|
beskrivning: 'Datoranvändning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '489',
|
||||||
|
beskrivning: 'Data, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '520',
|
||||||
|
beskrivning: 'Teknik och teknisk industri, allmän inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '521',
|
||||||
|
beskrivning: 'Maskinteknik och verkstadsteknik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '522',
|
||||||
|
beskrivning: 'Energi- och elektroteknik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '523',
|
||||||
|
beskrivning: 'Elektronik, datateknik och automation',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '524',
|
||||||
|
beskrivning: 'Kemi- och bioteknik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '525',
|
||||||
|
beskrivning: 'Fordons- och farkostteknik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '526',
|
||||||
|
beskrivning: 'Industriell ekonomi och organisation',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '529',
|
||||||
|
beskrivning: 'Teknik och teknisk industri, övrig/ospec inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '540',
|
||||||
|
beskrivning: 'Material och tillverkning, allmän inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '541',
|
||||||
|
beskrivning: 'Tillverkning och hantering av livsmedel',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '542',
|
||||||
|
beskrivning: 'Tillverkning av textilier, konfektion och lädervaror',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '543',
|
||||||
|
beskrivning: 'Tillverkning av trä-, pappers-, glas/porslin- och plastprodukter',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '544',
|
||||||
|
beskrivning: 'Berg- och mineralteknik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '549',
|
||||||
|
beskrivning: 'Tillverkning, övrig/ospec inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '580',
|
||||||
|
beskrivning: 'Samhällsbyggnad och byggnadsteknik, allmän inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '581',
|
||||||
|
beskrivning: 'Samhällsbyggnad och arkitektur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '582',
|
||||||
|
beskrivning: 'Byggnadsteknik och anläggningsteknik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '589',
|
||||||
|
beskrivning: 'Samhällsbyggnad och byggnadsteknik, övrig/ospec inriktning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '620',
|
||||||
|
beskrivning: 'Lantbruk, trädgård, skog och fiske, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '621',
|
||||||
|
beskrivning: 'Lantbruk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '622',
|
||||||
|
beskrivning: 'Trädgård',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '623',
|
||||||
|
beskrivning: 'Skog',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '624',
|
||||||
|
beskrivning: 'Fiske och vattenbruk',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '629',
|
||||||
|
beskrivning: 'Lantbruk, trädgård, skog och fiske, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '640',
|
||||||
|
beskrivning: 'Djursjukvård',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '720',
|
||||||
|
beskrivning: 'Hälso- och sjukvård, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '721',
|
||||||
|
beskrivning: 'Medicin',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '723',
|
||||||
|
beskrivning: 'Omvårdnad',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '724',
|
||||||
|
beskrivning: 'Tandvård',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '725',
|
||||||
|
beskrivning: 'Tekniskt inriktad vårdutbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '726',
|
||||||
|
beskrivning: 'Terapi, rehabilitering och kostbehandling',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '727',
|
||||||
|
beskrivning: 'Farmaci',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '729',
|
||||||
|
beskrivning: 'Hälso- och sjukvård, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '760',
|
||||||
|
beskrivning: 'Socialt arbete och omsorg, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '761',
|
||||||
|
beskrivning: 'Barn och ungdom',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '762',
|
||||||
|
beskrivning: 'Socialt arbete och vägledning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '769',
|
||||||
|
beskrivning: 'Socialt arbete och omsorg, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '810',
|
||||||
|
beskrivning: 'Personliga tjänster, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '811',
|
||||||
|
beskrivning: 'Hotell, restaurang och storhushåll',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '812',
|
||||||
|
beskrivning: 'Turism, resor och fritid',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '813',
|
||||||
|
beskrivning: 'Idrott och friskvård',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '814',
|
||||||
|
beskrivning: 'Hushållstjänster och lokalvård',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '815',
|
||||||
|
beskrivning: 'Hår- och skönhetsvård',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '819',
|
||||||
|
beskrivning: 'Personliga tjänster, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '840',
|
||||||
|
beskrivning: 'Transporttjänster',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '850',
|
||||||
|
beskrivning: 'Miljövård och miljöskydd, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '851',
|
||||||
|
beskrivning: 'Miljövårdsteknik och miljökontroll',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '852',
|
||||||
|
beskrivning: 'Naturvård och djurskydd',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '853',
|
||||||
|
beskrivning: 'Renhållning och avfallshantering',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '859',
|
||||||
|
beskrivning: 'Miljövård och miljöskydd, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '860',
|
||||||
|
beskrivning: 'Säkerhetstjänster, allmän utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '861',
|
||||||
|
beskrivning: 'Säkerhet i samhället',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '862',
|
||||||
|
beskrivning: 'Arbetsmiljö och arbetarskydd',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '863',
|
||||||
|
beskrivning: 'Militär utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '869',
|
||||||
|
beskrivning: 'Säkerhetstjänster, övrig/ospec utbildning',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sun_kod: '999',
|
||||||
|
beskrivning: 'Okänd',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
generate: generateSunKoder,
|
||||||
|
};
|
||||||
@@ -16,6 +16,8 @@ server.use(
|
|||||||
'/participants': '/participants?_embed=employees',
|
'/participants': '/participants?_embed=employees',
|
||||||
'/participant/:id': '/participants/:id?_embed=employees',
|
'/participant/:id': '/participants/:id?_embed=employees',
|
||||||
'/auth': '/currentUser',
|
'/auth': '/currentUser',
|
||||||
|
'/customerinfo/*/*': '/deltagare/$2',
|
||||||
|
'/customerinfo': '/deltagare',
|
||||||
'*page=*': '$1_page=$2',
|
'*page=*': '$1_page=$2',
|
||||||
'*limit=*': '$1_limit=$2',
|
'*limit=*': '$1_limit=$2',
|
||||||
'*sort=*': '$1_sort=$2',
|
'*sort=*': '$1_sort=$2',
|
||||||
@@ -25,8 +27,9 @@ server.use(
|
|||||||
);
|
);
|
||||||
|
|
||||||
router.render = (req, res) => {
|
router.render = (req, res) => {
|
||||||
// all paths except getTokenFullAccess requires Authorization header.
|
const pathname = req._parsedOriginalUrl.pathname;
|
||||||
if (!req._parsedUrl.pathname.includes('getTokenFullAccess') && !req.headers.authorization) {
|
// all paths except /auth/token requires Authorization header.
|
||||||
|
if (!pathname.includes('/auth/token') && !req.headers.authorization) {
|
||||||
return res.status(401).jsonp({ error: 'No valid access-token' });
|
return res.status(401).jsonp({ error: 'No valid access-token' });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,11 +40,19 @@ router.render = (req, res) => {
|
|||||||
req.body.createdAt = Date.now();
|
req.body.createdAt = Date.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req._parsedUrl.pathname.includes('getTokenFullAccess')) {
|
if (pathname.includes('/auth/token')) {
|
||||||
res.jsonp(res.locals.data);
|
res.jsonp(res.locals.data);
|
||||||
} else {
|
} else {
|
||||||
|
let data = res.locals.data;
|
||||||
|
const deltagareRegex = /(?:\/customerinfo\/)(contact|driverlicense|education\/highest|education|translator|work\/disability|work\/languages)/g;
|
||||||
|
const isDeltagarePath = deltagareRegex.exec(pathname);
|
||||||
|
|
||||||
|
if (isDeltagarePath) {
|
||||||
|
const deltagareSubPath = getDeltagareSubPath(isDeltagarePath[1]);
|
||||||
|
data = res.locals.data[deltagareSubPath] || {};
|
||||||
|
}
|
||||||
res.jsonp({
|
res.jsonp({
|
||||||
data: res.locals.data,
|
data,
|
||||||
...appendMetaData(params, res),
|
...appendMetaData(params, res),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -70,3 +81,16 @@ function appendMetaData(params, res) {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDeltagareSubPath(path) {
|
||||||
|
switch (path) {
|
||||||
|
case 'education/highest':
|
||||||
|
return 'highestEducation';
|
||||||
|
case 'work/disability':
|
||||||
|
return 'disabilities';
|
||||||
|
case 'work/languages':
|
||||||
|
return 'workLanguages';
|
||||||
|
default:
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@dafa-assets/*": ["apps/dafa-web/src/assets/*"],
|
"@dafa-assets/*": ["apps/dafa-web/src/assets/*"],
|
||||||
"@dafa-shared/*": ["apps/dafa-web/src/app/shared/*"],
|
|
||||||
"@dafa-models/*": ["apps/dafa-web/src/app/shared/models/*"],
|
"@dafa-models/*": ["apps/dafa-web/src/app/shared/models/*"],
|
||||||
"@dafa-guards/*": ["apps/dafa-web/src/app/shared/guards/*"],
|
"@dafa-guards/*": ["apps/dafa-web/src/app/shared/guards/*"],
|
||||||
"@dafa-constants/*": ["apps/dafa-web/src/app/shared/constants/*"],
|
"@dafa-constants/*": ["apps/dafa-web/src/app/shared/constants/*"],
|
||||||
@@ -26,7 +25,8 @@
|
|||||||
"@dafa-interceptors/*": ["apps/dafa-web/src/app/shared/interceptors/*"],
|
"@dafa-interceptors/*": ["apps/dafa-web/src/app/shared/interceptors/*"],
|
||||||
"@dafa-utils/*": ["apps/dafa-web/src/app/shared/utils/*"],
|
"@dafa-utils/*": ["apps/dafa-web/src/app/shared/utils/*"],
|
||||||
"@dafa-validators/*": ["apps/dafa-web/src/app/shared/utils/validators/*"],
|
"@dafa-validators/*": ["apps/dafa-web/src/app/shared/utils/validators/*"],
|
||||||
"@dafa-environment": ["apps/dafa-web/src/environments/environment"]
|
"@dafa-environment": ["apps/dafa-web/src/environments/environment"],
|
||||||
|
"@dafa-shared/*": ["apps/dafa-web/src/app/shared/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "tmp"]
|
"exclude": ["node_modules", "tmp"]
|
||||||
|
|||||||
Reference in New Issue
Block a user