Commit 6cbd7354 by Tobin

Merge branch 'jensa' into 'master'

Jensa See merge request !46
parents 1576e39f 98b712b8
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
"@google/maps": "^0.5.5", "@google/maps": "^0.5.5",
"angular-star-rating": "^4.0.0-beta.3", "angular-star-rating": "^4.0.0-beta.3",
"angular-wizard-form": "^0.4.1", "angular-wizard-form": "^0.4.1",
"angularx-social-login": "^1.2.7",
"bootstrap": "^4.3.1", "bootstrap": "^4.3.1",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
......
...@@ -8,9 +8,21 @@ import { PurchaseModule } from './purchase/purchase.module'; ...@@ -8,9 +8,21 @@ import { PurchaseModule } from './purchase/purchase.module';
import { NavbarComponent } from './navbar/navbar.component'; import { NavbarComponent } from './navbar/navbar.component';
import { FooterComponent } from './footer/footer.component'; import { FooterComponent } from './footer/footer.component';
import { ReactiveFormsModule } from '@angular/forms'; import { ReactiveFormsModule } from '@angular/forms';
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
import { MalihuScrollbarModule } from 'ngx-malihu-scrollbar'; import { MalihuScrollbarModule } from 'ngx-malihu-scrollbar';
import { ForgotComponent } from './forgot/forgot.component'; import { ForgotComponent } from './forgot/forgot.component';
import { SocialLoginModule, AuthServiceConfig, LoginOpt } from "angularx-social-login";
import { FacebookLoginProvider } from "angularx-social-login";
let config = new AuthServiceConfig([
{
id: FacebookLoginProvider.PROVIDER_ID,
provider: new FacebookLoginProvider("350548065653331")
}
]);
export function provideConfig() {
return config;
}
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -26,9 +38,16 @@ import { ForgotComponent } from './forgot/forgot.component'; ...@@ -26,9 +38,16 @@ import { ForgotComponent } from './forgot/forgot.component';
PurchaseModule, PurchaseModule,
ReactiveFormsModule, ReactiveFormsModule,
HttpClientModule, HttpClientModule,
MalihuScrollbarModule.forRoot() MalihuScrollbarModule.forRoot(),
SocialLoginModule
],
providers: [
{
provide: AuthServiceConfig,
useFactory: provideConfig
}
], ],
providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]
}) })
export class AppModule { } export class AppModule { }
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<td> <td>
<div class="floatLeft"> <div class="floatLeft">
<div class="btn-group btn-group-justified"> <div class="btn-group btn-group-justified">
<button class="btn btn-default btn-sm">{{bookData.status === '1' ? 'Accepted' : 'Pending'}}</button> <button class="{{bookData.status === '1' ? 'btn btn-success btn-sm' : 'btn btn-primary btn-sm'}}btn btn-primary btn-sm">{{bookData.status === '1' ? 'Accepted' : 'Pending'}}</button>
<button (click)="cnfCancelBook(bookData.booking_id)" class="btn btn-danger btn-sm">Cancel</button> <button (click)="cnfCancelBook(bookData.booking_id)" class="btn btn-danger btn-sm">Cancel</button>
</div> </div>
</div> </div>
...@@ -298,8 +298,8 @@ ...@@ -298,8 +298,8 @@
<td>{{mechdata.custom_amount > 0 ?mechdata.custom_amount:mechdata.mechanic_amount}}</td> <td>{{mechdata.custom_amount > 0 ?mechdata.custom_amount:mechdata.mechanic_amount}}</td>
<td> <td>
<div class="btn-group btn-group-justified"> <div class="btn-group btn-group-justified">
<button class="btn btn-default btn-sm" *ngIf="bookData.status == '1' && !mechdata.custom_service_quote">Accepted</button> <button class="btn btn-success btn-sm" *ngIf="bookData.status == '1' && !mechdata.custom_service_quote">Accepted</button>
<button class="btn btn-default btn-sm" *ngIf="mechdata.status == '0'">Waiting for Approval</button> <button class="btn btn-info btn-sm" *ngIf="mechdata.status == '0'">Waiting for Approval</button>
<button class="btn btn-success btn-sm" [attr.bookAmount]="mechdata.custom_amount > 0 ?mechdata.custom_amount:mechdata.mechanic_amount" *ngIf="mechdata.status == '1' && bookData.status != '1'" (click)="mechanicQuoteAccept($event,bookData.booking_id,mechdata.mechanic_id)">Accept</button> <button class="btn btn-success btn-sm" [attr.bookAmount]="mechdata.custom_amount > 0 ?mechdata.custom_amount:mechdata.mechanic_amount" *ngIf="mechdata.status == '1' && bookData.status != '1'" (click)="mechanicQuoteAccept($event,bookData.booking_id,mechdata.mechanic_id)">Accept</button>
<button class="btn btn-info btn-sm" (click)="showCustQuote(bookData.booking_id,mechdata.mechanic_id,1)" data-toggle="modal" data-target="#quote" *ngIf="mechdata.status =='1' && mechdata.custom_service_quote">View Quote</button> <button class="btn btn-info btn-sm" (click)="showCustQuote(bookData.booking_id,mechdata.mechanic_id,1)" data-toggle="modal" data-target="#quote" *ngIf="mechdata.status =='1' && mechdata.custom_service_quote">View Quote</button>
</div> </div>
...@@ -523,7 +523,7 @@ ...@@ -523,7 +523,7 @@
<select (change)="get_model($event.target.value)" class="vehicle_input_select" placeholder="Choose Make" <select (change)="get_model($event.target.value)" class="vehicle_input_select" placeholder="Choose Make"
formControlName="maker" [ngClass]="{'input_error': !vehicleDetailsAddForm.controls['maker'].valid && vehicleDetailsFormSubmitClick}"> formControlName="maker" [ngClass]="{'input_error': !vehicleDetailsAddForm.controls['maker'].valid && vehicleDetailsFormSubmitClick}">
<option value="" class="hide">MAKE</option> <option value="" class="hide">MAKE</option>
<option *ngFor="let car_date of carSearchJsonData; let key = index" value="{{key}}">{{car_date.brand}}</option> <option *ngFor="let car_date of carBrands; let key = index" value="{{car_date.veh_brand_id}}">{{car_date.maker}}</option>
</select> </select>
</div> </div>
</div> </div>
...@@ -532,7 +532,7 @@ ...@@ -532,7 +532,7 @@
<select class="vehicle_input_select" placeholder="Choose Model" formControlName="modelName" <select class="vehicle_input_select" placeholder="Choose Model" formControlName="modelName"
[ngClass]="{'input_error': !vehicleDetailsAddForm.controls['modelName'].valid && vehicleDetailsFormSubmitClick}"> [ngClass]="{'input_error': !vehicleDetailsAddForm.controls['modelName'].valid && vehicleDetailsFormSubmitClick}">
<option value="" class="hide">MODEL</option> <option value="" class="hide">MODEL</option>
<option *ngFor="let car_models of carModel">{{car_models}}</option> <option *ngFor="let car_models of carModel">{{car_models.model}}</option>
</select> </select>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
...@@ -926,20 +926,29 @@ ...@@ -926,20 +926,29 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="scheduletiming_listing"> <div class="scheduletiming_listing">
<ul id="scroll_0_{{i}}"> <ul id="scroll_0_{{i}}">
<li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button"> <span *ngFor="let time of mechanic.scheduleTiming">
<label> <li *ngIf="(time > currentTime && ((dateSection[0] | date: 'dd') == currentDate))" id="custom_check_button">
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'0'); <label>
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id"> <input type="radio" name="scheduleTime" (click)="getSchedule(time,'0');
<p>{{time}}</p> scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
</label> <p>{{time | date:'hh:mm a'}}</p>
</li> </label>
</li>
<li *ngIf="((dateSection[0] | date: 'dd') != currentDate)" id="custom_check_button">
<label>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'0');
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
<p>{{time | date:'hh:mm a'}}</p>
</label>
</li>
</span>
</ul> </ul>
<ul id="scroll_1_{{i}}"> <ul id="scroll_1_{{i}}">
<li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button"> <li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button">
<label> <label>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'1'); <input type="radio" name="scheduleTime" (click)="getSchedule(time,'1');
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id"> scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
<p>{{time}}</p> <p>{{time | date:'hh:mm a'}}</p>
</label> </label>
</li> </li>
</ul> </ul>
......
...@@ -725,7 +725,7 @@ ...@@ -725,7 +725,7 @@
padding: 30px; padding: 30px;
padding-top: 50px; padding-top: 50px;
position: relative; position: relative;
top: 85px; top: 15px;
.login_modal_inner { .login_modal_inner {
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
...@@ -827,7 +827,7 @@ ...@@ -827,7 +827,7 @@
} }
} }
.active{ .active{
background-color: #f2f2f2; background-color: #b9b9b9;
padding:8px; padding:8px;
padding-left: 15px; padding-left: 15px;
border-radius: 8px; border-radius: 8px;
......
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
<div class="col-md-6"> <div class="col-md-6">
<select (change)="get_model($event.target.value)" formControlName="maker" [ngClass]="{'input_error': !vehicleDataForm.controls['maker'].valid && vehicleDataFormSubmit}"> <select (change)="get_model($event.target.value)" formControlName="maker" [ngClass]="{'input_error': !vehicleDataForm.controls['maker'].valid && vehicleDataFormSubmit}">
<option value="" class="hide">MAKE</option> <option value="" class="hide">MAKE</option>
<option *ngFor="let car_date of carSearchJsonData; let key = index" value="{{key}}">{{car_date.brand}}</option> <option *ngFor="let car_date of carBrands; let key = index" value="{{car_date.veh_brand_id}}">{{car_date.maker}}</option>
</select> </select>
</div> </div>
</div> </div>
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
<div class="col-md-6"> <div class="col-md-6">
<select formControlName="modelName" [ngClass]="{'input_error': !vehicleDataForm.controls['modelName'].valid && vehicleDataFormSubmit}"> <select formControlName="modelName" [ngClass]="{'input_error': !vehicleDataForm.controls['modelName'].valid && vehicleDataFormSubmit}">
<option value="" class="hide">MODEL</option> <option value="" class="hide">MODEL</option>
<option *ngFor="let car_models of carModel">{{car_models}}</option> <option *ngFor="let car_models of carModel">{{car_models.model}}</option>
</select> </select>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
...@@ -591,20 +591,36 @@ ...@@ -591,20 +591,36 @@
<div class="scheduletiming_listing"> <div class="scheduletiming_listing">
<!-- <ul id="scroll_0_{{mechanic.mechanic_id}}" malihu-scrollbar [scrollbarOptions]="scrollbarOptions"> --> <!-- <ul id="scroll_0_{{mechanic.mechanic_id}}" malihu-scrollbar [scrollbarOptions]="scrollbarOptions"> -->
<ul id="scroll_0_{{i}}"> <ul id="scroll_0_{{i}}">
<li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button"> <!-- <li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button">
<label> <label>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'0'); <input type="radio" name="scheduleTime" (click)="getSchedule(time,'0');
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id"> scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
<p>{{time}}</p> <p *ngIf="time > currentDate">{{time}}</p>
</label> </label>
</li> </li> -->
<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');
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');
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
<p>{{time | date:'hh:mm a'}}</p>
</label>
</li>
</span>
</ul> </ul>
<ul id="scroll_1_{{i}}"> <ul id="scroll_1_{{i}}">
<li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button"> <li *ngFor="let time of mechanic.scheduleTiming" id="custom_check_button">
<label> <label>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'1'); <input type="radio" name="scheduleTime" (click)="getSchedule(time,'1');
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id"> scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
<p>{{time}}</p> <p>{{time | date:'hh:mm a'}}</p>
</label> </label>
</li> </li>
</ul> </ul>
......
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
padding: 30px; padding: 30px;
padding-top: 50px; padding-top: 50px;
position: relative; position: relative;
top: 85px; top:15px;
.login_modal_inner { .login_modal_inner {
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
...@@ -498,7 +498,7 @@ ...@@ -498,7 +498,7 @@
} }
} }
.active{ .active{
background-color: #f2f2f2; background-color: #b9b9b9;
padding:8px; padding:8px;
padding-left: 15px; padding-left: 15px;
border-radius: 8px; border-radius: 8px;
......
...@@ -24,19 +24,24 @@ ...@@ -24,19 +24,24 @@
HOME HOME
</a> </a>
</li> </li>
<li class="nav-item" *ngIf="loginDetails">
<a class="nav-link" (click)="goToPage('dashboard')">
DASHBOARD
</a>
</li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" (click)="goToPage('purchaseHome')"> <a class="nav-link" (click)="goToPage('purchaseHome')">
PURCHASE PURCHASE
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link base_arrow dropdown"> <a class="nav-link base_arrow dropdown" data-toggle="dropdown">
<div class="dropdown-toggle" data-toggle="dropdown"> <div class="dropdown-toggle">
CAR OWNERS CAR OWNERS
</div> </div>
<div class="dropdown-menu"> <div class="dropdown-menu">
<a class="dropdown-item">My Dashboard</a> <a class="dropdown-item" *ngIf="loginDetails" (click)="goToPage('dashboard')">My Dashboard</a>
<a class="dropdown-item">Find parts and accessories</a> <a class="dropdown-item" (click)="goToPage('purchaseHome')">Find parts and accessories</a>
<a class="dropdown-item">Rewards</a> <a class="dropdown-item">Rewards</a>
<a class="dropdown-item">Messages</a> <a class="dropdown-item">Messages</a>
<a class="dropdown-item">Request a Service </a> <a class="dropdown-item">Request a Service </a>
...@@ -78,8 +83,6 @@ ...@@ -78,8 +83,6 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="dropdown-menu"> <div class="dropdown-menu">
<a class="dropdown-item" (click)="goToPage('dashboard')">
My Dashboard</a>
<a class="dropdown-item" (click)="logout()">Logout</a> <a class="dropdown-item" (click)="logout()">Logout</a>
</div> </div>
</a> </a>
...@@ -110,7 +113,7 @@ ...@@ -110,7 +113,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<button class="facebook_btn"> <button class="facebook_btn" (click)="signInWithFB()">
Sign Up with Facebook <img src="assets/images/asset_fb1.png"> Sign Up with Facebook <img src="assets/images/asset_fb1.png">
</button> </button>
</div> </div>
...@@ -203,7 +206,7 @@ ...@@ -203,7 +206,7 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<h6><a (click)="resetForm()" data-dismiss="modal" data-toggle="modal" data-target="#login">Sign In</a> OR <a>Continue as guest</a></h6> <h6><a (click)="resetForm()" data-dismiss="modal" data-toggle="modal" data-target="#login">Sign In</a> OR <a (click)="cntueGustBtn()">Continue as guest</a></h6>
</div> </div>
</div> </div>
</div> </div>
...@@ -232,7 +235,7 @@ ...@@ -232,7 +235,7 @@
<h3>SIGN IN</h3> <h3>SIGN IN</h3>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<button class="facebook_btn"> <button class="facebook_btn" (click)="signInWithFB()">
Sign in with Facebook <img src="assets/images/asset_fb1.png"> Sign in with Facebook <img src="assets/images/asset_fb1.png">
</button> </button>
</div> </div>
...@@ -287,7 +290,7 @@ ...@@ -287,7 +290,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<h6>Do you have an account? <a data-dismiss="modal" data-toggle="modal" data-target="#signup">Sign Up</a> OR <a>Continue as guest</a></h6> <h6>Do you have an account? <a data-dismiss="modal" data-toggle="modal" data-target="#signup">Sign Up</a> OR <a (click)="cntueGustBtn()">Continue as guest</a></h6>
</div> </div>
</div> </div>
</div> </div>
...@@ -389,9 +392,10 @@ ...@@ -389,9 +392,10 @@
'input_success': autospsignupForm.controls['password'].valid}" (click)="spSignupSubmitClick = false"> 'input_success': autospsignupForm.controls['password'].valid}" (click)="spSignupSubmitClick = false">
<div class="s_error" *ngIf="autospsignupForm.controls['password'].invalid && (autospsignupForm.controls['password'].touched || spSignupSubmitClick)"> <div class="s_error" *ngIf="autospsignupForm.controls['password'].invalid && (autospsignupForm.controls['password'].touched || spSignupSubmitClick)">
<div class="s_validation" *ngIf="autospsignupForm.controls['password'].hasError('required')">{{errorMsg.errorList.required}} </div> <div class="s_validation" *ngIf="autospsignupForm.controls['password'].hasError('required')">{{errorMsg.errorList.required}} </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<input class="" type="email" placeholder="Email" formControlName="email" <input class="" type="email" placeholder="Email" formControlName="email"
...@@ -415,6 +419,14 @@ ...@@ -415,6 +419,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-12">
<select formControlName="shop_id">
<option [attr.value]="0" [attr.selected]=true [attr.disabled]="true">Select Mechanic Shop</option>
<option *ngFor="let shop of mechShop" [attr.value]="shop.shop_id">{{shop.shop_name}}</option>
</select>
</div>
</div>
<div *ngIf="spSignupResponse" class="s_alert" [ngClass]="(spSignupResponse.status == 'success') ? 'alert-success' : 'alert-danger'"> <div *ngIf="spSignupResponse" class="s_alert" [ngClass]="(spSignupResponse.status == 'success') ? 'alert-success' : 'alert-danger'">
<strong>{{spSignupResponse.message}}<br></strong> <strong>{{spSignupResponse.message}}<br></strong>
</div> </div>
......
...@@ -213,6 +213,27 @@ ...@@ -213,6 +213,27 @@
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }
select{
border: 1px solid #1e1e1e;
height: 40px;
width: 100%;
border-radius: 10px;
font-size: 16px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius:10px;
-o-border-radius: 10px;
text-align: center;
option{
text-align: center;
}
&::placeholder {
color: #bbbbbb;
}
&:focus {
outline: none;
}
}
input { input {
border: 1px solid #1e1e1e; border: 1px solid #1e1e1e;
height: 40px; height: 40px;
......
...@@ -5,6 +5,9 @@ import { ValidationService } from './../provider/validation.service'; ...@@ -5,6 +5,9 @@ import { ValidationService } from './../provider/validation.service';
import { WebService } from './../provider/web.service'; import { WebService } from './../provider/web.service';
import { SubjectService } from './../provider/subject.service'; import { SubjectService } from './../provider/subject.service';
import { ImageStorage } from '../../environments/server.config'; import { ImageStorage } from '../../environments/server.config';
import { AuthService } from "angularx-social-login";
import { FacebookLoginProvider, GoogleLoginProvider } from "angularx-social-login";
import { SocialUser } from "angularx-social-login";
declare var $; declare var $;
declare const window: any; declare const window: any;
...@@ -14,27 +17,32 @@ declare const window: any; ...@@ -14,27 +17,32 @@ declare const window: any;
templateUrl: './navbar.component.html', templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.scss'] styleUrls: ['./navbar.component.scss']
}) })
export class NavbarComponent implements OnInit { export class NavbarComponent implements OnInit {
data : any; data : any;
loader : boolean;
imageServer : any; imageServer : any;
loginDetails : any; loginDetails : any;
loginResponse : any; loginResponse : any;
forgotResponse : any; forgotResponse : any;
signupResponse : any; signupResponse : any;
spSignupResponse : any; spSignupResponse : any;
mechShop : any;
loader : boolean;
loginSubmitClick : boolean; loginSubmitClick : boolean;
forgotSubmitClick : boolean; forgotSubmitClick : boolean;
signupSubmitClick : boolean; signupSubmitClick : boolean;
spSignupSubmitClick : boolean; spSignupSubmitClick : boolean;
private user: SocialUser;
private loggedIn: boolean;
constructor ( constructor (
private router : Router, private router : Router,
private route : ActivatedRoute, private route : ActivatedRoute,
public errorMsg : ValidationService, public errorMsg : ValidationService,
public webService : WebService, public webService : WebService,
public subjectService : SubjectService) { public subjectService : SubjectService,
private authService : AuthService) {
this.imageServer = ImageStorage; this.imageServer = ImageStorage;
this.loginDetails = false; this.loginDetails = false;
this.loginSubmitClick = false; this.loginSubmitClick = false;
...@@ -56,8 +64,12 @@ export class NavbarComponent implements OnInit { ...@@ -56,8 +64,12 @@ export class NavbarComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.subjectService.getLoginData().subscribe(loginData => { this.subjectService.getLoginData().subscribe(loginData => {
this.loginDetails = JSON.parse(this.webService.getLocalStorageItem('userData')); this.loginDetails = JSON.parse(this.webService.getLocalStorageItem('userData'));
if(!this.loginDetails){
this.facebookSignUp();
}
}); });
this.getMechanicShops();
this.loginForm = new FormGroup({ this.loginForm = new FormGroup({
email: new FormControl('', [Validators.required, Validators.maxLength(50), Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$')]), email: new FormControl('', [Validators.required, Validators.maxLength(50), Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$')]),
password: new FormControl('', [Validators.required, Validators.maxLength(16), Validators.minLength(6)]) password: new FormControl('', [Validators.required, Validators.maxLength(16), Validators.minLength(6)])
...@@ -83,10 +95,66 @@ export class NavbarComponent implements OnInit { ...@@ -83,10 +95,66 @@ export class NavbarComponent implements OnInit {
phone: new FormControl('', [Validators.required, Validators.pattern("^[0-9\ ( ) + , - ]+$")]), phone: new FormControl('', [Validators.required, Validators.pattern("^[0-9\ ( ) + , - ]+$")]),
password: new FormControl('', [Validators.required, Validators.maxLength(16), Validators.minLength(6)]), password: new FormControl('', [Validators.required, Validators.maxLength(16), Validators.minLength(6)]),
last_name: new FormControl('', [Validators.required, Validators.pattern("^[a-zA-Z\ _ - ' \/]+$")]), last_name: new FormControl('', [Validators.required, Validators.pattern("^[a-zA-Z\ _ - ' \/]+$")]),
first_name: new FormControl('', [Validators.required, Validators.pattern("^[a-zA-Z\ _ - ' \/]+$")]) first_name: new FormControl('', [Validators.required, Validators.pattern("^[a-zA-Z\ _ - ' \/]+$")]),
shop_id: new FormControl('')
}); });
} }
signInWithFB(): void {
this.authService.signIn(FacebookLoginProvider.PROVIDER_ID);
}
signOut(): void {
this.authService.signOut();
}
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)
});
}
});
}
cntueGustBtn(){
this.loginModal.nativeElement.click();
this.signupModal.nativeElement.click();
}
getMechanicShops(){
this.loader = true;
this.webService.get_data('getMechanicShops').subscribe(response => {
if(response.status == 'success'){
this.mechShop = response.data;
}else{
this.mechShop = false;
}
this.loader = false;
})
}
loginSubmit(data) { loginSubmit(data) {
if(this.loginForm.invalid){ if(this.loginForm.invalid){
return false; return false;
...@@ -241,10 +309,12 @@ export class NavbarComponent implements OnInit { ...@@ -241,10 +309,12 @@ export class NavbarComponent implements OnInit {
} }
logout() { logout() {
this.signOut();
const userData = this.webService.getLocalStorageItem('userData'); const userData = this.webService.getLocalStorageItem('userData');
this.webService.removeLocalStorageItem(userData); this.webService.removeLocalStorageItem(userData);
this.subjectService.sendLoginData(false); this.subjectService.sendLoginData(false);
this.router.navigate(['../index']); this.router.navigate(['../index']);
} }
} }
...@@ -47,13 +47,13 @@ export class AddaddressComponent implements OnInit { ...@@ -47,13 +47,13 @@ export class AddaddressComponent implements OnInit {
this.address_id = params['address_id']; this.address_id = params['address_id'];
}); });
}); });
if(this.address_id != ''){
this.getUserAddressById(this.address_id);
}
this.checkUserLogin(); this.checkUserLogin();
this.checkProductId(); this.checkProductId();
this.buildAddressForm(); this.buildAddressForm();
if(this.address_id > 0){
this.getUserAddressById(this.address_id);
}
} }
buildAddressForm(){ buildAddressForm(){
...@@ -69,14 +69,6 @@ export class AddaddressComponent implements OnInit { ...@@ -69,14 +69,6 @@ export class AddaddressComponent implements OnInit {
}); });
} }
// checkProductId(product_id){
// if(product_id > 0){
// this.product_id = product_id;
// }else{
// this.goToPage('purchaseHome','');
// }
// }
checkProductId(){ checkProductId(){
this.prdtData = JSON.parse(this.webService.getLocalStorageItem('productDetails')); this.prdtData = JSON.parse(this.webService.getLocalStorageItem('productDetails'));
......
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
</div> </div>
</ul> </ul>
<ng-template #noAddress> <ng-template #noAddress>
Address is Not Added! <div class="cmn_nodata">
<img src="../../../assets/images/no_result.png">
<p>Address is Not Added!</p>
</div>
</ng-template> </ng-template>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
......
...@@ -42,7 +42,6 @@ export class AddressComponent implements OnInit { ...@@ -42,7 +42,6 @@ export class AddressComponent implements OnInit {
checkProductId(){ checkProductId(){
this.prdtData = JSON.parse(this.webService.getLocalStorageItem('productDetails')); this.prdtData = JSON.parse(this.webService.getLocalStorageItem('productDetails'));
console.log(this.prdtData)
if(this.prdtData && this.prdtData['product_id'] > 0){ if(this.prdtData && this.prdtData['product_id'] > 0){
this.product_id = this.prdtData['product_id']; this.product_id = this.prdtData['product_id'];
}else{ }else{
......
...@@ -43,7 +43,11 @@ ...@@ -43,7 +43,11 @@
</li> </li>
</ul> </ul>
<ng-template #noCart> <ng-template #noCart>
No Data Found <div class="cmn_nodata">
<img src="../../../assets/images/no_result.png">
<p>No Data Found</p>
</div>
</ng-template> </ng-template>
</div> </div>
</div> </div>
...@@ -57,7 +61,7 @@ ...@@ -57,7 +61,7 @@
<div class="product_wrapper"> <div class="product_wrapper">
<img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'"> <img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div> </div>
<h5>{{prdt.product_name}}</h5> <h5 class="text_truncate" data-toggle="pill" tooltip="{{prdt.product_name}}" placement="top" show-delay="500" z-index="99999">{{prdt.product_name}}</h5>
<p>{{prdt.short_description}}</p> <p>{{prdt.short_description}}</p>
<div class="star_ratting prevent-click"> <div class="star_ratting prevent-click">
<fieldset class="rating"> <fieldset class="rating">
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
padding: 10px; padding: 10px;
img{ img{
height: 180px; height: 180px;
width: auto; max-width: 100%;
} }
} }
h5{ h5{
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</app-searchbar> </app-searchbar>
<div class="loader_overlay" *ngIf="loader"></div> <div class="loader_overlay" *ngIf="loader"></div>
<div class="myorder_wrapper"> <div class="myorder_wrapper">
<ul *ngIf="bookedData" infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [scrollWindow]="false" style="max-height: 700px; overflow: scroll"> <ul *ngIf="bookedData;else noOrders" infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [scrollWindow]="false" style="max-height: 700px; overflow: scroll">
<li *ngFor="let book of bookedData"> <li *ngFor="let book of bookedData">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<img src="{{imageServer + book.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'"> <img src="{{imageServer + book.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div> </div>
<div class="auto_part_detail"> <div class="auto_part_detail">
<h2>{{book.product_name}}</h2> <h2 class="text_truncate" data-toggle="pill" tooltip="{{book.product_name}}" placement="top" show-delay="500" z-index="99999">{{book.product_name}}</h2>
<h3>{{book.short_description}}</h3> <h3>{{book.short_description}}</h3>
<div class="others"> <div class="others">
<!-- <h4><div>Color</div><span>Black</span></h4> --> <!-- <h4><div>Color</div><span>Black</span></h4> -->
...@@ -45,6 +45,13 @@ ...@@ -45,6 +45,13 @@
</div> </div>
</li> </li>
</ul> </ul>
<ng-template #noOrders>
<div class="cmn_nodata">
<img src="../../../assets/images/no_result.png">
<p>No Data Found</p>
</div>
</ng-template>
</div> </div>
</div> </div>
<div class="bottom_product_list"> <div class="bottom_product_list">
...@@ -53,11 +60,11 @@ ...@@ -53,11 +60,11 @@
<ngx-carousel [inputs]="carouselTile" (carouselLoad)="carouselTileLoad()" *ngIf="trendingProductData"> <ngx-carousel [inputs]="carouselTile" (carouselLoad)="carouselTileLoad()" *ngIf="trendingProductData">
<ngx-tile NgxCarouselItem *ngFor="let prdt of trendingProductData"> <ngx-tile NgxCarouselItem *ngFor="let prdt of trendingProductData">
<li (click)="latestPrdtDtls(prdt.product_id)"> <li (click)="latestPrdtDtls(prdt.product_id)">
<div class="inner_div_product"> <div class="inner_div_product cpoint">
<div class="product_wrapper"> <div class="product_wrapper">
<img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'"> <img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div> </div>
<h5>{{prdt.product_name}}</h5> <h5 class="text_truncate" data-toggle="pill" tooltip="{{prdt.product_name}}" placement="top" show-delay="500" z-index="99999">{{prdt.product_name}}</h5>
<p>{{prdt.short_description}}</p> <p>{{prdt.short_description}}</p>
<div class="star_ratting"> <div class="star_ratting">
<fieldset class="rating prevent-click"> <fieldset class="rating prevent-click">
......
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
padding: 10px; padding: 10px;
img{ img{
height: 180px; height: 180px;
width: auto; max-width: 100%;
} }
} }
h5{ h5{
......
...@@ -18,10 +18,11 @@ ...@@ -18,10 +18,11 @@
</div> </div>
<div class="col-md-8" *ngIf="productDetails"> <div class="col-md-8" *ngIf="productDetails">
<div class="product_details"> <div class="product_details">
<h1>{{productDetails.product_name}}</h1> <h1 class="text_truncate" data-toggle="pill" tooltip="{{productDetails.product_name}}" placement="top" show-delay="500" z-index="99999">{{productDetails.product_name}}</h1>
<h2>{{productDetails.short_description}}</h2> <h2>{{productDetails.short_description}}</h2>
<h4><div>Brand</div><span>{{productDetails.brand_name}}</span></h4> <h2><strong>Brand : </strong>{{productDetails.brand_name}}</h2>
<h4><div>Part ID</div><span>PRD152685425</span></h4> <div *ngIf="productDetails.part_id">
<h2><strong>Part ID : </strong>{{productDetails.part_id}}</h2></div>
<h3>$ {{productDetails.amount}}</h3> <h3>$ {{productDetails.amount}}</h3>
<div class="rating_div" *ngIf="productDetails.rating"> <div class="rating_div" *ngIf="productDetails.rating">
<fieldset class="rating prevent-click"> <fieldset class="rating prevent-click">
...@@ -113,7 +114,7 @@ ...@@ -113,7 +114,7 @@
<ngx-carousel [inputs]="carouselTile" (carouselLoad)="carouselTileLoad()" *ngIf="trendingProductData"> <ngx-carousel [inputs]="carouselTile" (carouselLoad)="carouselTileLoad()" *ngIf="trendingProductData">
<ngx-tile NgxCarouselItem *ngFor="let prdt of trendingProductData" > <ngx-tile NgxCarouselItem *ngFor="let prdt of trendingProductData" >
<li (click)="latestPrdtDtls(prdt.product_id)"> <li (click)="latestPrdtDtls(prdt.product_id)">
<div class="inner_div_product"> <div class="inner_div_product cpoint">
<div class="product_wrapper"> <div class="product_wrapper">
<img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'"> <img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div> </div>
......
...@@ -52,7 +52,6 @@ export class ProductdetailsComponent implements OnInit { ...@@ -52,7 +52,6 @@ export class ProductdetailsComponent implements OnInit {
this.route.queryParams.subscribe(params => { this.route.queryParams.subscribe(params => {
this.product_id = params['product_id']; this.product_id = params['product_id'];
}); });
this.getProductDetails();
}); });
if(!this.product_id){ if(!this.product_id){
...@@ -70,6 +69,7 @@ export class ProductdetailsComponent implements OnInit { ...@@ -70,6 +69,7 @@ export class ProductdetailsComponent implements OnInit {
this.designModules(); this.designModules();
this.checkUserLogin(); this.checkUserLogin();
this.trendingProducts(); this.trendingProducts();
this.getProductDetails();
} }
checkUserLogin(){ checkUserLogin(){
...@@ -81,7 +81,11 @@ export class ProductdetailsComponent implements OnInit { ...@@ -81,7 +81,11 @@ export class ProductdetailsComponent implements OnInit {
getProductDetails(){ getProductDetails(){
this.loader = true; this.loader = true;
this.webService.post_data('SingleProductSearch',{"product_id":this.product_id,'page':this.page}).subscribe(response => { let user_id: number = 0;
if(this.loginDetails && this.loginDetails.customer_id){
user_id = this.loginDetails.customer_id;
}
this.webService.post_data('SingleProductSearch',{"product_id":this.product_id,'page':this.page,'user_id':user_id}).subscribe(response => {
if(response.status == 'success'){ if(response.status == 'success'){
let image: string = ''; let image: string = '';
let imageArr: any[] = new Array(); let imageArr: any[] = new Array();
......
...@@ -28,23 +28,24 @@ ...@@ -28,23 +28,24 @@
<h6 href="#ac3" data-toggle="collapse">Vehicle Information</h6> <h6 href="#ac3" data-toggle="collapse">Vehicle Information</h6>
<ul id="ac3" class="collapse in show"> <ul id="ac3" class="collapse in show">
<h6 class="backgroundNone borderNone"> <h6 class="backgroundNone borderNone">
<select> <select (change)="get_year($event.target.value)">
<option> <option [attr.value]="0" [attr.selected]=true [attr.disabled]="true">Select Year</option>
Year <option *ngFor="let date of modelDates">{{date}}</option>
</option>
</select> </select>
</h6> </h6>
<h6 class="backgroundNone borderNone"> <h6 class="backgroundNone borderNone">
<select> <select (change)="get_model($event.target.value)">
<option> <option [attr.value]="0" [attr.selected]=true [attr.disabled]="true">Select Maker</option>
Model <option *ngFor="let brands of carBrands" value="{{brands.veh_brand_id}}">
{{brands.maker}}
</option> </option>
</select> </select>
</h6> </h6>
<h6 class="backgroundNone borderNone"> <h6 class="backgroundNone borderNone">
<select> <select (change)="getModelResult($event.target.value)" *ngIf="modelShow">
<option> <option [attr.value]="0" [attr.selected]=true [attr.disabled]="true">Select Model</option>
Make <option *ngFor="let models of carModel" value="{{models.veh_modal_id}}">
{{models.model}}
</option> </option>
</select> </select>
</h6> </h6>
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
</div> </div>
</div> </div>
<div class="loader_overlay" *ngIf="loader"></div> <div class="loader_overlay" *ngIf="loader"></div>
<div class="search_listing_content" *ngIf="productArray && productArray.length > 0;else noProductData"> <div class="search_listing_content cpoint" *ngIf="productArray && productArray.length > 0;else noProductData">
<ul infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [scrollWindow]="false" style="max-height: 700px; overflow: scroll"> <ul infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [scrollWindow]="false" style="max-height: 700px; overflow: scroll">
<li *ngFor="let prdt of productArray"> <li *ngFor="let prdt of productArray">
<div class="inner_div_product cpoint" (click)="getSingleProductDetails(prdt.product_id)"> <div class="inner_div_product cpoint" (click)="getSingleProductDetails(prdt.product_id)">
...@@ -76,7 +77,7 @@ ...@@ -76,7 +77,7 @@
<h5>{{prdt.product_name}}</h5> <h5>{{prdt.product_name}}</h5>
<p>{{prdt.short_description}}</p> <p>{{prdt.short_description}}</p>
<div class="star_ratting"> <div class="star_ratting">
<fieldset class="rating prevent-click hide"> <fieldset class="rating prevent-click">
<input type="radio" [checked]="(prdt.rating >= 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_5'" [attr.name]="'usrReviewName_'+prdt.product_id" value="5" /><label class = "full" for="secondStar5"></label> <input type="radio" [checked]="(prdt.rating >= 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_5'" [attr.name]="'usrReviewName_'+prdt.product_id" value="5" /><label class = "full" for="secondStar5"></label>
<input type="radio" [checked]="(prdt.rating >= 4.25 && prdt.rating < 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_4half'" [attr.name]="'usrReviewName_'+prdt.product_id" value="4.5" /><label class="half" for="secondStar4half"></label> <input type="radio" [checked]="(prdt.rating >= 4.25 && prdt.rating < 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_4half'" [attr.name]="'usrReviewName_'+prdt.product_id" value="4.5" /><label class="half" for="secondStar4half"></label>
<input type="radio" [checked]="(prdt.rating >= 3.75 && prdt.rating < 4.25) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_4'" [attr.name]="'usrReviewName_'+prdt.product_id" value="4" /><label class = "full" for="secondStar4"></label> <input type="radio" [checked]="(prdt.rating >= 3.75 && prdt.rating < 4.25) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_4'" [attr.name]="'usrReviewName_'+prdt.product_id" value="4" /><label class = "full" for="secondStar4"></label>
...@@ -100,17 +101,6 @@ ...@@ -100,17 +101,6 @@
No Data Found No Data Found
</ng-template> </ng-template>
<hr> <hr>
<!-- <div class="pagination">
<ul>
<li class="prev"><</li>
<li class="select">1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li class="next">></li>
</ul>
</div> -->
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
......
...@@ -282,6 +282,7 @@ ...@@ -282,6 +282,7 @@
.rating { .rating {
border: none; border: none;
float: left; float: left;
position: relative;
} }
.rating > input { display: none; } .rating > input { display: none; }
......
...@@ -22,6 +22,10 @@ export class ProductlistComponent implements OnInit { ...@@ -22,6 +22,10 @@ export class ProductlistComponent implements OnInit {
page: number = 1; page: number = 1;
total_page: number = 1; total_page: number = 1;
filterParam: any = new Array(); filterParam: any = new Array();
modelDates: number[] = new Array();
carBrands:any;
carModel:any;
modelShow :boolean;
constructor( constructor(
private router : Router, private router : Router,
...@@ -29,6 +33,7 @@ export class ProductlistComponent implements OnInit { ...@@ -29,6 +33,7 @@ export class ProductlistComponent implements OnInit {
public webService : WebService public webService : WebService
){ ){
this.loader = true; this.loader = true;
this.modelShow = false;
this.productArray = []; this.productArray = [];
this.filterParam = {"key":'',"brand_id":Array(),"minPrice":'',"maxPrice":'','page':1}; this.filterParam = {"key":'',"brand_id":Array(),"minPrice":'',"maxPrice":'','page':1};
this.imageServer = ImageStorage; this.imageServer = ImageStorage;
...@@ -50,6 +55,48 @@ export class ProductlistComponent implements OnInit { ...@@ -50,6 +55,48 @@ export class ProductlistComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.getBrand(); this.getBrand();
this.getYear();
this.getVehBrand();
}
getYear(){
let currentYear = Number((new Date()).getFullYear());
let startingYear = currentYear - 110;
for (let date = currentYear ; date >= startingYear ; date --) {
this.modelDates.push(date);
}
}
getVehBrand(){
this.loader=true;
this.webService.get_data('getVehicleBrand').subscribe(response => {
if(response.status == 'success'){
this.carBrands = response.data;
}
this.loader = false;
});
}
get_model(brand_id) {
this.page = 1;
this.loader = true;
this.webService.post_data('getVehicleModel',{'vehBrand_id':brand_id}).subscribe(response => {
if(response.status == 'success'){
this.modelShow = true;
this.carModel = response.data;
this.filterParam.page = this.page;
this.filterParam.maker = brand_id;
this.getProductDetails(this.filterParam);
}
this.loader = false;
});
}
getModelResult(modelId){
this.page = 1;
this.filterParam.page = this.page;
this.filterParam.model = modelId;
this.getProductDetails(this.filterParam);
} }
goToPage(path,data=null){ goToPage(path,data=null){
...@@ -124,4 +171,11 @@ export class ProductlistComponent implements OnInit { ...@@ -124,4 +171,11 @@ export class ProductlistComponent implements OnInit {
this.filterParam.maxPrice = top; this.filterParam.maxPrice = top;
this.getProductDetails(this.filterParam); this.getProductDetails(this.filterParam);
} }
get_year(year){
this.page = 1;
this.filterParam.page = this.page;
this.filterParam.year = year;
this.getProductDetails(this.filterParam);
}
} }
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
<div class="loader_overlay" *ngIf="loader"></div> <div class="loader_overlay" *ngIf="loader"></div>
<ngx-carousel [inputs]="carouselTile" (carouselLoad)="carouselTileLoad()" *ngIf="latestProductData"> <ngx-carousel [inputs]="carouselTile" (carouselLoad)="carouselTileLoad()" *ngIf="latestProductData">
<ngx-tile NgxCarouselItem *ngFor="let prdt of latestProductData"> <ngx-tile NgxCarouselItem *ngFor="let prdt of latestProductData">
<li (click)="latestPrdtDtls(prdt.product_id)" > <li (click)="latestPrdtDtls(prdt.product_id)" >
<div class="inner_div_product"> <div class="inner_div_product cpoint">
<div class="product_wrapper"> <div class="product_wrapper">
<img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'"> <img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div> </div>
<h5>{{prdt.product_name}}</h5> <h5 class="text_truncate" data-toggle="pill" tooltip="{{prdt.product_name}}" placement="top" show-delay="500" z-index="99999">{{prdt.product_name}}</h5>
<p>{{prdt.short_description}}</p> <p>{{prdt.short_description}}</p>
<div class="star_ratting"> <div class="star_ratting">
<fieldset class="rating prevent-click"> <fieldset class="rating prevent-click">
...@@ -52,15 +52,15 @@ ...@@ -52,15 +52,15 @@
<div class="loader_overlay" *ngIf="trend_loader"></div> <div class="loader_overlay" *ngIf="trend_loader"></div>
<ul *ngIf="trendingProductData" <ul *ngIf="trendingProductData"
infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [scrollWindow]="false" style="max-height: 700px; overflow: scroll"> infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [scrollWindow]="false" style="max-height: 700px; overflow: scroll">
<li (click)="latestPrdtDtls(prdt.product_id)" *ngFor="let prdt of trendingProductData" > <li *ngFor="let prdt of trendingProductData" >
<div class="inner_div_product"> <div class="inner_div_product cpoint" (click)="latestPrdtDtls(prdt.product_id)" >
<div class="product_wrapper"> <div class="product_wrapper">
<img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'"> <img src="{{imageServer + prdt.product_image}}" onerror="this.src='assets/images/user_avatar.jpg'">
</div> </div>
<h5>{{prdt.product_name}}</h5> <h5 class="text_truncate" data-toggle="pill" tooltip="{{prdt.product_name}}" placement="top" show-delay="500" z-index="99999">{{prdt.product_name}}</h5>
<p>{{prdt.short_description}}</p> <p>{{prdt.short_description}}</p>
<div class="star_ratting"> <div class="star_ratting">
<fieldset class="rating prevent-click hide"> <fieldset class="rating prevent-click">
<input type="radio" [checked]="(prdt.rating >= 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_5'" [attr.name]="'usrReviewName_'+prdt.product_id" value="5" /><label class = "full" for="secondStar5"></label> <input type="radio" [checked]="(prdt.rating >= 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_5'" [attr.name]="'usrReviewName_'+prdt.product_id" value="5" /><label class = "full" for="secondStar5"></label>
<input type="radio" [checked]="(prdt.rating >= 4.25 && prdt.rating < 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_4half'" [attr.name]="'usrReviewName_'+prdt.product_id" value="4.5" /><label class="half" for="secondStar4half"></label> <input type="radio" [checked]="(prdt.rating >= 4.25 && prdt.rating < 4.75) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_4half'" [attr.name]="'usrReviewName_'+prdt.product_id" value="4.5" /><label class="half" for="secondStar4half"></label>
<input type="radio" [checked]="(prdt.rating >= 3.75 && prdt.rating < 4.25) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_4'" [attr.name]="'usrReviewName_'+prdt.product_id" value="4" /><label class = "full" for="secondStar4"></label> <input type="radio" [checked]="(prdt.rating >= 3.75 && prdt.rating < 4.25) ? 'true':''" [attr.id]="'usrReviewId_'+prdt.product_id+'_4'" [attr.name]="'usrReviewName_'+prdt.product_id" value="4" /><label class = "full" for="secondStar4"></label>
......
...@@ -289,6 +289,7 @@ ...@@ -289,6 +289,7 @@
.rating { .rating {
border: none; border: none;
float: left; float: left;
position: relative;
} }
.rating > input { display: none; } .rating > input { display: none; }
...@@ -302,7 +303,7 @@ ...@@ -302,7 +303,7 @@
.rating > .half:before { .rating > .half:before {
content: "\f089"; content: "\f089";
position: absolute; position: absolute;
} }
.rating > label { .rating > label {
......
...@@ -20,6 +20,7 @@ export class PurchaseHomeComponent implements OnInit { ...@@ -20,6 +20,7 @@ export class PurchaseHomeComponent implements OnInit {
trend_loader:boolean; trend_loader:boolean;
latestProductData:any; latestProductData:any;
trendingProductData:any; trendingProductData:any;
loginDetails:any;
@ViewChild("failureModel") public failureModelRef: ElementRef; @ViewChild("failureModel") public failureModelRef: ElementRef;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="purchase_other"> <div class="purchase_other" *ngIf="loginDetails">
<ul> <ul>
<li (click)="goToPage('orders')"> <li (click)="goToPage('orders')">
<img src="assets/images/asset_cart.png"> <img src="assets/images/asset_cart.png">
......
...@@ -2,6 +2,7 @@ import { Component, OnInit, ElementRef, ViewChild } from '@angular/core'; ...@@ -2,6 +2,7 @@ import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router'; import { Router,ActivatedRoute } from '@angular/router';
import { WebService } from '../../provider/web.service'; import { WebService } from '../../provider/web.service';
import { ImageStorage } from '../../../environments/server.config'; import { ImageStorage } from '../../../environments/server.config';
import { SubjectService } from '../../provider/subject.service';
@Component({ @Component({
selector: 'app-searchbar', selector: 'app-searchbar',
...@@ -13,17 +14,29 @@ export class SearchbarComponent implements OnInit { ...@@ -13,17 +14,29 @@ export class SearchbarComponent implements OnInit {
productArray: any; productArray: any;
SingleProductData:any; SingleProductData:any;
imageServer: string; imageServer: string;
loginDetails:any;
public scrollbarOptions = { axis: 'y', theme: 'minimal-dark' }; public scrollbarOptions = { axis: 'y', theme: 'minimal-dark' };
@ViewChild("productSearch") public productSearchRef: ElementRef; @ViewChild("productSearch") public productSearchRef: ElementRef;
constructor(private router : Router, private route: ActivatedRoute, public webService: WebService) { constructor(private router : Router,
private route: ActivatedRoute,
public webService: WebService,
public subjectService : SubjectService) {
this.productArray = true; this.productArray = true;
this.imageServer = ImageStorage; this.imageServer = ImageStorage;
} }
ngOnInit() { ngOnInit() {
this.checkUserLogin();
}
checkUserLogin(){
this.loginDetails = JSON.parse(this.webService.getLocalStorageItem('userData'));
this.subjectService.getLoginData().subscribe(loginData => {
this.loginDetails = JSON.parse(this.webService.getLocalStorageItem('userData'));
});
} }
goToPage(path,data=null){ goToPage(path,data=null){
...@@ -38,7 +51,6 @@ export class SearchbarComponent implements OnInit { ...@@ -38,7 +51,6 @@ export class SearchbarComponent implements OnInit {
} }
this.webService.post_data('productSearch',{"key":product}).subscribe(response => { this.webService.post_data('productSearch',{"key":product}).subscribe(response => {
if(response.status == 'success'){ if(response.status == 'success'){
console.log(response.data)
this.productArray = response.data; this.productArray = response.data;
} else { } else {
this.productArray = false; this.productArray = false;
......
src/assets/images/asset_login_bg.png

508 KB | W: | H:

src/assets/images/asset_login_bg.png

60.8 KB | W: | H:

src/assets/images/asset_login_bg.png
src/assets/images/asset_login_bg.png
src/assets/images/asset_login_bg.png
src/assets/images/asset_login_bg.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/images/order_banner.png

139 KB | W: | H:

src/assets/images/order_banner.png

25.1 KB | W: | H:

src/assets/images/order_banner.png
src/assets/images/order_banner.png
src/assets/images/order_banner.png
src/assets/images/order_banner.png
  • 2-up
  • Swipe
  • Onion skin
let apiConfigUrl,imageStorageUrl; let apiConfigUrl,imageStorageUrl;
// // Localhost // Localhost
// apiConfigUrl = 'http://localhost/dcarfixers/Webservices/'; apiConfigUrl = 'http://localhost/dcarfixers/Webservices/';
// imageStorageUrl = 'http://localhost/dcarfixers/'; imageStorageUrl = 'http://localhost/dcarfixers/';
// // Techlabz // // Techlabz
apiConfigUrl = 'https://techlabz.in/dcarfixers/Webservices/'; // apiConfigUrl = 'https://techlabz.in/dcarfixers/Webservices/';
imageStorageUrl = 'https://techlabz.in/dcarfixers/'; // imageStorageUrl = 'https://techlabz.in/dcarfixers/';
// carfixxers.com // // carfixxers.com
// apiConfigUrl = 'https://carfixxers.com/admin/Webservices/'; // apiConfigUrl = 'https://carfixxers.com/admin/Webservices/';
// imageStorageUrl = 'https://carfixxers.com/admin/'; // imageStorageUrl = 'https://carfixxers.com/admin/';
......
...@@ -852,3 +852,19 @@ bs-datepicker-container{ ...@@ -852,3 +852,19 @@ bs-datepicker-container{
padding-bottom: 50px; padding-bottom: 50px;
} }
.cmn_nodata{
text-align: center;
padding-top:10%;
padding-bottom: 10%;
img{
width: 200px;
margin-bottom:50px;
}
p{
text-align: center;
color: #a8a8a8;
font-size: 24px;
font-weight: 300;
}
}
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