show.html.erb 3.87 KB
Newer Older
1 2
<div class="card">
  <div class="card-content">
3
    <h2 class="card-title"> <%= t(:dependant_information) %>:</h2>
4 5 6
        <%= image_tag(@dependant.citizen.photo.url(:medium),:alt => @dependant.citizen.name) %>

    <p>
7
      <b><%= t(:Name) %>:</b>
8 9 10 11
      <%= @dependant.citizen.name %>
    </p>

    <p>
12
      <b><%= t(:sus_number) %>:</b>
13 14 15 16 17 18 19 20
      <% if @dependant.citizen.sus_number != "" %>
        <%= @dependant.citizen.sus_number %>
      <% else %>
        Não informado
      <% end %>
    </p>

    <p>
21
      <b><%= t(:cpf) %>:</b>
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
      <% if @dependant.citizen.cpf != "" %>
        <%= @dependant.citizen.cpf %>
      <% else %>
        Não informado
      <% end %>
    </p>

    <p>
      <b>RG:</b>
      <% if @dependant.citizen.rg != "" %>
        <%= @dependant.citizen.rg %>
      <% else %>
        Não informado
      <% end %>
    </p>

    <p>
39
      <b><%= t(:birth_date) %>:</b>
40 41 42 43 44 45 46 47 48 49 50 51 52
      <%= @dependant.citizen.birth_date.strftime("%d/%m/%Y") %>
    </p>

    <% if @dependant.citizen.pcd %>
      <% if !@dependant.citizen.pcd.empty? %>
        <p>
          <b>Deficiência:</b>
            <%= @dependant.citizen.pcd %>
        </p>
      <% end %>
    <% end %>

    <p>
53
      <b><%= t(:phone1) %>:</b>
54 55 56 57 58 59 60 61
      <% if @dependant.citizen.phone1 != "" %>
        <%= @dependant.citizen.phone1 %>
      <% else %>
        Não informado
      <% end %>
    </p>

    <p>
62
      <b><%= t(:phone2) %>:</b>
63 64 65 66 67 68 69
      <% if @dependant.citizen.phone2 != "" %>
        <%= @dependant.citizen.phone2 %>
      <% else %>
        Não informado
      <% end %>
    </p>

70
    <p>
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
      <b>E-mail:</b>
      <% if @dependant.citizen.email != "" %>
        <%= @dependant.citizen.email %>
      <% else %>
        Não informado
      <% end %>
    </p>


    <p>
      <b>CEP:</b>
      <% if @dependant.citizen.cep != "" %>
        <%= @dependant.citizen.cep %>
      <% else %>
        Não informado
      <% end %>
    </p>

    <p>
90
      <b><%= t(:state) %>:</b>
91 92 93 94 95 96 97 98 99 100
        <% if @dependant.citizen.city %>
          <% unless @dependant.citizen.city.state.nil? %>
            <%= @dependant.citizen.city.state.name %>
          <% end %>
        <% else %>
          Não informado
        <% end %>
    </p>

    <p>
101
      <b><%= t(:city) %>:</b>
102 103 104 105 106 107 108 109
        <% if @dependant.citizen.city %>
            <%= @dependant.citizen.city.name %>
        <% else %>
          Não informado
        <% end %>
    </p>

    <p>
110
      <b><%= t(:neighborhood) %>:</b>
111 112 113 114 115 116 117 118
      <% if @dependant.citizen.neighborhood %>
        <%= @dependant.citizen.neighborhood %>
      <% else %>
          Não informado
      <% end %>
    </p>

    <p>
119
      <b><%= t(:address_street) %>:</b>
120 121 122 123 124
      <% if @dependant.citizen.address_street %>
        <%= @dependant.citizen.address_street %>
      <% else %>
          Não informado
      <% end %>
125
    </p>
126 127

    <p>
128
      <b><%= t(:address_number) %> do endereço:</b>
129 130 131 132
      <% if @dependant.citizen.address_number != "" %>
        <%= @dependant.citizen.address_number %>
      <% else %>
          Não informado
133
      <% end %>
134 135 136
    </p>

    <p>
137
      <b><%= t(:address_complement) %> do endereço:</b>
138 139 140 141 142 143 144 145 146
      <% if @dependant.citizen.address_complement != "" %>
        <%= @dependant.citizen.address_complement %>
      <% else %>
          Não informado
      <% end %>
    </p>

    <% if @dependant.citizen.note != "" %>
      <p>
147
        <b><%= t(:Note) %>:</b>
148 149
          <%= @dependant.citizen.note %>
      </p>
150
    <% end %>
151 152 153
  </div>
  <div class="card-action">
    <% if can_edit?(@responsible) %>
154
      <%= link_to t(:Edit), edit_dependant_path(@dependant.id) , :class => 'btn waves-effect right' %>
155
      <% if @currentProfessionalServicePlace != nil %>
156
        <%= link_to t(:remove_dependant), promote_dependant_path(@dependant.id) , :class => 'btn waves-effect right btn-remove' %>
157
      <% end %>
158
    <% end %>
159

160
    <%= link_to 'Voltar', dependants_path, :class => 'back-bt waves-effect btn-flat' %>
161
  </div>
162
</div>