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
be42bb4b
Commit
be42bb4b
authored
Aug 05, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
98b712b8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
482 additions
and
141 deletions
+482
-141
launch.json
.vscode/launch.json
+0
-19
package-lock.json
package-lock.json
+0
-0
footer.component.html
src/app/footer/footer.component.html
+3
-2
footer.component.ts
src/app/footer/footer.component.ts
+26
-4
dashboard.component.html
src/app/home/dashboard/dashboard.component.html
+0
-0
dashboard.component.scss
src/app/home/dashboard/dashboard.component.scss
+8
-2
dashboard.component.ts
src/app/home/dashboard/dashboard.component.ts
+102
-5
index.component.html
src/app/home/index/index.component.html
+15
-11
index.component.ts
src/app/home/index/index.component.ts
+72
-15
navbar.component.html
src/app/navbar/navbar.component.html
+30
-18
navbar.component.scss
src/app/navbar/navbar.component.scss
+27
-6
navbar.component.ts
src/app/navbar/navbar.component.ts
+50
-29
cart.component.ts
src/app/purchase/cart/cart.component.ts
+7
-7
orders.component.html
src/app/purchase/orders/orders.component.html
+3
-1
productdetails.component.html
...app/purchase/productdetails/productdetails.component.html
+1
-0
productdetails.component.scss
...app/purchase/productdetails/productdetails.component.scss
+10
-0
productlist.component.html
src/app/purchase/productlist/productlist.component.html
+14
-8
productlist.component.ts
src/app/purchase/productlist/productlist.component.ts
+72
-4
purchase-home.component.scss
src/app/purchase/purchase-home/purchase-home.component.scss
+1
-1
purchase.module.ts
src/app/purchase/purchase.module.ts
+2
-0
summary.component.ts
src/app/purchase/summary/summary.component.ts
+2
-1
track.component.html
src/app/purchase/track/track.component.html
+3
-1
track.component.ts
src/app/purchase/track/track.component.ts
+12
-4
responsive.scss
src/assets/css/responsive.scss
+19
-1
asset_icon3.png
src/assets/images/asset_icon3.png
+0
-0
server.config.ts
src/environments/server.config.ts
+2
-2
index.html
src/index.html
+1
-0
No files found.
.vscode/launch.json
deleted
100644 → 0
View file @
98b712b8
{
//
Use
IntelliSense
to
learn
about
possible
attributes.
//
Hover
to
view
descriptions
of
existing
attributes.
//
For
more
information
,
visit
:
https
:
//go.microsoft.com/fwlink/?linkid=
830387
"version"
:
"0.2.0"
,
"configurations"
:
[
{
"type"
:
"node"
,
"request"
:
"launch"
,
"name"
:
"Launch Program"
,
"program"
:
"${workspaceFolder}
\\
serve"
,
"preLaunchTask"
:
"tsc: build - tsconfig.json"
,
"outFiles"
:
[
"${workspaceFolder}/dist/out-tsc/**/*.js"
]
}
]
}
\ No newline at end of file
package-lock.json
View file @
be42bb4b
This diff is collapsed.
Click to expand it.
src/app/footer/footer.component.html
View file @
be42bb4b
...
@@ -36,10 +36,10 @@
...
@@ -36,10 +36,10 @@
<h5>
DISCOVER
</h5>
<h5>
DISCOVER
</h5>
<ul>
<ul>
<li>
<li>
<a>
How it works
</a>
<a
(
click
)="
howitwrks
()"
>
How it works
</a>
</li>
</li>
<li>
<li>
<a>
Sign Up
</a>
<a
(
click
)="
signUp
()"
>
Sign Up
</a>
</li>
</li>
<li>
<li>
<a>
Guarantee
</a>
<a>
Guarantee
</a>
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
<input
type=
"hidden"
#
indexLoginModal
data-toggle=
"modal"
data-target=
"#login"
>
<div
class=
"col-md-2"
>
<div
class=
"col-md-2"
>
<h5>
DOWNLOAD NOW
</h5>
<h5>
DOWNLOAD NOW
</h5>
<div
class=
"appstore"
>
<div
class=
"appstore"
>
...
...
src/app/footer/footer.component.ts
View file @
be42bb4b
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
,
ElementRef
}
from
'@angular/core'
;
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
WebService
}
from
'./../provider/web.service'
;
@
Component
({
@
Component
({
selector
:
'app-footer'
,
selector
:
'app-footer'
,
...
@@ -8,18 +9,39 @@ import { Router,ActivatedRoute } from '@angular/router';
...
@@ -8,18 +9,39 @@ import { Router,ActivatedRoute } from '@angular/router';
})
})
export
class
FooterComponent
implements
OnInit
{
export
class
FooterComponent
implements
OnInit
{
loginDetails
:
any
;
@
ViewChild
(
"indexLoginModal"
)
loginModalRef
:
ElementRef
;
constructor
(
constructor
(
private
router
:
Router
,
private
router
:
Router
,
private
route
:
ActivatedRoute
private
route
:
ActivatedRoute
,
public
webService
:
WebService
,
)
{
}
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
checkUserLogin
();
}
}
checkUserLogin
(){
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
}
goToPage
(
path
,
data
=
null
){
goToPage
(
path
,
data
=
null
){
this
.
router
.
navigateByUrl
(
path
,{
queryParams
:
data
});
this
.
router
.
navigate
([
path
],{
queryParams
:
data
});
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
}
signUp
(){
if
(
!
this
.
loginDetails
){
this
.
loginModalRef
.
nativeElement
.
click
();
return
false
;
}
}
}
howitwrks
(){
this
.
goToPage
(
'index'
,{
"tab"
:
"1"
});
}
}
}
src/app/home/dashboard/dashboard.component.html
View file @
be42bb4b
This diff is collapsed.
Click to expand it.
src/app/home/dashboard/dashboard.component.scss
View file @
be42bb4b
...
@@ -639,13 +639,13 @@
...
@@ -639,13 +639,13 @@
border
:
1px
solid
#1e1e1e
;
border
:
1px
solid
#1e1e1e
;
height
:
40px
;
height
:
40px
;
padding-left
:
15px
;
padding-left
:
15px
;
font-size
:
1
6
px
;
font-size
:
1
3
px
;
}
}
.vehicle_input_select
{
.vehicle_input_select
{
width
:
100%
;
width
:
100%
;
border
:
1px
solid
#1e1e1e
;
border
:
1px
solid
#1e1e1e
;
background
:
url("/assets/images/asset_down_arrow.png")
;
background
:
url("/assets/images/asset_down_arrow.png")
;
font-size
:
1
6
px
;
font-size
:
1
3
px
;
cursor
:
pointer
;
cursor
:
pointer
;
background-position
:
right
10px
top
10px
;
background-position
:
right
10px
top
10px
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
...
@@ -1662,4 +1662,9 @@
...
@@ -1662,4 +1662,9 @@
}
}
}
}
.noti_slash
{
width
:
55px
;
}
\ No newline at end of file
src/app/home/dashboard/dashboard.component.ts
View file @
be42bb4b
...
@@ -49,6 +49,7 @@ export class DashboardComponent implements OnInit {
...
@@ -49,6 +49,7 @@ export class DashboardComponent implements OnInit {
autocompleteDetails
:
any
;
autocompleteDetails
:
any
;
optionalDescription
:
string
;
optionalDescription
:
string
;
editProfileSubmitClick
:
boolean
;
editProfileSubmitClick
:
boolean
;
remainders
:
any
;
vehicleVinAddForm
;
vehicleVinAddForm
;
vehicleVinFormSubmitClick
;
vehicleVinFormSubmitClick
;
...
@@ -92,6 +93,11 @@ export class DashboardComponent implements OnInit {
...
@@ -92,6 +93,11 @@ export class DashboardComponent implements OnInit {
scheduleMechanic
:
any
;
scheduleMechanic
:
any
;
optionalImges
:
any
=
new
Array
({
1
:
false
,
2
:
false
,
3
:
false
,
4
:
false
});
optionalImges
:
any
=
new
Array
({
1
:
false
,
2
:
false
,
3
:
false
,
4
:
false
});
vehiYear
:
any
;
vehiBrand
:
any
;
vehiModel
:
any
;
carTrim
:
any
;
imageDisp1
:
any
;
imageDisp1
:
any
;
imageDisp2
:
any
;
imageDisp2
:
any
;
imageDisp3
:
any
;
imageDisp3
:
any
;
...
@@ -110,6 +116,8 @@ export class DashboardComponent implements OnInit {
...
@@ -110,6 +116,8 @@ export class DashboardComponent implements OnInit {
@
ViewChild
(
"googleLocDetails"
)
public
googleLocDetailsRef
:
ElementRef
;
@
ViewChild
(
"googleLocDetails"
)
public
googleLocDetailsRef
:
ElementRef
;
@
ViewChild
(
"newGoogleLocSearch"
)
public
newGoogleLocRef
:
ElementRef
;
@
ViewChild
(
"newGoogleLocSearch"
)
public
newGoogleLocRef
:
ElementRef
;
@
ViewChild
(
"appointmentTab"
)
public
appointmentTabRef
:
ElementRef
;
@
ViewChild
(
"appointmentTab"
)
public
appointmentTabRef
:
ElementRef
;
@
ViewChild
(
"vehicleTab"
)
public
vehicleTabRef
:
ElementRef
;
@
ViewChild
(
"reminderTab"
)
public
reminderTabRef
:
ElementRef
;
@
ViewChild
(
"serviceHistoryTab"
)
public
serviceHistoryTabRef
:
ElementRef
;
@
ViewChild
(
"serviceHistoryTab"
)
public
serviceHistoryTabRef
:
ElementRef
;
@
ViewChild
(
"closeVehicleAddForm"
)
public
closeVehicleAddFormRef
:
ElementRef
;
@
ViewChild
(
"closeVehicleAddForm"
)
public
closeVehicleAddFormRef
:
ElementRef
;
...
@@ -145,10 +153,12 @@ export class DashboardComponent implements OnInit {
...
@@ -145,10 +153,12 @@ export class DashboardComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
currentTime
=
this
.
today
.
getTime
();
this
.
currentTime
=
this
.
today
.
getTime
();
this
.
currentDate
=
this
.
today
.
getDate
();
this
.
currentDate
=
this
.
today
.
getDate
();
this
.
tab
=
'active'
;
this
.
tab
=
'active'
;
this
.
route
.
queryParams
.
subscribe
(
params
=>
{
this
.
route
.
queryParams
.
subscribe
(
params
=>
{
let
payStatus
=
params
[
'status'
];
let
payStatus
=
params
[
'status'
];
let
activeTab
=
params
[
'tab'
];
let
activeTab
=
params
[
'tab'
];
let
vehTab
=
params
[
'redrct_tab'
];
if
(
payStatus
&&
payStatus
!=
''
){
if
(
payStatus
&&
payStatus
!=
''
){
if
(
payStatus
==
'success'
)
if
(
payStatus
==
'success'
)
...
@@ -165,6 +175,15 @@ export class DashboardComponent implements OnInit {
...
@@ -165,6 +175,15 @@ export class DashboardComponent implements OnInit {
this
.
appointmentTabRef
.
nativeElement
.
click
();
this
.
appointmentTabRef
.
nativeElement
.
click
();
}
}
}
}
if
(
vehTab
&&
vehTab
!=
''
){
if
(
vehTab
==
'vehicle'
){
this
.
vehicleTabRef
.
nativeElement
.
click
();
}
if
(
vehTab
==
'reminder'
){
this
.
reminderTabRef
.
nativeElement
.
click
();
}
}
});
});
this
.
vehicleVinAddForm
=
new
FormGroup
({
this
.
vehicleVinAddForm
=
new
FormGroup
({
...
@@ -176,11 +195,14 @@ export class DashboardComponent implements OnInit {
...
@@ -176,11 +195,14 @@ export class DashboardComponent implements OnInit {
maker
:
new
FormControl
(
''
,
[
Validators
.
required
]),
maker
:
new
FormControl
(
''
,
[
Validators
.
required
]),
location
:
new
FormControl
(
''
,
[
Validators
.
required
]),
location
:
new
FormControl
(
''
,
[
Validators
.
required
]),
modelYear
:
new
FormControl
(
''
,
[
Validators
.
required
]),
modelYear
:
new
FormControl
(
''
,
[
Validators
.
required
]),
modelName
:
new
FormControl
(
''
,
[
Validators
.
required
])
modelName
:
new
FormControl
(
''
,
[
Validators
.
required
]),
engine
:
new
FormControl
(
''
),
trim
:
new
FormControl
(
''
),
last_date
:
new
FormControl
(
''
),
maintanence_interval
:
new
FormControl
(
''
)
});
});
this
.
getVehicleBrand
();
this
.
getVehicleBrand
();
this
.
subjectService
.
getLoginData
().
subscribe
(
loginData
=>
{
this
.
subjectService
.
getLoginData
().
subscribe
(
loginData
=>
{
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
...
@@ -197,6 +219,7 @@ export class DashboardComponent implements OnInit {
...
@@ -197,6 +219,7 @@ export class DashboardComponent implements OnInit {
});
});
this
.
getCustVehDetails
();
this
.
getCustVehDetails
();
this
.
getCustBookDetails
();
this
.
getCustBookDetails
();
this
.
getCustRemainders
();
}
else
{
}
else
{
this
.
router
.
navigate
([
'index'
]);
this
.
router
.
navigate
([
'index'
]);
}
}
...
@@ -235,8 +258,24 @@ export class DashboardComponent implements OnInit {
...
@@ -235,8 +258,24 @@ export class DashboardComponent implements OnInit {
this
.
loader
=
false
;
this
.
loader
=
false
;
});
});
}
}
get_vehiYear
(
year
){
if
(
year
==
''
){
return
;
}
this
.
carTrim
=
this
.
carModel
=
[];
this
.
vehiYear
=
year
;
if
(
this
.
vehiBrand
){
this
.
get_model
(
this
.
vehiBrand
);
}
}
get_model
(
brand_id
)
{
get_model
(
brand_id
)
{
this
.
vehiBrand
=
brand_id
;
if
(
!
this
.
vehiYear
){
return
false
;
}
this
.
carTrim
=
this
.
carModel
=
[];
this
.
loader
=
true
;
this
.
loader
=
true
;
const
thisObj
=
this
;
const
thisObj
=
this
;
thisObj
.
carBrands
.
forEach
(
function
(
brandData
,
index
)
{
thisObj
.
carBrands
.
forEach
(
function
(
brandData
,
index
)
{
...
@@ -245,7 +284,7 @@ export class DashboardComponent implements OnInit {
...
@@ -245,7 +284,7 @@ export class DashboardComponent implements OnInit {
}
}
});
});
this
.
webService
.
post_data
(
'getVehicleModel'
,{
'vehBrand_id'
:
brand_id
}).
subscribe
(
response
=>
{
this
.
webService
.
post_data
(
'getVehicleModel'
,{
'vehBrand_id'
:
brand_id
,
'type'
:
0
,
'vehiYear'
:
this
.
vehiYear
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
if
(
response
.
status
==
'success'
){
this
.
carModel
=
response
.
data
;
this
.
carModel
=
response
.
data
;
}
}
...
@@ -253,6 +292,27 @@ export class DashboardComponent implements OnInit {
...
@@ -253,6 +292,27 @@ export class DashboardComponent implements OnInit {
});
});
}
}
get_trims
(
event
){
const
model
=
event
.
target
.
options
[
event
.
target
.
selectedIndex
].
getAttribute
(
'modelValue'
);
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'getVehicleTrim'
,{
'vehBrand_id'
:
this
.
vehiBrand
,
'vehiYear'
:
this
.
vehiYear
,
'vehiModel'
:
model
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
this
.
carTrim
=
response
.
data
;
}
this
.
loader
=
false
;
});
}
getCustRemainders
(){
this
.
webService
.
post_data
(
'getCustRemainders'
,{
'customer_id'
:
this
.
loginDetails
.
customer_id
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
this
.
remainders
=
response
.
data
;
}
else
{
this
.
remainders
=
false
;
}
});
}
getCustBookDetails
(){
getCustBookDetails
(){
this
.
loader
=
true
;
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'getCustBookDetails'
,
{
'customer_id'
:
this
.
loginDetails
.
customer_id
}).
subscribe
(
response
=>
{
this
.
webService
.
post_data
(
'getCustBookDetails'
,
{
'customer_id'
:
this
.
loginDetails
.
customer_id
}).
subscribe
(
response
=>
{
...
@@ -296,6 +356,16 @@ export class DashboardComponent implements OnInit {
...
@@ -296,6 +356,16 @@ export class DashboardComponent implements OnInit {
this
.
loader
=
false
;
this
.
loader
=
false
;
});
});
}
}
changeReminder
(
custVehId
,
status
){
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'changeReminderStatus'
,
{
'customer_veh_id'
:
custVehId
,
'status'
:
status
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
)
{
this
.
getCustVehDetails
();
}
this
.
loader
=
false
;
});
}
setIssueSelected
(
event
){
setIssueSelected
(
event
){
let
issue_id
=
event
.
target
.
attributes
.
issue_id
.
value
;
let
issue_id
=
event
.
target
.
attributes
.
issue_id
.
value
;
...
@@ -488,6 +558,8 @@ export class DashboardComponent implements OnInit {
...
@@ -488,6 +558,8 @@ export class DashboardComponent implements OnInit {
}
}
addCustomerCar
(
type
,
vehicleData
,
location
){
addCustomerCar
(
type
,
vehicleData
,
location
){
vehicleData
[
'lastMaintanceDate'
]
=
(
vehicleData
[
'last_date'
])?(
formatDate
(
vehicleData
[
'last_date'
],
'MM/dd/yyyy'
,
'en'
)):
''
;
this
.
loader
=
true
;
this
.
loader
=
true
;
let
postData
=
{
'type'
:
type
,
'customer_id'
:
this
.
loginDetails
.
customer_id
,
'vehicleData'
:
vehicleData
,
'location'
:
location
};
let
postData
=
{
'type'
:
type
,
'customer_id'
:
this
.
loginDetails
.
customer_id
,
'vehicleData'
:
vehicleData
,
'location'
:
location
};
...
@@ -516,6 +588,16 @@ export class DashboardComponent implements OnInit {
...
@@ -516,6 +588,16 @@ export class DashboardComponent implements OnInit {
}
}
});
});
}
}
changeVehicleReminder
(
params
){
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'changeReminderStatus'
,
params
).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
)
{
this
.
getCustRemainders
();
}
this
.
loader
=
false
;
});
}
optImgUpload
(
image_id
,
event
){
optImgUpload
(
image_id
,
event
){
let
reader
=
new
FileReader
();
let
reader
=
new
FileReader
();
...
@@ -552,7 +634,7 @@ export class DashboardComponent implements OnInit {
...
@@ -552,7 +634,7 @@ export class DashboardComponent implements OnInit {
resetVehicleForm
(){
resetVehicleForm
(){
this
.
vehicleVinAddForm
.
reset
();
this
.
vehicleVinAddForm
.
reset
();
this
.
vehicleDetailsAddForm
.
reset
({
this
.
vehicleDetailsAddForm
.
reset
({
maker
:
''
,
modelYear
:
''
,
modelName
:
''
,
location
:
''
maker
:
''
,
modelYear
:
''
,
modelName
:
''
,
location
:
''
,
last_date
:
''
,
maintanence_interval
:
''
,
engine
:
''
,
trim
:
''
});
});
}
}
...
@@ -689,7 +771,6 @@ getQuote(){
...
@@ -689,7 +771,6 @@ getQuote(){
this
.
webService
.
post_data
(
'getNearByMechanics'
,
searchData
).
subscribe
(
response
=>
{
this
.
webService
.
post_data
(
'getNearByMechanics'
,
searchData
).
subscribe
(
response
=>
{
if
(
response
.
status
==
'1'
){
if
(
response
.
status
==
'1'
){
this
.
mechanicData
=
response
.
mechanic_data
;
this
.
mechanicData
=
response
.
mechanic_data
;
console
.
log
(
this
.
mechanicData
)
this
.
dateSection
.
push
(
new
Date
(
this
.
today
.
setDate
(
this
.
today
.
getDate
())));
this
.
dateSection
.
push
(
new
Date
(
this
.
today
.
setDate
(
this
.
today
.
getDate
())));
this
.
dateSection
.
push
(
new
Date
(
this
.
today
.
setDate
(
this
.
today
.
getDate
()
+
1
)));
this
.
dateSection
.
push
(
new
Date
(
this
.
today
.
setDate
(
this
.
today
.
getDate
()
+
1
)));
...
@@ -884,6 +965,10 @@ cancelBooking(booking: any){
...
@@ -884,6 +965,10 @@ cancelBooking(booking: any){
});
});
}
}
purchase
(
carId
){
this
.
goToPage
(
'productlist'
,{
'car_id'
:
carId
})
}
mechanicQuoteAccept
(
event
,
booking_id
,
mechanic_id
){
mechanicQuoteAccept
(
event
,
booking_id
,
mechanic_id
){
if
(
!
booking_id
||
!
mechanic_id
){
if
(
!
booking_id
||
!
mechanic_id
){
return
false
;
return
false
;
...
@@ -907,6 +992,13 @@ cnfdeleteCustomerCar(customer_id,vehicle_id){
...
@@ -907,6 +992,13 @@ cnfdeleteCustomerCar(customer_id,vehicle_id){
this
.
showConfirmPopUp
(
'deleteCustomerCar'
,{
'customer_id'
:
customer_id
,
'customer_veh_id'
:
vehicle_id
});
this
.
showConfirmPopUp
(
'deleteCustomerCar'
,{
'customer_id'
:
customer_id
,
'customer_veh_id'
:
vehicle_id
});
}
}
cnfdeleteVehReminder
(
customer_veh_id
,
status
){
if
(
!
customer_veh_id
){
return
false
;
}
this
.
showConfirmPopUp
(
'changeVehicleReminder'
,{
'customer_veh_id'
:
customer_veh_id
,
'status'
:
status
});
}
showConfirmPopUp
(
fn_name
:
string
,
param
:
any
){
showConfirmPopUp
(
fn_name
:
string
,
param
:
any
){
if
(
fn_name
===
''
){
if
(
fn_name
===
''
){
return
false
;
return
false
;
...
@@ -955,6 +1047,11 @@ checkboxChange(index,mechanic_id,event,estimate){
...
@@ -955,6 +1047,11 @@ checkboxChange(index,mechanic_id,event,estimate){
}
}
}
}
goToPage
(
path
,
data
=
null
){
this
.
router
.
navigate
([
path
],{
queryParams
:
data
});
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
}
scrollToTop
(
id
){
scrollToTop
(
id
){
$
(
'#'
+
id
).
stop
().
animate
({
scrollTop
:
0
},
800
);
$
(
'#'
+
id
).
stop
().
animate
({
scrollTop
:
0
},
800
);
}
}
...
...
src/app/home/index/index.component.html
View file @
be42bb4b
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
</div>
</div>
</div>
</div>
</section>
</section>
<section
#
targetwrk
><div
style=
"height:35px;opacity:0;"
></div></section>
<section
class=
"how_it_works"
>
<section
class=
"how_it_works"
>
<h3>
HOW IT WORKS
</h3>
<h3>
HOW IT WORKS
</h3>
<hr>
<hr>
...
@@ -63,7 +64,7 @@
...
@@ -63,7 +64,7 @@
<img
src=
"assets/images/asset_icon4.png"
>
<img
src=
"assets/images/asset_icon4.png"
>
<h4>
Diagnosis Trouble Codes
</h4>
<h4>
Diagnosis Trouble Codes
</h4>
<p>
Find out what your code really means and what you can expect to pay.
</p>
<p>
Find out what your code really means and what you can expect to pay.
</p>
<button
class=
"learn_more"
>
<button
class=
"learn_more"
(
click
)="
diagnseCde
()"
>
GO
GO
</button>
</button>
</div>
</div>
...
@@ -72,7 +73,7 @@
...
@@ -72,7 +73,7 @@
<img
src=
"assets/images/asset_icon5.png"
>
<img
src=
"assets/images/asset_icon5.png"
>
<h4>
Parts and Replacement
</h4>
<h4>
Parts and Replacement
</h4>
<p>
Review causes, symptoms, and estimate repair costs.
</p>
<p>
Review causes, symptoms, and estimate repair costs.
</p>
<button
class=
"learn_more"
>
<button
class=
"learn_more"
(
click
)="
goToPage
('
purchaseHome
')"
>
GO
GO
</button>
</button>
</div>
</div>
...
@@ -81,7 +82,7 @@
...
@@ -81,7 +82,7 @@
<img
src=
"assets/images/asset_icon6.png"
>
<img
src=
"assets/images/asset_icon6.png"
>
<h4>
Maintenance Schedules
</h4>
<h4>
Maintenance Schedules
</h4>
<p>
Need to schedule a maintenance check? You’re in the right place.
</p>
<p>
Need to schedule a maintenance check? You’re in the right place.
</p>
<button
class=
"learn_more"
>
<button
class=
"learn_more"
(
click
)="
maintnceSchule
()"
>
GO
GO
</button>
</button>
</div>
</div>
...
@@ -257,7 +258,7 @@
...
@@ -257,7 +258,7 @@
<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
formControlName=
"modelYear"
[
ngClass
]="{'
input_error
'
:
!
vehicleDataForm
.
controls
['
modelYear
'].
valid
&&
vehicleDataFormSubmit
}"
>
<select
formControlName=
"modelYear"
(
change
)="
get_vehiYear
($
event
.
target
.
value
)"
[
ngClass
]="{'
input_error
'
:
(!
vehicleDataForm
.
controls
['
modelYear
'].
valid
&&
vehicleDataForm
.
controls
['
maker
'].
valid
)
||
(!
vehicleDataForm
.
controls
['
modelYear
'].
valid
&&
vehicleDataFormSubmit
)
}"
>
<option
value=
""
class=
"hide"
>
YEAR
</option>
<option
value=
""
class=
"hide"
>
YEAR
</option>
<option
*
ngFor=
"let date of modelDates"
>
{{date}}
</option>
<option
*
ngFor=
"let date of modelDates"
>
{{date}}
</option>
</select>
</select>
...
@@ -271,13 +272,16 @@
...
@@ -271,13 +272,16 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<select
formControlName=
"modelName"
[
ngClass
]="{'
input_error
'
:
!
vehicleDataForm
.
controls
['
modelName
'].
valid
&&
vehicleDataFormSubmit
}"
>
<select
*
ngIf=
"carModel && carModel.length > 0"
(
change
)="
get_trims
($
event
.
target
.
value
)"
formControlName=
"modelName"
[
ngClass
]="{'
input_error
'
:
!
vehicleDataForm
.
controls
['
modelName
'].
valid
&&
vehicleDataFormSubmit
}"
>
<option
value=
""
class=
"hide"
>
MODEL
</option>
<option
value=
""
class=
"hide"
>
MODEL
</option>
<option
*
ngFor=
"let car_models of carModel"
>
{{car_models.model}}
</option>
<option
*
ngFor=
"let car_models of carModel"
value=
"{{car_models.veh_model_id}}"
>
{{car_models.model}}
</option>
</select>
</select>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<input
formControlName=
"milage"
placeholder=
"APPROX VEHICLE MILEAGE"
type=
""
>
<select
*
ngIf=
"carTrim && carTrim.length > 0"
formControlName=
"trim"
[
ngClass
]="{'
input_error
'
:
!
vehicleDataForm
.
controls
['
modelName
'].
valid
&&
vehicleDataFormSubmit
}"
>
<option
value=
""
class=
"hide"
>
TRIM
</option>
<option
*
ngFor=
"let car_trim of carTrim"
>
{{car_trim.trim}}
</option>
</select>
</div>
</div>
</div>
</div>
<h6
class=
"textLeft pb10"
>
OPTIONAL
</h6>
<h6
class=
"textLeft pb10"
>
OPTIONAL
</h6>
...
@@ -286,7 +290,7 @@
...
@@ -286,7 +290,7 @@
<input
formControlName=
"emgine"
placeholder=
"ENGINE"
type=
""
>
<input
formControlName=
"emgine"
placeholder=
"ENGINE"
type=
""
>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<input
formControlName=
"
trim"
placeholder=
"TRIM
"
type=
""
>
<input
formControlName=
"
milage"
placeholder=
"APPROX VEHICLE MILEAGE
"
type=
""
>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -601,14 +605,14 @@
...
@@ -601,14 +605,14 @@
<span
*
ngFor=
"let time of mechanic.scheduleTiming"
>
<span
*
ngFor=
"let time of mechanic.scheduleTiming"
>
<li
*
ngIf=
"(time > currentTime && ((dateSection[0] | date: 'dd') == currentDate))"
id=
"custom_check_button"
>
<li
*
ngIf=
"(time > currentTime && ((dateSection[0] | date: 'dd') == currentDate))"
id=
"custom_check_button"
>
<label>
<label>
<input
type=
"radio"
name=
"scheduleTime"
(
click
)="
getSchedule
(
tim
e
,'
0
');
<input
type=
"radio"
value=
"{{time | date:'hh:mm a'}}"
name=
"scheduleTime"
(
click
)="
getSchedule
($
event
.
target
.
valu
e
,'
0
');
scheduleDateInit =
true;
scheduleMechanic =
mechanic.mechanic_id"
>
scheduleDateInit =
true;
scheduleMechanic =
mechanic.mechanic_id"
>
<p>
{{time | date:'hh:mm a'}}
</p>
<p>
{{time | date:'hh:mm a'}}
</p>
</label>
</label>
</li>
</li>
<li
*
ngIf=
"((dateSection[0] | date: 'dd') != currentDate)"
id=
"custom_check_button"
>
<li
*
ngIf=
"((dateSection[0] | date: 'dd') != currentDate)"
id=
"custom_check_button"
>
<label>
<label>
<input
type=
"radio"
name=
"scheduleTime"
(
click
)="
getSchedule
(
tim
e
,'
0
');
<input
type=
"radio"
value=
"{{time | date:'hh:mm a'}}"
name=
"scheduleTime"
(
click
)="
getSchedule
($
event
.
target
.
valu
e
,'
0
');
scheduleDateInit =
true;
scheduleMechanic =
mechanic.mechanic_id"
>
scheduleDateInit =
true;
scheduleMechanic =
mechanic.mechanic_id"
>
<p>
{{time | date:'hh:mm a'}}
</p>
<p>
{{time | date:'hh:mm a'}}
</p>
</label>
</label>
...
@@ -618,7 +622,7 @@
...
@@ -618,7 +622,7 @@
<ul
id=
"scroll_1_{{i}}"
>
<ul
id=
"scroll_1_{{i}}"
>
<li
*
ngFor=
"let time of mechanic.scheduleTiming"
id=
"custom_check_button"
>
<li
*
ngFor=
"let time of mechanic.scheduleTiming"
id=
"custom_check_button"
>
<label>
<label>
<input
type=
"radio"
name=
"scheduleTime"
(
click
)="
getSchedule
(
tim
e
,'
1
');
<input
type=
"radio"
value=
"{{time | date:'hh:mm a'}}"
name=
"scheduleTime"
(
click
)="
getSchedule
($
event
.
target
.
valu
e
,'
1
');
scheduleDateInit =
true;
scheduleMechanic =
mechanic.mechanic_id"
>
scheduleDateInit =
true;
scheduleMechanic =
mechanic.mechanic_id"
>
<p>
{{time | date:'hh:mm a'}}
</p>
<p>
{{time | date:'hh:mm a'}}
</p>
</label>
</label>
...
...
src/app/home/index/index.component.ts
View file @
be42bb4b
...
@@ -36,6 +36,10 @@ export class IndexComponent implements OnInit {
...
@@ -36,6 +36,10 @@ export class IndexComponent implements OnInit {
autocomplete
:
any
;
autocomplete
:
any
;
cfautocomplete
:
any
;
cfautocomplete
:
any
;
vehiYear
:
any
;
vehiBrand
:
any
;
vehiModel
:
any
;
carTrim
:
any
;
searchLocError
:
boolean
;
searchLocError
:
boolean
;
addresssearchLocError
:
boolean
;
addresssearchLocError
:
boolean
;
@
ViewChild
(
"goTostep0"
)
public
goTostep0Ref
:
ElementRef
;
@
ViewChild
(
"goTostep0"
)
public
goTostep0Ref
:
ElementRef
;
...
@@ -47,6 +51,7 @@ export class IndexComponent implements OnInit {
...
@@ -47,6 +51,7 @@ export class IndexComponent implements OnInit {
@
ViewChild
(
"addressLocSearch"
)
public
addressElementRef
:
ElementRef
;
@
ViewChild
(
"addressLocSearch"
)
public
addressElementRef
:
ElementRef
;
@
ViewChild
(
"indexLoginModal"
)
loginModalRef
:
ElementRef
;
@
ViewChild
(
"indexLoginModal"
)
loginModalRef
:
ElementRef
;
@
ViewChild
(
"closeQuoteWizard"
)
closeQuoteWizardRef
:
ElementRef
;
@
ViewChild
(
"closeQuoteWizard"
)
closeQuoteWizardRef
:
ElementRef
;
@
ViewChild
(
'targetwrk'
)
public
targetEl
:
ElementRef
;
//Vehicle Details: TAB 2
//Vehicle Details: TAB 2
vehicleDataForm
;
vehicleDataForm
;
...
@@ -72,6 +77,7 @@ export class IndexComponent implements OnInit {
...
@@ -72,6 +77,7 @@ export class IndexComponent implements OnInit {
mechanics
:
string
=
''
;
mechanics
:
string
=
''
;
dateSection
:
any
[]
=
new
Array
();
dateSection
:
any
[]
=
new
Array
();
selMechanics
:
any
[]
=
new
Array
();
selMechanics
:
any
[]
=
new
Array
();
selectedElement
:
any
=
new
Array
();
imageServer
:
string
;
imageServer
:
string
;
mechanicData
:
any
;
mechanicData
:
any
;
autoSchedule
:
boolean
;
autoSchedule
:
boolean
;
...
@@ -93,24 +99,36 @@ export class IndexComponent implements OnInit {
...
@@ -93,24 +99,36 @@ export class IndexComponent implements OnInit {
public
ngZone
:
NgZone
,
public
ngZone
:
NgZone
,
public
webService
:
WebService
,
public
webService
:
WebService
,
public
mapsAPILoader
:
MapsAPILoader
,
public
mapsAPILoader
:
MapsAPILoader
,
private
route
:
ActivatedRoute
,
public
subjectService
:
SubjectService
)
{
public
subjectService
:
SubjectService
)
{
this
.
step
=
0
;
this
.
step
=
0
;
this
.
issuesData
=
false
;
this
.
currDate
=
new
Date
();
this
.
autoSchedule
=
false
;
this
.
nextDate
=
new
Date
();
this
.
imageServer
=
ImageStorage
;
this
.
issuesData
=
false
;
this
.
currDate
=
new
Date
();
this
.
imageServer
=
ImageStorage
;
this
.
nextDate
=
new
Date
();
this
.
loginDetails
=
false
;
this
.
loginDetails
=
false
;
this
.
autoSchedule
=
false
;
this
.
searchLocError
=
false
;
this
.
showLeftArrow
=
false
;
this
.
addresssearchLocError
=
false
;
this
.
searchLocError
=
false
;
this
.
showLeftArrow
=
false
;
this
.
showRightArrow
=
true
;
this
.
showRightArrow
=
true
;
this
.
scheduleDateInit
=
false
;
this
.
scheduleDateInit
=
false
;
this
.
scheduleMechanic
=
false
;
this
.
scheduleMechanic
=
false
;
this
.
optionalDescription
=
''
;
this
.
optionalDescription
=
''
;
this
.
vehicleDataFormSubmit
=
false
;
this
.
vehicleDataFormSubmit
=
false
;
this
.
addresssearchLocError
=
false
;
this
.
route
.
params
.
subscribe
(
val
=>
{
this
.
route
.
queryParams
.
subscribe
(
params
=>
{
if
(
params
[
'tab'
]
==
'1'
){
setTimeout
(
()
=>
{
this
.
targetEl
.
nativeElement
.
scrollIntoView
({
behavior
:
"smooth"
,
block
:
"start"
,
inline
:
"nearest"
});
this
.
router
.
navigate
([
'.'
],{
relativeTo
:
this
.
route
,
queryParams
:{}});
},
400
);
}
})
});
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
currentTime
=
this
.
today
.
getTime
();
this
.
currentTime
=
this
.
today
.
getTime
();
this
.
currentDate
=
this
.
today
.
getDate
();
this
.
currentDate
=
this
.
today
.
getDate
();
...
@@ -167,7 +185,23 @@ export class IndexComponent implements OnInit {
...
@@ -167,7 +185,23 @@ export class IndexComponent implements OnInit {
});
});
}
}
get_vehiYear
(
year
){
if
(
year
==
''
){
return
;
}
this
.
carTrim
=
this
.
carModel
=
[];
this
.
vehiYear
=
year
;
if
(
this
.
vehiBrand
){
this
.
get_model
(
this
.
vehiBrand
);
}
}
get_model
(
brand_id
)
{
get_model
(
brand_id
)
{
this
.
vehiBrand
=
brand_id
;
if
(
!
this
.
vehiYear
){
return
false
;
}
this
.
carTrim
=
this
.
carModel
=
[];
this
.
loader
=
true
;
this
.
loader
=
true
;
const
thisObj
=
this
;
const
thisObj
=
this
;
thisObj
.
carBrands
.
forEach
(
function
(
brandData
,
index
)
{
thisObj
.
carBrands
.
forEach
(
function
(
brandData
,
index
)
{
...
@@ -176,13 +210,23 @@ export class IndexComponent implements OnInit {
...
@@ -176,13 +210,23 @@ export class IndexComponent implements OnInit {
}
}
});
});
this
.
webService
.
post_data
(
'getVehicleModel'
,{
'vehBrand_id'
:
brand_id
}).
subscribe
(
response
=>
{
this
.
webService
.
post_data
(
'getVehicleModel'
,{
'vehBrand_id'
:
brand_id
,
'vehiYear'
:
this
.
vehiYear
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
if
(
response
.
status
==
'success'
){
this
.
carModel
=
response
.
data
;
this
.
carModel
=
response
.
data
;
}
}
this
.
loader
=
false
;
this
.
loader
=
false
;
});
});
}
}
get_trims
(
model
){
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'getVehicleTrim'
,{
'vehBrand_id'
:
this
.
vehiBrand
,
'vehiYear'
:
this
.
vehiYear
,
'vehiModel'
:
model
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
this
.
carTrim
=
response
.
data
;
}
this
.
loader
=
false
;
});
}
getVehicleLoc
(
lastLoc
){
getVehicleLoc
(
lastLoc
){
if
(
lastLoc
==
''
){
if
(
lastLoc
==
''
){
...
@@ -229,6 +273,19 @@ export class IndexComponent implements OnInit {
...
@@ -229,6 +273,19 @@ export class IndexComponent implements OnInit {
this
.
vehicleDataFormSubmit
=
false
;
this
.
vehicleDataFormSubmit
=
false
;
}
}
maintnceSchule
(){
this
.
goToPage
(
'dashboard'
,{
"redrct_tab"
:
"reminder"
});
}
diagnseCde
(){
this
.
goToPage
(
'dashboard'
,{
"redrct_tab"
:
"vehicle"
});
}
goToPage
(
path
,
data
=
null
){
this
.
router
.
navigate
([
path
],{
queryParams
:
data
});
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
}
getIssueData
(){
getIssueData
(){
const
This
=
this
;
const
This
=
this
;
this
.
loader
=
true
;
this
.
loader
=
true
;
...
...
src/app/navbar/navbar.component.html
View file @
be42bb4b
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</li>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
(
click
)="
goToPage
('
purchaseHome
')"
>
<a
class=
"nav-link"
(
click
)="
goToPage
('
purchaseHome
')"
>
PURCHASE
PURCHASE
PARTS AND ACCESSORIES
</a>
</a>
</li>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
...
@@ -40,26 +40,33 @@
...
@@ -40,26 +40,33 @@
CAR OWNERS
CAR OWNERS
</div>
</div>
<div
class=
"dropdown-menu"
>
<div
class=
"dropdown-menu"
>
<a
class=
"dropdown-item"
*
ngIf=
"loginDetails"
(
click
)="
goToPage
('
dashboard
')"
>
My Dashboard
</a>
<div
class=
"inner_drop"
>
<a
class=
"dropdown-item"
(
click
)="
goToPage
('
purchaseHome
')"
>
Find parts and accessories
</a>
<div
class=
"arrow-up"
></div>
<a
class=
"dropdown-item"
>
Rewards
</a>
<a
class=
"dropdown-item"
>
Rewards
</a>
<a
class=
"dropdown-item"
>
Messages
</a>
<a
class=
"dropdown-item"
>
Messages
</a>
<a
class=
"dropdown-item"
>
Request a Service
</a>
<a
class=
"dropdown-item"
(
click
)="
requestSrvce
()"
>
Request a Service
</a>
<a
class=
"dropdown-item"
>
Repair/Maintenance Service reminder
</a>
<a
class=
"dropdown-item"
(
click
)="
goToPage
('
getapp
')"
>
Emergency / Road Assistance Services
</a>
<a
class=
"dropdown-item"
>
Road Service
</a>
<a
class=
"dropdown-item"
(
click
)="
howitwrks
()"
>
How it works
</a>
</div>
</div>
</div>
</a>
</a>
</li>
</li>
<li
class=
"nav-item"
data-toggle=
"modal"
data-target=
"#serviceprovider"
>
<!-- <li class="nav-item" data-toggle="modal" data-target="#serviceprovider"> -->
<a
class=
"nav-link base_arrow"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link base_arrow dropdown"
data-toggle=
"dropdown"
>
<div
class=
"dropdown-toggle"
>
AUTO SERVICE PROVIDER
AUTO SERVICE PROVIDER
</div>
<div
class=
"dropdown-menu"
>
<div
class=
"inner_drop"
>
<div
class=
"arrow-up"
></div>
<a
class=
"dropdown-item"
(
click
)="
providerSignIn
()"
>
Sign In
</a>
<a
class=
"dropdown-item"
(
click
)="
providerSignUp
()"
>
Sign Up
</a>
<a
class=
"dropdown-item"
>
Benefit
</a>
</div>
</div>
</a>
</a>
</li>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
(
click
)="
goToPage
('
getapp
')"
>
GET THE APP
</a>
</li>
<li
class=
"nav-item"
*
ngIf=
"!loginDetails"
>
<li
class=
"nav-item"
*
ngIf=
"!loginDetails"
>
<button
(
click
)="
resetForm
()"
class=
"sign_btn"
data-toggle=
"modal"
data-target=
"#login"
>
<button
(
click
)="
resetForm
()"
class=
"sign_btn"
data-toggle=
"modal"
data-target=
"#login"
>
<img
src=
"assets/images/asset_signin.png"
>
SIGN IN
<img
src=
"assets/images/asset_signin.png"
>
SIGN IN
...
@@ -83,7 +90,10 @@
...
@@ -83,7 +90,10 @@
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
<div
class=
"dropdown-menu"
>
<div
class=
"dropdown-menu"
>
<div
class=
"inner_drop"
style=
"top:20px;"
>
<div
class=
"arrow-up"
></div>
<a
class=
"dropdown-item"
(
click
)="
logout
()"
>
Logout
</a>
<a
class=
"dropdown-item"
(
click
)="
logout
()"
>
Logout
</a>
</div>
</div>
</div>
</a>
</a>
</li>
</li>
...
@@ -355,7 +365,6 @@
...
@@ -355,7 +365,6 @@
<!-- SERVICE-PROVIDER-MODAL-STARTS-->
<!-- SERVICE-PROVIDER-MODAL-STARTS-->
<div
class=
"modal"
id=
"serviceprovider"
style=
"z-index: 99999 !important;"
>
<div
class=
"modal"
id=
"serviceprovider"
style=
"z-index: 99999 !important;"
>
<div
class=
"modal-dialog modal-full"
>
<div
class=
"modal-dialog modal-full"
>
<div
class=
"modal-content login_modal_wrapper"
malihu-scrollbar
[
scrollbarOptions
]="
scrollbarOptions
"
>
<div
class=
"modal-content login_modal_wrapper"
malihu-scrollbar
[
scrollbarOptions
]="
scrollbarOptions
"
>
...
@@ -431,9 +440,12 @@
...
@@ -431,9 +440,12 @@
<strong>
{{spSignupResponse.message}}
<br></strong>
<strong>
{{spSignupResponse.message}}
<br></strong>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-
12
"
>
<div
class=
"col-md-
6
"
>
<button
type=
"submit"
class=
"log_btn"
(
click
)="
spSignupSubmitClick =
true"
>
Submit
</button>
<button
class=
"log_btn"
(
click
)="
providerSignIn
()"
>
Sign In
</button>
</div>
</div>
<div
class=
"col-md-6"
>
<button
type=
"submit"
class=
"log_btn"
(
click
)="
spSignupSubmitClick =
true"
>
Sign Up
</button>
</div>
</div>
</div>
</div>
</div>
</form>
</form>
...
...
src/app/navbar/navbar.component.scss
View file @
be42bb4b
...
@@ -14,21 +14,22 @@
...
@@ -14,21 +14,22 @@
max-width
:
calc
(
100%
-
10%
);
max-width
:
calc
(
100%
-
10%
);
.navbar-brand
{
.navbar-brand
{
img
{
img
{
width
:
1
8
0px
;
width
:
1
4
0px
;
}
}
}
}
.navbar-nav
{
.navbar-nav
{
li
{
li
{
margin-right
:
3
0px
;
margin-right
:
2
0px
;
a
{
a
{
color
:
#fff
;
color
:
#fff
;
position
:
relative
;
position
:
relative
;
top
:
5px
;
top
:
10px
;
font-size
:
13px
;
.dropdown-menu
{
.dropdown-menu
{
a
{
a
{
top
:
0px
;
top
:
0px
;
padding-top
:
5
px
;
padding-top
:
8
px
;
padding-bottom
:
5
px
;
padding-bottom
:
8
px
;
}
}
}
}
}
}
...
@@ -74,12 +75,31 @@
...
@@ -74,12 +75,31 @@
border
:
none
;
border
:
none
;
margin
:
0px
;
margin
:
0px
;
padding
:
0px
;
padding
:
0px
;
border-radius
:
0px
;
background
:
transparent
;
.inner_drop
{
border-radius
:
0px
;
-webkit-border-radius
:
0px
;
-webkit-border-radius
:
0px
;
-moz-border-radius
:
0px
;
-moz-border-radius
:
0px
;
-ms-border-radius
:
0px
;
-ms-border-radius
:
0px
;
-o-border-radius
:
0px
;
-o-border-radius
:
0px
;
background
:
#2655bf
;
background
:
#2655bf
;
-webkit-box-shadow
:
0px
0px
5px
0px
rgba
(
0
,
0
,
0
,
0
.5
);
-moz-box-shadow
:
0px
0px
5px
0px
rgba
(
0
,
0
,
0
,
0
.5
);
box-shadow
:
0px
0px
5px
0px
rgba
(
0
,
0
,
0
,
0
.5
);
position
:
relative
;
top
:
40px
;
.arrow-up
{
width
:
0
;
height
:
0
;
border-left
:
15px
solid
transparent
;
border-right
:
15px
solid
transparent
;
border-bottom
:
15px
solid
#2655bf
;
position
:
absolute
;
left
:
20px
;
top
:
-15px
;
}
}
cursor
:
pointer
;
cursor
:
pointer
;
a
{
a
{
&
:hover
{
&
:hover
{
...
@@ -224,6 +244,7 @@
...
@@ -224,6 +244,7 @@
-ms-border-radius
:
10px
;
-ms-border-radius
:
10px
;
-o-border-radius
:
10px
;
-o-border-radius
:
10px
;
text-align
:
center
;
text-align
:
center
;
padding-left
:
20px
;
option
{
option
{
text-align
:
center
;
text-align
:
center
;
}
}
...
...
src/app/navbar/navbar.component.ts
View file @
be42bb4b
...
@@ -64,9 +64,9 @@ export class NavbarComponent implements OnInit {
...
@@ -64,9 +64,9 @@ export class NavbarComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
subjectService
.
getLoginData
().
subscribe
(
loginData
=>
{
this
.
subjectService
.
getLoginData
().
subscribe
(
loginData
=>
{
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
this
.
loginDetails
=
JSON
.
parse
(
this
.
webService
.
getLocalStorageItem
(
'userData'
));
if
(
!
this
.
loginDetails
){
//
if(!this.loginDetails){
this
.
facebookSignUp
();
//
this.facebookSignUp();
}
//
}
});
});
this
.
getMechanicShops
();
this
.
getMechanicShops
();
...
@@ -103,6 +103,9 @@ export class NavbarComponent implements OnInit {
...
@@ -103,6 +103,9 @@ export class NavbarComponent implements OnInit {
signInWithFB
():
void
{
signInWithFB
():
void
{
this
.
authService
.
signIn
(
FacebookLoginProvider
.
PROVIDER_ID
);
this
.
authService
.
signIn
(
FacebookLoginProvider
.
PROVIDER_ID
);
if
(
!
this
.
loginDetails
){
this
.
facebookSignUp
();
}
}
}
signOut
():
void
{
signOut
():
void
{
...
@@ -112,28 +115,30 @@ export class NavbarComponent implements OnInit {
...
@@ -112,28 +115,30 @@ export class NavbarComponent implements OnInit {
facebookSignUp
(){
facebookSignUp
(){
const
This
=
this
;
const
This
=
this
;
this
.
authService
.
authState
.
subscribe
((
user
)
=>
{
this
.
authService
.
authState
.
subscribe
((
user
)
=>
{
this
.
user
=
user
;
if
(
user
&&
user
!=
null
&&
user
!=
undefined
){
let
data
:
any
=
new
Array
();
this
.
user
=
user
;
data
=
{
'first_name'
:
this
.
user
.
firstName
,
'last_name'
:
this
.
user
.
lastName
,
'email'
:
this
.
user
.
email
,
'image_url'
:
this
.
user
.
photoUrl
};
let
data
:
any
=
new
Array
();
if
(
this
.
user
){
data
=
{
'first_name'
:
this
.
user
.
firstName
,
'last_name'
:
this
.
user
.
lastName
,
'email'
:
this
.
user
.
email
,
'image_url'
:
this
.
user
.
photoUrl
};
this
.
webService
.
post_data
(
'socialLogin'
,
{
'data'
:
data
}).
subscribe
(
response
=>
{
if
(
this
.
user
){
if
(
response
.
status
==
'1'
)
{
this
.
webService
.
post_data
(
'socialLogin'
,
{
'data'
:
data
}).
subscribe
(
response
=>
{
this
.
webService
.
setLocalStorageItem
(
'userData'
,
JSON
.
stringify
(
response
.
data
));
if
(
response
.
status
==
'1'
)
{
this
.
subjectService
.
sendLoginData
(
'logged_in'
);
this
.
webService
.
setLocalStorageItem
(
'userData'
,
JSON
.
stringify
(
response
.
data
));
this
.
loginModal
.
nativeElement
.
click
();
this
.
subjectService
.
sendLoginData
(
'logged_in'
);
this
.
signupModal
.
nativeElement
.
click
();
this
.
loginModal
.
nativeElement
.
click
();
}
else
{
this
.
signupModal
.
nativeElement
.
click
();
response
.
status
=
'error'
;
}
else
{
response
.
message
=
(
response
.
message
==
''
)?
this
.
errorMsg
.
errorList
.
req_failure
:
response
.
message
;
response
.
status
=
'error'
;
this
.
loginResponse
=
response
;
response
.
message
=
(
response
.
message
==
''
)?
this
.
errorMsg
.
errorList
.
req_failure
:
response
.
message
;
}
this
.
loginResponse
=
response
;
},
error
=>
{
}
this
.
loginResponse
=
{
'status'
:
'error'
,
'message'
:
this
.
errorMsg
.
errorList
.
req_failure
};
},
error
=>
{
},()
=>
{
this
.
loginResponse
=
{
'status'
:
'error'
,
'message'
:
this
.
errorMsg
.
errorList
.
req_failure
};
setTimeout
(
function
()
{
},()
=>
{
This
.
loginResponse
=
false
;
setTimeout
(
function
()
{
},
2000
)
This
.
loginResponse
=
false
;
});
},
2000
)
});
}
}
}
});
});
}
}
...
@@ -143,6 +148,14 @@ export class NavbarComponent implements OnInit {
...
@@ -143,6 +148,14 @@ export class NavbarComponent implements OnInit {
this
.
signupModal
.
nativeElement
.
click
();
this
.
signupModal
.
nativeElement
.
click
();
}
}
providerSignIn
(){
window
.
open
(
'https://carfixxers.com/admin/Login'
,
'_blank'
);
}
providerSignUp
(){
$
(
"#serviceprovider"
).
modal
(
'show'
);
}
getMechanicShops
(){
getMechanicShops
(){
this
.
loader
=
true
;
this
.
loader
=
true
;
this
.
webService
.
get_data
(
'getMechanicShops'
).
subscribe
(
response
=>
{
this
.
webService
.
get_data
(
'getMechanicShops'
).
subscribe
(
response
=>
{
...
@@ -303,17 +316,25 @@ export class NavbarComponent implements OnInit {
...
@@ -303,17 +316,25 @@ export class NavbarComponent implements OnInit {
else
sticky
.
removeClass
(
'scrolled_navbar'
);
else
sticky
.
removeClass
(
'scrolled_navbar'
);
});
});
}
}
goToPage
(
path
,
data
=
null
){
this
.
router
.
navigateByUrl
(
path
,{
queryParams
:
data
});
requestSrvce
(){
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
this
.
goToPage
(
'dashboard'
,{
"redrct_tab"
:
"vehicle"
});
}
howitwrks
(){
this
.
goToPage
(
'index'
,{
"tab"
:
"1"
});
}
}
goToPage
(
path
,
data
=
null
){
this
.
router
.
navigate
([
path
],{
queryParams
:
data
});
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
}
logout
()
{
logout
()
{
this
.
signOut
();
this
.
signOut
();
const
userData
=
this
.
webService
.
getLocalStorageItem
(
'userData'
);
const
userData
=
this
.
webService
.
getLocalStorageItem
(
'userData'
);
this
.
webService
.
removeLocalStorageItem
(
userData
);
this
.
webService
.
removeLocalStorageItem
(
userData
);
this
.
subjectService
.
sendLoginData
(
false
);
this
.
subjectService
.
sendLoginData
(
false
);
this
.
router
.
navigate
([
'../index'
]);
}
}
...
...
src/app/purchase/cart/cart.component.ts
View file @
be42bb4b
...
@@ -167,15 +167,15 @@ export class CartComponent implements OnInit {
...
@@ -167,15 +167,15 @@ export class CartComponent implements OnInit {
if
(
cartId
<=
0
||
product_id
<=
0
||
total_amount
<=
0
||
quantity
<=
0
||
amount
<=
0
){
if
(
cartId
<=
0
||
product_id
<=
0
||
total_amount
<=
0
||
quantity
<=
0
||
amount
<=
0
){
return
false
;
return
false
;
}
}
this
.
loader
=
true
;
//
this.loader = true;
this
.
webService
.
post_data
(
'removeCartPrdt'
,{
'cart_id'
:
cartId
}).
subscribe
(
response
=>
{
//
this.webService.post_data('removeCartPrdt',{'cart_id':cartId}).subscribe(response => {
if
(
response
.
status
==
'success'
){
//
if(response.status == 'success'){
this
.
product_data
=
{
amount
:
amount
,
product_id
:
product_id
,
quantity
:
quantity
,
total_amount
:
total_amount
};
this
.
product_data
=
{
amount
:
amount
,
product_id
:
product_id
,
quantity
:
quantity
,
total_amount
:
total_amount
,
cart_id
:
cartId
};
this
.
webService
.
setLocalStorageItem
(
'productDetails'
,
JSON
.
stringify
(
this
.
product_data
));
this
.
webService
.
setLocalStorageItem
(
'productDetails'
,
JSON
.
stringify
(
this
.
product_data
));
this
.
goToPage
(
'address'
,
''
);
this
.
goToPage
(
'address'
,
''
);
}
//
}
this
.
loader
=
false
;
//
this.loader = false;
});
//
});
}
}
goToPage
(
path
,
data
=
null
){
goToPage
(
path
,
data
=
null
){
...
...
src/app/purchase/orders/orders.component.html
View file @
be42bb4b
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<div
class=
"price_details"
>
<div
class=
"price_details"
>
<h5>
$ {{book.amount}}
</h5>
<h5>
$ {{book.amount}}
</h5>
<h5
*
ngIf=
"( book.status == '1')"
>
<button
class=
"btn btn-warning btn-sm"
>
Payment Processing
</button></h5>
<h5
*
ngIf=
"( book.status == '8') || ( book.status == '9')"
>
<button
class=
"btn btn-danger btn-sm"
>
{{book.status == '8' ? 'Order Deleted': 'Payment Failed'}}
</button></h5>
<h4
*
ngIf=
"( book.status == '2' || book.status == '3' || book.status == '4')"
>
{{book.expected_delivery == null || book.expected_delivery == '' ? 'Your Expected Delivery date will Update soon': 'Delivery expected by '+ (book.expected_delivery | date: "EEE, MMMM dd, yyyy") }}
<br>
<h4
*
ngIf=
"( book.status == '2' || book.status == '3' || book.status == '4')"
>
{{book.expected_delivery == null || book.expected_delivery == '' ? 'Your Expected Delivery date will Update soon': 'Delivery expected by '+ (book.expected_delivery | date: "EEE, MMMM dd, yyyy") }}
<br>
<div
*
ngIf=
"book.status == '2'"
>
Your Order is Placed
</div>
<div
*
ngIf=
"book.status == '2'"
>
Your Order is Placed
</div>
<div
*
ngIf=
"book.status == '3'"
>
Your item is Packed
</div>
<div
*
ngIf=
"book.status == '3'"
>
Your item is Packed
</div>
...
@@ -55,7 +57,7 @@
...
@@ -55,7 +57,7 @@
</div>
</div>
</div>
</div>
<div
class=
"bottom_product_list"
>
<div
class=
"bottom_product_list"
>
<
!-- <h4>Audi Q7 <span>( Similar Results )</span></h4> --
>
<
h4>
Trending Products
</h4
>
<div
class=
"loader_overlay"
*
ngIf=
"trend_loader"
></div>
<div
class=
"loader_overlay"
*
ngIf=
"trend_loader"
></div>
<ngx-carousel
[
inputs
]="
carouselTile
"
(
carouselLoad
)="
carouselTileLoad
()"
*
ngIf=
"trendingProductData"
>
<ngx-carousel
[
inputs
]="
carouselTile
"
(
carouselLoad
)="
carouselTileLoad
()"
*
ngIf=
"trendingProductData"
>
<ngx-tile
NgxCarouselItem
*
ngFor=
"let prdt of trendingProductData"
>
<ngx-tile
NgxCarouselItem
*
ngFor=
"let prdt of trendingProductData"
>
...
...
src/app/purchase/productdetails/productdetails.component.html
View file @
be42bb4b
...
@@ -110,6 +110,7 @@
...
@@ -110,6 +110,7 @@
</div>
</div>
</div>
</div>
<div
class=
"bottom_product_list"
>
<div
class=
"bottom_product_list"
>
<h4>
Trending Products
</h4>
<div
class=
"loader_overlay"
*
ngIf=
"loader2"
></div>
<div
class=
"loader_overlay"
*
ngIf=
"loader2"
></div>
<ngx-carousel
[
inputs
]="
carouselTile
"
(
carouselLoad
)="
carouselTileLoad
()"
*
ngIf=
"trendingProductData"
>
<ngx-carousel
[
inputs
]="
carouselTile
"
(
carouselLoad
)="
carouselTileLoad
()"
*
ngIf=
"trendingProductData"
>
<ngx-tile
NgxCarouselItem
*
ngFor=
"let prdt of trendingProductData"
>
<ngx-tile
NgxCarouselItem
*
ngFor=
"let prdt of trendingProductData"
>
...
...
src/app/purchase/productdetails/productdetails.component.scss
View file @
be42bb4b
...
@@ -254,6 +254,16 @@
...
@@ -254,6 +254,16 @@
.bottom_product_list
{
.bottom_product_list
{
background
:
#fff
;
background
:
#fff
;
position
:
relative
;
position
:
relative
;
h4
{
color
:
#262626
;
margin
:
0px
;
padding
:
15px
;
font-size
:
16px
;
padding-bottom
:
0px
;
span
{
color
:
#92a1b1
;
}
}
.leftRs
{
.leftRs
{
position
:
absolute
;
position
:
absolute
;
left
:
10px
;
left
:
10px
;
...
...
src/app/purchase/productlist/productlist.component.html
View file @
be42bb4b
...
@@ -28,27 +28,33 @@
...
@@ -28,27 +28,33 @@
<h6
href=
"#ac3"
data-toggle=
"collapse"
>
Vehicle Information
</h6>
<h6
href=
"#ac3"
data-toggle=
"collapse"
>
Vehicle Information
</h6>
<ul
id=
"ac3"
class=
"collapse in show"
>
<ul
id=
"ac3"
class=
"collapse in show"
>
<h6
class=
"backgroundNone borderNone"
>
<h6
class=
"backgroundNone borderNone"
>
<select
(
change
)="
get_year
($
event
.
target
.
value
)"
>
<select
(
change
)="
get_year
($
event
.
target
.
value
)"
[
ngClass
]="{'
input_error
'
:
errorYear
}"
>
<option
[
attr
.
value
]="
0
"
[
attr
.
selected
]=
true
[
attr
.
disabled
]="
true
"
>
Select Year
</option>
<option
[
value
]="
0
"
[
disabled
]="
true
"
>
Select Year
</option>
<option
*
ngFor=
"let date of modelDates"
>
{{date}}
</option>
<option
*
ngFor=
"let date of modelDates"
[
selected
]="
date =
=
carFilter
['
year
']"
>
{{date}}
</option>
</select>
</select>
</h6>
</h6>
<h6
class=
"backgroundNone borderNone"
>
<h6
class=
"backgroundNone borderNone"
>
<select
(
change
)="
get_model
($
event
.
target
.
value
)"
>
<select
(
change
)="
get_model
($
event
.
target
.
value
)"
>
<option
[
attr
.
value
]="
0
"
[
attr
.
selected
]=
true
[
attr
.
disabled
]="
true
"
>
Select Maker
</option>
<option
[
value
]="
0
"
[
selected
]="
true
"
[
disabled
]="
true
"
>
Select Maker
</option>
<option
*
ngFor=
"let brands of carBrands"
value=
"{{brands.veh_brand_id}}"
>
<option
*
ngFor=
"let brands of carBrands"
[
selected
]="
brands
.
veh_brand_id =
=
carFilter
['
make
']"
value=
"{{brands.veh_brand_id}}"
>
{{brands.maker}}
{{brands.maker}}
</option>
</option>
</select>
</select>
</h6>
</h6>
<h6
class=
"backgroundNone borderNone"
>
<h6
class=
"backgroundNone borderNone"
>
<select
(
change
)="
getModelResult
($
event
.
target
.
value
)"
*
ngIf=
"modelShow"
>
<select
(
change
)="
getModelResult
($
event
.
target
.
value
)"
*
ngIf=
"modelShow
&& carModel && carModel.length > 0
"
>
<option
[
attr
.
value
]="
0
"
[
attr
.
selected
]=
true
[
attr
.
disabled
]="
true
"
>
Select Model
</option>
<option
[
value
]="
0
"
[
selected
]="!
carFilter
['
model
']?
true:false
"
[
disabled
]="
true
"
>
Select Model
</option>
<option
*
ngFor=
"let models of carModel"
value=
"{{models.veh_moda
l_id}}"
>
<option
*
ngFor=
"let models of carModel"
[
selected
]="
models
.
veh_model_id =
=
carFilter
['
model
']"
value=
"{{models.veh_mode
l_id}}"
>
{{models.model}}
{{models.model}}
</option>
</option>
</select>
</select>
</h6>
</h6>
<h6
class=
"backgroundNone borderNone"
>
<select
(
change
)="
getTrimData
($
event
.
target
.
value
)"
*
ngIf=
"carTrim && carTrim.length > 0"
>
<option
value=
""
class=
"hide"
>
TRIM
</option>
<option
*
ngFor=
"let car_trim of carTrim"
[
selected
]="
car_trim
.
trim =
=
carFilter
['
trim
']"
value=
"{{car_trim.trim}}"
>
{{car_trim.trim}}
</option>
</select>
</h6>
</ul>
</ul>
</div>
</div>
<div
class=
"purchase_content_section"
>
<div
class=
"purchase_content_section"
>
...
...
src/app/purchase/productlist/productlist.component.ts
View file @
be42bb4b
...
@@ -11,6 +11,7 @@ import { ImageStorage } from '../../../environments/server.config';
...
@@ -11,6 +11,7 @@ import { ImageStorage } from '../../../environments/server.config';
})
})
export
class
ProductlistComponent
implements
OnInit
{
export
class
ProductlistComponent
implements
OnInit
{
loader
:
boolean
;
loader
:
boolean
;
errorYear
:
boolean
;
searchKey
:
string
;
searchKey
:
string
;
imageServer
:
any
;
imageServer
:
any
;
productArray
:
any
[]
=
new
Array
();
productArray
:
any
[]
=
new
Array
();
...
@@ -25,14 +26,20 @@ export class ProductlistComponent implements OnInit {
...
@@ -25,14 +26,20 @@ export class ProductlistComponent implements OnInit {
modelDates
:
number
[]
=
new
Array
();
modelDates
:
number
[]
=
new
Array
();
carBrands
:
any
;
carBrands
:
any
;
carModel
:
any
;
carModel
:
any
;
vehiBrand
:
any
;
vehiModel
:
any
;
vehiYear
:
any
;
modelName
:
any
;
modelShow
:
boolean
;
modelShow
:
boolean
;
carFilter
:
any
=
new
Array
();
carTrim
:
any
;
constructor
(
constructor
(
private
router
:
Router
,
private
router
:
Router
,
private
route
:
ActivatedRoute
,
private
route
:
ActivatedRoute
,
public
webService
:
WebService
public
webService
:
WebService
){
){
this
.
loader
=
true
;
this
.
loader
=
true
;
this
.
errorYear
=
false
;
this
.
modelShow
=
false
;
this
.
modelShow
=
false
;
this
.
productArray
=
[];
this
.
productArray
=
[];
this
.
filterParam
=
{
"key"
:
''
,
"brand_id"
:
Array
(),
"minPrice"
:
''
,
"maxPrice"
:
''
,
'page'
:
1
};
this
.
filterParam
=
{
"key"
:
''
,
"brand_id"
:
Array
(),
"minPrice"
:
''
,
"maxPrice"
:
''
,
'page'
:
1
};
...
@@ -43,7 +50,14 @@ export class ProductlistComponent implements OnInit {
...
@@ -43,7 +50,14 @@ export class ProductlistComponent implements OnInit {
this
.
searchKey
=
params
[
'key'
];
this
.
searchKey
=
params
[
'key'
];
this
.
filterParam
.
key
=
this
.
searchKey
;
this
.
filterParam
.
key
=
this
.
searchKey
;
this
.
filterParam
.
page
=
this
.
page
;
this
.
filterParam
.
page
=
this
.
page
;
this
.
getProductDetails
(
this
.
filterParam
);
if
(
this
.
searchKey
){
this
.
getProductDetails
(
this
.
filterParam
);
}
if
(
params
[
'car_id'
]){
this
.
carFilter
[
'car_id'
]
=
params
[
'car_id'
];
this
.
purchaseFilter
();
}
});
});
});
});
if
(
this
.
searchKey
==
''
){
if
(
this
.
searchKey
==
''
){
...
@@ -78,9 +92,16 @@ export class ProductlistComponent implements OnInit {
...
@@ -78,9 +92,16 @@ export class ProductlistComponent implements OnInit {
}
}
get_model
(
brand_id
)
{
get_model
(
brand_id
)
{
this
.
vehiBrand
=
brand_id
;
if
(
!
this
.
vehiYear
){
this
.
errorYear
=
true
;
return
false
;
}
this
.
carTrim
=
this
.
carModel
=
[];
this
.
page
=
1
;
this
.
page
=
1
;
this
.
loader
=
true
;
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'getVehicleModel'
,{
'vehBrand_id'
:
brand_id
}).
subscribe
(
response
=>
{
this
.
vehiBrand
=
brand_id
;
this
.
webService
.
post_data
(
'getVehicleModel'
,{
'vehBrand_id'
:
this
.
vehiBrand
,
'type'
:
0
,
'vehiYear'
:
this
.
filterParam
.
year
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
if
(
response
.
status
==
'success'
){
this
.
modelShow
=
true
;
this
.
modelShow
=
true
;
this
.
carModel
=
response
.
data
;
this
.
carModel
=
response
.
data
;
...
@@ -93,9 +114,23 @@ export class ProductlistComponent implements OnInit {
...
@@ -93,9 +114,23 @@ export class ProductlistComponent implements OnInit {
}
}
getModelResult
(
modelId
){
getModelResult
(
modelId
){
this
.
vehiModel
=
this
.
filterParam
.
model
=
modelId
;
this
.
loader
=
true
;
this
.
page
=
1
;
this
.
page
=
1
;
this
.
filterParam
.
page
=
this
.
page
;
this
.
filterParam
.
page
=
this
.
page
;
this
.
filterParam
.
model
=
modelId
;
this
.
webService
.
post_data
(
'getVehicleTrim'
,{
'vehBrand_id'
:
this
.
vehiBrand
,
'vehiYear'
:
this
.
vehiYear
,
'vehiModel'
:
this
.
vehiModel
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
this
.
carTrim
=
response
.
data
;
}
this
.
loader
=
false
;
})
this
.
getProductDetails
(
this
.
filterParam
);
}
getTrimData
(
trim
){
this
.
page
=
1
;
this
.
filterParam
.
page
=
this
.
page
;
this
.
filterParam
.
trim
=
trim
;
this
.
getProductDetails
(
this
.
filterParam
);
this
.
getProductDetails
(
this
.
filterParam
);
}
}
...
@@ -173,9 +208,42 @@ export class ProductlistComponent implements OnInit {
...
@@ -173,9 +208,42 @@ export class ProductlistComponent implements OnInit {
}
}
get_year
(
year
){
get_year
(
year
){
this
.
carModel
=
this
.
carTrim
=
[];
this
.
page
=
1
;
this
.
page
=
1
;
this
.
filterParam
.
page
=
this
.
page
;
this
.
filterParam
.
page
=
this
.
page
;
this
.
filterParam
.
year
=
year
;
this
.
filterParam
.
year
=
year
;
this
.
vehiYear
=
year
;
this
.
errorYear
=
false
;
this
.
getProductDetails
(
this
.
filterParam
);
this
.
getProductDetails
(
this
.
filterParam
);
if
(
this
.
vehiBrand
){
this
.
get_model
(
this
.
vehiBrand
);
}
if
(
this
.
vehiModel
){
this
.
getModelResult
(
this
.
vehiModel
);
}
}
purchaseFilter
(){
if
(
this
.
carFilter
[
'car_id'
]){
this
.
getCustVehDetails
(
this
.
carFilter
[
'car_id'
]);
this
.
filterParam
.
car_id
=
this
.
carFilter
[
'car_id'
];
this
.
getProductDetails
(
this
.
filterParam
);
}
}
}
getCustVehDetails
(
carId
){
this
.
loader
=
true
;
this
.
webService
.
post_data
(
'getCustVehDetails'
,{
'car_id'
:
carId
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
this
.
filterParam
.
maker
=
this
.
carFilter
[
'make'
]
=
response
.
data
.
veh_brand_id
;
this
.
vehiModel
=
this
.
filterParam
.
model
=
this
.
carFilter
[
'model'
]
=
response
.
data
.
veh_modal_id
;
this
.
filterParam
.
trim
=
this
.
carFilter
[
'trim'
]
=
response
.
data
.
trim
;
this
.
vehiYear
=
this
.
filterParam
.
year
=
this
.
carFilter
[
'year'
]
=
response
.
data
.
year
;
}
this
.
loader
=
false
;
this
.
get_model
(
response
.
data
.
veh_brand_id
);
this
.
getModelResult
(
this
.
vehiModel
);
})
}
}
}
src/app/purchase/purchase-home/purchase-home.component.scss
View file @
be42bb4b
...
@@ -245,7 +245,7 @@
...
@@ -245,7 +245,7 @@
li
{
li
{
list-style
:
none
;
list-style
:
none
;
padding
:
10px
;
padding
:
10px
;
width
:
calc
(
100%
-
75%
)
!
important
;
width
:
calc
(
100%
-
75%
);
display
:
inline-block
;
display
:
inline-block
;
.inner_div_product
{
.inner_div_product
{
border
:
1px
solid
#eeeeee
;
border
:
1px
solid
#eeeeee
;
...
...
src/app/purchase/purchase.module.ts
View file @
be42bb4b
import
{
NgModule
}
from
'@angular/core'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
HttpModule
}
from
'@angular/http'
;
import
{
ReactiveFormsModule
,
FormsModule
}
from
'@angular/forms'
;
import
{
ReactiveFormsModule
,
FormsModule
}
from
'@angular/forms'
;
import
{
ProductlistComponent
}
from
'./productlist/productlist.component'
;
import
{
ProductlistComponent
}
from
'./productlist/productlist.component'
;
import
{
ProductdetailsComponent
}
from
'./productdetails/productdetails.component'
;
import
{
ProductdetailsComponent
}
from
'./productdetails/productdetails.component'
;
...
@@ -33,6 +34,7 @@ import { PurchaseHomeComponent } from './purchase-home/purchase-home.component';
...
@@ -33,6 +34,7 @@ import { PurchaseHomeComponent } from './purchase-home/purchase-home.component';
ReactiveFormsModule
,
ReactiveFormsModule
,
InfiniteScrollModule
,
InfiniteScrollModule
,
TooltipModule
,
TooltipModule
,
HttpModule
,
MalihuScrollbarModule
.
forRoot
()
MalihuScrollbarModule
.
forRoot
()
]
]
})
})
...
...
src/app/purchase/summary/summary.component.ts
View file @
be42bb4b
...
@@ -86,9 +86,10 @@ export class SummaryComponent implements OnInit {
...
@@ -86,9 +86,10 @@ export class SummaryComponent implements OnInit {
paymentButton
(){
paymentButton
(){
this
.
loader
=
true
;
this
.
loader
=
true
;
this
.
prdtData
.
customer_id
=
this
.
loginDetails
.
customer_id
;
this
.
prdtData
.
customer_id
=
this
.
loginDetails
.
customer_id
;
let
cart_id
=
(
this
.
prdtData
.
cart_id
)?
'/'
+
this
.
prdtData
.
cart_id
:
''
;
this
.
webService
.
post_data
(
'initOrderBooking'
,{
'data'
:
this
.
prdtData
}).
subscribe
(
response
=>
{
this
.
webService
.
post_data
(
'initOrderBooking'
,{
'data'
:
this
.
prdtData
}).
subscribe
(
response
=>
{
if
(
response
.
status
==
'success'
){
if
(
response
.
status
==
'success'
){
document
.
location
.
href
=
this
.
serverUrl
+
'orderPayNow/'
+
response
.
data
;
document
.
location
.
href
=
this
.
serverUrl
+
'orderPayNow/'
+
response
.
data
+
cart_id
;
}
else
{
}
else
{
this
.
loader
=
false
;
this
.
loader
=
false
;
this
.
failureModelRef
.
nativeElement
.
click
();
this
.
failureModelRef
.
nativeElement
.
click
();
...
...
src/app/purchase/track/track.component.html
View file @
be42bb4b
...
@@ -72,7 +72,9 @@
...
@@ -72,7 +72,9 @@
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<h4>
<h4>
<div
class=
"need_invoice"
>
Need invoice
</div>
<!-- <div class="need_invoice"> -->
<a
class=
"need_invoice"
target=
"_blank"
href=
"{{serverUrl+'downloadOrdrDtls/'+orderDetails.format_order_id}}"
>
Need invoice
</a>
<!-- </div> -->
</h4>
</h4>
</div>
</div>
...
...
src/app/purchase/track/track.component.ts
View file @
be42bb4b
import
{
Component
,
OnInit
,
ViewChild
,
ElementRef
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
,
ElementRef
}
from
'@angular/core'
;
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
Http
,
ResponseContentType
}
from
'@angular/http'
;
import
{
WebService
}
from
'../../provider/web.service'
;
import
{
WebService
}
from
'../../provider/web.service'
;
import
{
NgxGalleryOptions
,
NgxGalleryImage
,
NgxGalleryAnimation
}
from
'ngx-gallery'
;
import
{
NgxGalleryOptions
,
NgxGalleryImage
,
NgxGalleryAnimation
}
from
'ngx-gallery'
;
import
{
FormGroup
,
FormControl
,
Validators
,
ValidationErrors
}
from
'@angular/forms'
;
import
{
FormGroup
,
FormControl
,
Validators
,
ValidationErrors
}
from
'@angular/forms'
;
...
@@ -7,7 +8,7 @@ import { ValidationService } from '../../provider/validation.service';
...
@@ -7,7 +8,7 @@ import { ValidationService } from '../../provider/validation.service';
import
{
NgxCarousel
}
from
'ngx-carousel'
;
import
{
NgxCarousel
}
from
'ngx-carousel'
;
import
{
ImageStorage
}
from
'../../../environments/server.config'
;
import
{
ImageStorage
}
from
'../../../environments/server.config'
;
import
{
Options
}
from
'ng5-slider'
;
import
{
Options
}
from
'ng5-slider'
;
import
*
as
$
from
'jquery
'
;
import
{
apiConfig
}
from
'../../../environments/server.config
'
;
interface
RangeSliderModel
{
interface
RangeSliderModel
{
minValue
:
number
;
minValue
:
number
;
...
@@ -25,6 +26,7 @@ export class TrackComponent implements OnInit {
...
@@ -25,6 +26,7 @@ export class TrackComponent implements OnInit {
count
:
any
;
count
:
any
;
loginDetails
:
any
;
loginDetails
:
any
;
loader
:
boolean
;
loader
:
boolean
;
serverUrl
:
string
;
loader_review
:
boolean
;
loader_review
:
boolean
;
imageServer
:
string
;
imageServer
:
string
;
orderDetails
:
any
;
orderDetails
:
any
;
...
@@ -41,9 +43,11 @@ export class TrackComponent implements OnInit {
...
@@ -41,9 +43,11 @@ export class TrackComponent implements OnInit {
constructor
(
private
router
:
Router
,
constructor
(
private
router
:
Router
,
private
route
:
ActivatedRoute
,
private
route
:
ActivatedRoute
,
public
errorMsg
:
ValidationService
,
public
errorMsg
:
ValidationService
,
public
webService
:
WebService
){
public
webService
:
WebService
,
private
http
:
Http
){
this
.
count
=
0
;
this
.
count
=
0
;
this
.
loader
=
true
;
this
.
loader
=
true
;
this
.
serverUrl
=
apiConfig
;
this
.
userReviewed
=
true
;
this
.
userReviewed
=
true
;
this
.
loader_review
=
false
;
this
.
loader_review
=
false
;
this
.
imageServer
=
ImageStorage
;
this
.
imageServer
=
ImageStorage
;
...
@@ -77,7 +81,7 @@ export class TrackComponent implements OnInit {
...
@@ -77,7 +81,7 @@ export class TrackComponent implements OnInit {
this
.
goToPage
(
'purchaseHome'
,
''
);
this
.
goToPage
(
'purchaseHome'
,
''
);
}
}
}
}
unsetProdDetails
(){
unsetProdDetails
(){
this
.
webService
.
removeLocalItem
(
'productDetails'
);
this
.
webService
.
removeLocalItem
(
'productDetails'
);
}
}
...
@@ -163,7 +167,11 @@ export class TrackComponent implements OnInit {
...
@@ -163,7 +167,11 @@ export class TrackComponent implements OnInit {
}
}
this
.
goToPage
(
'rating'
,{
"pId"
:
this
.
orderDetails
.
product_id
});
this
.
goToPage
(
'rating'
,{
"pId"
:
this
.
orderDetails
.
product_id
});
}
}
downloadFile
(
orderId
){
document
.
open
(
this
.
serverUrl
+
''
,
'_blank'
);
}
goToPage
(
path
,
data
=
null
){
goToPage
(
path
,
data
=
null
){
this
.
router
.
navigate
([
path
],{
queryParams
:
data
});
this
.
router
.
navigate
([
path
],{
queryParams
:
data
});
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
...
...
src/assets/css/responsive.scss
View file @
be42bb4b
...
@@ -46,6 +46,24 @@
...
@@ -46,6 +46,24 @@
.purchase_filter_section
{
.purchase_filter_section
{
width
:
100%
!
important
;
width
:
100%
!
important
;
}
}
.purchase_wrapper
{
.purchase_content_wrapper
{
.purchase_content_section
{
.search_listing_content
{
ul
{
li
{
width
:
100%
!
important
;
}
}
}
}
}
}
.purchase_content_section
{
.purchase_content_section
{
width
:
100%
!
important
;
width
:
100%
!
important
;
height
:
auto
!
important
;
height
:
auto
!
important
;
...
@@ -320,7 +338,7 @@
...
@@ -320,7 +338,7 @@
li
{
li
{
list-style
:
none
;
list-style
:
none
;
padding
:
10px
;
padding
:
10px
;
width
:
calc
(
100%
-
67
%
)
!
important
;
width
:
calc
(
100%
-
75
%
)
!
important
;
display
:
inline-block
;
display
:
inline-block
;
}
}
...
...
src/assets/images/asset_icon3.png
View replaced file @
98b712b8
View file @
be42bb4b
8.05 KB
|
W:
|
H:
6.03 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/environments/server.config.ts
View file @
be42bb4b
...
@@ -5,10 +5,10 @@ apiConfigUrl = 'http://localhost/dcarfixers/Webservices/';
...
@@ -5,10 +5,10 @@ apiConfigUrl = 'http://localhost/dcarfixers/Webservices/';
imageStorageUrl
=
'http://localhost/dcarfixers/'
;
imageStorageUrl
=
'http://localhost/dcarfixers/'
;
// // Techlabz
// // Techlabz
//
apiConfigUrl = 'https://techlabz.in/dcarfixers/Webservices/';
// apiConfigUrl = 'https://techlabz.in/dcarfixers/Webservices/';
// imageStorageUrl = 'https://techlabz.in/dcarfixers/';
// imageStorageUrl = 'https://techlabz.in/dcarfixers/';
// // carfixxers.com
// //
//
carfixxers.com
// apiConfigUrl = 'https://carfixxers.com/admin/Webservices/';
// apiConfigUrl = 'https://carfixxers.com/admin/Webservices/';
// imageStorageUrl = 'https://carfixxers.com/admin/';
// imageStorageUrl = 'https://carfixxers.com/admin/';
...
...
src/index.html
View file @
be42bb4b
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.png"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"favicon.png"
>
<script
src=
"https://kit.fontawesome.com/288b25c567.js"
></script>
</head>
</head>
<body>
<body>
<app-root></app-root>
<app-root></app-root>
...
...
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