-
Notifications
You must be signed in to change notification settings - Fork 91
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
ETQ admin : je peux ordonner les labels #11237
base: main
Are you sure you want to change the base?
Conversation
cf0566f
to
ae8fbc6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11237 +/- ##
==========================================
- Coverage 84.42% 84.38% -0.04%
==========================================
Files 1199 1199
Lines 26381 26389 +8
Branches 4965 4966 +1
==========================================
- Hits 22271 22269 -2
- Misses 4110 4120 +10 ☔ View full report in Codecov by Sentry. |
cbdf9fa
to
f7e42af
Compare
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.
J'ai une contre proposition:
dans procedure.rb
, tu modifies la relation has_many :label ...
par has_many :label, -> { order(:position, :id) } ...
De cette façon, les labels seront toujours ordonnés de la mm manière mm si aucune position n'est renseignée.
Du coup, tu devrais pouvoir shooter tout le code qui remplit une position par défaut et aussi les labels.order(:position)
disséminés dans le code.
WDYT ?
f7e42af
to
e389a19
Compare
yes, bonne idée! merci ;) |
e389a19
to
737f536
Compare
issue: #11116
Résultat :
1- L'admin peut ordonner les labels :
2- Les instructeurs ont ainsi le même ordre dans :