-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
410 additions
and
104 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
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
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
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,21 +1,28 @@ | ||
<ion-header> | ||
<ion-navbar color="logotipoCesta"> | ||
<ion-title> | ||
Relatorios | ||
Ir às compras | ||
</ion-title> | ||
</ion-navbar> | ||
</ion-header> | ||
|
||
<ion-content> | ||
<ion-list> | ||
<ion-item> | ||
Item 1 | ||
</ion-item> | ||
<ion-item> | ||
Item 2 | ||
</ion-item> | ||
<ion-item> | ||
Item 3 | ||
</ion-item> | ||
<ion-list class="noHSpace"> | ||
<ion-list ion-item class="noHSpace"> | ||
<ion-item class="fundoEspecial"> | ||
...no menor preço... | ||
</ion-item> | ||
<ion-list ion-item> | ||
<button ion-item (click)="menorPrecoTodos()"> | ||
...visitando todos os supermercados | ||
</button> | ||
<button ion-item (click)="menorPrecoUm()"> | ||
...visitando um único supermercado | ||
</button> | ||
<button ion-item (click)="menorPrecoMedio()"> | ||
...médio | ||
</button> | ||
</ion-list> | ||
</ion-list> | ||
</ion-list> | ||
</ion-content> |
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,24 +1,17 @@ | ||
page-inicio { | ||
.btnhome { | ||
padding:5%; | ||
.fundoEspecial{ | ||
background: color($colors, logotipoFundo, secondary); | ||
background: linear-gradient(to right, color($colors, logotipoFundo, secondary), $background-color); | ||
border-width: 1pt; | ||
border-style: solid; | ||
border-image: linear-gradient(to right, color($colors, logotipoFundoEscuroEscuro, secondary), $background-color) 100% 1; | ||
border-left-style: none; | ||
border-right-style: none; | ||
} | ||
.h1home{ | ||
font-size:16vw; | ||
text-align: center; | ||
} | ||
.h3home{ | ||
text-align: center; | ||
margin-bottom: 10vh; | ||
} | ||
.cont{ | ||
display: flex; | ||
align-content: space-around; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
.el{ | ||
display: block; | ||
width: 100%; | ||
.noHSpace{ | ||
padding-left: 0px !important; | ||
padding-right: 0px !important; | ||
margin-left: 0px !important; | ||
margin-right: 0px !important; | ||
} | ||
} |
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,15 +1,59 @@ | ||
import { Component } from '@angular/core'; | ||
import { NavController } from 'ionic-angular'; | ||
import { NavParams } from 'ionic-angular'; | ||
import { Consulta } from '../../entities/Consulta'; | ||
import { Planejamento } from '../../entities/Planejamento'; | ||
import { Relatorios } from '../../providers/Relatorios.service'; | ||
|
||
import { PageListaCompras } from '../ListaCompras/main' | ||
import { PageRelatorioExibe } from '../RelatorioExibe/main' | ||
|
||
@Component({ | ||
selector: 'page-inicio', | ||
templateUrl: 'main.html' | ||
}) | ||
export class PageRelatorioEscolhe { | ||
constructor(public navCtrl: NavController){} | ||
openPage() { | ||
return this.navCtrl.setRoot(PageListaCompras); | ||
constructor( | ||
public navCtrl: NavController, | ||
public navParams: NavParams, | ||
public relatorioService: Relatorios, | ||
){ | ||
this.planejamento = this.navParams.get('sujeito') | ||
} | ||
planejamento: Planejamento; | ||
menorPrecoMedio(){ | ||
this.relatorioService.menorPrecoMedio( | ||
this.planejamento | ||
).then( | ||
(consultas:Consulta[]) => { | ||
this.navCtrl.push(PageRelatorioExibe,{ | ||
titulo: 'O menor preço médio', | ||
consultas: consultas, | ||
}) | ||
} | ||
) | ||
} | ||
menorPrecoUm(){ | ||
this.relatorioService.menorPrecoEmUmSupermercado( | ||
this.planejamento | ||
).then( | ||
(consultas:Consulta[]) => { | ||
this.navCtrl.push(PageRelatorioExibe,{ | ||
titulo: 'O mais barato', | ||
consultas: consultas, | ||
}) | ||
} | ||
) | ||
} | ||
menorPrecoTodos(){ | ||
this.relatorioService.menorPrecoEmTodosSupermercados( | ||
this.planejamento | ||
).then( | ||
(consultas:Consulta[]) => { | ||
this.navCtrl.push(PageRelatorioExibe,{ | ||
titulo: 'O menor orçamento', | ||
consultas: consultas, | ||
}) | ||
} | ||
) | ||
} | ||
} |
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,22 @@ | ||
import { ComponentFixture, async } from '@angular/core/testing'; | ||
import { TestUtils } from '../../test'; | ||
import { PageRelatorioExibe } from './main'; | ||
|
||
let fixture: ComponentFixture<PageRelatorioExibe> = null; | ||
let instance: any = null; | ||
|
||
declare var describe: any; | ||
declare var it: any; | ||
declare var expect: any; | ||
declare var beforeEach: any; | ||
|
||
describe('Pages: Relatorios: Exibe', () => { | ||
beforeEach(async(() => TestUtils.beforeEachCompiler([PageRelatorioExibe]).then(compiled => { | ||
fixture = compiled.fixture; | ||
instance = compiled.instance; | ||
}))); | ||
|
||
it('should create the page', async(() => { | ||
expect(instance).toBeTruthy(); | ||
})); | ||
}); |
Oops, something went wrong.