项目里程碑初步优化

This commit is contained in:
Cheng Zhou
2026-02-27 09:06:06 +08:00
parent 8f3f717e48
commit fd7e3fc948
47 changed files with 2029 additions and 783 deletions
+11 -7
View File
@@ -221,16 +221,20 @@ const onSubmit = async () => {
} else {
clearCachedCredential();
}
if (auth.user?.role === "ADMIN") {
const studyStore = useStudyStore();
await studyStore.ensureDefaultActiveStudy();
if (studyStore.currentStudy) {
router.push("/project/overview");
const studyStore = useStudyStore();
if (!studyStore.currentStudy) {
if (auth.user?.role === "ADMIN") {
await studyStore.ensureDefaultActiveStudy();
} else {
router.push("/admin/users");
await studyStore.ensureDefaultStudy();
}
}
if (studyStore.currentStudy) {
router.push("/project/overview");
} else if (auth.user?.role === "ADMIN") {
router.push("/admin/users");
} else {
router.push("/");
router.push("/workbench");
}
} catch (error: any) {
const status = error?.response?.status;