Commit 6cbd7354 by Tobin

Merge branch 'jensa' into 'master'

Jensa See merge request !46
parents 1576e39f 98b712b8
...@@ -379,8 +379,7 @@ ...@@ -379,8 +379,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -401,14 +400,12 @@ ...@@ -401,14 +400,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -423,20 +420,17 @@ ...@@ -423,20 +420,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
...@@ -553,8 +547,7 @@ ...@@ -553,8 +547,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
...@@ -566,7 +559,6 @@ ...@@ -566,7 +559,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
...@@ -581,7 +573,6 @@ ...@@ -581,7 +573,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -595,7 +586,6 @@ ...@@ -595,7 +586,6 @@
"version": "2.3.5", "version": "2.3.5",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.2", "safe-buffer": "^5.1.2",
"yallist": "^3.0.0" "yallist": "^3.0.0"
...@@ -694,8 +684,7 @@ ...@@ -694,8 +684,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
...@@ -707,7 +696,6 @@ ...@@ -707,7 +696,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -793,8 +781,7 @@ ...@@ -793,8 +781,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -830,7 +817,6 @@ ...@@ -830,7 +817,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
...@@ -850,7 +836,6 @@ ...@@ -850,7 +836,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -894,14 +879,12 @@ ...@@ -894,14 +879,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.3", "version": "3.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
...@@ -1739,6 +1722,11 @@ ...@@ -1739,6 +1722,11 @@
"bootstrap": "^4.0.0-alpha.6" "bootstrap": "^4.0.0-alpha.6"
} }
}, },
"angularx-social-login": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/angularx-social-login/-/angularx-social-login-1.2.7.tgz",
"integrity": "sha512-ymzYuuYfWeIywVmswKYFMwC9n3oFxeIr3OpjL62afZig7rpVDvVGsxqFR3Kfjc2dThMRCvDVoq/vvGgO33fWKQ=="
},
"ansi-colors": { "ansi-colors": {
"version": "3.2.4", "version": "3.2.4",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz",
...@@ -2593,7 +2581,7 @@ ...@@ -2593,7 +2581,7 @@
}, },
"camelcase-keys": { "camelcase-keys": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
"requires": { "requires": {
"camelcase": "^2.0.0", "camelcase": "^2.0.0",
...@@ -4965,14 +4953,12 @@ ...@@ -4965,14 +4953,12 @@
}, },
"handlebars": { "handlebars": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.1.tgz", "resolved": "",
"integrity": "sha512-3Zhi6C0euYZL5sM0Zcy7lInLXKQ+YLcF/olbN010mzGQ4XVm50JeyBnMqofHh696GrciGruC7kCcApPDJvVgwA==",
"dev": true, "dev": true,
"requires": { "requires": {
"neo-async": "^2.6.0", "neo-async": "^2.6.0",
"optimist": "^0.6.1", "optimist": "^0.6.1",
"source-map": "^0.6.1", "source-map": "^0.6.1"
"uglify-js": "^3.1.4"
}, },
"dependencies": { "dependencies": {
"source-map": { "source-map": {
...@@ -6398,7 +6384,7 @@ ...@@ -6398,7 +6384,7 @@
}, },
"load-json-file": { "load-json-file": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": { "requires": {
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
...@@ -6410,7 +6396,7 @@ ...@@ -6410,7 +6396,7 @@
"dependencies": { "dependencies": {
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
} }
} }
...@@ -6748,7 +6734,7 @@ ...@@ -6748,7 +6734,7 @@
}, },
"meow": { "meow": {
"version": "3.7.0", "version": "3.7.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
"requires": { "requires": {
"camelcase-keys": "^2.0.0", "camelcase-keys": "^2.0.0",
...@@ -6765,7 +6751,7 @@ ...@@ -6765,7 +6751,7 @@
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
} }
} }
...@@ -7175,7 +7161,7 @@ ...@@ -7175,7 +7161,7 @@
"dependencies": { "dependencies": {
"semver": { "semver": {
"version": "5.3.0", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8="
} }
} }
...@@ -7259,7 +7245,7 @@ ...@@ -7259,7 +7245,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": { "requires": {
"ansi-styles": "^2.2.1", "ansi-styles": "^2.2.1",
...@@ -7276,7 +7262,7 @@ ...@@ -7276,7 +7262,7 @@
}, },
"supports-color": { "supports-color": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "resolved": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
} }
} }
...@@ -7571,7 +7557,7 @@ ...@@ -7571,7 +7557,7 @@
}, },
"os-locale": { "os-locale": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
"requires": { "requires": {
"lcid": "^1.0.0" "lcid": "^1.0.0"
...@@ -8437,7 +8423,7 @@ ...@@ -8437,7 +8423,7 @@
}, },
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
} }
} }
...@@ -8861,7 +8847,7 @@ ...@@ -8861,7 +8847,7 @@
"dependencies": { "dependencies": {
"source-map": { "source-map": {
"version": "0.4.4", "version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"requires": { "requires": {
"amdefine": ">=0.0.4" "amdefine": ">=0.0.4"
...@@ -10314,33 +10300,6 @@ ...@@ -10314,33 +10300,6 @@
"integrity": "sha1-tlQ6g8/Iwr77P0yPumiW9bDJvmg=", "integrity": "sha1-tlQ6g8/Iwr77P0yPumiW9bDJvmg=",
"dev": true "dev": true
}, },
"uglify-js": {
"version": "3.5.15",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.15.tgz",
"integrity": "sha512-fe7aYFotptIddkwcm6YuA0HmknBZ52ZzOsUxZEdhhkSsz7RfjHDX2QDxwKTiv4JQ5t5NhfmpgAK+J7LiDhKSqg==",
"dev": true,
"optional": true,
"requires": {
"commander": "~2.20.0",
"source-map": "~0.6.1"
},
"dependencies": {
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"dev": true,
"optional": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"optional": true
}
}
},
"ultron": { "ultron": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
......
...@@ -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">
<li *ngIf="(time > currentTime && ((dateSection[0] | date: 'dd') == currentDate))" 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>{{time | date:'hh:mm a'}}</p>
</label> </label>
</li> </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;
......
...@@ -44,7 +44,8 @@ export class DashboardComponent implements OnInit { ...@@ -44,7 +44,8 @@ export class DashboardComponent implements OnInit {
successBookDtls: any; successBookDtls: any;
profileEditResp: any; profileEditResp: any;
autocompleteVin: any; autocompleteVin: any;
carSearchJsonData: any; carBrands: any;
selBrand: string = '';
autocompleteDetails: any; autocompleteDetails: any;
optionalDescription: string; optionalDescription: string;
editProfileSubmitClick: boolean; editProfileSubmitClick: boolean;
...@@ -74,6 +75,8 @@ export class DashboardComponent implements OnInit { ...@@ -74,6 +75,8 @@ export class DashboardComponent implements OnInit {
step: number; step: number;
today: any = new Date(); today: any = new Date();
currDate: any; currDate: any;
currentDate: any;
currentTime: any;
nextDate: any; nextDate: any;
dateStep: number = 0; dateStep: number = 0;
dateSection: any[] = new Array(); dateSection: any[] = new Array();
...@@ -140,8 +143,9 @@ export class DashboardComponent implements OnInit { ...@@ -140,8 +143,9 @@ export class DashboardComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.currentTime = this.today.getTime();
this.currentDate = this.today.getDate();
this.tab = 'active'; this.tab = 'active';
this.route.queryParams.subscribe(params => { this.route.queryParams.subscribe(params => {
let payStatus = params['status']; let payStatus = params['status'];
let activeTab = params['tab']; let activeTab = params['tab'];
...@@ -175,9 +179,7 @@ export class DashboardComponent implements OnInit { ...@@ -175,9 +179,7 @@ export class DashboardComponent implements OnInit {
modelName: new FormControl('', [Validators.required]) modelName: new FormControl('', [Validators.required])
}); });
this.webService.get_stored_json('car-list.json').subscribe((response: any) => { this.getVehicleBrand();
this.carSearchJsonData = response;
});
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'));
...@@ -224,12 +226,38 @@ export class DashboardComponent implements OnInit { ...@@ -224,12 +226,38 @@ export class DashboardComponent implements OnInit {
$('body').attr('style',''); $('body').attr('style','');
} }
getVehicleBrand(){
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.loader = true;
const thisObj = this;
thisObj.carBrands.forEach(function (brandData,index) {
if(brandData.veh_brand_id == brand_id){
thisObj.selBrand = brandData.maker;
}
});
this.webService.post_data('getVehicleModel',{'vehBrand_id':brand_id}).subscribe(response => {
if(response.status == 'success'){
this.carModel = response.data;
}
this.loader = false;
});
}
getCustBookDetails(){ getCustBookDetails(){
this.loader = true; this.loader = true;
this.webService.post_data('getCustBookDetails', {'customer_id':this.loginDetails.customer_id}).subscribe(response => { this.webService.post_data('getCustBookDetails', {'customer_id':this.loginDetails.customer_id}).subscribe(response => {
if ( response.status == '1' && response.bookData != 'undefined' && response.bookData != undefined && response.bookData != 'null' && response.bookData != null ) { if ( response.status == '1' && response.bookData != 'undefined' && response.bookData != undefined && response.bookData != 'null' && response.bookData != null ) {
let bookings = response.bookData; let bookings = response.bookData;
console.log(bookings);
let successBooking: any[] = new Array(); let successBooking: any[] = new Array();
let bookingDetails: any[] = new Array(); let bookingDetails: any[] = new Array();
...@@ -269,10 +297,6 @@ export class DashboardComponent implements OnInit { ...@@ -269,10 +297,6 @@ export class DashboardComponent implements OnInit {
}); });
} }
get_model(event) {
this.carModel = this.carSearchJsonData[event].models;
}
setIssueSelected(event){ setIssueSelected(event){
let issue_id = event.target.attributes.issue_id.value; let issue_id = event.target.attributes.issue_id.value;
let sub_issue_id = event.target.attributes.sub_issue_id.value; let sub_issue_id = event.target.attributes.sub_issue_id.value;
...@@ -418,7 +442,7 @@ export class DashboardComponent implements OnInit { ...@@ -418,7 +442,7 @@ export class DashboardComponent implements OnInit {
} }
let location; let location;
this.vehicleDetailsFormSubmitClick = false; this.vehicleDetailsFormSubmitClick = false;
vehicleData.car_maker = this.carSearchJsonData[vehicleData['maker']]['brand']; vehicleData.car_maker = this.selBrand;
this.ngZone.run(() => { this.ngZone.run(() => {
let place: google.maps.places.PlaceResult = this.autocompleteDetails.getPlace(); let place: google.maps.places.PlaceResult = this.autocompleteDetails.getPlace();
if (place == undefined || place == null || place === undefined || place === null || if (place == undefined || place == null || place === undefined || place === null ||
...@@ -477,7 +501,7 @@ export class DashboardComponent implements OnInit { ...@@ -477,7 +501,7 @@ export class DashboardComponent implements OnInit {
this.loader = false; this.loader = false;
this.errMessage = {'errMsg':response.message} this.errMessage = {'errMsg':response.message}
    setTimeout (() => {     setTimeout (() => {
         this.errMessage = false;          this.errMessage = false;
      }, 2000);       }, 2000);
} }
}); });
...@@ -561,9 +585,9 @@ export class DashboardComponent implements OnInit { ...@@ -561,9 +585,9 @@ export class DashboardComponent implements OnInit {
} }
}); });
this.getIssueData(); this.getIssueData();
} }
getIssueData(){ getIssueData(){
const This = this; const This = this;
this.loader = true; this.loader = true;
this.webService.get_data('getGeneralIssues').subscribe(response => { this.webService.get_data('getGeneralIssues').subscribe(response => {
...@@ -579,9 +603,9 @@ export class DashboardComponent implements OnInit { ...@@ -579,9 +603,9 @@ export class DashboardComponent implements OnInit {
this.loader = false; this.loader = false;
return false; return false;
}); });
} }
searchIssues(event){ searchIssues(event){
if(event.target.value == '' || event.target.value == 'undefined' || event.target.value == undefined || event.target.value == 'null' || event.target.value == null ){ if(event.target.value == '' || event.target.value == 'undefined' || event.target.value == undefined || event.target.value == 'null' || event.target.value == null ){
this.issuesData = this.defIssuesData; this.issuesData = this.defIssuesData;
} else { } else {
...@@ -612,50 +636,48 @@ export class DashboardComponent implements OnInit { ...@@ -612,50 +636,48 @@ export class DashboardComponent implements OnInit {
$('[id="issue_'+issues.issue_id+'_'+issues.sub_issue_id+'"]').prop('checked', true); $('[id="issue_'+issues.issue_id+'_'+issues.sub_issue_id+'"]').prop('checked', true);
}); });
},500); },500);
} }
// searchIssues(event){ // searchIssues(event){
// if(event.target.value == '' || event.target.value == 'undefined' || event.target.value == undefined || event.target.value == 'null' || event.target.value == null ){ // if(event.target.value == '' || event.target.value == 'undefined' || event.target.value == undefined || event.target.value == 'null' || event.target.value == null ){
// this.issuesData = this.defIssuesData; // this.issuesData = this.defIssuesData;
// } else { // } else {
// const thisObj = this; // const thisObj = this;
// let data: any[] = new Array(); // let data: any[] = new Array();
// let serRegExp = new RegExp(event.target.value,"gi"); // let serRegExp = new RegExp(event.target.value,"gi");
// thisObj.defIssuesData.forEach(function (issues,index) { // thisObj.defIssuesData.forEach(function (issues,index) {
// let issueCat = issues.issue; // let issueCat = issues.issue;
// let subIssueCat =issues.sub_categories; // let subIssueCat =issues.sub_categories;
// if(issueCat.search(serRegExp) != -1){ // if(issueCat.search(serRegExp) != -1){
// thisObj.defIssuesData['exception'] = '0'; // thisObj.defIssuesData['exception'] = '0';
// data.push(thisObj.defIssuesData[index]); // data.push(thisObj.defIssuesData[index]);
// }else { // }else {
// issues.sub_categories.forEach(function (issues_cat_1,index_1) { // issues.sub_categories.forEach(function (issues_cat_1,index_1) {
// let subIssueCat = issues_cat_1.issue_category; // let subIssueCat = issues_cat_1.issue_category;
// if(subIssueCat.search(serRegExp) != -1){ // if(subIssueCat.search(serRegExp) != -1){
// thisObj.defIssuesData['exception'] = '1'; // thisObj.defIssuesData['exception'] = '1';
// data.push(thisObj.defIssuesData[index]); // data.push(thisObj.defIssuesData[index]);
// // console.log(thisObj.defIssuesData[index].sub_categories[index_1]) // }
// } // })
// }) // }
// } // });
// }); // this.issuesData = (data.length > 0)?data:false;
// console.log(thisObj.defIssuesData); // }
// this.issuesData = (data.length > 0)?data:false;
// } // setTimeout(()=>{
// this.selectedIssues.forEach(function (issues) {
// setTimeout(()=>{ // $('[id="issue_'+issues.issue_id+'_'+issues.sub_issue_id+'"]').prop('checked', true);
// this.selectedIssues.forEach(function (issues) { // });
// $('[id="issue_'+issues.issue_id+'_'+issues.sub_issue_id+'"]').prop('checked', true); // },500);
// }); // }
// },500);
// } jumpToStep3(){
jumpToStep3(){
if(this.selectedIssues.length != 0){ if(this.selectedIssues.length != 0){
this.step3nextRef.nativeElement.click(); this.step3nextRef.nativeElement.click();
} }
} }
getQuote(){ getQuote(){
const thisObj = this; const thisObj = this;
this.loader = true; this.loader = true;
...@@ -667,6 +689,7 @@ export class DashboardComponent implements OnInit { ...@@ -667,6 +689,7 @@ export class DashboardComponent implements OnInit {
this.webService.post_data('getNearByMechanics',searchData).subscribe(response => { this.webService.post_data('getNearByMechanics',searchData).subscribe(response => {
if(response.status == '1'){ if(response.status == '1'){
this.mechanicData = response.mechanic_data; 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())));
this.dateSection.push(new Date(this.today.setDate(this.today.getDate() + 1))); this.dateSection.push(new Date(this.today.setDate(this.today.getDate() + 1)));
...@@ -679,23 +702,23 @@ export class DashboardComponent implements OnInit { ...@@ -679,23 +702,23 @@ export class DashboardComponent implements OnInit {
this.loader = false; this.loader = false;
return false; return false;
}); });
} }
onMouseOver(infoWindow, gm) { onMouseOver(infoWindow, gm) {
if (gm.lastOpen != null) { if (gm.lastOpen != null) {
gm.lastOpen.close(); gm.lastOpen.close();
} }
gm.lastOpen = infoWindow; gm.lastOpen = infoWindow;
infoWindow.open(); infoWindow.open();
} }
onMouseOut(gm){ onMouseOut(gm){
if (gm.lastOpen != null) { if (gm.lastOpen != null) {
gm.lastOpen.close(); gm.lastOpen.close();
} }
} }
next(event) { next(event) {
if(this.dateStep > 30){ if(this.dateStep > 30){
this.showLeftArrow = true; this.showLeftArrow = true;
this.showRightArrow = false; this.showRightArrow = false;
...@@ -709,9 +732,9 @@ export class DashboardComponent implements OnInit { ...@@ -709,9 +732,9 @@ export class DashboardComponent implements OnInit {
this.dateSection[0] = new Date(this.currDate); this.dateSection[0] = new Date(this.currDate);
this.dateSection[1] = new Date(this.nextDate); this.dateSection[1] = new Date(this.nextDate);
this.dateStep += 1; this.dateStep += 1;
} }
prev(event) { prev(event) {
if(this.dateStep <= 0){ if(this.dateStep <= 0){
this.showLeftArrow = false; this.showLeftArrow = false;
this.showRightArrow = true; this.showRightArrow = true;
...@@ -725,13 +748,13 @@ export class DashboardComponent implements OnInit { ...@@ -725,13 +748,13 @@ export class DashboardComponent implements OnInit {
this.dateSection[0] = new Date(this.currDate); this.dateSection[0] = new Date(this.currDate);
this.dateSection[1] = new Date(this.nextDate); this.dateSection[1] = new Date(this.nextDate);
this.dateStep -= 1; this.dateStep -= 1;
} }
getSchedule(time,index){ getSchedule(time,index){
this.wizardData['schedule_date'] = {'date':this.formatDate(this.dateSection[index]),'time':time}; this.wizardData['schedule_date'] = {'date':this.formatDate(this.dateSection[index]),'time':time};
} }
formatDate(date) { formatDate(date) {
const d = new Date(date); const d = new Date(date);
let day = '' + d.getDate(); let day = '' + d.getDate();
let month = ''+(d.getMonth()+1); let month = ''+(d.getMonth()+1);
...@@ -739,9 +762,9 @@ export class DashboardComponent implements OnInit { ...@@ -739,9 +762,9 @@ export class DashboardComponent implements OnInit {
if (day.length < 2) { day = '0'+day; } if (day.length < 2) { day = '0'+day; }
if (month.length < 2) { month = '0'+month; } if (month.length < 2) { month = '0'+month; }
return [year,month,day].join('-'); return [year,month,day].join('-');
} }
scheduleNow(mechanic_id,cost){ scheduleNow(mechanic_id,cost){
this.wizardData['mechanic_id'] = mechanic_id+':'+cost; this.wizardData['mechanic_id'] = mechanic_id+':'+cost;
if(!this.loginDetails){ if(!this.loginDetails){
...@@ -752,9 +775,9 @@ export class DashboardComponent implements OnInit { ...@@ -752,9 +775,9 @@ export class DashboardComponent implements OnInit {
this.wizardData['cost'] = cost; this.wizardData['cost'] = cost;
this.wizardData['multiple'] ='0'; this.wizardData['multiple'] ='0';
this.confirmBooking(); this.confirmBooking();
} }
scheduleMultipleRequest(){ scheduleMultipleRequest(){
if(!this.loginDetails){ if(!this.loginDetails){
this.routeToIndex(); this.routeToIndex();
} }
...@@ -769,9 +792,9 @@ export class DashboardComponent implements OnInit { ...@@ -769,9 +792,9 @@ export class DashboardComponent implements OnInit {
this.wizardData['cost'] = this.estimatedPrice; this.wizardData['cost'] = this.estimatedPrice;
this.wizardData['multiple'] ='1'; this.wizardData['multiple'] ='1';
this.confirmBooking(); this.confirmBooking();
} }
confirmBooking(){ confirmBooking(){
this.wizardData['customer_id'] = this.loginDetails.customer_id; this.wizardData['customer_id'] = this.loginDetails.customer_id;
this.wizardData['selected_issues'] = this.selectedIssues; this.wizardData['selected_issues'] = this.selectedIssues;
this.wizardData['optionalDescription'] = this.optionalDescription; this.wizardData['optionalDescription'] = this.optionalDescription;
...@@ -806,9 +829,9 @@ export class DashboardComponent implements OnInit { ...@@ -806,9 +829,9 @@ export class DashboardComponent implements OnInit {
this.loader = false; this.loader = false;
return false; return false;
}); });
} }
resetQuoteWizard(){ resetQuoteWizard(){
this.selectedIssues = []; this.selectedIssues = [];
this.scheduleMechanic = false; this.scheduleMechanic = false;
this.scheduleDateInit = false; this.scheduleDateInit = false;
...@@ -819,9 +842,9 @@ export class DashboardComponent implements OnInit { ...@@ -819,9 +842,9 @@ export class DashboardComponent implements OnInit {
this.optionalImges[3] = false; this.optionalImges[3] = false;
this.optionalImges[4] = false; this.optionalImges[4] = false;
this.optionalDescription = ''; this.optionalDescription = '';
} }
showCustQuote(booking_id,mechanic_id,type){ showCustQuote(booking_id,mechanic_id,type){
if(!booking_id || !mechanic_id){ if(!booking_id || !mechanic_id){
return false; return false;
} }
...@@ -843,9 +866,9 @@ export class DashboardComponent implements OnInit { ...@@ -843,9 +866,9 @@ export class DashboardComponent implements OnInit {
} }
}); });
this.loader = false; this.loader = false;
} }
cancelBooking(booking: any){ cancelBooking(booking: any){
let bookingId: number; let bookingId: number;
if(!booking.bookingId){ if(!booking.bookingId){
return false; return false;
...@@ -859,32 +882,32 @@ export class DashboardComponent implements OnInit { ...@@ -859,32 +882,32 @@ export class DashboardComponent implements OnInit {
this.loader = false; this.loader = false;
} }
}); });
} }
mechanicQuoteAccept(event,booking_id,mechanic_id){ mechanicQuoteAccept(event,booking_id,mechanic_id){
if(!booking_id || !mechanic_id){ if(!booking_id || !mechanic_id){
return false; return false;
} }
let amount = event.target.attributes.bookAmount.value; let amount = event.target.attributes.bookAmount.value;
this.showConfirmPopUp('acceptQuote',{bookingId:booking_id,mechanicId:mechanic_id,amount:amount}); this.showConfirmPopUp('acceptQuote',{bookingId:booking_id,mechanicId:mechanic_id,amount:amount});
} }
cnfCancelBook(booking_id){ cnfCancelBook(booking_id){
if(!booking_id){ if(!booking_id){
return false; return false;
} }
this.showConfirmPopUp('cancelBooking',{bookingId:booking_id}); this.showConfirmPopUp('cancelBooking',{bookingId:booking_id});
} }
cnfdeleteCustomerCar(customer_id,vehicle_id){ cnfdeleteCustomerCar(customer_id,vehicle_id){
if(!customer_id || !vehicle_id){ if(!customer_id || !vehicle_id){
return false; return false;
} }
this.showConfirmPopUp('deleteCustomerCar',{'customer_id':customer_id,'customer_veh_id':vehicle_id}); this.showConfirmPopUp('deleteCustomerCar',{'customer_id':customer_id,'customer_veh_id':vehicle_id});
} }
showConfirmPopUp(fn_name: string, param: any){ showConfirmPopUp(fn_name: string, param: any){
if(fn_name === ''){ if(fn_name === ''){
return false; return false;
} }
...@@ -894,9 +917,9 @@ export class DashboardComponent implements OnInit { ...@@ -894,9 +917,9 @@ export class DashboardComponent implements OnInit {
this.confirmParam = param; this.confirmParam = param;
this.confirmCallBak = fn_name; this.confirmCallBak = fn_name;
this.confirmModalRef.nativeElement.click(); this.confirmModalRef.nativeElement.click();
} }
confirmCallBack(fn_name: string,param: string){ confirmCallBack(fn_name: string,param: string){
if(fn_name === '' || !this[fn_name]){ if(fn_name === '' || !this[fn_name]){
return false; return false;
} }
...@@ -906,21 +929,22 @@ export class DashboardComponent implements OnInit { ...@@ -906,21 +929,22 @@ export class DashboardComponent implements OnInit {
} else { } else {
this[fn_name](); this[fn_name]();
} }
} }
acceptQuote(param: any){ acceptQuote(param: any){
this.loader=true;
this.webService.post_data('acceptMechanicQuote',param).subscribe(response => { this.webService.post_data('acceptMechanicQuote',param).subscribe(response => {
if(response.status == 'success'){ if(response.status == 'success'){
document.location.href = this.serverUrl+'payNow/'+response.data; document.location.href = this.serverUrl+'payNow/'+response.data;
// this.getCustBookDetails(); // this.getCustBookDetails();
}else{
this.loader = false;
this.failureModelRef.nativeElement.click();
} }
}) })
} }
checkboxChange(index,mechanic_id,event,estimate){ checkboxChange(index,mechanic_id,event,estimate){
if (event.target.checked) { if (event.target.checked) {
this.selMechanics.push({id:index,mechanic_id:mechanic_id,amount:estimate}); this.selMechanics.push({id:index,mechanic_id:mechanic_id,amount:estimate});
} else { } else {
...@@ -929,15 +953,15 @@ export class DashboardComponent implements OnInit { ...@@ -929,15 +953,15 @@ export class DashboardComponent implements OnInit {
this.selMechanics.splice(id, 1); this.selMechanics.splice(id, 1);
} }
} }
} }
scrollToTop(id){ scrollToTop(id){
$('#'+id).stop().animate({scrollTop: 0}, 800); $('#'+id).stop().animate({scrollTop: 0}, 800);
} }
scrollToBottom(id){ scrollToBottom(id){
$('#'+id).stop().animate({scrollTop: $('#'+id)[0].scrollHeight}, 1500); $('#'+id).stop().animate({scrollTop: $('#'+id)[0].scrollHeight}, 1500);
} }
tab_swap(type) { this.tab = type; } tab_swap(type) { this.tab = type; }
} }
...@@ -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>
<input type="radio" name="scheduleTime" (click)="getSchedule(time,'0');
scheduleDateInit = true; scheduleMechanic = mechanic.mechanic_id">
<p *ngIf="time > currentDate">{{time}}</p>
</label>
</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> <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>{{time | date:'hh:mm a'}}</p>
</label> </label>
</li> </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;
......
...@@ -18,7 +18,6 @@ declare const google: any; ...@@ -18,7 +18,6 @@ declare const google: any;
styleUrls: ['./index.component.scss'] styleUrls: ['./index.component.scss']
}) })
export class IndexComponent implements OnInit { export class IndexComponent implements OnInit {
public featuredOn: NgxCarousel; public featuredOn: NgxCarousel;
public carouselTile: NgxCarousel; public carouselTile: NgxCarousel;
...@@ -66,6 +65,8 @@ export class IndexComponent implements OnInit { ...@@ -66,6 +65,8 @@ export class IndexComponent implements OnInit {
step: number; step: number;
today: any = new Date(); today: any = new Date();
currDate: any; currDate: any;
currentDate: any;
currentTime: any;
nextDate: any; nextDate: any;
dateStep: number = 0; dateStep: number = 0;
mechanics: string = ''; mechanics: string = '';
...@@ -81,8 +82,9 @@ export class IndexComponent implements OnInit { ...@@ -81,8 +82,9 @@ export class IndexComponent implements OnInit {
scheduleMechanic: any; scheduleMechanic: any;
carModel: any; carModel: any;
carBrands: any;
selBrand: string = '';
modelDates: number[] = new Array(); modelDates: number[] = new Array();
carSearchJsonData: any;
optionalImges: any = new Array({1:false,2:false,3:false,4:false}); optionalImges: any = new Array({1:false,2:false,3:false,4:false});
optionalDescription: string; optionalDescription: string;
...@@ -110,6 +112,8 @@ export class IndexComponent implements OnInit { ...@@ -110,6 +112,8 @@ export class IndexComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.currentTime = this.today.getTime();
this.currentDate = this.today.getDate();
this.vehicleDataForm = new FormGroup({ this.vehicleDataForm = new FormGroup({
trim: new FormControl(''), milage: new FormControl(''), emgine: new FormControl(''), trim: new FormControl(''), milage: new FormControl(''), emgine: new FormControl(''),
last_date: new FormControl(''), last_date: new FormControl(''),
...@@ -119,9 +123,7 @@ export class IndexComponent implements OnInit { ...@@ -119,9 +123,7 @@ export class IndexComponent implements OnInit {
modelName: new FormControl('', [Validators.required]) modelName: new FormControl('', [Validators.required])
}); });
this.webService.get_stored_json('car-list.json').subscribe((response: any) => { this.getVehicleBrand();
this.carSearchJsonData = response;
});
let currentYear = Number((new Date()).getFullYear()); let currentYear = Number((new Date()).getFullYear());
let startingYear = currentYear - 50; let startingYear = currentYear - 50;
...@@ -155,8 +157,31 @@ export class IndexComponent implements OnInit { ...@@ -155,8 +157,31 @@ export class IndexComponent implements OnInit {
$('body').attr('style',''); $('body').attr('style','');
} }
get_model(event) { getVehicleBrand(){
this.carModel = this.carSearchJsonData[event].models; 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.loader = true;
const thisObj = this;
thisObj.carBrands.forEach(function (brandData,index) {
if(brandData.veh_brand_id == brand_id){
thisObj.selBrand = brandData.maker;
}
});
this.webService.post_data('getVehicleModel',{'vehBrand_id':brand_id}).subscribe(response => {
if(response.status == 'success'){
this.carModel = response.data;
}
this.loader = false;
});
} }
getVehicleLoc(lastLoc){ getVehicleLoc(lastLoc){
...@@ -196,16 +221,15 @@ export class IndexComponent implements OnInit { ...@@ -196,16 +221,15 @@ export class IndexComponent implements OnInit {
} }
this.wizardData['vechile_info'] = {'trim':vehicleData['trim'], this.wizardData['vechile_info'] = {'trim':vehicleData['trim'],
'lastMaintanceDate':(vehicleData['last_date'])?(formatDate(vehicleData['last_date'],'MM/dd/yyyy','en')):'', 'lastMaintanceDate':(vehicleData['last_date'])?(formatDate(vehicleData['last_date'],'MM/dd/yyyy','en')):'',
'maker':this.carSearchJsonData[vehicleData['maker']]['brand'], 'maker':this.selBrand,
'milage':vehicleData['milage'],'emgine':vehicleData['emgine'], 'milage':vehicleData['milage'],'emgine':vehicleData['emgine'],
'modelName':vehicleData['modelName'],'modelYear':vehicleData['modelYear'], 'modelName':vehicleData['modelName'],'modelYear':vehicleData['modelYear'],
'maintanenceInterval':vehicleData['maintanence_interval'] 'maintanenceInterval':vehicleData['maintanence_interval']
} }
console.log(this.wizardData['vechile_info'])
this.vehicleDataFormSubmit = false; this.vehicleDataFormSubmit = false;
} }
getIssueData(){ getIssueData(){
const This = this; const This = this;
this.loader = true; this.loader = true;
this.webService.get_data('getGeneralIssues').subscribe(response => { this.webService.get_data('getGeneralIssues').subscribe(response => {
...@@ -221,9 +245,9 @@ export class IndexComponent implements OnInit { ...@@ -221,9 +245,9 @@ export class IndexComponent implements OnInit {
this.loader = false; this.loader = false;
return false; return false;
}); });
} }
searchIssues(event){ searchIssues(event){
if(event.target.value == '' || event.target.value == 'undefined' || event.target.value == undefined || event.target.value == 'null' || event.target.value == null ){ if(event.target.value == '' || event.target.value == 'undefined' || event.target.value == undefined || event.target.value == 'null' || event.target.value == null ){
this.issuesData = this.defIssuesData; this.issuesData = this.defIssuesData;
} else { } else {
...@@ -254,8 +278,8 @@ export class IndexComponent implements OnInit { ...@@ -254,8 +278,8 @@ export class IndexComponent implements OnInit {
$('[id="issue_'+issues.issue_id+'_'+issues.sub_issue_id+'"]').prop('checked', true); $('[id="issue_'+issues.issue_id+'_'+issues.sub_issue_id+'"]').prop('checked', true);
}); });
},500); },500);
} }
get_newlocaion(lastLoc){ get_newlocaion(lastLoc){
this.cfautocomplete.addListener("place_changed", () => { this.cfautocomplete.addListener("place_changed", () => {
this.ngZone.run(() => { this.ngZone.run(() => {
let places: google.maps.places.PlaceResult = this.cfautocomplete.getPlace(); let places: google.maps.places.PlaceResult = this.cfautocomplete.getPlace();
...@@ -365,7 +389,6 @@ export class IndexComponent implements OnInit { ...@@ -365,7 +389,6 @@ export class IndexComponent implements OnInit {
thisObj.selectedIssues.forEach(function (selIssues) { thisObj.selectedIssues.forEach(function (selIssues) {
selSubIssues.push(selIssues.sub_issue_id); selSubIssues.push(selIssues.sub_issue_id);
}); });
console.log(this.wizardData)
let searchData = {'pickup_data':this.wizardData.pickup_data,'sub_issues':selSubIssues} let searchData = {'pickup_data':this.wizardData.pickup_data,'sub_issues':selSubIssues}
this.webService.post_data('getNearByMechanics',searchData).subscribe(response => { this.webService.post_data('getNearByMechanics',searchData).subscribe(response => {
if(response.status == '1'){ if(response.status == '1'){
......
...@@ -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>
...@@ -392,6 +395,7 @@ ...@@ -392,6 +395,7 @@
</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);
}
} }
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<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; }
......
...@@ -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