code4romania / code4romania/website-factory
[Partners] Partner's logos are positioned by last edited and not position
- Dominant language
- PHP
- Stars
- 26
- Forks
- 18
- Avg merge
- 1m
- Merged PRs (30d)
- 14
Description
**Describe the bug**
When adding a partner logo, the user can specify a position (the position in the list). The logos are positioned in the order of the last edit.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to `/admin/partners` logged in as an admin
2. Add three partners, with positions 1, 3, and 2 (in order of creation)
3. Open the front page and look at the logos
4. **The logos are positioned in the order they were added (1, 3, 2)**
5. Return to the menu and edit the first logo (modify website, name, etc.)
6. Open the front page and look at the logos
7. **The logos are positioned in the order they were last edited (3, 1, 2)**
**Expected behavior**
The logos should always be positioned in the order of their position.
Logos **without a position** should be placed after the logos with a specified position in the last edited order.
**Screenshots**
Expected order: Code4, CT911, Commit
Actual order: Code4, Commit, CT911 (in the order they were last edited)
**Additional context**
Related to #431
Contributor guide
Assessment
This issue has not been assessed yet.