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

140 - Rider campaign signup #263

Merged
merged 8 commits into from
Jan 5, 2024
Merged

Conversation

teesloane
Copy link
Contributor

Closes #140. Commits are atomic and go into more detail.

CleanShot.2023-12-11.at.19.32.52-converted.mp4

We'll need three new routes:

- an "index" for showing campaigns to signup for (like the existing
campaigns view for dispatchers)
- a "show" for showing what tasks are available to signup for for a
single campaign.
- a "rider_signup" for the form component for the rider signing up.
We will need to use this function from the rider signup view for riders
to be able to unassign themselves.

The "current_user" only has a "rider_id", which would require us to
preload the rider or fetch the current_user's rider in
order to use this function in its current state.

Since the query only makes use of the rider's id, we can just pass that.
A more efficient query for determining how many
tasks exist per campaign, and how many of them are open (as opposed to
preloading tasks on all campaigns).
This view is responsible for showing riders a list of campaigns which
will have varying CTA's depending on how full they are.
@teesloane teesloane force-pushed the 140-rider-campaign-signup-pt-1 branch from 7717ba2 to 4385f44 Compare December 12, 2023 01:14
<.get_delivery_size task={task}/>
</:col>
<:col :let={task} label="Recipient"><%= task.dropoff_name %></:col>
<:col :let={task} label="Dropoff Location"><%= task.dropoff_location.address %></:col>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now this shows the exact address of the Task. Is this what we want?

@teesloane teesloane changed the title [140] - Rider campaign signup 140 - Rider campaign signup Dec 21, 2023
Copy link
Member

@mveytsman mveytsman left a comment

Choose a reason for hiding this comment

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

  • When singing up, riders shouldn't see exact location of the task
    • Switch to showing neighbourhood or abstracted location
  • bug about navigating via "back button" when rider signs up for themselves
  • leave a note on campaign_signup_live/index.ex about the database fetching
  • "Campaign Filled" should be no colour?
  • Remove rider signup form - so just click and it does it.
  • Remove "capacity" and "pickup window" from rider signup form
    • Maybe remove enter buildings
  • consider adding a rider setting that enables people to choose how much of their PI is shown when singing up
    • nick name, full name, etc

lib/bike_brigade/delivery.ex Outdated Show resolved Hide resolved
@impl Phoenix.LiveView
def handle_info({event, entity}, socket) when event in @broadcasted_infos do
campaign = socket.assigns.campaign
# if a task or a campaign rider changes (ie, if any of hte broadcasted_infos)
Copy link
Member

Choose a reason for hiding this comment

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

typo

@teesloane teesloane force-pushed the 140-rider-campaign-signup-pt-1 branch from 32bcfee to b6a72ab Compare January 2, 2024 20:52
- Munge Fix sql query output
- Text:: don't do week in seconds.
- Fix: hide exact task delivery on signup
- Add: note about over-querying db.
- Switch "Campaign filled" button to :secondary color.
- Fix typo.
- Fix: use replace with patch for rider signup links.
@teesloane teesloane force-pushed the 140-rider-campaign-signup-pt-1 branch from 7e1bab8 to 5f3ca19 Compare January 5, 2024 19:40
Copy link
Member

@mveytsman mveytsman left a comment

Choose a reason for hiding this comment

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

🎉

@teesloane teesloane merged commit 12f5a07 into main Jan 5, 2024
1 check passed
@teesloane teesloane deleted the 140-rider-campaign-signup-pt-1 branch January 5, 2024 21:53
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.

Riders sign up for a specific campaign via app
2 participants