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

Le conseiller peut consulter les scores Cléa dans un onglet différent dans l'export détaillé #1805

Conversation

Marionvel
Copy link

No description provided.

@Marionvel Marionvel force-pushed the EVA-257-le-conseiller-peut-consulter-les-scores-clea-dans-un-onglet-different-dans-lexport-detaille-2 branch 2 times, most recently from 9fc6ccc to 2e85fac Compare January 6, 2025 16:49
@Marionvel Marionvel force-pushed the EVA-257-le-conseiller-peut-consulter-les-scores-clea-dans-un-onglet-different-dans-lexport-detaille-2 branch from a70cdf4 to 3dc2c94 Compare January 7, 2025 09:49
Comment on lines 4 to 22
class CreationSheetXls
def initialize(titre, entetes, workbook)
@titre = titre
@entetes = entetes
@workbook = workbook
end

def initialise_sheet
@sheet = @workbook.create_worksheet(name: @titre)
format_premiere_ligne = Spreadsheet::Format.new(weight: :bold, border: :none)
@sheet.row(0).default_format = format_premiere_ligne
@entetes.each_with_index do |entete, colonne|
@sheet[0, colonne] = entete[:titre]
@sheet.column(colonne).width = entete[:taille]
end

@sheet
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
class CreationSheetXls
def initialize(titre, entetes, workbook)
@titre = titre
@entetes = entetes
@workbook = workbook
end
def initialise_sheet
@sheet = @workbook.create_worksheet(name: @titre)
format_premiere_ligne = Spreadsheet::Format.new(weight: :bold, border: :none)
@sheet.row(0).default_format = format_premiere_ligne
@entetes.each_with_index do |entete, colonne|
@sheet[0, colonne] = entete[:titre]
@sheet.column(colonne).width = entete[:taille]
end
@sheet
end
end
class Worksheet
attribute_reader :sheet
def initialize(titre, entetes, workbook)
@titre = titre
@entetes = entetes
@workbook = workbook
@sheet = @workbook.create_worksheet(name: @titre)
format_premiere_ligne = Spreadsheet::Format.new(weight: :bold, border: :none)
@sheet.row(0).default_format = format_premiere_ligne
@entetes.each_with_index do |entete, colonne|
@sheet[0, colonne] = entete[:titre]
@sheet.column(colonne).width = entete[:taille]
end
end
end

def retourne_le_contenu_du_xls
file_contents = StringIO.new
@sheet.workbook.write file_contents
file_contents.string
end

def cree_worksheet_donnees
ImportExport::CreationSheetXls.new(WORKSHEET, @entetes, @workbook).initialise_sheet
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ImportExport::CreationSheetXls.new(WORKSHEET, @entetes, @workbook).initialise_sheet
onlget = ImportExport::Onglet.new(WORKSHEET, @workbook)
onglet.remplis_entete @entetes
onglet.worksheet

end

def cree_worksheet_synthese
ImportExport::CreationSheetXls.new(WORKSHEET_SYNTHESE, @entetes, @workbook).initialise_sheet
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ImportExport::CreationSheetXls.new(WORKSHEET_SYNTHESE, @entetes, @workbook).initialise_sheet
onglet = ImportExport::Onglet.new(WORKSHEET_SYNTHESE, @workbook)
onglet.remplis_entete @entetes
onglet.worksheet

@Marionvel Marionvel force-pushed the EVA-257-le-conseiller-peut-consulter-les-scores-clea-dans-un-onglet-different-dans-lexport-detaille-2 branch from 3dc2c94 to f6a8057 Compare January 7, 2025 11:02
Marion Velard added 4 commits January 7, 2025 12:07
… l'onglet "Synthese"

Et supprime ces informations de l'onglet "Donnees"
…ns deux tableaux differents sur le meme onglet synthese
…s domaine

afin d'avoir le recap dans l'onglet synthese de l'export
@Marionvel Marionvel force-pushed the EVA-257-le-conseiller-peut-consulter-les-scores-clea-dans-un-onglet-different-dans-lexport-detaille-2 branch from 64bcce9 to cd2ddb1 Compare January 7, 2025 11:07
@cprodhomme cprodhomme merged commit 0a947cf into develop Jan 7, 2025
5 checks passed
@cprodhomme cprodhomme deleted the EVA-257-le-conseiller-peut-consulter-les-scores-clea-dans-un-onglet-different-dans-lexport-detaille-2 branch January 7, 2025 12:19
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