-
Notifications
You must be signed in to change notification settings - Fork 0
How Privacy Notices were added to WebApp
Lydia Gray edited this page May 24, 2018
·
1 revision
- Add PrivacyNotice to _factories (see snapshot below)
- Create PrivacyNoticeFactory in ContentFactory
- Initialise global variable for MarkdownWrapper
- Create constructor
- Create virtual Build method of type ProcessedPrivacyNotice taking in a PrivacyNotice
- Create variables for fields that require converting to markdown
- Set each variable to _markdownWrapper.ConvertToHtml passing in the appropriate fields from the privacyNotice
- Initialise processedPrivacyNotice to a new ProcessedPrivacyNotice passing in each field from the privacyNotice OR the html converted variable set in the previous step (see snapshot below)
- Return processedPrivacyNotice
- Create PrivacyNoticeController in Controllers, and inherit from Controller
- Initialise global variable for IProcessedContentRepository
- Create constructor and inject its dependencies
- Add [HttpGet] and route attributes
- Create async Task method passing in a slug
- Initialise result to await Get on the repository (passing in slug)
- If result is not successful, return result
- Initialise privacyNotice to the content of result as a ProcessedPrivacyNotice
- Return View passing in privacyNotice
- Create PrivacyNotice in Models
- Get/set for all properties
- Create empty constructor
- Create constructor with all properties
- Create ProcessedPrivacyNotice in ProcessedModels
- Get/set for all properties
- Create empty constructor
- Create constructor with all properties
- Add “privacy-notices/” to UrlGenerator (see snapshot below)
- Create folder PrivacyNotice in Views/stockportgov
- Create file Detail in PrivacyNotice folder
- Add view as required