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

Inactivating vendors #4949

Open
2 tasks
cielf opened this issue Jan 26, 2025 · 6 comments · May be fixed by #5051
Open
2 tasks

Inactivating vendors #4949

cielf opened this issue Jan 26, 2025 · 6 comments · May be fixed by #5051

Comments

@cielf
Copy link
Collaborator

cielf commented Jan 26, 2025

Summary

Provide the ability to deactivate (and restore) vendors

Why?

Some of our banks have been using the system for over 5 years. Over time, vendors go out of business, and it would be nice to be able to hide the defunct ones. Reduce new bank staff error.

Details

We already provide deactivation/reactivation for many of our models. See Item as a model.
Provide the ability, for bank admin access only, to deactivate vendors.
This will be on the Community | Vendors page

If the vendor has no purchases associated with it (for discussion: edge case - someone enters a purchase with the vendor, then deletes it. Would that be a problem) and never has, allow to have the vendor deleted instead.
When a user selects deactivation or deletion, they must confirm their choice.

When vendor is deactivated, it doesn't appear in the vendor drop-down in new/edit purchase.

Add a "include inactive" filter for vendors. There is currently no filter on the vendors page, so you'll need to build that in, following the pattern on Items.

if a vendor is inactive, provide a "restore" button beside it in the vendor index. Pushing this invokes a confirmation window, then on user assent, sets the status of the vendor back to active.

You'll need a migration too, the default setting for the active flag will be true.

Priority

Per stakeholders, not high priority, but would be nice for keeping things tidy

Criteria for completion

  • Behaviour as described above
  • tests to support above behavioiur
@jorgedjr21
Copy link
Contributor

Hey @cielf, I’d like to take on this feature. Regarding the edge case (a vendor having had purchases that were later deleted), should I focus on implementing the inactivation functionality first, and defer the full delete feature for a later phase?

@cielf
Copy link
Collaborator Author

cielf commented Jan 29, 2025

If you want to break it into two PRs, that's great. Note on the PR that it's a partial fix.

@github-actions github-actions bot removed the Help Wanted Groomed + open to all! label Jan 29, 2025
@jorgedjr21
Copy link
Contributor

Hey @cielf sorry to bother you, but can you look at the PR when you have time?

@cielf
Copy link
Collaborator Author

cielf commented Feb 4, 2025

Yup. It's on my list already. We're all volunteers here, so it can take days.

@jorgedjr21 jorgedjr21 linked a pull request Mar 1, 2025 that will close this issue
Copy link
Contributor

github-actions bot commented Mar 7, 2025

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

@github-actions github-actions bot added the stale label Mar 7, 2025
@cielf
Copy link
Collaborator Author

cielf commented Mar 7, 2025

This is in the review process.

@cielf cielf removed the stale label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants