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

Manage basket addition from Alias #382 #1021

Merged
merged 14 commits into from
Feb 26, 2024
Merged

Manage basket addition from Alias #382 #1021

merged 14 commits into from
Feb 26, 2024

Conversation

ithiame
Copy link
Contributor

@ithiame ithiame commented Feb 21, 2024

Manage basket addition from Alias #382

@coyotte508
Copy link
Collaborator

Let's just edit the /cart page to add this fields for admin / POS (maybe add a <h2>Admin only</h2> section)

Rather than creating a whole new admin page

@Tirodem
Copy link
Contributor

Tirodem commented Feb 21, 2024

Feedbacks made on Discord

Copy link
Collaborator

@coyotte508 coyotte508 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM as it is, if current version is ok with @Tirodem , ok to merge (after applying suggestions)

src/routes/(app)/product/[id]/+page.server.ts Outdated Show resolved Hide resolved
src/routes/(app)/product/[id]/+page.server.ts Outdated Show resolved Hide resolved
@Tirodem
Copy link
Contributor

Tirodem commented Feb 25, 2024

Unless I missed something, not OK with this version.
I saw that the alias fill input is now on /cart for employees only, why not (probably better than a dedicated page).
But errors are still not processed on front (max order, non-existing alias, etc).
Even with error, the employee must stay in /cart page.

@coyotte508
Copy link
Collaborator

coyotte508 commented Feb 25, 2024

Need to customize use:enhance ⬆️ @ithiame

as mentioned in #1021 (comment)

@ithiame
Copy link
Contributor Author

ithiame commented Feb 26, 2024

image

return;
}
await invalidate(UrlDependency.Cart);
document.body.scrollIntoView();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm not sure about this one, this scrolls up.

It was necessary when adding to cart in case to show the popup. But there's no popup

Copy link
Collaborator

@coyotte508 coyotte508 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for me (after removing body.scrollIntoView())

If code works for @Tirodem

@Tirodem
Copy link
Contributor

Tirodem commented Feb 26, 2024

OK for me.
Functional warning : if you're not a POS seat but an employee, this configuration will forbid you to add the cart through alias.
image
But let's go with this PR as it is, being POS or not will be a future topic ( #1049 )

@Tirodem Tirodem merged commit 46596ff into main Feb 26, 2024
2 checks passed
@Tirodem Tirodem deleted the basket-alias branch February 26, 2024 16:26
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.

3 participants