Commit af0f06d1 by Tobin

daily commit

parent 0e2d189c
......@@ -6,7 +6,7 @@ const routes: Routes = [
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
imports: [RouterModule.forRoot(routes, { useHash: true })],
exports: [RouterModule]
})
export class AppRoutingModule { }
......@@ -7,6 +7,7 @@ import { HomeModule} from './home/home.module';
import { NavbarComponent } from './navbar/navbar.component';
import { FooterComponent } from './footer/footer.component';
import { ReactiveFormsModule } from '@angular/forms';
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
@NgModule({
declarations: [
......@@ -21,7 +22,7 @@ import { ReactiveFormsModule } from '@angular/forms';
ReactiveFormsModule,
HttpClientModule
],
providers: [],
providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}],
bootstrap: [AppComponent]
})
export class AppModule { }
......@@ -156,10 +156,13 @@
</div>
<div class="row line_row">
<div class="col-md-12">
<div class="vehicle_list">
<ul>
<li *ngIf="!vehDetails; else savedVechiles">NO DATA FOUND</li>
<ng-template #savedVechiles>
<div class="no_datafound" *ngIf="!vehDetails; else savedVechiles">
<img src="assets/images/asset_nodata.png">
<p>No Data Found</p>
</div>
<ng-template #savedVechiles>
<div class="vehicle_list">
<ul>
<li *ngFor="let vehicle of vehDetails">
<div class="car_details">
<h5><strong>{{ vehicle.car_maker | titlecase }}</strong>{{ vehicle.car_model | titlecase }}</h5>
......@@ -188,14 +191,13 @@
<div class="button_bay">
<div class="btn-group-justified" role="group" aria-label="Basic example">
<button type="button" class="btn book btn-sm" data-toggle="modal" data-target="#wizard" (click)="bookVechile(vehicle.customer_veh_id)">Book Now</button>
<!-- <button type="button" class="btn btn-secondary btn-sm" data-toggle="modal" data-target="#editvehicle">Edit</button> -->
<button type="button" class="btn btn-danger btn-sm" (click)="deleteCustomerCar(vehicle.customer_id,vehicle.customer_veh_id)">Delete</button>
</div>
</div>
</li>
</ng-template>
</ul>
</div>
</ul>
</div>
</ng-template>
</div>
</div>
</div>
......@@ -213,22 +215,23 @@
<div class="row line_row">
<div class="col-md-12">
<div class="table-responsive">
<table>
<thead>
<tr>
<th>Order no</th>
<th>Order Date</th>
<th>Vehicle</th>
<th>Mechanic</th>
<th>Cost</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr *ngIf="!successBookDtls; else successBooking">
<td>No Data Found</td>
</tr>
<ng-template #successBooking>
<div class="no_datafound" *ngIf="!successBookDtls; else successBooking">
<img src="assets/images/asset_nodata.png">
<p>No Data Found</p>
</div>
<ng-template #successBooking>
<table>
<thead>
<tr>
<th>Order no</th>
<th>Order Date</th>
<th>Vehicle</th>
<th>Mechanic</th>
<th>Cost</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let bookData of successBookDtls">
<td>{{bookData.booking_id}}</td>
<td>{{bookData.scheduled_date+' '+bookData.scheduled_time}}</td>
......@@ -241,9 +244,9 @@
</div>
</td>
</tr>
</ng-template>
</tbody>
</table>
</tbody>
</table>
</ng-template>
</div>
</div>
</div>
......@@ -262,22 +265,23 @@
<div class="row line_row">
<div class="col-md-12">
<div class="table-responsive">
<table>
<thead>
<tr>
<th>Order no</th>
<th>Order Date</th>
<th>Vehicle</th>
<th>Mechanic</th>
<th>Service Charge</th>
<th>Order Status</th>
</tr>
</thead>
<tbody>
<tr *ngIf="!bookingDetails; else allBookDtls">
<td>No Data Found</td>
</tr>
<ng-template #allBookDtls>
<div class="no_datafound" *ngIf="!bookingDetails; else allBookDtls">
<img src="assets/images/asset_nodata.png">
<p>No Data Found</p>
</div>
<ng-template #allBookDtls>
<table>
<thead>
<tr>
<th>Order no</th>
<th>Order Date</th>
<th>Vehicle</th>
<th>Mechanic</th>
<th>Service Charge</th>
<th>Order Status</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let bookData of bookingDetails">
<td>{{bookData.booking_id}}</td>
<td>{{bookData.scheduled_date+' '+bookData.scheduled_time}}</td>
......@@ -290,9 +294,9 @@
<p *ngSwitchCase="3" class="canceled_status">Canceled</p>
</td>
</tr>
</ng-template>
</tbody>
</table>
</tbody>
</table>
</ng-template>
</div>
</div>
</div>
......
......@@ -109,6 +109,7 @@ export class DashboardComponent implements OnInit {
this.loader = false;
this.activeTab = 'profile';
this.errMessage = false;
this.vehDetails = false;
this.searchLocError = false;
this.showLeftArrow = false;
this.showRightArrow = true;
......@@ -185,6 +186,7 @@ export class DashboardComponent implements OnInit {
}
getCustBookDetails(){
this.loader = true;
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 ) {
this.bookingDetails = response.bookData;
......@@ -201,14 +203,19 @@ export class DashboardComponent implements OnInit {
this.successBookDtls = false;
}
}
this.loader = false;
});
}
getCustVehDetails(){
this.loader = true;
this.webService.post_data('customerVechiles', {'customer_id':this.loginDetails.customer_id}).subscribe(response => {
if ( response.status == '1' && response.vehData != 'undefined' && response.vehData != undefined && response.vehData != 'null' && response.vehData != null ) {
if ( response.status == '1' && response.vehData != '' && response.vehData != 'undefined' && response.vehData != undefined && response.vehData != 'null' && response.vehData != null ) {
this.vehDetails = response.vehData;
} else {
this.vehDetails = false;
}
this.loader = false;
});
}
......@@ -628,8 +635,20 @@ export class DashboardComponent implements OnInit {
confirmBooking(){
this.wizardData['customer_id'] = this.loginDetails.customer_id;
this.wizardData['selected_issues'] = this.selectedIssues;
this.wizardData['optionalDescription'] = this.optionalDescription;
let formData: FormData = new FormData();
formData.append('data', JSON.stringify(this.wizardData));
this.webService.post_data('scheduleNow',this.wizardData).subscribe(response => {
this.optionalImges.forEach(function (imgData,index) {
if(!imgData){
return true;
}
formData.append("optFile_" + (index), imgData.file);
});
this.webService.multipart_post('scheduleNow', formData).subscribe(response => {
// this.webService.post_data('scheduleNow',this.wizardData).subscribe(response => {
if(response.status == '1'){
this.closeWizardRef.nativeElement.click();
this.closeQuoteWizardRef.nativeElement.click();
......@@ -638,7 +657,8 @@ export class DashboardComponent implements OnInit {
this.selectedIssues = [];
this.serviceHistoryTabRef.nativeElement.click();
this.loader = false;
this.getCustBookDetails();
} else {
this.loader = false;
return false;
......
......@@ -668,7 +668,7 @@
width: 100%;
border: 1px solid #1e1e1e;
color: #bfbfbf;
padding-top: 10px;
padding: 10px;
border-radius: 20px;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
......
......@@ -396,13 +396,24 @@ export class IndexComponent implements OnInit {
confirmBooking(){
this.wizardData['customer_id'] = this.loginDetails.customer_id;
this.wizardData['selected_issues'] = this.selectedIssues;
this.wizardData['optionalDescription'] = this.optionalDescription;
this.webService.post_data('scheduleNow',this.wizardData).subscribe(response => {
let formData: FormData = new FormData();
formData.append('data', JSON.stringify(this.wizardData));
this.optionalImges.forEach(function (imgData,index) {
if(!imgData){
return true;
}
formData.append("optFile_" + (index), imgData.file);
});
this.webService.multipart_post('scheduleNow', formData).subscribe(response => {
// this.webService.post_data('scheduleNow',this.wizardData).subscribe(response => {
if(response.status == '1'){
this.closeWizardRef.nativeElement.click();
this.closeQuoteWizardRef.nativeElement.click();
this.router.navigate(['../dashboard'],{queryParams: {tab: 'service'}});
this.loader = false;
} else {
this.loader = false;
return false;
......
......@@ -41,6 +41,35 @@
}
.title_banner {
padding: 15px !important;
padding-top: 100px !important;
}
.title_banner h1{
font-size:21px;
}
.log_btn{
width:100px !important;
background-image: none !important;
}
.modal-body{
padding:0px !important;
}
.wizard_quotes{
width:100% !important;
}
.scheduletiming_listing{
width:100% !important;
}
.scheduletiming_listing{
width:100% !important;
}
.testimonial_div{
padding:5px;
.container-fluid{
max-width:100% !important;
}
}
.dashboard_tab_content {
.container-fluid {
......
......@@ -479,4 +479,56 @@ section.module.parallax {
.invisible{
opacity: 0 !important;
}
.success_div{
width:100%;
background-color: #fff;
text-align: center;
padding-top: 40px;
padding-bottom: 40px;
img{
width:80px;
}
h2{
text-align: center;
padding-top:20px;
padding-bottom:20px;
font-weight: 400;
font-size: 20px;
color: #37547e;
}
.okay_btn {
border: 2px solid #2655bf;
color: #2655bf;
padding: 10px;
padding-left: 50px;
padding-right: 50px;
background: transparent;
margin: 0 auto;
border-radius: 25px;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
-ms-border-radius: 25px;
-o-border-radius: 25px;
margin-top: 30px;
&:focus{
outline:none;
}
}
}
.no_datafound {
width: 100%;
text-align: center;
img{
width: 90px;
}
p {
color: #37547e !important;
font-size: 25px !important;
padding-top: 15px;
padding-bottom: 30px !important;
font-weight: 400 !important;
}
}
\ No newline at end of file
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