Skip to content

Commit 31e89a6

Browse files
committed
get changes
2 parents 7ca2d85 + 6b20923 commit 31e89a6

30 files changed

+525
-41
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 9.0.4.
44

5+
## Prerequisites
6+
7+
### Node.js
8+
9+
We can install Node.js from [https://nodejs.org/en/download/] but we recommend that you install it using Node Version Management [https://github.com/nvm-sh/nvm] (v12.16.1 LTS).
10+
11+
### Angular CLI
12+
Angular CLI is a Command Line Interface (CLI) to speed up your development with Angular.
13+
14+
Run `npm install -g @angular/cli` for install Angular CLI
15+
16+
## Install Node Modules
17+
18+
Run `npm install` for install the node_modules.
19+
520
## Development server
621

722
Run `ng serve` to run the app in a dev mode, after executing this command you can navigate to `http://localhost:4200/` to see the app working.

angular.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@
2424
"src/assets"
2525
],
2626
"styles": [
27+
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
2728
"src/styles.css"
2829
],
29-
"scripts": []
30+
"scripts": [
31+
"./node_modules/jquery/dist/jquery.min.js",
32+
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
33+
]
3034
},
3135
"configurations": {
3236
"production": {
@@ -77,10 +81,10 @@
7781
"builder": "@angular-devkit/build-angular:karma",
7882
"options": {
7983
"main": "src/test.ts",
80-
"codeCoverage": true,
8184
"polyfills": "src/polyfills.ts",
8285
"tsConfig": "tsconfig.spec.json",
8386
"karmaConfig": "karma.conf.js",
87+
"codeCoverage": true,
8488
"assets": [
8589
"src/favicon.ico",
8690
"src/assets"

package-lock.json

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@
1919
"@angular/platform-browser": "~9.0.3",
2020
"@angular/platform-browser-dynamic": "~9.0.3",
2121
"@angular/router": "~9.0.3",
22+
"bootstrap": "^4.4.1",
23+
"jquery": "^3.4.1",
24+
"minimist": "^1.2.5",
2225
"rxjs": "~6.5.4",
2326
"tslib": "^1.10.0",
2427
"zone.js": "~0.10.2"
2528
},
26-
"devDependencies": {
29+
"devDependencies": {
2730
"@angular-devkit/build-angular": "^0.900.5",
2831
"@angular/cli": "~9.0.4",
2932
"@angular/compiler-cli": "~9.0.3",

src/app/app-routing.module.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ import { ReportsComponent } from './components/options-sidebar/reports/reports.c
55
import { TimeClockComponent } from './components/options-sidebar/time-clock/time-clock.component';
66
import { TimeEntriesComponent } from './components/options-sidebar/time-entries/time-entries.component';
77
import { TimeOffComponent } from './components/options-sidebar/time-off/time-off.component';
8-
8+
import { ProjectManagementComponent } from './components/options-sidebar/project-management/project-management.component';
99

1010
const routes: Routes = [
11-
{path: 'gettingStarted', component: GettingStartedComponent},
11+
{path: 'getting-started', component: GettingStartedComponent},
1212
{path: 'reports', component: ReportsComponent},
13-
{path: 'timeClock', component: TimeClockComponent},
14-
{path: 'timeEntries', component: TimeEntriesComponent},
15-
{path: 'timeOff', component: TimeOffComponent},
16-
{path: '', pathMatch: 'full', redirectTo: 'gettingStarted'},
17-
{path: '**', pathMatch: 'full', redirectTo: 'gettingStarted'},
13+
{path: 'time-clock', component: TimeClockComponent},
14+
{path: 'time-entries', component: TimeEntriesComponent},
15+
{path: 'time-off', component: TimeOffComponent},
16+
{path: 'project-management', component: ProjectManagementComponent},
17+
{path: '', pathMatch: 'full', redirectTo: 'getting-started'},
18+
{path: '**', pathMatch: 'full', redirectTo: 'getting-started'},
1819
];
1920

2021
@NgModule({

src/app/app.component.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,4 @@ describe('AppComponent', () => {
2525
const app = fixture.componentInstance;
2626
expect(app.title).toEqual('time-tracker');
2727
});
28-
29-
it('should render title', () => {
30-
const fixture = TestBed.createComponent(AppComponent);
31-
fixture.detectChanges();
32-
const compiled = fixture.nativeElement;
33-
expect(compiled.querySelector('.content span').textContent).toContain('time-tracker app is running!');
34-
});
3528
});

src/app/app.module.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import { BrowserModule } from '@angular/platform-browser';
22
import { NgModule } from '@angular/core';
3+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
34

45
import { AppRoutingModule } from './app-routing.module';
6+
57
import { AppComponent } from './app.component';
68
import { NavbarComponent } from './components/shared/navbar/navbar.component';
79
import { UserComponent } from './components/shared/user/user.component';
810
import { SidebarComponent } from './components/shared/sidebar/sidebar.component';
911
import { ClockComponent } from './components/shared/clock/clock.component';
1012
import { TimeClockComponent } from './components/options-sidebar/time-clock/time-clock.component';
11-
13+
import { ProjectManagementComponent } from './components/options-sidebar/project-management/project-management.component';
14+
import { ProjectListComponent } from './components/shared/project-list/project-list.component';
15+
import { CreateProjectComponent } from './components/shared/create-project/create-project.component';
1216

1317
@NgModule({
1418
declarations: [
@@ -17,11 +21,16 @@ import { TimeClockComponent } from './components/options-sidebar/time-clock/time
1721
UserComponent,
1822
SidebarComponent,
1923
ClockComponent,
20-
TimeClockComponent
24+
TimeClockComponent,
25+
ProjectManagementComponent,
26+
ProjectListComponent,
27+
CreateProjectComponent
2128
],
2229
imports: [
2330
BrowserModule,
24-
AppRoutingModule
31+
AppRoutingModule,
32+
FormsModule,
33+
ReactiveFormsModule
2534
],
2635
providers: [],
2736
bootstrap: [AppComponent]

src/app/components/options-sidebar/getting-started/getting-started.component.spec.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ describe('GettingStartedComponent', () => {
66
let component: GettingStartedComponent;
77
let fixture: ComponentFixture<GettingStartedComponent>;
88

9+
function setup() {
10+
// tslint:disable-next-line: no-shadowed-variable
11+
const fixture = TestBed.createComponent(GettingStartedComponent);
12+
const app = fixture.debugElement.componentInstance;
13+
return { fixture, app };
14+
}
15+
916
beforeEach(async(() => {
1017
TestBed.configureTestingModule({
1118
declarations: [ GettingStartedComponent ]
@@ -19,7 +26,18 @@ describe('GettingStartedComponent', () => {
1926
fixture.detectChanges();
2027
});
2128

22-
it('should create', () => {
29+
it('should be created', () => {
2330
expect(component).toBeTruthy();
2431
});
32+
33+
it('should have p tag as \'getting-started works!\'', async(() => {
34+
// tslint:disable-next-line: no-shadowed-variable
35+
const { app, fixture } = setup();
36+
fixture.detectChanges();
37+
const compile = fixture.debugElement.nativeElement;
38+
const h1tag = compile.querySelector('p');
39+
expect(h1tag.textContent).toBe('getting-started works!');
40+
}));
41+
42+
2543
});
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.parent {
2+
display: flex;
3+
}
4+
5+
.item {
6+
width: 50%;
7+
margin: 2em;
8+
min-height: 500px;
9+
max-height: 500px;
10+
}
11+
12+
@media screen and (max-width: 600px){
13+
.parent {
14+
flex-direction: column-reverse;
15+
}
16+
17+
.item {
18+
width: auto;
19+
min-height: 200px;
20+
}
21+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
<div class="parent">
3+
4+
<app-create-project class="item"
5+
[projectToEdit] = "project"
6+
(savedProject)="updateProject($event)"
7+
(cancelForm) = "cancelForm()"
8+
>
9+
</app-create-project>
10+
11+
<app-project-list class="item"
12+
[projects] = "projects"
13+
(editProject) = "editProject($event)"
14+
>
15+
</app-project-list>
16+
</div>
17+

0 commit comments

Comments
 (0)