diff --git a/.secrets.baseline b/.secrets.baseline index 74be8e87d9..59c01439b9 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -297,28 +297,28 @@ "filename": "app/views/transactions/index.njk", "hashed_secret": "c12ec67dcf1e1939e1039d414d56a59c2c49cc87", "is_verified": false, - "line_number": 21 + "line_number": 23 }, { "type": "Base64 High Entropy String", "filename": "app/views/transactions/index.njk", "hashed_secret": "e0eb70ddc8098d113dc566a9dc85c0e6a44de8d8", "is_verified": false, - "line_number": 22 + "line_number": 24 }, { "type": "Base64 High Entropy String", "filename": "app/views/transactions/index.njk", "hashed_secret": "6ee3b2a2f5eaeadb06c1dda26270cd1032420e79", "is_verified": false, - "line_number": 23 + "line_number": 25 }, { "type": "Base64 High Entropy String", "filename": "app/views/transactions/index.njk", "hashed_secret": "2568e4443a80c3aaed753e6eecfa9dc742187ad9", "is_verified": false, - "line_number": 24 + "line_number": 26 } ], "test/cypress/integration/all-service-transactions/all-service-transactions.cy.js": [ @@ -903,5 +903,5 @@ } ] }, - "generated_at": "2023-11-27T13:23:06Z" + "generated_at": "2024-01-17T17:13:09Z" } diff --git a/app/assets/sass/components/transaction-filter.scss b/app/assets/sass/components/transaction-filter.scss index 3c99faa21c..806be2a0ac 100644 --- a/app/assets/sass/components/transaction-filter.scss +++ b/app/assets/sass/components/transaction-filter.scss @@ -19,29 +19,44 @@ width: 50%; } - .govuk-form-group { + &__input-container { float: left; width: 50%; box-sizing: border-box; - &:first-of-type { + + &--date-input, + .govuk-form-group--error &--date-input { padding-right: govuk-spacing(1); + margin-bottom: govuk-spacing(2); } - &:last-of-type { - padding-left: govuk-spacing(1); + &--time-input, + .govuk-form-group--error &--time-input { + padding-right: govuk-spacing(1); } } } + + .datetime-filter-from { padding-right: govuk-spacing(3); } .datetime-filter-to { position: relative; - padding-left: govuk-spacing(3); + // padding-left: govuk-spacing(3); + + @include govuk-media-query(tablet) { + padding-left: govuk-spacing(3); + } + + &__container { + width: auto; + padding: 0; + } } .datetime-separator { @@ -51,9 +66,8 @@ @include govuk-media-query(tablet) { @include govuk-font($size: 14); position: absolute; - top: 50%; left: -8px; - transform: translateY(-50%); + margin-top: govuk-spacing(7); } } diff --git a/app/views/transactions/filter.njk b/app/views/transactions/filter.njk index 51470b2e5a..9b8e3086df 100644 --- a/app/views/transactions/filter.njk +++ b/app/views/transactions/filter.njk @@ -28,7 +28,7 @@ }) }} -
End date must be after start date
-The from date entered is {{fromDateParam}} and the to date entered is {{toDateParam}}
- {% else %} {% if totalOverLimit %} Over {{maxLimitFormatted}} transactions {% else %} {{totalFormatted}} transactions {% endif %} {{ filtersDescription | safe }} - {% endif %} + {% if allServiceTransactions or permissions.transactions_download_read %} diff --git a/test/cypress/integration/transactions/transaction-search.cy.js b/test/cypress/integration/transactions/transaction-search.cy.js index b58532c195..d8cad273e2 100644 --- a/test/cypress/integration/transactions/transaction-search.cy.js +++ b/test/cypress/integration/transactions/transaction-search.cy.js @@ -377,7 +377,10 @@ describe('Transactions List', () => { cy.get('#transactions-list tbody').should('not.exist') - cy.get('h3').contains('End date must be after start date' ) + cy.get('[data-cy=error-summary]').contains('End date must be after start date') + cy.get('[data-cy=from-date-error-message]').contains('End date must be after start date') + cy.get('[data-cy=from-date-error-message]').parent().should('have.class', 'govuk-form-group--error') + cy.get('[data-cy=to-date-field]').should('have.class', 'govuk-input--error') }) }) describe('Transactions are displayed correctly', () => {