Squad3-Development Sprint 10 Part 2 merge to main (#115) * [feature/453827: Build 'Why are you cancelling this registration?' page] (#108) * Feature/463178 detail page button redirects (#97) * [feature/456967-organisation-details-page: Created initial GET endpoint, view model and view] * [feature/456967-organisation-details-page: Created English and Welsh resource files + view model now drives the view] * [feature/456967-organisation-details-page: Renamed controller, viewmodel and view to RegistrationSubmissionDetails] * [feature/456967-organisation-details-page: Controller action now takes a dynamically set guid in its Route] * [feature/456967-organisation-details-page: Minor html changes for application ref panel] * [feature/456967-organisation-details-page: Added unit tests for RegistrationSubmissionDetails] * [feature/456967-organisation-details-page: Removed code coverage attribute from view model and added more asserts in test] * [feature/456967-organisation-details-page: Created new helpers to render model properties correctly in view] * [feature/456967-organisation-details-page: Refactored enums to use localised keys in the Description attribute for Welsh translations] * [feature/456967-organisation-details-page: Created unit tests for the new helper classes] * [feature/456967-organisation-details-page: Addressed SonarCube issues and minor css addition] * Created new SCSS Component for Status Panel * Repair to display issues with the main table Fixes for the following issues: - https://dev.azure.com/defragovuk/RWD-CPR-EPR4P-ADO/_workitems/edit/458482 - Typo in Cancelled status - https://dev.azure.com/defragovuk/RWD-CPR-EPR4P-ADO/_workitems/edit/458484 - Status in Submission Status column should be in lowercase - https://dev.azure.com/defragovuk/RWD-CPR-EPR4P-ADO/_workitems/edit/458497 - Filtered results: should be removed for consistency - https://dev.azure.com/defragovuk/RWD-CPR-EPR4P-ADO/_workitems/edit/460138 - Welsh View Result table width is wrong. * Added a tag helper for org status. Brought in RegistrationSubmissionDetails model to be shared in other areas. Added test data to drive the pagination Brought in the new enums * #Added RegistrationSubmissions to the Facade Service Provided the data to be paged in the MockFacadeService class Connected the Main Facade Service endpoint for RegistrationSubmission to the mock. Added the pagination view and model Connected the front to the Core.Service for the Facade * [feature/456996-submission-details: Added initial submission details table markup] * [feature/456996-submission-details: Created a new view component for submission details and refactored view] * [feature/456996-submission-details: Created a new tag helper for the status and refactored view to use it] * [feature/456996-submission-details: Created new English and Welsh resource files to and refactored the view component to use them] * [feature/456996-submission-details: Changed account role property to use the enum + refactored resources to use the localizer] * [feature/456996-submission-details: Removed whitespaces from the view] * [feature/456996-submission-details: Addressed code smells and added date time formatting in the view] * [feature/456996-submission-details: Adding unit tests for the new tag helper + adding to existing test] * A small code-clean and test run validation and minor correction in the view this ticket pertains to Some new tests for the mock data. And corrections in the project as a whole for Sonar. Added tests for StatusTagHelper Responding to SonarCube part 1 Improved coverage of RegulatorSubmissions Controller and the primary journey data model. SonarCube dispose alert in a test....! Dispose of In a Strict Mock cause a test failure I forgot to delete a file duplicating code.... * [feature/456996-submission-details: WIP tag css] * [feature/457000-payment-details: Created payment details view component and added initial markup to the view] * [feature/457000-payment-details: View model now drives the view] * [feature/457000-payment-details: Created a payment amount tag helper] * [feature/457000-payment-details: View model now handles calculations] * [feature/456996-submission-details: Removed a whitespace to trigger a new build] * Re-added BusinessAddress back to it's correct namespace * Removed errant solution file and added to gitignore * Removed errant solution file and added to gitignore * [feature/457000-payment-details: Created unit tests for the PaymentAmountTagHelper] * [feature/457000-payment-details: Addressing SonarCube issues] * [feature/457000-payment-details: Added conditional bold logic to tag helper + added more tests] * [feature/457000-payment-details: Created English and Welsh resource files and refactored view to use them] * [feature/457000-payment-details: Removed the SubmissionPeriod property from the view model and relevant files] * [feature/457026: Build offline payment details - page view] (#76) * [feature/457026-offline-payment-details: Initial markup and POST endpoint added] * [feature/457026-offline-payment-details: WIP payment details section styling] * [feature/457026-offline-payment-details: Fixed submission details status tag alignment bug] * [feature/457026-offline-payment-details: Minor styling imporvements for responsiveness] * [feature/457026-offline-payment-details: Added a unit test for the evolving POST endpoint] * [feature/457026-offline-payment-details: Updated hint text and minor cosmetic change in the view] * [feature/457026-offline-payment-details: Added more unit tests] * [feature/457026-offline-payment-details: Addressed SonarCub Issues] * Adjusted table margins for different sizes to ensure bottom margin is consistent at all scales - this in effect makes the margin between the table and the pagination section consistent and according to design * Revert "Adjusted table margins for different sizes to ensure bottom margin is consistent at all scales - this in effect makes the margin between the table and the pagination section consistent and according to design" This reverts commit f37806d3ad3234c71527a1754944f18a816281fb. * [feature/457041: Build call to action buttons - page view] (#81) * [feature/457041-call-to-action-buttons: Added call to action buttons with conditional rendering logic + minor resource changes] * [feature/457041-call-to-action-buttons: Created a partial view for the buttons and used it in the main view] * [feature/457041-call-to-action-buttons: Created new private method for back to submissions link] * Added to SCSS to support required button layout * [feature/457041-call-to-action-buttons: Added custom styling for the query button] * [feature/457041-call-to-action-buttons: Updated unit test] --------- Co-authored-by: Julian Young <[email protected]> * Adjusted table margins for sizes (#80) * Adjusted table margins for sizes To ensure bottom margin is consistent at all scales - this in effect makes the margin between the table and the pagination section consistent and according to design at all scales * Remove errant comment * Feature/457032 comment sections (#78) * started adding comment ui elements * Added resource files for translations Converted component to view component with model * updad esource files * Added resource files for component. Update no comment to be localized * updated test * updated tests * added new test * sonat fix * renamed view model class * updates from merge * Fixing testsFeature/457032 comment sections (#82) * started adding comment ui elements * Added resource files for translations Converted component to view component with model * updad esource files * Added resource files for component. Update no comment to be localized * updated test * updated tests * added new test * sonat fix * renamed view model class * updates from merge * added missed [TestMethod] and changed test to public async Task * removed dup code * [feature/452771-redirect-to-org-details: Modified back links for both Query and Reject pages + refactored unit tests] (#84) * [feature/452771: Redirect user to org details page POST] (#85) * [feature/452771-redirect-to-org-details: Modified back links for both Query and Reject pages + refactored unit tests] * [feature/452771-redirect-to-org-details: Added omitted back link for POST endpoints + refactored unit tests] * Addition of filter UI and functionality in the Facade Service Layer. (#83) * Addition of filter UI and functionality in the Facade Service Layer. This includes extensive test-data, Error handling, logging and a working Error page. * Removed code identified in the PR. Changed the language in the Organisation Ref back to ID * [feature/456027: Add validation to offline payment section] (#86) * Added CurrencyValidation validator and it's required tests Added translations for error messages. Amended the viewmodel with the validation property and the type of the property to a string Engaged the form postback to the correct action Problems: - When the field is empty, there are 2 errors in the validation context - why? - When rendering the input field, the ViewData.ModelState.IsValid property is not false, which is should be and the input field isn't being coloured red * Updated validation rules and messages for the input field. * feature/456027-payment-validation: Refactored validation logic + amended resource keys] * [feature/456027-payment-validation: Addressed SonarCube issues] * [feature/456027-payment-validation: Added more unit tests] * Resolved merge issues from Dewvelopment --------- Co-authored-by: Julian Young <[email protected]> * Feature/463092 link registrations landing page to organisation details (#87) * Added CurrencyValidation validator and it's required tests Added translations for error messages. Amended the viewmodel with the validation property and the type of the property to a string Engaged the form postback to the correct action Problems: - When the field is empty, there are 2 errors in the validation context - why? - When rendering the input field, the ViewData.ModelState.IsValid property is not false, which is should be and the input field isn't being coloured red * Updated validation rules and messages for the input field. * feature/456027-payment-validation: Refactored validation logic + amended resource keys] * [feature/456027-payment-validation: Addressed SonarCube issues] * [feature/456027-payment-validation: Added more unit tests] * Resolved merge issues from Dewvelopment * - New data types are added at the facade layer to model the return of submission and payment information required from the backend. - Added a new method, GetRegistrationSubmissionDetails, to the Facade returning the RegistrationSubmissionOrganisationDetails data type with the new properties for submissions and payment details - Added randomised data to these new objects to support the views - Added casting operators to convert from DB model to View Model - Changed controller to fetch data from the facade and place it in the session * Adjusted colour of the Cancelled state Changed link styling on the details link Amended test data to be consistent with the forthcoming real data * Connected session to all actions * UNTESTED Added - a new Session Manager for the RegulatorJourneySession - it might be redundant - Additions to the Business Address class - New test data for the pagination tests and adjustments to suit * Amended some behaviour of Payment postback to make it more secure Amended tests to reflect new logic - sending in a Guid and getting the correct model Fixed some other tests that fail due to new functionality Added PageNotFound tests * Adjustments for Sonar warnings - string conversion and to disable warning for use of Random in a dummy data-creation code-block --------- Co-authored-by: Shehzad Ismail <[email protected]> * Bug/464620 results not found formatting issue (#92) * Corrected formatting of 'No results found' text to be emboldened. * Remove the update status filter option * Amended sort order (#91) Removed updates status from test data * Bug/offline payment validation ordering (#94) * Changed the regex to support optional comma's in the number field ! * Added EnsureTwoDecimalPlaces to PaymentDetailsViewModel * Bug/464623 ordering of submission details by status (#95) * Amended sort order Removed updates status from test data * Amended the dummy data for files for submisson details * initial branch * added data linking from detail page to reject, query and grant pages * updated tests * removed redundant code * updated comments to lower case c * updated test * Updated tests * updated reject tests * updated all reject tests * added extra unit tests for uncovered code * added additonal tests --------- Co-authored-by: Shehzad Ismail <[email protected]> Co-authored-by: Julian Young <[email protected]> Co-authored-by: Shehzad Ismail <[email protected]> * [feature/461183: Build 'Are you sure you want to submit this offline payment?' page] (#98) * [feature/461183-submit-offline-payment-confirmation: Created initial GET endpoint with relevant files/view] * [feature/461183-submit-offline-payment-confirmation: Created POST endpoint] * [feature/461183-submit-offline-payment-confirmation: Created POST now works with session data] * [feature/461183-submit-offline-payment-confirmation: WIP unit tests] * [feature/461183-submit-offline-payment-confirmation: Added more unit tests] * [feature/461183-submit-offline-payment-confirmation: Fixed failing unit test] * [feature/461183-submit-offline-payment-confirmation: Addressed accessibility issues and minor unit test enhancements] * [feature/461183-submit-offline-payment-confirmation: Added IDs to markup + new unit tests] * [feature/461183-submit-offline-payment-confirmation: Added more unit tests] * [feature/461183-submit-offline-payment-confirmation: Added more unit tests] * [feature/461183-submit-offline-payment-confirmation: Moved the Grant submission tests within the correct region] * [feature/461183-submit-offline-payment-confirmation: Addressed SonarCube issue] * [feature/461183-submit-offline-payment-confirmation: Changed from invariant culter to current culture] * 459928- Minor code changes in resource files for resource files to replace 'Submission year' with 'Relevant year' for the components:RegistrationSubmissionList.Default.cshtml and _RegistrationSubmissionsFilters.cshtml (#101) Co-authored-by: [email protected] <[email protected]> * [feature/454095: Build cancellation confirmation page] (#102) * [feature/454095-cancellation-confirmation-page: Created the GET endpoint for the page + relavant files/classes] * [feature/454095-cancellation-confirmation-page: Added unit tests] * [feature/454095-cancellation-confirmation-page: Addressed review comment for property used] * [feature/453827-cancel-registration: Created GET enpoint with the view and relevant English and Welsh resource files] * [feature/453827-cancel-registration: Cancel action button now redirects to new GET endpoint] * [feature/453827-cancel-registration: Created POST endpoint] * [feature/453827-cancel-registration: Fixed minor bugs in GET and POST of query and reject pages] * [feature/453827-cancel-registration: Created unit tests for the GET and POST actions] * [feature/453827-cancel-registration: Success notification now takes the full width] * Feature/451998 - Build 'Are you sure you want to grant this registration? page (#103) * feature implementation. WIP - Service call and negative case on service call * implement - service and model in regulator service front end core. Previous commit would have build error as the request object and the service wasn't added yet. * missed to commit * implement service not found feature in grant registration * again missed to commit :( * add tests for service not available * update message on service not available page. It may change though. Welsh rendering seems an issue. * address pr review comments * remove unnecessary check * update page title * [feature/453827-cancel-registration: POST endpoint now calls the facade service layer] * [feature/453827-cancel-registration: Added new unit tests] * [feature/453827-cancel-registration: Unit test enhancements] * address sonar q (#104) * address sonar q * address pr comment * [feature/453827-cancel-registration: DecisionRequest object now takes the cancellation reason on POST] * [feature/453827-cancel-registration: Added SubmissionId to the session object and view models + using our enum now for decision] * add submission id to regulator decision request for grant submission * [feature/453827-cancel-registration: Decision property is now a string + WIP connecting to the facade] * Added new test data to support SubmissionId (#106) * Added new test data to support SubmissionId Adjusted routes to support Submission ID and not organisation ID Changed model references to use SubmissionId Changed Views to route with submission and not organisation id * Update GrantRegistrationSubmissionViewModel.cs Amended merge error * Correct some merge issues and test changes * Updated base branch to latest changes. * [feature/453827-cancel-registration: Refactored action button for grant] * [feature/453827-cancel-registration: Changed new facade endpoint name] * refactor grant registration submission related tests * [feature/453827-cancel-registration: Minor merge issues resovled] * [feature/453827-cancel-registration: Refactor unit test to address SonarCube issue] * [feature/453827-cancel-registration: Added unit tests for FacadeService + updated appsettings with new endpoint] * [feature/453827-cancel-registration: Added ommitted BackToAllSubmissionsUrl on the Granted POST + supporting unit test] * refactored enum to send. WIP: unit test --------- Co-authored-by: johnfitzgeraldEviden <[email protected]> Co-authored-by: Julian Young <[email protected]> Co-authored-by: Prasad Ramireddy <[email protected]> Co-authored-by: [email protected] <[email protected]> Co-authored-by: karthikeviden <[email protected]> * [feature/452769: Query journey: Store query reason in database] (#109) * [feature/452769-store-query-reason: Amended POST endpoint to point to the facade service for decision submission] * [feature/452769-store-query-reason: Fixed failing unit tests] * [feature/452769-store-query-reason: Added new unit tests] * [feature/452769-store-query-reason: Minor exception message change] * Feature/452778 store reject comments (#110) * updated RejectRegistrationSubmission to save data to api * Added unit tests * 456918 Added code changes for GetRegistrationSubmissionOrganisationDetails (#111) * 456918 Added code changes for GetRegistrationSubmissionOrganisationDetails * Added more unit tests * Added more unit tests * Minor cod changes to resolve PR issues --------- Co-authored-by: [email protected] <[email protected]> * send additional params to support ref num generation in facade api for grant reg scenario (#112) * Feature/454686 submission summaries (#113) * Aligned property names in model objects. Aligned Path names to the Facade Updated list view to use the API End-2-End worked... * [feature/454686-submission-summaries: Adding unit tests] * [feature/454686-submission-summaries: Adding unit tests] * [feature/454686-submission-summaries: Adding unit tests] * [feature/454686-submission-summaries: Adding unit tests] * [feature/454686-submission-summaries: Adding unit tests] * [feature/454686-submission-summaries: Adding unit tests] * [feature/454686-submission-summaries: Fixed all failing unit tests] * [feature/454686-submission-summaries: Added a test for coverage] * refactor - enum (RegistrationStatus) & property name - WIP:: check unit tests * [feature/454686-submission-summaries: Fixed failing unit test after latest refactor] * [feature/454686-submission-summaries: Addressed SonarCube issue] * add registration year to use it for ref num generation which is a temp fix * [feature/454686-submission-summaries: Fixed failing test due to new RegistationYear property] --------- Co-authored-by: Shehzad Ismail <[email protected]> Co-authored-by: Karthik K V <[email protected]> * [bug/fix-application-reference-number: Table now shows application or reference number in the results table] (#114) --------- Co-authored-by: johnfitzgeraldEviden <[email protected]> Co-authored-by: Julian Young <[email protected]> Co-authored-by: Prasad Ramireddy <[email protected]> Co-authored-by: [email protected] <[email protected]> Co-authored-by: karthikeviden <[email protected]>