This file contains hidden or 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
<ion-header> | |
<ion-navbar> | |
<ion-title> | |
MY APP | |
</ion-title> | |
</ion-navbar> | |
</ion-header> | |
<ion-content padding> | |
<form> |
This file contains hidden or 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
export class User { | |
username: string; | |
password: string; | |
} | |
//dentro do export class HomaPage coloca esse codigo | |
user: User = { | |
username: '', | |
password: '' |
This file contains hidden or 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
import { Component } from '@angular/core'; | |
import { NavController, ViewController } from 'ionic-angular'; | |
import { HomeService } from './home.service'; | |
import { MenuPage } from './menu/menu'; | |
export class User { | |
username: string; | |
password: string; |
This file contains hidden or 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
constructor(public params: NavParams){ | |
// userParams é um objeto que temos em nossos parâmetros nav | |
this.params.get('userParams'); | |
} |
This file contains hidden or 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
module.exports = function(sequelize, DataTypes){ | |
var Rece = sequelize.define('Receita', { | |
id: { | |
type : DataTypes.INTEGER, | |
primaryKey: true, | |
autoIncrement: true, | |
field: 'seq_receita' | |
}, | |
cod_pessoa: { |
This file contains hidden or 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
model.Receita.findAll({ | |
where: { | |
id: filter.id | |
}, | |
include: [ | |
{ model: model.Pessoa } | |
], | |
order: 'seq_receita' | |
}).then((data) => { |
This file contains hidden or 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
exports.update = function(req, res){ | |
var dados = req.body.data; | |
processRequests(dados) | |
.then(function(data){ | |
res.send(data) | |
}) | |
This file contains hidden or 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
function processExpense(data) { | |
return new Promise((resolve, reject) => { | |
model.Despesa.findAll({ | |
where: { | |
$and: [ | |
model.Despesa.sequelize.where(model.sequelize.literal('extract(YEAR FROM data_lancamento)'), data.year), | |
{ num_filial: data.unit } | |
] |
This file contains hidden or 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
const models = require('../../loading/loading'); | |
const Promise = require('bluebird'); | |
module.exports = Promise.method(function userExists(userAttributes) { | |
return models.User | |
.findOne({ | |
where: { | |
email: userAttributes.email | |
} |
This file contains hidden or 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
it('should verify a valid certificate against a jwt google', (done) => { | |
nock('http://localhost:3000/oapi/v1/tests') | |
.defaultReplyHeaders({ | |
'Content-Type': 'application/json' | |
}) | |
.post('/google', { | |
email: '[email protected]' | |
}) | |
.reply(200, (uri, req, cb) => { |