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
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MauticPlugin\PlanBundle\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
|
||||
use MauticPlugin\PlanBundle\Entity\PlanObjective;
|
||||
|
||||
/**
|
||||
* Since 0.10.0 objectives have a type, the key of an objective type set up in Settings >
|
||||
* Configuration > Plan Settings (parameter plan_objective_types). Adds plan_objectives.type for
|
||||
* installs created before 0.10.0. The column is nullable: existing objectives have no type yet, and
|
||||
* each one must be given a type before the plan can be saved again (validation requires it). Runs only
|
||||
* when the column is missing.
|
||||
*/
|
||||
class Version_0_10_0 extends AbstractMigration
|
||||
{
|
||||
protected function isApplicable(Schema $schema): bool
|
||||
{
|
||||
$objectives = $this->concatPrefix(PlanObjective::TABLE_NAME);
|
||||
|
||||
if (!$schema->hasTable($objectives)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !$schema->getTable($objectives)->hasColumn('type');
|
||||
}
|
||||
|
||||
protected function up(): void
|
||||
{
|
||||
$objectives = $this->concatPrefix(PlanObjective::TABLE_NAME);
|
||||
$table = $this->entityManager->getConnection()->createSchemaManager()->introspectTable($objectives);
|
||||
|
||||
if (!$table->hasColumn('type')) {
|
||||
$this->addSql(sprintf('ALTER TABLE %s ADD type VARCHAR(%d) DEFAULT NULL', $objectives, PlanObjective::TYPE_MAX_LENGTH));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user