Skip to content

Commit adc1b60

Browse files
committed
added components
search components,' linking
1 parent a6d1e2f commit adc1b60

File tree

14 files changed

+370
-18
lines changed

14 files changed

+370
-18
lines changed

AngularApp/node_modules/@angular/common/common.d.ts

100644100755
File mode changed.

AngularApp/node_modules/@angular/common/common.metadata.json

100644100755
File mode changed.

AngularApp/node_modules/@angular/common/http.d.ts

100644100755
File mode changed.

AngularApp/node_modules/@angular/common/http.metadata.json

100644100755
File mode changed.

AngularApp/node_modules/@angular/common/index.d.ts

100644100755
File mode changed.

AngularApp/src/app/app.component.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { TestBed, async } from '@angular/core/testing';
22
import { AppComponent } from './app.component';
3+
34
describe('AppComponent', () => {
45
beforeEach(async(() => {
56
TestBed.configureTestingModule({

AngularApp/src/app/core/sidemenu/menu-element.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ export class MenuMaker {
7979
{
8080
'name': 'Add Project',
8181
'icon': 'input',
82-
'link': '.pages/addproject',
82+
'link': './pages/addproject',
8383
'open': false,
8484
},
8585
{
8686
'name': 'Upload SOW',
8787
'icon': 'open_in_browser',
88-
'link': '.pages/uploadsow',
88+
'link': './pages/uploadsow',
8989
'open': false,
9090
},
9191
{
9292
'name': 'Add Client',
9393
'icon': 'menu',
94-
'link': '.pages/addclient',
94+
'link': './pages/addclient',
9595
'open': false,
9696
}
9797
]
@@ -109,12 +109,12 @@ export class MenuMaker {
109109
'name': 'Add Practice Updates',
110110
'icon': 'account_balance',
111111
'open': false,
112-
'link': '../login',
112+
'link': false,
113113
}, {
114114
'name': 'Practice Expenses',
115115
'icon': 'description',
116116
'open': false,
117-
'link': 'pages/services',
117+
'link': false,
118118
}
119119
]
120120
});
@@ -131,7 +131,7 @@ export class MenuMaker {
131131
'name': 'Practice',
132132
'icon': 'exit_to_app',
133133
'open': false,
134-
'link': '../login',
134+
'link': false,
135135
}, {
136136
'name': 'Project',
137137
'icon': 'find_replace',
Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1-
<p>
2-
searchemployee works!
3-
</p>
1+
<div class="DashboardHead">
2+
<p style="font-size: x-large; color:#777777; font-family: Open Sans;
3+
font-weight: bold; ">EMPLOYEE MANAGEMENT</p>
4+
<div style="font-size:small; color:#777777; font-family: Open Sans;
5+
">Home > Employee Management > Search Employee</div>
6+
</div>
7+
8+
9+
<mat-card class="card1">
10+
11+
<div class="heading">
12+
<h2>
13+
Search Employee Project Mapping
14+
</h2>
15+
</div>
16+
<div class="wrap" >
17+
<div class="search">
18+
19+
<input type="text" class="searchTerm" placeholder="Enter Employye ID or Name...">
20+
<button type="submit" class="searchButton" >
21+
Search
22+
</button>
23+
</div>
24+
25+
</div>
26+
</mat-card>
27+
28+
<div class="mat-elevation-z8 card2">
29+
<table mat-table [dataSource]="dataSource">
30+
31+
<!-- Position Column -->
32+
<ng-container matColumnDef="position">
33+
<th mat-header-cell *matHeaderCellDef> No. </th>
34+
<td mat-cell *matCellDef="let element"> {{element.position}} </td>
35+
</ng-container>
36+
37+
<!-- Name Column -->
38+
<ng-container matColumnDef="name">
39+
<th mat-header-cell *matHeaderCellDef> Name </th>
40+
<td mat-cell *matCellDef="let element"> {{element.name}} </td>
41+
</ng-container>
42+
43+
<!-- Weight Column -->
44+
<ng-container matColumnDef="weight">
45+
<th mat-header-cell *matHeaderCellDef> Weight </th>
46+
<td mat-cell *matCellDef="let element"> {{element.weight}} </td>
47+
</ng-container>
48+
49+
<!-- Symbol Column -->
50+
<ng-container matColumnDef="symbol">
51+
<th mat-header-cell *matHeaderCellDef> Symbol </th>
52+
<td mat-cell *matCellDef="let element"> {{element.symbol}} </td>
53+
</ng-container>
54+
55+
56+
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
57+
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
58+
</table>
59+
60+
<mat-paginator [pageSizeOptions]="[5, 10, 20]" showFirstLastButtons></mat-paginator>
61+
</div>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
@import url(https://fonts.googleapis.com/css?family=Open+Sans);
2+
3+
body{
4+
background: #f2f2f2;
5+
font-family: 'Open Sans', sans-serif;
6+
}
7+
8+
.search {
9+
width: 100%;
10+
position: relative
11+
}
12+
13+
.searchTerm {
14+
float: right;
15+
width: 100%;
16+
border: 1px solid #b9b7b7;
17+
padding: 5px;
18+
height: 25px;
19+
border-radius: 1px;
20+
outline: none;
21+
color: rgb(169, 169, 170);
22+
23+
24+
}
25+
26+
.searchTerm:focus{
27+
color: gray;
28+
}
29+
30+
.searchButton {
31+
position: absolute;
32+
right: 0px;
33+
width: 90px;
34+
height: 36px;
35+
border: 1px solid #2096BC;
36+
background: #2096BCCC;
37+
text-align: center;
38+
color: #fff;
39+
border-radius: 1px;
40+
cursor: pointer;
41+
font-size: 16px;
42+
font-family: Open Sans;
43+
}
44+
45+
/*Resize the wrap to see the search bar change!*/
46+
.wrap{
47+
width: 90%;
48+
position: absolute;
49+
top: 50%;
50+
left: 50%;
51+
transform: translate(-50%, -50%);
52+
53+
}
54+
55+
.card1{
56+
width: 92%;
57+
margin: 2%;
58+
59+
}
60+
.card2{
61+
width: 95%;
62+
margin: 2%;
63+
}
64+
.DashboardHead{
65+
font-size: large;
66+
margin-left : 20px;
67+
}
68+
69+
.heading{
70+
margin-bottom: 10%;
71+
margin-left: 2%;
72+
73+
}
74+
table {
75+
width: 100%;
76+
}
77+
78+

AngularApp/src/app/pages/EmployeeManagement/searchemployee/searchemployee.component.ts

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import {Component, OnInit, ViewChild} from '@angular/core';
2+
import {MatPaginator, MatTableDataSource} from '@angular/material';
3+
24

35
@Component({
46
selector: 'app-searchemployee',
@@ -9,7 +11,45 @@ export class SearchemployeeComponent implements OnInit {
911

1012
constructor() { }
1113

14+
displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
15+
dataSource = new MatTableDataSource<PeriodicElement>(ELEMENT_DATA);
16+
17+
@ViewChild(MatPaginator) paginator: MatPaginator;
18+
1219
ngOnInit() {
13-
}
20+
this.dataSource.paginator = this.paginator;
21+
22+
}
1423

1524
}
25+
export interface PeriodicElement {
26+
name: string;
27+
position: number;
28+
weight: number;
29+
symbol: string;
30+
}
31+
32+
const ELEMENT_DATA: PeriodicElement[] = [
33+
34+
{position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H'},
35+
{position: 2, name: 'Helium', weight: 4.0026, symbol: 'He'},
36+
{position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li'},
37+
{position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be'},
38+
{position: 5, name: 'Boron', weight: 10.811, symbol: 'B'},
39+
{position: 6, name: 'Carbon', weight: 12.0107, symbol: 'C'},
40+
{position: 7, name: 'Nitrogen', weight: 14.0067, symbol: 'N'},
41+
{position: 8, name: 'Oxygen', weight: 15.9994, symbol: 'O'},
42+
{position: 9, name: 'Fluorine', weight: 18.9984, symbol: 'F'},
43+
{position: 10, name: 'Neon', weight: 20.1797, symbol: 'Ne'},
44+
{position: 11, name: 'Sodium', weight: 22.9897, symbol: 'Na'},
45+
{position: 12, name: 'Magnesium', weight: 24.305, symbol: 'Mg'},
46+
{position: 13, name: 'Aluminum', weight: 26.9815, symbol: 'Al'},
47+
{position: 14, name: 'Silicon', weight: 28.0855, symbol: 'Si'},
48+
{position: 15, name: 'Phosphorus', weight: 30.9738, symbol: 'P'},
49+
{position: 16, name: 'Sulfur', weight: 32.065, symbol: 'S'},
50+
{position: 17, name: 'Chlorine', weight: 35.453, symbol: 'Cl'},
51+
{position: 18, name: 'Argon', weight: 39.948, symbol: 'Ar'},
52+
{position: 19, name: 'Potassium', weight: 39.0983, symbol: 'K'},
53+
{position: 20, name: 'Calcium', weight: 40.078, symbol: 'Ca'},
54+
];
55+

0 commit comments

Comments
 (0)