@@ -54,10 +54,10 @@ onMounted( async () => {
-
-
+
+
-
+
Course ID: {{appConfigStore.courseNumber}}
@@ -94,14 +94,13 @@ onMounted( async () => {
From 6afab22d4b17d4bd5fac672b89295042feb653fe Mon Sep 17 00:00:00 2001
From: DallinFromEarth <112426674+DallinFromEarth@users.noreply.github.com>
Date: Fri, 8 Nov 2024 09:23:55 -0700
Subject: [PATCH 3/5] clean up code
---
.../frontend/src/components/BannerMessage.vue | 2 +-
.../components/config/BannerConfigEditor.vue | 5 +-
.../src/components/config/ConfigSection.vue | 1 +
.../config/CourseIdConfigEditor.vue | 18 +++---
.../src/views/AdminView/ConfigView.vue | 63 +++----------------
5 files changed, 26 insertions(+), 63 deletions(-)
diff --git a/src/main/resources/frontend/src/components/BannerMessage.vue b/src/main/resources/frontend/src/components/BannerMessage.vue
index 2a8afb81..edaf106f 100644
--- a/src/main/resources/frontend/src/components/BannerMessage.vue
+++ b/src/main/resources/frontend/src/components/BannerMessage.vue
@@ -1,5 +1,5 @@
diff --git a/src/main/resources/frontend/src/components/config/CourseIdConfigEditor.vue b/src/main/resources/frontend/src/components/config/CourseIdConfigEditor.vue
index 09cd273c..c01e60c7 100644
--- a/src/main/resources/frontend/src/components/config/CourseIdConfigEditor.vue
+++ b/src/main/resources/frontend/src/components/config/CourseIdConfigEditor.vue
@@ -65,25 +65,27 @@ const getProxy = (
});
const submitManuelCourseIds = async () => {
- const userConfirmed = window.confirm("Are you sure you want to manually override?");
+ const userConfirmed = window.confirm("Are you sure you want to manually override? \n\nIf you changed the course ID incorrectly, it won't be able to reset properly.");
if (userConfirmed) {
try {
await setCourseIds(appConfigStore.courseNumber, appConfigStore.assignmentIds, appConfigStore.rubricInfo);
- //openManuelCourseIds.value = false;
+ closeEditor()
} catch (e) {
alert("There was problem manually setting the course-related IDs: " + (e as Error).message);
}
}
- closeEditor()
}
const submitCanvasCourseIds = async () => {
- try {
- await setCanvasCourseIds();
- } catch (e) {
- alert("There was problem getting and setting the course-related IDs using Canvas: " + (e as Error).message);
+ const userConfirmed = window.confirm("Are you sure you want to use Canvas to reset ID values? \n\nNote: This will fail if the currently saved Course ID is incorrect.")
+ if (userConfirmed) {
+ try {
+ await setCanvasCourseIds();
+ } catch (e) {
+ alert("There was problem getting and setting the course-related IDs using Canvas: " + (e as Error).message);
+ }
+ closeEditor()
}
- closeEditor()
}
diff --git a/src/main/resources/frontend/src/views/AdminView/ConfigView.vue b/src/main/resources/frontend/src/views/AdminView/ConfigView.vue
index 736ba902..0538c35a 100644
--- a/src/main/resources/frontend/src/views/AdminView/ConfigView.vue
+++ b/src/main/resources/frontend/src/views/AdminView/ConfigView.vue
@@ -11,12 +11,6 @@ import CourseIdConfigEditor from '@/components/config/CourseIdConfigEditor.vue'
const appConfigStore = useAppConfigStore();
-// PopUp Control
-const openLivePhases = ref(false);
-const openCanvasCourseIds = ref(false);
-const openManuelCourseIds = ref(false);
-
-// =========================
onMounted( async () => {
await useAppConfigStore().updateConfig();
})
@@ -31,9 +25,9 @@ onMounted( async () => {
-
Current Message:
-
Current Link:
-
Expires:
+
Current Message:
+
Current Link:
+
Expires:
There is currently no banner message
@@ -53,55 +47,29 @@ onMounted( async () => {
-
+
- Course ID: {{appConfigStore.courseNumber}}
+ Course ID: {{appConfigStore.courseNumber}}
+ Open editor to see the rest of the values
-
-