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

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
João Maurício 12 years ago
parent 8337cf2d09
commit 6223eb7fc1

@ -4,6 +4,17 @@
$scope.descricao = null;
$scope.calculatedAge = 0;
$scope.storeFichasClinicas = new globals.dataService.store({
model: null,
actions: {
get: 'getFichaEAdmissaoInicial',
upsert: 'sendFichaEAdmissaoInicial',//TODO: ???
destroy: 'deleteFichaEAdmissaoInicial'//TODO: ???
}
});
$scope.add = function(selected){
$scope.editForm.$reset();
@ -17,7 +28,16 @@
$scope.editForm.$reset();
$scope.storeFichasClinicas.extraParams = {
fichaID: selected.id
};
$scope.storeFichasClinicas.get(function(response, status, headers, config, items){
$scope.selected = items;
$scope.editing = angular.copy($scope.selected);
});
}, 0);
};
@ -37,7 +57,14 @@
$scope.editing.ficha.data_conclusao = null;
}
$scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing, isNewRecord){
//TODO: check the need for other keys!!!
if(response.data)
{
$scope.editing.ficha.id = response.data.ficha.id;
}
});
}
};

Loading…
Cancel
Save