Merge pull request #24 in TEA/dafa-web-monorepo from test/employees-list to develop
Squashed commit of the following: commit 350dd411d30ba17f0cf54c7b107580b0f07dea75 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 14:16:06 2021 +0200 Update employees-list.component.spec.ts commit d5caafdda6fc04705f4452a84e630aafcc8f3add Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 14:04:28 2021 +0200 cleanup commit 72d35845303a23b1b4b29a33c23b65aeb031e602 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 13:50:18 2021 +0200 Update employees-list.component.spec.ts commit 81d6c1e7ca73cd6f1ed02e46a1326b5dceb58c0c Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 13:45:10 2021 +0200 Update employees-list.component.spec.ts commit a38840d1c363579e563a052663fa522922e23ba1 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 13:44:04 2021 +0200 Update employees-list.component.spec.ts commit 994a67f40b361d065d6b5944b5be2df638c06742 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 13:43:32 2021 +0200 Update employees-list.component.spec.ts commit cf914662aba447245f7241001af7e808c83c4f30 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 13:40:17 2021 +0200 unit tests for employees list commit a216afc44f9a4f732edcbe6aa88d85670637c99d Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 12:14:22 2021 +0200 first test failing commit 45b38b73b4dec694f05f1988799a0f459866eac4 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Mon Jun 14 10:02:25 2021 +0200 mockdata
This commit is contained in:
@@ -7,11 +7,12 @@ export interface Employee {
|
||||
id: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
fullName: string;
|
||||
fullName?: string;
|
||||
ssn: string;
|
||||
organizations: Organization[];
|
||||
authorizations: Authorization[];
|
||||
services: Service[];
|
||||
createdAt?: number;
|
||||
}
|
||||
|
||||
export interface EmployeesApiResponse {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
export interface Organization {
|
||||
id: string;
|
||||
name: string;
|
||||
kaNumber: string;
|
||||
kaNumber: number;
|
||||
address: {
|
||||
street: string;
|
||||
houseNumber: string;
|
||||
houseNumber: number;
|
||||
postalCode: string;
|
||||
city: string;
|
||||
kommun: string;
|
||||
|
||||
@@ -3,40 +3,10 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="employees-list__column-head">
|
||||
<button class="employees-list__sort-button" (click)="handleSort('fullName')">
|
||||
Namn
|
||||
<ng-container *ngIf="sort.key === 'fullName'">
|
||||
<digi-icon-caret-up
|
||||
class="employees-list__sort-icon"
|
||||
*ngIf="sort.order === orderType.ASC"
|
||||
></digi-icon-caret-up>
|
||||
<digi-icon-caret-down
|
||||
class="employees-list__sort-icon"
|
||||
*ngIf="sort.order === orderType.DESC"
|
||||
></digi-icon-caret-down>
|
||||
</ng-container>
|
||||
</button>
|
||||
</th>
|
||||
<th scope="col" class="employees-list__column-head">
|
||||
<button class="employees-list__sort-button" (click)="handleSort('services')">
|
||||
Tjänst
|
||||
<ng-container *ngIf="sort.key === 'services'">
|
||||
<digi-icon-caret-up
|
||||
class="employees-list__sort-icon"
|
||||
*ngIf="sort.order === orderType.ASC"
|
||||
></digi-icon-caret-up>
|
||||
<digi-icon-caret-down
|
||||
class="employees-list__sort-icon"
|
||||
*ngIf="sort.order === orderType.DESC"
|
||||
></digi-icon-caret-down>
|
||||
</ng-container>
|
||||
</button>
|
||||
</th>
|
||||
<th scope="col" class="employees-list__column-head">
|
||||
<button class="employees-list__sort-button" (click)="handleSort('organizations')">
|
||||
Utförandeverksamheter
|
||||
<ng-container *ngIf="sort.key === 'organizations'">
|
||||
<th scope="col" class="employees-list__column-head" *ngFor="let column of columnHeaders">
|
||||
<button class="employees-list__sort-button" [id]="'sort-button-' + column" (click)="handleSort(column.key)">
|
||||
{{column.label}}
|
||||
<ng-container *ngIf="sort.key === column">
|
||||
<digi-icon-caret-up
|
||||
class="employees-list__sort-icon"
|
||||
*ngIf="sort.order === orderType.ASC"
|
||||
@@ -52,7 +22,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let employee of employees">
|
||||
<tr class="employees-list__row" *ngFor="let employee of employees">
|
||||
<th scope="row">
|
||||
<a [routerLink]="employee.id" class="employees-list__link">{{ employee.fullName }}</a>
|
||||
</th>
|
||||
|
||||
@@ -1,29 +1,55 @@
|
||||
import { DigiNgTableModule } from '@af/digi-ng/_table/table';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, DebugElement } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { EmployeesListComponent } from './employees-list.component';
|
||||
import { employeesMock } from './employees-list.mock';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Employee } from '@dafa-models/employee.model';
|
||||
import { SortOrder } from '@dafa-enums/sort-order.enum';
|
||||
|
||||
describe('EmployeesListComponent', () => {
|
||||
let component: EmployeesListComponent;
|
||||
let fixture: ComponentFixture<EmployeesListComponent>;
|
||||
const getEmployeeRows = () => fixture.debugElement.queryAll(By.css('.employees-list__row'));
|
||||
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [EmployeesListComponent],
|
||||
imports: [RouterTestingModule, DigiNgTableModule],
|
||||
imports: [RouterTestingModule],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EmployeesListComponent);
|
||||
component = fixture.componentInstance;
|
||||
component.employees = [];
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('20 employees sorted by Full name Ascending', () => {
|
||||
beforeEach(() => {
|
||||
component.employees = employeesMock;
|
||||
component.paginationMeta = {count: employeesMock.length, limit: 50, page: 1, totalPages: 3};
|
||||
component.sort = {key: <keyof Employee>'fullName', order: SortOrder.ASC };
|
||||
|
||||
fixture.detectChanges();
|
||||
})
|
||||
|
||||
it('should display the rows from employees object 20 rows regardless of pagination', () => {
|
||||
expect(getEmployeeRows().length).toBe(20);
|
||||
});
|
||||
|
||||
it('should display the up caret next to Full name to indicate that it\'s sorted by full name Ascending', () => {
|
||||
const fullNameUpCaret = fixture.debugElement.query(By.css('#sort-button-fullName > digi-icon-caret-up'));
|
||||
expect(fullNameUpCaret).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should only display one caret', () => {
|
||||
const upCarets = fixture.debugElement.queryAll(By.css('digi-icon-caret-up'));
|
||||
const downCarets = fixture.debugElement.queryAll(By.css('digi-icon-caret-down'));
|
||||
expect(upCarets.length + downCarets.length).toBe(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Employee } from '@dafa-models/employee.model';
|
||||
import { PaginationMeta } from '@dafa-models/pagination-meta.model';
|
||||
import { Sort } from '@dafa-models/sort.model';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'dafa-employees-list',
|
||||
templateUrl: './employees-list.component.html',
|
||||
@@ -12,28 +13,29 @@ import { Sort } from '@dafa-models/sort.model';
|
||||
})
|
||||
export class EmployeesListComponent {
|
||||
@Input() employees: Employee[];
|
||||
@Input() meta: PaginationMeta;
|
||||
@Input() paginationMeta: PaginationMeta;
|
||||
@Input() sort: Sort<keyof Employee>;
|
||||
@Input() order: SortOrder;
|
||||
@Output() sorted = new EventEmitter<keyof Employee>();
|
||||
@Output() paginated = new EventEmitter<number>();
|
||||
|
||||
columnHeaders: {label: string, key: keyof Employee}[] = [{label: 'Namn', key: 'fullName'}, {label: 'Tjänst', key: 'services'}, {label: 'Utförandeverksamheter', key: 'organizations'}];
|
||||
|
||||
orderType = SortOrder;
|
||||
|
||||
get currentPage(): number {
|
||||
return this.meta.page;
|
||||
return this.paginationMeta.page;
|
||||
}
|
||||
get totalPages(): number {
|
||||
return this.meta?.totalPages;
|
||||
return this.paginationMeta?.totalPages;
|
||||
}
|
||||
get count(): number {
|
||||
return this.meta.count;
|
||||
return this.paginationMeta.count;
|
||||
}
|
||||
get currentResultStart(): number {
|
||||
return (this.currentPage - 1) * this.meta.limit + 1;
|
||||
return (this.currentPage - 1) * this.paginationMeta.limit + 1;
|
||||
}
|
||||
get currentResultEnd(): number {
|
||||
const end = this.currentResultStart + this.meta.limit - 1;
|
||||
const end = this.currentResultStart + this.paginationMeta.limit - 1;
|
||||
return end < this.count ? end : this.count;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,566 @@
|
||||
import { Employee } from '@dafa-models/employee.model';
|
||||
import { Service } from '@dafa-enums/service.enum';
|
||||
|
||||
export const employeesMock: Employee[] = [
|
||||
|
||||
{
|
||||
id: 'b136f30a-3997-4fdd-8c02-2415ee9c6d83',
|
||||
firstName: 'Jayson',
|
||||
lastName: 'Karlsson',
|
||||
ssn: '19951019-7751',
|
||||
organizations: [
|
||||
{
|
||||
id: 'd5b9d727-4473-47be-bdc0-cc3d6ed85934',
|
||||
name: 'Svensson, Olsson and Nilsson',
|
||||
kaNumber: 999419,
|
||||
address: {
|
||||
street: 'Eriksson gatan',
|
||||
houseNumber: 85,
|
||||
postalCode: '13202',
|
||||
city: 'Columbia',
|
||||
kommun: 'Halmstads kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628956
|
||||
},
|
||||
{
|
||||
id: 'c3359c5d-e0ff-4792-a3f3-7142fef932e5',
|
||||
firstName: 'Elbert',
|
||||
lastName: 'Andersson',
|
||||
ssn: '19701221-4753',
|
||||
organizations: [
|
||||
{
|
||||
id: 'fc42fe9c-ad06-46df-9c33-9e61b5c3f881',
|
||||
name: 'Nilsson, Svensson and Johansson',
|
||||
kaNumber: 578637,
|
||||
address: {
|
||||
street: 'Olsson gatan',
|
||||
houseNumber: 33,
|
||||
postalCode: '98821',
|
||||
city: 'Hacienda Heights',
|
||||
kommun: 'Motala kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628956
|
||||
},
|
||||
{
|
||||
id: '28cc9679-bf5e-4066-900f-0866710ebdbc',
|
||||
firstName: 'Tyreek',
|
||||
lastName: 'Larsson',
|
||||
ssn: '19530826-5774',
|
||||
organizations: [
|
||||
{
|
||||
id: '11da9de5-2ce2-4364-a1b2-08a263bfc248',
|
||||
name: 'Eriksson Group',
|
||||
kaNumber: 975639,
|
||||
address: {
|
||||
street: 'Vito allén',
|
||||
houseNumber: 82,
|
||||
postalCode: '61048',
|
||||
city: 'Helsing Consuelo',
|
||||
kommun: 'Finspångs kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628956
|
||||
},
|
||||
{
|
||||
id: '6fae0a53-fd04-4ca0-b099-933161c920b8',
|
||||
firstName: 'Jarret',
|
||||
lastName: 'Eriksson',
|
||||
ssn: '19731207-7794',
|
||||
organizations: [
|
||||
{
|
||||
id: 'b8011410-d7a8-4163-98c8-3262cf0681b9',
|
||||
name: 'Svensson - Svensson',
|
||||
kaNumber: 815388,
|
||||
address: {
|
||||
street: 'Delphine allén',
|
||||
houseNumber: 26,
|
||||
postalCode: '26994',
|
||||
city: 'En Akeem',
|
||||
kommun: 'Smedjebackens kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
|
||||
name: 'KVL' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628957
|
||||
},
|
||||
{
|
||||
id: '6fd136ad-f51a-4a30-b6e9-dd1116cf90d6',
|
||||
firstName: 'Bradley',
|
||||
lastName: 'Svensson',
|
||||
ssn: '19831128-5775',
|
||||
organizations: [
|
||||
{
|
||||
id: '53d64944-040c-44ee-9505-879ae05f660e',
|
||||
name: 'Persson, Andersson and Karlsson',
|
||||
kaNumber: 234733,
|
||||
address: {
|
||||
street: 'Althea allén',
|
||||
houseNumber: 42,
|
||||
postalCode: '76986',
|
||||
city: 'Myrtisby',
|
||||
kommun: 'Olofströms kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628957
|
||||
},
|
||||
{
|
||||
id: '0f8445b0-9eb6-432d-9967-0541ea74d9c6',
|
||||
firstName: 'Heath',
|
||||
lastName: 'Karlsson',
|
||||
ssn: '19821114-5302',
|
||||
organizations: [
|
||||
{
|
||||
id: '6bd3806d-b49d-412d-96b7-76ff4ec27a44',
|
||||
name: 'Olsson, Andersson and Andersson',
|
||||
kaNumber: 902976,
|
||||
address: {
|
||||
street: 'Johansson gatan',
|
||||
houseNumber: 92,
|
||||
postalCode: '65702',
|
||||
city: 'Lessieland',
|
||||
kommun: 'Motala kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
|
||||
name: 'KVL' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628957
|
||||
},
|
||||
{
|
||||
id: '29cfccc4-bf1d-4eaa-88d9-b86e22203bc7',
|
||||
firstName: 'Mitchel',
|
||||
lastName: 'Andersson',
|
||||
ssn: '19680607-4896',
|
||||
organizations: [
|
||||
{
|
||||
id: '11da9de5-2ce2-4364-a1b2-08a263bfc248',
|
||||
name: 'Eriksson Group',
|
||||
kaNumber: 975639,
|
||||
address: {
|
||||
street: 'Vito allén',
|
||||
houseNumber: 82,
|
||||
postalCode: '61048',
|
||||
city: 'Helsing Consuelo',
|
||||
kommun: 'Finspångs kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
|
||||
name: 'KVL' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628957
|
||||
},
|
||||
{
|
||||
id: '412a7141-82fa-4b98-812f-e092910663af',
|
||||
firstName: 'Raheem',
|
||||
lastName: 'Andersson',
|
||||
ssn: '19820609-8453',
|
||||
organizations: [
|
||||
{
|
||||
id: 'e2d4f74f-c1da-478d-a116-d6dfa1b0183c',
|
||||
name: 'Larsson - Gustafsson',
|
||||
kaNumber: 852472,
|
||||
address: {
|
||||
street: 'Gust gatan',
|
||||
houseNumber: 77,
|
||||
postalCode: '52349',
|
||||
city: 'Katelynnmora',
|
||||
kommun: 'Hofors kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628957
|
||||
},
|
||||
{
|
||||
id: 'a4df2f97-fdaf-4b41-8793-dd84ea631502',
|
||||
firstName: 'Ricky',
|
||||
lastName: 'Johansson',
|
||||
ssn: '19980903-7392',
|
||||
organizations: [
|
||||
{
|
||||
id: 'd5b9d727-4473-47be-bdc0-cc3d6ed85934',
|
||||
name: 'Svensson, Olsson and Nilsson',
|
||||
kaNumber: 999419,
|
||||
address: {
|
||||
street: 'Eriksson gatan',
|
||||
houseNumber: 85,
|
||||
postalCode: '13202',
|
||||
city: 'Columbia',
|
||||
kommun: 'Halmstads kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628957
|
||||
},
|
||||
{
|
||||
id: '1a4cbf66-14f7-45c1-ad64-0df6ec3bdc2c',
|
||||
firstName: 'Billie',
|
||||
lastName: 'Andersson',
|
||||
ssn: '19710304-8866',
|
||||
organizations: [
|
||||
{
|
||||
id: 'fc42fe9c-ad06-46df-9c33-9e61b5c3f881',
|
||||
name: 'Nilsson, Svensson and Johansson',
|
||||
kaNumber: 578637,
|
||||
address: {
|
||||
street: 'Olsson gatan',
|
||||
houseNumber: 33,
|
||||
postalCode: '98821',
|
||||
city: 'Hacienda Heights',
|
||||
kommun: 'Motala kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628958
|
||||
},
|
||||
{
|
||||
id: 'b3703a76-474d-4cb3-b74f-fa41ffe158b5',
|
||||
firstName: 'Lizzie',
|
||||
lastName: 'Karlsson',
|
||||
ssn: '19890729-2332',
|
||||
organizations: [
|
||||
{
|
||||
id: 'd5b9d727-4473-47be-bdc0-cc3d6ed85934',
|
||||
name: 'Svensson, Olsson and Nilsson',
|
||||
kaNumber: 999419,
|
||||
address: {
|
||||
street: 'Eriksson gatan',
|
||||
houseNumber: 85,
|
||||
postalCode: '13202',
|
||||
city: 'Columbia',
|
||||
kommun: 'Halmstads kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628958
|
||||
},
|
||||
{
|
||||
id: 'd1523e59-b400-4b6d-8a4b-f393d70bf2d5',
|
||||
firstName: 'Cruz',
|
||||
lastName: 'Gustafsson',
|
||||
ssn: '19861226-1321',
|
||||
organizations: [
|
||||
{
|
||||
id: '11da9de5-2ce2-4364-a1b2-08a263bfc248',
|
||||
name: 'Eriksson Group',
|
||||
kaNumber: 975639,
|
||||
address: {
|
||||
street: 'Vito allén',
|
||||
houseNumber: 82,
|
||||
postalCode: '61048',
|
||||
city: 'Helsing Consuelo',
|
||||
kommun: 'Finspångs kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628958
|
||||
},
|
||||
{
|
||||
id: '1340f322-7e80-4f59-926a-bde9fc6621fc',
|
||||
firstName: 'Jeremie',
|
||||
lastName: 'Svensson',
|
||||
ssn: '19681107-4830',
|
||||
organizations: [
|
||||
{
|
||||
id: 'fc42fe9c-ad06-46df-9c33-9e61b5c3f881',
|
||||
name: 'Nilsson, Svensson and Johansson',
|
||||
kaNumber: 578637,
|
||||
address: {
|
||||
street: 'Olsson gatan',
|
||||
houseNumber: 33,
|
||||
postalCode: '98821',
|
||||
city: 'Hacienda Heights',
|
||||
kommun: 'Motala kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628958
|
||||
},
|
||||
{
|
||||
id: 'bd207a4b-ab8a-41e9-8492-ddc580dc2cfd',
|
||||
firstName: 'Mae',
|
||||
lastName: 'Olsson',
|
||||
ssn: '19980630-7229',
|
||||
organizations: [
|
||||
{
|
||||
id: '6bd3806d-b49d-412d-96b7-76ff4ec27a44',
|
||||
name: 'Olsson, Andersson and Andersson',
|
||||
kaNumber: 902976,
|
||||
address: {
|
||||
street: 'Johansson gatan',
|
||||
houseNumber: 92,
|
||||
postalCode: '65702',
|
||||
city: 'Lessieland',
|
||||
kommun: 'Motala kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
|
||||
name: 'KVL' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628958
|
||||
},
|
||||
{
|
||||
id: '5ab9ad0f-fabc-4916-9d9c-7559100866cd',
|
||||
firstName: 'Mable',
|
||||
lastName: 'Gustafsson',
|
||||
ssn: '19821217-3880',
|
||||
organizations: [
|
||||
{
|
||||
id: 'e2d4f74f-c1da-478d-a116-d6dfa1b0183c',
|
||||
name: 'Larsson - Gustafsson',
|
||||
kaNumber: 852472,
|
||||
address: {
|
||||
street: 'Gust gatan',
|
||||
houseNumber: 77,
|
||||
postalCode: '52349',
|
||||
city: 'Katelynnmora',
|
||||
kommun: 'Hofors kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628958
|
||||
},
|
||||
{
|
||||
id: '996c421e-4e93-4d04-961e-5d1268840a2e',
|
||||
firstName: 'Lonie',
|
||||
lastName: 'Nilsson',
|
||||
ssn: '19920429-1095',
|
||||
organizations: [
|
||||
{
|
||||
id: 'b8011410-d7a8-4163-98c8-3262cf0681b9',
|
||||
name: 'Svensson - Svensson',
|
||||
kaNumber: 815388,
|
||||
address: {
|
||||
street: 'Delphine allén',
|
||||
houseNumber: 26,
|
||||
postalCode: '26994',
|
||||
city: 'En Akeem',
|
||||
kommun: 'Smedjebackens kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628959
|
||||
},
|
||||
{
|
||||
id: '24e28f54-8bdd-4ee5-b072-37e25feba220',
|
||||
firstName: 'Albertha',
|
||||
lastName: 'Olsson',
|
||||
ssn: '19900128-8896',
|
||||
organizations: [
|
||||
{
|
||||
id: 'd75cad98-75b5-40e6-8674-765121938928',
|
||||
name: 'Karlsson, Gustafsson and Svensson',
|
||||
kaNumber: 619459,
|
||||
address: {
|
||||
street: 'Svensson gärdet',
|
||||
houseNumber: 41,
|
||||
postalCode: '16444',
|
||||
city: 'Gustafssonberg',
|
||||
kommun: 'Hallsbergs kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
|
||||
name: 'KVL' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628959
|
||||
},
|
||||
{
|
||||
id: '4de5abb8-bda6-40e2-9b26-6a834e61b543',
|
||||
firstName: 'Giovanny',
|
||||
lastName: 'Nilsson',
|
||||
ssn: '19620130-3009',
|
||||
organizations: [
|
||||
{
|
||||
id: '53d64944-040c-44ee-9505-879ae05f660e',
|
||||
name: 'Persson, Andersson and Karlsson',
|
||||
kaNumber: 234733,
|
||||
address: {
|
||||
street: 'Althea allén',
|
||||
houseNumber: 42,
|
||||
postalCode: '76986',
|
||||
city: 'Myrtisby',
|
||||
kommun: 'Olofströms kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628959
|
||||
},
|
||||
{
|
||||
id: '61ff95f7-175c-48df-94d2-e5e368ba116c',
|
||||
firstName: 'Meta',
|
||||
lastName: 'Olsson',
|
||||
ssn: '19790727-4413',
|
||||
organizations: [
|
||||
{
|
||||
id: '6bd3806d-b49d-412d-96b7-76ff4ec27a44',
|
||||
name: 'Olsson, Andersson and Andersson',
|
||||
kaNumber: 902976,
|
||||
address: {
|
||||
street: 'Johansson gatan',
|
||||
houseNumber: 92,
|
||||
postalCode: '65702',
|
||||
city: 'Lessieland',
|
||||
kommun: 'Motala kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
|
||||
name: 'KVL' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628959
|
||||
},
|
||||
{
|
||||
id: '3909e35e-22be-4d95-b4f4-a6f34309c7b8',
|
||||
firstName: 'Candelario',
|
||||
lastName: 'Svensson',
|
||||
ssn: '19741125-2817',
|
||||
organizations: [
|
||||
{
|
||||
id: 'd7ba7bb8-2946-4444-b60e-edf4e0cf27dd',
|
||||
name: 'Eriksson - Gustafsson',
|
||||
kaNumber: 393573,
|
||||
address: {
|
||||
street: 'Juvenal vägen',
|
||||
houseNumber: 92,
|
||||
postalCode: '53784',
|
||||
city: 'Alenaland',
|
||||
kommun: 'Bromölla kommun'
|
||||
}
|
||||
}
|
||||
],
|
||||
services: [
|
||||
{
|
||||
id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
|
||||
name: 'KROM' as Service
|
||||
}
|
||||
],
|
||||
authorizations: [],
|
||||
createdAt: 1623655628959
|
||||
}
|
||||
];
|
||||
@@ -1,4 +1,3 @@
|
||||
import { DigiNgTableModule } from '@af/digi-ng/_table/table';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
@@ -7,7 +6,7 @@ import { EmployeesListComponent } from './employees-list.component';
|
||||
@NgModule({
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
declarations: [EmployeesListComponent],
|
||||
imports: [CommonModule, RouterModule, DigiNgTableModule],
|
||||
imports: [CommonModule, RouterModule],
|
||||
exports: [EmployeesListComponent],
|
||||
})
|
||||
export class EmployeesListModule {}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<dafa-employees-list
|
||||
*ngIf="employeesData$ | async as employeesData; else loadingRef"
|
||||
[employees]="employeesData.data"
|
||||
[meta]="employeesData.meta"
|
||||
[paginationMeta]="employeesData.meta"
|
||||
[sort]="sort$ | async"
|
||||
[order]="order$ | async"
|
||||
(sorted)="handleEmployeesSort($event)"
|
||||
|
||||
Reference in New Issue
Block a user