codeforbtv / cvoeo-app

The "Money on My Mind" app helps CVOEO's Reach-Up clients stay on track with their personal finance coaching.
Apache License 2.0
11 stars 4 forks source link

Consolidate goal statuses #115

Open doub1ejack opened 5 years ago

doub1ejack commented 5 years ago

Currently there are a few different goal properties that appear to give boolean representations of different types of statuses (completed, requiresReview, submittedForReview, etc). It looks like we can probably simplify the goal object by consolidating these into a single status with different values.

This relates to @jfenner's comment on #87:

Proposing a change to the way goals are stored in the firebase database. Currently a goal is either in progress (open) or complete based on the "complete" field.

I'm proposing removing the "complete" field and adding a "status" field with possible values of "open", "submitted", or "complete". This will expand so we can have a submitted status and make the goal stateful.

jfenner commented 4 years ago

Steps to implement this:

1) Update the users->(uid)->goals->(goal id) collection to add the "status" field which will have the options of "open", "submitted", "complete".

2) Modify the application use that field instead of the individual boolean fields

3) Remove the "completed", "submittedForReview", and "requiresReview" fields.