Skip to content

Commit e2b9d7b

Browse files
committed
TD-5765 Update
1 parent 87455a8 commit e2b9d7b

File tree

7 files changed

+209
-109
lines changed

7 files changed

+209
-109
lines changed

LearningHub.Nhs.WebUI/Controllers/MyLearningController.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ public async Task<IActionResult> ViewProgress(int resourceId, int resourceRefere
741741
/// </summary>
742742
/// <param name="certificateRequest">The certificateRequest.</param>
743743
/// <returns>A <see cref="Task{TResult}"/> representing the result of the asynchronous operation.</returns>
744-
[Route("mylearning/certificate")]
744+
[Route("mylearning/certificates")]
745745
[HttpGet]
746746
[HttpPost]
747747
public async Task<IActionResult> Certificates(MyLearningUserCertificatesViewModel certificateRequest = null)
@@ -776,6 +776,15 @@ public async Task<IActionResult> Certificates(MyLearningUserCertificatesViewMode
776776
break;
777777
case MyLearningFormActionTypeEnum.BasicSearch:
778778

779+
myLearningRequestModel = new MyLearningRequestModel
780+
{
781+
SearchText = certificateRequest.SearchText?.Trim(),
782+
Skip = certificateRequest.CurrentPageIndex * MyLearningPageSize,
783+
Take = MyLearningPageSize,
784+
};
785+
break;
786+
case MyLearningFormActionTypeEnum.ClearAllFilters:
787+
779788
myLearningRequestModel = new MyLearningRequestModel
780789
{
781790
SearchText = certificateRequest.SearchText?.Trim(),
@@ -846,6 +855,7 @@ public async Task<IActionResult> GetCertificateDetails(int resourceReferenceId,
846855
/// <param name="minorVersion">The minorVersion.</param>
847856
/// <param name="userId">The userId.</param>
848857
/// <returns>The <see cref="IActionResult"/>.</returns>
858+
[HttpGet]
849859
[HttpPost]
850860
[Route("mylearning/downloadcertificate")]
851861
public async Task<IActionResult> DownloadCertificate(int resourceReferenceId, int? majorVersion = 0, int? minorVersion = 0, int? userId = 0)

LearningHub.Nhs.WebUI/Models/MyLearningUserCertificatesViewModel.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using LearningHub.Nhs.Models.MyLearning;
66
using LearningHub.Nhs.Models.Paging;
77
using LearningHub.Nhs.WebUI.Models.Learning;
8+
using NHSUKViewComponents.Web.ViewModels;
89

910
/// <summary>
1011
/// Defines the <see cref="MyLearningUserCertificatesViewModel" />.
@@ -56,5 +57,28 @@ public MyLearningUserCertificatesViewModel(MyLearningRequestModel requestModel)
5657
/// Gets or sets the learning result paging.
5758
/// </summary>
5859
public PagingViewModel MyLearningPaging { get; set; }
60+
61+
/// <summary>
62+
/// sets the list of type checkboxes.
63+
/// </summary>
64+
/// <returns>The <see cref="List{CheckboxListItemViewModel}"/>.</returns>
65+
public List<CheckboxListItemViewModel> TypeFilterCheckbox()
66+
{
67+
var checkboxes = new List<CheckboxListItemViewModel>()
68+
{
69+
new CheckboxListItemViewModel("Article", "Article", null),
70+
new CheckboxListItemViewModel("Assessment", "Assessment", null),
71+
new CheckboxListItemViewModel("Audio", "Audio", null),
72+
new CheckboxListItemViewModel("Case", "Case", null),
73+
new CheckboxListItemViewModel("Elearning", "elearning", null),
74+
new CheckboxListItemViewModel("File", "File", null),
75+
new CheckboxListItemViewModel("Html", "HTML", null),
76+
new CheckboxListItemViewModel("Image", "Image", null),
77+
new CheckboxListItemViewModel("Video", "Video", null),
78+
new CheckboxListItemViewModel("Weblink", "Weblink", null),
79+
new CheckboxListItemViewModel("Courses", "Courses", null),
80+
};
81+
return checkboxes;
82+
}
5983
}
6084
}

LearningHub.Nhs.WebUI/Styles/nhsuk/pages/mylearning.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,15 @@
196196
}
197197
}
198198

199+
.nhsuk-card--radius-6 {
200+
border-radius: 6px;
201+
overflow: hidden;
202+
}
203+
204+
.nhsuk-card__heading.nhsuk-heading-m.nhsuk-font-weight-regular {
205+
font-weight: 400 !important;
206+
}
207+
199208
label {
200209
font-family: $font-stack;
201210
}

0 commit comments

Comments
 (0)