Created
June 9, 2020 21:41
-
-
Save eserna27/b12f9e7cb0d5d33151a7d7ff4c55c564 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- users.each do |user| | |
%div(data-controller="collapse") | |
%tr(class= "#{user}") | |
-# Usuario | |
%td | |
= user.full_name | |
%br | |
%small= user.email | |
-# Fecha | |
%td(data-sort="#{user.first_intention_registered_at.to_i}") | |
= l user.first_intention_registered_at, format: :short_with_year | |
-#Monto | |
%td= number_to_currency user.first_intention_amount | |
-#Correo Prospecto | |
%td | |
- if user.first_intention_created_via_api? | |
%span.text-info | |
Via API | |
- elsif user.was_prospectus_opened? | |
%span.text-success | |
%span.glyphicon.glyphicon-ok(aria-hidden="true") | |
Abierto | |
- elsif user.was_prospectus_sent? | |
- if user.is_prospectus_untrackable? | |
%span.text-info(data-toggle="tooltip" title="No tracking: Este correo fue enviado antes de medir aperturas.") | |
Enviado | |
%small (nt) | |
- else | |
%span.text-info Enviado | |
- else | |
= link_to "Enviar", admin_project_user_prospectuses_path(slug, user.id), | |
class: "btn btn-xs btn-primary js-send-prospectus", | |
disabled: !user.has_send_prospectus_enabled?, | |
method: :post, | |
remote: true, | |
data: { loading_text: "Enviando..." } | |
-#Invertido | |
%td | |
- if user.has_investments? | |
%span.text | |
= number_to_currency user.total_investments_amount | |
- else | |
%span.text | |
No tiene inversiones | |
-#Pagado | |
%td | |
- if user.has_payments? | |
%span.text | |
= number_to_currency user.total_amount_of_payments | |
- else | |
%span.text | |
No ha recibido pagos | |
-#Telefonos | |
%td | |
%p(data-action="click->collapse#toggle") | |
Mostrar numeros | |
%tr.dn(data-target="collapse.content") | |
%td{:colspan => "5", :style => "padding: 0; border: none"} | |
#collapse_content.collapse{:style => "padding: 1rem"} | |
- if user.users_phones.any? | |
%span | |
- user.users_phones.each do |phone| | |
- if phone.phone_type == "mobile" | |
%span{:style => "padding: 1rem"} | |
.glyphicon.glyphicon-phone{"aria-hidden" => "true"} | |
%span.text-info | |
= phone.number | |
- if phone.phone_type == "home" | |
%span{:style => "padding: 1rem"} | |
.glyphicon.glyphicon-home{"aria-hidden" => "true"} | |
%span.text-info | |
= phone.number | |
- if phone.phone_type == "work" | |
%span{:style => "padding: 1rem"} | |
.glyphicon.glyphicon-briefcase{"aria-hidden" => "true"} | |
%span.text-info | |
= phone.number | |
- else | |
%span.text-info Usuario sin telefonos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment