Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Make parralle request to load vehicle | b66d537ee97e2b0d1840e1440e04ea56b27e9557 | antonio.calatayud | 2019-01-28 16:50:35 |
Add get vehicle methon on vehicle service | 27c078d382ae489c49855b77d0151ea506486a96 | antonio.calatayud | 2019-01-28 15:55:08 |
Add "logging" on prod mode - just example | ead0ba75a9cf099e37676ab95f60a37aa3b883ca | antonio.calatayud | 2019-01-14 16:36:16 |
Add ngxToasta and global error handler | cb0935ff5752b72870b6b9b5138e76fd0f7d7718 | antonio.calatayud | 2019-01-14 12:42:32 |
Remove font awesome | 9ba33a938e20010daf4743f75301c994ec043a9d | antonio.calatayud | 2019-01-14 10:32:05 |
Updating solution to Angular 7 and bootsrap4. Missing font-awesome | c277172b144f2d0c11fd9a246eaf4d00dedd6092 | antonio.calatayud | 2019-01-09 16:06:28 |
Implemented client side validation on new vehicle | 10a9108113bdfbe2ae3b998a32633702e4bc13fc | Antonio Calatayud | 2019-01-08 16:24:50 |
Implement submit form | 1e197fc2a202658d14526f2791b0a4a1dc4f568b | Antonio Calatayud | 2019-01-08 16:10:49 |
Biniding inputs to vehicle object | d971e6fcc584e947b65547024fa9fd5407089b3e | Antonio Calatayud | 2019-01-08 16:04:25 |
Move Vehicle repository to UoW | 440e32fd438f2143e1453e4504a383b3d09af016 | Antonio Calatayud | 2019-01-08 15:31:51 |
Move Models to Core and fix namespaces | 7120645b3fb5c63653e56570280bf505d2dbf4ed | Antonio Calatayud | 2019-01-08 15:11:32 |
Start implementing UnitOfwork pattern | d458f0ca3bced9b78880977ee11c3437633b7da0 | Antonio Calatayud | 2019-01-08 12:03:18 |
Move more context queries to repository | 2cce05a668e039917d2c0967aa97eb3786dd5de2 | Antonio Calatayud | 2019-01-06 17:59:17 |
Start implementing repository pattern | 1d0b0cd78bc861d0e0282a69e5d88b219efbb118 | Antonio Calatayud | 2019-01-06 17:37:57 |
Return all inf when update/added vehicle | ef44980290b644244de12ad9e064ca6dcee0ac2b | Antonio Calatayud | 2019-01-04 16:51:50 |
Refactor to bring different vehicle resources between get & update/add | 6980669ec37dab31b595af6fa1be6718eef4b4e1 | Antonio Calatayud | 2019-01-04 16:37:41 |
Implemented Get Vehicle | d340e1c7dda6424e1e370465be03e4e7a74c0b3e | Antonio Calatayud | 2019-01-04 15:45:26 |
Implemented delete vehicle | a07116dd194b102098b3e826680d374ad6f3660e | Antonio Calatayud | 2019-01-04 15:32:13 |
Implement update vehicle | d52a39f524983c681a190023a40337425432c7a6 | Antonio Calatayud | 2019-01-04 15:23:19 |
Add Validation when creating a vehicle | 7a0f75bba8507110d9d8e801969cdf7497fa15a8 | antonio.calatayud | 2019-01-02 16:40:39 |
File | Lines added | Lines deleted |
---|---|---|
ClientApp/src/app/vehicule-form/vehicule-form.component.html | 3 | 0 |
ClientApp/src/app/vehicule-form/vehicule-form.component.ts | 18 | 13 |
File ClientApp/src/app/vehicule-form/vehicule-form.component.html changed (mode: 100644) (index e7b05f7..7e0d4a4) | |||
1 | 1 | <h1>New Vehicle</h1> | <h1>New Vehicle</h1> |
2 | <p> | ||
3 | {{ vehicle | json }} | ||
4 | </p> | ||
2 | 5 | <form #f="ngForm" (ngSubmit)="submit()" novalidate> | <form #f="ngForm" (ngSubmit)="submit()" novalidate> |
3 | 6 | <div class="form-group"> | <div class="form-group"> |
4 | 7 | <label for="make">Make</label> | <label for="make">Make</label> |
File ClientApp/src/app/vehicule-form/vehicule-form.component.ts changed (mode: 100644) (index 858da92..2800045) | |||
1 | 1 | import { VehicleService } from '../services/vehicle.service'; | import { VehicleService } from '../services/vehicle.service'; |
2 | 2 | import { Component, OnInit } from '@angular/core'; | import { Component, OnInit } from '@angular/core'; |
3 | 3 | import { Router, ActivatedRoute } from '@angular/router'; | import { Router, ActivatedRoute } from '@angular/router'; |
4 | import { forkJoin } from 'rxjs'; | ||
4 | 5 | ||
5 | 6 | @Component({ | @Component({ |
6 | 7 | selector: 'app-vehicule-form', | selector: 'app-vehicule-form', |
... | ... | export class VehiculeFormComponent implements OnInit { | |
26 | 27 | } | } |
27 | 28 | ||
28 | 29 | ngOnInit() { | ngOnInit() { |
29 | this.vehicleService.getVehicle(this.vehicle.id) | ||
30 | .subscribe(v => { | ||
31 | this.vehicle = v; | ||
30 | |||
31 | var sources = [ | ||
32 | this.vehicleService.getMakes(), | ||
33 | this.vehicleService.getFeatures(), | ||
34 | ]; | ||
35 | |||
36 | if (this.vehicle.id) | ||
37 | sources.push(this.vehicleService.getVehicle(this.vehicle.id)); | ||
38 | |||
39 | forkJoin(sources) | ||
40 | .subscribe(data => { | ||
41 | this.makes = data[0]; | ||
42 | this.features =data[1]; | ||
43 | if (this.vehicle.id) | ||
44 | this.vehicle = data[2]; | ||
32 | 45 | }, err => { | }, err => { |
33 | 46 | if (err.status == 404) | if (err.status == 404) |
34 | this.router.navigate(['/home']); | ||
47 | this.router.navigate(['/home']); | ||
35 | 48 | }); | }); |
36 | |||
37 | this.vehicleService.getMakes() | ||
38 | .subscribe(makes => | ||
39 | this.makes = makes); | ||
40 | |||
41 | this.vehicleService.getFeatures() | ||
42 | .subscribe(features => | ||
43 | this.features = features); | ||
44 | } | ||
49 | } | ||
45 | 50 | ||
46 | 51 | onMakeChange(){ | onMakeChange(){ |
47 | 52 | var selectedMake = this.makes.find(m => m.id == this.vehicle.makeId); | var selectedMake = this.makes.find(m => m.id == this.vehicle.makeId); |