Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DigiMart
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Boards
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
KLUGLUG
DigiMart
Commits
08d29c0d
Commit
08d29c0d
authored
Mar 16, 2018
by
mohan122
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Done_youritemsPage
parent
3f7a76a7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
118 additions
and
14 deletions
+118
-14
home/home.html
home/home.html
+2
-1
home/home.ts
home/home.ts
+6
-5
login/login.ts
login/login.ts
+3
-2
register/register.ts
register/register.ts
+19
-2
tabh/tabh.html
tabh/tabh.html
+1
-0
tabh/tabh.ts
tabh/tabh.ts
+5
-3
your-items/your-items.html
your-items/your-items.html
+60
-0
your-items/your-items.ts
your-items/your-items.ts
+22
-1
No files found.
home/home.html
View file @
08d29c0d
...
...
@@ -8,7 +8,6 @@
<ion-navbar
color=
"vamsi"
>
<ion-title>
HOME
</ion-title>
<span
style=
"color:rgb(255, 255, 255)"
>
{{this.record}}
</span>
<ion-buttons
end
id=
"BUTON"
>
<button
(click)=
"Logout()"
id=
"BUTON"
>
<ion-icon
name=
"log-out"
color=
"white"
></ion-icon>
...
...
@@ -16,7 +15,9 @@
</ion-buttons>
</ion-navbar>
</ion-header>
<ion-content>
...
...
home/home.ts
View file @
08d29c0d
...
...
@@ -37,7 +37,6 @@ record:any;
constructor
(
public
navCtrl
:
NavController
,
private
formBuilder
:
FormBuilder
,
public
http
:
HttpClient
,
public
navParams
:
NavParams
,
private
fire
:
AngularFireAuth
,
private
toast
:
ToastController
)
{
this
.
record
=
navParams
.
get
(
'
emails
'
)
console
.
log
(
this
.
record
);
/*this.listItems=[{
}];*/
...
...
@@ -64,6 +63,7 @@ record:any;
Weightf
:[
''
],
piecesf
:[
''
],
costf
:[
''
],
emailf
:[
'
this.record
'
],
});
...
...
@@ -73,10 +73,10 @@ record:any;
this
.
registeritems
.
reset
();
}
createEntry
(
EMAIL
:
string
,
weighta
:
number
,
piecesa
:
number
,
costa
:
number
,
weightb
:
number
,
piecesb
:
number
,
costb
:
number
,
weightc
:
number
,
piecesc
:
number
,
costc
:
number
,
weightd
:
number
,
piecesd
:
number
,
costd
:
number
,
weighte
:
number
,
piecese
:
number
,
coste
:
number
,
weightf
:
number
,
piecesf
:
number
,
costf
:
number
)
:
void
createEntry
(
EMAIL
:
string
,
weighta
:
number
,
piecesa
:
number
,
costa
:
number
,
weightb
:
number
,
piecesb
:
number
,
costb
:
number
,
weightc
:
number
,
piecesc
:
number
,
costc
:
number
,
weightd
:
number
,
piecesd
:
number
,
costd
:
number
,
weighte
:
number
,
piecese
:
number
,
coste
:
number
,
weightf
:
number
,
piecesf
:
number
,
costf
:
number
,
emailf
:
string
)
:
void
{
let
headers
:
any
=
new
HttpHeaders
({
'
Content-Type
'
:
'
application/json
'
}),
options
:
any
=
{
"
key
"
:
"
create
"
,
"
EMAIL
"
:
EMAIL
,
"
weighta
"
:
weighta
,
"
piecesa
"
:
piecesa
,
"
costa
"
:
costa
,
"
weightb
"
:
weightb
,
"
piecesb
"
:
piecesb
,
"
costb
"
:
costb
,
"
weightc
"
:
weightc
,
"
piecesc
"
:
piecesc
,
"
costc
"
:
costc
,
"
weightd
"
:
weightd
,
"
piecesd
"
:
piecesd
,
"
costd
"
:
costd
,
"
weighte
"
:
weighte
,
"
piecese
"
:
piecese
,
"
coste
"
:
coste
,
"
weightf
"
:
weightf
,
"
piecesf
"
:
piecesf
,
"
costf
"
:
costf
},
options
:
any
=
{
"
key
"
:
"
create
"
,
"
EMAIL
"
:
EMAIL
,
"
weighta
"
:
weighta
,
"
piecesa
"
:
piecesa
,
"
costa
"
:
costa
,
"
weightb
"
:
weightb
,
"
piecesb
"
:
piecesb
,
"
costb
"
:
costb
,
"
weightc
"
:
weightc
,
"
piecesc
"
:
piecesc
,
"
costc
"
:
costc
,
"
weightd
"
:
weightd
,
"
piecesd
"
:
piecesd
,
"
costd
"
:
costd
,
"
weighte
"
:
weighte
,
"
piecese
"
:
piecese
,
"
coste
"
:
coste
,
"
weightf
"
:
weightf
,
"
piecesf
"
:
piecesf
,
"
costf
"
:
costf
,
"
emailf
"
:
emailf
},
url
:
any
=
this
.
baseURI
;
this
.
http
.
post
(
url
,
JSON
.
stringify
(
options
),
headers
)
...
...
@@ -112,10 +112,11 @@ record:any;
coste
:
number
=
this
.
registeritems
.
controls
[
"
coste
"
].
value
,
weightf
:
number
=
this
.
registeritems
.
controls
[
"
Weightf
"
].
value
,
piecesf
:
number
=
this
.
registeritems
.
controls
[
"
piecesf
"
].
value
,
costf
:
number
=
this
.
registeritems
.
controls
[
"
costf
"
].
value
costf
:
number
=
this
.
registeritems
.
controls
[
"
costf
"
].
value
,
emailf
:
string
=
this
.
registeritems
.
controls
[
"
emailf
"
].
value
this
.
createEntry
(
EMAIL
,
weighta
,
piecesa
,
costa
,
weightb
,
piecesb
,
costb
,
weightc
,
piecesc
,
costc
,
weightd
,
piecesd
,
costd
,
weighte
,
piecese
,
coste
,
weightf
,
piecesf
,
costf
);
this
.
createEntry
(
EMAIL
,
weighta
,
piecesa
,
costa
,
weightb
,
piecesb
,
costb
,
weightc
,
piecesc
,
costc
,
weightd
,
piecesd
,
costd
,
weighte
,
piecese
,
coste
,
weightf
,
piecesf
,
costf
,
emailf
);
}
/*public additem():void{
this.listItems.push({
...
...
login/login.ts
View file @
08d29c0d
...
...
@@ -27,9 +27,10 @@ export class LoginPage {
login
(
user
:
User
){
this
.
fire
.
auth
.
signInWithEmailAndPassword
(
this
.
user
.
email
,
this
.
user
.
password
)
.
then
(
data
=>
{
this
.
navCtrl
.
setRoot
(
TabhPage
);
this
.
navCtrl
.
setRoot
(
TabhPage
,{
emails
:
this
.
user
.
email
}
);
console
.
log
(
this
.
user
.
email
);
this
.
navCtrl
.
push
(
HomePage
,{
emails
:
this
.
user
.
email
});
//this.navCtrl.push(HomePage,{emails:this.user.email});
//this.navCtrl.push(TabhPage,{emails:this.user.email});
})
.
catch
(
error
=>
{
...
...
register/register.ts
View file @
08d29c0d
...
...
@@ -5,6 +5,8 @@ import { Component ,ViewChild } from '@angular/core';
import
{
Geolocation
}
from
'
@ionic-native/geolocation
'
;
import
{
FormBuilder
,
FormGroup
}
from
'
@angular/forms
'
;
import
{
HttpClient
,
HttpHeaders
}
from
'
@angular/common/http
'
;
import
{
NativeGeocoder
,
NativeGeocoderReverseResult
,
NativeGeocoderForwardResult
}
from
'
@ionic-native/native-geocoder
'
;
...
...
@@ -27,8 +29,9 @@ export class RegisterPage {
location
:
any
;
public
register
:
FormGroup
;
private
baseURI
:
string
=
"
http://localhost/vamsi/register.php
"
;
constructor
(
private
fire
:
AngularFireAuth
,
public
http
:
HttpClient
,
public
formBuilder
:
FormBuilder
,
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
geolocation
:
Geolocation
,
public
platform
:
Platform
)
{
latitude
:
any
;
longitude
:
any
;
constructor
(
private
fire
:
AngularFireAuth
,
private
nativeGeocoder
:
NativeGeocoder
,
public
http
:
HttpClient
,
public
formBuilder
:
FormBuilder
,
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
geolocation
:
Geolocation
,
public
platform
:
Platform
)
{
this
.
register
=
this
.
formBuilder
.
group
({
name
:[
''
],
mobile
:[
''
],
...
...
@@ -82,11 +85,25 @@ export class RegisterPage {
.
catch
(
error
=>
{
console
.
log
(
'
got error
'
,
error
);
});
this
.
platform
.
ready
().
then
(()
=>
{
this
.
nativeGeocoder
.
reverseGeocode
(
this
.
latitude
,
this
.
longitude
)
.
then
((
result
:
NativeGeocoderReverseResult
)
=>
{
console
.
log
(
JSON
.
stringify
(
result
));
})
.
catch
((
error
:
any
)
=>
{
console
.
log
(
error
);
});
});
this
.
platform
.
ready
().
then
(()
=>
{
let
options
=
{
timeout
:
3000
,
enableHighAccuracy
:
true
,
maximumAge
:
0
}
this
.
geolocation
.
getCurrentPosition
(
options
).
then
((
location
)
=>
{
console
.
log
(
'
Fetched the location successfully
'
,
location
);
this
.
location
=
location
;
this
.
latitude
=
location
.
coords
.
latitude
;
this
.
longitude
=
location
.
coords
.
latitude
;
}).
catch
((
error
)
=>
{
console
.
log
(
'
Error getting location
'
,
error
);
});
...
...
tabh/tabh.html
View file @
08d29c0d
...
...
@@ -2,6 +2,7 @@
<ion-navbar
color=
"vamsi"
>
<ion-title>
HEADER
</ion-title>
<span
style=
"color:rgb(255, 255, 255);padding-left:11px;font-weight:bold;font-size:10px;"
>
UID:{{this.record}}
</span>
<ion-buttons
end
id=
"BUTON"
>
<button
(click)=
"Logout()"
id=
"BUTON"
>
<ion-icon
name=
"log-out"
color=
"white"
></ion-icon>
...
...
tabh/tabh.ts
View file @
08d29c0d
import
{
Component
}
from
'
@angular/core
'
;
import
{
IonicPage
,
NavController
,
AlertController
}
from
'
ionic-angular
'
;
import
{
IonicPage
,
NavController
,
NavParams
,
AlertController
}
from
'
ionic-angular
'
;
import
{
LoginPage
}
from
'
../login/login
'
;
/**
...
...
@@ -19,11 +19,13 @@ export class TabhPage {
homeRoot
=
'
HomePage
'
yourItemsRoot
=
'
YourItemsPage
'
editHistoryRoot
=
'
EditHistoryPage
'
record
:
any
;
constructor
(
public
navCtrl
:
NavController
,
private
alertCtrl
:
AlertController
)
{}
constructor
(
public
navCtrl
:
NavController
,
private
alertCtrl
:
AlertController
,
public
navParams
:
NavParams
)
{
this
.
record
=
navParams
.
get
(
'
emails
'
)
}
Logout
(){
let
alert
=
this
.
alertCtrl
.
create
({
title
:
'
CONFIRM LOGOUT
'
,
...
...
your-items/your-items.html
View file @
08d29c0d
...
...
@@ -20,5 +20,65 @@
</ion-header>
<ion-content
padding
>
<ion-item
*ngFor=
"let item of items"
>
<ion-card>
<ion-card-header
style=
"background-color:#FFA500;font-weight:bold;color:white;"
>
<ion-icon
name=
"cart"
>
{{item.EMAIL}}
</ion-icon>
</ion-card-header>
<div
style=
"padding:0px"
>
<div
class=
"row"
style=
"padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;font-weight:bold;"
>
<div
class=
"col"
>
WEIGHT
</div>
<div
class=
"col"
>
PIECES
</div>
<div
class=
"col"
>
COST
</div>
</div>
<div
class=
"row"
style=
"background-color:#f2f2f2;"
>
<div
class=
"col"
>
{{item.weighta}}
</div>
<div
class=
"col"
>
{{item.piecesa}}
</div>
<div
class=
"col"
>
{{item.costa}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col"
>
{{item.weightb}}
</div>
<div
class=
"col"
>
{{item.piecesb}}
</div>
<div
class=
"col"
>
{{item.costb}}
</div>
</div>
<div
class=
"row"
style=
"background-color:#f2f2f2;"
>
<div
class=
"col"
>
{{item.weightc}}
</div>
<div
class=
"col"
>
{{item.piecesc}}
</div>
<div
class=
"col"
>
{{item.costc}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col"
>
{{item.weightd}}
</div>
<div
class=
"col"
>
{{item.piecesd}}
</div>
<div
class=
"col"
>
{{item.costd}}
</div>
</div>
<div
class=
"row"
style=
"background-color:#f2f2f2;"
>
<div
class=
"col"
>
{{item.weighte}}
</div>
<div
class=
"col"
>
{{item.piecese}}
</div>
<div
class=
"col"
>
{{item.coste}}
</div>
</div>
<div
class=
"row"
>
<div
class=
"col"
>
{{item.weightf}}
</div>
<div
class=
"col"
>
{{item.piecesf}}
</div>
<div
class=
"col"
>
{{item.costf}}
</div>
</div>
</div>
</ion-card>
</ion-item>
</ion-content>
\ No newline at end of file
your-items/your-items.ts
View file @
08d29c0d
import
{
Component
}
from
'
@angular/core
'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'
ionic-angular
'
;
import
{
LoginPage
}
from
'
../login/login
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
/**
* Generated class for the YourItemsPage page.
...
...
@@ -15,12 +16,32 @@ import { LoginPage } from '../login/login';
templateUrl
:
'
your-items.html
'
,
})
export
class
YourItemsPage
{
public
items
:
Array
<
any
>
=
[];
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
)
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
http
:
HttpClient
)
{
}
Logout
(){
this
.
navCtrl
.
setRoot
(
LoginPage
);
}
ionViewWillEnter
()
:
void
{
this
.
load
();
}
load
()
:
void
{
this
.
http
.
get
(
'
http://localhost/vamsi/itemretrive.php
'
)
.
subscribe
((
data
:
any
)
=>
{
console
.
dir
(
data
);
this
.
items
=
data
;
},
(
error
:
any
)
=>
{
console
.
dir
(
error
);
});
}
ionViewDidLoad
()
{
console
.
log
(
'
ionViewDidLoad YourItemsPage
'
);
...
...
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