feat: Add TargetType form and migration for plan targets
- Implemented TargetType form for managing target details including name, type, priority, stages, estimated size, profile criteria, pain points, value proposition, and preferred channels. - Created migration scripts for adding type and priority columns to plan objectives and tasks. - Added migration for creating plan targets and plan target stages tables, including foreign key constraints. - Introduced stakeholder management with forms and views for creating, editing, and listing stakeholders. - Enhanced UI with read more functionality for long text descriptions and filtering options in plan tab tables.
This commit is contained in:
1 parent
8c8d7a6f95
commit
8696acd01c
52 files changed
+3178
-125
No files matched your search
@@ -53,7 +53,7 @@ class PlanController extends AbstractStandardFormController
|
||||
}
|
||||
|
||||
/**
|
||||
* The plan detail page (tabs: Details, Description, Objectives, Allocation, Targets, Tasks).
|
||||
* The plan detail page (tabs: Details, Description, Objectives, Allocations, Targets, Tasks).
|
||||
*
|
||||
* Core's viewStandard() isn't used: for users who aren't administrators it checks an
|
||||
* "<entity>:export:enable" permission, which plans don't have.
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\PlanBundle\Controller;
|
||||
|
||||
use Mautic\CoreBundle\Controller\AbstractStandardFormController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* List, create, edit and delete stakeholders (Planning > Stakeholders), the global directory, using
|
||||
* core's standard CRUD flow. Stakeholders are independent of plans; plans link to them from their
|
||||
* Stakeholders tab.
|
||||
*
|
||||
* Model plan.stakeholder (mautic.plan.model.stakeholder), permission base plan:stakeholders,
|
||||
* translation base mautic.plan.stakeholder.
|
||||
*/
|
||||
class StakeholderController extends AbstractStandardFormController
|
||||
{
|
||||
public const ROUTE_INDEX = 'plan_stakeholder_index';
|
||||
public const ROUTE_ACTION = 'plan_stakeholder_action';
|
||||
|
||||
protected function getModelName(): string
|
||||
{
|
||||
return 'plan.stakeholder';
|
||||
}
|
||||
|
||||
protected function getTemplateBase(): string
|
||||
{
|
||||
return '@Plan/Stakeholder';
|
||||
}
|
||||
|
||||
protected function getIndexRoute(): string
|
||||
{
|
||||
return self::ROUTE_INDEX;
|
||||
}
|
||||
|
||||
protected function getActionRoute(): string
|
||||
{
|
||||
return self::ROUTE_ACTION;
|
||||
}
|
||||
|
||||
protected function getJsLoadMethodPrefix(): string
|
||||
{
|
||||
return 'planStakeholder';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $page
|
||||
*/
|
||||
public function indexAction(Request $request, $page = 1): Response
|
||||
{
|
||||
return $this->indexStandard($request, $page);
|
||||
}
|
||||
|
||||
public function newAction(Request $request): Response
|
||||
{
|
||||
return $this->newStandard($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $objectId
|
||||
* @param bool $ignorePost
|
||||
*/
|
||||
public function editAction(Request $request, $objectId, $ignorePost = false): Response
|
||||
{
|
||||
return $this->editStandard($request, $objectId, $ignorePost);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $objectId
|
||||
*/
|
||||
public function deleteAction(Request $request, $objectId): Response
|
||||
{
|
||||
return $this->deleteStandard($request, $objectId);
|
||||
}
|
||||
|
||||
public function batchDeleteAction(Request $request): Response
|
||||
{
|
||||
return $this->batchDeleteStandard($request);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user