Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Callmycab-Driverapp
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kevin
Callmycab-Driverapp
Commits
ee3baf19
Commit
ee3baf19
authored
Aug 08, 2018
by
Alen Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'alen' into 'master'
sidemenu lang change See merge request alen/CMC-driver!25
parents
29517024
3d5b34ba
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
124 additions
and
39 deletions
+124
-39
package.json
package.json
+2
-1
app.component.ts
src/app/app.component.ts
+24
-14
app.html
src/app/app.html
+6
-0
app.scss
src/app/app.scss
+13
-0
changepass.ts
src/pages/changepass/changepass.ts
+8
-2
docupdate.ts
src/pages/docupdate/docupdate.ts
+6
-2
forgot.ts
src/pages/forgot/forgot.ts
+6
-2
home.ts
src/pages/home/home.ts
+5
-0
landing.ts
src/pages/landing/landing.ts
+7
-2
myprofile.ts
src/pages/myprofile/myprofile.ts
+6
-0
payment.ts
src/pages/payment/payment.ts
+4
-2
quickride.ts
src/pages/quickride/quickride.ts
+9
-5
ridedetails.ts
src/pages/ridedetails/ridedetails.ts
+7
-3
signin.ts
src/pages/signin/signin.ts
+7
-2
signup.ts
src/pages/signup/signup.ts
+7
-2
uploaddoc.ts
src/pages/uploaddoc/uploaddoc.ts
+7
-2
No files found.
package.json
View file @
ee3baf19
...
@@ -95,4 +95,4 @@
...
@@ -95,4 +95,4 @@
"android"
"android"
]
]
}
}
}
}
\ No newline at end of file
src/app/app.component.ts
View file @
ee3baf19
...
@@ -47,7 +47,7 @@ export class MyApp {
...
@@ -47,7 +47,7 @@ export class MyApp {
// this.enableLoc()
// this.enableLoc()
this
.
languageTrans
();
this
.
languageTrans
();
this
.
events
.
subscribe
(
'
us
er:lang'
,
data
=>
{
this
.
events
.
subscribe
(
'
driv
er:lang'
,
data
=>
{
this
.
languageTrans
();
this
.
languageTrans
();
})
})
...
@@ -144,7 +144,7 @@ export class MyApp {
...
@@ -144,7 +144,7 @@ export class MyApp {
}
}
})
})
},
20000
)
},
20000
)
//
This.setlocalNotification();
This
.
setlocalNotification
();
}
}
openPage
(
page
)
{
openPage
(
page
)
{
...
@@ -200,11 +200,13 @@ export class MyApp {
...
@@ -200,11 +200,13 @@ export class MyApp {
var
arr
=
[]
var
arr
=
[]
for
(
let
i
=
0
;
i
<
upcoming
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
upcoming
.
length
;
i
++
)
{
var
t
=
new
Date
(
upcoming
[
i
].
pickup_date
+
' '
+
upcoming
[
i
].
pickup_time
).
getTime
()
// console.log(t-300000)
arr
.
push
({
arr
.
push
({
id
:
i
,
id
:
i
,
text
:
'Ride Notification'
,
text
:
'Ride Notification'
,
title
:
'CMC-Driver'
,
title
:
'CMC-Driver'
,
trigger
:
{
at
:
new
Date
(
upcoming
[
i
].
pickup_date
+
' '
+
upcoming
[
i
].
pickup_time
)
},
trigger
:
{
at
:
new
Date
(
t
-
300000
)
},
led
:
'FF0000'
,
led
:
'FF0000'
,
sound
:
'file://assets/sounds/request.mp3'
,
sound
:
'file://assets/sounds/request.mp3'
,
data
:
upcoming
[
i
],
data
:
upcoming
[
i
],
...
@@ -234,17 +236,20 @@ export class MyApp {
...
@@ -234,17 +236,20 @@ export class MyApp {
}
}
languageTrans
()
{
languageTrans
()
{
this
.
storage
.
get
(
'lang'
).
then
(
data
=>
{
var
This
=
this
;
console
.
log
(
data
)
setTimeout
(
function
()
{
if
(
data
)
{
This
.
storage
.
get
(
'lang'
).
then
(
data
=>
{
this
.
translate
.
use
(
data
);
console
.
log
(
data
)
this
.
lang
=
data
;
if
(
data
)
{
}
This
.
translate
.
use
(
data
);
else
{
This
.
lang
=
data
;
this
.
translate
.
setDefaultLang
(
'en'
);
}
}
else
{
this
.
lang_trans
()
This
.
translate
.
setDefaultLang
(
'en'
);
})
}
This
.
lang_trans
()
})
},
500
)
}
}
lang_trans
()
{
lang_trans
()
{
...
@@ -256,4 +261,9 @@ export class MyApp {
...
@@ -256,4 +261,9 @@ export class MyApp {
})
})
}
}
changeLang
(
lang
)
{
this
.
storage
.
set
(
'lang'
,
lang
);
this
.
events
.
publish
(
'driver:lang'
,
lang
);
}
}
}
src/app/app.html
View file @
ee3baf19
<ion-menu
[
content
]="
content
"
>
<ion-menu
[
content
]="
content
"
>
<ion-content
class=
"theme_bgcolor"
>
<ion-content
class=
"theme_bgcolor"
>
<div
class=
"cab_sidemenu_wrapper"
>
<div
class=
"cab_sidemenu_wrapper"
>
<select
[(
ngModel
)]="
lang
"
(
change
)="
changeLang
(
lang
)"
>
<option
value=
"en"
>
EN
</option>
<option
value=
"en2"
>
EN2
</option>
</select>
<div
menuClose
class=
"cab_profile_banner"
(
click
)="
openPage
('
MyprofilePage
')"
>
<div
menuClose
class=
"cab_profile_banner"
(
click
)="
openPage
('
MyprofilePage
')"
>
<div
class=
"cab_profile_picture"
>
<div
class=
"cab_profile_picture"
>
<img
[
src
]="
local
?.
image
"
>
<img
[
src
]="
local
?.
image
"
>
...
...
src/app/app.scss
View file @
ee3baf19
...
@@ -11,6 +11,19 @@
...
@@ -11,6 +11,19 @@
justify-content
:
center
;
justify-content
:
center
;
text-align
:
center
;
text-align
:
center
;
padding-left
:
30px
;
padding-left
:
30px
;
position
:
relative
;
select
{
width
:
75px
;
height
:
30px
;
background
:
transparent
;
border
:
2px
solid
#fff
;
border-radius
:
20px
;
position
:
absolute
;
top
:
30px
;
right
:
30px
;
color
:
#fff
;
padding-left
:
10px
;
}
}
}
.cab_sidemenu_wrapper
hr
{
.cab_sidemenu_wrapper
hr
{
...
...
src/pages/changepass/changepass.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
Events
}
from
'ionic-angular'
;
import
{
FormGroup
,
Validators
,
FormBuilder
}
from
'@angular/forms'
import
{
FormGroup
,
Validators
,
FormBuilder
}
from
'@angular/forms'
import
{
Myservice
}
from
'../../providers/myservice'
import
{
Myservice
}
from
'../../providers/myservice'
import
{
Storage
}
from
'@ionic/storage'
import
{
Storage
}
from
'@ionic/storage'
...
@@ -17,7 +17,7 @@ export class ChangepassPage {
...
@@ -17,7 +17,7 @@ export class ChangepassPage {
local
:
driver
local
:
driver
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
public
storage
:
Storage
,
private
formbuilder
:
FormBuilder
,
private
toast
:
Toast
,
private
translate
:
TranslateService
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
public
storage
:
Storage
,
private
formbuilder
:
FormBuilder
,
private
toast
:
Toast
,
private
translate
:
TranslateService
,
public
events
:
Events
)
{
this
.
pswdForm
=
this
.
formbuilder
.
group
({
this
.
pswdForm
=
this
.
formbuilder
.
group
({
current
:
[
''
,
Validators
.
compose
([
Validators
.
required
,
Validators
.
minLength
(
6
)])],
current
:
[
''
,
Validators
.
compose
([
Validators
.
required
,
Validators
.
minLength
(
6
)])],
...
@@ -25,6 +25,12 @@ export class ChangepassPage {
...
@@ -25,6 +25,12 @@ export class ChangepassPage {
confirm
:
[
''
,
Validators
.
compose
([
Validators
.
required
]),
this
.
MatchPassword
.
bind
(
this
)],
confirm
:
[
''
,
Validators
.
compose
([
Validators
.
required
]),
this
.
MatchPassword
.
bind
(
this
)],
id
:
[
''
]
id
:
[
''
]
})
})
this
.
events
.
subscribe
(
'driver:lang'
,
data
=>
{
setTimeout
(()
=>
{
this
.
langTrans
();
},
500
);
})
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
...
...
src/pages/docupdate/docupdate.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
MenuController
}
from
'ionic-angular'
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
Storage
}
from
"@ionic/storage"
;
import
{
Storage
}
from
"@ionic/storage"
;
import
{
driver
}
from
"../../models/mymodel"
;
import
{
driver
}
from
"../../models/mymodel"
;
...
@@ -27,10 +27,11 @@ export class DocupdatePage {
...
@@ -27,10 +27,11 @@ export class DocupdatePage {
butonName
:
string
;
butonName
:
string
;
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
private
storage
:
Storage
,
private
toast
:
Toast
,
private
comService
:
dataService
,
private
photoViewer
:
PhotoViewer
,
private
fileOpener
:
FileOpener
,
private
transfer
:
FileTransfer
,
private
file
:
File
,
private
translate
:
TranslateService
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
private
storage
:
Storage
,
private
toast
:
Toast
,
private
comService
:
dataService
,
private
photoViewer
:
PhotoViewer
,
private
fileOpener
:
FileOpener
,
private
transfer
:
FileTransfer
,
private
file
:
File
,
private
translate
:
TranslateService
,
private
menu
:
MenuController
)
{
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
this
.
menu
.
swipeEnable
(
false
)
this
.
langTrans
()
this
.
langTrans
()
this
.
fileData
=
this
.
comService
.
getdocData
();
this
.
fileData
=
this
.
comService
.
getdocData
();
...
@@ -147,5 +148,8 @@ export class DocupdatePage {
...
@@ -147,5 +148,8 @@ export class DocupdatePage {
this
.
navCtrl
.
pop
();
this
.
navCtrl
.
pop
();
}
}
ionViewWillLeave
()
{
this
.
menu
.
swipeEnable
(
true
)
}
}
}
src/pages/forgot/forgot.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
MenuController
}
from
'ionic-angular'
;
import
{
FormGroup
,
Validators
,
FormBuilder
}
from
'@angular/forms'
import
{
FormGroup
,
Validators
,
FormBuilder
}
from
'@angular/forms'
import
{
Myservice
}
from
'../../providers/myservice'
import
{
Myservice
}
from
'../../providers/myservice'
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
TranslateService
}
from
"@ngx-translate/core"
;
...
@@ -14,7 +14,7 @@ export class ForgotPage {
...
@@ -14,7 +14,7 @@ export class ForgotPage {
forgotForm
:
FormGroup
forgotForm
:
FormGroup
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
formbuilder
:
FormBuilder
,
private
myservice
:
Myservice
,
private
translate
:
TranslateService
,
public
storage
:
Storage
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
formbuilder
:
FormBuilder
,
private
myservice
:
Myservice
,
private
translate
:
TranslateService
,
public
storage
:
Storage
,
private
menu
:
MenuController
)
{
this
.
forgotForm
=
this
.
formbuilder
.
group
({
this
.
forgotForm
=
this
.
formbuilder
.
group
({
email
:
[
''
,
Validators
.
compose
([
Validators
.
required
,
Validators
.
pattern
(
"[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}"
)])],
email
:
[
''
,
Validators
.
compose
([
Validators
.
required
,
Validators
.
pattern
(
"[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}"
)])],
from
:[
'driver'
]
from
:[
'driver'
]
...
@@ -22,6 +22,7 @@ export class ForgotPage {
...
@@ -22,6 +22,7 @@ export class ForgotPage {
}
}
ionViewDidEnter
(){
ionViewDidEnter
(){
this
.
menu
.
swipeEnable
(
false
)
this
.
langTrans
()
this
.
langTrans
()
}
}
...
@@ -61,4 +62,7 @@ export class ForgotPage {
...
@@ -61,4 +62,7 @@ export class ForgotPage {
this
.
navCtrl
.
pop
();
this
.
navCtrl
.
pop
();
}
}
ionViewWillLeave
()
{
this
.
menu
.
swipeEnable
(
true
)
}
}
}
src/pages/home/home.ts
View file @
ee3baf19
...
@@ -18,6 +18,11 @@ export class HomePage {
...
@@ -18,6 +18,11 @@ export class HomePage {
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
storage
:
Storage
,
private
myservice
:
Myservice
,
private
data
:
dataService
,
public
events
:
Events
,
private
translate
:
TranslateService
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
storage
:
Storage
,
private
myservice
:
Myservice
,
private
data
:
dataService
,
public
events
:
Events
,
private
translate
:
TranslateService
)
{
this
.
events
.
subscribe
(
'driver:lang'
,
data
=>
{
setTimeout
(()
=>
{
this
.
langTrans
();
},
500
);
})
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
...
...
src/pages/landing/landing.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
MenuController
}
from
'ionic-angular'
;
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
Storage
}
from
'@ionic/storage'
import
{
Storage
}
from
'@ionic/storage'
...
@@ -11,7 +11,7 @@ import { Storage } from '@ionic/storage'
...
@@ -11,7 +11,7 @@ import { Storage } from '@ionic/storage'
export
class
LandingPage
{
export
class
LandingPage
{
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
storage
:
Storage
,
private
translate
:
TranslateService
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
storage
:
Storage
,
private
translate
:
TranslateService
,
private
menu
:
MenuController
)
{
}
}
open_page
(
page
){
open_page
(
page
){
...
@@ -19,6 +19,7 @@ export class LandingPage {
...
@@ -19,6 +19,7 @@ export class LandingPage {
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
this
.
menu
.
swipeEnable
(
false
)
this
.
langTrans
()
this
.
langTrans
()
}
}
...
@@ -35,4 +36,8 @@ export class LandingPage {
...
@@ -35,4 +36,8 @@ export class LandingPage {
})
})
}
}
ionViewWillLeave
(){
this
.
menu
.
swipeEnable
(
true
)
}
}
}
src/pages/myprofile/myprofile.ts
View file @
ee3baf19
...
@@ -50,6 +50,12 @@ export class MyprofilePage {
...
@@ -50,6 +50,12 @@ export class MyprofilePage {
this
.
codes
=
response
.
json
().
dialCodes
this
.
codes
=
response
.
json
().
dialCodes
this
.
codes
=
this
.
orderbyPipe
.
transform
(
this
.
codes
,
'dialCode'
);
this
.
codes
=
this
.
orderbyPipe
.
transform
(
this
.
codes
,
'dialCode'
);
})
})
this
.
events
.
subscribe
(
'driver:lang'
,
data
=>
{
setTimeout
(()
=>
{
this
.
langTrans
();
},
500
);
})
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
...
...
src/pages/payment/payment.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
,
Platform
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
Platform
,
MenuController
}
from
'ionic-angular'
;
import
{
dataService
}
from
"../../providers/common.service"
;
import
{
dataService
}
from
"../../providers/common.service"
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
*
as
firebase
from
'firebase'
;
import
*
as
firebase
from
'firebase'
;
...
@@ -24,7 +24,7 @@ export class PaymentPage {
...
@@ -24,7 +24,7 @@ export class PaymentPage {
details
:
any
;
details
:
any
;
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
data
:
dataService
,
private
myservice
:
Myservice
,
public
platform
:
Platform
,
private
datePipe
:
DatePipe
,
public
storage
:
Storage
,
private
translate
:
TranslateService
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
data
:
dataService
,
private
myservice
:
Myservice
,
public
platform
:
Platform
,
private
datePipe
:
DatePipe
,
public
storage
:
Storage
,
private
translate
:
TranslateService
,
private
menu
:
MenuController
)
{
}
}
langTrans
()
{
langTrans
()
{
...
@@ -40,6 +40,7 @@ export class PaymentPage {
...
@@ -40,6 +40,7 @@ export class PaymentPage {
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
this
.
menu
.
swipeEnable
(
false
)
this
.
langTrans
()
this
.
langTrans
()
// this.myservice.hide_loader();
// this.myservice.hide_loader();
this
.
initializeBackButtonCustomHandler
();
this
.
initializeBackButtonCustomHandler
();
...
@@ -121,6 +122,7 @@ export class PaymentPage {
...
@@ -121,6 +122,7 @@ export class PaymentPage {
ionViewWillLeave
()
{
ionViewWillLeave
()
{
this
.
unregisterBackButtonAction
&&
this
.
unregisterBackButtonAction
();
this
.
unregisterBackButtonAction
&&
this
.
unregisterBackButtonAction
();
this
.
menu
.
swipeEnable
(
true
)
}
}
done
()
{
done
()
{
...
...
src/pages/quickride/quickride.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
,
ModalController
,
AlertController
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
ModalController
,
AlertController
,
MenuController
}
from
'ionic-angular'
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
Storage
}
from
"@ionic/storage"
;
import
{
Storage
}
from
"@ionic/storage"
;
import
{
driver
}
from
"../../models/mymodel"
;
import
{
driver
}
from
"../../models/mymodel"
;
...
@@ -19,11 +19,11 @@ export class QuickridePage {
...
@@ -19,11 +19,11 @@ export class QuickridePage {
baseUrl
=
this
.
myservice
.
base_url
baseUrl
=
this
.
myservice
.
base_url
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
private
storage
:
Storage
,
private
data
:
dataService
,
private
toast
:
Toast
,
private
modalCtrl
:
ModalController
,
public
alertCtrl
:
AlertController
,
private
translate
:
TranslateService
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
private
storage
:
Storage
,
private
data
:
dataService
,
private
toast
:
Toast
,
private
modalCtrl
:
ModalController
,
public
alertCtrl
:
AlertController
,
private
translate
:
TranslateService
,
private
menu
:
MenuController
)
{
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
this
.
menu
.
swipeEnable
(
false
)
this
.
langTrans
()
this
.
langTrans
()
this
.
storage
.
get
(
'driver_data'
).
then
(
data
=>
{
this
.
storage
.
get
(
'driver_data'
).
then
(
data
=>
{
...
@@ -48,7 +48,7 @@ export class QuickridePage {
...
@@ -48,7 +48,7 @@ export class QuickridePage {
this
.
data
.
setrideData
(
this
.
rideDetail
)
this
.
data
.
setrideData
(
this
.
rideDetail
)
}
}
else
{
else
{
this
.
translate
.
get
([
'quickride.'
+
resp
.
message
]).
subscribe
(
value
=>
{
this
.
translate
.
get
([
'quickride.'
+
resp
.
message
]).
subscribe
(
value
=>
{
this
.
myservice
.
show_alert
(
''
,
value
[
'quickride.'
+
resp
.
message
])
this
.
myservice
.
show_alert
(
''
,
value
[
'quickride.'
+
resp
.
message
])
})
})
...
@@ -72,7 +72,7 @@ export class QuickridePage {
...
@@ -72,7 +72,7 @@ export class QuickridePage {
this
.
myservice
.
load_post
({
bookingId
:
this
.
bookingId
,
driverId
:
this
.
local
.
id
},
'rideAccept'
).
subscribe
(
resp
=>
{
this
.
myservice
.
load_post
({
bookingId
:
this
.
bookingId
,
driverId
:
this
.
local
.
id
},
'rideAccept'
).
subscribe
(
resp
=>
{
if
(
resp
.
status
==
'success'
)
{
if
(
resp
.
status
==
'success'
)
{
this
.
translate
.
get
([
'quickride.'
+
resp
.
message
]).
subscribe
(
value
=>
{
this
.
translate
.
get
([
'quickride.'
+
resp
.
message
]).
subscribe
(
value
=>
{
this
.
toast
.
show
(
value
[
'quickride.'
+
resp
.
message
],
'2000'
,
'center'
).
subscribe
(
toast
=>
{
this
.
toast
.
show
(
value
[
'quickride.'
+
resp
.
message
],
'2000'
,
'center'
).
subscribe
(
toast
=>
{
console
.
log
(
toast
);
console
.
log
(
toast
);
});
});
})
})
...
@@ -116,4 +116,8 @@ export class QuickridePage {
...
@@ -116,4 +116,8 @@ export class QuickridePage {
back
()
{
back
()
{
this
.
navCtrl
.
pop
()
this
.
navCtrl
.
pop
()
}
}
ionViewWillLeave
()
{
this
.
menu
.
swipeEnable
(
true
)
}
}
}
src/pages/ridedetails/ridedetails.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
MenuController
}
from
'ionic-angular'
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
dataService
}
from
"../../providers/common.service"
;
import
{
dataService
}
from
"../../providers/common.service"
;
import
{
DatePipe
}
from
'@angular/common'
;
import
{
DatePipe
}
from
'@angular/common'
;
...
@@ -19,12 +19,12 @@ export class RidedetailsPage {
...
@@ -19,12 +19,12 @@ export class RidedetailsPage {
temp
:
boolean
=
false
;
temp
:
boolean
=
false
;
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
private
data
:
dataService
,
private
datePipe
:
DatePipe
,
private
translate
:
TranslateService
,
private
storage
:
Storage
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
private
data
:
dataService
,
private
datePipe
:
DatePipe
,
private
translate
:
TranslateService
,
private
storage
:
Storage
,
private
menu
:
MenuController
)
{
}
}
ionViewDidEnter
(){
ionViewDidEnter
(){
this
.
menu
.
swipeEnable
(
false
)
this
.
langTrans
()
this
.
langTrans
()
this
.
now
=
this
.
datePipe
.
transform
(
new
Date
(),
'MM/dd/yyyy'
)
this
.
now
=
this
.
datePipe
.
transform
(
new
Date
(),
'MM/dd/yyyy'
)
...
@@ -71,4 +71,8 @@ export class RidedetailsPage {
...
@@ -71,4 +71,8 @@ export class RidedetailsPage {
})
})
}
}
ionViewWillLeave
(){
this
.
menu
.
swipeEnable
(
true
)
}
}
}
src/pages/signin/signin.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
,
Events
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
Events
,
MenuController
}
from
'ionic-angular'
;
import
{
Validators
,
FormBuilder
,
FormGroup
}
from
"@angular/forms"
;
import
{
Validators
,
FormBuilder
,
FormGroup
}
from
"@angular/forms"
;
import
{
Http
}
from
'@angular/http'
import
{
Http
}
from
'@angular/http'
import
{
dialcode
}
from
"../../models/mymodel"
;
import
{
dialcode
}
from
"../../models/mymodel"
;
...
@@ -18,7 +18,7 @@ export class SigninPage {
...
@@ -18,7 +18,7 @@ export class SigninPage {
signinForm
:
FormGroup
signinForm
:
FormGroup
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
formBuilder
:
FormBuilder
,
private
http
:
Http
,
private
orderbyPipe
:
OrderbyPipe
,
private
myservice
:
Myservice
,
private
storage
:
Storage
,
public
events
:
Events
,
private
translate
:
TranslateService
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
formBuilder
:
FormBuilder
,
private
http
:
Http
,
private
orderbyPipe
:
OrderbyPipe
,
private
myservice
:
Myservice
,
private
storage
:
Storage
,
public
events
:
Events
,
private
translate
:
TranslateService
,
private
menu
:
MenuController
)
{
this
.
signinForm
=
this
.
formBuilder
.
group
({
this
.
signinForm
=
this
.
formBuilder
.
group
({
mobile
:
[
''
,
Validators
.
compose
([
Validators
.
required
,
this
.
myservice
.
checkLimit
(
10000000
,
999999999999999
)])],
mobile
:
[
''
,
Validators
.
compose
([
Validators
.
required
,
this
.
myservice
.
checkLimit
(
10000000
,
999999999999999
)])],
dial_code
:
[
'+91'
,
Validators
.
required
],
dial_code
:
[
'+91'
,
Validators
.
required
],
...
@@ -45,6 +45,7 @@ export class SigninPage {
...
@@ -45,6 +45,7 @@ export class SigninPage {
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
this
.
menu
.
swipeEnable
(
false
);
this
.
langTrans
()
this
.
langTrans
()
}
}
...
@@ -78,4 +79,8 @@ export class SigninPage {
...
@@ -78,4 +79,8 @@ export class SigninPage {
this
.
navCtrl
.
push
(
"ForgotPage"
);
this
.
navCtrl
.
push
(
"ForgotPage"
);
}
}
ionViewWillLeave
(){
this
.
menu
.
swipeEnable
(
true
);
}
}
}
src/pages/signup/signup.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
MenuController
}
from
'ionic-angular'
;
import
{
Validators
,
FormBuilder
,
FormGroup
}
from
"@angular/forms"
;
import
{
Validators
,
FormBuilder
,
FormGroup
}
from
"@angular/forms"
;
import
{
Http
}
from
'@angular/http'
import
{
Http
}
from
'@angular/http'
import
{
dialcode
}
from
"../../models/mymodel"
;
import
{
dialcode
}
from
"../../models/mymodel"
;
...
@@ -21,7 +21,7 @@ export class SignupPage {
...
@@ -21,7 +21,7 @@ export class SignupPage {
codes
:
Array
<
dialcode
>
;
codes
:
Array
<
dialcode
>
;
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
formBuilder
:
FormBuilder
,
private
http
:
Http
,
private
orderbyPipe
:
OrderbyPipe
,
private
myservice
:
Myservice
,
private
onesignal
:
OneSignal
,
private
firebase
:
fireService
,
private
geolocation
:
Geolocation
,
private
translate
:
TranslateService
,
private
storage
:
Storage
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
formBuilder
:
FormBuilder
,
private
http
:
Http
,
private
orderbyPipe
:
OrderbyPipe
,
private
myservice
:
Myservice
,
private
onesignal
:
OneSignal
,
private
firebase
:
fireService
,
private
geolocation
:
Geolocation
,
private
translate
:
TranslateService
,
private
storage
:
Storage
,
private
menu
:
MenuController
)
{
this
.
signupForm
=
this
.
formBuilder
.
group
({
this
.
signupForm
=
this
.
formBuilder
.
group
({
name
:
[
''
,
Validators
.
compose
([
Validators
.
required
,
Validators
.
minLength
(
3
)])],
name
:
[
''
,
Validators
.
compose
([
Validators
.
required
,
Validators
.
minLength
(
3
)])],
...
@@ -43,6 +43,7 @@ export class SignupPage {
...
@@ -43,6 +43,7 @@ export class SignupPage {
}
}
ionViewDidEnter
()
{
ionViewDidEnter
()
{
this
.
menu
.
swipeEnable
(
false
)
this
.
langTrans
()
this
.
langTrans
()
}
}
...
@@ -91,6 +92,10 @@ export class SignupPage {
...
@@ -91,6 +92,10 @@ export class SignupPage {
});
});
}
}
ionViewWillLeave
(){
this
.
menu
.
swipeEnable
(
true
)
}
MatchPassword
(
val
)
{
MatchPassword
(
val
)
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
if
(
val
.
value
==
this
.
signupForm
.
value
.
password
)
{
if
(
val
.
value
==
this
.
signupForm
.
value
.
password
)
{
...
...
src/pages/uploaddoc/uploaddoc.ts
View file @
ee3baf19
import
{
Component
}
from
'@angular/core'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
IonicPage
,
NavController
,
NavParams
,
Events
}
from
'ionic-angular'
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
Myservice
}
from
"../../providers/myservice"
;
import
{
dataService
}
from
"../../providers/common.service"
;
import
{
dataService
}
from
"../../providers/common.service"
;
import
{
Storage
}
from
"@ionic/storage"
;
import
{
Storage
}
from
"@ionic/storage"
;
...
@@ -16,7 +16,12 @@ export class UploaddocPage {
...
@@ -16,7 +16,12 @@ export class UploaddocPage {
local
:
driver
local
:
driver
lang
:
string
=
'en'
;
lang
:
string
=
'en'
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
private
comService
:
dataService
,
private
storage
:
Storage
,
private
translate
:
TranslateService
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
myservice
:
Myservice
,
private
comService
:
dataService
,
private
storage
:
Storage
,
private
translate
:
TranslateService
,
public
events
:
Events
)
{
this
.
events
.
subscribe
(
'driver:lang'
,
data
=>
{
setTimeout
(()
=>
{
this
.
langTrans
();
},
500
);
})
}
}
ionViewDidEnter
(){
ionViewDidEnter
(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment