diff --git a/frontend/package-lock.json b/frontend/package-lock.json index e86098f10..9dd8f7936 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -21,6 +21,7 @@ "hammerjs": "^2.0.8", "papaparse": "^5.4.1", "pinia": "^2.1.7", + "pinia-plugin-persistedstate": "^3.2.1", "popper.js": "^1.16.1", "qrcode.vue": "^3.4.1", "register-service-worker": "^1.7.1", @@ -11671,6 +11672,14 @@ } } }, + "node_modules/pinia-plugin-persistedstate": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-3.2.1.tgz", + "integrity": "sha512-MK++8LRUsGF7r45PjBFES82ISnPzyO6IZx3CH5vyPseFLZCk1g2kgx6l/nW8pEBKxxd4do0P6bJw+mUSZIEZUQ==", + "peerDependencies": { + "pinia": "^2.0.0" + } + }, "node_modules/pinia/node_modules/vue-demi": { "version": "0.14.7", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", diff --git a/frontend/package.json b/frontend/package.json index 03733cac8..82c7b72ee 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -25,6 +25,7 @@ "hammerjs": "^2.0.8", "papaparse": "^5.4.1", "pinia": "^2.1.7", + "pinia-plugin-persistedstate": "^3.2.1", "popper.js": "^1.16.1", "qrcode.vue": "^3.4.1", "register-service-worker": "^1.7.1", diff --git a/frontend/src/components/UserStories.vue b/frontend/src/components/UserStories.vue index f86ea7efb..1da1cba65 100644 --- a/frontend/src/components/UserStories.vue +++ b/frontend/src/components/UserStories.vue @@ -55,7 +55,7 @@ readonly size="sm" :placeholder="t('page.session.before.userStories.placeholder.userStoryTitle')" - @blur="publishChanges(index, false)" + @click="publishChanges(index, false)" /> @@ -111,6 +111,7 @@ diff --git a/frontend/src/views/PrepareSessionPage.vue b/frontend/src/views/PrepareSessionPage.vue index 50a9d552f..71ce102dd 100644 --- a/frontend/src/views/PrepareSessionPage.vue +++ b/frontend/src/views/PrepareSessionPage.vue @@ -258,7 +258,13 @@ export default defineComponent({ return ["notSelectedTab", "notSelectedTextColor"]; } }, + sendUnregisterCommand() { + const endPoint = `${Constants.webSocketUnregisterRoute}`; + this.store.sendViaBackendWS(endPoint); + this.store.clearStore(); + }, async sendCreateSessionRequest() { + this.sendUnregisterCommand(); const url = Constants.backendURL + Constants.createSessionRoute; const sessionConfig = { set: this.selectedCardSetOptions, diff --git a/frontend/src/views/SessionPage.vue b/frontend/src/views/SessionPage.vue index d649c4d2f..363c653a5 100644 --- a/frontend/src/views/SessionPage.vue +++ b/frontend/src/views/SessionPage.vue @@ -485,8 +485,11 @@ export default defineComponent({ console.log("ON MOUNTED"); this.estimateFinished = true; } + if (this.userStoryMode === "US_JIRA") { + this.refreshUserStories(); + } }, - destroyed() { + unmounted() { window.removeEventListener("beforeunload", this.sendUnregisterCommand); }, methods: { @@ -691,7 +694,7 @@ export default defineComponent({ sendUnregisterCommand() { const endPoint = `${Constants.webSocketUnregisterRoute}`; this.store.sendViaBackendWS(endPoint); - this.store.clearStore(); + this.store.clearStoreWithoutUserStories(); }, sendVotingFinishedMessage() { if (!this.estimateFinished) {