-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New design views & controller improvements (more adapted to backend)
- Loading branch information
1 parent
57607d7
commit 9536be4
Showing
61 changed files
with
1,083 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "prisma-frontend", | ||
"app_id": "e0fc6bde", | ||
"type": "ionic-angular" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,34 @@ | ||
import { Component } from '@angular/core'; | ||
import { Platform } from 'ionic-angular'; | ||
import { StatusBar } from '@ionic-native/status-bar'; | ||
import { SplashScreen } from '@ionic-native/splash-screen'; | ||
import {Component} from "@angular/core"; | ||
import {Platform} from "ionic-angular"; | ||
import {StatusBar} from "@ionic-native/status-bar"; | ||
import {SplashScreen} from "@ionic-native/splash-screen"; | ||
|
||
import { TabsPage } from '../pages/tabs/tabs'; | ||
import {TutorialPage} from "../pages/tutorial/tutorial"; | ||
import {PatientService} from "../services/back-end/user.service"; | ||
import {env} from "./environment"; | ||
import {User} from "../dto/user"; | ||
|
||
@Component({ | ||
templateUrl: 'app.html' | ||
}) | ||
export class MyApp { | ||
rootPage:any = TutorialPage; | ||
rootPage: any = TutorialPage; | ||
|
||
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { | ||
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, public patientService: PatientService) { | ||
platform.ready().then(() => { | ||
// Okay, so the platform is ready and our plugins are available. | ||
// Here you can do any higher level native things you might need. | ||
statusBar.styleDefault(); | ||
splashScreen.hide(); | ||
this.patientService.getPatient("1").toPromise().then(res => localStorage.setItem(env.temp.fakePatient, JSON.stringify(res))); | ||
let fakeUser: User = new User(); | ||
fakeUser.email = "prisma@mail.com"; | ||
fakeUser.password = "prisma"; | ||
fakeUser.firstName = "Frederik"; | ||
fakeUser.lastName = "Jinx"; | ||
localStorage.setItem(env.temp.fakeUser, JSON.stringify(fakeUser)); | ||
// this.patientService.addUser(fakeUser).toPromise().then(res => localStorage.setItem(env.temp.fakeUser,JSON.stringify(res))); | ||
//this.patientService.getUser("1").toPromise().then(res => localStorage.setItem(env.temp.fakeUser,JSON.stringify(res))); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
import {platformBrowserDynamic} from "@angular/platform-browser-dynamic"; | ||
|
||
import { AppModule } from './app.module'; | ||
import {AppModule} from "./app.module"; | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,6 @@ | |
{ | ||
"type": "grandson", | ||
"userId": "12121" | ||
}] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
import { AbstractStory } from './abstract-story'; | ||
|
||
export class UserStory extends AbstractStory { | ||
albumId: string; | ||
originId: string; // heritage origin story | ||
date: Date; | ||
|
||
export class UserStory { | ||
id: string; | ||
albumId: number; | ||
description: string; | ||
title: string; | ||
happened_at: Date; | ||
creatorId: number; // heritage origin story | ||
favorited: boolean; | ||
source: string; | ||
|
||
constructor(json?) { | ||
super(json); | ||
if(!json) | ||
if (!json) | ||
return; | ||
this.id = json.id; | ||
this.albumId = json.albumId; | ||
this.originId = json.originId; | ||
this.date = new Date(json.date); | ||
this.creatorId = json.creatorId; | ||
this.description = json.description; | ||
this.source = json.source; | ||
this.favorited = json.favorited; | ||
if (json.happened_at) | ||
this.happened_at = new Date(json.happened_at); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.