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
$query = " | |
SELECT | |
dt, SUM(total_inscricoes) total_inscricoes, SUM(total_entradas) total_entradas, SUM(total_atualizacoes) total_atualizacoes, SUM(total_atendimentos) total_atendimentos | |
FROM | |
( | |
SELECT | |
dt, '' total_inscricoes, '' total_entradas, '' total_atualizacoes, count(log.id) total_atendimentos | |
FROM | |
`$tb_cal` cal | |
LEFT JOIN |
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
var assistanceHeader = JSON.stringify(this.get('session.currentAss')); | |
Ember.$.ajaxPrefilter(function(options, oriOpt, jqXHR) { | |
jqXHR.setRequestHeader("assistance", assistanceHeader); | |
}); |
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 Ember from 'ember'; | |
export | |
default Ember.Mixin.create({ | |
// Select list helpers | |
selectConfirmation: [{ | |
label: 'Não', | |
value: 0 | |
}, { | |
label: 'Sim', | |
value: 1 |
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 Ember from "ember"; | |
import Session from "simple-auth/session"; | |
export | |
default { | |
name: "custom-session", | |
before: "simple-auth", | |
initialize: function() { | |
// Customizando sessão | |
Session.reopen({ | |
setCurrentUser: function() { |
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
SELECT date(created_at) Data, WEEK(created_at) Semana, DAYNAME(created_at) Dia, count(*) Qtd_atendimento, | |
(select count(*) from default_eve_evento_checkin where | |
date(default_eve_evento_checkin.created_at) = Data and default_eve_evento_checkin.tipo = 'troca' and default_eve_evento_checkin.evento_id = $evento_id) Qtd_troca, | |
(select count(*) from default_pro_cupom where | |
date(default_pro_cupom.created_at) = Data and default_pro_cupom.evento_id = $evento_id) Qtd_cupom, | |
(select count(*) from default_pro_nota_fiscal where | |
date(default_pro_nota_fiscal.created_at) = Data and default_pro_nota_fiscal.evento_id = $evento_id) Qtd_nf, |
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
'use strict'; | |
/*jshint esnext: true */ | |
import AppConfig from './main/app.config'; | |
import MainCtrl from './main/main.controller'; | |
import NavbarCtrl from '../components/navbar/navbar.controller'; | |
angular.module('angularTest', ['ngAnimate', 'ngCookies', 'ngTouch', 'ngSanitize', 'ngResource', 'ui.router', 'ngMaterial']) | |
.controller('MainCtrl', MainCtrl) | |
.controller('NavbarCtrl', NavbarCtrl) |
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
'use strict'; | |
/*jshint esnext: true */ | |
import AppRun from './main/app.run'; | |
import AppConfig from './main/app.config'; | |
import PageFactory from './main/page.factory'; | |
import AppCtrl from './main/app.controller'; | |
import HomeCtrl from './home/home.controller'; | |
import eventCard from 'components/event-card/event-card.directive.js'; |
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
'use strict'; | |
/*@ngInject*/ | |
function eventCard() { | |
return { | |
this.template = "Testando"; | |
// this.templateUrl = require("components/event-card/event-card.html"); | |
this.restrict = "E"; | |
//restrict: "E", | |
// templateUrl: "app/layout/top-menu.tpl.html", |
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
// URL DE ACESSO: http://provedor/seleciona/brindes | |
// Retorna um JSON com o total de brindes, data e hora | |
{ | |
total_brindes: "100", | |
data: "24/03/2015", | |
hora: "15:05" | |
} |
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
SELECT | |
SUM(CASE WHEN FIND_IN_SET('ingles:basico', index_idiomas) THEN 1 ELSE 0 END) AS ingles_basico, | |
SUM(CASE WHEN FIND_IN_SET('ingles:intermediario', index_idiomas) THEN 1 ELSE 0 END) AS ingles_intermediario, | |
SUM(CASE WHEN FIND_IN_SET('ingles:fluente', index_idiomas) THEN 1 ELSE 0 END) AS ingles_fluente, | |
SUM(CASE WHEN FIND_IN_SET('espanhol:basico', index_idiomas) THEN 1 ELSE 0 END) AS espanhol_basico | |
FROM | |
esbox_production.default_bc_index |