Commit 42826c66 by kevin

IOS Build

parent 7f716f7d
......@@ -65,6 +65,9 @@
<li *ngFor="let images of request_val.pool_images" > <img [src]="images.image" ></li>
</div> -->
</div>
<div>
<button class="login_btn widthFull theme_lblue" ion-button (click)="delete_offer()">Delete Booking</button>
</div>
<div class="textCenter" *ngIf="request_val">
<button *ngIf="request_val.book_status==3" class="login_btn widthFull theme_lblue" ion-button (click)="repair()">Confirm Repair Complete</button>
</div>
......
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams,ModalController ,Events} from 'ionic-angular';
import { IonicPage, NavController, NavParams,ModalController ,Events,AlertController} from 'ionic-angular';
import { Storage } from '@ionic/storage';
import {Myservice} from '../../providers/myservice';
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
@IonicPage()
......@@ -10,18 +12,24 @@ import {Myservice} from '../../providers/myservice';
templateUrl: 'booking-detail.html',
})
export class BookingDetail {
id:any;
booking_id:any;
request_val:any;
constructor(public navCtrl: NavController, public navParams: NavParams,public storage:Storage, private myservice: Myservice,public modalCtrl: ModalController,public events:Events) {
constructor(public alertCtrl: AlertController,public navCtrl: NavController, public navParams: NavParams,public storage:Storage, private myservice: Myservice,public modalCtrl: ModalController,public events:Events) {
this.booking_id = this.navParams.get('id');
if(this.booking_id){
this.getSingleBookings();
this.update_read_status();
}
this.storage.get('user_data').then((user_data) => {
if(user_data){
this.id = user_data.id;
}
});
}
......@@ -71,6 +79,45 @@ export class BookingDetail {
}
});
}
delete_offer()
{
const confirm = this.alertCtrl.create({
title: 'Delete Booking',
message: 'Sure you want to delete booking?',
buttons: [
{
text: 'Disagree',
handler: () => {
}
},
{
text: 'Agree',
handler: () => {
this.delete_booking();
}
}
]
});
confirm.present();
}
delete_booking()
{
console.log('Inside function');
var obj ={'user_id':this.id,'book_id':this.booking_id}
this.myservice.load_post(obj,'cancel_book_service').subscribe(data =>{
console.log(data);
if(data.status=='success')
{
this.myservice.presentToast('Your Booking Deleted Succeffuly');
}
else {
this.myservice.presentToast('Sorry,you can not cancel this booking')
}
});
this.navCtrl.push('HomePage');
}
presentPopover(myEvent) {
let modal = this.modalCtrl.create('AddReview',{'garage_id':this.request_val.garage_id,'booking_id' : this.booking_id});
......
......@@ -18,9 +18,9 @@
<h5>Select a Service for Fixprice</h5>
</div>
<ul>
<li *ngFor="let subcat of sub_cat" (click)="issue(subcat)" >
<img *ngIf="subcat.image" [src]="subcat.image">
<img *ngIf="!subcat.image" [src]="subcat.image">
<li *ngFor="let subcat of sub_cat;let i=index" (click)="issue(subcat)" >
<img *ngIf="subcat.image" [src]="getimage(subcat.image)">
<img *ngIf="!subcat.image" [src]="getimage(subcat.image)">
<p>{{subcat.service}}</p>
<div class="ques" (click)="tool_tip(subcat.description,$event)" >
<ion-icon name="ios-help-outline"></ion-icon>
......
......@@ -53,6 +53,13 @@ export class CatagoryPage {
}
});
}
getimage(url)
{
var base_url= 'http://techlabz.in/fixmyauto/';
var url1 = base_url+url
return(url1)
}
tool_tip(msg,evt){
this.closeToast()
......@@ -61,19 +68,19 @@ export class CatagoryPage {
}
presentToast(msg) {
this.toast = this.toastCtrl.create({
message: msg,
duration: 3000,
// this.toast = this.toastCtrl.create({
// message: msg,
// duration: 3000,
position: 'bottom'
});
this.toast.present();
this.toast.onDidDismiss(() => {
//this.closeToast();
console.log('Dismissed toast');
});
// position: 'bottom'
// });
// this.toast.present();
// this.toast.onDidDismiss(() => {
// //this.closeToast();
// console.log('Dismissed toast');
// });
this.myservice.show_alert('Service Details',msg);
}
closeToast() {
......
......@@ -52,18 +52,8 @@ export class CatagoryBody {
}
presentToast(msg) {
this.toast = this.toastCtrl.create({
message: msg,
duration: 3000,
position: 'bottom'
});
this.toast.present();
this.toast.onDidDismiss(() => {
//this.closeToast();
console.log('Dismissed toast');
});
this.myservice.show_alert('Service details',msg)
}
......
......@@ -61,18 +61,7 @@ export class CatagoryWash {
}
presentToast(msg) {
this.toast = this.toastCtrl.create({
message: msg,
duration: 3000,
position: 'bottom'
});
this.toast.present();
this.toast.onDidDismiss(() => {
//this.closeToast();
console.log('Dismissed toast');
});
this.myservice.show_alert('Service Details',msg)
}
......
......@@ -95,7 +95,7 @@ export class DamagephotoPage {
console.log(this.base64Image.length);
if(this.base64Image.length > 0){
this.myservice.show_loader();
this.myservice.load_post(vals,'save_body_shop').subscribe(data => {
this.myservice.fileUpload(vals,'save_body_shop').subscribe(data => {
this.myservice.hide_loader();
if(data.status == 'success'){
this.load_post_multifile(this.base64Image, {'value' :data.data }, "save_pool_img");
......
......@@ -9,8 +9,8 @@
<ion-content padding>
<div class="fix_price_wrapper">
<h5>You are looking for <strong>{{services.service}}</strong></h5>
<p>Service details</p>
<p><b>{{services.service}} : </b><span *ngIf="services.description!=''"> {{services.description}}</span><span *ngIf="services.description==''"> No Description Available</span></p>
<p style="color:red"><b>Service details</b></p>
<p ><b style="color: green">{{services.service}} :</b><span *ngIf="services.description!=''"> {{services.description}}</span><span *ngIf="services.description==''"> No Description Available</span></p>
<div class="fm_wrapper fm_margin_top0">
<div class="fm_listing">
<ul *ngIf="garage_list" >
......@@ -63,7 +63,7 @@
</ul>
<div class="no_resultfound" *ngIf="!garage_list" >
<img src="assets/imgs/noresult.png">
<p>No Result Found </p>
<p>No Nearest Garages Found </p>
</div>
......
......@@ -19,24 +19,31 @@ export class FixpricesPage {
services:any;
garage_list:any;
id:any
constructor(public navCtrl: NavController, public navParams: NavParams,private myservice: Myservice,public storage:Storage) {
this.services = this.navParams.get('service')
this.find_garage();
console.log(this.services)
this.storage.get('user_data').then((user_data) => {
console.log(user_data);
if(user_data){
this.find_garage(user_data.id);
}
});
this.services = this.navParams.get('service');
}
ionViewDidLoad() {
console.log('ionViewDidLoad FixpricesPage');
}
find_garage(){
find_garage(user_id){
this.myservice.show_loader();
this.myservice.load_get('find_garage/id/'+this.services.id).subscribe(data => {
console.log('userid',this.id)
this.myservice.load_get('find_garage/id/'+this.services.id+'/user_id/'+user_id).subscribe(data => {
this.myservice.hide_loader();
if(data.status == 'success'){
this.garage_list = data.data;
console.log(this.garage_list);
// console.log(JSON.parse(this.garage_list[0].schedule))
}
});
}
......
<!--
Generated template for the OverviewPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>overview</ion-title>
</ion-navbar>
<ion-header class="nav_header theme_primary">
<button class="nav_btn floatLeft" ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
Overview
</div>
</ion-header>
<ion-content padding>
<ion-grid>
<ion-row>
<ion-col col-4>
Garage:
</ion-col>
<ion-col col-8>
{{garage_name}}
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
Booking For:
</ion-col>
<ion-col col-8 *ngIf="bookvals" >
{{bookvals.book_date | date:'dd.MM.yyyy'}} at {{bookvals.book_time}}
</ion-col>
</ion-row>
<div class="overview_wrapper">
<ion-grid class="p0">
<ion-row>
<ion-col col-4>
<p>
Garage
</p>
</ion-col>
<ion-col col-1>
<p>:</p>
</ion-col>
<ion-col col-7>
<p>
<strong>{{garage_name}}</strong>
</p>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>
Booking For
</p>
</ion-col>
<ion-col col-1>
<p>:</p>
</ion-col>
<ion-col col-7>
<p *ngIf="bookvals">
<strong>
{{bookvals.book_date | date:'dd.MM.yyyy'}} at {{bookvals.book_time}}
</strong>
</p>
</ion-col>
</ion-row>
<br>
<ion-row>
<ion-col>
<h4>Service Details</h4>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<p *ngIf="page=='offers'">
{{bookvals.description}}
</ion-col>
</ion-row>
<ion-row *ngFor="let service of bookvals.service">
<ion-col col-4>
<p>{{service.service}}</p>
</ion-col>
<ion-col col-1>
<p>:</p>
</ion-col>
<ion-col col-7>
<p><strong>
{{service.service_desc}}
</strong></p>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>Payment</p>
</ion-col>
<ion-col col-1>
<p>:</p>
</ion-col>
<ion-col col-7>
<p><strong>On Site</strong></p>
</ion-col>
</ion-row>
<ion-row *ngIf="page=='offers' || page=='quotes'">
<ion-col col-4>
<p>Spare Parts</p>
</ion-col>
<ion-col col-1>
<p>:</p>
</ion-col>
<ion-col col-7>
<p><strong>OEM-Parts (Erstausrusterqualitat)</strong></p>
</ion-col>
</ion-row>
<ion-row *ngIf="page=='offers' || page=='quotes'">
<ion-col col-7>
<p>Warranty on spare parts & work</p>
</ion-col>
<ion-col col-1>
<p>:</p>
</ion-col>
<ion-col col-4>
<p><strong>24 Months</strong></p>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-7>
<p>Total Amount
<br>
(Incl. 20% MwSt)
</p>
</ion-col>
<ion-col col-1>
<p>:</p>
</ion-col>
<ion-col col-4>
<p><strong>€{{bookvals.total_price}}</strong></p>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<button class="booknow_btn" (click)="book()">Book Now</button>
</ion-col>
</ion-row>
</ion-grid>
<ion-row>
<ion-col col-4>
Service Details:
</ion-col>
</ion-row>
<ion-row *ngIf="page=='offers'" >
<ion-col >
{{bookvals.description}}
</ion-col>
</ion-row>
<ion-row *ngFor="let service of bookvals.service" >
<ion-col >
{{service.service}} : {{service.service_desc}}
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
Payment:
</ion-col>
<ion-col col-8>
On Site
</ion-col>
</ion-row>
<ion-row *ngIf="page=='offers' || page=='quotes'" >
<ion-col col-4 >
Spare Parts:
</ion-col>
<ion-col col-8>
OEM-Parts (Erstausrusterqualitat)
</ion-col>
</ion-row>
<ion-row *ngIf="page=='offers' || page=='quotes'" >
<ion-col col-8>
Warranty on spare parts & work:
</ion-col>
<ion-col col-4>
24 Months
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
Total Amount:
<br>
(Incl. 20% MwSt)
</ion-col>
<ion-col col-8>
€{{bookvals.total_price}}
</ion-col>
</ion-row>
<button (click)="book()" >Book Now</button>
</ion-grid>
</div>
</ion-content>
page-overview {
.overview_wrapper{
width:100%;
p{
margin: 0px;
font-size: 16px;
color: #0076ba;
}
h4{
margin:0px;
}
.booknow_btn{
width:100%;
height:40px;
background: #0076ba;
color: #fff;
}
}
}
......@@ -16,6 +16,7 @@ import {Myservice} from '../../providers/myservice';
templateUrl: 'overview.html',
})
export class OverviewPage {
page_name:any;
garage_name:any;
garage_id:any;
bookvals:any;
......@@ -27,6 +28,7 @@ page:any;
this.page = this.navParams.get('page')
console.log('this.garage_name' ,this.garage_name)
console.log('this.bookvals' ,this.page)
this.page_name='book';
}
ionViewDidLoad() {
......@@ -48,7 +50,7 @@ page:any;
//this.myservice.show_alert('Success',data.message);
var datas = {'garage_name':this.garage_name,'bookvals' :this.bookvals}
// this.events.publish('user:notifications', '');
this.navCtrl.push('SuccessPage',{'datas':datas,'page' : this.page });
this.navCtrl.push('SuccessPage',{'datas':datas,'page' : this.page,'page_name':this.page_name });
}else if(data.status == 'booked'){
this.myservice.show_alert('Error',data.message);
......
......@@ -19,6 +19,7 @@ import {Myservice} from '../../providers/myservice';
export class RequestPage {
private requestsForm : FormGroup;
page:any;
user_data:any;
id:any;
service:any;
......@@ -50,6 +51,7 @@ export class RequestPage {
// this.requestsForm.setControl('filters',new FormControl('',Validators.required));
// else
// this.requestsForm.setControl('filters',new FormControl('',));
this.page = 'quote';
}
ionViewDidLoad() {
......@@ -69,9 +71,9 @@ export class RequestPage {
if(this.requestsForm.valid){
this.myservice.show_loader();
this.myservice.load_get('get_quotes?id='+81).subscribe(data => {
console.log('Data',data);
this.myservice.hide_loader();
console.log('test',data.data[10].detail)
......@@ -80,10 +82,12 @@ export class RequestPage {
var obj1 ={'user_id':this.id,'service_id':1,'subservice_id':1,'detail':this.requestsForm.value}
if(this.service == 'Annual Service')
{
this.myservice.show_loader()
this.myservice.load_post(obj1,'request_service').subscribe(data => {
this.myservice.hide_loader();
if(data.status == 'success')
{
this.navCtrl.push('SuccessPage');
this.navCtrl.push('SuccessPage', {'page_name':this.page});
}
console.log(data)
});
......@@ -91,10 +95,12 @@ export class RequestPage {
var obj2= {'user_id':this.id,'service_id':1,'subservice_id':2,'detail':this.requestsForm.value}
if(this.service == 'Oil Service')
{
this.myservice.show_loader();
this.myservice.load_post(obj2,'request_service').subscribe(data => {
this.myservice.hide_loader();
if(data.status == 'success')
{
this.navCtrl.push('SuccessPage');
this.navCtrl.push('SuccessPage', {'page_name':this.page});
}
});
......@@ -104,10 +110,12 @@ export class RequestPage {
if(this.service == 'Others')
{
console.log(obj3)
this.myservice.show_loader();
this.myservice.load_post(obj3,'request_service').subscribe(data => {
if(data.status == 'success')
{
this.navCtrl.push('SuccessPage');
this.myservice.hide_loader();
this.navCtrl.push('SuccessPage', {'page_name':this.page});
}
console.log(data)
});
......
......@@ -19,6 +19,7 @@ import {Myservice} from '../../providers/myservice';
export class RequestBreak {
private requestsForm : FormGroup;
page:any;
id:any;
service:any;
filtr:any;
......@@ -49,7 +50,7 @@ export class RequestBreak {
// this.requestsForm.setControl('filters',new FormControl('',Validators.required));
// else
// this.requestsForm.setControl('filters',new FormControl('',));
this.page='quote';
}
ionViewDidLoad() {
......@@ -66,6 +67,7 @@ export class RequestBreak {
var obj = { "user_id":this.id , 'service_id':1 ,'subservice_id':3,'detail':this.requestsForm.value};
this.myservice.load_post(obj,'request_service').subscribe(data => {
console.log(data)
this.navCtrl.push('SuccessPage', {'page_name':this.page});
});
}else{ // Form is not valid
this.markFormGroupTouched(this.requestsForm);
......
......@@ -11,7 +11,7 @@
<ion-content>
<div class="fm_wrapper">
<h5 *ngIf="service" >Get upto 3 Quotes for {{service}} </h5>
<form [formGroup]="body_shop_form" (ngSubmit)="body_shop()">
<form [formGroup]="body_shop_form" (ngSubmit)="testfun()">
<div class="fm_body_need" style="padding-top:55px;">
<h5 >Add Pictures to be cleaned</h5>
<hr>
......
......@@ -25,7 +25,7 @@ export class RequestWash {
service:any;
base64Image= [];
profile_pic= [];
page:any
constructor(public navCtrl: NavController, public navParams: NavParams,private transfer: FileTransfer, private file: File, private formBuilder: FormBuilder,private imagePicker: ImagePicker,public storage:Storage, private myservice: Myservice,public modalCtrl: ModalController) {
this.storage.get('lat_lng').then((lat_lng) => {
console.log("instorage", lat_lng);
......@@ -47,6 +47,7 @@ export class RequestWash {
this.body_shop_form = this.formBuilder.group({
message: ['', Validators.required],
});
this.page = 'quote';
}
ionViewDidLoad() {
......@@ -87,7 +88,13 @@ export class RequestWash {
modal.present();
}
}
testfun()
{
if(this.body_shop_form.value)
{
this.navCtrl.push('SuccessPage',{'page_name':this.page})
}
}
save_body_shop(vals){
console.log(this.base64Image.length);
if(this.base64Image.length > 0){
......
......@@ -9,6 +9,7 @@ import {Myservice} from '../../providers/myservice';
templateUrl: 'shopdetail.html',
})
export class ShopdetailPage {
page_data:any;
user_data:any;
profile:any;
garage_id:any;
......@@ -44,6 +45,7 @@ export class ShopdetailPage {
})
this.get_profile();
this.get_selected_services();
this.page_data='shopdetails';
}
ionViewDidLoad() {
......@@ -115,7 +117,7 @@ export class ShopdetailPage {
}
});
modal.present(); */
this.navCtrl.push('OfferedPage',{'page':this.page,'quote_val' : this.quote_val, 'offers' :offers,'timing':this.profile.timing,'garage_name':this.profile.name,'garage_id':this.garage_id,'services' : this.services_pg });
this.navCtrl.push('OfferedPage',{'page':this.page,'quote_val' : this.quote_val, 'offers' :offers,'timing':this.profile.timing,'garage_name':this.profile.name,'garage_id':this.garage_id,'services' : this.services_pg ,'shop_page':this.page_data});
}
}
......
......@@ -4,9 +4,9 @@
<div class="clear"></div>
</ion-header>
<ion-content class="fm_success_bg" padding>
<div class="fm_success_wrapper" [hidden]="page=='offered'">
<div class="fm_success_wrapper" *ngIf="page_name=='quote'">
<div class="fm_success_tick">
<img src="assets/icon/fm_tick.png">
<img src="../../assets/imgs/succcess.png">
<p>Awesome !</p>
<hr>
</div>
......@@ -16,9 +16,9 @@
respond back with an accurate quote to<br> your inbox
</div>
</div>
<div class="fm_success_wrapper" [hidden]="page=='car_details'" >
<div class="fm_success_wrapper" *ngIf="page_name=='book'" >
<div class="fm_success_tick">
<img src="assets/icon/fm_tick.png">
<img src="../../assets/imgs/succcess.png">
<p>Booking Success!</p>
<hr>
</div>
......
page-success {
.fm_success_bg{background:url("../../assets/img/fm_success_bg.png");background-repeat:no-repeat !important;background-position:center !important;background-repeat:no-repeat;background-size:cover !important;}
.fm_success_bg{background-color:#fff;background-image:url("/assets/img/fm_success_bg.png");background-repeat:no-repeat !important;background-position:center !important;background-repeat:no-repeat;background-size:cover !important;}
.fm_success_wrapper{width:100%;}
.fm_success_tick{width:30%;margin:0 auto;margin-top:20%;}
.fm_success_tick p{text-align:center;color:#616161;font-size:19px;font-weight: 300;}
......
......@@ -8,6 +8,7 @@ import { IonicPage, NavController, NavParams, Platform, Events } from 'ionic-ang
templateUrl: 'success.html',
})
export class SuccessPage {
page_name:any;
book_vals:any;
page:any;
constructor(platform: Platform,public navCtrl: NavController, public navParams: NavParams,public events: Events) {
......@@ -17,6 +18,7 @@ export class SuccessPage {
this.navCtrl.push('TabsPage');
backAction();
},2)
this.page_name= this.navParams.get('page_name');
this.book_vals = this.navParams.get('datas');
console.log(this.book_vals);
this.page = this.navParams.get('page');
......
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