Skip to content

Commit

Permalink
Version 1.57 (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
NomisNostab authored Jun 16, 2024
2 parents fb6b073 + 68fe6ea commit e76ef1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Topo/Services/MilestoneService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public async Task<List<MilestoneSummaryListModel>> GetMilestoneSummaries(string
bool milestone1Awarded = false;
bool milestone2Awarded = false;
bool milestone3Awarded = false;
bool milestone1Skipped = false;
bool milestone2Skipped = false;
bool milestone1Skipped = true;
bool milestone2Skipped = true;
bool milestone3Skipped = false;
int currentLevel = 1;
foreach (var milestoneResult in memberMilestones.results.Where(r => r.section == _storageService.Section).OrderBy(r => r.achievement_meta.stage))
Expand All @@ -51,12 +51,16 @@ public async Task<List<MilestoneSummaryListModel>> GetMilestoneSummaries(string
milestone2 = milestoneResult;
milestone2Awarded = milestone2.status == "awarded";
milestone2Skipped = milestone2.status == "not_required";
currentLevel = (milestone1Awarded || milestone1Skipped) ? 2 : 1;
currentLevel = (milestone1Awarded || milestone1Skipped) && (milestone2Awarded || milestone2Skipped) ? 3 : currentLevel;
break;
case 3:
milestone3 = milestoneResult;
milestone3Awarded = milestone3.status == "awarded";
milestone3Skipped = milestone3.status == "not_required";
currentLevel = (milestone1Awarded || milestone1Skipped) ? 2 : 1;
currentLevel = (milestone1Awarded || milestone1Skipped) && (milestone2Awarded || milestone2Skipped) ? 3 : currentLevel;
currentLevel = (milestone1Awarded || milestone1Skipped) && (milestone2Awarded || milestone2Skipped) && (milestone3Awarded || milestone3Skipped) ? 3 : currentLevel;
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Topo/Services/StorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ public bool IsYouthMember
}
}

public string Version = "1.56";
public string Version = "1.57";
}
}

0 comments on commit e76ef1f

Please sign in to comment.