Commit 94305570ed1a93ed2ce65d3c21289d73be64170e

Authored by daniel@ruoso.com
1 parent fe87e0e5
Exists in master

deixa de chamar o refresh_gerente para a maior parte das ações do atendente. No …

…lugar disso, passa a enviar a mensagem de atualização do guiche para o gerente também, que irá então atualizar a informação apenas daquele guichê.

git-svn-id: http://svn.softwarepublico.gov.br/svn/sistemadeatendimento/sistema/trunk@28 63db2ce5-8a6c-0410-abb9-a418dd412890
Fila-Opiniometro/fila_opiniometro.yml
1 1 ---
2 2 name: Fila::Opiniometro
3 3 Engine::XMPP2:
4   - username: opiniometro1
  4 + username: opiniometro
5 5 domain: agents.fila.vhost
6 6 password: password
7 7 override_host: localhost
8 8 timeout: 5
9 9 portas:
10   - opiniometro: emulate
  10 + opiniometro: /dev/ttyUSB0
11 11 perguntas:
12 12 - 1
13 13 - 2
... ...
Fila-Senha/fila_senha.yml
... ... @@ -7,7 +7,7 @@ Engine::XMPP2:
7 7 override_host: 127.0.0.1
8 8 portas:
9 9 impressora: emulate
10   - emissor: emulate
  10 + emissor: /dev/ttyUSB0
11 11 categorias:
12 12 - 1
13 13 - 2
... ...
Fila-Senha/lib/Fila/Senha/Model/Emissor.pm
... ... @@ -176,7 +176,7 @@ sub _check_rb {
176 176  
177 177 my $buf = $self->read_buffer;
178 178 return unless $buf;
179   - return unless length $buf >= 5;
  179 + return unless length $buf >= 2;
180 180  
181 181 while ($buf) {
182 182 if (substr($buf,0,1) ne '@') {
... ...
Fila-Servico/lib/Fila/Servico/Controller/WS/Gestao/Atendente.pm
... ... @@ -79,16 +79,15 @@ sub refresh_atendente :Private {
79 79  
80 80 my $guiche = $self->status_guiche($c, {});
81 81  
82   - my $atendente = $c->stash->{guiche}->atendente_atual->first;
  82 + my $atendente = $c->stash->{guiche}->atendente_atual->first || $c->stash->{atendente};
83 83  
84 84 if ($atendente) {
85 85 $c->model('SOAP')->transport->connection($c->engine->connection($c));
86 86 $c->model('SOAP')->transport->addrs([$atendente->funcionario->jid.'/cb/render/atendente']);
87 87 $c->model('SOAP::CB::Atendente')->render_atendente({ %$guiche });
88   - } elsif ($c->stash->{atendente}) {
89   - $c->model('SOAP')->transport->connection($c->engine->connection($c));
90   - $c->model('SOAP')->transport->addrs([$c->stash->{atendente}->funcionario->jid.'/cb/render/atendente']);
91   - $c->model('SOAP::CB::Atendente')->render_atendente({ %$guiche });
  88 +
  89 + $c->model('SOAP')->transport->addrs([$c->stash->{gerente}->funcionario->jid.'/cb/render/guiche_gerente']);
  90 + $c->model('SOAP::CB::GuicheGerente')->render_guiche_gerente({ %$guiche });
92 91 }
93 92  
94 93 $c->stash->{soap}->compile_return($old);
... ... @@ -348,7 +347,6 @@ sub registrar_no_show :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI {
348 347 vt_fim => 'Infinity',
349 348 id_estado => $estado_concluido->id_estado });
350 349  
351   - $c->stash->{refresh_gerente} = 1;
352 350 $c->stash->{refresh_guiche} ||= [];
353 351 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
354 352 }
... ... @@ -444,7 +442,6 @@ sub atender_no_show :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI {
444 442 vt_fim => 'Infinity',
445 443 id_estado => $estado_atendendo_gu->id_estado });
446 444  
447   - $c->stash->{refresh_gerente} = 1;
448 445 $c->stash->{refresh_guiche} ||= [];
449 446 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
450 447 }
... ... @@ -517,7 +514,6 @@ sub iniciar_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI
517 514  
518 515  
519 516 $c->stash->{refresh_painel} = 1;
520   - $c->stash->{refresh_gerente} = 1;
521 517 $c->stash->{refresh_guiche} ||= [];
522 518 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
523 519 }
... ... @@ -593,7 +589,6 @@ sub devolver_senha :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI {
593 589 ({ vt_fim => $now });
594 590  
595 591 $c->stash->{refresh_painel} = 1;
596   - $c->stash->{refresh_gerente} = 1;
597 592 $c->stash->{refresh_guiche} ||= [];
598 593 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
599 594 }
... ... @@ -681,7 +676,7 @@ sub concluir_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI
681 676 $c->model('SOAP')->transport->connection($c->engine->connection($c));
682 677 $c->model('SOAP')->transport->addrs([$c->stash->{guiche}->jid_opiniometro . '/callback']);
683 678 $c->model('SOAP::Opiniometro')
684   - ->iniciar_opiniometro({ refresh_request => '' });
  679 + ->iniciar_opiniometro({ refresh_request => 'abc' });
