Skip to content

Conversation

@AlexJacksonDS
Copy link
Contributor

@AlexJacksonDS AlexJacksonDS commented Aug 26, 2021

JIRA link

https://softwiretech.atlassian.net/browse/HEEDLS-563

Description

Adds a course delegates page in the delegates section of the tracking system.
This has a dropdown to select the course that is styled the same as the filter dropdowns with no javascript, so some styling will likely have to change in the future.

Note that I've implemented the 'Archived' as an item in the details list rather than a tag as it doesn't really make sense as a tag.

Screenshots

image
image
image


Developer checks

I have:

  • Run the formatter and made sure there are no IDE errors.
  • Written tests for the changes (controller, data services, services, view models etc) and manually tested my work with and without JavaScript. Full manual testing guidelines can be found here: https://softwiretech.atlassian.net/wiki/spaces/HEE/pages/6703648740/Testing
  • Updated/added documentation in Swiki and/or Readme.
  • Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing’s broken.
  • Scanned over my own MR to ensure everything is as expected.

Copy link
Contributor

@DanBloxham-sw DanBloxham-sw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small suggestions/questions.

public IEnumerable<SelectListItem> Courses { get; set; }
public bool? Active { get; set; }

public IEnumerable<SearchableCourseDelegateViewModel> Delegates { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be neater to have customisationId, Active, and Delegates live on the same nullable object, e.g. SelectedCourseDetails or something - then if there are no customisations to choose from, the data is simply null but we're forcing the CustomisationId and Active to be populated if a course does exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomisationId needs to stay on the base model as it breaks model binding otherwise

Comment on lines +6 to +9
width: 63%;

@include mq($from: $xl-desktop) {
width: 80%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are these values coming from? (63% and 80%)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching the filter dropdowns for now until 580 is done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a TODO in that case with a reference to 580?

FROM Customisations AS c
JOIN Applications AS a on a.ApplicationID = c.ApplicationID
WHERE (CentreID = @centreId OR CentreID = 0)
AND (a.CourseCategoryID = @categoryId OR @categoryId = 0)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd still prefer the categoryId to be null with no filter rather than "0" which can be ambiguous. What do you think?

Copy link
Contributor Author

@AlexJacksonDS AlexJacksonDS Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admins don't have a nullable CategoryId. I think we should keep this behaviour consistent with the AdminUser records so it doesn't cause confusion unless we want to go through and change everything.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I think in this query the "categoryId" is effectively a filter on category id, which intuitively would be:

  • Null = no filter
  • Value = filter applied

@AlexJacksonDS
Copy link
Contributor Author

New screenshots
image
image
image
image
image

Comment on lines +6 to +9
width: 63%;

@include mq($from: $xl-desktop) {
width: 80%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a TODO in that case with a reference to 580?

FROM Customisations AS c
JOIN Applications AS a on a.ApplicationID = c.ApplicationID
WHERE (CentreID = @centreId OR CentreID = 0)
AND (a.CourseCategoryID = @categoryId OR @categoryId = 0)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I think in this query the "categoryId" is effectively a filter on category id, which intuitively would be:

  • Null = no filter
  • Value = filter applied

Copy link
Contributor

@stellake stellake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@AlexJacksonDS AlexJacksonDS merged commit ad686eb into master Sep 6, 2021
@AlexJacksonDS AlexJacksonDS deleted the HEEDLS-563-course-delegates-basic branch September 6, 2021 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants