-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧹
Marketplace
: Re-use DeliveryExpectationsComponent
So, this brings all the places we render examples for delivery communications together and handles some more cases that we were not yet handling. It's not great, but it should fix the red `main`
- Loading branch information
Showing
5 changed files
with
24 additions
and
16 deletions.
There are no files selected for viewing
18 changes: 11 additions & 7 deletions
18
app/furniture/marketplace/cart/delivery_expectations_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<%- if cart.marketplace.order_by.present? && cart.marketplace.delivery_window.present? %> | ||
Orders placed <%= cart.marketplace.order_by %> | ||
are delivered <%= cart.marketplace.delivery_window %> | ||
<%- elsif cart.marketplace.order_by.blank? && cart.marketplace.delivery_window.present? %> | ||
Orders are delivered <%= cart.marketplace.delivery_window %> | ||
<%- elsif cart.delivery_window.present? && cart.marketplace.order_by.present? %> | ||
Place orders <%= cart.marketplace.order_by %> to ensure an on-time delivery for <%= render(cart.delivery_window) %> | ||
<%- if order_by.present? && delivery_window.present? %> | ||
Orders placed <%= order_by %> | ||
are delivered <%= delivery_window %> | ||
<%- elsif order_by.blank? && delivery_window.present? %> | ||
Orders are delivered <%= delivery_window %> | ||
<%- elsif order_by.present? && delivery_window.blank? && cart.delivery_window.blank? %> | ||
Order <%= order_by %> | ||
<%- elsif cart.delivery_window.present? && order_by.present? %> | ||
Order <%= order_by %> to ensure an on-time delivery for <%= render(cart.delivery_window) %> | ||
<%- elsif cart.delivery_window.present? %> | ||
Delivering at <%= render(cart.delivery_window) %> | ||
<%- else %> | ||
Delivers at your chosen time | ||
<%- end %> |
7 changes: 5 additions & 2 deletions
7
app/furniture/marketplace/cart/delivery_expectations_component.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters