-
Notifications
You must be signed in to change notification settings - Fork 209
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 process categories #597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent job. Few changes and we're good to go.
@@ -7,40 +7,49 @@ | |||
use ProcessMaker\Exception\ValidationException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this manager completely. Move the validation rules into the model and the business logic into the controller.
@@ -22,13 +22,17 @@ class ProcessCategory extends Model | |||
use ValidatingTrait; | |||
use Uuid; | |||
|
|||
const STATUS_ACTIVE = 'ACTIVE'; | |||
const STATUS_INACTIVE = 'INACTIVE'; | |||
|
|||
/** | |||
* Validation rules. | |||
* | |||
* @var array $rules | |||
*/ | |||
protected $rules = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the rules public so we can use them in the controller.
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class AddStatusToProcessCategoriesTable extends Migration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the current migration completely. Don't add an additional migration.
@nolanpro when editing a category the alert message shows "New Category Successfully Created" should say Category Updated Successfully |
Ok should be fixed |
#537
In addition to adding the basic UI and crud stuff, this also refactors and cleans up a bunch of things.
No jest tests yet since I'm looking into a babel transform issue and this