Commit e72f456b by Jansa Jose

dc

parent 91a4535f
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Order no</th> <th>Orders</th>
<th>Order Date</th> <th>Order Date</th>
<th>Vehicle</th> <th>Vehicle</th>
<th>Mechanic</th> <th>Mechanic</th>
...@@ -232,8 +232,8 @@ ...@@ -232,8 +232,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let bookData of successBookDtls"> <tr *ngFor="let bookData of successBookDtls; let i = index">
<td>{{bookData.booking_id}}</td> <td>{{i+1}}</td>
<td>{{bookData.scheduled_date+' '+bookData.scheduled_time}}</td> <td>{{bookData.scheduled_date+' '+bookData.scheduled_time}}</td>
<td>{{bookData.car_name}}</td> <td>{{bookData.car_name}}</td>
<td>{{bookData.first_name+' '+bookData.last_name}}</td> <td>{{bookData.first_name+' '+bookData.last_name}}</td>
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Order no</th> <th>Orders</th>
<th>Order Date</th> <th>Order Date</th>
<th>Vehicle</th> <th>Vehicle</th>
<th>Mechanic</th> <th>Mechanic</th>
...@@ -282,8 +282,9 @@ ...@@ -282,8 +282,9 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let bookData of bookingDetails"> <tr *ngFor="let bookData of bookingDetails;let i = index">
<td>{{bookData.booking_id}}</td> <!-- <td>{{bookData.booking_id}}</td> -->
<td>{{i+1}}</td>
<td>{{bookData.scheduled_date+' '+bookData.scheduled_time}}</td> <td>{{bookData.scheduled_date+' '+bookData.scheduled_time}}</td>
<td>{{bookData.car_name}}</td> <td>{{bookData.car_name}}</td>
<td>{{bookData.first_name+' '+bookData.last_name}}</td> <td>{{bookData.first_name+' '+bookData.last_name}}</td>
...@@ -595,10 +596,10 @@ ...@@ -595,10 +596,10 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<input placeholder="LAST MAINTENANCE DATE" type="" bsDatepicker name="dob" [ngModel]=""> <input placeholder="LAST MAINTENANCE DATE" type="" bsDatepicker name="dob" [ngModel]="" (ngModelChange)="get_newdate($event)">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<input placeholder="APPROX VEHICLE MILEAGE" type="" [attr.value]=""> <input placeholder="APPROX VEHICLE MILEAGE" type="" [ngModel]="milage" (ngModelChange)="get_newmilage($event)">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
......
...@@ -7,6 +7,7 @@ import { MapsAPILoader } from '@agm/core'; ...@@ -7,6 +7,7 @@ import { MapsAPILoader } from '@agm/core';
import { SubjectService } from './../../provider/subject.service'; import { SubjectService } from './../../provider/subject.service';
import { google } from '@google/maps'; import { google } from '@google/maps';
import { ImageStorage } from '../../../environments/server.config'; import { ImageStorage } from '../../../environments/server.config';
import { formatDate } from '@angular/common';
declare var $; declare var $;
declare const google: any; declare const google: any;
...@@ -198,6 +199,7 @@ export class DashboardComponent implements OnInit { ...@@ -198,6 +199,7 @@ export class DashboardComponent implements OnInit {
this.bookingDetails = response.bookData; this.bookingDetails = response.bookData;
let successBooking: any[] = new Array(); let successBooking: any[] = new Array();
this.bookingDetails.forEach(function (booking) { this.bookingDetails.forEach(function (booking) {
if(booking.status == 1){ if(booking.status == 1){
successBooking.push(booking); successBooking.push(booking);
...@@ -291,6 +293,14 @@ export class DashboardComponent implements OnInit { ...@@ -291,6 +293,14 @@ export class DashboardComponent implements OnInit {
}) })
} }
get_newdate(lastdate){
this.wizardData['vechile_info']['lastMaintanceDate']=formatDate(lastdate,'MM/dd/yyyy','en');
}
get_newmilage(event){
this.wizardData['vechile_info']['milage']=event;
}
removeSelectedItem(issue_id,sub_issue_id){ removeSelectedItem(issue_id,sub_issue_id){
let index = this.selectedIssues.findIndex(x => x.sub_issue_id == sub_issue_id); let index = this.selectedIssues.findIndex(x => x.sub_issue_id == sub_issue_id);
if(index > -1){ if(index > -1){
...@@ -557,6 +567,41 @@ export class DashboardComponent implements OnInit { ...@@ -557,6 +567,41 @@ export class DashboardComponent implements OnInit {
},500); },500);
} }
// searchIssues(event){
// if(event.target.value == '' || event.target.value == 'undefined' || event.target.value == undefined || event.target.value == 'null' || event.target.value == null ){
// this.issuesData = this.defIssuesData;
// } else {
// const thisObj = this;
// let data: any[] = new Array();
// let serRegExp = new RegExp(event.target.value,"gi");
// thisObj.defIssuesData.forEach(function (issues,index) {
// let issueCat = issues.issue;
// let subIssueCat =issues.sub_categories;
// if(issueCat.search(serRegExp) != -1){
// thisObj.defIssuesData['exception'] = '0';
// data.push(thisObj.defIssuesData[index]);
// }else {
// issues.sub_categories.forEach(function (issues_cat_1,index_1) {
// let subIssueCat = issues_cat_1.issue_category;
// if(subIssueCat.search(serRegExp) != -1){
// thisObj.defIssuesData['exception'] = '1';
// data.push(thisObj.defIssuesData[index]);
// // console.log(thisObj.defIssuesData[index].sub_categories[index_1])
// }
// })
// }
// });
// console.log(thisObj.defIssuesData);
// this.issuesData = (data.length > 0)?data:false;
// }
// setTimeout(()=>{
// this.selectedIssues.forEach(function (issues) {
// $('[id="issue_'+issues.issue_id+'_'+issues.sub_issue_id+'"]').prop('checked', true);
// });
// },500);
// }
jumpToStep3(){ jumpToStep3(){
if(this.selectedIssues.length != 0){ if(this.selectedIssues.length != 0){
this.step3nextRef.nativeElement.click(); this.step3nextRef.nativeElement.click();
......
...@@ -424,10 +424,10 @@ ...@@ -424,10 +424,10 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<input placeholder="LAST MAINTENANCE DATE" type="" bsDatepicker name="dob" [ngModel]="(wizardData && wizardData.vechile_info && wizardData.vechile_info.lastMaintanceDate)?wizardData.vechile_info.lastMaintanceDate:''"> <input placeholder="LAST MAINTENANCE DATE" type="" bsDatepicker name="dob" [ngModel]="(wizardData && wizardData.vechile_info && wizardData.vechile_info.lastMaintanceDate)?wizardData.vechile_info.lastMaintanceDate:''" (ngModelChange)="get_newdate($event)">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<input placeholder="APPROX VEHICLE MILEAGE" type="" [attr.value]="(wizardData && wizardData.vechile_info && wizardData.vechile_info.milage)?wizardData.vechile_info.milage:''"> <input placeholder="APPROX VEHICLE MILEAGE" type="" [ngModel]="(wizardData && wizardData.vechile_info && wizardData.vechile_info.milage)?wizardData.vechile_info.milage:''" (ngModelChange)="get_newmilage($event)">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
......
...@@ -1115,7 +1115,7 @@ ...@@ -1115,7 +1115,7 @@
.service_map { .service_map {
width: 100%; width: 100%;
border: 1px solid #e8e8e8; border: 1px solid #e8e8e8;
height: 5450px; height: 545px;
margin-top: 10px; margin-top: 10px;
} }
} }
......
...@@ -260,6 +260,15 @@ export class IndexComponent implements OnInit { ...@@ -260,6 +260,15 @@ export class IndexComponent implements OnInit {
}); });
}) })
} }
get_newdate(lastdate){
this.wizardData['vechile_info']['lastMaintanceDate']=formatDate(lastdate,'MM/dd/yyyy','en');
}
get_newmilage(milage){
this.wizardData['vechile_info']['milage']=milage;
}
setIssueSelected(event){ setIssueSelected(event){
let issue_id = event.target.attributes.issue_id.value; let issue_id = event.target.attributes.issue_id.value;
let sub_issue_id = event.target.attributes.sub_issue_id.value; let sub_issue_id = event.target.attributes.sub_issue_id.value;
......
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