Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #19 from Pear-Trading/Release-v0.0.5
Browse files Browse the repository at this point in the history
Release v0.0.5
  • Loading branch information
TBSliver authored Oct 19, 2017
2 parents ea163f0 + 0e3d231 commit e5cc5cb
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 120 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ Thumbs.db
UserInterfaceState.xcuserstate

config/config-dev.json

\.sourcemaps/main\.css\.map

\.sourcemaps/main\.js\.map
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="org.peartrade.localloop" version="0.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="org.peartrade.localloop" version="0.0.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>LocalLoop</name>
<description>Tracking Local Money for Local People.</description>
<author email="[email protected]" href="http://github.com/pear-trading">Pear Trading Development Team</author>
Expand Down
3 changes: 2 additions & 1 deletion config/config-dev.json.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"api_url": "http://dev.peartrade.org/api"
"api_url": "https://dev.peartrade.org/api",
"api_key": "CHANGEME"
}
3 changes: 0 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { TruncateModule } from 'ng2-truncate';
import { MyApp } from './app.component';
import { LoginPage } from '../pages/login/login';
import { FeedbackPage } from '../pages/feedback/feedback';
import { TokenPage } from '../pages/token/token';
import { SignupPage } from '../pages/signup/signup';
import { AboutPage } from '../pages/about/about';
import { ReceiptPage } from '../pages/receipt/receipt';
Expand All @@ -39,7 +38,6 @@ import { IntroPage } from '../pages/intro/intro';
MyApp,
LoginPage,
FeedbackPage,
TokenPage,
SignupPage,
AboutPage,
ReceiptPage,
Expand All @@ -65,7 +63,6 @@ import { IntroPage } from '../pages/intro/intro';
MyApp,
LoginPage,
FeedbackPage,
TokenPage,
SignupPage,
AboutPage,
ReceiptPage,
Expand Down
2 changes: 0 additions & 2 deletions src/pages/about/about.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { PeopleService } from '../../providers/people-service';
import { UserData } from '../../providers/user-data';
import 'rxjs/add/operator/timeout';

