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
chefiaAdmServices.factory('DocUtil', function(Mensagem){ | |
return { | |
errorFunction : function (retorno) { | |
if (retorno.data && retorno.data.error) { | |
switch (retorno.data.error) { | |
case "conflict": | |
Mensagem.error('Recupere antes de modificar.'); | |
break; |
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
'use strict'; | |
var couchapp = require('couchapp'), | |
path = require('path'), | |
ddoc = { | |
_id: '_design/app', | |
views: {}, | |
lists: {}, | |
shows: {}, | |
fulltext: {}, |
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
'use strict'; | |
/** | |
* function MyCtrl { | |
* $scope.totalCaixas = [ | |
* ['Caixas', 'Qtd'], | |
* ['Conferidas', 11], | |
* ['Nao conferidas', 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
'use strict'; | |
/** | |
* CTRL | |
* $scope.requisitar = function () { | |
* MultiPromise.async([ | |
* 'http://localhost:9090/?sleep=10000', | |
* 'http://localhost:9090/?sleep=1000', | |
* 'http://localhost:9090/?sleep=5000' | |
* ]) | |
* .then(function (response) { |
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
'use strict'; | |
confLojaApp.filter('dt', function() { | |
return function(str, format) { | |
return moment(str).format(format); | |
// return accounting.formatMoney(input, symbol || "", 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
grunt.registerTask('deploy', [ | |
'build', | |
'push' | |
]); | |
grunt.registerTask('push', 'push app to couchdb', function () { | |
var done = this.async(); | |
// require('child_process').exec('couchapp push couchapp.dist.conf.js http://10.16.200.21:5985/cosmos', function (err, stdout) { | |
require('child_process').exec('node_modules/couchapp/bin.js push couchapp.conf.js http://localhost:5984/ad', function (err, stdout) { | |
// require('child_process').exec('couchapp push couchapp.conf.js http://172.24.0.19/cosmos', function (err, stdout) { |
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
/* | |
<input b-datepicker="{{dateOptions}}" ng-model="dateObject" > | |
$scope.dateOptions = {format: 'dd/mm/yyyy'} | |
*/ | |
angular.module('bDatepicker', []). | |
directive('bDatepicker', function(){ | |
return { | |
require: '?ngModel', | |
restrict: 'A', |
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
, | |
replace: { | |
app: { | |
src: ['dist/index.html'], | |
overwrite: true, | |
replacements: [{ | |
from: '##build##', | |
to: 'Version: <%= pkg.version %> Build: <%= grunt.template.today(\'dd/mm/yyyy hh:MM:ss\') %>' | |
}] | |
} |
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
'use strict' | |
var couchapp = require('couchapp'), | |
path = require('path'), | |
ddoc = { | |
_id: '_design/app', | |
views: {}, | |
lists: {}, | |
shows: {}, | |
fulltext: {}, |
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
ng-repeat="item in newItens = (itensByType[type] | filter:{type:'new'})" | |
using: | |
{{newItens.length}} |
OlderNewer