685 680 } else {
686 681 #encerra atendimento
687 682 my $estado_atual = $atendimento->atendimento->estado_atual->search
... ... @@ -727,16 +722,15 @@ sub concluir_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI
727 722  
728 723 $c->model('SOAP')->transport->connection($c->engine->connection($c));
729 724  
730   - $c->model('SOAP')->transport->addrs([$guiche->jid_opiniometro . '/callback/']);
  725 + $c->model('SOAP')->transport->addrs([$guiche->jid_opiniometro . '/callback']);
731 726 $c->model('SOAP::Opiniometro')
732   - ->encerrar_opiniometro({ refresh_request => '' });
  727 + ->encerrar_opiniometro({ refresh_request => 'abc' });
733 728  
734 729 $c->stash->{refresh_guiche} ||= [];
735 730 push @{$c->stash->{refresh_guiche}}, $guiche->id_guiche;
736 731 }
737 732  
738 733 $c->stash->{refresh_painel} = 1;
739   - $c->stash->{refresh_gerente} = 1;
740 734 $c->stash->{refresh_guiche} ||= [];
741 735 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
742 736 }
... ... @@ -882,7 +876,6 @@ sub iniciar_pausa :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI {
882 876 motivo => '' });
883 877  
884 878  
885   - $c->stash->{refresh_gerente} = 1;
886 879 $c->stash->{refresh_guiche} ||= [];
887 880 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
888 881 }
... ... @@ -911,7 +904,6 @@ sub setar_motivo_pausa : WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI
911 904 $pausa_atual->update
912 905 ({ motivo => $pausa_motivo });
913 906  
914   - $c->stash->{refresh_gerente} = 1;
915 907 $c->stash->{refresh_guiche} ||= [];
916 908 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
917 909 }
... ... @@ -956,7 +948,6 @@ sub fechar_servico_interno: WSDLPort('GestaoAtendente') :DBICTransaction('DB') :
956 948 vt_fim => 'Infinity',
957 949 id_estado => $estado_concluido->id_estado });
958 950  
959   - $c->stash->{refresh_gerente} = 1;
960 951 $c->stash->{refresh_guiche} ||= [];
961 952 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
962 953 }
... ... @@ -1017,7 +1008,6 @@ sub disponivel :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI {
1017 1008 id_estado => $estado_disponivel->id_estado });
1018 1009  
1019 1010  
1020   - $c->stash->{escalonar_gerente} = 1;
1021 1011 $c->stash->{escalonar_senha} = 1;
1022 1012 $c->stash->{refresh_guiche} ||= [];
1023 1013 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
... ... @@ -1154,7 +1144,6 @@ sub iniciar_servico_interno :WSDLPort('GestaoAtendente') :DBICTransaction('DB')
1154 1144 id_servico => $id_servico,
1155 1145 informacoes => '' });
1156 1146  
1157   - $c->stash->{refresh_gerente} = 1;
1158 1147 $c->stash->{refresh_guiche} ||= [];
1159 1148 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
1160 1149  
... ... @@ -1238,7 +1227,6 @@ sub setar_info_interno : WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI
1238 1227 $servico_atual->update
1239 1228 ({ informacoes => $informacoes });
1240 1229  
1241   - $c->stash->{refresh_gerente} = 1;
1242 1230 $c->stash->{refresh_guiche} ||= [];
1243 1231 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
1244 1232 }
... ... @@ -1287,7 +1275,6 @@ sub iniciar_servico_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('D
1287 1275 id_servico => $id_servico,
1288 1276 informacoes => '' });
1289 1277  
1290   - $c->stash->{refresh_gerente} = 1;
1291 1278 $c->stash->{refresh_guiche} ||= [];
1292 1279 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
1293 1280  
... ... @@ -1338,7 +1325,6 @@ sub fechar_servico_atendimento: WSDLPort('GestaoAtendente') :DBICTransaction('DB
1338 1325 $servico_atual->update
1339 1326 ({ vt_fim => $now });
1340 1327  
1341   - $c->stash->{refresh_gerente} = 1;
1342 1328 $c->stash->{refresh_guiche} ||= [];
1343 1329 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
1344 1330 }
... ... @@ -1393,7 +1379,6 @@ sub setar_info_atendimento : WSDLPort('GestaoAtendente') :DBICTransaction('DB')
1393 1379 $servico_atual->update
1394 1380 ({ informacoes => $informacoes });
1395 1381  
1396   - $c->stash->{refresh_gerente} = 1;
1397 1382 $c->stash->{refresh_guiche} ||= [];
1398 1383 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
1399 1384 }
... ... @@ -1437,7 +1422,6 @@ sub retornar_pausa : WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI {
1437 1422 vt_fim => 'Infinity',
1438 1423 id_estado => $estado_concluido->id_estado });
1439 1424  
1440   - $c->stash->{refresh_gerente} = 1;
1441 1425 $c->stash->{refresh_guiche} ||= [];
1442 1426 push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche;
1443 1427  
... ...
Fila-Servico/lib/Fila/Servico/Model/SOAP.pm
... ... @@ -27,6 +27,7 @@ __PACKAGE__->register_wsdl
27 27 ({ wsdl => Fila::Servico->path_to('/schemas/FilaWebApp.wsdl'),
28 28 schema => Fila::Servico->path_to('/schemas/fila-servico.xsd') },
29 29 { render_gerente => 'CB::Gerente',
  30 + render_guiche_gerente => 'CB::GuicheGerente',
30 31 render_atendente => 'CB::Atendente',
31 32 render_error => 'CB::Error' });
32 33  
... ...
Fila-Servico/schemas/FilaWebApp.wsdl
... ... @@ -56,6 +56,12 @@
56 56 </wsdl:operation>
57 57 </wsdl:portType>
58 58  
  59 + <wsdl:portType name="render_guiche_gerente">
  60 + <wsdl:operation name="render_guiche_gerente">
  61 + <wsdl:input message="filasv:render_atendente" />
  62 + </wsdl:operation>
  63 + </wsdl:portType>
  64 +
