-
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
1 parent
7a6ba5a
commit 98e441c
Showing
12 changed files
with
314 additions
and
35 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,8 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { ReportPopoverComponent } from './report-popover/report-popover'; | ||
@NgModule({ | ||
declarations: [ReportPopoverComponent], | ||
imports: [], | ||
exports: [ReportPopoverComponent] | ||
}) | ||
export class ComponentsModule {} |
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,16 @@ | ||
<!-- Generated template for the ReportPopoverComponent component --> | ||
<div> | ||
<ion-list no-lines> | ||
<ion-list-header>Período</ion-list-header> | ||
<ion-item> | ||
<ion-label>De</ion-label> | ||
<ion-datetime displayFormat="DDD DD/MM/YYYY" pickerFormat="DD MM YYYY" [(ngModel)]="from"></ion-datetime> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label>Até</ion-label> | ||
<ion-datetime displayFormat="DDD DD/MM/YYYY" pickerFormat="DD MM YYYY" [(ngModel)]="to"></ion-datetime> | ||
</ion-item> | ||
<button ion-item (click)="clear()">Limpar filtro</button> | ||
<button ion-item (click)="save()">Salvar</button> | ||
</ion-list> | ||
</div> |
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,3 @@ | ||
report-popover { | ||
|
||
} |
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,41 @@ | ||
import { Component } from '@angular/core'; | ||
import { NavParams, ViewController } from "ionic-angular"; | ||
import * as moment from 'moment'; | ||
import 'moment/locale/pt-br'; | ||
|
||
/** | ||
* Generated class for the ReportPopoverComponent component. | ||
* | ||
* See https://angular.io/api/core/Component for more info on Angular | ||
* Components. | ||
*/ | ||
@Component({ | ||
selector: 'report-popover', | ||
templateUrl: 'report-popover.html' | ||
}) | ||
export class ReportPopoverComponent { | ||
private from; | ||
private to; | ||
|
||
constructor(public viewCtrl: ViewController, public navParams: NavParams) { | ||
let period = this.navParams.get('period'); | ||
|
||
moment.locale('pt-BR'); | ||
|
||
if (Array.isArray(period) && period.length > 0) { | ||
this.from = moment(period[0]).format(); | ||
this.to = moment(period[1]).format(); | ||
} else { | ||
this.to = moment().format(); | ||
} | ||
} | ||
|
||
save() { | ||
this.viewCtrl.dismiss({from: this.from, to: this.to}); | ||
} | ||
|
||
clear() { | ||
this.to = moment().format(); | ||
this.from = null; | ||
} | ||
} |
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,3 +1,24 @@ | ||
page-reports-detail { | ||
ion-item { | ||
> ion-avatar { | ||
margin-bottom: 1rem !important; | ||
margin-top: 1rem !important; | ||
} | ||
|
||
&:last-child { | ||
> ion-avatar { | ||
margin-bottom: 0 !important; | ||
} | ||
} | ||
} | ||
|
||
.product-list { | ||
> .no-items { | ||
min-height: auto; | ||
|
||
ion-label { | ||
margin-bottom: 0 !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
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,3 +1,16 @@ | ||
page-reports { | ||
.button-clear-wp, | ||
.button-clear-md, | ||
.button-clear-ios { | ||
color: #FFF; | ||
} | ||
|
||
.button-clear-md { | ||
border-top: 1px solid rgba(255, 255, 255, .2); | ||
text-transform: capitalize; | ||
|
||
&:last-child { | ||
border-bottom: 1px solid rgba(255, 255, 255, .2); | ||
} | ||
} | ||
} |
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.