Commit 94305570ed1a93ed2ce65d3c21289d73be64170e
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
Showing
11 changed files
with
111 additions
and
98 deletions
Show diff stats
Fila-Opiniometro/fila_opiniometro.yml
1 | --- | 1 | --- |
2 | name: Fila::Opiniometro | 2 | name: Fila::Opiniometro |
3 | Engine::XMPP2: | 3 | Engine::XMPP2: |
4 | - username: opiniometro1 | 4 | + username: opiniometro |
5 | domain: agents.fila.vhost | 5 | domain: agents.fila.vhost |
6 | password: password | 6 | password: password |
7 | override_host: localhost | 7 | override_host: localhost |
8 | timeout: 5 | 8 | timeout: 5 |
9 | portas: | 9 | portas: |
10 | - opiniometro: emulate | 10 | + opiniometro: /dev/ttyUSB0 |
11 | perguntas: | 11 | perguntas: |
12 | - 1 | 12 | - 1 |
13 | - 2 | 13 | - 2 |
Fila-Senha/fila_senha.yml
Fila-Senha/lib/Fila/Senha/Model/Emissor.pm
@@ -176,7 +176,7 @@ sub _check_rb { | @@ -176,7 +176,7 @@ sub _check_rb { | ||
176 | 176 | ||
177 | my $buf = $self->read_buffer; | 177 | my $buf = $self->read_buffer; |
178 | return unless $buf; | 178 | return unless $buf; |
179 | - return unless length $buf >= 5; | 179 | + return unless length $buf >= 2; |
180 | 180 | ||
181 | while ($buf) { | 181 | while ($buf) { |
182 | if (substr($buf,0,1) ne '@') { | 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,16 +79,15 @@ sub refresh_atendente :Private { | ||
79 | 79 | ||
80 | my $guiche = $self->status_guiche($c, {}); | 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 | if ($atendente) { | 84 | if ($atendente) { |
85 | $c->model('SOAP')->transport->connection($c->engine->connection($c)); | 85 | $c->model('SOAP')->transport->connection($c->engine->connection($c)); |
86 | $c->model('SOAP')->transport->addrs([$atendente->funcionario->jid.'/cb/render/atendente']); | 86 | $c->model('SOAP')->transport->addrs([$atendente->funcionario->jid.'/cb/render/atendente']); |
87 | $c->model('SOAP::CB::Atendente')->render_atendente({ %$guiche }); | 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 | $c->stash->{soap}->compile_return($old); | 93 | $c->stash->{soap}->compile_return($old); |
@@ -348,7 +347,6 @@ sub registrar_no_show :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI { | @@ -348,7 +347,6 @@ sub registrar_no_show :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI { | ||
348 | vt_fim => 'Infinity', | 347 | vt_fim => 'Infinity', |
349 | id_estado => $estado_concluido->id_estado }); | 348 | id_estado => $estado_concluido->id_estado }); |
350 | 349 | ||
351 | - $c->stash->{refresh_gerente} = 1; | ||
352 | $c->stash->{refresh_guiche} ||= []; | 350 | $c->stash->{refresh_guiche} ||= []; |
353 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +442,6 @@ sub atender_no_show :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI { | ||
444 | vt_fim => 'Infinity', | 442 | vt_fim => 'Infinity', |
445 | id_estado => $estado_atendendo_gu->id_estado }); | 443 | id_estado => $estado_atendendo_gu->id_estado }); |
446 | 444 | ||
447 | - $c->stash->{refresh_gerente} = 1; | ||
448 | $c->stash->{refresh_guiche} ||= []; | 445 | $c->stash->{refresh_guiche} ||= []; |
449 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +514,6 @@ sub iniciar_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI | ||
517 | 514 | ||
518 | 515 | ||
519 | $c->stash->{refresh_painel} = 1; | 516 | $c->stash->{refresh_painel} = 1; |
520 | - $c->stash->{refresh_gerente} = 1; | ||
521 | $c->stash->{refresh_guiche} ||= []; | 517 | $c->stash->{refresh_guiche} ||= []; |
522 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +589,6 @@ sub devolver_senha :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI { | ||
593 | ({ vt_fim => $now }); | 589 | ({ vt_fim => $now }); |
594 | 590 | ||
595 | $c->stash->{refresh_painel} = 1; | 591 | $c->stash->{refresh_painel} = 1; |
596 | - $c->stash->{refresh_gerente} = 1; | ||
597 | $c->stash->{refresh_guiche} ||= []; | 592 | $c->stash->{refresh_guiche} ||= []; |
598 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +676,7 @@ sub concluir_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI | ||
681 | $c->model('SOAP')->transport->connection($c->engine->connection($c)); | 676 | $c->model('SOAP')->transport->connection($c->engine->connection($c)); |
682 | $c->model('SOAP')->transport->addrs([$c->stash->{guiche}->jid_opiniometro . '/callback']); | 677 | $c->model('SOAP')->transport->addrs([$c->stash->{guiche}->jid_opiniometro . '/callback']); |
683 | $c->model('SOAP::Opiniometro') | 678 | $c->model('SOAP::Opiniometro') |
684 | - ->iniciar_opiniometro({ refresh_request => '' }); | 679 | + ->iniciar_opiniometro({ refresh_request => 'abc' }); |
685 | } else { | 680 | } else { |
686 | #encerra atendimento | 681 | #encerra atendimento |
687 | my $estado_atual = $atendimento->atendimento->estado_atual->search | 682 | my $estado_atual = $atendimento->atendimento->estado_atual->search |
@@ -727,16 +722,15 @@ sub concluir_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI | @@ -727,16 +722,15 @@ sub concluir_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI | ||
727 | 722 | ||
728 | $c->model('SOAP')->transport->connection($c->engine->connection($c)); | 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 | $c->model('SOAP::Opiniometro') | 726 | $c->model('SOAP::Opiniometro') |
732 | - ->encerrar_opiniometro({ refresh_request => '' }); | 727 | + ->encerrar_opiniometro({ refresh_request => 'abc' }); |
733 | 728 | ||
734 | $c->stash->{refresh_guiche} ||= []; | 729 | $c->stash->{refresh_guiche} ||= []; |
735 | push @{$c->stash->{refresh_guiche}}, $guiche->id_guiche; | 730 | push @{$c->stash->{refresh_guiche}}, $guiche->id_guiche; |
736 | } | 731 | } |
737 | 732 | ||
738 | $c->stash->{refresh_painel} = 1; | 733 | $c->stash->{refresh_painel} = 1; |
739 | - $c->stash->{refresh_gerente} = 1; | ||
740 | $c->stash->{refresh_guiche} ||= []; | 734 | $c->stash->{refresh_guiche} ||= []; |
741 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +876,6 @@ sub iniciar_pausa :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI { | ||
882 | motivo => '' }); | 876 | motivo => '' }); |
883 | 877 | ||
884 | 878 | ||
885 | - $c->stash->{refresh_gerente} = 1; | ||
886 | $c->stash->{refresh_guiche} ||= []; | 879 | $c->stash->{refresh_guiche} ||= []; |
887 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +904,6 @@ sub setar_motivo_pausa : WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI | ||
911 | $pausa_atual->update | 904 | $pausa_atual->update |
912 | ({ motivo => $pausa_motivo }); | 905 | ({ motivo => $pausa_motivo }); |
913 | 906 | ||
914 | - $c->stash->{refresh_gerente} = 1; | ||
915 | $c->stash->{refresh_guiche} ||= []; | 907 | $c->stash->{refresh_guiche} ||= []; |
916 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +948,6 @@ sub fechar_servico_interno: WSDLPort('GestaoAtendente') :DBICTransaction('DB') : | ||
956 | vt_fim => 'Infinity', | 948 | vt_fim => 'Infinity', |
957 | id_estado => $estado_concluido->id_estado }); | 949 | id_estado => $estado_concluido->id_estado }); |
958 | 950 | ||
959 | - $c->stash->{refresh_gerente} = 1; | ||
960 | $c->stash->{refresh_guiche} ||= []; | 951 | $c->stash->{refresh_guiche} ||= []; |
961 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +1008,6 @@ sub disponivel :WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI { | ||
1017 | id_estado => $estado_disponivel->id_estado }); | 1008 | id_estado => $estado_disponivel->id_estado }); |
1018 | 1009 | ||
1019 | 1010 | ||
1020 | - $c->stash->{escalonar_gerente} = 1; | ||
1021 | $c->stash->{escalonar_senha} = 1; | 1011 | $c->stash->{escalonar_senha} = 1; |
1022 | $c->stash->{refresh_guiche} ||= []; | 1012 | $c->stash->{refresh_guiche} ||= []; |
1023 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 1013 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; |
@@ -1154,7 +1144,6 @@ sub iniciar_servico_interno :WSDLPort('GestaoAtendente') :DBICTransaction('DB') | @@ -1154,7 +1144,6 @@ sub iniciar_servico_interno :WSDLPort('GestaoAtendente') :DBICTransaction('DB') | ||
1154 | id_servico => $id_servico, | 1144 | id_servico => $id_servico, |
1155 | informacoes => '' }); | 1145 | informacoes => '' }); |
1156 | 1146 | ||
1157 | - $c->stash->{refresh_gerente} = 1; | ||
1158 | $c->stash->{refresh_guiche} ||= []; | 1147 | $c->stash->{refresh_guiche} ||= []; |
1159 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +1227,6 @@ sub setar_info_interno : WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI | ||
1238 | $servico_atual->update | 1227 | $servico_atual->update |
1239 | ({ informacoes => $informacoes }); | 1228 | ({ informacoes => $informacoes }); |
1240 | 1229 | ||
1241 | - $c->stash->{refresh_gerente} = 1; | ||
1242 | $c->stash->{refresh_guiche} ||= []; | 1230 | $c->stash->{refresh_guiche} ||= []; |
1243 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +1275,6 @@ sub iniciar_servico_atendimento :WSDLPort('GestaoAtendente') :DBICTransaction('D | ||
1287 | id_servico => $id_servico, | 1275 | id_servico => $id_servico, |
1288 | informacoes => '' }); | 1276 | informacoes => '' }); |
1289 | 1277 | ||
1290 | - $c->stash->{refresh_gerente} = 1; | ||
1291 | $c->stash->{refresh_guiche} ||= []; | 1278 | $c->stash->{refresh_guiche} ||= []; |
1292 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +1325,6 @@ sub fechar_servico_atendimento: WSDLPort('GestaoAtendente') :DBICTransaction('DB | ||
1338 | $servico_atual->update | 1325 | $servico_atual->update |
1339 | ({ vt_fim => $now }); | 1326 | ({ vt_fim => $now }); |
1340 | 1327 | ||
1341 | - $c->stash->{refresh_gerente} = 1; | ||
1342 | $c->stash->{refresh_guiche} ||= []; | 1328 | $c->stash->{refresh_guiche} ||= []; |
1343 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +1379,6 @@ sub setar_info_atendimento : WSDLPort('GestaoAtendente') :DBICTransaction('DB') | ||
1393 | $servico_atual->update | 1379 | $servico_atual->update |
1394 | ({ informacoes => $informacoes }); | 1380 | ({ informacoes => $informacoes }); |
1395 | 1381 | ||
1396 | - $c->stash->{refresh_gerente} = 1; | ||
1397 | $c->stash->{refresh_guiche} ||= []; | 1382 | $c->stash->{refresh_guiche} ||= []; |
1398 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,7 +1422,6 @@ sub retornar_pausa : WSDLPort('GestaoAtendente') :DBICTransaction('DB') :MI { | ||
1437 | vt_fim => 'Infinity', | 1422 | vt_fim => 'Infinity', |
1438 | id_estado => $estado_concluido->id_estado }); | 1423 | id_estado => $estado_concluido->id_estado }); |
1439 | 1424 | ||
1440 | - $c->stash->{refresh_gerente} = 1; | ||
1441 | $c->stash->{refresh_guiche} ||= []; | 1425 | $c->stash->{refresh_guiche} ||= []; |
1442 | push @{$c->stash->{refresh_guiche}}, $c->stash->{guiche}->id_guiche; | 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,6 +27,7 @@ __PACKAGE__->register_wsdl | ||
27 | ({ wsdl => Fila::Servico->path_to('/schemas/FilaWebApp.wsdl'), | 27 | ({ wsdl => Fila::Servico->path_to('/schemas/FilaWebApp.wsdl'), |
28 | schema => Fila::Servico->path_to('/schemas/fila-servico.xsd') }, | 28 | schema => Fila::Servico->path_to('/schemas/fila-servico.xsd') }, |
29 | { render_gerente => 'CB::Gerente', | 29 | { render_gerente => 'CB::Gerente', |
30 | + render_guiche_gerente => 'CB::GuicheGerente', | ||
30 | render_atendente => 'CB::Atendente', | 31 | render_atendente => 'CB::Atendente', |
31 | render_error => 'CB::Error' }); | 32 | render_error => 'CB::Error' }); |
32 | 33 |
Fila-Servico/schemas/FilaWebApp.wsdl
@@ -56,6 +56,12 @@ | @@ -56,6 +56,12 @@ | ||
56 | </wsdl:operation> | 56 | </wsdl:operation> |
57 | </wsdl:portType> | 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 | <wsdl:portType name="render_atendente"> | 65 | <wsdl:portType name="render_atendente"> |
60 | <wsdl:operation name="render_atendente"> | 66 | <wsdl:operation name="render_atendente"> |
61 | <wsdl:input message="filasv:render_atendente" /> | 67 | <wsdl:input message="filasv:render_atendente" /> |
@@ -82,6 +88,14 @@ | @@ -82,6 +88,14 @@ | ||
82 | </wsdl:operation> | 88 | </wsdl:operation> |
83 | </wsdl:binding> | 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 | <wsdl:binding name="render_atendente_soapxmpp" type="filasv:render_atendente"> | 99 | <wsdl:binding name="render_atendente_soapxmpp" type="filasv:render_atendente"> |
86 | <soap:binding transport="http://jabber.org/protocol/soap" style="document"/> | 100 | <soap:binding transport="http://jabber.org/protocol/soap" style="document"/> |
87 | <wsdl:operation name="render_atendente"> | 101 | <wsdl:operation name="render_atendente"> |
@@ -110,6 +124,9 @@ | @@ -110,6 +124,9 @@ | ||
110 | <wsdl:port name="render_gerente" binding="filasv:render_gerente_soapxmpp"> | 124 | <wsdl:port name="render_gerente" binding="filasv:render_gerente_soapxmpp"> |
111 | <soap:address location="xmpp://gerente@people.fila.vhost/cb/render/gerente" /> | 125 | <soap:address location="xmpp://gerente@people.fila.vhost/cb/render/gerente" /> |
112 | </wsdl:port> | 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 | <wsdl:port name="render_atendente" binding="filasv:render_atendente_soapxmpp"> | 130 | <wsdl:port name="render_atendente" binding="filasv:render_atendente_soapxmpp"> |
114 | <soap:address location="xmpp://atendente@people.fila.vhost/cb/render/atendente" /> | 131 | <soap:address location="xmpp://atendente@people.fila.vhost/cb/render/atendente" /> |
115 | </wsdl:port> | 132 | </wsdl:port> |
Fila-Servico/script/fila_servico_xmpp.pl
@@ -25,14 +25,7 @@ use Pod::Usage; | @@ -25,14 +25,7 @@ use Pod::Usage; | ||
25 | use FindBin; | 25 | use FindBin; |
26 | use lib "$FindBin::Bin/../lib"; | 26 | use lib "$FindBin::Bin/../lib"; |
27 | 27 | ||
28 | -use EV; | ||
29 | -use AnyEvent; | ||
30 | -use Net::XMPP2::Connection; | ||
31 | use Catalyst::Engine::XMPP2; | 28 | use Catalyst::Engine::XMPP2; |
32 | -{ | ||
33 | - no warnings; | ||
34 | - *Catalyst::Engine::XMPP2::loop = *EV::loop; | ||
35 | -} | ||
36 | 29 | ||
37 | my $debug = 0; | 30 | my $debug = 0; |
38 | my $help = 0; | 31 | my $help = 0; |
Fila-Web/lib/Fila/WebApp/Controller/CB/Render/Gerente.pm
@@ -35,6 +35,13 @@ sub render_gerente :WSDLPort('render_gerente') { | @@ -35,6 +35,13 @@ sub render_gerente :WSDLPort('render_gerente') { | ||
35 | $c->forward($c->view()); | 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 | 1; | 45 | 1; |
39 | 46 | ||
40 | __END__ | 47 | __END__ |
@@ -0,0 +1,64 @@ | @@ -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 %] [%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 %] ">(Serviço)</a> | ||
35 | + </SPAN> | ||
36 | + [% END %] | ||
37 | + </TD> | ||
38 | + | ||
39 | + </TR> | ||
40 | + <TR><TD>[% dtf.f(guiche.estado_desde) %] </TD></TR> | ||
41 | + <TR><TD>[% guiche.funcionario %] </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> </TD></TR> %] | ||
62 | + [% END %] | ||
63 | + [% END %] | ||
64 | + </table> |
Fila-Web/root/render/guiches.tt
@@ -21,70 +21,7 @@ | @@ -21,70 +21,7 @@ | ||
21 | [% nova_lista_guiches = BLOCK %] | 21 | [% nova_lista_guiches = BLOCK %] |
22 | <div id='lista_guiches'> | 22 | <div id='lista_guiches'> |
23 | [% FOREACH guiche IN status_guiches.lista_guiches.guiche %] | 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 %] [%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 %] ">(Serviço)</a> | ||
58 | - </SPAN> | ||
59 | - [% END %] | ||
60 | - </TD> | ||
61 | - | ||
62 | - </TR> | ||
63 | - <TR><TD>[% dtf.f(guiche.estado_desde) %] </TD></TR> | ||
64 | - <TR><TD>[% guiche.funcionario %] </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> </TD></TR> %] | ||
85 | - [% END %] | ||
86 | - [% END %] | ||
87 | - </table> | 24 | + [% INCLUDE 'render/guiche.tt' %] |
88 | [% END %] | 25 | [% END %] |
89 | </div> | 26 | </div> |
90 | 27 |