{renderCSVFileName()}
@@ -414,12 +535,23 @@ Section 001`
Review your CSV file
- Your file is valid! If this looks correct proceed with download
-
+ Your file is valid! If this looks correct, click "Submit" to proceed.
+
+
+
+
+
+
+
+
+ {renderLoadingText()}
+
+
+
)
}
@@ -427,20 +559,36 @@ Section 001`
return sectionNames.map((name, i) => { return { rowNumber: i + 1, sectionName: name } })
}
+ const renderSuccess = (): JSX.Element => {
+ const { canvasURL, course } = props.globals
+ const settingsURL = `${canvasURL}/courses/${course.id}/settings`
+ return (
+
+
+
+ New sections have been added!
+
+
+ See your sections on the Canvas Settings page for your course.
+
+
+ )
+ }
const renderComponent = (): JSX.Element => {
switch (pageState.state) {
- case BulkSectionCreatePageState.LoadingExistingSectionNames:
+ case BulkSectionCreatePageState.UploadPending:
return renderUpload()
case BulkSectionCreatePageState.LoadingExistingSectionNamesFailed:
return renderAPIError()
- case BulkSectionCreatePageState.Upload:
- return renderUpload()
case BulkSectionCreatePageState.InvalidUpload:
return renderInvalidUpload()
- case BulkSectionCreatePageState.Confirm:
+ case BulkSectionCreatePageState.Submit:
+ case BulkSectionCreatePageState.Saving:
return renderConfirm(sectionNamesToSection(sectionNames))
- case BulkSectionCreatePageState.Done:
- return (
DONE
)
+ case BulkSectionCreatePageState.CreateSectionsSuccess:
+ return renderSuccess()
+ case BulkSectionCreatePageState.CreateSectionsError:
+ return renderPartialSuccess()
default:
return