diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index bc3c6a5..2f1de14 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -11,12 +11,16 @@ import { EmployeesComponent } from './components/employees/employees.component';
import { NavBarComponent } from './components/employees/nav-bar/nav-bar.component';
import { employeesReducer } from './ngrx/employees.reducer';
import { EmployeesEffects } from './ngrx/employees.effects';
+import { ListComponent } from './components/employees/list/list.component';
+import { ItemComponent } from './components/employees/list/item/item.component';
@NgModule({
declarations: [
AppComponent,
EmployeesComponent,
- NavBarComponent
+ NavBarComponent,
+ ListComponent,
+ ItemComponent
],
imports: [
BrowserModule,
diff --git a/src/app/components/employees/employees.component.html b/src/app/components/employees/employees.component.html
index 862ddaa..4ac5c2b 100644
--- a/src/app/components/employees/employees.component.html
+++ b/src/app/components/employees/employees.component.html
@@ -1,5 +1,6 @@
+
Initial State
@@ -11,17 +12,7 @@
{{state.errorMessage | json}}
-
-
- | ID | Nom | Prénom | Role |
-
-
- | {{employee.id}} |
- {{employee.nom}} |
- {{employee.prenom}} |
- {{employee.role}} |
-
-
+
diff --git a/src/app/components/employees/employees.component.ts b/src/app/components/employees/employees.component.ts
index e905fcf..51fabfa 100644
--- a/src/app/components/employees/employees.component.ts
+++ b/src/app/components/employees/employees.component.ts
@@ -20,5 +20,4 @@ export class EmployeesComponent implements OnInit {
map((state) => state.catalogState)
);
}
-
}
diff --git a/src/app/components/employees/list/item/item.component.css b/src/app/components/employees/list/item/item.component.css
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/components/employees/list/item/item.component.html b/src/app/components/employees/list/item/item.component.html
new file mode 100644
index 0000000..20a1066
--- /dev/null
+++ b/src/app/components/employees/list/item/item.component.html
@@ -0,0 +1,17 @@
+
+ | {{employee.id}} |
+ {{employee.nom}} |
+ {{employee.prenom}} |
+ {{employee.role}} |
+
+
+ |
+
+
+ |
+
+
diff --git a/src/app/components/employees/list/item/item.component.spec.ts b/src/app/components/employees/list/item/item.component.spec.ts
new file mode 100644
index 0000000..0516e6b
--- /dev/null
+++ b/src/app/components/employees/list/item/item.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ItemComponent } from './item.component';
+
+describe('ItemComponent', () => {
+ let component: ItemComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ ItemComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ItemComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/employees/list/item/item.component.ts b/src/app/components/employees/list/item/item.component.ts
new file mode 100644
index 0000000..98d2759
--- /dev/null
+++ b/src/app/components/employees/list/item/item.component.ts
@@ -0,0 +1,21 @@
+import { Component, Input, OnInit } from '@angular/core';
+import { Employee } from '../../../../model/employee.model';
+
+@Component({
+ selector: 'app-item',
+ templateUrl: './item.component.html',
+ styleUrls: ['./item.component.css']
+})
+export class ItemComponent implements OnInit {
+ @Input() employee:Employee|null=null;
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+ onDelete(val:Employee) {
+ }
+
+ onEdit(val:Employee) {
+ }
+}
diff --git a/src/app/components/employees/list/list.component.css b/src/app/components/employees/list/list.component.css
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/components/employees/list/list.component.html b/src/app/components/employees/list/list.component.html
new file mode 100644
index 0000000..199f1fe
--- /dev/null
+++ b/src/app/components/employees/list/list.component.html
@@ -0,0 +1,13 @@
+
+
+
+
+ | ID | Nom | Prénom | Role |
+
+
+
+
+
+
+
+
diff --git a/src/app/components/employees/list/list.component.spec.ts b/src/app/components/employees/list/list.component.spec.ts
new file mode 100644
index 0000000..a5d3a5c
--- /dev/null
+++ b/src/app/components/employees/list/list.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ListComponent } from './list.component';
+
+describe('ListComponent', () => {
+ let component: ListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ ListComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(ListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/employees/list/list.component.ts b/src/app/components/employees/list/list.component.ts
new file mode 100644
index 0000000..7e1bb16
--- /dev/null
+++ b/src/app/components/employees/list/list.component.ts
@@ -0,0 +1,15 @@
+import { Component, Input, OnInit } from '@angular/core';
+import { EmployeesState } from '../../../ngrx/employees.reducer';
+
+@Component({
+ selector: 'app-list',
+ templateUrl: './list.component.html',
+ styleUrls: ['./list.component.css']
+})
+export class ListComponent implements OnInit {
+ @Input() state?:EmployeesState|null=null;
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+}