-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add the ability for admins to bookmark/save orders #4489
Conversation
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.
hello,
regarding the design and the use of tags to store the "bookmarked" info, I am not 100% sure it is the best solution; it feels kind of hacky to me - but maybe it is! ^^ it would have been worth it to discuss it has a team I think. but let s go this way if we need to get this out fast!
It didnt work for me the first try but after that it worked all the time so... I guess it is good.
I think regarding the UI/UX and the way we want people to use this feature, I think we should improve a little bit on the display so pple understand and it is more widely used:
- explain what the bookmark is for (help text)
- on an existing order the "duplicate order" button should be more visible. like in an action bar or something
- we should add the functionality to duplicate order in the list view (both orders and saved orders)
these are just some thoughts that can change!
@@ -46,6 +46,10 @@ public function denormalize($data, $class, $format = null, array $context = arra | |||
unset($item['address']['telephone']); | |||
} | |||
|
|||
if (isset($item['tags'])) { |
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.
is the code related to the issue of the PR ? or to another issue ?
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.
Some tests started to fail after I added types in TaggableTrait: protected array $tags = [];
so I parse the string into an array explicitly here
src/Controller/Utils/StoreTrait.php
Outdated
->andWhere('tag.slug = :tagName') | ||
->setParameter('store', $store) | ||
->setParameter('orderResourceType', 'AppBundle\Entity\Sylius\Order') | ||
->setParameter('tagName', '__bookmark') |
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.
add orderBy Id DESC so it is ordered from newest to latest ?
@@ -51,6 +51,11 @@ | |||
{{ 'stores.deliveries'|trans }} | |||
</a> | |||
</li> | |||
<li role="presentation"> | |||
<a href="{{ path('admin_store_deliveries_bookmarks', { id: store.id }) }}"> | |||
{{ 'stores.deliveries.bookmarks'|trans }} |
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.
would that be possible to add a small help text?
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.
Added an empty state message. Will check on content with Vincent next week
translations/messages.en.yml
Outdated
@@ -1284,6 +1285,7 @@ adminDashboard.nonprofits.confirm_delete: Are you sure you want to delete this n | |||
order.cart.donation.disclaimer: We offer you to donate %percentage% of the revenue from your order to one of our partner associations. You will not pay more. | |||
form.checkout_address.nonprofit.placeholder: Choose your favorite nonprofit | |||
form.delivery.arbitrary_price.label: Define the price manually | |||
form.delivery.bookmark.label: Bookmark |
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.
Don't forget to add french, spanish, italian, german translations at least! - we use chatgpt to do that with Antoine
This reverts commit c41c203
Added: Dispatch; 'Delivery' page: Add save order option to right side hand of local commerce web page orders (only for Dispatch); no 2 in #4331
Added: Dispatch; 'Store' page: Add a page with the list of saved orders; no 3 in #4331