-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSJ-949 : Change filter on output audience table #1107
base: develop
Are you sure you want to change the base?
MSJ-949 : Change filter on output audience table #1107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quelques premières remarques ;)
@@ -6,15 +6,14 @@ class BexController < ApplicationController | |||
|
|||
def agenda_jap | |||
authorize Appointment | |||
get_jap_agendas(@appointment_type, params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si tu ne l'utilises plus tu dois pouvoir supprimer la méthode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, je vais la supprimer
@@ -12,7 +12,7 @@ | |||
<% end %> | |||
<%= button_to t('print_button'), agenda_jap_path(format: :pdf), | |||
method: :get, | |||
params: { date: @selected_day, month: params[:month], agenda_id: params[:agenda_id] }, | |||
params: { date: params[:date], agenda_id: @agenda.id, place_id: @place.id }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attention, l'app pète quand @agenda est nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, oui. J'ai oublié un test.
@@ -26,116 +26,109 @@ | |||
<%= form_tag agenda_jap_path, method: 'post' do %> | |||
<div class="bex-form-input-wrapper"> | |||
<%= label_tag 'month', 'Mois :' %> | |||
<%= select_tag :month, options_for_select(formated_month_for_select(six_next_months), params[:month]), | |||
<%= select_tag :date, options_for_select(formated_month_for_select(six_next_months), params[:date]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi appeler ce champs "date" alors que tu parles de mois ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oui, effectivement. Je me suis inspiré de app/views/bex/agenda_spip.html.erb ligne 21. J'ai changé le label mais pas la variable
@@ -26,13 +29,13 @@ | |||
<div class='bex-agenda-header-title bex-agenda-column'> | |||
<%= t('bex.jap.header_role') %> | |||
</div> | |||
<% agenda.organization&.extra_fields_for_agenda&.related_to_sap&.each do |extra_field| %> | |||
<% @agenda.organization&.extra_fields_for_agenda&.related_to_sap&.each do |extra_field| %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu as accès à @extra_fields ici il me semble
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans agenda_jap du controlleur je n'ai pas ajouté @extra_fields, j'ai juste ajouté le @ devant cette ligne existante (comme c'était fait avant)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu as ça ligne 11 : @extra_fields = @agenda&.organization&.extra_fields_for_agenda&.includes(:appointment_types)&.related_to_sap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment itérer sur extra_fields en ligne 32 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne comprends pas ta question je crois. Tu ne peux pas faire @extra_fields.each
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, oui. Ben ok, tout simplement, effectivement
@@ -65,7 +68,7 @@ | |||
<% end %> | |||
<% end %> | |||
</div> | |||
<% agenda.organization.extra_fields_for_agenda&.related_to_sap&.each do |extra_field| %> | |||
<% @agenda.organization.extra_fields_for_agenda&.related_to_sap&.each do |extra_field| %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pareil ici @extra_fields
No description provided.