Commit 92309bdb by Tobin

Merge branch 'jensa' into 'master'

Jensa See merge request !47
parents 6cbd7354 1b134de1
{
// 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
...@@ -379,7 +379,8 @@ ...@@ -379,7 +379,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -400,12 +401,14 @@ ...@@ -400,12 +401,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -420,17 +423,20 @@ ...@@ -420,17 +423,20 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -547,7 +553,8 @@ ...@@ -547,7 +553,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -559,6 +566,7 @@ ...@@ -559,6 +566,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -573,6 +581,7 @@ ...@@ -573,6 +581,7 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -580,12 +589,14 @@ ...@@ -580,12 +589,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -604,6 +615,7 @@ ...@@ -604,6 +615,7 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -684,7 +696,8 @@ ...@@ -684,7 +696,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -696,6 +709,7 @@ ...@@ -696,6 +709,7 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -781,7 +795,8 @@ ...@@ -781,7 +795,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -817,6 +832,7 @@ ...@@ -817,6 +832,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -836,6 +852,7 @@ ...@@ -836,6 +852,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -879,12 +896,14 @@ ...@@ -879,12 +896,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
...@@ -4292,7 +4311,8 @@ ...@@ -4292,7 +4311,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -4313,12 +4333,14 @@ ...@@ -4313,12 +4333,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -4333,17 +4355,20 @@ ...@@ -4333,17 +4355,20 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -4460,7 +4485,8 @@ ...@@ -4460,7 +4485,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -4472,6 +4498,7 @@ ...@@ -4472,6 +4498,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -4486,6 +4513,7 @@ ...@@ -4486,6 +4513,7 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -4493,12 +4521,14 @@ ...@@ -4493,12 +4521,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -4517,6 +4547,7 @@ ...@@ -4517,6 +4547,7 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
...@@ -4597,7 +4628,8 @@ ...@@ -4597,7 +4628,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -4609,6 +4641,7 @@ ...@@ -4609,6 +4641,7 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -4694,7 +4727,8 @@ ...@@ -4694,7 +4727,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -4730,6 +4764,7 @@ ...@@ -4730,6 +4764,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -4749,6 +4784,7 @@ ...@@ -4749,6 +4784,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -4792,12 +4828,14 @@ ...@@ -4792,12 +4828,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
...@@ -6429,9 +6467,9 @@ ...@@ -6429,9 +6467,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.11", "version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40=" "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
}, },
"lodash.assign": { "lodash.assign": {
"version": "4.2.0", "version": "4.2.0",
...@@ -6454,8 +6492,7 @@ ...@@ -6454,8 +6492,7 @@
}, },
"lodash.mergewith": { "lodash.mergewith": {
"version": "4.6.1", "version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", "resolved": "",
"integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==",
"dev": true, "dev": true,
"optional": true "optional": true
}, },
...@@ -6907,9 +6944,9 @@ ...@@ -6907,9 +6944,9 @@
} }
}, },
"mixin-deep": { "mixin-deep": {
"version": "1.3.1", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
"integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
"dev": true, "dev": true,
"requires": { "requires": {
"for-in": "^1.0.2", "for-in": "^1.0.2",
...@@ -6919,7 +6956,7 @@ ...@@ -6919,7 +6956,7 @@
"is-extendable": { "is-extendable": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
"integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
"dev": true, "dev": true,
"requires": { "requires": {
"is-plain-object": "^2.0.4" "is-plain-object": "^2.0.4"
...@@ -8984,9 +9021,9 @@ ...@@ -8984,9 +9021,9 @@
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
}, },
"set-value": { "set-value": {
"version": "2.0.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
"integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
"dev": true, "dev": true,
"requires": { "requires": {
"extend-shallow": "^2.0.1", "extend-shallow": "^2.0.1",
...@@ -10307,38 +10344,15 @@ ...@@ -10307,38 +10344,15 @@
"dev": true "dev": true
}, },
"union-value": { "union-value": {
"version": "1.0.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
"integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
"dev": true, "dev": true,
"requires": { "requires": {
"arr-union": "^3.1.0", "arr-union": "^3.1.0",
"get-value": "^2.0.6", "get-value": "^2.0.6",
"is-extendable": "^0.1.1", "is-extendable": "^0.1.1",
"set-value": "^0.4.3" "set-value": "^2.0.1"
},
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"dev": true,
"requires": {
"is-extendable": "^0.1.0"
}
},
"set-value": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
"integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
"dev": true,
"requires": {
"extend-shallow": "^2.0.1",
"is-extendable": "^0.1.1",
"is-plain-object": "^2.0.1",
"to-object-path": "^0.3.0"
}
}
} }
}, },
"unique-filename": { "unique-filename": {
......
...@@ -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">
......
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"});
}
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="title_banner_overlay"> <div class="title_banner_overlay">
<div class="title_banner"> <div class="title_banner">
<div class="container"> <div class="container">
</div> </div>
</div> </div>
</div> </div>
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link vehicle" data-toggle="tab" href="#vehicle"> <a class="nav-link vehicle" data-toggle="tab" href="#vehicle" #vehicleTab>
<span> <span>
My Vehicle My Vehicle
<div class="notification" *ngIf="vehDetails">{{ vehDetails?.length || '0' }}</div> <div class="notification" *ngIf="vehDetails">{{ vehDetails?.length || '0' }}</div>
</span> </span>
</a> </a>
...@@ -42,15 +42,16 @@ ...@@ -42,15 +42,16 @@
Service History Service History
<div class="notification" *ngIf="bookingDetails">{{ bookingDetails?.length || '0' }}</div> <div class="notification" *ngIf="bookingDetails">{{ bookingDetails?.length || '0' }}</div>
</span> </span>
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link reminder" data-toggle="tab" href="#reminder"> <a class="nav-link reminder" data-toggle="tab" href="#reminder" #reminderTab>
<span> <span>
Reminder Reminder
<div class="notification" *ngIf="remainders">{{ remainders?.length || '0' }}</div>
</span> </span>
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -84,15 +85,15 @@ ...@@ -84,15 +85,15 @@
<div class="col-md-6"> <div class="col-md-6">
<p>First Name</p> <p>First Name</p>
<input class="text_input" placeholder="" type="text" formControlName="first_name" <input class="text_input" placeholder="" type="text" formControlName="first_name"
[ngClass]="{'input_error': !editProfile.controls['first_name'].valid && (editProfile.controls['first_name'].dirty || editProfile.controls['first_name'].touched || editProfileSubmitClick), [ngClass]="{'input_error': !editProfile.controls['first_name'].valid && (editProfile.controls['first_name'].dirty || editProfile.controls['first_name'].touched || editProfileSubmitClick),
'input_success': editProfile.controls['first_name'].touched && editProfile.controls['first_name'].valid}" 'input_success': editProfile.controls['first_name'].touched && editProfile.controls['first_name'].valid}"
(click)="editProfileSubmitClick = false"> (click)="editProfileSubmitClick = false">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<p>Last Name</p> <p>Last Name</p>
<input class="text_input" placeholder="" type="text" formControlName="last_name" <input class="text_input" placeholder="" type="text" formControlName="last_name"
[ngClass]="{'input_error': !editProfile.controls['last_name'].valid && (editProfile.controls['last_name'].dirty || editProfile.controls['last_name'].touched || editProfileSubmitClick), [ngClass]="{'input_error': !editProfile.controls['last_name'].valid && (editProfile.controls['last_name'].dirty || editProfile.controls['last_name'].touched || editProfileSubmitClick),
'input_success': editProfile.controls['last_name'].touched && editProfile.controls['last_name'].valid}" 'input_success': editProfile.controls['last_name'].touched && editProfile.controls['last_name'].valid}"
(click)="editProfileSubmitClick = false"> (click)="editProfileSubmitClick = false">
</div> </div>
</div> </div>
...@@ -100,9 +101,9 @@ ...@@ -100,9 +101,9 @@
<div class="col-md-6"> <div class="col-md-6">
<p>Phone</p> <p>Phone</p>
<input class="text_input" placeholder="" type="text" formControlName="phone" <input class="text_input" placeholder="" type="text" formControlName="phone"
[ngClass]="{'input_error': !editProfile.controls['phone'].valid && (editProfile.controls['phone'].dirty || editProfile.controls['phone'].touched || editProfileSubmitClick), [ngClass]="{'input_error': !editProfile.controls['phone'].valid && (editProfile.controls['phone'].dirty || editProfile.controls['phone'].touched || editProfileSubmitClick),
'input_success': editProfile.controls['phone'].touched && editProfile.controls['phone'].valid}" 'input_success': editProfile.controls['phone'].touched && editProfile.controls['phone'].valid}"
(click)="editProfileSubmitClick = false"> (click)="editProfileSubmitClick = false">
</div> </div>
<div class="col-md-6"></div> <div class="col-md-6"></div>
</div> </div>
...@@ -111,7 +112,7 @@ ...@@ -111,7 +112,7 @@
<div class="col-md-12"> <div class="col-md-12">
<textarea class="text_input address_height" placeholder="" type="text" formControlName="address" <textarea class="text_input address_height" placeholder="" type="text" formControlName="address"
[ngClass]="{'input_error': !editProfile.controls['address'].valid && (editProfile.controls['address'].dirty || editProfile.controls['address'].touched || editProfileSubmitClick), [ngClass]="{'input_error': !editProfile.controls['address'].valid && (editProfile.controls['address'].dirty || editProfile.controls['address'].touched || editProfileSubmitClick),
'input_success': editProfile.controls['address'].touched && editProfile.controls['address'].valid}" 'input_success': editProfile.controls['address'].touched && editProfile.controls['address'].valid}"
(click)="editProfileSubmitClick = false"></textarea> (click)="editProfileSubmitClick = false"></textarea>
</div> </div>
</div> </div>
...@@ -126,7 +127,7 @@ ...@@ -126,7 +127,7 @@
<p>Email Address ( Username )</p> <p>Email Address ( Username )</p>
<input class="text_input" placeholder="" type="mail" formControlName="email" <input class="text_input" placeholder="" type="mail" formControlName="email"
[ngClass]="{'input_error': !editProfile.controls['email'].valid && (editProfile.controls['email'].dirty || editProfile.controls['email'].touched || editProfileSubmitClick), [ngClass]="{'input_error': !editProfile.controls['email'].valid && (editProfile.controls['email'].dirty || editProfile.controls['email'].touched || editProfileSubmitClick),
'input_success': editProfile.controls['email'].touched && editProfile.controls['email'].valid}" 'input_success': editProfile.controls['email'].touched && editProfile.controls['email'].valid}"
(click)="editProfileSubmitClick = false"> (click)="editProfileSubmitClick = false">
</div> </div>
</div> </div>
...@@ -141,14 +142,14 @@ ...@@ -141,14 +142,14 @@
<p>New Password</p> <p>New Password</p>
<input class="text_input" placeholder="" type="password" formControlName="password" <input class="text_input" placeholder="" type="password" formControlName="password"
[ngClass]="{'input_error': !editProfile.controls['password'].valid && editProfile.controls['password'].value != '', [ngClass]="{'input_error': !editProfile.controls['password'].valid && editProfile.controls['password'].value != '',
'input_success': editProfile.controls['password'].valid && editProfile.controls['password'].value != ''}" 'input_success': editProfile.controls['password'].valid && editProfile.controls['password'].value != ''}"
(click)="editProfileSubmitClick = false"> (click)="editProfileSubmitClick = false">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<p>Confirm new Password</p> <p>Confirm new Password</p>
<input class="text_input" placeholder="" type="password" formControlName="cpassword" <input class="text_input" placeholder="" type="password" formControlName="cpassword"
[ngClass]="{'input_error': !editProfile.controls['cpassword'].valid || (editProfile.controls['password'].value != editProfile.controls['cpassword'].value), [ngClass]="{'input_error': !editProfile.controls['cpassword'].valid || (editProfile.controls['password'].value != editProfile.controls['cpassword'].value),
'input_success': editProfile.controls['password'].value != '' && editProfile.controls['cpassword'].valid && (editProfile.controls['password'].value == editProfile.controls['cpassword'].value)}" 'input_success': editProfile.controls['password'].value != '' && editProfile.controls['cpassword'].valid && (editProfile.controls['password'].value == editProfile.controls['cpassword'].value)}"
(click)="editProfileSubmitClick = false"> (click)="editProfileSubmitClick = false">
</div> </div>
<div class="col-md-6"> </div> <div class="col-md-6"> </div>
...@@ -218,7 +219,11 @@ ...@@ -218,7 +219,11 @@
<div class="button_bay"> <div class="button_bay">
<div class="btn-group-justified" role="group" aria-label="Basic example"> <div class="btn-group-justified" role="group" aria-label="Basic example">
<button type="button" class="btn book btn-sm" data-toggle="modal" data-target="#wizard" (click)="bookVechile(vehicle.customer_veh_id)">Book Now</button> <button type="button" class="btn book btn-sm" data-toggle="modal" data-target="#wizard" (click)="bookVechile(vehicle.customer_veh_id)">Book Now</button>
<button type="button" class="btn btn-danger btn-sm" (click)="cnfdeleteCustomerCar(vehicle.customer_id,vehicle.customer_veh_id)">Delete</button>
<button type="button" class="btn btn-danger btn-sm" (click)="cnfdeleteCustomerCar(vehicle.customer_id,vehicle.customer_veh_id)"><i class="fas fa-trash"></i></button>
<button type="button" class="btn btn-primary btn-sm" *ngIf="vehicle.enable_notification == 0" (click)="changeReminder(vehicle.customer_veh_id,1)"><i class="fas fa-bell"></i></button>
<button type="button" class="btn btn-secondary btn-sm noti_slash" *ngIf="vehicle.enable_notification == 1" (click)="changeReminder(vehicle.customer_veh_id,0)"><i class="fas fa-bell-slash"></i></button>
<button type="button" class="btn book btn-sm" (click)="purchase(vehicle.customer_veh_id)">Purchase</button>
</div> </div>
</div> </div>
</li> </li>
...@@ -357,12 +362,12 @@ ...@@ -357,12 +362,12 @@
</tr> </tr>
</tbody> </tbody>
</table> --> </table> -->
<table> <table>
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
...@@ -428,52 +433,50 @@ ...@@ -428,52 +433,50 @@
<div class="tab-pane container fade" id="reminder"> <div class="tab-pane container fade" id="reminder">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="row line_row"> <span *ngIf="remainders; else noRemndrs">
<div class="col-md-12"> <div class="row line_row">
<h3>Set reminder for service booking</h3> <div class="col-md-12">
<hr> <h3>Reminder for service booking</h3>
<hr>
</div>
</div> </div>
</div> <div class="row line_row">
<div class="row line_row"> <div class="col-md-12">
<div class="col-md-12"> <div class="table-responsive">
<div class="vehicle_list"> <table>
<ul> <thead>
<li> <tr>
<div class="car_details"> <th>Sl No</th>
<h5><strong>UI458792</strong>booking name</h5> <th>Vehicle Name</th>
<div class="row"> <th>Last Maintanence Date</th>
<div class="col-md-3">Booking id</div> <th>Next Maintanence Date</th>
<div class="col-md-1">:</div> <th>Action</th>
<div class="col-md-7">UI458792</div> </tr>
</div> </thead>
<div class="row"> <tbody>
<div class="col-md-3">Date</div> <tr *ngFor="let remnds of remainders;let i = index;">
<div class="col-md-1">:</div> <td>{{i +1}}</td>
<div class="col-md-7">12 June 2019</div> <td>{{remnds.car_name}}</td>
</div> <td>{{remnds.last_maintenance_date | date :"MMMM dd, yyyy, EEE"}}</td>
<div class="row"> <td>{{remnds.next_maintenance_date | date :"MMMM dd, yyyy, EEE"}}</td>
<div class="col-md-3">Time</div> <td>
<div class="col-md-1">:</div> <div class="btn-group-justified" role="group" aria-label="Basic example">
<div class="col-md-7">13:00:00</div> <button type="button" class="btn btn-danger btn-sm noti_slash" (click)="cnfdeleteVehReminder(remnds.customer_veh_id,0)"><i class="fas fa-bell-slash"></i></button>
</div>
<div class="row">
<div class="col-md-3">Snooze time</div>
<div class="col-md-1">:</div>
<div class="col-md-7">10 minutes</div>
</div>
</div>
<div class="clear"></div>
<div class="button_bay">
<div class="btn-group-justified" role="group" aria-label="Basic example">
<button type="button" class="btn book btn-sm">Enable reminder</button>
<button type="button" class="btn btn-danger btn-sm">Cancel reminder</button>
</div> </div>
</div> </td>
</li> </tr>
</ul> </tbody>
</div> </table>
</div>
</div>
</div> </div>
</div> </span>
<ng-template #noRemndrs>
<div class="cmn_nodata">
<img src="../../../assets/images/no_result.png">
<p>No Reminders</p>
</div>
</ng-template>
</div> </div>
</div> </div>
</div> </div>
...@@ -503,7 +506,7 @@ ...@@ -503,7 +506,7 @@
<span class="checkmark"></span> <span class="checkmark"></span>
</label> </label>
</div> </div>
<div class="add_modal_inner" [hidden]="tab=='inactive'"> <div class="add_modal_inner" [hidden]="tab=='inactive'">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
...@@ -513,76 +516,111 @@ ...@@ -513,76 +516,111 @@
<form [formGroup]="vehicleDetailsAddForm" (ngSubmit)="vehicleDetailsFormSubmit(vehicleDetailsAddForm.value)"> <form [formGroup]="vehicleDetailsAddForm" (ngSubmit)="vehicleDetailsFormSubmit(vehicleDetailsAddForm.value)">
<div class="row line_row"> <div class="row line_row">
<div class="col-md-6"> <div class="col-md-6">
<select class="vehicle_input_select" placeholder="Choose Year" formControlName="modelYear" <select class="vehicle_input_select" (change)="get_vehiYear($event.target.value)" placeholder="Choose Year" formControlName="modelYear"
[ngClass]="{'input_error': !vehicleDetailsAddForm.controls['modelYear'].valid && vehicleDetailsFormSubmitClick}"> [ngClass]="{'input_error': (!vehicleDetailsAddForm.controls['modelYear'].valid && vehicleDetailsAddForm.controls['maker'].valid) || (!vehicleDetailsAddForm.controls['modelYear'].valid && vehicleDetailsFormSubmitClick)}">
<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>
</div>
<div class="col-md-6">
<select (change)="get_model($event.target.value)" class="vehicle_input_select" placeholder="Choose Make"
formControlName="maker" [ngClass]="{'input_error': !vehicleDetailsAddForm.controls['maker'].valid && vehicleDetailsFormSubmitClick}">
<option value="" class="hide">MAKE</option>
<option *ngFor="let car_date of carBrands; let key = index" value="{{car_date.veh_brand_id}}">{{car_date.maker}}</option>
</select>
</div>
</div>
<div class="row line_row">
<div class="col-md-6">
<select class="vehicle_input_select" placeholder="Choose Model" formControlName="modelName"
[ngClass]="{'input_error': !vehicleDetailsAddForm.controls['modelName'].valid && vehicleDetailsFormSubmitClick}">
<option value="" class="hide">MODEL</option>
<option *ngFor="let car_models of carModel">{{car_models.model}}</option>
</select>
</div>
<div class="col-md-6">
<input #googleLocDetails class="vehicle_input" placeholder="Enter Location" autocorrect="off" autocapitalize="off" spellcheck="off" type="text" (keyup)="searchLocError = false" formControlName="location"
[ngClass]="{'input_error': !vehicleDetailsAddForm.controls['location'].valid && vehicleDetailsFormSubmitClick}">
</div>
</div>
<div *ngIf="errMessage" class="s_alert alert-danger">
<strong>{{errMessage.errMsg}}<br></strong>
</div>
<div class="row line_row mb0">
<div class="col-md-12">
<button class="add_btn" type="submit">Add Vehicle</button>
</div>
</div>
</form>
</div>
<div class="add_modal_inner" [hidden]="tab=='active'">
<div class="row">
<div class="col-md-12">
<p>Add Vehicle Identification number</p>
</div> </div>
<div class="col-md-6">
<select (change)="get_model($event.target.value)" class="vehicle_input_select" placeholder="Choose Make"
formControlName="maker" [ngClass]="{'input_error': !vehicleDetailsAddForm.controls['maker'].valid && vehicleDetailsFormSubmitClick}">
<option value="" class="hide">MAKE</option>
<option *ngFor="let car_date of carBrands; let key = index" value="{{car_date.veh_brand_id}}">{{car_date.maker}}</option>
</select>
</div> </div>
<form [formGroup]="vehicleVinAddForm" (ngSubmit)="vehicleVinFormSubmit(vehicleVinAddForm.value)">
<div class="row line_row">
<div class="col-md-12">
<input class="vehicle_input" placeholder="Add VIN" formControlName="vin"
[ngClass]="{'input_error': !vehicleVinAddForm.controls['vin'].valid && vehicleVinFormSubmitClick}">
</div>
</div>
<div class="row line_row">
<div class="col-md-12">
<input #googleLocVin class="vehicle_input" placeholder="Enter Location" autocorrect="off" autocapitalize="off" spellcheck="off" type="text" (keyup)="searchLocError = false" formControlName="location"
[ngClass]="{'input_error': !vehicleVinAddForm.controls['location'].valid && vehicleVinFormSubmitClick}">
</div>
</div>
<div *ngIf="errMessage" class="s_alert alert-danger">
<strong>{{errMessage.errMsg}}<br></strong>
</div>
<div class="row line_row mb0">
<div class="col-md-12">
<button class="add_btn" type="submit">Add Vehicle</button>
</div>
</div>
</form>
</div> </div>
<div class="row line_row">
<div class="col-md-6">
<select class="vehicle_input_select" (change)="get_trims($event)" *ngIf="carModel && carModel.length > 0" placeholder="Choose Model" formControlName="modelName"
[ngClass]="{'input_error': !vehicleDetailsAddForm.controls['modelName'].valid && vehicleDetailsFormSubmitClick}">
<option value="" class="hide">MODEL</option>
<option *ngFor="let car_models of carModel" [attr.modelValue]="car_models.veh_model_id">{{car_models.model}}</option>
</select>
</div>
<div class="col-md-6">
<select class="vehicle_input_select" *ngIf="carTrim && carTrim.length > 0" formControlName="trim"
[ngClass]="{'input_error': !vehicleDetailsAddForm.controls['modelName'].valid && vehicleDetailsFormSubmitClick}">
<option value="" class="hide">TRIM</option>
<option *ngFor="let car_trim of carTrim">{{car_trim.trim}}</option>
</select>
</div>
</div>
<div class="row line_row">
<div class="col-md-6">
<input #googleLocDetails class="vehicle_input" placeholder="ENTER LOCATION" autocorrect="off" autocapitalize="off" spellcheck="off" type="text" (keyup)="searchLocError = false" formControlName="location"
[ngClass]="{'input_error': !vehicleDetailsAddForm.controls['location'].valid && vehicleDetailsFormSubmitClick}">
</div>
</div>
<div class="row">
<div class="col-md-12">
<p>Optional</p>
</div>
</div>
<div class="row line_row">
<div class="col-md-6">
<input class="vehicle_input" placeholder="ENTER ENGINE" type="text" formControlName="engine">
</div>
<div class="col-md-6">
<input formControlName="last_date" placeholder="LAST MAINTENANCE DATE" type="text" class="vehicle_input date"
bsDatepicker name="dob">
</div>
</div>
<div class="row line_row">
<!-- <div class="col-md-6">
<input formControlName="last_date" placeholder="LAST MAINTENANCE DATE" type="text" class="vehicle_input date"
bsDatepicker name="dob">
</div> -->
<div class="col-md-6">
<select class="vehicle_input_select" formControlName="maintanence_interval">
<option [attr.value]="0" [attr.selected]=true [attr.disabled]="true">MAINTANENCE INTERVAL</option>
<option *ngFor="let date of monthArray;let i = index;" [value]="i+1">{{i+1}}{{(i === 0)?' Month':' Months'}}</option>
</select>
</div>
</div>
<div *ngIf="errMessage" class="s_alert alert-danger">
<strong>{{errMessage.errMsg}}<br></strong>
</div>
<div class="row line_row mb0">
<div class="col-md-12">
<button class="add_btn" type="submit">Add Vehicle</button>
</div>
</div>
</form>
</div>
<div class="add_modal_inner" [hidden]="tab=='active'">
<div class="row">
<div class="col-md-12">
<p>Add Vehicle Identification number</p>
</div> </div>
</div> </div>
<form [formGroup]="vehicleVinAddForm" (ngSubmit)="vehicleVinFormSubmit(vehicleVinAddForm.value)">
<div class="row line_row">
<div class="col-md-12">
<input class="vehicle_input" placeholder="Add VIN" formControlName="vin"
[ngClass]="{'input_error': !vehicleVinAddForm.controls['vin'].valid && vehicleVinFormSubmitClick}">
</div>
</div>
<div class="row line_row">
<div class="col-md-12">
<input #googleLocVin class="vehicle_input" placeholder="Enter Location" autocorrect="off" autocapitalize="off" spellcheck="off" type="text" (keyup)="searchLocError = false" formControlName="location"
[ngClass]="{'input_error': !vehicleVinAddForm.controls['location'].valid && vehicleVinFormSubmitClick}">
</div>
</div>
<div *ngIf="errMessage" class="s_alert alert-danger">
<strong>{{errMessage.errMsg}}<br></strong>
</div>
<div class="row line_row mb0">
<div class="col-md-12">
<button class="add_btn" type="submit">Add Vehicle</button>
</div>
</div>
</form>
</div> </div>
</div> </div>
</div>
</div>
</div>
<!-- ADD-VEHICLE-MODAL-ENDS --> <!-- ADD-VEHICLE-MODAL-ENDS -->
<!-- EDIT-VEHICLE-MODAL-STARTS --> <!-- EDIT-VEHICLE-MODAL-STARTS -->
...@@ -622,7 +660,7 @@ ...@@ -622,7 +660,7 @@
<div class="col-md-12"> <div class="col-md-12">
<input class="vehicle_input" placeholder="Edit Registration Number"> <input class="vehicle_input" placeholder="Edit Registration Number">
</div> </div>
</div> </div>
<div class="row line_row mb0"> <div class="row line_row mb0">
<div class="col-md-12"> <div class="col-md-12">
...@@ -692,7 +730,7 @@ ...@@ -692,7 +730,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<button [ngClass]="{'log_btn_diabled':selectedIssues.length == 0}" class="log_btn next_btn floatRight" type="button" (click)="jumpToStep3()">NEXT</button> <button [ngClass]="{'log_btn_diabled':selectedIssues.length == 0}" class="log_btn next_btn floatRight" type="button" (click)="jumpToStep3()">NEXT</button>
...@@ -748,7 +786,7 @@ ...@@ -748,7 +786,7 @@
</div> </div>
</div> </div>
</wizard-step> </wizard-step>
<wizard-step stepTitle="Title of step 4"> <wizard-step stepTitle="Title of step 4">
<h3>SUMMARY</h3> <h3>SUMMARY</h3>
<div class="row"> <div class="row">
...@@ -835,61 +873,61 @@ ...@@ -835,61 +873,61 @@
<h4>Car Fixxers Guarantee</h4> <h4>Car Fixxers Guarantee</h4>
<p>Quality service through our network of approved repair shops Rewards to use towards future services, Vehicle maintenance tracker to easily manage service history Safe and secure payment processing, Dedicated support to <p>Quality service through our network of approved repair shops Rewards to use towards future services, Vehicle maintenance tracker to easily manage service history Safe and secure payment processing, Dedicated support to
handle any repair related questions Peace-of-Mind Guarantee - no unexpected charges</p> handle any repair related questions Peace-of-Mind Guarantee - no unexpected charges</p>
</div> </div>
<div class="quote_schedule_header"> <div class="quote_schedule_header">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<h4>Select your day and date</h4> <h4>Select your day and date</h4>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<button [ngClass]="{'invisible': !showLeftArrow}" class="quote_arrow left floatLeft" (click)="prev($event)"></button> <button [ngClass]="{'invisible': !showLeftArrow}" class="quote_arrow left floatLeft" (click)="prev($event)"></button>
<div class="schedule_dates floatLeft"> <div class="schedule_dates floatLeft">
<ul> <ul>
<li>{{ dateSection[0] | date:'MMM dd-MM-yyyy' }}</li> <li>{{ dateSection[0] | date:'MMM dd-MM-yyyy' }}</li>
<li>{{ dateSection[1] | date:'MMM dd-MM-yyyy' }}</li> <li>{{ dateSection[1] | date:'MMM dd-MM-yyyy' }}</li>
</ul> </ul>
</div> </div>
<button [ngClass]="{'invisible': !showRightArrow}" class="quote_arrow right floatRight" (click)="next($event)"></button> <button [ngClass]="{'invisible': !showRightArrow}" class="quote_arrow right floatRight" (click)="next($event)"></button>
<div class="clear"></div> <div class="clear"></div>
</div>
</div> </div>
</div> </div>
</div> <div class="quote_schedule_list">
<div class="quote_schedule_list"> <ul malihu-scrollbar [scrollbarOptions]="scrollbarOptions">
<ul malihu-scrollbar [scrollbarOptions]="scrollbarOptions"> <li *ngFor="let mechanic of mechanicData; let i = index;">
<li *ngFor="let mechanic of mechanicData; let i = index;"> <div class="row">
<div class="row"> <div class="col-md-6 pr0">
<div class="col-md-6 pr0"> <div class="mechanic_profile">
<div class="mechanic_profile"> <div class="mechanic_profile_inner">
<div class="mechanic_profile_inner"> <div class="mechanic_photo_wrapper">
<div class="mechanic_photo_wrapper"> <div class="mechanic_photo">
<div class="mechanic_photo"> <img src="{{imageServer + mechanic.profile_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
<img src="{{imageServer + mechanic.profile_image}}" onerror="this.src='assets/images/user_avatar.jpg'"> </div>
</div> <div class="mechanic_ratting">
<div class="mechanic_ratting"> <p *ngIf="mechanic.rating > 0">{{mechanic.rating}} Ratings</p>
<p *ngIf="mechanic.rating > 0">{{mechanic.rating}} Ratings</p>
</div>
</div> </div>
</div> <div class="mechanic_detail relative">
<div class="mechanic_detail relative">
<div class="custom_checkbox_stack"> <div class="custom_checkbox_stack">
<input class="custom_checkbox" [attr.id]="'custom_checkbox-1'+i" (click)="checkboxChange(i,mechanic.mechanic_id,$event,mechanic.estimate)" type="checkbox" value="value1"> <input class="custom_checkbox" [attr.id]="'custom_checkbox-1'+i" (click)="checkboxChange(i,mechanic.mechanic_id,$event,mechanic.estimate)" type="checkbox" value="value1">
<label [attr.for]="'custom_checkbox-1'+i"></label> <label [attr.for]="'custom_checkbox-1'+i"></label>
</div> </div>
<h4>{{mechanic.display_name}}</h4> <h4>{{mechanic.display_name}}</h4>
<div *ngIf="mechanic.shop_id != 0; else mechanicDetails"> <div *ngIf="mechanic.shop_id != 0; else mechanicDetails">
<h5>{{mechanic.shop_name}}</h5> <h5>{{mechanic.shop_name}}</h5>
<p>{{mechanic.shop_address}}</p> <p>{{mechanic.shop_address}}</p>
<h6>{{mechanic.shop_phone}}</h6> <h6>{{mechanic.shop_phone}}</h6>
<p>{{mechanic.distance | number:'1.2-2'}} miles away from you</p> <p>{{mechanic.distance | number:'1.2-2'}} miles away from you</p>
</div> </div>
<ng-template #mechanicDetails> <ng-template #mechanicDetails>
<p>{{mechanic.address}}<br>{{mechanic.city+' , '+mechanic.state}}</p> <p>{{mechanic.address}}<br>{{mechanic.city+' , '+mechanic.state}}</p>
<h6>{{mechanic.phone}}</h6> <h6>{{mechanic.phone}}</h6>
<p>{{mechanic.distance | number:'1.2-2'}} miles away from you</p> <p>{{mechanic.distance | number:'1.2-2'}} miles away from you</p>
</ng-template> </ng-template>
<button (click)="scheduleNow(mechanic.mechanic_id,mechanic.estimate)" <button (click)="scheduleNow(mechanic.mechanic_id,mechanic.estimate)"
[ngClass]="{'book_now':scheduleDateInit == true && scheduleMechanic == mechanic.mechanic_id && selMechanics.length <= 0, [ngClass]="{'book_now':scheduleDateInit == true && scheduleMechanic == mechanic.mechanic_id && selMechanics.length <= 0,
'book_now_disabled':scheduleDateInit == false || (scheduleDateInit == true && scheduleMechanic != mechanic.mechanic_id) || selMechanics.length > 0}"> 'book_now_disabled':scheduleDateInit == false || (scheduleDateInit == true && scheduleMechanic != mechanic.mechanic_id) || selMechanics.length > 0}">
{{loginDetails ? 'Book now' : 'Login and Continue' }} {{loginDetails ? 'Book now' : 'Login and Continue' }}
</button> </button>
</div> </div>
...@@ -899,7 +937,7 @@ ...@@ -899,7 +937,7 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#estimate_{{mechanic.mechanic_id}}"> <a data-toggle="collapse" data-parent="#accordion" href="#estimate_{{mechanic.mechanic_id}}">
<div class="row"> <div class="row">
<div class="col-md-8">Estimated Price</div> <div class="col-md-8">Estimated Price</div>
<div class="col-md-1"></div> <div class="col-md-1"></div>
...@@ -929,14 +967,14 @@ ...@@ -929,14 +967,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(time,'0'); <input type="radio" value="{{time | date:'hh:mm a'}}" name="scheduleTime" (click)="getSchedule($event.target.value,'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(time,'0'); <input type="radio" value="{{time | date:'hh:mm a'}}" name="scheduleTime" (click)="getSchedule($event.target.value,'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>
...@@ -946,7 +984,7 @@ ...@@ -946,7 +984,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(time,'1'); <input type="radio" value="{{time | date:'hh:mm a'}}" name="scheduleTime" (click)="getSchedule($event.target.value,'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>
...@@ -978,31 +1016,31 @@ ...@@ -978,31 +1016,31 @@
<div class="service_map"> <div class="service_map">
<agm-map #gm [latitude]="lat" [longitude]="lng" [fitBounds]="true"> <agm-map #gm [latitude]="lat" [longitude]="lng" [fitBounds]="true">
<agm-marker *ngFor="let mechanicLoc of mechanicData" <agm-marker *ngFor="let mechanicLoc of mechanicData"
[latitude]="mechanicLoc.location_lat" [latitude]="mechanicLoc.location_lat"
[longitude]="mechanicLoc.location_lat" [longitude]="mechanicLoc.location_lat"
(mouseOver)="onMouseOver(infoWindow,gm)" (mouseOver)="onMouseOver(infoWindow,gm)"
(mouseOut)="onMouseOut(gm)" [agmFitBounds]="true"> (mouseOut)="onMouseOut(gm)" [agmFitBounds]="true">
<agm-info-window [disableAutoPan]="false" #infoWindow> <agm-info-window [disableAutoPan]="false" #infoWindow>
<div style="width:130px;"> <div style="width:130px;">
<img src="{{imageServer + mechanicLoc.profile_image}}" width="30px" height="30px" style="float: left;" onerror="this.src='assets/images/user_avatar.jpg'"> <img src="{{imageServer + mechanicLoc.profile_image}}" width="30px" height="30px" style="float: left;" onerror="this.src='assets/images/user_avatar.jpg'">
<div style="float:right;width:calc(100% - 30px); white-space: nowrap; <div style="float:right;width:calc(100% - 30px); white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;padding-left: 5px;">{{mechanicLoc.display_name}}<br> text-overflow: ellipsis;padding-left: 5px;">{{mechanicLoc.display_name}}<br>
Price : {{mechanicLoc.estimate}} Price : {{mechanicLoc.estimate}}
</div> </div>
</div> </div>
</agm-info-window> </agm-info-window>
</agm-marker> </agm-marker>
</agm-map> </agm-map>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<!-- QUOTES-MODAL-ENDS--> <!-- QUOTES-MODAL-ENDS-->
<!-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#confirm">Open Modal</button> --> <!-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#confirm">Open Modal</button> -->
...@@ -1012,35 +1050,35 @@ ...@@ -1012,35 +1050,35 @@
<div class="modal-dialog modal-full"> <div class="modal-dialog modal-full">
<div class="loader_overlay" *ngIf="loader"></div> <div class="loader_overlay" *ngIf="loader"></div>
<div class="modal-content login_modal_wrapper"> <div class="modal-content login_modal_wrapper">
<div class="modal_close" data-dismiss="modal"> × </div> <div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal"> <div class="modal-body quote_modal">
<div class="login_modal_content"> <div class="login_modal_content">
<div class="login_modal_inner"> <div class="login_modal_inner">
<h3>View quotes</h3> <h3>View quotes</h3>
<table width=100%> <table width=100%>
<thead> <thead>
<tr> <tr>
<th width= 20%;>Issues</th> <th width= 20%;>Issues</th>
<th>Description</th> <th>Description</th>
<th>Amount</th> <th>Amount</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let quote of mechCustQuote"> <tr *ngFor="let quote of mechCustQuote">
<td>{{quote.issue_category}}</td> <td>{{quote.issue_category}}</td>
<td>{{quote.description}}</td> <td>{{quote.description}}</td>
<td>{{quote.amount}}</td> <td>{{quote.amount}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="row"> <div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;"> <div class="col-md-12 textCenter" style="padding-top:40px;">
<button class="log_btn" data-dismiss="modal">Close</button> <button class="log_btn" data-dismiss="modal">Close</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -1051,23 +1089,23 @@ ...@@ -1051,23 +1089,23 @@
<div class="modal" id="success"> <div class="modal" id="success">
<div class="modal-dialog modal-full"> <div class="modal-dialog modal-full">
<div class="modal-content login_modal_wrapper"> <div class="modal-content login_modal_wrapper">
<div class="modal_close" data-dismiss="modal"> × </div> <div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal"> <div class="modal-body quote_modal">
<div class="login_modal_content"> <div class="login_modal_content">
<div class="login_modal_inner"> <div class="login_modal_inner">
<div class="login_success"> <div class="login_success">
<img src="assets/images/asset_success.png"> <img src="assets/images/asset_success.png">
<h4>Your Booking is success</h4> <h4>Your Booking is success</h4>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;"> <div class="col-md-12 textCenter" style="padding-top:40px;">
<button class="log_btn" data-dismiss="modal">Close</button> <button class="log_btn" data-dismiss="modal">Close</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -1079,23 +1117,23 @@ ...@@ -1079,23 +1117,23 @@
<div class="modal" id="failure"> <div class="modal" id="failure">
<div class="modal-dialog modal-full"> <div class="modal-dialog modal-full">
<div class="modal-content login_modal_wrapper"> <div class="modal-content login_modal_wrapper">
<div class="modal_close" data-dismiss="modal"> × </div> <div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal"> <div class="modal-body quote_modal">
<div class="login_modal_content"> <div class="login_modal_content">
<div class="login_modal_inner"> <div class="login_modal_inner">
<div class="login_success"> <div class="login_success">
<img src="assets/images/asset_error.png"> <img src="assets/images/asset_error.png">
<h4>Your Booking is failure</h4> <h4>Your Booking is failure</h4>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;"> <div class="col-md-12 textCenter" style="padding-top:40px;">
<button class="log_btn" data-dismiss="modal">Close</button> <button class="log_btn" data-dismiss="modal">Close</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -1106,9 +1144,9 @@ ...@@ -1106,9 +1144,9 @@
<div class="modal" id="confirm" > <div class="modal" id="confirm" >
<div class="modal-dialog modal-full"> <div class="modal-dialog modal-full">
<div class="modal-content background_transparent"> <div class="modal-content background_transparent">
<div class="modal-body quote_modal"> <div class="modal-body quote_modal">
<div class="confirm_modal_content"> <div class="confirm_modal_content">
<div class="login_modal_inner"> <div class="login_modal_inner">
<div class="login_success"> <div class="login_success">
<h4>Do You Want to Confirm ?</h4> <h4>Do You Want to Confirm ?</h4>
</div> </div>
...@@ -1118,9 +1156,9 @@ ...@@ -1118,9 +1156,9 @@
<button class="btn btn-danger" data-dismiss="modal">No</button> <button class="btn btn-danger" data-dismiss="modal">No</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -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: 16px; font-size: 13px;
} }
.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: 16px; font-size: 13px;
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
...@@ -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);
} }
......
...@@ -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(time,'0'); <input type="radio" value="{{time | date:'hh:mm a'}}" name="scheduleTime" (click)="getSchedule($event.target.value,'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(time,'0'); <input type="radio" value="{{time | date:'hh:mm a'}}" name="scheduleTime" (click)="getSchedule($event.target.value,'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(time,'1'); <input type="radio" value="{{time | date:'hh:mm a'}}" name="scheduleTime" (click)="getSchedule($event.target.value,'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>
......
...@@ -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;
......
...@@ -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>
......
...@@ -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: 180px; width: 140px;
} }
} }
.navbar-nav { .navbar-nav {
li { li {
margin-right: 30px; margin-right:20px;
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: 5px; padding-top: 8px;
padding-bottom: 5px; padding-bottom: 8px;
} }
} }
} }
...@@ -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;
} }
......
...@@ -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']);
} }
......
...@@ -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){
......
...@@ -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">
......
...@@ -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" >
......
...@@ -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;
......
...@@ -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_modal_id}}"> <option *ngFor="let models of carModel" [selected]="models.veh_model_id == carFilter['model']" value="{{models.veh_model_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">
......
...@@ -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);
})
}
} }
...@@ -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;
......
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()
] ]
}) })
......
...@@ -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();
......
...@@ -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>
......
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;
......
...@@ -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

8.05 KB | W: | H:

src/assets/images/asset_icon3.png

6.03 KB | W: | H:

src/assets/images/asset_icon3.png
src/assets/images/asset_icon3.png
src/assets/images/asset_icon3.png
src/assets/images/asset_icon3.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -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/';
......
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment