Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

procorbin
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@damienlethiec damienlethiec left a 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)
Copy link
Collaborator

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

Copy link
Collaborator Author

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 },
Copy link
Collaborator

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

Copy link
Collaborator Author

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]),
Copy link
Collaborator

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 ?

Copy link
Collaborator Author

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| %>
Copy link
Collaborator

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

Copy link
Collaborator Author

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)

Copy link
Collaborator

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

Copy link
Collaborator Author

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 ?

Copy link
Collaborator

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 ?

Copy link
Collaborator Author

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| %>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pareil ici @extra_fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants