-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
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.
7717ba2
to
4385f44
Compare
<.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> |
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.
Right now this shows the exact address of the Task. Is this what we want?
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.
- 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
@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) |
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.
typo
32bcfee
to
b6a72ab
Compare
- 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.
7e1bab8
to
5f3ca19
Compare
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.
🎉
Closes #140. Commits are atomic and go into more detail.
CleanShot.2023-12-11.at.19.32.52-converted.mp4