-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/fas 531 us ajustements pour la gestion des lots mono types suite aux #398
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
Open
lordinatrice
wants to merge
5
commits into
feature/fas-530-us-ajustements-pour-la-gestion-des-lots-mono-types
Choose a base branch
from
feature/fas-531-us-ajustements-pour-la-gestion-des-lots-mono-types-suite-aux
base: feature/fas-530-us-ajustements-pour-la-gestion-des-lots-mono-types
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ac8be2f
feat(lots): update i18n for buyer lot config and add form_config keys
lordinatrice bc436a3
feat(lots): add form_config wizard step and lot type helpers to prese…
lordinatrice 74a8d27
feat(lots): handle form_config step in wizard service and controller
lordinatrice f791026
feat(lots): redesign lot_config layout and create form_config view
lordinatrice 540eb72
test(lots): update cucumber and specs for new buyer wizard flow
lordinatrice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| <% content_for :title, "#{@public_market.editor.name} - #{t('buyer.public_markets.form_config.title')}" %> | ||
|
|
||
| <h1 class="fr-h1 fr-mb-1w"><%= t('buyer.public_markets.form_config.title') %></h1> | ||
| <p class="fr-text--lg fr-mb-4w"><%= t('buyer.public_markets.form_config.subtitle') %></p> | ||
|
|
||
| <%= render 'shared/notice', notice_text: t('buyer.public_markets.form_config.banner') %> | ||
|
|
||
| <div class="fr-grid-row fr-grid-row--gutters"> | ||
| <div class="fr-col-12 fr-col-md-4"> | ||
| <div class="fr-mb-3w fr-background-alt--grey" style="padding: 20px;"> | ||
| <h2 class="fr-text--md fr-text--bold" style="margin-bottom: 0.5rem;"> | ||
| <%= t('buyer.shared.market_info_title') %> | ||
| </h2> | ||
| <hr style="border: none; border-top: 1px solid var(--border-default-grey); margin: 0;"> | ||
| <%= render 'shared/sidebar_market_info', | ||
| buyer_label: t('buyer.public_markets.form_config.sidebar_buyer_label'), | ||
| market_name: @public_market.buyer_display_name, | ||
| typology_label: t('buyer.public_markets.form_config.sidebar_typology_label'), | ||
| market_types_label: @public_market.market_type_codes.any? ? @presenter.market_types_label : nil, | ||
| deadline_label: t('buyer.shared.deadline_short'), | ||
| deadline: l(@public_market.deadline, format: '%d/%m/%Y %H:%M') %> | ||
| </div> | ||
|
|
||
| <div class="fr-background-alt--grey" style="padding: 20px;"> | ||
| <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem;"> | ||
| <h2 class="fr-text--md fr-text--bold" style="margin: 0;"> | ||
| <%= t('buyer.public_markets.form_config.lots_section_title') %> | ||
| </h2> | ||
| <%= link_to step_buyer_public_market_path(identifier: @public_market.identifier, id: :lot_config), | ||
| class: 'fr-btn fr-btn--tertiary-no-outline fr-btn--sm fr-icon-edit-line', | ||
| title: t('buyer.public_markets.form_config.edit_lots_label'), | ||
| aria: { label: t('buyer.public_markets.form_config.edit_lots_label') } do %> | ||
| <% end %> | ||
| </div> | ||
| <hr style="border: none; border-top: 1px solid var(--border-default-grey); margin: 0 0 0.75rem 0;"> | ||
| <div style="display: flex; flex-wrap: wrap; gap: 0.5rem;"> | ||
| <% @presenter.lots_for_config.each do |lot| %> | ||
| <span class="fr-tag fr-tag--sm"> | ||
| <% type_label = @presenter.lot_effective_type_label(lot) %> | ||
| <%= type_label ? "#{lot.name} - #{type_label.downcase}" : lot.name %> | ||
| </span> | ||
| <% end %> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="fr-col-12 fr-col-md-8"> | ||
| <div class="fr-background-alt--grey fr-p-4w fr-mb-3w"> | ||
| <div class="fr-mb-2w" style="display: flex; gap: 0.5rem; flex-wrap: wrap;"> | ||
| <% @presenter.lots_by_effective_type.each do |market_type, type_lots| %> | ||
| <% if market_type %> | ||
| <span class="fr-tag fr-tag--sm"> | ||
| <%= t("market_types.#{market_type.code}", default: market_type.code.humanize) %> | ||
| </span> | ||
| <% end %> | ||
| <span class="fr-tag fr-tag--sm"> | ||
| <%= t('buyer.public_markets.form_config.lots_count', count: type_lots.size) %> | ||
| </span> | ||
| <% end %> | ||
| </div> | ||
|
|
||
| <h2 class="fr-h5 fr-mb-3w"><%= t('buyer.public_markets.form_config.form_block_title') %></h2> | ||
|
|
||
| <%= form_with url: wizard_path, method: :put, local: true, data: { turbo: false } do |_form| %> | ||
| <div style="display: flex; justify-content: flex-end;"> | ||
| <button type="submit" class="fr-btn fr-icon-arrow-right-line fr-btn--icon-right"> | ||
| <%= t('buyer.public_markets.form_config.configure_button') %> | ||
| </button> | ||
| </div> | ||
| <% end %> | ||
| </div> | ||
|
|
||
| <button type="button" | ||
| class="fr-btn fr-btn--secondary fr-icon-arrow-right-line fr-btn--icon-right" | ||
| style="width: 100%; justify-content: center;" | ||
| disabled> | ||
| <%= t('buyer.public_markets.form_config.transmit_button') %> | ||
| </button> | ||
| </div> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 me demande si on ne peut pas faire un truc un peu plus smart. C'est pas du tgout un sujet related à cette PR mais j'ai quand même le sentiment qu'on empile des exceptions et qu'en fait il y a une norme qui se dessine que l'on devrait exploiter pour refacto le bouzin.