bbd9720ab3
## Summary Removes gauge chart from the chart-type picker and deletes existing gauge widgets via a workspace migration. The gauge was rendering a hardcoded `0.7 / "Progress"` stub regardless of configuration -- never wired to real data. The contract stays in place. We keep `WidgetConfigurationType.GAUGE_CHART`, the DTO, the GraphQL union member, and the gauge folder -- so stored gauge JSON still resolves through the schema. The render path falls through to `default: return null`, so any un-migrated gauge widget renders as an empty cell, not a crash. This PR just removes existing gauge widgets if there are any (via `upgrade:2-3:delete-gauge-widgets`). The deliberate cleanup -- deleting the type definitions, the gauge folder, the DTO -- comes in a follow-up PR after the migration has run. --------- Co-authored-by: Charles Bochet <charles@twenty.com>
25 lines
1.3 KiB
TypeScript
25 lines
1.3 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
|
|
import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/workspace-iterator.module';
|
|
import { DropMessageDirectionFieldCommand } from 'src/database/commands/upgrade-version-command/2-3/2-3-workspace-command-1777400000000-drop-message-direction-field.command';
|
|
import { BackfillImageIdentifierFieldMetadataIdCommand } from 'src/database/commands/upgrade-version-command/2-3/2-3-workspace-command-1777920000000-backfill-image-identifier-field-metadata-id.command';
|
|
import { DeleteGaugeWidgetsCommand } from 'src/database/commands/upgrade-version-command/2-3/2-3-workspace-command-1798000000000-delete-gauge-widgets.command';
|
|
import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
|
|
import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module';
|
|
import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration.module';
|
|
|
|
@Module({
|
|
imports: [
|
|
ApplicationModule,
|
|
WorkspaceCacheModule,
|
|
WorkspaceIteratorModule,
|
|
WorkspaceMigrationModule,
|
|
],
|
|
providers: [
|
|
DropMessageDirectionFieldCommand,
|
|
BackfillImageIdentifierFieldMetadataIdCommand,
|
|
DeleteGaugeWidgetsCommand,
|
|
],
|
|
})
|
|
export class V2_3_UpgradeVersionCommandModule {}
|