项目里程碑初步优化
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user