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

Add the ability for admins to bookmark/save orders #4489

Merged
merged 21 commits into from
Jul 18, 2024

Conversation

vladimir-8
Copy link
Contributor

@vladimir-8 vladimir-8 commented Jul 4, 2024

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

Screenshot 2024-07-05 at 14 13 38

Added: Dispatch; 'Store' page: Add a page with the list of saved orders; no 3 in #4331

Screenshot 2024-07-05 at 14 13 42

Screenshot 2024-07-05 at 14 13 48

@vladimir-8 vladimir-8 changed the title Feature/4331 saved orders "Saved orders" Jul 5, 2024
@Paul-Eraman-CoopCycle Paul-Eraman-CoopCycle linked an issue Jul 8, 2024 that may be closed by this pull request
@vladimir-8 vladimir-8 marked this pull request as ready for review July 9, 2024 16:24
Copy link
Member

@Atala Atala left a 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!

src/Controller/Utils/StoreTrait.php Show resolved Hide resolved
@@ -46,6 +46,10 @@ public function denormalize($data, $class, $format = null, array $context = arra
unset($item['address']['telephone']);
}

if (isset($item['tags'])) {
Copy link
Member

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 ?

Copy link
Contributor Author

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

->andWhere('tag.slug = :tagName')
->setParameter('store', $store)
->setParameter('orderResourceType', 'AppBundle\Entity\Sylius\Order')
->setParameter('tagName', '__bookmark')
Copy link
Member

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 }}
Copy link
Member

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?

Copy link
Contributor Author

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

@@ -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
Copy link
Member

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

@vladimir-8 vladimir-8 requested a review from Atala July 15, 2024 05:05
@Atala Atala changed the title "Saved orders" Add the ability for admins to bookmark/save orders Jul 18, 2024
@Atala Atala merged commit e10f329 into master Jul 18, 2024
5 of 6 checks passed
@Atala Atala deleted the feature/4331-saved-orders branch July 18, 2024 09:59
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

Successfully merging this pull request may close these issues.

Introduce Saved orders page
2 participants