git-svn-id: https://svn.coded.pt/svn/SIPRP@1956 bb69d46d-e84e-40c8-a05a-06db0d633741

lxbfYeaa
João Maurício 11 years ago
parent d7bde6c5fa
commit 3e07e1e300

@ -17,6 +17,10 @@
$scope.add = function(selected){
$scope.editForm.$reset();
$scope.editing = angular.copy(selected);
globals.plugins.buildFloatingSideMenu({
title: 'Ficha de Aptidão',
documentclick: function(){
@ -24,38 +28,35 @@
$scope.openModalDocumentos();
}
});
$scope.editForm.$reset();
$scope.editing = angular.copy(selected);
};
$scope.edit = function(selected){
globals.plugins.buildFloatingSideMenu({
title: 'Ficha de Aptidão',
documentclick: function(){
$scope.editForm.$reset();
$scope.openModalDocumentos();
}
});
$scope.storeFichasClinicas.extraParams = {
fichaID: selected.id
};
$timeout(function () {
$scope.storeFichasClinicas.get(function(response, status, headers, config, items){
$scope.editForm.$reset();
$scope.selected = items;
//$scope.storeFichasClinicas.extraParams = {
// fichaID: selected.id
//};
$scope.editing = angular.copy($scope.selected);
//$scope.storeFichasClinicas.get(function(response, status, headers, config, items){
$timeout(function () {
// $scope.selected = items;
globals.plugins.buildFloatingSideMenu({
title: 'Ficha de Aptidão',
documentclick: function(){
// $scope.editing = angular.copy($scope.selected);
//});
$scope.openModalDocumentos();
}
});
}, 0);
}, 0);
});
};
$scope.save = function(complete){
@ -64,27 +65,10 @@
if(isValid)
{
//if(complete)
//{
// $scope.editing.ficha.data_conclusao = new Date();
//}
//else
//{
// $scope.editing.ficha.data_conclusao = null;
//}
//$scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing, isNewRecord){
// if(response.success && complete)
// {
// globals.plugins.hideFloatingSideMenu();
// $scope.$parent.loadModule({Controller: 'Search'}, function(className, scope, isNewModule){
// angular.element(scope.comboTrabalhadores.domEl).triggerHandler('change');
// });
// }
//});
$scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing){
});
}
};

@ -11,8 +11,8 @@
$scope.storeLogin.broadcastEvents = false;
$scope.editing = {
user: '',
pass: ''
user: 'admin',
pass: '2Yz146Oss5Q'
};
$scope.login = function(e) {

@ -113,12 +113,12 @@
</button>
</td>
<td class="p-l-none">
<button ng-show="!item.fichaAptidaoEmitida && possuiFichaAptidao(item)" data-toggle="tooltip" data-placement="right" title="Emitir Ficha de Aptidão"
<button ng-show="item.emissao_ficha_aptidao == null && possuiFichaAptidao(item)" data-toggle="tooltip" data-placement="right" title="Emitir Ficha de Aptidão"
ng-click="emitirFichaAptidao(item)" type="button" class="btn btn-xs btn-default">
<span class="glyphicon glyphicon-plus"></span> <span>Emitir</span>
</button>
<span ng-show="item.fichaAptidaoEmitida && possuiFichaAptidao(item)" class="label label-success" data-toggle="tooltip" data-placement="right" title="Ficha de Aptidão Emitida">Emitida</span>
<span ng-show="item.emissao_ficha_aptidao != null && possuiFichaAptidao(item)" class="label label-success" data-toggle="tooltip" data-placement="right" title="Ficha de Aptidão Emitida">Emitida</span>
</td>
</tr>
</tbody>

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save