From f9f2f1ae497eb42327af6fa1ab04b95afe8a8e22 Mon Sep 17 00:00:00 2001 From: Stuart Laverick Date: Tue, 6 Jul 2021 17:42:44 +0100 Subject: [PATCH 1/5] Updated response to create submit based on role (#33) --- src/views/services/Create.vue | 280 ++++++++++++++++++---------------- 1 file changed, 151 insertions(+), 129 deletions(-) diff --git a/src/views/services/Create.vue b/src/views/services/Create.vue index 33c7fcd5..3fe74ba6 100644 --- a/src/views/services/Create.vue +++ b/src/views/services/Create.vue @@ -35,142 +35,157 @@ > - - Add service +
+ Create service request + {{ updateRequestMessage }} + Back to services +
+ - - -
  • - - + @@ -259,7 +274,9 @@ export default { { id: "taxonomies", heading: "Taxonomies", active: false }, { id: "description", heading: "Description", active: false }, { id: "referral", heading: "Referral", active: false } - ] + ], + updateRequestCreated: false, + updateRequestMessage: null }; }, computed: { @@ -294,10 +311,15 @@ export default { // Refetch the user as new permissions added for the new service. await this.auth.fetchUser(); - this.$router.push({ - name: "services-post-create", - params: { service: serviceId } - }); + if (this.auth.isGlobalAdmin && serviceId) { + this.$router.push({ + name: "services-post-create", + params: { service: serviceId } + }); + } else if (!this.form.$errors.any()) { + this.updateRequestCreated = true; + this.updateRequestMessage = data.message; + } }, onTabChange({ index }) { this.tabs.forEach(tab => (tab.active = false)); From 08b07ecfb25d514a3e906cecc58c8c1aa696f8a6 Mon Sep 17 00:00:00 2001 From: Stuart Laverick Date: Thu, 8 Jul 2021 15:58:32 +0100 Subject: [PATCH 2/5] ServiceDetails handles lack of origin object better (#34) --- .../update-requests/show/ServiceDetails.vue | 88 +++++++++---------- 1 file changed, 42 insertions(+), 46 deletions(-) diff --git a/src/views/update-requests/show/ServiceDetails.vue b/src/views/update-requests/show/ServiceDetails.vue index 29ef153d..2e735cae 100644 --- a/src/views/update-requests/show/ServiceDetails.vue +++ b/src/views/update-requests/show/ServiceDetails.vue @@ -111,7 +111,10 @@
    {{ rootTaxonomy.name @@ -119,21 +122,12 @@ - Custom Value: {{ original.eligibility_types.custom[slugify(rootTaxonomy.name)] @@ -145,7 +139,10 @@
    {{ rootTaxonomy.name @@ -158,16 +155,7 @@ :filteredTaxonomyIds="updatedServiceEligibilities" :disabled="true" /> - Custom Value: {{ service.eligibility_types.custom[slugify(rootTaxonomy.name)] @@ -544,20 +532,22 @@ export default { computed: { updatedServiceEligibilities() { - const originalTaxonomies = this.original.eligibility_types.taxonomies.reduce( - (taxonomyIds, taxonomyId) => { - const taxonomy = this.flattenedEligibilityTypes.find( - taxonomy => taxonomy.id === taxonomyId - ); - return taxonomyIds.concat( - this.getTaxonomyAndAncestorsIds( - taxonomy, - this.flattenedEligibilityTypes - ) - ); - }, - [] - ); + const originalTaxonomies = this.original + ? this.original.eligibility_types.taxonomies.reduce( + (taxonomyIds, taxonomyId) => { + const taxonomy = this.flattenedEligibilityTypes.find( + taxonomy => taxonomy.id === taxonomyId + ); + return taxonomyIds.concat( + this.getTaxonomyAndAncestorsIds( + taxonomy, + this.flattenedEligibilityTypes + ) + ); + }, + [] + ) + : []; const updatedTaxonomies = this.service.eligibility_types.taxonomies.reduce( (taxonomyIds, taxonomyId) => { const taxonomy = this.flattenedEligibilityTypes.find( @@ -682,17 +672,23 @@ export default { return name.toLowerCase().replaceAll(" ", "_"); }, - eligibilityChanged(eligibilityRoot) { + eligibilityTaxonomyChanged(eligibilityRoot) { return ( this.service.hasOwnProperty("eligibility_types") && - (this.updatedServiceEligibilities.includes(eligibilityRoot.id) || - (this.service.eligibility_types.hasOwnProperty("custom") && - this.original.eligibility_types.custom[ - this.slugify(eligibilityRoot.name) - ] !== - this.service.eligibility_types.custom[ - this.slugify(eligibilityRoot.name) - ])) + this.updatedServiceEligibilities.includes(eligibilityRoot.id) + ); + }, + eligibilityCustomChanged(eligibilityRoot) { + const rootSlug = this.slugify(eligibilityRoot.name); + + const customEligibility = this.original + ? this.original.eligibility_types.custom[rootSlug] + : ""; + + return ( + this.service.eligibility_types.hasOwnProperty("custom") && + typeof this.service.eligibility_types.custom[rootSlug] == "string" && + this.service.eligibility_types.custom[rootSlug] !== customEligibility ); } }, From e35a16c58a98fabaef424614a93b293a6d4edc38 Mon Sep 17 00:00:00 2001 From: Stuart Laverick Date: Fri, 9 Jul 2021 16:26:06 +0100 Subject: [PATCH 3/5] Added help page with menu and links (#35) --- src/App.vue | 4 + src/router.js | 6 ++ src/views/Dashboard.vue | 2 + src/views/help/Index.vue | 97 +++++++++++++++++++++++ src/views/help/components/VideoIframe.vue | 68 ++++++++++++++++ 5 files changed, 177 insertions(+) create mode 100644 src/views/help/Index.vue create mode 100644 src/views/help/components/VideoIframe.vue diff --git a/src/App.vue b/src/App.vue index ab1cebbf..79de2ec9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -77,6 +77,10 @@ export default { text: "Update requests", to: { name: "update-requests-index" }, hide: !Auth.isGlobalAdmin + }, + { + text: "Help", + to: { name: "help-index" } } ]; }, diff --git a/src/router.js b/src/router.js index 6f299a6d..fdd53897 100644 --- a/src/router.js +++ b/src/router.js @@ -25,6 +25,12 @@ let router = new Router({ component: () => import("@/views/Dashboard"), meta: { auth: true } }, + { + path: "/help", + name: "help-index", + component: () => import("@/views/help/Index"), + meta: { auth: true } + }, { path: "/organisations", name: "organisations-index", diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index fb7848da..378fda11 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -16,6 +16,8 @@ onehounslowconnect@hounslow.gov.uk + or view our + help videos diff --git a/src/views/help/Index.vue b/src/views/help/Index.vue new file mode 100644 index 00000000..641f50c5 --- /dev/null +++ b/src/views/help/Index.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/views/help/components/VideoIframe.vue b/src/views/help/components/VideoIframe.vue new file mode 100644 index 00000000..f2ccc177 --- /dev/null +++ b/src/views/help/components/VideoIframe.vue @@ -0,0 +1,68 @@ + + + + + From 27ed8c5f51e210436f58c71e7a4e8572427bcc6b Mon Sep 17 00:00:00 2001 From: Stuart Laverick Date: Fri, 9 Jul 2021 17:10:32 +0100 Subject: [PATCH 4/5] Convert all visible instances of One Hounslow Connect to Hounslow Connect (#36) --- src/App.vue | 4 ++-- src/views/Dashboard.vue | 17 +++++++---------- src/views/admin/Index.vue | 2 +- src/views/admin/index/AuditLogs.vue | 2 +- src/views/admin/index/Cms.vue | 2 +- src/views/admin/index/Collections.vue | 2 +- src/views/admin/index/Feedback.vue | 2 +- src/views/admin/index/Notifications.vue | 2 +- src/views/admin/index/SearchEngine.vue | 2 +- src/views/admin/index/Taxonomies.vue | 2 +- src/views/admin/index/cms/Updated.vue | 2 +- src/views/audits/Show.vue | 5 +---- src/views/auth/Login.vue | 4 ++-- src/views/auth/Logout.vue | 2 +- src/views/collections/categories/Create.vue | 2 +- src/views/collections/categories/Edit.vue | 2 +- src/views/collections/personas/Create.vue | 2 +- src/views/collections/personas/Edit.vue | 2 +- src/views/errors/404.vue | 2 +- src/views/help/Index.vue | 2 +- src/views/locations/Create.vue | 2 +- src/views/locations/Edit.vue | 4 +--- src/views/locations/Index.vue | 2 +- src/views/locations/Show.vue | 2 +- src/views/locations/Updated.vue | 2 +- src/views/notifications/Show.vue | 2 +- src/views/organisations/Create.vue | 2 +- src/views/organisations/Edit.vue | 4 +--- src/views/organisations/Import.vue | 2 +- src/views/organisations/Index.vue | 2 +- src/views/organisations/Show.vue | 2 +- src/views/organisations/Updated.vue | 4 +--- src/views/page-feedbacks/Show.vue | 2 +- src/views/referrals/Confirmation.vue | 2 +- src/views/referrals/Index.vue | 2 +- src/views/referrals/Show.vue | 4 +--- src/views/register/Completed.vue | 2 +- src/views/register/Search.vue | 4 ++-- .../register/components/InformationCopy.vue | 2 +- src/views/register/forms/AdditionalInfoTab.vue | 4 ++-- src/views/register/forms/DescriptionTab.vue | 2 +- src/views/register/forms/DetailsTab.vue | 2 +- src/views/register/new/Criteria.vue | 5 ++--- src/views/register/new/Register.vue | 2 +- src/views/reports/Edit.vue | 4 ++-- src/views/reports/Index.vue | 2 +- src/views/service-locations/Create.vue | 4 +--- src/views/service-locations/Edit.vue | 2 +- src/views/service-locations/Show.vue | 3 +-- src/views/service-locations/Updated.vue | 2 +- src/views/services/Create.vue | 2 +- src/views/services/Edit.vue | 2 +- src/views/services/Import.vue | 2 +- src/views/services/Index.vue | 2 +- src/views/services/PostCreate.vue | 2 +- src/views/services/PreCreate.vue | 2 +- src/views/services/Refresh.vue | 2 +- src/views/services/Show.vue | 4 +--- src/views/services/Updated.vue | 2 +- src/views/services/forms/AdditionalInfoTab.vue | 2 +- src/views/services/forms/DescriptionTab.vue | 2 +- src/views/services/forms/DetailsTab.vue | 2 +- src/views/services/forms/ReferralTab.vue | 8 ++++---- src/views/stop-words/Edit.vue | 2 +- src/views/taxonomies/categories/Create.vue | 2 +- src/views/taxonomies/categories/Edit.vue | 4 +--- src/views/taxonomies/organisations/Create.vue | 2 +- src/views/taxonomies/organisations/Edit.vue | 2 +- .../taxonomies/service-eligibilities/Create.vue | 2 +- .../taxonomies/service-eligibilities/Edit.vue | 2 +- src/views/thesaurus/Edit.vue | 2 +- src/views/update-requests/Index.vue | 2 +- src/views/update-requests/Show.vue | 2 +- src/views/users/Create.vue | 2 +- src/views/users/Edit.vue | 4 ++-- src/views/users/Index.vue | 2 +- src/views/users/Show.vue | 2 +- 77 files changed, 93 insertions(+), 115 deletions(-) diff --git a/src/App.vue b/src/App.vue index 79de2ec9..50ec3d92 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,14 +1,14 @@