Commit 3c213c45 by Jansa Jose

dc

parent cc5934d6
......@@ -486,33 +486,40 @@
<input class="search" placeholder="Search Services" (keyup)="searchIssues($event)">
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="service_methods">
<p *ngIf="!issuesData; else listIssues">No Record Found</p>
<ng-template #listIssues>
<ul>
<div *ngFor="let issue_data of issuesData">
<li data-toggle="collapse" [attr.data-target]="'#issue_' + issue_data.issue_id">{{issue_data.issue}}</li>
<div class="service_list collapse" [attr.id]="'issue_' + issue_data.issue_id">
<ul>
<li *ngFor="let sub_issue_data of issue_data.sub_categories">
<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>
</label>
</button>
</li>
</ul>
</div>
</div>
</ul>
</ng-template>
<p *ngIf="!issuesData">No Record Found</p>
<!-- service-tabs-->
<div class="service_tab_inner" *ngIf="issuesData">
<div class="row">
<div class="col col-6">
<div class="arrow_btn up_arrow" (click)="scrollToTop('issue_cntr')"></div>
<ul class="nav services_tab" id="issue_cntr">
<li class="nav-item" *ngFor="let issue_data of issuesData; let i = index;">
<a [ngClass]="(i == 0)?'nav-link text_truncate active':'nav-link text_truncate'" data-toggle="pill" [attr.href]="'#issue_'+issue_data.issue_id"><img src="../../../assets/images/default.png">{{issue_data.issue}}</a>
</li>
</ul>
<div class="arrow_btn down_arrow" (click)="scrollToBottom('issue_cntr')"></div>
</div>
<div class="col col-6">
<div class="arrow_btn"></div>
<div class="tab-content backgroundColor">
<div *ngFor="let issue_data of issuesData; let i = index;" [ngClass]="(i == 0)?'tab-pane container active':'tab-pane container'" [attr.id]="'issue_'+issue_data.issue_id">
<ul malihu-scrollbar [scrollbarOptions]="scrollbarOptions" [attr.id]="'sub_issue_cntr_'+issue_data.issue_id">
<li *ngFor="let sub_issue_data of issue_data.sub_categories">
<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>
</label>
</button>
</li>
</ul>
</div>
</div>
<div class="arrow_btn"></div>
</div>
</div>
</div>
<br>
<div class="row">
<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>
......@@ -573,7 +580,10 @@
<h3>SUMMARY</h3>
<div class="row">
<div class="col-md-12">
<h6 class="pt10 textLeft">Issues</h6>
<!-- <h6 class="pt10 textLeft">Issues</h6> -->
<div class="wizard_subhead">
Issues Spoted
</div>
</div>
</div>
<div class="row">
......@@ -581,18 +591,24 @@
<div class="selected_services">
<ul>
<li *ngFor="let selIssue of selectedIssues">{{selIssue.issue_category}}<a (click)="removeSelectedItem(selIssue.issue_id,selIssue.sub_issue_id)">&times;</a></li>
<a goToStep="0"><li class="add_more_services">Add more Services</li></a>
<input #goTostep1 type="hidden" goToStep="0">
</ul>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h6 class="pt10 textLeft"><a goToStep="0">Add more services</a></h6>
<input #goTostep1 type="hidden" goToStep="0">
<div class="wizard_subhead">
Location
</div>
</div>
</div>
<div class="row">
<input #newGoogleLocSearch placeholder="Enter Location" autocorrect="off" autocapitalize="off" spellcheck="off" type="text" [ngModel]="(wizardData && wizardData.pickup_data && wizardData.pickup_data.pickup_loc)?wizardData.pickup_data.pickup_loc:''" (keyup)="googlesearchLocError = false;" (ngModelChange)="get_newlocaion(newGoogleLocSearch.value)" [attr.value]="(wizardData && wizardData.pickup_data && wizardData.pickup_data.pickup_loc)?wizardData.pickup_data.pickup_loc:''">
<div class="col-md-12">
<input #newGoogleLocSearch placeholder="Enter Location" autocorrect="off" autocapitalize="off" spellcheck="off" type="text" [ngModel]="(wizardData && wizardData.pickup_data && wizardData.pickup_data.pickup_loc)?wizardData.pickup_data.pickup_loc:''" (keyup)="googlesearchLocError = false;" (ngModelChange)="get_newlocaion(newGoogleLocSearch.value)" [attr.value]="(wizardData && wizardData.pickup_data && wizardData.pickup_data.pickup_loc)?wizardData.pickup_data.pickup_loc:''">
</div>
</div>
<div class="row">
<div class="col-md-6">
......
......@@ -98,6 +98,8 @@ export class DashboardComponent implements OnInit {
@ViewChild("serviceHistoryTab") public serviceHistoryTabRef: ElementRef;
@ViewChild("closeVehicleAddForm") public closeVehicleAddFormRef: ElementRef;
public scrollbarOptions = { axis: 'y', theme: 'minimal-dark' };
constructor(private router : Router,
public ngZone : NgZone,
private route : ActivatedRoute,
......@@ -257,6 +259,7 @@ export class DashboardComponent implements OnInit {
}
});
}
console.log(thisObj.selectedIssues);
this.calculateEstimate();
}
......@@ -547,14 +550,22 @@ export class DashboardComponent implements OnInit {
this.issuesData = this.defIssuesData;
} else {
const thisObj = this;
let subCatArr: any;
let data: any[] = new Array();
let serRegExp = new RegExp(event.target.value,"gi");
thisObj.defIssuesData.forEach(function (issues,index) {
let issueCat = issues.issue;
if(issueCat.search(serRegExp) != -1){
data.push(thisObj.defIssuesData[index]);
} else {
subCatArr = issues.sub_categories;
subCatArr.forEach(function (issues_cat) {
let sub_issue_cat = issues_cat.issue_category;
if(sub_issue_cat.search(serRegExp) != -1){
data.push(thisObj.defIssuesData[index]);
}
});
}
});
this.issuesData = (data.length > 0)?data:false;
......@@ -758,6 +769,10 @@ export class DashboardComponent implements OnInit {
this.optionalDescription = '';
}
scrollToTop(id){
$('#'+id).stop().animate({scrollTop: 0}, 800);
}
scrollToBottom(id){
$('#'+id).stop().animate({scrollTop: $('#'+id)[0].scrollHeight}, 1500);
}
......
......@@ -484,6 +484,7 @@
padding:8px;
padding-left:15px;
border-radius: 8px;
padding-right: 35px !important;
color: #272a31;
background-image: url("../../../assets/images/asset_arrow.png");
background-size: 17px;
......@@ -503,6 +504,9 @@
}
}
}
.backgroundColor{
background: #f2f2f275;
}
.tab-content{
padding-top: 10px;
padding-bottom: 10px;
......@@ -770,6 +774,7 @@
padding: 5px;
margin-bottom: 10px;
padding-left: 15px;
background-image: url("/assets/images/asset_down_time_arrow.png");
background-position: right 5px top 2px;
background-repeat: no-repeat;
......
......@@ -107,9 +107,6 @@ export class IndexComponent implements OnInit {
}
ngOnInit() {
// this.wizardModalTrrigerInput.nativeElement.click();
this.vehicleDataForm = new FormGroup({
trim: new FormControl(''), milage: new FormControl(''), emgine: new FormControl(''),
last_date: new FormControl(''),
......@@ -222,14 +219,22 @@ export class IndexComponent implements OnInit {
this.issuesData = this.defIssuesData;
} else {
const thisObj = this;
let subCatArr: any;
let data: any[] = new Array();
let serRegExp = new RegExp(event.target.value,"gi");
thisObj.defIssuesData.forEach(function (issues,index) {
let issueCat = issues.issue;
if(issueCat.search(serRegExp) != -1){
data.push(thisObj.defIssuesData[index]);
} else {
subCatArr = issues.sub_categories;
subCatArr.forEach(function (issues_cat) {
let sub_issue_cat = issues_cat.issue_category;
if(sub_issue_cat.search(serRegExp) != -1){
data.push(thisObj.defIssuesData[index]);
}
});
}
});
this.issuesData = (data.length > 0)?data:false;
......@@ -243,10 +248,8 @@ export class IndexComponent implements OnInit {
}
get_newlocaion(lastLoc){
this.cfautocomplete.addListener("place_changed", () => {
console.log('ffdf');
this.ngZone.run(() => {
let places: google.maps.places.PlaceResult = this.cfautocomplete.getPlace();
console.log(places);
if (places == undefined || places == null || places === undefined || places === null ||
places.geometry == undefined || places.geometry == null || places.geometry === undefined || places.geometry === null ||
places.formatted_address == undefined || places.formatted_address == null || places.formatted_address === undefined || places.formatted_address === null) {
......@@ -259,7 +262,6 @@ export class IndexComponent implements OnInit {
'pickup_lat':places.geometry.location.lat(),
'pickup_lng':places.geometry.location.lng()
};
console.log(this.wizardData);
this.addresssearchLocError = false;
this.lat = places.geometry.location.lat();
this.lng = places.geometry.location.lng();
......
......@@ -48,6 +48,12 @@
padding:0px !important;
}
.text_truncate{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
button {
cursor: pointer;
&:focus {
......
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