-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
: UI to manage Order::NotificationMethod
#1562
Conversation
app/components/svg_component.rb
Outdated
@@ -6,6 +6,7 @@ class SvgComponent < ApplicationComponent | |||
gear: :gear, | |||
map: :map, | |||
receipt_percent: :receipt_percent, | |||
letter: :receipt_percent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a better SVG than the receipt one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see now, it's notification via email. Hm maybe the open_letter icon works better than.
Maybe we should also change the Order Notifications
text to a clearer Order Email Notifications
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's notifications via email... for now; but if you check the Order
Notifications
and History we do have plans to include at the very least Square Point of Sale; and maybe even SMS!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I love the bell!
parent :marketplace_order_notification_methods, order_notification_method.marketplace | ||
link t("marketplace.order_notification_methods.edit.link_to", contact_location: order_notification_method.contact_location) | ||
order_notification_method.marketplace.location(child: :order_notification_methods) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One day we will not have to define crumbs because we have made them so consistent that we can just infer wht the crumb should be...
ONE DAY....
def edit_button | ||
super(title: t("marketplace.order_notification_methods.edit.link_to", contact_location: contact_location), | ||
href: order_notification_method.location(:edit)) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if #edit_button
, #edit_button?
, #destroy_button
, and #destroy_button?
could be part of a RecordComponent
or something so we don't have to define them every time.
app/furniture/marketplace/order_notification_methods_controller.rb
Outdated
Show resolved
Hide resolved
Marketplace
: UI to manage OrderNotificationMethod
Marketplace
: UI to manage OrderNotificationMethod
Marketplace
: UI to manage OrderNotificationMethod
Marketplace
: UI to manage Order::NotificationMethod
|
end.tap do |order_notification_method| | ||
authorize(order_notification_method) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this could be replaced across almost all our controllers with decent_exposure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆒 TIL
155996c
to
36545a7
Compare
df841cc
to
46052e0
Compare
In an ideal world; we would not need nearly this much ceremony to sprout the CRUD UI for a new model. We would need to define the I'm not sure if it's prudent for me to do that now-right-now; but I am very tempted to take a refactor pass because basic CRUD should not require 300 lines of code :-p. |
36545a7
to
1a9fe75
Compare
8568bce
to
97ff810
Compare
97ff810
to
621b907
Compare
621b907
to
29f34bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
- #1511 🧹 `Marketplace`: Move into `Order::NotificationMethod` (#1564) The top-level `marketplace` namespace is getting pretty cluttered, and since this relates pretty squarely to the `Order` domain, and there is already an `Order::PlacedMailer` and `Order::ReceivedMailer` it seemed like a reasonable place to put it. 🥗 Request specs for `Order::NotificationMethods`
Co-authored-by: KellyAH <[email protected]>
Interestingly enough, to `button` method pointed out a problem with putting the `Order::NotificationMethod`, in that the *routing* to the `notification_methods` is not in the `order`; which was causing the inferred translation lookup to go squiggly. I took the hint and pulled it out of the `Order` namespace.
fc1429b
to
0995f7c
Compare
def change | ||
create_table :marketplace_order_notification_methods, id: :uuid do |t| | ||
create_table :marketplace_notification_methods, id: :uuid do |t| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 I did a silly
Marketplace
: ManagingOrder::NotificationMethod
s #1511This is basically a copy-paste from
Marketplace::DeliveryArea
, so it is ripe for testing via thedelivery_area_request_spec.rb
TODO:
:letter
iconWrite a Component specWrite a system spec to add, update, and then destroy anOrderNotificationMethod
After