refactor: remove unused individual prenom / nom load
because of bb236f6c0d
This commit is contained in:
parent
7f6fd9712b
commit
fe0a396dc6
1 changed files with 2 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class DossierProjectionService
|
class DossierProjectionService
|
||||||
class DossierProjection < Struct.new(:dossier_id, :state, :archived, :hidden_by_user_at, :hidden_by_administration_at, :hidden_by_reason, :for_tiers, :prenom, :nom, :batch_operation_id, :sva_svr_decision_on, :corrections, :columns) do
|
class DossierProjection < Struct.new(:dossier_id, :state, :archived, :hidden_by_user_at, :hidden_by_administration_at, :hidden_by_reason, :for_tiers, :batch_operation_id, :sva_svr_decision_on, :corrections, :columns) do
|
||||||
def pending_correction?
|
def pending_correction?
|
||||||
return false if corrections.blank?
|
return false if corrections.blank?
|
||||||
|
|
||||||
|
@ -58,12 +58,10 @@ class DossierProjectionService
|
||||||
hidden_by_administration_at_field = { TABLE => 'self', COLUMN => 'hidden_by_administration_at' }
|
hidden_by_administration_at_field = { TABLE => 'self', COLUMN => 'hidden_by_administration_at' }
|
||||||
hidden_by_reason_field = { TABLE => 'self', COLUMN => 'hidden_by_reason' }
|
hidden_by_reason_field = { TABLE => 'self', COLUMN => 'hidden_by_reason' }
|
||||||
for_tiers_field = { TABLE => 'self', COLUMN => 'for_tiers' }
|
for_tiers_field = { TABLE => 'self', COLUMN => 'for_tiers' }
|
||||||
individual_first_name = { TABLE => 'individual', COLUMN => 'prenom' }
|
|
||||||
individual_last_name = { TABLE => 'individual', COLUMN => 'nom' }
|
|
||||||
sva_svr_decision_on_field = { TABLE => 'self', COLUMN => 'sva_svr_decision_on' }
|
sva_svr_decision_on_field = { TABLE => 'self', COLUMN => 'sva_svr_decision_on' }
|
||||||
dossier_corrections = { TABLE => 'dossier_corrections', COLUMN => 'resolved_at' }
|
dossier_corrections = { TABLE => 'dossier_corrections', COLUMN => 'resolved_at' }
|
||||||
|
|
||||||
([state_field, archived_field, sva_svr_decision_on_field, hidden_by_user_at_field, hidden_by_administration_at_field, hidden_by_reason_field, for_tiers_field, individual_first_name, individual_last_name, batch_operation_field, dossier_corrections] + fields)
|
([state_field, archived_field, sva_svr_decision_on_field, hidden_by_user_at_field, hidden_by_administration_at_field, hidden_by_reason_field, for_tiers_field, batch_operation_field, dossier_corrections] + fields)
|
||||||
.each { |f| f[:id_value_h] = {} }
|
.each { |f| f[:id_value_h] = {} }
|
||||||
.group_by { |f| f[TABLE] } # one query per table
|
.group_by { |f| f[TABLE] } # one query per table
|
||||||
.each do |table, fields|
|
.each do |table, fields|
|
||||||
|
@ -182,8 +180,6 @@ class DossierProjectionService
|
||||||
hidden_by_administration_at_field[:id_value_h][dossier_id],
|
hidden_by_administration_at_field[:id_value_h][dossier_id],
|
||||||
hidden_by_reason_field[:id_value_h][dossier_id],
|
hidden_by_reason_field[:id_value_h][dossier_id],
|
||||||
for_tiers_field[:id_value_h][dossier_id],
|
for_tiers_field[:id_value_h][dossier_id],
|
||||||
individual_first_name[:id_value_h][dossier_id],
|
|
||||||
individual_last_name[:id_value_h][dossier_id],
|
|
||||||
batch_operation_field[:id_value_h][dossier_id],
|
batch_operation_field[:id_value_h][dossier_id],
|
||||||
sva_svr_decision_on_field[:id_value_h][dossier_id],
|
sva_svr_decision_on_field[:id_value_h][dossier_id],
|
||||||
dossier_corrections[:id_value_h][dossier_id],
|
dossier_corrections[:id_value_h][dossier_id],
|
||||||
|
|
Loading…
Reference in a new issue