fix: Load archived card if URL is opened directly
Signed-off-by: Julius Knorr <jus@bitgrid.net>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user