Skip to content

Commit

Permalink
Suppression des 'TODO' de 'establishment_facade'
Browse files Browse the repository at this point in the history
  • Loading branch information
tnicolas1 committed Nov 7, 2024
1 parent b89355a commit d7d1741
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions app/facades/establishment_facade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,31 @@ def initialize(establishment, school_year)
@school_year = school_year
end

# TODO: Ajouter la condition sur l'année scolaire
def schoolings_count
@schoolings_count ||= selected_classes.joins(:schoolings).count
end

# TODO: Ajouter la condition sur l'année scolaire
def attributive_decisions_count
@attributive_decisions_count ||= selected_classes
.joins(:schoolings)
.merge(Schooling.with_attributive_decisions)
.count
end

# TODO: Ajouter la condition sur l'année scolaire
def without_attributive_decisions_count
@without_attributive_decisions_count ||= selected_classes
.joins(:schoolings)
.merge(Schooling.without_attributive_decisions)
.count
end

# TODO: Ajouter la condition sur l'année scolaire
def students_count
@students_count ||= selected_classes
.joins(:students)
.distinct(:"students.id")
.count(:"students.id")
end

# TODO: Ajouter la condition sur l'année scolaire
def ribs_count
@ribs_count ||= selected_classes
.joins(students: :ribs)
Expand All @@ -62,7 +57,6 @@ def pfmps_counts
.index_with { |state| pfmps.in_state(state).count }
end

# TODO: Ajouter la condition sur l'année scolaire
def payment_requests_counts
@payment_requests_counts ||= STATES_GROUPS_FOR_COUNTS.to_h do |states|
count = states.map { |state| payment_requests_all_status_counts[state] }.compact.sum
Expand All @@ -72,7 +66,6 @@ def payment_requests_counts

private

# TODO: Ajouter la condition sur l'année scolaire
def payment_requests_all_status_counts
@payment_requests_all_status_counts ||=
selected_payment_requests
Expand Down

0 comments on commit d7d1741

Please sign in to comment.