ita-social-projects / ita-social-projects/StreetCode_Client
[Admin/ArtGallery] Both new and previous art are saved after template is edited
- Dominant language
- TypeScript
- Stars
- 15
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Environment: macOS 13.6.1/Google Chrome 125.0.6422.77
Reproducible: always
**Description:**
When editing a template and saving changes, both the newly added art and the previous art are saved, instead of only the updated selection. Additionally, an error occurs when attempting to edit the template again.
**Preconditions:**
- The user is logged in as an admin on the "Новий стріткод" page.
- The "Арт-галерея" section is navigated to.
- A couple of images have been added to the "Арт-галерея".
**Steps to reproduce:**
1. Click the "Обрати шаблон" button and choose a template
2. Add images from the "Арт-галерея" to the chosen template
3. Save the template by clicking the "Додати" button
4. Click the Cogwheel icon next to the newly created template and select "Редагувати"
5. Replace at least one image in the template with another from the "Арт-галерея"
6. Save the edited template by clicking the "Додати" button
7. Check the main template view to verify the saved changes
**Expected result:**
When the user edits the template and clicks the ‘Додати’ button, the new art is saved without error.
**Actual result:**
When the user edits the template and clicks the ‘Додати’ button, both the new and previous art are saved.
When the user clicks on the "Редагувати" button, an error occurs.
User story: #127
Test case: https://github.com/orgs/ita-social-projects/projects/21/views/1?pane=issue&itemId=66890486
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.