-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cart in socket #32
Cart in socket #32
Conversation
Bumps [phoenix_live_dashboard](https://github.com/phoenixframework/phoenix_live_dashboard) from 0.8.1 to 0.8.2. - [Release notes](https://github.com/phoenixframework/phoenix_live_dashboard/releases) - [Changelog](https://github.com/phoenixframework/phoenix_live_dashboard/blob/main/CHANGELOG.md) - [Commits](phoenixframework/phoenix_live_dashboard@v0.8.1...v0.8.2) --- updated-dependencies: - dependency-name: phoenix_live_dashboard dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [swoosh](https://github.com/swoosh/swoosh) from 1.11.6 to 1.12.0. - [Release notes](https://github.com/swoosh/swoosh/releases) - [Changelog](https://github.com/swoosh/swoosh/blob/main/CHANGELOG.md) - [Commits](swoosh/swoosh@v1.11.6...v1.12.0) --- updated-dependencies: - dependency-name: swoosh dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [credo](https://github.com/rrrene/credo) from 1.7.0 to 1.7.1. - [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md) - [Commits](https://github.com/rrrene/credo/commits) --- updated-dependencies: - dependency-name: credo dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bump swoosh from 1.11.6 to 1.12.0
Bump credo from 1.7.0 to 1.7.1
…hboard-0.8.2 Bump phoenix_live_dashboard from 0.8.1 to 0.8.2
Bumps [phoenix_html](https://github.com/phoenixframework/phoenix_html) from 3.3.2 to 3.3.3. - [Changelog](https://github.com/phoenixframework/phoenix_html/blob/main/CHANGELOG.md) - [Commits](phoenixframework/phoenix_html@v3.3.2...v3.3.3) --- updated-dependencies: - dependency-name: phoenix_html dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [excoveralls](https://github.com/parroty/excoveralls) from 0.17.1 to 0.18.0. - [Release notes](https://github.com/parroty/excoveralls/releases) - [Changelog](https://github.com/parroty/excoveralls/blob/master/CHANGELOG.md) - [Commits](parroty/excoveralls@v0.17.1...v0.18.0) --- updated-dependencies: - dependency-name: excoveralls dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [phoenix_live_view](https://github.com/phoenixframework/phoenix_live_view) from 0.19.5 to 0.20.1. - [Changelog](https://github.com/phoenixframework/phoenix_live_view/blob/main/CHANGELOG.md) - [Commits](phoenixframework/phoenix_live_view@v0.19.5...v0.20.1) --- updated-dependencies: - dependency-name: phoenix_live_view dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [phoenix](https://github.com/phoenixframework/phoenix) from 1.7.7 to 1.7.9. - [Release notes](https://github.com/phoenixframework/phoenix/releases) - [Changelog](https://github.com/phoenixframework/phoenix/blob/main/CHANGELOG.md) - [Commits](phoenixframework/phoenix@v1.7.7...v1.7.9) --- updated-dependencies: - dependency-name: phoenix dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [floki](https://github.com/philss/floki) from 0.34.3 to 0.35.0. - [Release notes](https://github.com/philss/floki/releases) - [Changelog](https://github.com/philss/floki/blob/main/CHANGELOG.md) - [Commits](philss/floki@v0.34.3...v0.35.0) --- updated-dependencies: - dependency-name: floki dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
def handle_event("add_to_cart", %{"id" => id}, socket) do | ||
ticket_type = | ||
id | ||
|> String.to_integer() |
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.
you do not need to convert the id to an integer here. Repo.get will still succeed
if Enum.member?(socket.assigns.cart, ticket_type) do | ||
{:noreply, | ||
socket | ||
|> put_flash(:error, "Ticket already in cart")} |
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 this what should happen if the ticket is already added to cart? 🤔 In this scenario shouldn't we increment the quantity of the ticket?
<p> | ||
<p | ||
phx-value-page_state="cart" | ||
phx-click="change_page_state" |
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.
what is this event meant to do? I suggest you name it differently because its a bit confusing
Bump floki from 0.34.3 to 0.35.0
Bump phoenix from 1.7.7 to 1.7.9
…w-0.20.1 Bump phoenix_live_view from 0.19.5 to 0.20.1
Bump excoveralls from 0.17.1 to 0.18.0
Bump phoenix_html from 3.3.2 to 3.3.3
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.
Let's make the main
branch our branch out for other branches.
I see this one branching out from style-home-with-event-and-ticket-details
Bumps [dialyxir](https://github.com/jeremyjh/dialyxir) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/jeremyjh/dialyxir/releases) - [Changelog](https://github.com/jeremyjh/dialyxir/blob/master/CHANGELOG.md) - [Commits](jeremyjh/dialyxir@1.4.1...1.4.2) --- updated-dependencies: - dependency-name: dialyxir dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [floki](https://github.com/philss/floki) from 0.35.0 to 0.35.1. - [Release notes](https://github.com/philss/floki/releases) - [Changelog](https://github.com/philss/floki/blob/main/CHANGELOG.md) - [Commits](philss/floki@v0.35.0...v0.35.1) --- updated-dependencies: - dependency-name: floki dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Hey @okothkongo , I did this as I needed the material from |
It is my suggestion that we refrain from progressing with work until it has undergone a thorough review and been merged into the main branch. This approach ensures that our codebase consistently meets our quality standards before it becomes a part of the main codebase. To facilitate this, we could designate a specific task, such as 'style-home-with-event-and-ticket-details,' as a blocker for other work. This way, we have a clear and standardized process for handling code changes. Maintaining a single source of truth, which in our case is the 'main' branch, is essential to prevent confusion and maintain order within our project. I believe that by adopting this approach, we can enhance collaboration and streamline our development process. |
…t-details Style home with event and ticket details
Bump floki from 0.35.0 to 0.35.1
Bump dialyxir from 1.4.1 to 1.4.2
Bumps [floki](https://github.com/philss/floki) from 0.35.1 to 0.35.2. - [Release notes](https://github.com/philss/floki/releases) - [Changelog](https://github.com/philss/floki/blob/main/CHANGELOG.md) - [Commits](philss/floki@v0.35.1...v0.35.2) --- updated-dependencies: - dependency-name: floki dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [phoenix_live_dashboard](https://github.com/phoenixframework/phoenix_live_dashboard) from 0.8.2 to 0.8.3. - [Release notes](https://github.com/phoenixframework/phoenix_live_dashboard/releases) - [Changelog](https://github.com/phoenixframework/phoenix_live_dashboard/blob/main/CHANGELOG.md) - [Commits](phoenixframework/phoenix_live_dashboard@v0.8.2...v0.8.3) --- updated-dependencies: - dependency-name: phoenix_live_dashboard dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bump floki from 0.35.1 to 0.35.2
…hboard-0.8.3 Bump phoenix_live_dashboard from 0.8.2 to 0.8.3
…onfAfrica into cart-in-socket
Notes for the reviewer
I have worked on adding items in the cart using the socket to avoid interacting with the db
GIF (for features)
Screen.Recording.2023-10-18.at.05.07.45.mov