Commit 6472a2ef by Tobin

Merge branch 'jensa' into 'master'

Jensa See merge request !18
parents 9dbeeb20 430c84e9
......@@ -6,7 +6,7 @@ const routes: Routes = [
];
@NgModule({
imports: [RouterModule.forRoot(routes, { useHash: false })],
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
......@@ -28,7 +28,7 @@
<li class="nav-item">
<a class="nav-link time" data-toggle="tab" href="#service" #serviceHistoryTab>
Service History
<!-- <div class="notification">02</div> -->
<div class="notification" *ngIf="bookingDetails">{{ bookingDetails?.length || '0' }}</div>
</a>
</li>
</ul>
......@@ -514,7 +514,7 @@
<button id="custom_check_button">
<label>
<input type="checkbox" name="services" [attr.id]="'issue_' + issue_data.issue_id + '_' + sub_issue_data.issue_cat_id" [attr.issue_id]="issue_data.issue_id" [attr.sub_issue_id]="sub_issue_data.issue_cat_id" (click)="setIssueSelected($event)">
<p>{{sub_issue_data.issue_category}}</p>
<p class="text_truncate">{{sub_issue_data.issue_category}}</p>
</label>
</button>
</li>
......@@ -621,7 +621,15 @@
<input placeholder="LAST MAINTENANCE DATE" type="" bsDatepicker name="dob" [ngModel]="" (ngModelChange)="get_newdate($event)">
</div>
<div class="col-md-6">
<input placeholder="APPROX VEHICLE MILEAGE" type="" [ngModel]="milage" (ngModelChange)="get_newmilage($event)">
<input placeholder="APPROX VEHICLE MILEAGE" type="" [ngModel]="testMilage" (ngModelChange)="get_newmilage($event)">
</div>
</div>
<div class="row">
<div class="col-md-6">
<select *ngIf="(wizardData && wizardData.vechile_info)" (change)=get_newmaintanence_date($event)>
<option value="" class="hide">MAINTENANCE INTERVALS</option>
<option *ngFor="let date of monthArray;let i = index;" [attr.value]="i+1" [selected]="(wizardData && wizardData.vechile_info && wizardData.vechile_info.maintanenceInterval)? wizardData.vechile_info.maintanenceInterval == i+1 :''">{{i+1}}{{(i === 0)?' Month':' Months'}}</option>
</select>
</div>
</div>
<div class="row">
......@@ -647,7 +655,7 @@
<div class="modal" id="quotes">
<div class="modal-dialog modal-full">
<div class="modal-content login_modal_wrapper">
<div class="modal-content login_modal_wrapper" malihu-scrollbar [scrollbarOptions]="scrollbarOptions">
<div #closeQuoteWizard class="modal_close" data-dismiss="modal" (click)="scheduleDateInit = false; scheduleMechanic = false">
&times;
</div>
......@@ -680,8 +688,8 @@
</div>
</div>
<div class="quote_schedule_list">
<ul>
<li *ngFor="let mechanic of mechanicData">
<ul malihu-scrollbar [scrollbarOptions]="scrollbarOptions">
<li *ngFor="let mechanic of mechanicData; let i = index;">
<div class="row">
<div class="col-md-6 pr0">
<div class="mechanic_profile">
......@@ -691,8 +699,8 @@
<img src="{{imageServer + mechanic.profile_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div>
<div class="mechanic_ratting">
<p>4 Ratings</p>
<h6>6 Reviews</h6>
<p *ngIf="mechanic.rating > 0">{{mechanic.rating}} Ratings</p>
</div>
</div>
<div class="mechanic_detail">
......@@ -701,12 +709,12 @@
<h5>{{mechanic.shop_name}}</h5>
<p>{{mechanic.shop_address}}</p>
<h6>{{mechanic.shop_phone}}</h6>
<p>{{mechanic.distance | number:'1.2-2'}} Away from you</p>
<p>{{mechanic.distance | number:'1.2-2'}} miles away from you</p>
</div>
<ng-template #mechanicDetails>
<p>{{mechanic.address}}<br>{{mechanic.city+' , '+mechanic.state}}</p>
<h6>{{mechanic.phone}}</h6>
<p>{{mechanic.distance | number:'1.2-2'}}</p>
<p>{{mechanic.distance | number:'1.2-2'}} miles away from you</p>
</ng-template>
<button (click)="scheduleNow(mechanic.mechanic_id,mechanic.estimate)"
[ngClass]="{'book_now':scheduleDateInit == true && scheduleMechanic == mechanic.mechanic_id,
......@@ -746,7 +754,7 @@
</div>
<div class="col-md-6">
<div class="scheduletiming_listing">
<ul id="scroll_0_{{mechanic.mechanic_id}}">
<ul id="scroll_0_{{i}}">
<li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button">
<label>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'0');
......@@ -755,7 +763,7 @@
</label>
</li>
</ul>
<ul id="scroll_1_{{mechanic.mechanic_id}}">
<ul id="scroll_1_{{i}}">
<li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button">
<label>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'1');
......@@ -766,8 +774,8 @@
</ul>
</div>
<div class="scheduletiming_btm_btns">
<div class="btm_btns" (click)="scrollToBottom('scroll_0_'+mechanic.mechanic_id)"></div>
<div class="btm_btns" (click)="scrollToBottom('scroll_1_'+mechanic.mechanic_id)"></div>
<div class="btm_btns" (click)="scrollToBottom('scroll_0_'+i)"></div>
<div class="btm_btns" (click)="scrollToBottom('scroll_1_'+i)"></div>
</div>
</div>
</div>
......@@ -799,7 +807,7 @@
<div style="float:right;width:calc(100% - 30px); white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;padding-left: 5px;">{{mechanicLoc.display_name}}<br>
{{mechanicLoc.estimate}}
Price : {{mechanicLoc.estimate}}
</div>
</div>
......
......@@ -1125,11 +1125,13 @@
}
}
.quote_schedule_header {
background: #f9f7f7;
border: 1px solid #e8e8e8;
border: 1px solid #2655bf;
h4 {
background: #2655bf;
margin: 0px;
color: #1e1e1e;
color: #fff;
font-size: 18px;
padding: 10px;
}
......@@ -1262,7 +1264,7 @@
margin: 0px;
padding: 0px;
color: #767676;
font-size: 16px;
font-size: 14px;
line-height: 20px;
padding-top: 5px;
}
......@@ -1281,7 +1283,8 @@
border: 1px solid #898989;
color: #898989;
background: transparent;
margin: 5px;
margin: 0px;
margin-top: 15px;
padding-left: 15px;
padding-right: 15px;
border-radius: 20px;
......@@ -1296,26 +1299,31 @@
border: 1px solid #2655bf;
color: #2655bf;
background: transparent;
margin: 5px;
margin: 0px;
padding-left: 15px;
padding-right: 15px;
border-radius: 20px;
height: 35px;
width:100%;
font-size: 14px;
margin-top: 15px;
&:focus {
outline: none;
}
}
.book_now_disabled {
float: right;
margin-top:10px;
border: 1px solid #808080;
color: #808080;
background: transparent;
margin: 5px;
margin: 0px;
padding-left: 15px;
padding-right: 15px;
border-radius: 20px;
height: 35px;
margin-top: 15px;
width:100%;
font-size: 14px;
&:focus {
outline: none;
......
......@@ -23,6 +23,7 @@ export class DashboardComponent implements OnInit {
imageUrl: any;
user_name: string;
vehDetails: any;
testMilage: any = '';
errMessage: any;
editProfile;
loginDetails: any;
......@@ -39,6 +40,7 @@ export class DashboardComponent implements OnInit {
cfautocomplete: any;
carModel: any;
modelDates: number[] = new Array();
monthArray: any[] = new Array(12);
carSearchJsonData: any;
vehicleVinAddForm;
......@@ -115,6 +117,7 @@ export class DashboardComponent implements OnInit {
this.activeTab = 'profile';
this.errMessage = false;
this.vehDetails = false;
this.imageServer = ImageStorage;
this.searchLocError = false;
this.showLeftArrow = false;
this.showRightArrow = true;
......@@ -192,6 +195,10 @@ export class DashboardComponent implements OnInit {
});
});
this.nextDate.setDate(this.nextDate.getDate() + 1);
$('.modal-backdrop').remove();
$('body').attr('class','');
$('body').attr('style','');
}
getCustBookDetails(){
......@@ -259,7 +266,6 @@ export class DashboardComponent implements OnInit {
}
});
}
console.log(thisObj.selectedIssues);
this.calculateEstimate();
}
......@@ -304,6 +310,10 @@ export class DashboardComponent implements OnInit {
this.wizardData['vechile_info']['milage']=event;
}
get_newmaintanence_date(newdate){
this.wizardData['vechile_info']['maintanenceInterval']=newdate.target.value;
}
removeSelectedItem(issue_id,sub_issue_id){
let index = this.selectedIssues.findIndex(x => x.sub_issue_id == sub_issue_id);
if(index > -1){
......@@ -521,7 +531,9 @@ export class DashboardComponent implements OnInit {
thisObj.wizardData['vechile_info'] = {'trim':'','milage':'','emgine':'',
'maker':vehData.car_maker,
'modelName':vehData.car_model,
'modelYear':vehData.car_model_year}
'modelYear':vehData.car_model_year,
'maintanenceInterval':vehData.maintanence_interval}
console.log(thisObj.wizardData['vechile_info']);
}
});
this.getIssueData();
......@@ -627,7 +639,7 @@ export class DashboardComponent implements OnInit {
thisObj.selectedIssues.forEach(function (selIssues) {
selSubIssues.push(selIssues.sub_issue_id);
});
console.log(this.wizardData.pickup_data)
console.log(this.wizardData)
let searchData = {'pickup_data':this.wizardData.pickup_data,'sub_issues':selSubIssues}
this.webService.post_data('getNearByMechanics',searchData).subscribe(response => {
if(response.status == '1'){
......
......@@ -31,7 +31,7 @@ import { ForgotComponent } from './forgot/forgot.component';
BsDatepickerModule.forRoot(),
MalihuScrollbarModule.forRoot(),
AgmCoreModule.forRoot({
apiKey: 'AIzaSyCaczDjLVYU1vZH0HXkbU5ugsUHoWNE2NM',
apiKey: 'AIzaSyAd3eUTU8Y3w0qemOuaRw1IXoACbeyjBJQ',
libraries: ["places"]
})
]
......
......@@ -292,7 +292,13 @@
<div class="row">
<div class="col-md-6">
<input formControlName="last_date" placeholder="LAST MAINTENANCE DATE" type="text" class="form-control date"
bsDatepicker name="dob" autocomplete="off">
bsDatepicker name="dob">
</div>
<div class="col-md-6">
<select formControlName="maintanence_interval">
<option value="" class="hide">MAINTENANCE INTERVALS</option>
<option *ngFor="let date of monthArray;let i = index;" [value]="i+1">{{i+1}}{{(i === 0)?' Month':' Months'}}</option>
</select>
</div>
</div>
<div class="row">
......@@ -339,7 +345,7 @@
<button id="custom_check_button">
<label>
<input type="checkbox" name="services" [attr.id]="'issue_' + issue_data.issue_id + '_' + sub_issue_data.issue_cat_id" [attr.issue_id]="issue_data.issue_id" [attr.sub_issue_id]="sub_issue_data.issue_cat_id" (click)="setIssueSelected($event)">
<p>{{sub_issue_data.issue_category}}</p>
<p class="text_truncate">{{sub_issue_data.issue_category}}</p>
</label>
</button>
</li>
......@@ -449,6 +455,14 @@
</div>
</div>
<div class="row">
<div class="col-md-6">
<select *ngIf="(wizardData && wizardData.vechile_info && wizardData.vechile_info.maintanenceInterval)" (change)=get_newmaintanence_date($event)>
<option value="" class="hide">MAINTENANCE INTERVALS</option>
<option *ngFor="let date of monthArray;let i = index;" [attr.value]="i+1" [selected]="wizardData.vechile_info.maintanenceInterval == i+1">{{i+1}}{{(i === 0)?' Month':' Months'}}</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-12 textCenter">
<button *ngIf="!loginDetails" (click)="resetForm()" class="wizard_signin floatLeft" type="button" data-toggle="modal" data-target="#login">SIGN IN</button>
<button (click)="getQuote()" class="wizard_quotes floatRight" type="button" data-toggle="modal" data-target="#quotes">VIEW SERVICE QUOTE</button>
......@@ -508,7 +522,7 @@
</div>
<div class="quote_schedule_list">
<ul malihu-scrollbar [scrollbarOptions]="scrollbarOptions">
<li *ngFor="let mechanic of mechanicData">
<li *ngFor="let mechanic of mechanicData; let i = index;">
<div class="row">
<div class="col-md-6 pr0">
<div class="mechanic_profile">
......@@ -518,7 +532,7 @@
<img src="{{imageServer + mechanic.profile_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div>
<div class="mechanic_ratting">
<p>4/5 Ratings</p>
<p *ngIf="mechanic.rating > 0">{{mechanic.rating}} Ratings</p>
</div>
</div>
......@@ -528,12 +542,12 @@
<h5>{{mechanic.shop_name}}</h5>
<p>{{mechanic.shop_address}}</p>
<h6>{{mechanic.shop_phone}}</h6>
<p>{{mechanic.distance | number:'1.2-2' }} Away from you</p>
<p>{{mechanic.distance | number:'1.2-2' }} miles away from you</p>
</div>
<ng-template #mechanicDetails>
<p>{{mechanic.address}}<br>{{mechanic.city+' , '+mechanic.state}}</p>
<h6>{{mechanic.phone}}</h6>
<p>{{mechanic.distance | number:'1.2-2' }}</p>
<p>{{mechanic.distance | number:'1.2-2' }} miles away from you</p>
</ng-template>
<button (click)="scheduleNow(mechanic.mechanic_id,mechanic.estimate)" [ngClass]="{'book_now':scheduleDateInit == true && scheduleMechanic == mechanic.mechanic_id,
'book_now_disabled':scheduleDateInit == false || (scheduleDateInit == true && scheduleMechanic != mechanic.mechanic_id)}">
......@@ -572,7 +586,7 @@
<div class="col-md-6">
<div class="scheduletiming_listing">
<!-- <ul id="scroll_0_{{mechanic.mechanic_id}}" malihu-scrollbar [scrollbarOptions]="scrollbarOptions"> -->
<ul id="scroll_0_{{mechanic.id}}">
<ul id="scroll_0_{{i}}">
<li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button">
<label>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'0');
......@@ -581,7 +595,7 @@
</label>
</li>
</ul>
<ul id="scroll_1_{{mechanic.id}}">
<ul id="scroll_1_{{i}}">
<li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button">
<label>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'1');
......@@ -592,8 +606,8 @@
</ul>
</div>
<div class="scheduletiming_btm_btns">
<div class="btm_btns" (click)="scrollToBottom('scroll_0_'+mechanic.id)"></div>
<div class="btm_btns" (click)="scrollToBottom('scroll_1_'+mechanic.id)"></div>
<div class="btm_btns" (click)="scrollToBottom('scroll_0_'+i)"></div>
<div class="btm_btns" (click)="scrollToBottom('scroll_1_'+i)"></div>
</div>
</div>
</div>
......@@ -622,7 +636,7 @@
<div style="float:right;width:calc(100% - 30px); white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;padding-left: 5px;">{{mechanicLoc.display_name}}<br>
{{mechanicLoc.estimate}}
Price : {{mechanicLoc.estimate}}
</div>
</div>
</agm-info-window>
......
......@@ -1065,7 +1065,7 @@
margin: 0px;
padding: 0px;
color: #767676;
font-size: 16px;
font-size: 14px;
line-height: 20px;
padding-top: 5px;
}
......@@ -1084,12 +1084,13 @@
border: 1px solid #898989;
color: #898989;
background: transparent;
margin: 5px;
margin: 0px;
padding-left: 15px;
padding-right: 15px;
border-radius: 20px;
height: 35px;
font-size: 14px;
margin-top: 15px;
&:focus {
outline: none;
}
......@@ -1099,11 +1100,13 @@
border: 1px solid #2655bf;
color: #2655bf;
background: transparent;
margin: 5px;
margin: 0px;
padding-left: 15px;
padding-right: 15px;
border-radius: 20px;
height: 35px;
width:100%;
margin-top: 15px;
font-size: 14px;
&:focus {
outline: none;
......@@ -1114,12 +1117,14 @@
border: 1px solid #808080;
color: #808080;
background: transparent;
margin: 5px;
margin: 0px;
padding-left: 15px;
padding-right: 15px;
border-radius: 20px;
height: 35px;
width:100%;
font-size: 14px;
margin-top: 15px;
&:focus {
outline: none;
}
......
......@@ -58,6 +58,7 @@ export class IndexComponent implements OnInit {
issuesData: any;
defIssuesData: any[] = new Array();
selectedIssues: any[] = new Array();
monthArray: any[] = new Array(12);
public scrollbarOptions = { axis: 'y', theme: 'minimal-dark' };
......@@ -110,6 +111,7 @@ export class IndexComponent implements OnInit {
this.vehicleDataForm = new FormGroup({
trim: new FormControl(''), milage: new FormControl(''), emgine: new FormControl(''),
last_date: new FormControl(''),
maintanence_interval: new FormControl(''),
maker: new FormControl('', [Validators.required]),
modelYear: new FormControl('', [Validators.required]),
modelName: new FormControl('', [Validators.required])
......@@ -145,6 +147,10 @@ export class IndexComponent implements OnInit {
this.featuredOn = {grid: {xs: 1, sm: 2 , md: 5, lg: 6, all: 0},slide: 1, speed: 400, animation: 'lazy',point: { visible: false },load: 2, touch: true, easing: 'ease'}
this.carouselTile = {grid: {xs: 1, sm: 2 , md: 3, lg: 3, all: 0},slide: 1, speed: 400, animation: 'lazy',point: { visible: false },load: 2, touch: true, easing: 'ease'}
this.nextDate.setDate(this.nextDate.getDate() + 1);
$('.modal-backdrop').remove();
$('body').attr('class','');
$('body').attr('style','');
}
get_model(event) {
......@@ -190,9 +196,10 @@ export class IndexComponent implements OnInit {
'lastMaintanceDate':(vehicleData['last_date'])?(formatDate(vehicleData['last_date'],'MM/dd/yyyy','en')):'',
'maker':this.carSearchJsonData[vehicleData['maker']]['brand'],
'milage':vehicleData['milage'],'emgine':vehicleData['emgine'],
'modelName':vehicleData['modelName'],'modelYear':vehicleData['modelYear']
'modelName':vehicleData['modelName'],'modelYear':vehicleData['modelYear'],
'maintanenceInterval':vehicleData['maintanence_interval']
}
console.log(this.wizardData['vechile_info'])
this.vehicleDataFormSubmit = false;
}
......@@ -277,6 +284,10 @@ export class IndexComponent implements OnInit {
this.wizardData['vechile_info']['milage']=milage;
}
get_newmaintanence_date(newdate){
this.wizardData['vechile_info']['maintanenceInterval']=newdate.target.value;
}
setIssueSelected(event){
let issue_id = event.target.attributes.issue_id.value;
let sub_issue_id = event.target.attributes.sub_issue_id.value;
......@@ -344,7 +355,7 @@ export class IndexComponent implements OnInit {
this.optionalDescription = '';
}
getQuote(location){
getQuote(){
const thisObj = this;
this.loader = true;
......@@ -352,7 +363,7 @@ export class IndexComponent implements OnInit {
thisObj.selectedIssues.forEach(function (selIssues) {
selSubIssues.push(selIssues.sub_issue_id);
});
console.log(this.wizardData)
let searchData = {'pickup_data':this.wizardData.pickup_data,'sub_issues':selSubIssues}
this.webService.post_data('getNearByMechanics',searchData).subscribe(response => {
if(response.status == '1'){
......
......@@ -174,24 +174,30 @@ export class NavbarComponent implements OnInit {
let funcName = 'service_provider_registration';
this.webService.post_data(funcName,data).subscribe(response => {
this.loader = false;
console.log(response);
if(response.status == '1'){
response.status = 'success';
response.message = 'Your Account has been created, Whenever it Activates will inform you.';
this.spSignupResponse = response;
setTimeout( function() {
This.spSignupResponse = false;
This.spModal.nativeElement.click();
This.resetForm();
}, 3000);
}else{
response.status = 'error';
response.message = (response.message == '')?this.errorMsg.errorList.req_failure:response.message;
this.spSignupResponse = response;
setTimeout( function() {
This.spSignupResponse = false;
}, 3000);
}
},error => {
this.spSignupResponse = {'status':'error','message':this.errorMsg.errorList.req_failure};
},() => {
setTimeout( function() {
This.spSignupResponse = false;
This.spModal.nativeElement.click();
}, 4000)
}, 3000);
});
}
......
......@@ -11,6 +11,6 @@
</head>
<body>
<app-root></app-root>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCaczDjLVYU1vZH0HXkbU5ugsUHoWNE2NM&libraries=places"></script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAd3eUTU8Y3w0qemOuaRw1IXoACbeyjBJQ&libraries=places"></script>
</body>
</html>
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