Details
-
Story
-
Resolution: Done
-
High
-
None
-
None
-
None
-
[2.5] - Sprint 2
Description
Creating the Package Submission page
Fields
The form should contain these fields:
Packagist URL (input). It should be full URL, not only the last part.
Package name (input)
Categories (multi-select)
Submit Package (Button)
Behavior
Adding the Package
When the Submit button is clicked we should:
- check, do we have this package in our catalog already;
- make a request to the packagist to validate that this package exists.
If we already have this Package
When the user is trying to add the package which is already in the catalog we should show the error message. The matching should be done by package URL field.
`This package is already in the package catalog.`
If we can't find this Package on packagist.org
If we can't find the Package we should show the error message below the Package URL field.
Error message:
`We can't find this package on packagist.org. Please check that the URL you provided is correct.`
If everything is fine, we should create a package content item
The `Package` content item should be created under `Packages`.
Approval
We could use workflow for the Package content item:
Stage | Description | Action |
---|---|---|
In Review | `In review` should be displayed for Administrators in the dashboard | Approve |
Approved | The Last stage of the workflow. The content item should be published | - |
Rejection
To reject the package Admin can use the button "Delete draft". The content item should be removed.
Success screen
After form submission, we should show the success screen. The design will be provided soon.
Other
- We don't need a workflow for items created from admin-ui;
- We don't need a workflow for editing;
- Admins will have two buttons: Publish and Approve. It is better to click Approve.