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

[Admin] Create new Store Credit Reasons #5820

Merged

Conversation

MadelineCollier
Copy link
Contributor

Summary

This PR is for this issue but it doesn't have an issue ID yet as the issue is still in draft. The update functionality will follow in a second PR to keep things small and easy to review.

This PR migrates the creation of new store credit reasons to the new admin interface, following the existing pattern used for tax categories and refund reasons.

The form is rendered via a modal dialog on the store credit reasons list by leveraging Turbo frames. Successful creation leads to a turbo stream page refresh, which updates the existing list preserving the query params and the scroll position, for a consistent UX.

The attached video shows the functionality visually:

Screen.Recording.2024-08-12.at.4.40.01.PM.mov

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@MadelineCollier MadelineCollier force-pushed the admin-new-store-credit-reaon branch from 1c828b8 to edb5533 Compare August 12, 2024 15:32
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.76%. Comparing base (8da6c2a) to head (edb5533).

Files Patch % Lines
...s/solidus_admin/store_credit_reasons_controller.rb 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5820      +/-   ##
==========================================
+ Coverage   88.74%   88.76%   +0.02%     
==========================================
  Files         735      736       +1     
  Lines       17172    17201      +29     
==========================================
+ Hits        15239    15269      +30     
+ Misses       1933     1932       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MadelineCollier MadelineCollier merged commit d99aaf2 into solidusio:main Aug 13, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants