This commit refactors the category id normalization of param-input to
use `Category.asyncFindBySlugPath`.
Now, the category id input will use an async query when the
default/initial value is category slug.
Co-authored-by: Natalie <1555215+nattsw@users.noreply.github.com>
The `onSubmit` hook will only be triggered when the form is valid, so we
need to clear the contents of `serializedData` in advance in `submit`.
Otherwise, it may not throw a validation error.
Since 67a8080e33
in core, the functionality to bookmark a report from the group
Reports tab has been broken. This commit fixes the issue and adds
system spec coverage to prevent regression.
This commit updates the plugin to the latest guidelines, as shown in
discourse-plugin-skeleton, which involves moving a lot of the code to
dedicated files, use proper namespaces, use the autoloader as much as
possible, etc.
During the upgrade to Octane group reports did not have the necessary 'updateParams' function added to have the param input changes bubble up to the parent. This PR adds the missing function as well as a small test to check that params can be inputted as expected (inserting a param would error previously).