59 65 <wsdl:portType name="render_atendente">
60 66 <wsdl:operation name="render_atendente">
61 67 <wsdl:input message="filasv:render_atendente" />
... ... @@ -82,6 +88,14 @@
82 88 </wsdl:operation>
83 89 </wsdl:binding>
84 90  
  91 + <wsdl:binding name="render_guiche_gerente_soapxmpp" type="filasv:render_guiche_gerente">
  92 + <soap:binding transport="http://jabber.org/protocol/soap" style="document"/>
  93 + <wsdl:operation name="render_guiche_gerente">
  94 + <soap:operation style="document" />
  95 + <wsdl:input><soap:body namespace="urn:oktiva:fila:servico" use="literal"/></wsdl:input>
  96 + </wsdl:operation>
  97 + </wsdl:binding>
  98 +
85 99 <wsdl:binding name="render_atendente_soapxmpp" type="filasv:render_atendente">
86 100 <soap:binding transport="http://jabber.org/protocol/soap" style="document"/>
87 101 <wsdl:operation name="render_atendente">
... ... @@ -110,6 +124,9 @@
110 124 <wsdl:port name="render_gerente" binding="filasv:render_gerente_soapxmpp">
111 125 <soap:address location="xmpp://gerente@people.fila.vhost/cb/render/gerente" />
112 126 </wsdl:port>
  127 + <wsdl:port name="render_guiche_gerente" binding="filasv:render_guiche_gerente_soapxmpp">
  128 + <soap:address location="xmpp://gerente@people.fila.vhost/cb/render/guiche_gerente" />
  129 + </wsdl:port>
