From b895c74d55c5800be2fe4e3588ddbc44d0585ad1 Mon Sep 17 00:00:00 2001 From: jonathangoulding Date: Fri, 3 May 2024 17:18:46 +0100 Subject: [PATCH] fix: hard code returns url in the njk --- app/presenters/licences/view-licence-returns.presenter.js | 3 +-- app/views/licences/tabs/returns.njk | 2 +- .../presenters/licences/view-licence-returns-presenter.test.js | 1 - test/services/licences/view-licence-returns.service.test.js | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/presenters/licences/view-licence-returns.presenter.js b/app/presenters/licences/view-licence-returns.presenter.js index 6f021260bc..4932a6d734 100644 --- a/app/presenters/licences/view-licence-returns.presenter.js +++ b/app/presenters/licences/view-licence-returns.presenter.js @@ -17,14 +17,13 @@ function go (returnsData) { return { activeTab: 'returns', - returnsUrl: 'return/internal', returns } } function _formatPurpose (purpose) { const [firstPurpose] = purpose - + return firstPurpose.alias ? firstPurpose.alias : firstPurpose.tertiary.description } diff --git a/app/views/licences/tabs/returns.njk b/app/views/licences/tabs/returns.njk index 26f168122e..51ac8cc585 100644 --- a/app/views/licences/tabs/returns.njk +++ b/app/views/licences/tabs/returns.njk @@ -34,7 +34,7 @@ {% for return in returns %} - {{ return.reference }} + {{ return.reference }}

{{ return.dates }}

{{ return.purpose }}

{{ return.description }}

diff --git a/test/presenters/licences/view-licence-returns-presenter.test.js b/test/presenters/licences/view-licence-returns-presenter.test.js index 0f4e4ef5dc..90274a0f02 100644 --- a/test/presenters/licences/view-licence-returns-presenter.test.js +++ b/test/presenters/licences/view-licence-returns-presenter.test.js @@ -22,7 +22,6 @@ describe('View Licence returns presenter', () => { expect(result).to.equal({ activeTab: 'returns', - returnsUrl: 'return/internal', returns: [ { id: 'mock-id-1', diff --git a/test/services/licences/view-licence-returns.service.test.js b/test/services/licences/view-licence-returns.service.test.js index 6153035381..630e5a9c1d 100644 --- a/test/services/licences/view-licence-returns.service.test.js +++ b/test/services/licences/view-licence-returns.service.test.js @@ -41,7 +41,6 @@ describe('View Licence service returns', () => { expect(result).to.equal({ licenceName: 'fake licence', - returnsUrl: 'return/internal', returns: [], activeTab: 'returns', pagination: { page: 1 } @@ -53,7 +52,6 @@ describe('View Licence service returns', () => { function _returnsPresenter () { return { - returnsUrl: 'return/internal', returns: [], activeTab: 'returns' }