Browse Source

Add Skipped status

pull/170/head
ariannedee 5 years ago
parent
commit
138ec31e00
2 changed files with 10 additions and 3 deletions
  1. +1
    -1
      edivorce/apps/core/templates/partials/progress_icon.html
  2. +9
    -2
      edivorce/apps/core/utils/step_completeness.py

+ 1
- 1
edivorce/apps/core/templates/partials/progress_icon.html View File

@ -1,4 +1,4 @@
{% if step_status_string == 'Started' %}<span class="progress-status"><i class="fa fa-adjust" aria-hidden="true"></i></span>
{% elif step_status_string == 'Complete' %}<span class="progress-status"><i class="fa fa-check" aria-hidden="true"></i></span>
{% elif step_status_string == 'Skipped' %}<span class="progress-status"><i class="fa fa-circle" aria-hidden="true"></i></span>
{% elif step_status_string == 'Skipped' %}<span class="progress-status"><i class="fa fa-circle-o" aria-hidden="true"></i></span>
{% endif %}

+ 9
- 2
edivorce/apps/core/utils/step_completeness.py View File

@ -38,10 +38,17 @@ def get_step_completeness(questions_by_step):
Returns {step: status}, {step: [missing_question_key]}
"""
status_dict = {}
for step, questions_dict in questions_by_step.items():
has_responses = False
reversed_steps = list(question_step_mapping.keys())[::-1]
for step in reversed_steps:
questions_dict = questions_by_step[step]
if not step_started(questions_dict):
status_dict[step] = "Not started"
if not has_responses:
status_dict[step] = "Not started"
else:
status_dict[step] = "Skipped"
else:
has_responses = True
complete = is_complete(questions_dict)
if complete:
status_dict[step] = "Complete"


Loading…
Cancel
Save