fix: Load archived card if URL is opened directly

Signed-off-by: Julius Knorr <jus@bitgrid.net>
This commit is contained in:
Julius Knorr
2024-09-12 15:52:53 +02:00
parent 0076026fad
commit ca75c14252
3 changed files with 27 additions and 2 deletions

View File

@@ -179,6 +179,16 @@ export default {
await this.$store.dispatch('loadBoardById', this.id)
await this.$store.dispatch('loadStacks', this.id)
const routeCardId = parseInt(this.$route.params.cardId)
// If an archived card is requested, and we cannot find it in the current we load the archived stacks instead
if (routeCardId && !this.$store.getters.cardById(routeCardId)) {
await this.$store.dispatch('loadArchivedStacks', this.id)
if (this.$store.getters.cardById(routeCardId)) {
this.$store.commit('toggleShowArchived', true)
}
}
this.session?.close()
this.session = createSession(this.id)
} catch (e) {