Resources
-Here are some links to help you get started:
- - - - -Next Steps
-What do you want to do next with your app?
- - - -ng generate component xyz-
ng add @angular/material-
ng add @angular/pwa-
ng add _____-
ng test-
ng build --prod-
diff --git a/README.md b/README.md
index e5c5427..9a4b344 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,38 @@
-# NgPeti
+## Ejercicio
-This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.
+La idea es con los conceptos que ya tenemos de Angular, @Input, @Output y componentes
+Completar el presente repositorio para que la aplicacion funcione.
-## Development server
+## TodoList
-Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
+Tengo una lista de tareas.
-## Code scaffolding
++ Como usuario quiero poder agregar una tarea. Una tera consiste en un texto y en un estado que puede ser pendiente o completada.
++ Al agregarse la tarea esta siempre pendiente.
++ A medida que se van agregando elementos se le asigna un id unico secuencial a cada tarea.
++ Como usuario quiero poder eliminar una tarea, haciendo click en un comando junto a ella.
++ como usuario quiero cambiar el estado de una tarea de completada a pendiente y viceversa.
++ Como usuario quiero que las tareas completadas se muestren con una diferenciacion visual de las pendientes, puede ser un tachado, un color de fondo o algo.
++ como usuario quiero ver la cantidad total de tareas pendientes y completadas que tengo en mi lista en un footer.
++ En la lista de tareas se puede ver el id descripcion y el estado de cada tarea, ademas de un boton para elimnarla y otro para cambiar el estado.
-Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+Se deben usar los componentes que estan planteados y completar la funcionalidad faltante para que compile y se pueda hacer el
-## Build
+```ng build```
+```ng build --prod```
+```ng serve```
-Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
+## Nivel 2 (opcional)
+Si te resulto muy facil la primera parte. o si ya tenes experiencia con Angular, React, Vue u otros frameworks.
++ Persistir la lista en localStorage
++ Permitir la edicion de una tarea.
++ Medir el tiempo que se tarda en completar una tarea y mostrar en el footer el tiempo promedio.
++ Permitir seleccionar un icono de fontawesome, bootstrap icons o cualquier libreria publica de iconos, para la tarea.
-## Running unit tests
+## Para entregar el trabajo
++ Hacer un fork de este repositorio tomar la rama todo-list-exercise y hacer un pull request a dicha rama.
+[Aqui](https://blog.desdelinux.net/tutorial-simple-primer-pr-pull-request/)
+y [Aqui](https://github.com/omegaup/omegaup/wiki/C%C3%B3mo-Hacer-un-Pull-Request) les deoj una guia de como usar git para un Pull request.
-Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+Me mandan el link al pull request asi les puedo mandar comentarios mediante github.
-## Running end-to-end tests
-
-Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
-
-## Further help
-
-To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
diff --git a/angular.json b/angular.json
index 4deb648..5ef45ef 100644
--- a/angular.json
+++ b/angular.json
@@ -28,6 +28,8 @@
"src/assets"
],
"styles": [
+ "./node_modules/bootstrap/dist/css/bootstrap.min.css",
+ "./node_modules/ngx-bootstrap/datepicker/bs-datepicker.css",
"src/styles.scss"
],
"scripts": []
@@ -92,6 +94,8 @@
"src/assets"
],
"styles": [
+ "./node_modules/bootstrap/dist/css/bootstrap.min.css",
+ "./node_modules/ngx-bootstrap/datepicker/bs-datepicker.css",
"src/styles.scss"
],
"scripts": []
@@ -123,6 +127,10 @@
}
}
}
- }},
- "defaultProject": "ng-peti"
-}
+ }
+ },
+ "defaultProject": "ng-peti",
+ "cli": {
+ "analytics": "c76bc45b-c7fb-4ecf-964f-548622b6d1dd"
+ }
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 512f702..90e9696 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2492,6 +2492,11 @@
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
"dev": true
},
+ "bootstrap": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.1.1.tgz",
+ "integrity": "sha512-SpiDSOcbg4J/PjVSt4ny5eY6j74VbVSjROY4Fb/WIUXBV9cnb5luyR4KnPvNoXuGnBK1T+nJIWqRsvU3yP8Mcg=="
+ },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -7423,6 +7428,11 @@
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==",
"dev": true
},
+ "ngx-bootstrap": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-4.3.0.tgz",
+ "integrity": "sha512-ZPS6V2yLEeqB/7KIlVohS8qUdtFa1bgUB/sSPWRcXqOWU3EKhORetZoXG6m2F5ILYDe5hwQvBEjdHPlEz2piOg=="
+ },
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
diff --git a/package.json b/package.json
index 72b4bd7..c512cf5 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,8 @@
"@angular/platform-browser": "~9.1.1",
"@angular/platform-browser-dynamic": "~9.1.1",
"@angular/router": "~9.1.1",
+ "bootstrap": "4.1.1",
+ "ngx-bootstrap": "^4.1.1",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
diff --git a/src/app/app.component.html b/src/app/app.component.html
index e48d8c1..d36fe36 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,534 +1,2 @@
-
-
-
-
-
-
-
-
+
Here are some links to help you get started:
- - - - -What do you want to do next with your app?
- - - -ng generate component xyz-
ng add @angular/material-
ng add @angular/pwa-
ng add _____-
ng test-
ng build --prod-
Tareas Pendientes: {{updateUncompleted()}} Tareas Completadas: {{updateCompleted()}}
diff --git a/src/app/todo-footer/todo-footer.component.scss b/src/app/todo-footer/todo-footer.component.scss new file mode 100644 index 0000000..bc8f56f --- /dev/null +++ b/src/app/todo-footer/todo-footer.component.scss @@ -0,0 +1,10 @@ +p { + margin-left: 1%; + background-color: grey; + color: honeydew; + vertical-align: middle; + font-weight: bolder; + height: 40px; + padding-left: 0.5%; + +} \ No newline at end of file diff --git a/src/app/todo-footer/todo-footer.component.spec.ts b/src/app/todo-footer/todo-footer.component.spec.ts new file mode 100644 index 0000000..71f36d8 --- /dev/null +++ b/src/app/todo-footer/todo-footer.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TodoFooterComponent } from './todo-footer.component'; + +describe('TodoFooterComponent', () => { + let component: TodoFooterComponent; + let fixture: ComponentFixture
+Presione enter para aƱadir
diff --git a/src/app/todo-form/todo-form.component.scss b/src/app/todo-form/todo-form.component.scss
new file mode 100644
index 0000000..f1ff683
--- /dev/null
+++ b/src/app/todo-form/todo-form.component.scss
@@ -0,0 +1,15 @@
+.inputAdd {
+ margin-left: 1%;
+ width: 20%;
+ outline: 0;
+ border-width: 0 0 2px;
+ border-color: mediumblue;
+}
+
+.inputAdd::placeholder {
+ text-align: center;
+}
+
+.inputAdd:focus{
+ border-color: lime;
+}
\ No newline at end of file
diff --git a/src/app/todo-form/todo-form.component.spec.ts b/src/app/todo-form/todo-form.component.spec.ts
new file mode 100644
index 0000000..6f823ef
--- /dev/null
+++ b/src/app/todo-form/todo-form.component.spec.ts
@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TodoFormComponent } from './todo-form.component';
+
+describe('TodoFormComponent', () => {
+ let component: TodoFormComponent;
+ let fixture: ComponentFixture| Tareas Pendientes | +
|---|
| + + {{item.description}} + + | +Tareas Completadas | +
| + + {{item.description}} + + | +
No hay tareas
\ No newline at end of file diff --git a/src/app/todo-list/todo-list.component.scss b/src/app/todo-list/todo-list.component.scss new file mode 100644 index 0000000..b40ddb9 --- /dev/null +++ b/src/app/todo-list/todo-list.component.scss @@ -0,0 +1,45 @@ +.completed { + background-color: lightgreen; + border: limegreen; +} + +tr.completed { + + text-decoration: line-through; +} + +tr.completed:hover { + background-color: limegreen +} +tr.uncompleted:hover { + background-color: tomato; +} +.uncompleted { + background-color: lightsalmon; + border: tomato; +} + +table { + margin: 1%; + width: 98%; +} + +th { + border-bottom: 1px solid white; +} + +td { + height: fit-content; + padding: 15px; + text-align: left; +} + +.emptyList { + background-color: grey; + color: honeydew; + vertical-align: middle; + font-weight: bolder; + height: 40px; + margin: 1%; + padding-left: 0.5%; +} \ No newline at end of file diff --git a/src/app/todo-list/todo-list.component.spec.ts b/src/app/todo-list/todo-list.component.spec.ts new file mode 100644 index 0000000..9865d1d --- /dev/null +++ b/src/app/todo-list/todo-list.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TodoListComponent } from './todo-list.component'; + +describe('TodoListComponent', () => { + let component: TodoListComponent; + let fixture: ComponentFixture