-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add wizard / UI to generate multiple tutorials & users at once #381
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dudrie
added
🌟 enhancement
New feature or request
🗄 server
Issue is related to the sever
💻 client
Issue is related to the client
🎆 QOL
Issue is related to a quality of life improvment
labels
May 29, 2020
Dudrie
force-pushed
the
issue-346-Automatically_create_users_tutorials
branch
from
May 29, 2020 15:41
2d12efa
to
b318e2c
Compare
Dudrie
force-pushed
the
issue-346-Automatically_create_users_tutorials
branch
from
June 1, 2020 14:19
e1e4de2
to
5b8e98c
Compare
This pipe uses the class-transformer options and does validate the incoming object before (!) converting it to a class with the NestJS' build in ValidationPipe.
This takes in the DTO and generates multiple tutorials according to the provided information. Returns all created tutorials.
This is a first draft of the component which gets adjusted as needed.
All "children" (ie step components) can now use some functionalities provided by a special context. These functionalities can be used to customize when and if the "Next-Button" actually resolves it's action (ie waiting for a fetch with moving forward if the fetch was successful).
This is without functionality and TabPanels for the weekdays, yet.
This splits up the code into several smaller components.
This also adds sorting of the excluded dates / intervals. Intervals take their starting (!) date for sorting.
This shows a simple "yes/no"-Dialog with customizable button labels aswell as title and content. The showConfirmationDialog returns a Promise<boolean> which is true if the user clicked "yes" and false in all other cases.
This would allow to display row-specific errors later.
This tries to map slot names to existing tutorials. If they match the tutorial's ID is added to the form data of that user.
This lets the user choose a .csv file. If "valid" (against a simple MIME type check) the content of the file will be set as csvInput - if later will be overridden by this action the user has to confirm the override.
This makes it easier to access different types of snackbares from one hook (normal, error or with list). Additionally a new useSnackbarWithList() hook was added to ease the process of creating a SnackbarWithList.
Related components are those which either use the SnackbarWithList component or which previously used both hooks: useSnackbar() and useErrorSnackbar(). This reduces the code for all components that use the SnackbarWithList component about a few lines.
This changes the return type to an array of object s which can include a value or an error message each. This way the user can be informed about which users where created and which were not (due to failure).
Now, the tests check if the correct ValueOrError object gets returned with the anticipated error message.
This basicly reverts the previous change but with the addition of deleting all created users before throwing the error. This effectively reverts the DB back into it's state before the request.
SelectInterval: Fix not propagating invalid intervals properly if start or end date are "null". If one of those are "null" an invalid Interval with a corresponding message is created and set as value. WeekdayBox: Sorting failed if one of the intervals where invalid. Now, invalid intervals get sorted to the top of the list.
This was referenced Jul 11, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
💻 client
Issue is related to the client
🌟 enhancement
New feature or request
🎆 QOL
Issue is related to a quality of life improvment
🗄 server
Issue is related to the sever
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎫 Description
This PR implements the neccessary steps to support the easy generation of multiple users & multiple tutorials.
Server side changes
/tutorial/generate@POST
route which generates multiple tutorials (only accessible by admins)./user/generate@POST
route which creates multiple users based on the given DTOs (only accessible by admins).Client side changes
TutorialManagement
view.SheetSelector
to show a loading indicator while loading sheets from the server.🔒 Closes