Skip to content

Commit

Permalink
Version 1.56 (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
NomisNostab authored May 24, 2024
2 parents de98f9a + 5058f06 commit fb6b073
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Model/Progress/ProgressDetailsPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class ProgressDetailsPageViewModel
public Stats Stats { get; set; } = new Stats();
public List<SIASummary> SIASummaries { get; set; } = new List<SIASummary>();
public PeakAward PeakAward { get; set; } = new PeakAward();
public string? DisableOAS { get; set; }
public string? DisableCoreOAS { get; set; }
}

public class MilestoneSummary
Expand Down
4 changes: 4 additions & 0 deletions Topo/Controller/ProgressDetailsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ protected override async Task OnInitializedAsync()

model = await _progressService.GetProgressDetailsPageViewModel(MemberId);
model.GroupName = _storageService.GroupNameDisplay;
model.DisableOAS = model.OASSummaries.Where(o => o.Awarded == DateTime.MinValue).Count() == 0 ? "disable" : null;
model.DisableCoreOAS = model.OASSummaries
.Where(o => o.Stream == "bushcraft" || o.Stream == "bushwalking" || o.Stream == "camping")
.Where(o => o.Awarded == DateTime.MinValue).Count() == 0 ? "disable" : null;
}

internal async Task ProgressPdfClick()
Expand Down
16 changes: 8 additions & 8 deletions Topo/Pages/Progress/Details.razor
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,13 @@
<div class="col-sm-2">
<button type="submit" name="button" @onclick="ProgressPdfClick" class="btn btn-primary">Progress Report (pdf)</button>
</div>
<div class="col-sm-2">
<button type="submit" name="button" @onclick="StartedCoreOasPdfClick" class="btn btn-primary">Core OAS (pdf)</button>
<div class="col-sm-3">
<button type="submit" name="button" @onclick="StartedCoreOasPdfClick" class="btn btn-primary" disabled="@model.DisableCoreOAS">Core OAS started (pdf)</button>
</div>
<div class="col-sm-2">
<button type="submit" name="button" @onclick="StartedOasPdfClick" class="btn btn-primary">OAS (pdf)</button>
<button type="submit" name="button" @onclick="StartedOasPdfClick" class="btn btn-primary" disabled="@model.DisableOAS">OAS started (pdf)</button>
</div>
<div class="col-sm-4">
<div class="col-sm-3">
</div>
</div>
<div class="mt-3 mb-3 row">
Expand All @@ -421,13 +421,13 @@
<div class="col-sm-2">
<button type="submit" name="button" @onclick="ProgressXlsxClick" class="btn btn-success">Progress Report (xlsx)</button>
</div>
<div class="col-sm-2">
<button type="submit" name="button" @onclick="StartedCoreOasXlsxClick" class="btn btn-success">Core OAS (xlsx)</button>
<div class="col-sm-3">
<button type="submit" name="button" @onclick="StartedCoreOasXlsxClick" class="btn btn-success" disabled="@model.DisableCoreOAS">Core OAS started (xlsx)</button>
</div>
<div class="col-sm-2">
<button type="submit" name="button" @onclick="StartedOasXlsxClick" class="btn btn-success">OAS (xlsx)</button>
<button type="submit" name="button" @onclick="StartedOasXlsxClick" class="btn btn-success" disabled="@model.DisableOAS">OAS started (xlsx)</button>
</div>
<div class="col-sm-4">
<div class="col-sm-3">
</div>
</div>

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.55";
public string Version = "1.56";
}
}

0 comments on commit fb6b073

Please sign in to comment.