Skip to content

Commit

Permalink
Merge pull request #99 from BBMRI-ERIC/fix/add_reload_on_status_change
Browse files Browse the repository at this point in the history
feat: reload page on lifecycle update
  • Loading branch information
RadovanTomik authored Feb 16, 2024
2 parents 7a66472 + 0f79353 commit ba92c7c
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 38 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"oidc-client-ts": "^2.1.0",
"sass-loader": "^13.2.0",
"vue": "^3.2.47",
"vue-matomo": "^4.2.0",
"vue-router": "^4.1.5",
"vue3-form-wizard": "^0.1.8",
"vuex": "^4.0.2",
Expand Down
3 changes: 0 additions & 3 deletions src/components/NavigationBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
>
<router-link
class="nav-link active nav-option"
:class="$route.path === '/admin' ? 'text-primary' : ''"
to="/admin"
>
<i class="bi bi-house-gear" />
Expand All @@ -45,7 +44,6 @@
>
<router-link
class="nav-link active nav-option"
:class="$route.path === '/researcher' ? 'text-primary-light' : ''"
to="/researcher"
>
<i class="bi bi-folder2" />
Expand All @@ -58,7 +56,6 @@
>
<router-link
class="nav-link active nav-option"
:class="$route.path === '/biobanker' ? 'text-primary-light' : ''"
to="/biobanker"
>
<i class="bi bi-hospital" />
Expand Down
4 changes: 0 additions & 4 deletions src/components/NegotiationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
color="var(--bs-secondary)"
step-size="md"
@on-complete="startNegotiation"
@on-change="restartStepFeedback"
>
<tab-content
title="Request summary"
Expand Down Expand Up @@ -300,9 +299,6 @@ export default {
this.showStepFeedback = !valid
return valid
}
},
restartStepFeedback() {
this.showStepFeedback = false
}
},
}
Expand Down
9 changes: 4 additions & 5 deletions src/components/NegotiationList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,10 @@

<div>
<div class="row row-cols-2 d-grid-row mt-3">
<p v-if="pagination.totalElements > 0">
<strong>Search results : </strong>
<br>
<span class="text-muted">{{ pagination.totalElements }} Negotiations found</span>
</p>
<p v-if="sortedNegotiations.length > 0">
<strong>Search results : </strong><br>
{{ sortedNegotiations.length }} Negotiations found
</p>

<div class="text-end my-2">
<button
Expand Down
6 changes: 0 additions & 6 deletions src/config/matomo.js

This file was deleted.

9 changes: 1 addition & 8 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createApp } from "vue"
import App from "./App.vue"
import VueMatomo from 'vue-matomo'
import router from "./router"
import store from "./store"
import { sync } from "vuex-router-sync"
Expand All @@ -11,17 +10,13 @@ import "bootstrap/dist/css/bootstrap.css"
import "bootstrap-vue-next/dist/bootstrap-vue-next.css"
import "bootstrap"
import "bootstrap-icons/font/bootstrap-icons.css"
import matomo from "./config/matomo.js"

library.add(faSpinner)
library.add(faPencil)
library.add(faTrash)
library.add(faDownload)

const app = createApp(App).use(VueMatomo, {
host: matomo.matomoHost,
siteId: matomo.matomoId,
})
const app = createApp(App)

app.use(router)
app.use(store)
Expand All @@ -33,6 +28,4 @@ sync(store, router)

app.mount("#app")

window._paq.push(['trackPageView']); // To track a page view

import "./assets/scss/bbmri.scss"
21 changes: 17 additions & 4 deletions src/views/NegotiationPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,28 @@
</li>
<li class="list-group-item p-3">
<div
class="collections-header d-flex flex-row mb-3 justify-content-between"
class="d-flex flex-row mb-3 justify-content-between"
style="min-height: 38px;"
>
<div
data-bs-toggle="collapse"
data-bs-target="#resourcesList"
aria-expanded="true"
aria-controls="resourcesList"
aria-expanded="true"
type="button"
>
<div>
<span class="fs-5 fw-bold text-secondary mt-3">
<i class="bi bi-card-list" />
COLLECTIONS ({{ numberOfResources }})
</span>
</div>
<div class="justify-content-end pt-1">
<div
data-bs-toggle="collapse"
data-bs-target="#resourcesList"
aria-controls="resourcesList"
aria-expanded="true"
type="button"
class="collections-header justify-content-end pt-1">
<i class="bi bi-chevron-down"></i>
<i class="bi bi-chevron-up"></i>
</div>
Expand Down Expand Up @@ -329,6 +336,7 @@ export default {
negotiationStatusOptions: [],
availableRoles: ROLES,
currentResourceEvents: [],
savedResourceId: undefined,
selection: {},
currentMultipleResourceStatus: undefined,
selectedStatus: undefined,
Expand Down Expand Up @@ -455,6 +463,8 @@ export default {
await this.updateNegotiationStatus({
negotiationId: this.negotiation.id,
event: action
}).then(() => {
this.$router.replace({ params: {userRole:"ROLE_RESEARCHER"} })
})
},
getElementIdFromResourceId(resourceId) {
Expand Down Expand Up @@ -506,6 +516,7 @@ export default {
resourceId: resourceId
}).then((data) => {
this.currentMultipleResourceStatus = this.getStatusForResource(resourceId)
this.savedResourceId = resourceId
// gets the orgId of the organization of the checked resource
return data
})
Expand All @@ -532,6 +543,8 @@ export default {
event: event
})
}
// update status and status select
this.$router.go(0)
}
},
transformString(string) {
Expand Down
2 changes: 0 additions & 2 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ do
sed -i 's|REDIRECT_URI_PLACEHOLDER|'${REDIRECT_URI}'|g' $file
sed -i 's|LOGOUT_URI_PLACEHOLDER|'${LOGOUT_URI}'|g' $file
sed -i 's|RESOURCES_PLACEHOLDER|'${API_RESOURCES}'|g' $file
sed -i 's|MATOMO_HOST_PLACEHOLDER|'${MATOMO_HOST}'|g' $file
sed -i 's|MATOMO_SITE_ID_PLACEHOLDER|'${MATOMO_SITE_ID}'|g' $file

done

Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6720,11 +6720,6 @@ vue-loader@^17.0.0:
hash-sum "^2.0.0"
watchpack "^2.4.0"

vue-matomo@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/vue-matomo/-/vue-matomo-4.2.0.tgz#d65e369e4ead1d95ef790bef3627512cac3d25e9"
integrity sha512-m5hCw7LH3wPDcERaF4sp/ojR9sEx7Rl8TpOyH/4jjQxMF2DuY/q5pO+i9o5Dx+BXLSa9+IQ0qhAbWYRyESQXmA==

vue-router@^4.1.5:
version "4.2.0"
resolved "https://registry.npmjs.org/vue-router/-/vue-router-4.2.0.tgz"
Expand Down

0 comments on commit ba92c7c

Please sign in to comment.