Commit 174569b685f9335dbdea6514dcf50dc52b7fa216
1 parent
e79f8658
Exists in
master
torna a possibliade de encaminhar para uma mesa uma configuracao.
git-svn-id: http://svn.softwarepublico.gov.br/svn/sistemadeatendimento/sistema/trunk@39 63db2ce5-8a6c-0410-abb9-a418dd412890
Showing
1 changed file
with
16 additions
and
11 deletions
Show diff stats
Fila-Web/lib/Fila/WebApp/Controller/CB/Atendente.pm
@@ -22,7 +22,9 @@ use Encode; | @@ -22,7 +22,9 @@ use Encode; | ||
22 | use base 'Catalyst::Controller::SOAP'; | 22 | use base 'Catalyst::Controller::SOAP'; |
23 | 23 | ||
24 | __PACKAGE__->config->{wsdl} = | 24 | __PACKAGE__->config->{wsdl} = |
25 | - {wsdl => Fila::WebApp->path_to('schemas/FilaWeb.wsdl')}; | 25 | + { wsdl => Fila::WebApp->path_to('schemas/FilaWeb.wsdl') }; |
26 | +__PACKAGE__->config->{pode_encaminhar_para_mesa} = 1; | ||
27 | +__PACKAGE__->mk_accessors('pode_encaminhar_para_mesa'); | ||
26 | 28 | ||
27 | sub registrar_no_show : WSDLPort('FilaWebAtendenteCallback') { | 29 | sub registrar_no_show : WSDLPort('FilaWebAtendenteCallback') { |
28 | my ($self, $c) = @_; | 30 | my ($self, $c) = @_; |
@@ -58,13 +60,17 @@ sub listar_no_show : WSDLPort('FilaWebAtendenteCallback') { | @@ -58,13 +60,17 @@ sub listar_no_show : WSDLPort('FilaWebAtendenteCallback') { | ||
58 | sub listar_guiches_encaminhar : WSDLPort('FilaWebAtendenteCallback') { | 60 | sub listar_guiches_encaminhar : WSDLPort('FilaWebAtendenteCallback') { |
59 | my ($self, $c) = @_; | 61 | my ($self, $c) = @_; |
60 | 62 | ||
61 | - $c->model('SOAP')->transport->addrs(['motor@gestao.fila.vhost/ws/gestao/guiche']); | ||
62 | - my $lista_guiches = $c->model('SOAP::Gestao::Guiche') | ||
63 | - ->listar_guiches({ local => {} }); | 63 | + if ($self->pode_encaminhar_para_mesa) { |
64 | + $c->model('SOAP')->transport->addrs(['motor@gestao.fila.vhost/ws/gestao/guiche']); | ||
65 | + my $lista_guiches = $c->model('SOAP::Gestao::Guiche') | ||
66 | + ->listar_guiches({ local => {} }); | ||
64 | 67 | ||
65 | - if ($lista_guiches->{Fault}) { | ||
66 | - $c->stash->{error_message} = $lista_guiches->{Fault}{faultstring}; | ||
67 | - return $c->forward('/render/error_message'); | 68 | + if ($lista_guiches->{Fault}) { |
69 | + $c->stash->{error_message} = $lista_guiches->{Fault}{faultstring}; | ||
70 | + return $c->forward('/render/error_message'); | ||
71 | + } | ||
72 | + | ||
73 | + $c->stash->{lista_guiches_encaminhar} = $lista_guiches; | ||
68 | } | 74 | } |
69 | 75 | ||
70 | $c->model('SOAP')->transport->addrs(['motor@gestao.fila.vhost/ws/gestao/guiche']); | 76 | $c->model('SOAP')->transport->addrs(['motor@gestao.fila.vhost/ws/gestao/guiche']); |
@@ -72,17 +78,16 @@ sub listar_guiches_encaminhar : WSDLPort('FilaWebAtendenteCallback') { | @@ -72,17 +78,16 @@ sub listar_guiches_encaminhar : WSDLPort('FilaWebAtendenteCallback') { | ||
72 | ->listar_categorias({ local => {} }); | 78 | ->listar_categorias({ local => {} }); |
73 | 79 | ||
74 | if ($lista_categorias->{Fault}) { | 80 | if ($lista_categorias->{Fault}) { |
75 | - $c->stash->{error_message} = $lista_guiches->{Fault}{faultstring}; | 81 | + $c->stash->{error_message} = $lista_categorias->{Fault}{faultstring}; |
76 | return $c->forward('/render/error_message'); | 82 | return $c->forward('/render/error_message'); |
77 | } | 83 | } |
78 | 84 | ||
85 | + $c->stash->{lista_categorias_encaminhar} = $lista_categorias; | ||
86 | + | ||
79 | $c->model('SOAP')->transport->addrs(['motor@gestao.fila.vhost/ws/gestao/atendente']); | 87 | $c->model('SOAP')->transport->addrs(['motor@gestao.fila.vhost/ws/gestao/atendente']); |
80 | $c->stash->{status_guiche} = $c->model('SOAP::Gestao::Atendente') | 88 | $c->stash->{status_guiche} = $c->model('SOAP::Gestao::Atendente') |
81 | ->status_guiche({ guiche => {} }); | 89 | ->status_guiche({ guiche => {} }); |
82 | 90 | ||
83 | - $c->stash->{lista_guiches_encaminhar} = $lista_guiches; | ||
84 | - $c->stash->{lista_categorias_encaminhar} = $lista_categorias; | ||
85 | - | ||
86 | $c->stash->{template} = 'cb/atendente/refresh.tt'; | 91 | $c->stash->{template} = 'cb/atendente/refresh.tt'; |
87 | $c->forward($c->view()); | 92 | $c->forward($c->view()); |
88 | 93 |