- if match.command('add-task'):
- goal_id = int(match.args()[1])
- new = ' '.join(match.args()[2:])
- result = Data().add_task(goal_id=goal_id, name=new)
- goal,tasks = Data().get_goal(goal_id)
- results = pretty_print(goal, tasks)
- return results
- # return [f'Added task with id {result}']
-
- if match.command('add-vision'):
- new = ' '.join(match.args()[1:])
- result = Data().add_vision(new)
- return [f'Vision added with id {result}']
-
- if match.command('print'):
- goal_id = int(match.args()[1])
- logger.debug(f'Searching for goal {goal_id}...')
- goal,tasks = Data().get_goal(goal_id)
- results = pretty_print(goal, tasks)
+ # Now print the list for the assigned store
+ items = Data().get_shopping_list(store_id)
+ results = ['Shopping List']
+ for item in items:
+ results.append(str(item))