Commit b1d5e5df by Jansa Jose

Merge branch 'master' of https://gitlab.techware.co.in/tobin/dcarfixers_angular

# Conflicts: # src/app/purchase/orders/orders.component.html
parents d2cb296d 92309bdb
{
// 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
......@@ -36,10 +36,10 @@
<h5>DISCOVER</h5>
<ul>
<li>
<a>How it works</a>
<a (click)="howitwrks()">How it works</a>
</li>
<li>
<a>Sign Up</a>
<a (click)="signUp()">Sign Up</a>
</li>
<li>
<a>Guarantee</a>
......@@ -75,6 +75,7 @@
</li>
</ul>
</div>
<input type="hidden" #indexLoginModal data-toggle="modal" data-target="#login">
<div class="col-md-2">
<h5>DOWNLOAD NOW</h5>
<div class="appstore">
......
import { Component, OnInit } from '@angular/core';
import { Component, OnInit , ViewChild, ElementRef } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router';
import { WebService } from './../provider/web.service';
@Component({
selector: 'app-footer',
......@@ -8,18 +9,39 @@ import { Router,ActivatedRoute } from '@angular/router';
})
export class FooterComponent implements OnInit {
loginDetails:any;
@ViewChild("indexLoginModal") loginModalRef: ElementRef;
constructor(
private router : Router,
private route : ActivatedRoute
private route : ActivatedRoute,
public webService : WebService,
) { }
ngOnInit() {
this.checkUserLogin();
}
checkUserLogin(){
this.loginDetails = JSON.parse(this.webService.getLocalStorageItem('userData'));
}
goToPage(path,data=null){
this.router.navigateByUrl(path,{queryParams:data});
document.body.scrollTop = document.documentElement.scrollTop = 0;
this.router.navigate([path],{queryParams: data});
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 @@
<div class="title_banner_overlay">
<div class="title_banner">
<div class="container">
</div>
</div>
</div>
......@@ -19,10 +19,10 @@
</a>
</li>
<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>
My Vehicle
<div class="notification" *ngIf="vehDetails">{{ vehDetails?.length || '0' }}</div>
<div class="notification" *ngIf="vehDetails">{{ vehDetails?.length || '0' }}</div>
</span>
</a>
......@@ -42,15 +42,16 @@
Service History
<div class="notification" *ngIf="bookingDetails">{{ bookingDetails?.length || '0' }}</div>
</span>
</a>
</a>
</li>
<li class="nav-item">
<a class="nav-link reminder" data-toggle="tab" href="#reminder">
<span>
Reminder
<a class="nav-link reminder" data-toggle="tab" href="#reminder" #reminderTab>
<span>
Reminder
<div class="notification" *ngIf="remainders">{{ remainders?.length || '0' }}</div>
</span>
</a>
</a>
</li>
</ul>
</div>
......@@ -84,15 +85,15 @@
<div class="col-md-6">
<p>First Name</p>
<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),
'input_success': editProfile.controls['first_name'].touched && editProfile.controls['first_name'].valid}"
(click)="editProfileSubmitClick = false">
[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}"
(click)="editProfileSubmitClick = false">
</div>
<div class="col-md-6">
<p>Last Name</p>
<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),
'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">
</div>
</div>
......@@ -100,9 +101,9 @@
<div class="col-md-6">
<p>Phone</p>
<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),
'input_success': editProfile.controls['phone'].touched && editProfile.controls['phone'].valid}"
(click)="editProfileSubmitClick = false">
[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}"
(click)="editProfileSubmitClick = false">
</div>
<div class="col-md-6"></div>
</div>
......@@ -111,7 +112,7 @@
<div class="col-md-12">
<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),
'input_success': editProfile.controls['address'].touched && editProfile.controls['address'].valid}"
'input_success': editProfile.controls['address'].touched && editProfile.controls['address'].valid}"
(click)="editProfileSubmitClick = false"></textarea>
</div>
</div>
......@@ -126,7 +127,7 @@
<p>Email Address ( Username )</p>
<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),
'input_success': editProfile.controls['email'].touched && editProfile.controls['email'].valid}"
'input_success': editProfile.controls['email'].touched && editProfile.controls['email'].valid}"
(click)="editProfileSubmitClick = false">
</div>
</div>
......@@ -141,14 +142,14 @@
<p>New Password</p>
<input class="text_input" placeholder="" type="password" formControlName="password"
[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">
</div>
<div class="col-md-6">
<p>Confirm new Password</p>
<input class="text_input" placeholder="" type="password" formControlName="cpassword"
[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">
</div>
<div class="col-md-6"> </div>
......@@ -218,7 +219,11 @@
<div class="button_bay">
<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 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>
</li>
......@@ -357,12 +362,12 @@
</tr>
</tbody>
</table> -->
<table>
<table>
<thead>
<tr>
<th></th>
......@@ -428,52 +433,50 @@
<div class="tab-pane container fade" id="reminder">
<div class="row">
<div class="col-md-12">
<div class="row line_row">
<div class="col-md-12">
<h3>Set reminder for service booking</h3>
<hr>
<span *ngIf="remainders; else noRemndrs">
<div class="row line_row">
<div class="col-md-12">
<h3>Reminder for service booking</h3>
<hr>
</div>
</div>
</div>
<div class="row line_row">
<div class="col-md-12">
<div class="vehicle_list">
<ul>
<li>
<div class="car_details">
<h5><strong>UI458792</strong>booking name</h5>
<div class="row">
<div class="col-md-3">Booking id</div>
<div class="col-md-1">:</div>
<div class="col-md-7">UI458792</div>
</div>
<div class="row">
<div class="col-md-3">Date</div>
<div class="col-md-1">:</div>
<div class="col-md-7">12 June 2019</div>
</div>
<div class="row">
<div class="col-md-3">Time</div>
<div class="col-md-1">:</div>
<div class="col-md-7">13:00:00</div>
</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 class="row line_row">
<div class="col-md-12">
<div class="table-responsive">
<table>
<thead>
<tr>
<th>Sl No</th>
<th>Vehicle Name</th>
<th>Last Maintanence Date</th>
<th>Next Maintanence Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let remnds of remainders;let i = index;">
<td>{{i +1}}</td>
<td>{{remnds.car_name}}</td>
<td>{{remnds.last_maintenance_date | date :"MMMM dd, yyyy, EEE"}}</td>
<td>{{remnds.next_maintenance_date | date :"MMMM dd, yyyy, EEE"}}</td>
<td>
<div class="btn-group-justified" role="group" aria-label="Basic example">
<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>
</li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</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>
......@@ -503,7 +506,7 @@
<span class="checkmark"></span>
</label>
</div>
<div class="add_modal_inner" [hidden]="tab=='inactive'">
<div class="row">
<div class="col-md-12">
......@@ -513,76 +516,111 @@
<form [formGroup]="vehicleDetailsAddForm" (ngSubmit)="vehicleDetailsFormSubmit(vehicleDetailsAddForm.value)">
<div class="row line_row">
<div class="col-md-6">
<select class="vehicle_input_select" placeholder="Choose Year" formControlName="modelYear"
[ngClass]="{'input_error': !vehicleDetailsAddForm.controls['modelYear'].valid && vehicleDetailsFormSubmitClick}">
<option value="" class="hide">YEAR</option>
<option *ngFor="let date of modelDates">{{date}}</option>
</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>
<select class="vehicle_input_select" (change)="get_vehiYear($event.target.value)" placeholder="Choose Year" formControlName="modelYear"
[ngClass]="{'input_error': (!vehicleDetailsAddForm.controls['modelYear'].valid && vehicleDetailsAddForm.controls['maker'].valid) || (!vehicleDetailsAddForm.controls['modelYear'].valid && vehicleDetailsFormSubmitClick)}">
<option value="" class="hide">YEAR</option>
<option *ngFor="let date of modelDates">{{date}}</option>
</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>
<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 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>
<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>
<!-- ADD-VEHICLE-MODAL-ENDS -->
<!-- EDIT-VEHICLE-MODAL-STARTS -->
......@@ -622,7 +660,7 @@
<div class="col-md-12">
<input class="vehicle_input" placeholder="Edit Registration Number">
</div>
</div>
<div class="row line_row mb0">
<div class="col-md-12">
......@@ -692,7 +730,7 @@
</div>
</div>
</div>
<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>
......@@ -748,7 +786,7 @@
</div>
</div>
</wizard-step>
<wizard-step stepTitle="Title of step 4">
<h3>SUMMARY</h3>
<div class="row">
......@@ -835,61 +873,61 @@
<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
handle any repair related questions Peace-of-Mind Guarantee - no unexpected charges</p>
</div>
<div class="quote_schedule_header">
<div class="row">
<div class="col-md-6">
<h4>Select your day and date</h4>
</div>
<div class="col-md-6">
<button [ngClass]="{'invisible': !showLeftArrow}" class="quote_arrow left floatLeft" (click)="prev($event)"></button>
<div class="schedule_dates floatLeft">
<ul>
<li>{{ dateSection[0] | date:'MMM dd-MM-yyyy' }}</li>
<li>{{ dateSection[1] | date:'MMM dd-MM-yyyy' }}</li>
</ul>
</div>
<button [ngClass]="{'invisible': !showRightArrow}" class="quote_arrow right floatRight" (click)="next($event)"></button>
<div class="clear"></div>
</div>
<div class="quote_schedule_header">
<div class="row">
<div class="col-md-6">
<h4>Select your day and date</h4>
</div>
<div class="col-md-6">
<button [ngClass]="{'invisible': !showLeftArrow}" class="quote_arrow left floatLeft" (click)="prev($event)"></button>
<div class="schedule_dates floatLeft">
<ul>
<li>{{ dateSection[0] | date:'MMM dd-MM-yyyy' }}</li>
<li>{{ dateSection[1] | date:'MMM dd-MM-yyyy' }}</li>
</ul>
</div>
<button [ngClass]="{'invisible': !showRightArrow}" class="quote_arrow right floatRight" (click)="next($event)"></button>
<div class="clear"></div>
</div>
</div>
</div>
</div>
<div class="quote_schedule_list">
<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">
<div class="mechanic_profile_inner">
<div class="mechanic_photo_wrapper">
<div class="mechanic_photo">
<img src="{{imageServer + mechanic.profile_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div>
<div class="mechanic_ratting">
<p *ngIf="mechanic.rating > 0">{{mechanic.rating}} Ratings</p>
<div class="quote_schedule_list">
<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">
<div class="mechanic_profile_inner">
<div class="mechanic_photo_wrapper">
<div class="mechanic_photo">
<img src="{{imageServer + mechanic.profile_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div>
<div class="mechanic_ratting">
<p *ngIf="mechanic.rating > 0">{{mechanic.rating}} Ratings</p>
</div>
</div>
</div>
<div class="mechanic_detail relative">
<div class="mechanic_detail relative">
<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">
<label [attr.for]="'custom_checkbox-1'+i"></label>
<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>
</div>
<h4>{{mechanic.display_name}}</h4>
<div *ngIf="mechanic.shop_id != 0; else mechanicDetails">
<h5>{{mechanic.shop_name}}</h5>
<p>{{mechanic.shop_address}}</p>
<h6>{{mechanic.shop_phone}}</h6>
<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'}} miles away from you</p>
</ng-template>
<button (click)="scheduleNow(mechanic.mechanic_id,mechanic.estimate)"
[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}">
<h4>{{mechanic.display_name}}</h4>
<div *ngIf="mechanic.shop_id != 0; else mechanicDetails">
<h5>{{mechanic.shop_name}}</h5>
<p>{{mechanic.shop_address}}</p>
<h6>{{mechanic.shop_phone}}</h6>
<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'}} miles away from you</p>
</ng-template>
<button (click)="scheduleNow(mechanic.mechanic_id,mechanic.estimate)"
[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}">
{{loginDetails ? 'Book now' : 'Login and Continue' }}
</button>
</div>
......@@ -899,7 +937,7 @@
<div class="panel panel-default">
<div class="panel-heading">
<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="col-md-8">Estimated Price</div>
<div class="col-md-1"></div>
......@@ -929,14 +967,14 @@
<span *ngFor="let time of mechanic.scheduleTiming">
<li *ngIf="(time > currentTime && ((dateSection[0] | date: 'dd') == currentDate))" id="custom_check_button">
<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">
<p>{{time | date:'hh:mm a'}}</p>
</label>
</li>
<li *ngIf="((dateSection[0] | date: 'dd') != currentDate)" id="custom_check_button">
<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">
<p>{{time | date:'hh:mm a'}}</p>
</label>
......@@ -946,7 +984,7 @@
<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');
<input type="radio" value="{{time | date:'hh:mm a'}}" name="scheduleTime" (click)="getSchedule($event.target.value,'1');
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
<p>{{time | date:'hh:mm a'}}</p>
</label>
......@@ -978,31 +1016,31 @@
<div class="service_map">
<agm-map #gm [latitude]="lat" [longitude]="lng" [fitBounds]="true">
<agm-marker *ngFor="let mechanicLoc of mechanicData"
[latitude]="mechanicLoc.location_lat"
[longitude]="mechanicLoc.location_lat"
(mouseOver)="onMouseOver(infoWindow,gm)"
(mouseOut)="onMouseOut(gm)" [agmFitBounds]="true">
<agm-info-window [disableAutoPan]="false" #infoWindow>
<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'">
<div style="float:right;width:calc(100% - 30px); white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;padding-left: 5px;">{{mechanicLoc.display_name}}<br>
Price : {{mechanicLoc.estimate}}
</div>
</div>
</agm-info-window>
</agm-marker>
</agm-map>
</div>
</div>
[latitude]="mechanicLoc.location_lat"
[longitude]="mechanicLoc.location_lat"
(mouseOver)="onMouseOver(infoWindow,gm)"
(mouseOut)="onMouseOut(gm)" [agmFitBounds]="true">
<agm-info-window [disableAutoPan]="false" #infoWindow>
<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'">
<div style="float:right;width:calc(100% - 30px); white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;padding-left: 5px;">{{mechanicLoc.display_name}}<br>
Price : {{mechanicLoc.estimate}}
</div>
</div>
</agm-info-window>
</agm-marker>
</agm-map>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- QUOTES-MODAL-ENDS-->
<!-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#confirm">Open Modal</button> -->
......@@ -1012,35 +1050,35 @@
<div class="modal-dialog modal-full">
<div class="loader_overlay" *ngIf="loader"></div>
<div class="modal-content login_modal_wrapper">
<div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal">
<div class="login_modal_content">
<div class="login_modal_inner">
<h3>View quotes</h3>
<table width=100%>
<thead>
<tr>
<th width= 20%;>Issues</th>
<th>Description</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let quote of mechCustQuote">
<td>{{quote.issue_category}}</td>
<td>{{quote.description}}</td>
<td>{{quote.amount}}</td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;">
<div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal">
<div class="login_modal_content">
<div class="login_modal_inner">
<h3>View quotes</h3>
<table width=100%>
<thead>
<tr>
<th width= 20%;>Issues</th>
<th>Description</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let quote of mechCustQuote">
<td>{{quote.issue_category}}</td>
<td>{{quote.description}}</td>
<td>{{quote.amount}}</td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;">
<button class="log_btn" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -1051,23 +1089,23 @@
<div class="modal" id="success">
<div class="modal-dialog modal-full">
<div class="modal-content login_modal_wrapper">
<div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal">
<div class="login_modal_content">
<div class="login_modal_inner">
<div class="login_success">
<img src="assets/images/asset_success.png">
<h4>Your Booking is success</h4>
</div>
<div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;">
<div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal">
<div class="login_modal_content">
<div class="login_modal_inner">
<div class="login_success">
<img src="assets/images/asset_success.png">
<h4>Your Booking is success</h4>
</div>
<div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;">
<button class="log_btn" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -1079,23 +1117,23 @@
<div class="modal" id="failure">
<div class="modal-dialog modal-full">
<div class="modal-content login_modal_wrapper">
<div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal">
<div class="login_modal_content">
<div class="login_modal_inner">
<div class="login_success">
<img src="assets/images/asset_error.png">
<h4>Your Booking is failure</h4>
</div>
<div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;">
<div class="modal_close" data-dismiss="modal"> × </div>
<div class="modal-body quote_modal">
<div class="login_modal_content">
<div class="login_modal_inner">
<div class="login_success">
<img src="assets/images/asset_error.png">
<h4>Your Booking is failure</h4>
</div>
<div class="row">
<div class="col-md-12 textCenter" style="padding-top:40px;">
<button class="log_btn" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -1106,9 +1144,9 @@
<div class="modal" id="confirm" >
<div class="modal-dialog modal-full">
<div class="modal-content background_transparent">
<div class="modal-body quote_modal">
<div class="confirm_modal_content">
<div class="login_modal_inner">
<div class="modal-body quote_modal">
<div class="confirm_modal_content">
<div class="login_modal_inner">
<div class="login_success">
<h4>Do You Want to Confirm ?</h4>
</div>
......@@ -1118,9 +1156,9 @@
<button class="btn btn-danger" data-dismiss="modal">No</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
......
......@@ -639,13 +639,13 @@
border: 1px solid #1e1e1e;
height: 40px;
padding-left: 15px;
font-size: 16px;
font-size: 13px;
}
.vehicle_input_select {
width: 100%;
border: 1px solid #1e1e1e;
background: url("/assets/images/asset_down_arrow.png");
font-size: 16px;
font-size: 13px;
cursor: pointer;
background-position: right 10px top 10px;
background-repeat: no-repeat;
......@@ -1662,4 +1662,9 @@
}
}
.noti_slash{
width:55px;
}
\ No newline at end of file
......@@ -49,6 +49,7 @@ export class DashboardComponent implements OnInit {
autocompleteDetails: any;
optionalDescription: string;
editProfileSubmitClick: boolean;
remainders: any;
vehicleVinAddForm;
vehicleVinFormSubmitClick;
......@@ -92,6 +93,11 @@ export class DashboardComponent implements OnInit {
scheduleMechanic: any;
optionalImges: any = new Array({1:false,2:false,3:false,4:false});
vehiYear:any;
vehiBrand:any;
vehiModel:any;
carTrim:any;
imageDisp1: any;
imageDisp2: any;
imageDisp3: any;
......@@ -110,6 +116,8 @@ export class DashboardComponent implements OnInit {
@ViewChild("googleLocDetails") public googleLocDetailsRef: ElementRef;
@ViewChild("newGoogleLocSearch") public newGoogleLocRef: ElementRef;
@ViewChild("appointmentTab") public appointmentTabRef: ElementRef;
@ViewChild("vehicleTab") public vehicleTabRef: ElementRef;
@ViewChild("reminderTab") public reminderTabRef: ElementRef;
@ViewChild("serviceHistoryTab") public serviceHistoryTabRef: ElementRef;
@ViewChild("closeVehicleAddForm") public closeVehicleAddFormRef: ElementRef;
......@@ -145,10 +153,12 @@ export class DashboardComponent implements OnInit {
ngOnInit() {
this.currentTime = this.today.getTime();
this.currentDate = this.today.getDate();
this.tab = 'active';
this.route.queryParams.subscribe(params => {
let payStatus = params['status'];
let activeTab = params['tab'];
let vehTab = params['redrct_tab'];
if(payStatus && payStatus !=''){
if(payStatus == 'success')
......@@ -165,6 +175,15 @@ export class DashboardComponent implements OnInit {
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({
......@@ -176,11 +195,14 @@ export class DashboardComponent implements OnInit {
maker: new FormControl('', [Validators.required]),
location: 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.subjectService.getLoginData().subscribe(loginData => {
this.loginDetails = JSON.parse(this.webService.getLocalStorageItem('userData'));
......@@ -197,6 +219,7 @@ export class DashboardComponent implements OnInit {
});
this.getCustVehDetails();
this.getCustBookDetails();
this.getCustRemainders();
} else {
this.router.navigate(['index']);
}
......@@ -235,8 +258,24 @@ export class DashboardComponent implements OnInit {
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) {
this.vehiBrand = brand_id;
if(!this.vehiYear){
return false;
}
this.carTrim = this.carModel = [];
this.loader = true;
const thisObj = this;
thisObj.carBrands.forEach(function (brandData,index) {
......@@ -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'){
this.carModel = response.data;
}
......@@ -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(){
this.loader = true;
this.webService.post_data('getCustBookDetails', {'customer_id':this.loginDetails.customer_id}).subscribe(response => {
......@@ -296,6 +356,16 @@ export class DashboardComponent implements OnInit {
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){
let issue_id = event.target.attributes.issue_id.value;
......@@ -488,6 +558,8 @@ export class DashboardComponent implements OnInit {
}
addCustomerCar(type,vehicleData,location){
vehicleData['lastMaintanceDate'] = (vehicleData['last_date'])?(formatDate(vehicleData['last_date'],'MM/dd/yyyy','en')):'';
this.loader = true;
let postData = {'type':type,'customer_id':this.loginDetails.customer_id,'vehicleData':vehicleData,'location':location};
......@@ -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){
let reader = new FileReader();
......@@ -552,7 +634,7 @@ export class DashboardComponent implements OnInit {
resetVehicleForm(){
this.vehicleVinAddForm.reset();
this.vehicleDetailsAddForm.reset({
maker: '', modelYear: '', modelName: '', location: ''
maker: '', modelYear: '', modelName: '', location: '', last_date: '', maintanence_interval: '',engine: '',trim: ''
});
}
......@@ -689,7 +771,6 @@ getQuote(){
this.webService.post_data('getNearByMechanics',searchData).subscribe(response => {
if(response.status == '1'){
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() + 1)));
......@@ -884,6 +965,10 @@ cancelBooking(booking: any){
});
}
purchase(carId){
this.goToPage('productlist',{'car_id':carId})
}
mechanicQuoteAccept(event,booking_id,mechanic_id){
if(!booking_id || !mechanic_id){
return false;
......@@ -907,6 +992,13 @@ cnfdeleteCustomerCar(customer_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){
if(fn_name === ''){
return false;
......@@ -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){
$('#'+id).stop().animate({scrollTop: 0}, 800);
}
......
......@@ -15,6 +15,7 @@
</div>
</div>
</section>
<section #targetwrk><div style="height:35px;opacity:0;"></div></section>
<section class="how_it_works">
<h3>HOW IT WORKS</h3>
<hr>
......@@ -63,7 +64,7 @@
<img src="assets/images/asset_icon4.png">
<h4>Diagnosis Trouble Codes</h4>
<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
</button>
</div>
......@@ -72,7 +73,7 @@
<img src="assets/images/asset_icon5.png">
<h4>Parts and Replacement</h4>
<p>Review causes, symptoms, and estimate repair costs.</p>
<button class="learn_more">
<button class="learn_more" (click)="goToPage('purchaseHome')">
GO
</button>
</div>
......@@ -81,7 +82,7 @@
<img src="assets/images/asset_icon6.png">
<h4>Maintenance Schedules</h4>
<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
</button>
</div>
......@@ -257,7 +258,7 @@
<h3>VEHICLE INFORMATION</h3>
<div class="row">
<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 *ngFor="let date of modelDates">{{date}}</option>
</select>
......@@ -271,13 +272,16 @@
</div>
<div class="row">
<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 *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>
</div>
<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>
<h6 class="textLeft pb10">OPTIONAL</h6>
......@@ -286,7 +290,7 @@
<input formControlName="emgine" placeholder="ENGINE" type="">
</div>
<div class="col-md-6">
<input formControlName="trim" placeholder="TRIM" type="">
<input formControlName="milage" placeholder="APPROX VEHICLE MILEAGE" type="">
</div>
</div>
<div class="row">
......@@ -601,14 +605,14 @@
<span *ngFor="let time of mechanic.scheduleTiming">
<li *ngIf="(time > currentTime && ((dateSection[0] | date: 'dd') == currentDate))" id="custom_check_button">
<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">
<p>{{time | date:'hh:mm a'}}</p>
</label>
</li>
<li *ngIf="((dateSection[0] | date: 'dd') != currentDate)" id="custom_check_button">
<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">
<p>{{time | date:'hh:mm a'}}</p>
</label>
......@@ -618,7 +622,7 @@
<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');
<input type="radio" value="{{time | date:'hh:mm a'}}" name="scheduleTime" (click)="getSchedule($event.target.value,'1');
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
<p>{{time | date:'hh:mm a'}}</p>
</label>
......
......@@ -36,6 +36,10 @@ export class IndexComponent implements OnInit {
autocomplete: any;
cfautocomplete: any;
vehiYear:any;
vehiBrand:any;
vehiModel:any;
carTrim:any;
searchLocError: boolean;
addresssearchLocError: boolean;
@ViewChild("goTostep0") public goTostep0Ref: ElementRef;
......@@ -47,6 +51,7 @@ export class IndexComponent implements OnInit {
@ViewChild("addressLocSearch") public addressElementRef: ElementRef;
@ViewChild("indexLoginModal") loginModalRef: ElementRef;
@ViewChild("closeQuoteWizard") closeQuoteWizardRef: ElementRef;
@ViewChild('targetwrk') public targetEl: ElementRef;
//Vehicle Details: TAB 2
vehicleDataForm;
......@@ -72,6 +77,7 @@ export class IndexComponent implements OnInit {
mechanics: string = '';
dateSection: any[] = new Array();
selMechanics: any[] = new Array();
selectedElement: any = new Array();
imageServer: string;
mechanicData: any;
autoSchedule: boolean;
......@@ -93,24 +99,36 @@ export class IndexComponent implements OnInit {
public ngZone : NgZone,
public webService : WebService,
public mapsAPILoader : MapsAPILoader,
private route : ActivatedRoute,
public subjectService : SubjectService) {
this.step = 0;
this.issuesData = false;
this.autoSchedule = false;
this.imageServer = ImageStorage;
this.currDate = new Date();
this.nextDate = new Date();
this.loginDetails = false;
this.searchLocError = false;
this.addresssearchLocError = false;
this.showLeftArrow = false;
this.showRightArrow = true;
this.scheduleDateInit = false;
this.scheduleMechanic = false;
this.step = 0;
this.currDate = new Date();
this.nextDate = new Date();
this.issuesData = false;
this.imageServer = ImageStorage;
this.loginDetails = false;
this.autoSchedule = false;
this.showLeftArrow = false;
this.searchLocError = false;
this.showRightArrow = true;
this.scheduleDateInit = false;
this.scheduleMechanic = false;
this.optionalDescription = '';
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() {
this.currentTime = this.today.getTime();
this.currentDate = this.today.getDate();
......@@ -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) {
this.vehiBrand = brand_id;
if(!this.vehiYear){
return false;
}
this.carTrim = this.carModel = [];
this.loader = true;
const thisObj = this;
thisObj.carBrands.forEach(function (brandData,index) {
......@@ -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'){
this.carModel = response.data;
}
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){
if(lastLoc == ''){
......@@ -229,6 +273,19 @@ export class IndexComponent implements OnInit {
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(){
const This = this;
this.loader = true;
......
......@@ -31,7 +31,7 @@
</li>
<li class="nav-item">
<a class="nav-link" (click)="goToPage('purchaseHome')">
PURCHASE
PURCHASE PARTS AND ACCESSORIES
</a>
</li>
<li class="nav-item">
......@@ -40,26 +40,33 @@
CAR OWNERS
</div>
<div class="dropdown-menu">
<a class="dropdown-item" *ngIf="loginDetails" (click)="goToPage('dashboard')">My Dashboard</a>
<a class="dropdown-item" (click)="goToPage('purchaseHome')">Find parts and accessories</a>
<a class="dropdown-item">Rewards</a>
<a class="dropdown-item">Messages</a>
<a class="dropdown-item">Request a Service </a>
<a class="dropdown-item">Repair/Maintenance Service reminder</a>
<a class="dropdown-item">Road Service </a>
<div class="inner_drop">
<div class="arrow-up"></div>
<a class="dropdown-item">Rewards</a>
<a class="dropdown-item">Messages</a>
<a class="dropdown-item" (click)="requestSrvce()">Request a Service </a>
<a class="dropdown-item" (click)="goToPage('getapp')">Emergency / Road Assistance Services</a>
<a class="dropdown-item" (click)="howitwrks()">How it works</a>
</div>
</div>
</a>
</li>
<li class="nav-item" data-toggle="modal" data-target="#serviceprovider">
<a class="nav-link base_arrow">
<!-- <li class="nav-item" data-toggle="modal" data-target="#serviceprovider"> -->
<li class="nav-item">
<a class="nav-link base_arrow dropdown" data-toggle="dropdown">
<div class="dropdown-toggle">
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>
</li>
<li class="nav-item">
<a class="nav-link" (click)="goToPage('getapp')">
GET THE APP
</a>
</li>
<li class="nav-item" *ngIf="!loginDetails">
<button (click)="resetForm()" class="sign_btn" data-toggle="modal" data-target="#login">
<img src="assets/images/asset_signin.png">SIGN IN
......@@ -83,7 +90,10 @@
<div class="clear"></div>
</div>
<div class="dropdown-menu">
<div class="inner_drop" style="top:20px;">
<div class="arrow-up"></div>
<a class="dropdown-item" (click)="logout()">Logout</a>
</div>
</div>
</a>
</li>
......@@ -355,7 +365,6 @@
<!-- SERVICE-PROVIDER-MODAL-STARTS-->
<div class="modal" id="serviceprovider" style="z-index: 99999 !important;">
<div class="modal-dialog modal-full">
<div class="modal-content login_modal_wrapper" malihu-scrollbar [scrollbarOptions]="scrollbarOptions">
......@@ -431,9 +440,12 @@
<strong>{{spSignupResponse.message}}<br></strong>
</div>
<div class="row">
<div class="col-md-12">
<button type="submit" class="log_btn" (click)="spSignupSubmitClick = true">Submit</button>
<div class="col-md-6">
<button class="log_btn" (click)="providerSignIn()">Sign In</button>
</div>
<div class="col-md-6">
<button type="submit" class="log_btn" (click)="spSignupSubmitClick = true">Sign Up</button>
</div>
</div>
</div>
</form>
......
......@@ -14,21 +14,22 @@
max-width: calc(100% - 10%);
.navbar-brand {
img {
width: 180px;
width: 140px;
}
}
.navbar-nav {
li {
margin-right: 30px;
margin-right:20px;
a {
color: #fff;
position: relative;
top: 5px;
top: 10px;
font-size: 13px;
.dropdown-menu {
a {
top: 0px;
padding-top: 5px;
padding-bottom: 5px;
padding-top: 8px;
padding-bottom: 8px;
}
}
}
......@@ -74,12 +75,31 @@
border: none;
margin: 0px;
padding: 0px;
border-radius: 0px;
background: transparent;
.inner_drop{
border-radius: 0px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
-ms-border-radius: 0px;
-o-border-radius: 0px;
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;
a {
&:hover {
......@@ -224,6 +244,7 @@
-ms-border-radius:10px;
-o-border-radius: 10px;
text-align: center;
padding-left: 20px;
option{
text-align: center;
}
......
......@@ -64,9 +64,9 @@ export class NavbarComponent implements OnInit {
ngOnInit() {
this.subjectService.getLoginData().subscribe(loginData => {
this.loginDetails = JSON.parse(this.webService.getLocalStorageItem('userData'));
if(!this.loginDetails){
this.facebookSignUp();
}
// if(!this.loginDetails){
// this.facebookSignUp();
// }
});
this.getMechanicShops();
......@@ -103,6 +103,9 @@ export class NavbarComponent implements OnInit {
signInWithFB(): void {
this.authService.signIn(FacebookLoginProvider.PROVIDER_ID);
if(!this.loginDetails){
this.facebookSignUp();
}
}
signOut(): void {
......@@ -112,28 +115,30 @@ export class NavbarComponent implements OnInit {
facebookSignUp(){
const This = this;
this.authService.authState.subscribe((user) => {
this.user = user;
let data: any = new Array();
data = {'first_name':this.user.firstName,'last_name':this.user.lastName,'email':this.user.email,'image_url':this.user.photoUrl};
if(this.user){
this.webService.post_data('socialLogin', {'data':data}).subscribe(response => {
if ( response.status == '1') {
this.webService.setLocalStorageItem('userData', JSON.stringify(response.data));
this.subjectService.sendLoginData('logged_in');
this.loginModal.nativeElement.click();
this.signupModal.nativeElement.click();
} else {
response.status = 'error';
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};
},() => {
setTimeout( function() {
This.loginResponse = false;
}, 2000)
});
if(user && user != null && user != undefined){
this.user = user;
let data: any = new Array();
data = {'first_name':this.user.firstName,'last_name':this.user.lastName,'email':this.user.email,'image_url':this.user.photoUrl};
if(this.user){
this.webService.post_data('socialLogin', {'data':data}).subscribe(response => {
if ( response.status == '1') {
this.webService.setLocalStorageItem('userData', JSON.stringify(response.data));
this.subjectService.sendLoginData('logged_in');
this.loginModal.nativeElement.click();
this.signupModal.nativeElement.click();
} else {
response.status = 'error';
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};
},() => {
setTimeout( function() {
This.loginResponse = false;
}, 2000)
});
}
}
});
}
......@@ -143,6 +148,14 @@ export class NavbarComponent implements OnInit {
this.signupModal.nativeElement.click();
}
providerSignIn(){
window.open('https://carfixxers.com/admin/Login','_blank');
}
providerSignUp(){
$("#serviceprovider").modal('show');
}
getMechanicShops(){
this.loader = true;
this.webService.get_data('getMechanicShops').subscribe(response => {
......@@ -303,17 +316,25 @@ export class NavbarComponent implements OnInit {
else sticky.removeClass('scrolled_navbar');
});
}
goToPage(path,data=null){
this.router.navigateByUrl(path,{queryParams:data});
document.body.scrollTop = document.documentElement.scrollTop = 0;
requestSrvce(){
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() {
this.signOut();
const userData = this.webService.getLocalStorageItem('userData');
this.webService.removeLocalStorageItem(userData);
this.subjectService.sendLoginData(false);
this.router.navigate(['../index']);
}
......
......@@ -167,15 +167,15 @@ export class CartComponent implements OnInit {
if(cartId <= 0 || product_id <= 0 || total_amount <= 0 || quantity <= 0 || amount <= 0){
return false;
}
this.loader = true;
this.webService.post_data('removeCartPrdt',{'cart_id':cartId}).subscribe(response => {
if(response.status == 'success'){
this.product_data = {amount:amount,product_id:product_id,quantity:quantity,total_amount:total_amount};
//this.loader = true;
// this.webService.post_data('removeCartPrdt',{'cart_id':cartId}).subscribe(response => {
// if(response.status == 'success'){
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.goToPage('address','');
}
this.loader = false;
});
// }
// this.loader = false;
//});
}
goToPage(path,data=null){
......
......@@ -26,6 +26,9 @@
<div class="col-md-6">
<div class="price_details">
<h5>NGN {{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>
<div *ngIf="book.status == '2'">Your Order is Placed</div>
<div *ngIf="book.status == '3'">Your item is Packed</div>
......@@ -55,7 +58,7 @@
</div>
</div>
<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>
<ngx-carousel [inputs]="carouselTile" (carouselLoad)="carouselTileLoad()" *ngIf="trendingProductData">
<ngx-tile NgxCarouselItem *ngFor="let prdt of trendingProductData">
......
......@@ -110,6 +110,7 @@
</div>
</div>
<div class="bottom_product_list">
<h4>Trending Products</h4>
<div class="loader_overlay" *ngIf="loader2"></div>
<ngx-carousel [inputs]="carouselTile" (carouselLoad)="carouselTileLoad()" *ngIf="trendingProductData">
<ngx-tile NgxCarouselItem *ngFor="let prdt of trendingProductData" >
......
......@@ -254,6 +254,16 @@
.bottom_product_list{
background: #fff;
position: relative;
h4{
color: #262626;
margin: 0px;
padding:15px;
font-size: 16px;
padding-bottom: 0px;
span{
color: #92a1b1;
}
}
.leftRs{
position: absolute;
left:10px;
......
......@@ -28,27 +28,33 @@
<h6 href="#ac3" data-toggle="collapse">Vehicle Information</h6>
<ul id="ac3" class="collapse in show">
<h6 class="backgroundNone borderNone">
<select (change)="get_year($event.target.value)">
<option [attr.value]="0" [attr.selected]=true [attr.disabled]="true">Select Year</option>
<option *ngFor="let date of modelDates">{{date}}</option>
<select (change)="get_year($event.target.value)" [ngClass]="{'input_error': errorYear}">
<option [value]="0" [disabled]="true">Select Year</option>
<option *ngFor="let date of modelDates" [selected]="date == carFilter['year']">{{date}}</option>
</select>
</h6>
<h6 class="backgroundNone borderNone">
<select (change)="get_model($event.target.value)">
<option [attr.value]="0" [attr.selected]=true [attr.disabled]="true">Select Maker</option>
<option *ngFor="let brands of carBrands" value="{{brands.veh_brand_id}}">
<option [value]="0" [selected]="true" [disabled]="true">Select Maker</option>
<option *ngFor="let brands of carBrands" [selected]="brands.veh_brand_id == carFilter['make']" value="{{brands.veh_brand_id}}">
{{brands.maker}}
</option>
</select>
</h6>
<h6 class="backgroundNone borderNone">
<select (change)="getModelResult($event.target.value)" *ngIf="modelShow">
<option [attr.value]="0" [attr.selected]=true [attr.disabled]="true">Select Model</option>
<option *ngFor="let models of carModel" value="{{models.veh_modal_id}}">
<select (change)="getModelResult($event.target.value)" *ngIf="modelShow && carModel && carModel.length > 0">
<option [value]="0" [selected]="!carFilter['model']?true:false" [disabled]="true">Select Model</option>
<option *ngFor="let models of carModel" [selected]="models.veh_model_id == carFilter['model']" value="{{models.veh_model_id}}">
{{models.model}}
</option>
</select>
</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>
</div>
<div class="purchase_content_section">
......
......@@ -11,6 +11,7 @@ import { ImageStorage } from '../../../environments/server.config';
})
export class ProductlistComponent implements OnInit {
loader: boolean;
errorYear: boolean;
searchKey:string;
imageServer: any;
productArray: any[] = new Array();
......@@ -25,14 +26,20 @@ export class ProductlistComponent implements OnInit {
modelDates: number[] = new Array();
carBrands:any;
carModel:any;
vehiBrand:any;
vehiModel:any;
vehiYear:any;
modelName:any;
modelShow :boolean;
carFilter: any = new Array();
carTrim:any;
constructor(
private router : Router,
private route : ActivatedRoute,
public webService : WebService
){
this.loader = true;
this.errorYear = false;
this.modelShow = false;
this.productArray = [];
this.filterParam = {"key":'',"brand_id":Array(),"minPrice":'',"maxPrice":'','page':1};
......@@ -43,7 +50,14 @@ export class ProductlistComponent implements OnInit {
this.searchKey = params['key'];
this.filterParam.key = this.searchKey;
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 == ''){
......@@ -78,9 +92,16 @@ export class ProductlistComponent implements OnInit {
}
get_model(brand_id) {
this.vehiBrand = brand_id;
if(!this.vehiYear){
this.errorYear = true;
return false;
}
this.carTrim = this.carModel = [];
this.page = 1;
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'){
this.modelShow = true;
this.carModel = response.data;
......@@ -93,9 +114,23 @@ export class ProductlistComponent implements OnInit {
}
getModelResult(modelId){
this.vehiModel = this.filterParam.model = modelId;
this.loader = true;
this.page = 1;
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);
}
......@@ -173,9 +208,42 @@ export class ProductlistComponent implements OnInit {
}
get_year(year){
this.carModel = this.carTrim = [];
this.page = 1;
this.filterParam.page = this.page;
this.filterParam.year = year;
this.vehiYear = year;
this.errorYear = false;
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 @@
li{
list-style: none;
padding:10px;
width: calc(100% - 75%) !important;
width: calc(100% - 75%);
display: inline-block;
.inner_div_product{
border:1px solid #eeeeee;
......
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpModule } from '@angular/http';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { ProductlistComponent } from './productlist/productlist.component';
import { ProductdetailsComponent } from './productdetails/productdetails.component';
......@@ -33,6 +34,7 @@ import { PurchaseHomeComponent } from './purchase-home/purchase-home.component';
ReactiveFormsModule,
InfiniteScrollModule,
TooltipModule,
HttpModule,
MalihuScrollbarModule.forRoot()
]
})
......
......@@ -86,9 +86,10 @@ export class SummaryComponent implements OnInit {
paymentButton(){
this.loader = true;
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 => {
if(response.status == 'success'){
document.location.href = this.serverUrl+'orderPayNow/'+response.data;
document.location.href = this.serverUrl+'orderPayNow/'+response.data+cart_id;
}else{
this.loader = false;
this.failureModelRef.nativeElement.click();
......
......@@ -72,7 +72,9 @@
</div>
<div class="col-md-6">
<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>
</div>
......
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router';
import { Http, ResponseContentType } from '@angular/http';
import { WebService } from '../../provider/web.service';
import { NgxGalleryOptions, NgxGalleryImage, NgxGalleryAnimation } from 'ngx-gallery';
import { FormGroup, FormControl, Validators, ValidationErrors } from '@angular/forms';
......@@ -7,7 +8,7 @@ import { ValidationService } from '../../provider/validation.service';
import { NgxCarousel } from 'ngx-carousel';
import { ImageStorage } from '../../../environments/server.config';
import { Options } from 'ng5-slider';
import * as $ from 'jquery';
import { apiConfig } from '../../../environments/server.config';
interface RangeSliderModel {
minValue: number;
......@@ -25,6 +26,7 @@ export class TrackComponent implements OnInit {
count:any;
loginDetails:any;
loader:boolean;
serverUrl:string;
loader_review:boolean;
imageServer: string;
orderDetails:any;
......@@ -41,9 +43,11 @@ export class TrackComponent implements OnInit {
constructor(private router : Router,
private route : ActivatedRoute,
public errorMsg : ValidationService,
public webService : WebService){
public webService : WebService,
private http : Http){
this.count = 0;
this.loader = true;
this.serverUrl = apiConfig;
this.userReviewed = true;
this.loader_review = false;
this.imageServer = ImageStorage;
......@@ -77,7 +81,7 @@ export class TrackComponent implements OnInit {
this.goToPage('purchaseHome','');
}
}
unsetProdDetails(){
this.webService.removeLocalItem('productDetails');
}
......@@ -163,7 +167,11 @@ export class TrackComponent implements OnInit {
}
this.goToPage('rating',{"pId":this.orderDetails.product_id});
}
downloadFile(orderId){
document.open(this.serverUrl+'','_blank');
}
goToPage(path,data=null){
this.router.navigate([path],{queryParams: data});
document.body.scrollTop = document.documentElement.scrollTop = 0;
......
......@@ -46,6 +46,24 @@
.purchase_filter_section{
width: 100% !important;
}
.purchase_wrapper{
.purchase_content_wrapper{
.purchase_content_section{
.search_listing_content{
ul{
li {
width:100% !important;
}
}
}
}
}
}
.purchase_content_section{
width:100% !important;
height: auto !important;
......@@ -320,7 +338,7 @@
li {
list-style: none;
padding: 10px;
width: calc(100% - 67%) !important;
width: calc(100% - 75%) !important;
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/';
imageStorageUrl = 'http://localhost/dcarfixers/';
// // Techlabz
// apiConfigUrl = 'https://techlabz.in/dcarfixers/Webservices/';
// apiConfigUrl = 'https://techlabz.in/dcarfixers/Webservices/';
// imageStorageUrl = 'https://techlabz.in/dcarfixers/';
// // carfixxers.com
// // // carfixxers.com
// apiConfigUrl = 'https://carfixxers.com/admin/Webservices/';
// imageStorageUrl = 'https://carfixxers.com/admin/';
......
......@@ -8,6 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.png">
<script src="https://kit.fontawesome.com/288b25c567.js"></script>
</head>
<body>
<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