113 130 <wsdl:port name="render_atendente" binding="filasv:render_atendente_soapxmpp">
114 131 <soap:address location="xmpp://atendente@people.fila.vhost/cb/render/atendente" />
115 132 </wsdl:port>
... ...
Fila-Servico/script/fila_servico_xmpp.pl
... ... @@ -25,14 +25,7 @@ use Pod::Usage;
25 25 use FindBin;
26 26 use lib "$FindBin::Bin/../lib";
27 27  
28   -use EV;
29   -use AnyEvent;
30   -use Net::XMPP2::Connection;
31 28 use Catalyst::Engine::XMPP2;
32   -{
33   - no warnings;
34   - *Catalyst::Engine::XMPP2::loop = *EV::loop;
35   -}
36 29  
37 30 my $debug = 0;
38 31 my $help = 0;
... ...
Fila-Web/lib/Fila/WebApp/Controller/CB/Render/Gerente.pm
... ... @@ -35,6 +35,13 @@ sub render_gerente :WSDLPort(&#39;render_gerente&#39;) {
35 35 $c->forward($c->view());
36 36 }
37 37  
  38 +sub render_guiche_gerente :WSDLPort('render_guiche_gerente') {
  39 + my ($self, $c, $dados) = @_;
  40 + $c->stash->{guiche} = $dados->{guiche};
  41 + $c->stash->{template} = 'render/guiche_gerente.tt';
  42 + $c->forward($c->view());
  43 +}
  44 +
