Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Syed Sahir Hussain
DigiMart
Commits
867addc7
Commit
867addc7
authored
Feb 28, 2018
by
mohan122
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Registr_page_added
parent
647a1c25
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
292 additions
and
13 deletions
+292
-13
home/home.html
home/home.html
+195
-1
home/home.ts
home/home.ts
+66
-2
register/register.html
register/register.html
+3
-3
splash/splash.scss
splash/splash.scss
+2
-3
tabh/tabh.ts
tabh/tabh.ts
+26
-4
No files found.
home/home.html
View file @
867addc7
...
...
@@ -17,5 +17,199 @@
</ion-header>
<ion-content>
<p>
Hi i am vamsi
</p>
<ion-item
id=
"password"
style=
"padding:10px;"
>
<ion-label
floating
>
Name of Item
</ion-label>
<ion-input
type=
"text"
#itemname
></ion-input>
</ion-item>
<!--<ion-item *ngFor="let item of listItems">
<form [formGroup]="registeritems">
<ion-item style="padding:10px;">
<ion-label floating>ITEM NAME</ion-label>
<ion-input [formControl]="registeritems.controls['nameofitem']" type="text"></ion-input>
</ion-item>
<ion-item style="padding:10px;">
<ion-label floating>AVAILABLE QUANTITY (IN KGS)</ion-label>
<ion-input [formControl]="registeritems.controls['cost']" type="text"></ion-input>
</ion-item>
<ion-item style="padding:10px;">
<ion-label floating>PRICE (PER KG)</ion-label>
<ion-input [formControl]="registeritems.controls['price']" type="text"></ion-input>
</ion-item>
<ion-item style="padding:10px;">
<ion-label floating>ANY OFEERS (PER KG)</ion-label>
<ion-input [formControl]="registeritems.controls['offers']" type="text"></ion-input>
</ion-item>
<ion-item style="padding:10px;">
<ion-label floating>NO OF PIECES</ion-label>
<ion-input [formControl]="registeritems.controls['pieces']" type="text"></ion-input>
</ion-item>
<button ion-button type="submit" (click)="submit()">Submit</button>
</form>
-->
<ion-item
style=
"padding:10px;"
>
<ion-label
floating
>
SELECT-BY
</ion-label>
<ion-select
(ionCancel)=
"cancel()"
>
<ion-option
value=
"Kgs"
(ionSelect)=
"selectItem('Kgs');"
>
Kgs
</ion-option>
<ion-option
value=
"Pieces"
(ionSelect)=
"selectItem('Pieces');"
>
Pieces
</ion-option>
</ion-select>
</ion-item>
<ion-row>
<ion-col
col-9
>
<ion-item
style=
"padding:10px;"
*ngIf=
"isKgsSelected"
>
<ion-label
floating
>
AVAILABLE QUANTITY (IN KGS)
</ion-label>
<ion-input
*ngIf=
"isKgsSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-9
>
<ion-item
style=
"padding-left:10px;"
*ngIf=
"isKgsSelected"
>
<ion-label
floating
*ngIf=
"isKgsSelected"
>
PRICE (PER KG)
</ion-label>
<ion-input
*ngIf=
"isKgsSelected"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<p
*ngIf=
"isPiecesSelected"
style=
"padding:10px;"
>
Note:Weight in Grams
</p>
<ion-row
row-1
>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
Weight
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
pieces
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
cost
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<ion-row
row-2
>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
Weight
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
pieces
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
cost
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<ion-row
row-3
>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
Weight
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
pieces
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
cost
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<ion-row
row-4
>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
Weight
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
pieces
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
cost
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<ion-row
row-5
>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
Weight
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
pieces
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
cost
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<ion-row
row-6
>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
Weight
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
pieces
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
<ion-col
col-4
>
<ion-item
style=
"padding:0px;"
*ngIf=
"isPiecesSelected"
>
<ion-label
floating
*ngIf=
"isPiecesSelected"
>
cost
</ion-label>
<ion-input
*ngIf=
"isPiecesSelected"
></ion-input>
</ion-item>
</ion-col>
</ion-row>
<!--
<ion-card>
<div class="card-title">{{item.name}}</div>
<button ion-button icon-left clear item-end>
<ion-icon name="done-all"></ion-icon>
SUBMIT
</button>
</ion-card>
</ion-item>
-->
</ion-content>
\ No newline at end of file
home/home.ts
View file @
867addc7
...
...
@@ -2,6 +2,10 @@ import { Component } from '@angular/core';
import
{
IonicPage
,
NavController
,
NavParams
,
ToastController
}
from
'
ionic-angular
'
;
import
{
AngularFireAuth
}
from
'
angularfire2/auth
'
;
import
{
LoginPage
}
from
'
../login/login
'
;
import
{
FormBuilder
,
FormGroup
}
from
'
@angular/forms
'
;
/**
* Generated class for the HomePage page.
...
...
@@ -17,14 +21,74 @@ import { LoginPage } from '../login/login';
})
export
class
HomePage
{
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
fire
:
AngularFireAuth
,
private
toast
:
ToastController
)
{
registeritems
:
FormGroup
;
public
isKgsSelected
:
boolean
;
public
isPiecesSelected
:
boolean
;
/* public listItems: any;*/
constructor
(
public
navCtrl
:
NavController
,
private
formBuilder
:
FormBuilder
,
public
navParams
:
NavParams
,
private
fire
:
AngularFireAuth
,
private
toast
:
ToastController
)
{
/*this.listItems=[{
}];*/
this
.
registeritems
=
this
.
formBuilder
.
group
({
nameofitem
:[
''
],
cost
:[
''
],
price
:[
''
],
offers
:[
''
],
pieces
:[
''
],
});
}
submit
(){
this
.
registeritems
.
reset
();
}
/*public additem():void{
this.listItems.push({
name: "vamsi",
value: 1
});
}*/
selectItem
(
Mode
)
{
if
(
Mode
==
'
Kgs
'
)
{
this
.
isPiecesSelected
=
false
;
this
.
isKgsSelected
=
true
;
}
else
if
(
Mode
==
'
Pieces
'
)
{
this
.
isKgsSelected
=
false
;
this
.
isPiecesSelected
=
true
;
}
}
cancel
()
{
this
.
isKgsSelected
=
false
;
this
.
isPiecesSelected
=
false
;
}
Logout
(){
this
.
navCtrl
.
setRoot
(
LoginPage
);
}
ionViewWillLoad
()
{
this
.
isKgsSelected
=
false
;
this
.
isPiecesSelected
=
false
;
this
.
fire
.
authState
.
subscribe
(
user
=>
{
if
(
user
&&
user
.
email
&&
user
.
uid
){
this
.
toast
.
create
({
...
...
register/register.html
View file @
867addc7
...
...
@@ -39,12 +39,12 @@
</ion-select>
</ion-item>
<ion-item
id=
"password"
style=
"position: relative; padding:0px;"
>
<ion-label
floating
>
{{ location?.coords.latitude}}/ {{ location?.coords.longitude }}
</ion-label>
<ion-input
type=
"text"
></ion-input>
<ion-label
floating
>
LOCATION
</ion-label>
<ion-input
type=
"text"
value=
"{{ location?.coords.latitude}} {{ location?.coords.longitude }}"
readonly
></ion-input>
</ion-item>
<!--
%<p> Location:{{ location?.coords.latitude}}/ {{ location?.coords.longitude }}</p>
%<p> Location:{{ location?.coords.latitude}}/ {{ location?.coords.longitude }}
</p>
-->
</ion-list>
<div
padding
>
...
...
splash/splash.scss
View file @
867addc7
...
...
@@ -7,11 +7,10 @@
z-index
:
100000
;
width
:
100%
;
background-color
:
rgb
(
240
,
225
,
186
);
}
.flb
{
background-color
:
#ffdd1a
;
background-color
:
rgb
(
202
,
191
,
41
)
;
height
:
100%
;
width
:
100%
;
animation
:
pulse
1s
linear
forwards
;
...
...
@@ -270,4 +269,4 @@
-webkit-transform
:
matrix3d
(
2
,
0
,
0
,
0
,
0
,
2
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
1
);
transform
:
matrix3d
(
2
,
0
,
0
,
0
,
0
,
2
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
1
);
}
}
}
\ No newline at end of file
tabh/tabh.ts
View file @
867addc7
import
{
Component
}
from
'
@angular/core
'
;
import
{
IonicPage
,
NavController
}
from
'
ionic-angular
'
;
import
{
IonicPage
,
NavController
,
AlertController
}
from
'
ionic-angular
'
;
import
{
LoginPage
}
from
'
../login/login
'
;
/**
...
...
@@ -23,9 +23,31 @@ export class TabhPage {
constructor
(
public
navCtrl
:
NavController
)
{}
constructor
(
public
navCtrl
:
NavController
,
private
alertCtrl
:
AlertController
)
{}
Logout
(){
this
.
navCtrl
.
setRoot
(
LoginPage
);
let
alert
=
this
.
alertCtrl
.
create
({
title
:
'
CONFIRM LOGOUT
'
,
message
:
'
Do you want to Logout
'
,
buttons
:
[
{
text
:
'
stay
'
,
role
:
'
cancel
'
,
handler
:
()
=>
{
console
.
log
(
'
Cancel clicked
'
);
this
.
navCtrl
.
setRoot
(
TabhPage
);
}
},
{
text
:
'
Logout
'
,
handler
:
()
=>
{
console
.
log
(
'
Buy clicked
'
);
this
.
navCtrl
.
setRoot
(
LoginPage
);
}
}
]
});
alert
.
present
();
}
}
}
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