-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev to UAT #1320
Open
neilblair
wants to merge
208
commits into
uat
Choose a base branch
from
development
base: uat
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev to UAT #1320
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dev to main for release
Sync dev with main
Initial attempt to decrypt query string booking data and pre-populate the webform ...to be continued
- Added prepareForm function to set current wizard page when amending a booking. - Added function to get decrypted booking data from the request. - Amendments to alterForm to get booking data from request and prepopulate the form so it can be amended (work in progress). - Added function to check whether visitors have adult DOBs (needed to correctly identify adult visitors booking data from request). - Major refactor of function validateVisitBookingReference. Removed code for processing the visit reference number into a separate function so that it can be called separately outside of normal form validation - e.g. in the alterForm function.
Many changes... - Alter titles of wizard pages when amending - Added code to fully pre-populate webform with booking data - Alter preview page depending on whether amending, changing or cancelling a booking - Function for resetting form slots - happens when visitor order number changes or when amending a booking and user wants to change the timeslot - Many bugfixes
Stores unique identifiers from booking amendment links with a timestamp. Used to ensure booking amendment links can be used only once.
- Added logic to check whether a booking link has already been used by checking if the book link unique identifier already exists in the db. - Booking data is now retrieved from request in prepareForm function and stored in form_state. - dded logic to limit number of additional child visitors that can be selected based on how many adults there are.
- Many elements now have bottom margin only instead of top and bottom margin. - Styling changes and additions for .visit-details DLs
code stds.
code stds.
code stds
Pv amend scratch
Fixed bug relating to when user chooses to change a timeslot and picks new ones and then changes mind and wants to go back to the original booked timeslot.
Comment adjustment
Pv amend scratch
* Remove Lando conf, begin introducing DDEV config * Adapt ignore file for ddev resources * Ignore local traefik certs. V low risk but annoying with CI tools * Add ddev conf and supporting scripts * Reinstate mising script * Solr conf * Local provider to ease access to db resources * Fix reference for theme path
Add toggle styling for checkboxes with role="switch" and also some adjustments to styling for :checked radios and checkboxes.
Tweak to resetTimeSlots condition
Only count "visible" adult visitor DOBs as determined by the additional_visitor_number value. This ensures if a user adds too many adults and then changes the additional_visitor_number to "remove" one of the adult visitors, it is no longer counted.
The Drupal.pvGetAge function may return null value. Avoid type coercion leading to a child badge being added to a visitor with no DOB yet added.
code stds
Prison Visits Booking Amendments
Deny anonymous access to prisoner rest resources
* Update PrisonVisitBookingHandler.php Initial attempt to decrypt query string booking data and pre-populate the webform ...to be continued * Update PrisonVisitBookingHandler.php - Added prepareForm function to set current wizard page when amending a booking. - Added function to get decrypted booking data from the request. - Amendments to alterForm to get booking data from request and prepopulate the form so it can be amended (work in progress). - Added function to check whether visitors have adult DOBs (needed to correctly identify adult visitors booking data from request). - Major refactor of function validateVisitBookingReference. Removed code for processing the visit reference number into a separate function so that it can be called separately outside of normal form validation - e.g. in the alterForm function. * Update PrisonVisitBookingHandler.php Many changes... - Alter titles of wizard pages when amending - Added code to fully pre-populate webform with booking data - Alter preview page depending on whether amending, changing or cancelling a booking - Function for resetting form slots - happens when visitor order number changes or when amending a booking and user wants to change the timeslot - Many bugfixes * Update webform.webform.prison_visit_online_booking.yml * Store booking link unique identifiers in database Stores unique identifiers from booking amendment links with a timestamp. Used to ensure booking amendment links can be used only once. * Update PrisonVisitBookingHandler.php - Added logic to check whether a booking link has already been used by checking if the book link unique identifier already exists in the db. - Booking data is now retrieved from request in prepareForm function and stored in form_state. - dded logic to limit number of additional child visitors that can be selected based on how many adults there are. * Webform theming changes - Many elements now have bottom margin only instead of top and bottom margin. - Styling changes and additions for .visit-details DLs * Update PrisonVisitBookingHandler.php code stds. * Update PrisonVisitBookingHandler.php code stds. * Update PrisonVisitBookingHandler.php code stds * Update PrisonVisitBookingHandler.php Fixed bug relating to when user chooses to change a timeslot and picks new ones and then changes mind and wants to go back to the original booked timeslot. * Update PrisonVisitBookingHandler.php Comment adjustment * Radio and checkbox styling enhancements Add toggle styling for checkboxes with role="switch" and also some adjustments to styling for :checked radios and checkboxes. * Update prisonbooking.js Tweak to resetTimeSlots condition * Update PrisonVisitBookingHandler.php - Separate function to handle form alterations when amending a booking - Custom confirmation messages depending on whether a booking is being kept, cancelled or changed - Various errors/warnings displayed when booking ref has an issue or timeslot cannot be changed because within notice period - Many fixes * webform config - Tweaks to confirmation_visit_details template - Removed unneeded bkg_bkg_* hidden elements - Various messages introduced to handle invalid / expired visit order number, booking already amended, etc - Enable user to choose what they want to amend - Major changes to conditional logic for wizard pages - Custom confirmation messages for keeping, cancelling or amending booking - JS experiment to enable resetting of individual inputs - Separate email handlers for amending a booking * Update PrisonVisitBookingHandler.php - Remove option to amend additional visitor details when visit type is virtual - Minor changes, comment adjustments * Fix disappearing time slot problem Fixes a bug where the original booking time slot is lost if the user chooses to change it and then changes mind and returns to the amend booking page. * Hide bkg_slotdatetime in webform preview * Webform custom confirmation message changes - Add a default confirmation message into the form config so it sits along with other custom confirmation messages (instead of just falling back to the confirmation message declared in the webform settings). - Tweaks to confirmation message text * form wrapper and form item margin tweaks * Tweak to css for experimental reset button for "resettable" inputs Place the button inside the input. * css tweak * Update PrisonVisitBookingHandler.php code stds * Fix messages that show when time slot cannot be amended * Update PrisonVisitBookingHandler.php - Move some amend booking form alterations out of alterFormToAmendBooking (which only runs once) and into the main alterForm logic so that it can run every time a wizard page is submitted (previous and next). - If notice period is exceeded, user must change the time slot. Make the option to change visit data and time readonly. * styling for disabled and readonly inputs * Updated config - Added JS to add remove buttons to additional visitor fieldsets - Clear button should not be able to clear disabled or readonly fields - Show a message when amendment is to booking whose timeslot has already passed - Various changes to messages - Ensure choose_change options are disabled when amend_booking_options not equal to "change". * Update PrisonVisitBookingHandler.php Prevent booking amendment proceeding when booked timeslot has passed (VISIT_ORDER_REF_AMENDMENT_EXPIRED) * Minor css tweaks * Update PrisonVisitBookingHandler.php Remove logic for keep_booking_page as that page no longer exists. * Amendment type must be set and passed in submission data It needs to be set based on whether user wants to keep, cancel or change the booking. * Update PrisonVisitBookingHandler.php - The processVisitBookingReference() function should set an error when the visit order number is missing. - Remembered additional visitor data needs added to the correct pages. * Fix issue with VISIT_ORDER_REF_AMENDMENT_NOTICE_EXCEEDED error superseding self::VISIT_ORDER_REF_AMENDMENT_NOTICE_EXCEEDED If visit ref has expired, booking cannot proceed. The VISIT_ORDER_REF_AMENDMENT_NOTICE_EXCEEDED should be triggered if visit ref is otherwise good (and we are amending a booking) and there are slots available. * Form message tweaks * One wizard step for all additional visitors * One wizard page for all additional visitors (initial) * Update prisonbooking.jquery-validate-methods.js Initial validation methods for checking max adult visitors not exceeded * Update PrisonVisitBookingHandler.php Fix php warnings * Update nidirect_webforms.libraries.yml * Update prisonbooking.jquery-validate-methods.js Attach helper validate functions to global Drupal object so they can be used across multiple js files and from within multiple Drupal.behaviours. * Update prisonbooking.js - Enable remove buttons on additional visitor fieldsets. - Show and update a badge on each visitor to indicate if they are an Adult or a Child. * Clear errors when visitors removed * Update _colors.scss Add blue violet definition * Update entities.scss Visitor badge styling * Update form.scss * Update buttons.scss Experimental clear button for form inputs. * Update package-lock.json * Compiled css * Update PrisonVisitBookingHandler.php - Remove some code related to separate adult and child additional visitor steps. One single step now - Prevent remembered visitor data being used when amending a booking (only visitor data from the booking data to be amended should be used) * Fixes for additional visitor related JS * Lastest config for webform * Minor fix to button.clear-button to center the 'x' * Tweak validation message of for additional visitors * Error message should be "floating" if input label is inline with the input And also fix issue with error message exceeding viewport width on narrow viewports * Clear clientside validation errors when additional visitor removed using the remove link * "two" not "2" to match editorial guidelines * Update prisonbooking.js Remove old JS limiting number of child visitors that can be added based on number of adults selected. * Add url.query_args:booking cache context to webform * Update PrisonVisitBookingHandler.php - If there are remembered visitor details, and we are amending a booking, the additional_visitors_remember = Yes|No question should be pre-populated with the remembered value. - Fix for for null additional visitor details on amend booking page * Add separate msg for amending additional visitors * Don't show msg_amend_additional_visitors in preview * Update PrisonVisitBookingHandler.php - Fix visitor_1_id not being passed to client side js - Capture all original amendment data in hidden fields (to be displayed in amend_booking_page instead of values from editable fields) * Update prisonbooking.js Fix bug where timeslots being reset when user hits previous on preview. * Update prisonbooking.jquery-validate-methods.js Fix additional visitor id validation * Updated config * Ensure additional visitors from original booking data always shown if they exist * Update prisonbooking.js Do not change focus when visitors removed (causes disorientation) * Update prisonbooking.js Check if main visitor ID duplicates an additional visitor ID and show a warning message (that the additional visitor with the same ID will be removed). * Update PrisonVisitBookingHandler.php Initial stab at removing additional visitor when their ID is the same as the main visitor. * Update PrisonVisitBookingHandler.php Clean up * Tweak to radio and checkbox :checked state * Update PrisonVisitBookingHandler.php - Create class properties for storing $form, $form_state, $webform_submission - Call alterFormToAmendBooking() when user returns to amend booking page to ensure any changes made are reset - Fix issue where webform confirmation message was only being altered when amending a booking. - Ensure duplicate additional visitor is removed correctly - Function setFormElementValue() which sets element value in $form, $form_state and $webform_submission * Update PrisonVisitBookingHandler.php deleteAdditionalVisitorDetails() was removed, using setFormElementValue() instead * Update PrisonVisitBookingHandler.php Normally when setting a form value, it needs to be set in the built $form or $elements array, also in $form_state and $webform_submission. Use setFormElementValue() to do the work of setting a form element values where needed. * Form config changes - Add a warning message to be shown when main visitor ID is changed and duplicates an additional visitor ID - Show message "Existing details of additional visitors from a previous booking have been found" as success notice - In default confirmation message, indicate how users can amend a booking * Fix issue with main visitor id check Only show the duplicate warning when the main visitor ID is 6 characters or more (and duplicates an additional visitor ID) * Update PrisonVisitBookingHandler.php code stds * Email confirm element validation fix The webform email confirm element '#required' is true, but when rendered, html attributes that trigger clientside validation are missing (required, aria-required, data-msg-required). As a workaround, add the missing attributes as custom attributes in the element settings. * Custom clientside validation for time slots Validate all timeslots as a group and show a single error message for the group * Fix default value issue for additional_visitor_number radios Setting the default value to '0' in the UI has no effect. So workaround is to set it in code. * Updated config - Make additional_visitor_number required and default to 0. - Add 'timeslot' class to all checkboxes for timeslots * Update prisonbooking.jquery-validate-methods.js * Update prisonbooking.js Fix issue where additional visitor fields not updating correctly when removed * Do no show absolutely positioned error bubble for additional visitor fields as it covers the remove link * prisons_integration submodule for nidirect_webforms Provides API endpoints to receive prisoner payment data * Enable nidirect_prisons custom module and Rest UI module * Create nidirect_prisons custom module to replace prisons_integration nidirect_webforms submodule Module provides two rest resources for receiving prisoner payments data. Also provides custom authentication providers to restrict access to rest resources to certain IP addresses and tokens passed in X-Auth-Token header * Config for prisoner payments rest resources * Grant permissions to anonymous and authenticated users to access prisoner payments rest resources * Refinements and fixes for endpoint resource classes * Update rest.resource.prisoner_amounts_resource.yml * Update nidirect_webforms.module Do not install prisons_integration submodule when nidirect_webforms is installed. (Now there is a separate nidirect_prisons custom module.) * code stds * Delete PrisonsIntegrationService.php * Code stds and remove references to PrisonsIntegrationService class * Update XAuthToken.php code stds * Endpoint URLs should have a version number * Change "your details" to "main visitor details" And adjustment to info notice on main visitor details page. * Minor text change for main visitor details info notice * Fix visibility of visitor_1_intro_amend text Remove condition incorrectly hiding the text. Text should be shown on main visitor details page if amending a booking. * Update PrisonVisitBookingHandler.php * Update PrisonVisitBookingHandler.php - Code accessing $booking_data in prepareForm() should only run if $booking_data exists. - Throw an exception and log an error when environment variables string encryption key details are missing * Update prisonbooking.jquery-validate-methods.js Ensure pvGetAge() returns null if dateString is not a valid date. * Update PrisonVisitBookingHandler.php Add server-side validation check for too many additional adult visitors. * Update nidirect_webforms.module Can call \Drupal::database() directly without creating a connection variable. * Update PrisonVisitBookingHandler.php Only check if max adults exceeded when total number of additional visitors is > 2 * Update prisonbooking.jquery-validate-methods.js Only count visible adult visitors * Update PrisonVisitBookingHandler.php Only count "visible" adult visitor DOBs as determined by the additional_visitor_number value. This ensures if a user adds too many adults and then changes the additional_visitor_number to "remove" one of the adult visitors, it is no longer counted. * Update prisonbooking.js The Drupal.pvGetAge function may return null value. Avoid type coercion leading to a child badge being added to a visitor with no DOB yet added. * Update PrisonVisitBookingHandler.php code stds * Update user.role.anonymous.yml Deny anonymous access to prisoner rest resources
Update version number
An authentication provider which combines token and ip authentication checks.
Add TokenAndIpAddressAuth authentication provider
These are replaced a single provider authenticating token and ip and so can be removed.
Uninstall nidirect_prisons module
Prisoner payments fixes
Catch all possible exceptions when attempting nominatim reverse lookup
Catch all possible exceptions when doing reverse location lookup.
Hotfix for GP Practice search WSOD
Update GpSearchController.php
D8NID-1736 Prison visit booking: emails received by Prism have non-sequential SEQUENCE_ID values
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.