From bb907973dd3992fdeda06af67644ba29233da581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Maur=C3=ADcio?= Date: Wed, 4 Jun 2014 15:21:25 +0000 Subject: [PATCH] git-svn-id: https://svn.coded.pt/svn/SIPRP@1926 bb69d46d-e84e-40c8-a05a-06db0d633741 --- .../static/html/app/Form5/Form5View.html | 32 ++----------------- .../html/app/SearchForm/SearchController.js | 32 +++++++++++++++++++ .../html/app/SearchForm/SearchView.html | 3 +- .../static/html/app/partials/Parecer-1.html | 3 ++ 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form5/Form5View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form5/Form5View.html index f12a9c12..2e7df042 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form5/Form5View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form5/Form5View.html @@ -251,36 +251,8 @@
-
- - -
-
- -
-
- -
-
- -
-
- -
-
- -
+ +
diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchController.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchController.js index 21f90fe8..b99f4ae9 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchController.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchController.js @@ -190,6 +190,38 @@ return possuiFichaAptidao; }; + + $scope.emitirFichaAptidao = function(ficha){ + + var tipo_id = ficha.tipo_id, + ficha_admissao_tipo_id = 0; + + switch(tipo_id) + { + case 1: + ficha_admissao_tipo_id = 200; + break; + + case 2: + ficha_admissao_tipo_id = 201; + break; + + case 3: + ficha_admissao_tipo_id = 202; + break; + + case 7: + ficha_admissao_tipo_id = 203; + break; + } + + var fichaAdmissao = _.where($scope.UserSession.tiposFichas, {id: ficha_admissao_tipo_id}); + + if(fichaAdmissao.length == 1) + { + $scope.add(fichaAdmissao[0]); + } + }; $scope.$on('afterrender', function(event, args){ diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html index c1c961f6..5c1ece5d 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/SearchForm/SearchView.html @@ -113,7 +113,8 @@ - diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/partials/Parecer-1.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/partials/Parecer-1.html index a9c5161e..1a5746ce 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/partials/Parecer-1.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/partials/Parecer-1.html @@ -3,6 +3,9 @@ Parecer-1 notice: only contents inside this div will be rendered/compiled + +usage example: + -->