forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.3 KiB
53 lines
1.3 KiB
evoapp.controller('AcidentesTrabalhoController', function($rootScope, $scope, $timeout, $compile, $injector, $filter, globals)
|
|
{
|
|
$scope.globals = globals;
|
|
|
|
$scope.globals = globals;
|
|
|
|
$scope.showList = true;
|
|
$scope.showEdit = false;
|
|
|
|
var acidentesTrabalho = [
|
|
{
|
|
id: 1,
|
|
descricao: 'acidente 1',
|
|
data: '2009-08-03T00:00:00.000+0100'
|
|
},
|
|
{
|
|
id: 2,
|
|
descricao: 'acidente 2',
|
|
data: '2011-01-01T00:00:00.000+0100'
|
|
}
|
|
];
|
|
|
|
$scope.storeAcidentesTrabalho = new globals.dataService.store({
|
|
model: null,
|
|
actions: {
|
|
//get: 'getcidentesTrabalho'
|
|
}
|
|
});
|
|
|
|
$scope.list = function(){
|
|
|
|
//$scope.storeAcidentesTrabalho.get(function(response, status, headers, config, items){
|
|
|
|
//});
|
|
|
|
$scope.storeAcidentesTrabalho.loadData(acidentesTrabalho);
|
|
};
|
|
|
|
$scope.download = function(item){
|
|
|
|
globals.message.alert({
|
|
message: 'Abrir o documento: ' + item.descricao,
|
|
callback: function(){
|
|
|
|
}
|
|
});
|
|
};
|
|
|
|
$scope.$on('afterrender', function(event, args){
|
|
|
|
$scope.list();
|
|
});
|
|
}); |