Expand All @@ -17,7 +16,6 @@ export class AboutPage {
constructor(
public navCtrl: NavController,
public navParams: NavParams,
private peopleService: PeopleService,
private userData: UserData,
) {
this.userData.hasLoggedIn().subscribe(
Expand Down
4 changes: 2 additions & 2 deletions src/pages/intro/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ <h2>Please Register or Login with your account!<br>You will need a token to regi
</ion-col>
<button ion-button (click)="goToLogin()" class="button-submit" color="secondary" block>Login</button>
<button ion-button (click)="goToSignup()" class="button-submit" color="secondary" block>Create an account</button>

<img class="icon-intro" src="assets/img/icon1.png">
</ion-row>

<ion-row align-items-end>
<img class="icon-intro" src="assets/img/icon1.png">
</ion-row>

</ion-grid>
Expand Down
11 changes: 6 additions & 5 deletions src/pages/intro/intro.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ page-intro {
scroll-content {
display: flex;
flex-direction: column;

}

ion-grid {
margin-top: 20px;
margin-top: 10px;
padding: 0;
height: 100%;
overflow: 0;
}

ion-row {
Expand All @@ -32,9 +34,8 @@ page-intro {
}

.icon-intro {
height: 100%;
// width: 25%;
margin: 50px auto;
display: block;
width: 25vw;
margin: auto;
display: block;
}
}
5 changes: 1 addition & 4 deletions src/pages/intro/intro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@ import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { LoginPage } from '../login/login';
import { SignupPage } from '../signup/signup';
import { UserData } from '../../providers/user-data';


/* interface of home page*/
@Component({
selector: 'page-intro',
templateUrl: 'intro.html',
providers: [ UserData ]
templateUrl: 'intro.html'
})

export class IntroPage {

constructor(
private navCtrl: NavController,
private userData: UserData,
) {}

goToLogin() {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/receipt/receipt.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<!-- Enter storename and search -->
<ion-item>
<ion-label stacked><span class="labelreceipt">Enterb the store name:</span></ion-label>
<ion-label stacked><span class="labelreceipt">Enter the store name:</span></ion-label>
<ion-input [(ngModel)]="submitOrg.name" (input)="organisationSearch($event)" (ngModelChange)="step1Validate()" placeholder="Name of Company"></ion-input>
</ion-item>

Expand Down
7 changes: 3 additions & 4 deletions src/pages/receipt/receipt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input } from '@angular/core';
import { Component } from '@angular/core';
import {
NavController,
NavParams,
Expand All @@ -12,7 +12,6 @@ import {
import { convertDataToISO } from 'ionic-angular/util/datetime-util';
import { Camera, CameraOptions } from '@ionic-native/camera';
import { FilePath } from '@ionic-native/file-path';
import { Transfer } from '@ionic-native/transfer';
import { File } from '@ionic-native/file';
import { Keyboard } from '@ionic-native/keyboard';
import { PeopleService } from '../../providers/people-service';
Expand Down Expand Up @@ -74,7 +73,6 @@ export class ReceiptPage {
private keyboard: Keyboard,
private camera: Camera,
private filePath: FilePath,
private transfer: Transfer,
private file: File,
public alertCtrl: AlertController
) {
Expand Down Expand Up @@ -179,7 +177,8 @@ export class ReceiptPage {
}

step1Validate() {
if( this.submitOrg.name.length == 0 ) {
if( this.submitOrg.name.length == 0 ||
this.submitOrg.town.length == 0 ) {
this.step1Invalid = true;
}else{
this.step1Invalid = false;
Expand Down
29 changes: 0 additions & 29 deletions src/pages/token/token.html

This file was deleted.

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

This file was deleted.

24 changes: 0 additions & 24 deletions src/pages/token/token.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/pages/user/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component,ViewChild } from '@angular/core';
import {
NavController,
NavParams,
App,
Slides,
ToastController,
AlertController,
Expand Down Expand Up @@ -68,7 +67,6 @@ export class UserPage {
};

constructor(
private app : App,
public navCtrl: NavController,
public navParams: NavParams,
public peopleService: PeopleService,
Expand Down
18 changes: 0 additions & 18 deletions src/providers/people-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,24 +183,6 @@ export class PeopleService {
).map( response => response.json() );
}

/* Links to server, these should be stored in config.js */
foodloop_root_url = "http://app.peartrade.org/";
foodloop_root_url_edit = this.foodloop_root_url + "edit";
foodloop_root_url_token = this.foodloop_root_url + "token";
foodloop_root_url_approve = this.foodloop_root_url + "admin-approve";

edit(data){
return this.http.post(this.foodloop_root_url_edit,data);
}

verifyToken(data){
return this.http.post(this.foodloop_root_url_token,data);
}

approve(data){
return this.http.post(this.foodloop_root_url_approve,data);
}


/*********************** -- Data representation part -- **************************/
/* including get request to server to retrieve user data */
Expand Down
22 changes: 1 addition & 21 deletions src/providers/user-data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Injectable } from '@angular/core';
import { Events } from 'ionic-angular';
import { Storage } from '@ionic/storage';
import { Observable } from 'rxjs/Rx';
import 'rxjs/add/operator/map';
Expand All @@ -13,8 +12,7 @@ import 'rxjs/add/operator/map';
export class UserData {

constructor(
private storage: Storage,
private events: Events
private storage: Storage
) {
this.loadTestingData();
}
Expand Down Expand Up @@ -206,24 +204,6 @@ export class UserData {
return {token:"d","ref":username,"username": fullname,"previousPos":1,"currentPos":1,"pearPoint":620.57,"retailerSpent":20,"receiptSubmitted":161,"firstStart":"20-Jun-15"};
}

// /* Login and log out events ****/
// login(username: string ){
// this.storage.set(this.HAS_LOGGED_IN,true);
// this.setUsername(username);
// this.events.publish('user:login')
// }
// signup(username: string) {
// this.storage.set(this.HAS_LOGGED_IN, true);
// this.setUsername(username);
// this.events.publish('user:signup');
// };
// logout() {
// this.storage.remove(this.HAS_LOGGED_IN);
// this.storage.remove('username');
// this.events.publish('user:logout');
// };
/* Login and log out events end ****/

/* Storage management and data access method */
getRankingData(){
return this.testingData.ranking;
Expand Down

0 comments on commit e5cc5cb

Please sign in to comment.