fix get resources after login
This commit is contained in:
1 parent
327f59104d
commit
9303a66aa8
9 files changed
+69
-12
No files matched your search
@@ -9,5 +9,9 @@ export const useIssueTypeStore = defineStore('issueType', () => {
|
||||
issueTypes.value = await issueTypesList()
|
||||
}
|
||||
|
||||
return { issueTypes, list }
|
||||
function reset() {
|
||||
issueTypes.value = undefined
|
||||
}
|
||||
|
||||
return { issueTypes, list, reset }
|
||||
})
|
||||
+8
-1
@@ -120,7 +120,14 @@ export const useIssueStore = defineStore('item', () => {
|
||||
}
|
||||
}
|
||||
|
||||
return { stats, dailyStats, list, calendar, getByKey, create, update, remove, getStat, getDailyStat }
|
||||
function reset() {
|
||||
issues.value = []
|
||||
stats.value = undefined
|
||||
dailyStats.value = undefined
|
||||
error.value = null
|
||||
}
|
||||
|
||||
return { stats, dailyStats, list, calendar, getByKey, create, update, remove, getStat, getDailyStat, reset }
|
||||
})
|
||||
|
||||
/** Local YYYY-MM-DD `days` days before today */
|
||||
|
||||
@@ -96,6 +96,13 @@ export const useProjectStore = defineStore('project', () => {
|
||||
}
|
||||
}
|
||||
|
||||
/** Clears loaded data on sign-out; the stored project id is kept and re-validated on next sign-in */
|
||||
function reset() {
|
||||
projects.value = []
|
||||
current.value = null
|
||||
error.value = null
|
||||
}
|
||||
|
||||
async function restoreCurrent() {
|
||||
const id = readStoredProjectId()
|
||||
if (!id) return
|
||||
@@ -118,5 +125,6 @@ export const useProjectStore = defineStore('project', () => {
|
||||
clearError,
|
||||
select,
|
||||
restoreCurrent,
|
||||
reset,
|
||||
}
|
||||
})
|
||||
@@ -9,5 +9,9 @@ export const useStatusStore = defineStore('counter', () => {
|
||||
statuses.value = await statusesList()
|
||||
}
|
||||
|
||||
return { statuses, list }
|
||||
function reset() {
|
||||
statuses.value = undefined
|
||||
}
|
||||
|
||||
return { statuses, list, reset }
|
||||
})
|
||||
Reference in new issue
Block a user