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

πŸ₯”βœ¨ Marketplace: Removing DeliveryAreas #2014

Open
6 of 7 tasks
Tracked by #1136
zspencer opened this issue Dec 10, 2023 · 1 comment
Open
6 of 7 tasks
Tracked by #1136

πŸ₯”βœ¨ Marketplace: Removing DeliveryAreas #2014

zspencer opened this issue Dec 10, 2023 · 1 comment
Assignees

Comments

@zspencer
Copy link
Member

zspencer commented Dec 10, 2023

For delivery areas that are associated with an order, we would ideally have a way to "archive" that delivery area, so that it no longer shows up as an option for customers.
@anaulin - #2013 (comment)

I think adding adding an Archive (or Deactivate?) feature to DeliveryArea that clears Carts with the DeliveryArea is a great next step; and then if an Archived DeliveryArea has no Orders then we let it be deleted.
@zspencer - #2013 (comment)

  • DeliveryArea without Orders may be Removed
  • DeliveryArea with `Orders may not be Removed
  • Removing DeliveryArea without Orders and with Carts disassociates the Cart from the DeliveryArea
  • DeliveryArea may be #archived, even if they have Orders
  • Archiving DeliveryAreas dissaociates Carts from the DeliveryArea
  • :archived DeliveryAreas may be #restored

Bugs

@zspencer zspencer changed the title Distributor archives DeliveryArea Marketplace: Archiving DeliveryAreas Dec 10, 2023
@zspencer zspencer changed the title Marketplace: Archiving DeliveryAreas ✨ Marketplace: Archiving DeliveryAreas Dec 10, 2023
@zspencer zspencer changed the title ✨ Marketplace: Archiving DeliveryAreas ✨ Marketplace: Removing DeliveryAreas Dec 10, 2023
@anaulin
Copy link
Member

anaulin commented Dec 11, 2023

FWIW, I'veΒ not hated using this gem for "archiving" or other soft-deleting: https://github.com/jhawthorn/discard

@zspencer zspencer changed the title ✨ Marketplace: Removing DeliveryAreas πŸ₯”βœ¨ Marketplace: Removing DeliveryAreas Dec 12, 2023
zspencer added a commit that referenced this issue Dec 12, 2023
- #2014

This adds the `discard` gem so that we can archive objects. It also
updates the workflow for removing DeliveryArea to have an `Archive` step
first.

Once a `DeliveryArea` is archived, it can not yet be restored; but it
can be removed if there are no `Orders` associated with the
`DeliveryArea`
zspencer added a commit that referenced this issue Dec 13, 2023
- #2014

This adds the `discard` gem so that we can archive objects. It also
updates the workflow for removing DeliveryArea to have an `Archive` step
first.

Once a `DeliveryArea` is archived, it can not yet be restored; but it
can be removed if there are no `Orders` associated with the
`DeliveryArea`
zspencer added a commit that referenced this issue Dec 13, 2023
* πŸ₯”βœ¨ `Marketplace`: `DeliveryAreas` may be `Archived`

- #2014

This adds the `discard` gem so that we can archive objects. It also
updates the workflow for removing DeliveryArea to have an `Archive` step
first.

Once a `DeliveryArea` is archived, it can not yet be restored; but it
can be removed if there are no `Orders` associated with the
`DeliveryArea`

* 🧹 `Marketplace`: `DeliveryArea` Strip TurboStreams (#2026)

Now that we have a better idea how to use TurboFrames, the Streams seem
pretty unnecessary.

This also makes it so following links within the
`Marketplace::ManagementComponent` update the browser URL.

* ✨ `Marketplace`: Put Archived `DeliveryAreas` behind the `Archive` link (#2027)

* 🧹 `Marketplace`: `DeliveryArea` Strip TurboStreams

Now that we have a better idea how to use TurboFrames, the Streams seem
pretty unnecessary.

This also makes it so following links within the
`Marketplace::ManagementComponent` update the browser URL.

* ✨ `Marketplace`: Put Archived DeliveryAreas behind the `Archive` link

* One-line disable

Co-authored-by: Ana Ulin <[email protected]>

* whitespace is hard

Co-authored-by: Ana Ulin <[email protected]>

* don't not

Co-authored-by: Ana Ulin <[email protected]>

* Better words

* Pull discardability/destroyability up to the Model

* Fix system test

---------

Co-authored-by: Ana Ulin <[email protected]>
zspencer added a commit that referenced this issue Dec 28, 2023
- #2014
- #2023

This allows a `Product` and `DeliveryArea` to be Restored; and also
makes their forms look the same.
zspencer added a commit that referenced this issue Dec 28, 2023
- #2014
- #2023

This allows a `Product` and `DeliveryArea` to be Restored; and also
makes their forms look the same.
zspencer added a commit that referenced this issue Jan 4, 2024
- #2014
- #2023

This allows a `Product` and `DeliveryArea` to be Restored; and also
makes their forms look the same.
@rosschapman rosschapman self-assigned this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants