service.html.erb 3.55 KB
Newer Older
1
2
<div class="card">
  <div class="card-content">
3
    <h2 class="card-title"><%= t(:Services) %></h2>
4

5
6
7
8
9
    <div id="search-form">
      <%= search_form_for(@search, url: schedules_service_path) do |f| %>
      
      <div class="row">
        <div class="field-h col s12 m6 l3">
10
          <%= f.label :citizen_name, t(:Citizen)+": " %><br />
11
12
          <%= f.text_field :citizen_name_cont, :class => "search-field"%>
        </div>
13

14
        <div class="field-h col s12 m6 l3">
15
          <%= f.label :citizen_cpf, t(:cpf)+": " %><br />
16
17
          <%= f.text_field :citizen_cpf_eq, :class => "cpf", :type => "tel"%>
        </div>
18

19
20
21
22
23
24
25
        <div class="field-h col s12 m6 l3">
          <%= f.label :limite_inicio, "A partir de: " %><br />
          <% if @limite_inicio %>
               <%= f.text_field :limite_inicio,
              { :value => @limite_inicio.strftime("%d/%m/%Y"), :class => "date agendamentos_atend_calendario", :readonly => "true" } %>
          <% end %>
        </div>
26

27
28
29
30
31
32
33
        <div class="field-h col s12 m6 l3">
          <%= f.label :limite_fim, "Até: " %><br />
          <% if @limite_fim %>
            <%= f.text_field :limite_fim,
              { :value => @limite_fim.strftime("%d/%m/%Y"), :class => "date agendamentos_atend_calendario", :readonly => "true" } %>
          <% end %>
        </div>
34
35
36
37
38

        <div class="field-h col s12 m6 l3">
         <%= f.label :service_place_city_hall_id, t(:city_hall) %><br />
          <% if @currentProfessionalServicePlace.role == "adm_c3sl" %>
            <%= f.collection_select :service_place_city_hall_id_eq, CityHall.active.order(:name),
39
            :id, :name, { :include_blank => "Todos", selected: 0 }, { :class => "search-field" } %>
40
41
42
43
44
45
46
          <% else %>
            <%= f.collection_select :service_place_city_hall_id_eq, CityHall.where(id: @currentCityHall.id),
            :id, :name, { disabled: true }, { :class => "search-field" } %>
          <% end %>
        </div>


47
        <div class="field-h col s12 m6 l3">
48
          <%= f.label :shift_professional_performer_id, t(:Professional)+": " %><br />
49
          <%= f.collection_select :shift_professional_performer_id_eq, [],
50
51
            :id, :name, {:include_blank => "Todos"}, {:class => "search-field"} %>
        </div>
52

53
54
55
56
57
58
59
        <div class="field-h col s12 m6 l3">
          <%= f.label :service_place_id_eq, t(:service_place) %><br />
          <%= f.collection_select :service_place_id_eq, [], :id,
                :name,{ :include_blank => "Todos" },
                { :class => "search-field" } %>
        </div>

60
        <div class="field-h col s12 m6 l3">
61
          <%= f.label :escala_tipo_atendimento_id, t(:service_type)+": " %><br />
62
          <%= f.collection_select :shift_service_type_id_eq, [],
63
64
            :id, :description, {:include_blank => "Todos"}, {:class => "search-field"} %>
        </div>
65

66

67
        <div class="field-h col s12 m6 l3">
68
          <%= f.label :situation_id, t(:Situation)+": " %><br />
69
70
71
72
          <%= f.collection_select :situation_id_eq, @situations, :id, 
                :description, {:include_blank => "Todos"}, 
                {:class => "search-field"} %>
        </div>
73
      </div>
74

75
      <div class="actions">
76
77
78
        <%= f.button t(:Search), :class => " waves-effect btn" %>
        <%= f.button t(:Report), :class => " waves-effect btn", :name => "relatorio_atendimentos" %>
        <%= button_tag t(:clear_fields), :id => "reset_btn", :class => "waves-effect btn-flat", :type => "button" %>
79
      </div>
80

81
82
      <% end %>
    </div>
83

84
85
86
    <div id="tabela_schedules_service">
      <%= render "tabela_schedules_service" %>
    </div>
87
  </div>
88
</div>