Skip to content

Commit

Permalink
session code
Browse files Browse the repository at this point in the history
  • Loading branch information
jainam7 committed Dec 29, 2017
1 parent abf46c4 commit fecbf99
Show file tree
Hide file tree
Showing 25 changed files with 209 additions and 68 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@ionic-native/core": "4.4.0",
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/status-bar": "4.4.0",
"@ionic/storage": "2.1.3",
"@ionic/storage": "^2.1.3",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "5.5.2",
Expand Down
10 changes: 6 additions & 4 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { HttpModule } from '@angular/http';
import { IonicStorageModule } from '@ionic/storage';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { UserPage } from "../pages/user/user";
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { Viewprescription1Page } from '../pages/viewprescription1/viewprescription1';
Expand All @@ -29,7 +30,7 @@ import { UserlogProvider } from "../providers/userlog/userlog";
declarations: [
MyApp,
AboutPage,
ContactPage,
UserPage,
HomePage,
TabsPage,
Viewprescription1Page,
Expand All @@ -43,13 +44,14 @@ import { UserlogProvider } from "../providers/userlog/userlog";
imports: [
BrowserModule,
HttpModule,
IonicModule.forRoot(MyApp)
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot()
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
AboutPage,
ContactPage,
UserPage,
HomePage,
TabsPage,
Viewprescription1Page,
Expand Down
4 changes: 4 additions & 0 deletions src/app/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
// To declare rules for a specific mode, create a child rule
// for the .md, .ios, or .wp mode classes. The mode class is
// automatically applied to the <body> element in the app.
/*.toolbar-background
{
background-color: #49BF4C;
}*/
Binary file added src/assets/imgs/ica-slidebox-img-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ica-slidebox-img-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ica-slidebox-img-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/imgs/ica-slidebox-img-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 0 additions & 17 deletions src/pages/contact/contact.html

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/contact/contact.scss

This file was deleted.

14 changes: 0 additions & 14 deletions src/pages/contact/contact.ts

This file was deleted.

11 changes: 9 additions & 2 deletions src/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Viewprescription1Page } from "../viewprescription1/viewprescription1";
import { Searchdocandmed1Page } from '../searchdocandmed1/searchdocandmed1';
import { Storage } from "@ionic/storage";
@Component({
selector: 'page-home',
templateUrl: 'home.html'
Expand All @@ -12,7 +13,7 @@ export class HomePage {
tabBarElement: any;
splash = true;

constructor(public navCtrl: NavController) {
constructor(public navCtrl: NavController,public storage:Storage) {

this.tabBarElement = document.querySelector('.tabbar');
}
Expand All @@ -26,6 +27,12 @@ export class HomePage {
this.tabBarElement.style.display = 'flex';
},5000);



this.storage.get('id').then((val)=>{
alert(val);
});

}
onViewPrescription()
{
Expand All @@ -35,5 +42,5 @@ export class HomePage {
{
this.navCtrl.push(Searchdocandmed1Page);
}

}
6 changes: 3 additions & 3 deletions src/pages/signinpage/signinpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<ion-header>

<ion-navbar>
<ion-navbar color="myapp1">
<ion-title align="left"color="black">Login</ion-title>
</ion-navbar>

Expand Down Expand Up @@ -43,10 +43,10 @@
<span class="pull-right"><a href="">Forgot Password???</a></span>
<div padding>

<button ion-button round (click)="onSignInNext()"color="secondary" block>Login</button>
<button ion-button round (click)="onSignInNext()"color="myapp1" block>Login</button>
</div>
&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
<button ion-button round (click)="onClick()"color="secondary">New On Medsky???</button>
<button ion-button round (click)="onClick()"color="myapp1">New On Medsky???</button>



Expand Down
1 change: 1 addition & 0 deletions src/pages/signinpage/signinpage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ page-signinpage {
margin-top: -64px;
text-align: center;
}



}
43 changes: 28 additions & 15 deletions src/pages/signinpage/signinpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { TabsPage } from '../../pages/tabs/tabs';
import { UserlogProvider } from "../../providers/userlog/userlog";
import { User_Class } from "../../providers/userlog/user_class";
import { SignuppagePage } from "../signuppage/signuppage";
import { Storage } from "@ionic/storage";

/**
* Generated class for the SigninpagePage page.
Expand All @@ -21,7 +22,7 @@ export class SigninpagePage {
email_id:string='';
password:string='';
userObject:User_Class;
constructor(public load:LoadingController,public toast:ToastController,public navCtrl: NavController,public _db:UserlogProvider){
constructor(public storage:Storage,public load:LoadingController,public toast:ToastController,public navCtrl: NavController,public _db:UserlogProvider){

}
ionViewDidLoad() {
Expand All @@ -34,11 +35,23 @@ export class SigninpagePage {
duration:2000
});
l1.present();*/
/*let t1=this.toast.create({
message:"Data Added",
duration:2000,
position:"top"
});*/
let t1=this.toast.create({
message:"Login Successfully",
duration:3000,
position:"bottom"
});
let t2=this.toast.create({
message:"Enter Valid Data",
duration:3000,
position:"bottom"

});
let t3=this.toast.create({
message:"Enter proper mail id and Password",
duration:3000,
position:"bottom"

});



Expand All @@ -47,26 +60,27 @@ export class SigninpagePage {
(x:User_Class[])=>{
if(this.email_id=='' || this.password=='')
{
alert("Enter Data");
t2.present();
}
else{
if(x.length==1){
alert('login successfully');
/* alert('login successfully');
let l1=this.load.create({
content:"Loading...",
duration:3000
});
l1.present();

//t1.present();
l1.dismissAll();

l1.present();*/

t1.present();
//l1.dismissAll();

this.storage.set('id',this.email_id);

this.navCtrl.push(TabsPage);
}
else{
alert('Enter proper mail id and Password');
t3.present();
this.navCtrl.push(SigninpagePage);
}
}
Expand All @@ -87,6 +101,5 @@ onClick()
{
this.navCtrl.push(SignuppagePage);
}


}
4 changes: 2 additions & 2 deletions src/pages/signuppage/signuppage.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<ion-header>

<ion-navbar>
<ion-navbar color="myapp1">
<ion-title>Signup</ion-title>
</ion-navbar>

Expand Down Expand Up @@ -38,7 +38,7 @@


<div padding>
<button ion-button round (click)="onSignupClick()" color="secondary" block>Sign Up</button>
<button ion-button round (click)="onSignupClick()" color="myapp1" block>Sign Up</button>

</div>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/tabs/tabs.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ion-tabs color="myapp2">
<ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Read" tabIcon="information-circle"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="User" tabIcon="person"></ion-tab>
</ion-tabs>
4 changes: 2 additions & 2 deletions src/pages/tabs/tabs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from '@angular/core';

import { AboutPage } from '../about/about';
import { ContactPage } from '../contact/contact';
import { UserPage } from '../user/user';
import { HomePage } from '../home/home';

@Component({
Expand All @@ -11,7 +11,7 @@ export class TabsPage {

tab1Root = HomePage;
tab2Root = AboutPage;
tab3Root = ContactPage;
tab3Root = UserPage;

constructor() {

Expand Down
6 changes: 5 additions & 1 deletion src/pages/tutorialpage1/tutorialpage1.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
-->
<ion-header>

<ion-navbar>
<ion-navbar color="myapp1">
<ion-buttons end *ngIf="showSkip">
<button ion-button (click)="startApp()" color="primary"></button>
</ion-buttons>

<ion-title>Tutorial</ion-title>
</ion-navbar>

Expand Down
1 change: 1 addition & 0 deletions src/pages/tutorialpage1/tutorialpage1.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { Tutorialpage1Page } from './tutorialpage1';


@NgModule({
declarations: [
Tutorialpage1Page,
Expand Down
38 changes: 35 additions & 3 deletions src/pages/tutorialpage1/tutorialpage1.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
page-tutorialpage1 {

}
/*page-tutorialpage1 {
.toolbar-background {
background: transparent;
border-color: transparent;
}
.slide-zoom {
height: 100%;
}
.slide-title {
margin-top: 2.8rem;
}
.slide-image {
max-height: 40%;
max-width: 60%;
margin: 36px 0;
}
b {
font-weight: 500;
}
p {
padding: 0 40px;
font-size: 14px;
line-height: 1.5;
color: #60646B;
b {
color: #000000;
}
}
}*/
9 changes: 9 additions & 0 deletions src/pages/tutorialpage1/tutorialpage1.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { SigninpagePage } from "../signinpage/signinpage";



export interface Slide {
title: string;
description: string;
image: string;
}

/**
* Generated class for the Tutorialpage1Page page.
*
Expand Down
Loading

0 comments on commit fecbf99

Please sign in to comment.