Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers_angular
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
16
Issues
16
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobin
dcarfixers_angular
Commits
3789defa
Commit
3789defa
authored
Jan 03, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily commit
parent
73d3cc08
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
index.component.html
src/app/home/index/index.component.html
+9
-7
index.component.ts
src/app/home/index/index.component.ts
+13
-8
No files found.
src/app/home/index/index.component.html
View file @
3789defa
...
@@ -252,16 +252,17 @@
...
@@ -252,16 +252,17 @@
<div
class=
"wizard_inner"
>
<div
class=
"wizard_inner"
>
<wizard>
<wizard>
<wizard-step
stepTitle=
"Title of step 1"
>
<wizard-step
stepTitle=
"Title of step 1"
>
<form
[
formGroup
]="
vehicleDataForm
"
(
ngSubmit
)="
getVehicleData
(
vehicleDataForm
.
value
)"
>
<h3>
VEHICLE INFORMATION
</h3>
<h3>
VEHICLE INFORMATION
</h3>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<select
#
modelYear
>
<select
formControlName=
"modelYear"
>
<option>
YEAR
</option>
<option>
YEAR
</option>
<option
*
ngFor=
"let date of modelDates"
>
{{date}}
</option>
<option
*
ngFor=
"let date of modelDates"
>
{{date}}
</option>
</select>
</select>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<select
(
change
)="
get_model
($
event
.
target
.
value
)"
#
maker
>
<select
(
change
)="
get_model
($
event
.
target
.
value
)"
formControlName=
"maker"
>
<option>
MAKE
</option>
<option>
MAKE
</option>
<option
*
ngFor=
"let car_date of carSearchJsonData; let key = index"
value=
"{{key}}"
>
{{car_date.brand}}
</option>
<option
*
ngFor=
"let car_date of carSearchJsonData; let key = index"
value=
"{{key}}"
>
{{car_date.brand}}
</option>
</select>
</select>
...
@@ -269,22 +270,22 @@
...
@@ -269,22 +270,22 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<select
#
modelName
>
<select
formControlName=
"modelName"
>
<option
*
ngIf=
"!carModel"
>
MODEL
</option>
<option
*
ngIf=
"!carModel"
>
MODEL
</option>
<option
*
ngFor=
"let car_models of carModel"
>
{{car_models}}
</option>
<option
*
ngFor=
"let car_models of carModel"
>
{{car_models}}
</option>
</select>
</select>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<input
#
milage
placeholder=
"APPROX VEHICLE MILEAGE"
type=
""
>
<input
formControlName=
"milage"
placeholder=
"APPROX VEHICLE MILEAGE"
type=
""
>
</div>
</div>
</div>
</div>
<h6
class=
"textLeft pb10"
>
OPTIONAL
</h6>
<h6
class=
"textLeft pb10"
>
OPTIONAL
</h6>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<input
#
emgine
placeholder=
"ENGINE"
type=
""
>
<input
formControlName=
"emgine"
placeholder=
"ENGINE"
type=
""
>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<input
#
trim
placeholder=
"TRIM"
type=
""
>
<input
formControlName=
"trim"
placeholder=
"TRIM"
type=
""
>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -295,12 +296,13 @@
...
@@ -295,12 +296,13 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<button
class=
"log_btn prev_btn floatLeft"
type=
"button"
data-dismiss=
"modal"
>
PREVIOUS
</button>
<button
class=
"log_btn prev_btn floatLeft"
type=
"button"
data-dismiss=
"modal"
>
PREVIOUS
</button>
<button
class=
"log_btn next_btn floatRight"
type=
"button"
(
click
)="
nextStep2
()
"
>
<button
type=
"submit"
class=
"log_btn next_btn floatRight
"
>
NEXT
NEXT
</button>
</button>
<!-- nextStep -->
<!-- nextStep -->
</div>
</div>
</div>
</div>
</form>
</wizard-step>
</wizard-step>
<wizard-step
stepTitle=
"Title of step 2"
optionalStep
>
<wizard-step
stepTitle=
"Title of step 2"
optionalStep
>
<h3>
SERVICES
</h3>
<h3>
SERVICES
</h3>
...
...
src/app/home/index/index.component.ts
View file @
3789defa
...
@@ -3,6 +3,7 @@ import { WebService } from '../../provider/web.service';
...
@@ -3,6 +3,7 @@ import { WebService } from '../../provider/web.service';
import
{
NgxCarousel
}
from
'ngx-carousel'
;
import
{
NgxCarousel
}
from
'ngx-carousel'
;
import
{
MapsAPILoader
}
from
'@agm/core'
;
import
{
MapsAPILoader
}
from
'@agm/core'
;
import
{
SubjectService
}
from
'../../provider/subject.service'
;
import
{
SubjectService
}
from
'../../provider/subject.service'
;
import
{
FormGroup
,
FormControl
,
Validators
,
ValidationErrors
}
from
'@angular/forms'
;
declare
const
google
:
any
;
declare
const
google
:
any
;
...
@@ -31,12 +32,7 @@ export class IndexComponent implements OnInit {
...
@@ -31,12 +32,7 @@ export class IndexComponent implements OnInit {
@
ViewChild
(
"googleLocSearch"
)
public
searchElementRef
:
ElementRef
;
@
ViewChild
(
"googleLocSearch"
)
public
searchElementRef
:
ElementRef
;
//Vehicle Details: TAB 2
//Vehicle Details: TAB 2
@
ViewChild
(
"trim"
)
public
trim
:
ElementRef
;
vehicleDataForm
;
@
ViewChild
(
"maker"
)
public
maker
:
ElementRef
;
@
ViewChild
(
"emgine"
)
public
emgine
:
ElementRef
;
@
ViewChild
(
"milage"
)
public
milage
:
ElementRef
;
@
ViewChild
(
"modelName"
)
public
modelName
:
ElementRef
;
@
ViewChild
(
"modelYear"
)
public
modelYear
:
ElementRef
;
carModel
:
any
;
carModel
:
any
;
carSearchJsonData
:
any
;
carSearchJsonData
:
any
;
...
@@ -52,6 +48,15 @@ export class IndexComponent implements OnInit {
...
@@ -52,6 +48,15 @@ export class IndexComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
vehicleDataForm
=
new
FormGroup
({
trim
:
new
FormControl
(
''
,
[
Validators
.
required
]),
maker
:
new
FormControl
(
''
,
[
Validators
.
required
]),
milage
:
new
FormControl
(
''
,
[
Validators
.
required
]),
emgine
:
new
FormControl
(
''
,
[
Validators
.
required
]),
modelYear
:
new
FormControl
(
''
,
[
Validators
.
required
]),
modelName
:
new
FormControl
(
''
,
[
Validators
.
required
])
});
this
.
webService
.
get_stored_json
(
'car-list.json'
).
subscribe
((
response
:
any
)
=>
{
this
.
webService
.
get_stored_json
(
'car-list.json'
).
subscribe
((
response
:
any
)
=>
{
this
.
carSearchJsonData
=
response
;
this
.
carSearchJsonData
=
response
;
});
});
...
@@ -105,8 +110,8 @@ export class IndexComponent implements OnInit {
...
@@ -105,8 +110,8 @@ export class IndexComponent implements OnInit {
});
});
}
}
nextStep2
(
){
getVehicleData
(
vehicleData
){
console
.
log
(
this
.
trim
.
nativeElement
.
value
+
' '
+
this
.
maker
+
' '
+
this
.
emgine
+
' '
+
this
.
milage
+
' '
+
this
.
modelName
+
' '
+
this
.
modelYear
);
console
.
log
(
vehicleData
);
}
}
featuredOnLoad
()
{
return
''
;
}
featuredOnLoad
()
{
return
''
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment