List of commits:
Subject Hash Author Date (UTC)
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
Add vehicle to database capability fa84eb5a526a124b4ec7126271052611e0f57bb1 antonio.calatayud 2019-01-02 16:22:18
Fix Migrations e540688f04b874a8f3f5c95c6f31c640440b2921 antonio.calatayud 2019-01-02 15:51:37
Create controller and resource to create new vehicle a1c21acba62f5070cc61ffc4910218be3e52b052 Antonio Calatayud 2018-12-19 15:50:37
New vehicle model for context 1040629cd4f2931f0c4ebee6f5c505ebaff3d97b Antonio Calatayud 2018-11-26 17:43:04
Finish form 291cafcfa67fbfec687fc2d58e4fb70e8cb11975 Antonio Calatayud 2018-11-26 16:31:54
Merge services 385e874ea56eb15a14f983e94d5cbd444cc13ba7 Antonio Calatayud 2018-11-16 22:40:25
Populate feature checkboxes 1d31b1b0f70c96ceb04f375bb28affbdcc6bbf93 Antonio Calatayud 2018-11-16 22:30:32
Create Feature Service 83633fa68f9ceb113974f8cfa1cbad527dcb1730 Antonio Calatayud 2018-11-16 22:21:55
Commit d971e6fcc584e947b65547024fa9fd5407089b3e - Biniding inputs to vehicle object
Author: Antonio Calatayud
Author date (UTC): 2019-01-08 16:04
Committer name: Antonio Calatayud
Committer date (UTC): 2019-01-08 16:04
Parent(s): 440e32fd438f2143e1453e4504a383b3d09af016
Signing key:
Tree: 452343069f12bad019657986f013003adb453627
File Lines added Lines deleted
ClientApp/src/app/vehicule-form/vehicule-form.component.html 12 8
ClientApp/src/app/vehicule-form/vehicule-form.component.ts 16 2
File ClientApp/src/app/vehicule-form/vehicule-form.component.html changed (mode: 100644) (index 30ddf80..cea0db6)
1 1 <h1>New Vehicle</h1> <h1>New Vehicle</h1>
2 <p>
3 For debug
4 {{vehicle | json }}
5 </p>
2 6 <form> <form>
3 7 <div class="form-group"> <div class="form-group">
4 8 <label for="make">Make</label> <label for="make">Make</label>
5 <select name="make" id="make" class="form-control" (change)="onMakeChange()" [(ngModel)]="vehicle.make">
9 <select name="makeId" id="make" class="form-control" (change)="onMakeChange()" [(ngModel)]="vehicle.makeId">
6 10 <option value=""></option> <option value=""></option>
7 11 <option *ngFor="let m of makes" value="{{m.id}}">{{m.name}}</option> <option *ngFor="let m of makes" value="{{m.id}}">{{m.name}}</option>
8 12 </select> </select>
9 13 </div> </div>
10 14 <div class="form-group"> <div class="form-group">
11 15 <label for="model">Model</label> <label for="model">Model</label>
12 <select id="model" class="form-control">
16 <select id="model" class="form-control" [(ngModel)]="vehicle.modelId" name="modelId">
13 17 <option *ngFor="let m of models" value="{{m.id}}">{{m.name}}</option> <option *ngFor="let m of models" value="{{m.id}}">{{m.name}}</option>
14 18 </select> </select>
15 19 </div> </div>
16 20 <p>Is this vehicle registered?</p> <p>Is this vehicle registered?</p>
17 21 <div class="radio-inline"> <div class="radio-inline">
18 22 <label for="registered"> <label for="registered">
19 <input type="radio" name="isResgistered" value="true" id="registered">Yes
23 <input type="radio" name="isResgistered" value="true" id="registered" [(ngModel)]="vehicle.isResgistered">Yes
20 24 </label> </label>
21 25 </div> </div>
22 26 <div class="radio-inline"> <div class="radio-inline">
23 27 <label for="notRegistered"> <label for="notRegistered">
24 <input type="radio" name="isResgistered" value="false" id="notRegistered">No
28 <input type="radio" name="isResgistered" value="false" id="notRegistered" [(ngModel)]="vehicle.isResgistered">No
25 29 </label> </label>
26 30 </div> </div>
27 31 <h2>Features</h2> <h2>Features</h2>
28 32 <div *ngFor="let f of features" class="form-check"> <div *ngFor="let f of features" class="form-check">
29 33 <label class="form-check-label" for="feature{{f.id}}"> <label class="form-check-label" for="feature{{f.id}}">
30 <input class="form-check-input" type="checkbox" value="{{f.id}}" id="feature{{f.id}}">
34 <input class="form-check-input" type="checkbox" value="{{f.id}}" id="feature{{f.id}}" (change)="onFeatureToggle(f.id, $event)">
31 35 {{f.name}} {{f.name}}
32 36 </label> </label>
33 37 </div> </div>
34 38 <h2>Contact</h2> <h2>Contact</h2>
35 39 <div class="form-group"> <div class="form-group">
36 40 <label for="contactName">Name</label> <label for="contactName">Name</label>
37 <input id="contactName" type="text" class="form-control">
41 <input id="contactName" type="text" class="form-control" [(ngModel)]="vehicle.contact.name" name="contacName">
38 42 </div> </div>
39 43 <div class="form-group"> <div class="form-group">
40 44 <label for="contactPhone">Phone</label> <label for="contactPhone">Phone</label>
41 <input id="contactPhone" type="text" class="form-control">
45 <input id="contactPhone" type="text" class="form-control" [(ngModel)]="vehicle.contact.phone" name="contacPhone">
42 46 </div> </div>
43 47 <div class="form-group"> <div class="form-group">
44 48 <label for="contactEmail">Email</label> <label for="contactEmail">Email</label>
45 <input id="contactEmail" type="text" class="form-control">
49 <input id="contactEmail" type="text" class="form-control" [(ngModel)]="vehicle.contact.email" name="contacEmail">
46 50 </div> </div>
47 51 <button class="btn btn-primary">Save</button> <button class="btn btn-primary">Save</button>
48 52 </form> </form>
File ClientApp/src/app/vehicule-form/vehicule-form.component.ts changed (mode: 100644) (index 9cfa53b..c29c270)
... ... import { Component, OnInit } from '@angular/core';
8 8 }) })
9 9 export class VehiculeFormComponent implements OnInit { export class VehiculeFormComponent implements OnInit {
10 10 makes: any[]; makes: any[];
11 vehicle: any = {};
11 vehicle: any = {
12 features: [],
13 contact:{}
14 };
12 15 models: any[]; models: any[];
13 16 features: any[]; features: any[];
14 17
 
... ... export class VehiculeFormComponent implements OnInit {
23 26 } }
24 27
25 28 onMakeChange(){ onMakeChange(){
26 var selectedMake = this.makes.find(m => m.id == this.vehicle.make);
29 var selectedMake = this.makes.find(m => m.id == this.vehicle.makeId);
27 30 this.models = selectedMake? selectedMake.models : []; this.models = selectedMake? selectedMake.models : [];
31 delete this.vehicle.modelId;
32 }
33
34 onFeatureToggle(featureId, $event){
35 if ($event.target.checked) {
36 this.vehicle.features.push(featureId);
37 }
38 else {
39 var index = this.vehicle.features.indexOf(featureId);
40 this.vehicle.features.splice(index, 1);
41 }
28 42 } }
29 43 } }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/antcalatayud/vega

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/antcalatayud/vega

Clone this repository using git:
git clone git://git.rocketgit.com/user/antcalatayud/vega

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main