38 45 1;
39 46  
40 47 __END__
... ...
Fila-Web/root/render/guiche.tt 0 → 100644
... ... @@ -0,0 +1,64 @@
  1 + <table class="mesas" cellspacing="0" cellpadding="2" id="info_guiche_[% guiche.id_guiche %]">
  2 + <TR>
  3 + [% SWITCH guiche.estado %]
  4 + [% CASE ['atendimento' 'disponivel' 'chamando' ] %]
  5 + <TD class='guiche guiche_ativo' valign="top" ROWSPAN="6" [% IF guiche.alert %]style="background-color: red"[% END %]>[% guiche.identificador %]
  6 + [% CASE ['interno' 'pausa'] %]
  7 + <TD class='guiche guiche_pausa' valign="top" ROWSPAN="6" [% IF guiche.alert %]style="background-color: red"[% END %]>[% guiche.identificador %]
  8 + [% CASE ['avaliacao' 'concluido'] %]
  9 + <TD class='guiche guiche_inativo' valign="top" ROWSPAN="6" [% IF guiche.alert %]style="background-color: red"[% END %]>[% guiche.identificador %]
  10 + [% CASE ['fechado'] %]
  11 + <TD class='guiche guiche_fechado' valign="top" ROWSPAN="6" >[% guiche.identificador %]
  12 +
  13 + [% END %]
  14 + [% IF guiche.pular_opiniometro == 0 %]
  15 + <SPAN class="opi acao_opi_on">
  16 + [% c.prototype.link_to_remote('(Desab.)', { url => '/cb/gerente/pular_opiniometro/1/' _ guiche.id_guiche, confirm => 'confirmar(\'Deseja mesmo desabilitar o opiniometro da mesa?\')' }) %]
  17 + </SPAN>
  18 + [% ELSE %]
  19 + <SPAN class="opi acao_opi_off">
  20 + [% c.prototype.link_to_remote('(Habil.)', { url => '/cb/gerente/pular_opiniometro/0/' _ guiche.id_guiche, confirm => 'confirmar(\'Deseja habilitar o opiniometro da mesa?\')' }) %]
  21 + </SPAN>
  22 + [% END %]
  23 + </TD>
  24 +
  25 +
  26 + <TD>[% guiche.estado %]&nbsp;[%guiche.senha%]
  27 + [% SWITCH guiche.estado %]
  28 + [% CASE 'pausa' %]
  29 + <SPAN class="motivo">
  30 + <a href="#" title="Motivo da Pausa: [% guiche.pausa_motivo %]">(Motivo)</a>
  31 + </SPAN>
  32 + [% CASE 'interno' %]
  33 + <SPAN class="motivo">
  34 + <a href="#" title="Descrição do Serviço: [% guiche.nome_servico %]&nbsp;">(Serviço)</a>
  35 + </SPAN>
  36 + [% END %]
  37 + </TD>
  38 +
  39 + </TR>
  40 + <TR><TD>[% dtf.f(guiche.estado_desde) %]&nbsp;</TD></TR>
  41 + <TR><TD>[% guiche.funcionario %]&nbsp;</TD></TR>
  42 + [% SWITCH guiche.estado %]
  43 + [% CASE 'pausa' %]
  44 + <TR><TD>[% c.prototype.link_to_remote('(Fechar Mesa)', { url => '/cb/gerente/fechar_guiche/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo fechar a mesa?\')' }) %]</TD></TR>
  45 + [% CASE 'interno' %]
  46 + <TR><TD>[% c.prototype.link_to_remote('(Fechar Mesa)', { url => '/cb/gerente/fechar_guiche/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo fechar a mesa?\')' }) %]</TD></TR>
  47 + [% CASE 'chamando' %]
  48 + <TR><TD>[% c.prototype.link_to_remote('(Devolver Senha)', { url => '/cb/gerente/devolver_senha/' _ guiche.id_guiche }) %]</TD></TR>
  49 + [% CASE 'concluido' %]
  50 + <TR><TD>[% c.prototype.link_to_remote('(Fechar Mesa)', { url => '/cb/gerente/fechar_guiche/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo fechar a mesa?\')' }) %]</TD></TR>
  51 + [% CASE 'atendimento' %]
  52 + <TR><TD>[% c.prototype.link_to_remote('(Encerrar)', { url => '/cb/gerente/concluir_atendimento/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo concluir o atendimento?\')' }) %]</TD></TR>
  53 + [% CASE 'disponivel' %]
  54 + <TR><TD>[% c.prototype.link_to_remote('(Fechar Mesa)', { url => '/cb/gerente/fechar_guiche/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo fechar a mesa?\')' }) %]</TD></TR>
  55 + [% CASE %]
  56 + [% IF guiche.estado_atendimento == 'avaliacao' %]
  57 + <TR><TD>
  58 + [% c.prototype.link_to_remote('(Encerrar)', { url => '/cb/gerente/encerrar_atendimento/' _ guiche.id_atendimento }) %]
  59 + </TD></TR>
  60 + [% ELSE %]
  61 + [%# <TR><TD>&nbsp;</TD></TR> %]
  62 + [% END %]
  63 + [% END %]
  64 + </table>
... ...
Fila-Web/root/render/guiche_gerente.tt 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +<script language='javascript'>
  2 + [% USE JavaScript %]
  3 +
  4 + [% novo_guiche = BLOCK %]
  5 + [% INCLUDE 'render/guiche.tt' %]
  6 + [% END %]
  7 +
  8 + $('info_guiche_[% guiche.id_guiche %]').replace("[% novo_guiche | js %]");
  9 +
  10 +</script>
... ...
Fila-Web/root/render/guiches.tt
... ... @@ -21,70 +21,7 @@
21 21 [% nova_lista_guiches = BLOCK %]
22 22 <div id='lista_guiches'>
23 23 [% FOREACH guiche IN status_guiches.lista_guiches.guiche %]
24   - <table class="mesas" cellspacing="0" cellpadding="2">
25   - <TR>
26   - [% SWITCH guiche.estado %]
27   - [% CASE ['atendimento' 'disponivel' 'chamando' ] %]
28   - <TD class='guiche guiche_ativo' valign="top" ROWSPAN="6" [% IF guiche.alert %]style="background-color: red"[% END %]>[% guiche.identificador %]
29   - [% CASE ['interno' 'pausa'] %]
30   - <TD class='guiche guiche_pausa' valign="top" ROWSPAN="6" [% IF guiche.alert %]style="background-color: red"[% END %]>[% guiche.identificador %]
31   - [% CASE ['avaliacao' 'concluido'] %]
32   - <TD class='guiche guiche_inativo' valign="top" ROWSPAN="6" [% IF guiche.alert %]style="background-color: red"[% END %]>[% guiche.identificador %]
33   - [% CASE ['fechado'] %]
34   - <TD class='guiche guiche_fechado' valign="top" ROWSPAN="6" >[% guiche.identificador %]
35   -
36   - [% END %]
37   - [% IF guiche.pular_opiniometro == 0 %]
38   - <SPAN class="opi acao_opi_on">
39   - [% c.prototype.link_to_remote('(Desab.)', { url => '/cb/gerente/pular_opiniometro/1/' _ guiche.id_guiche, confirm => 'confirmar(\'Deseja mesmo desabilitar o opiniometro da mesa?\')' }) %]
40   - </SPAN>
41   - [% ELSE %]
42   - <SPAN class="opi acao_opi_off">
43   - [% c.prototype.link_to_remote('(Habil.)', { url => '/cb/gerente/pular_opiniometro/0/' _ guiche.id_guiche, confirm => 'confirmar(\'Deseja habilitar o opiniometro da mesa?\')' }) %]
44   - </SPAN>
45   - [% END %]
46   - </TD>
47   -
48   -
49   - <TD>[% guiche.estado %]&nbsp;[%guiche.senha%]
50   - [% SWITCH guiche.estado %]
51   - [% CASE 'pausa' %]
52   - <SPAN class="motivo">
53   - <a href="#" title="Motivo da Pausa: [% guiche.pausa_motivo %]">(Motivo)</a>
54   - </SPAN>
55   - [% CASE 'interno' %]
56   - <SPAN class="motivo">
57   - <a href="#" title="Descrição do Serviço: [% guiche.nome_servico %]&nbsp;">(Serviço)</a>
58   - </SPAN>
59   - [% END %]
60   - </TD>
61   -
62   - </TR>
63   - <TR><TD>[% dtf.f(guiche.estado_desde) %]&nbsp;</TD></TR>
64   - <TR><TD>[% guiche.funcionario %]&nbsp;</TD></TR>
65   - [% SWITCH guiche.estado %]
66   - [% CASE 'pausa' %]
67   - <TR><TD>[% c.prototype.link_to_remote('(Fechar Mesa)', { url => '/cb/gerente/fechar_guiche/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo fechar a mesa?\')' }) %]</TD></TR>
68   - [% CASE 'interno' %]
69   - <TR><TD>[% c.prototype.link_to_remote('(Fechar Mesa)', { url => '/cb/gerente/fechar_guiche/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo fechar a mesa?\')' }) %]</TD></TR>
70   - [% CASE 'chamando' %]
71   - <TR><TD>[% c.prototype.link_to_remote('(Devolver Senha)', { url => '/cb/gerente/devolver_senha/' _ guiche.id_guiche }) %]</TD></TR>
72   - [% CASE 'concluido' %]
73   - <TR><TD>[% c.prototype.link_to_remote('(Fechar Mesa)', { url => '/cb/gerente/fechar_guiche/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo fechar a mesa?\')' }) %]</TD></TR>
74   - [% CASE 'atendimento' %]
75   - <TR><TD>[% c.prototype.link_to_remote('(Encerrar)', { url => '/cb/gerente/concluir_atendimento/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo concluir o atendimento?\')' }) %]</TD></TR>
76   - [% CASE 'disponivel' %]
77   - <TR><TD>[% c.prototype.link_to_remote('(Fechar Mesa)', { url => '/cb/gerente/fechar_guiche/' _ guiche.id_guiche , confirm => 'confirmar(\'Deseja mesmo fechar a mesa?\')' }) %]</TD></TR>
78   - [% CASE %]
79   - [% IF guiche.estado_atendimento == 'avaliacao' %]
80   - <TR><TD>
81   - [% c.prototype.link_to_remote('(Encerrar)', { url => '/cb/gerente/encerrar_atendimento/' _ guiche.id_atendimento }) %]
82   - </TD></TR>
83   - [% ELSE %]
84   - [%# <TR><TD>&nbsp;</TD></TR> %]
85   - [% END %]
86   - [% END %]
87   - </table>
  24 + [% INCLUDE 'render/guiche.tt' %]
88 25 [% END %]
89 26 </div>
90 27  
... ...