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

Feat: items_with_timers/1 -> items_with_timers/2 (list_cid) #423

Closed
3 tasks done
Tracked by #165
nelsonic opened this issue Sep 15, 2023 · 1 comment
Closed
3 tasks done
Tracked by #165

Feat: items_with_timers/1 -> items_with_timers/2 (list_cid) #423

nelsonic opened this issue Sep 15, 2023 · 1 comment
Assignees
Labels
chore a tedious but necessary task often paying technical debt elixir Pull requests that update Elixir code enhancement New feature or enhancement of existing functionality priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T1h Time Estimate 1 Hour technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

nelsonic commented Sep 15, 2023

At present the route for the /lists on the #165 PR is currently:

resources "/lists", ListController, except: [:show]

i.e: there is no "page" to :show the list.
There is no function in the controller for displaying the list.
However we planned ahead for this when introducing lists...
The items_with_timers/1 function currently

  def items_with_timers(person_id \\ 0) do
    all_list = App.List.get_all_list_for_person(person_id)
    seq = App.List.get_list_seq(all_list)

    ...

https://github.com/dwyl/mvp/blob/b8aee0e3c29d0cb45025595131248c08fbbf6a31/lib/app/item.ex#L216C7-L218

We need to update the function to accept a list_cid as the second parameter.
and lookup the list using get_list_by_cid!/1
Then we can filter the items based on the list.seq.

Todo

  • Add list_cid argument to items_with_timers/1 to make it items_with_timers/2
    • if list_cid is nil then default to the "all" list.
  • Create items_with_timers/2 test with a different list_cid.
@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality technical A technical issue that requires understanding of the code, infrastructure or dependencies priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished chore a tedious but necessary task often paying technical debt T1h Time Estimate 1 Hour elixir Pull requests that update Elixir code labels Sep 15, 2023
@nelsonic nelsonic added this to More ToDo ThanCanEver Be Done in Nelson's List via automation Sep 15, 2023
@nelsonic nelsonic self-assigned this Sep 15, 2023
nelsonic added a commit that referenced this issue Sep 16, 2023
@nelsonic
Copy link
Member Author

Included in: #165 :shipit:

@nelsonic nelsonic moved this from More ToDo ThanCanEver Be Done to Done in Nelson's List Sep 16, 2023
@nelsonic nelsonic mentioned this issue Sep 16, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore a tedious but necessary task often paying technical debt elixir Pull requests that update Elixir code enhancement New feature or enhancement of existing functionality priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T1h Time Estimate 1 Hour technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Nelson's List
  
Done
Status: Done
Development

No branches or pull requests

1 participant