[Dashboards] - Fix seeding not working for YC workspace because of duplicate IDs (#14591)
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
export const PAGE_LAYOUT_SEEDS = {
|
||||
SALES_DASHBOARD: 'SALES_DASHBOARD',
|
||||
CUSTOMER_DASHBOARD: 'CUSTOMER_DASHBOARD',
|
||||
TEAM_DASHBOARD: 'TEAM_DASHBOARD',
|
||||
REVENUE_ANALYTICS: 'REVENUE_ANALYTICS',
|
||||
MARKETING_METRICS: 'MARKETING_METRICS',
|
||||
SUPPORT_DASHBOARD: 'SUPPORT_DASHBOARD',
|
||||
PRODUCT_USAGE: 'PRODUCT_USAGE',
|
||||
OPERATIONS_KPI: 'OPERATIONS_KPI',
|
||||
FINANCE_OVERVIEW: 'FINANCE_OVERVIEW',
|
||||
EXECUTIVE_SUMMARY: 'EXECUTIVE_SUMMARY',
|
||||
};
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
import { PAGE_LAYOUT_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-data-seeds.constant';
|
||||
|
||||
export const PAGE_LAYOUT_TAB_SEED_IDS = {
|
||||
SALES_OVERVIEW: '20202020-3fff-4590-8a63-00d861e968ad',
|
||||
SALES_DETAILS: '20202020-3db8-449c-aac8-359055276c93',
|
||||
CUSTOMER_OVERVIEW: '20202020-95ae-4979-8c32-a48313afaa11',
|
||||
CUSTOMER_ANALYTICS: '20202020-4321-43c9-8dc2-d9fb697d39ba',
|
||||
TEAM_OVERVIEW: '20202020-e58d-441b-ae1e-6ee8dd157653',
|
||||
TEAM_METRICS: '20202020-92f2-4586-bd40-6e021198c8da',
|
||||
REVENUE_MAIN: '20202020-a498-4648-836e-a7e89013e115',
|
||||
MARKETING_MAIN: '20202020-509b-4dac-a8ec-7255687a6b49',
|
||||
SUPPORT_MAIN: '20202020-3c11-49d9-8bc7-a18245604aa2',
|
||||
PRODUCT_MAIN: '20202020-6885-44ae-bc21-f450de57a567',
|
||||
OPERATIONS_MAIN: '20202020-c4eb-456a-9266-0c44f90e6136',
|
||||
FINANCE_MAIN: '20202020-45d2-46d1-ae75-69bc82dea9ef',
|
||||
EXECUTIVE_MAIN: '20202020-264b-4801-9656-8bdd73ca7f9a',
|
||||
};
|
||||
|
||||
type PageLayoutTabSeed = {
|
||||
id: string;
|
||||
title: string;
|
||||
position: number;
|
||||
pageLayoutId: string;
|
||||
workspaceId: string;
|
||||
};
|
||||
|
||||
export const getPageLayoutTabDataSeeds = (
|
||||
workspaceId: string,
|
||||
): PageLayoutTabSeed[] => [
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.SALES_OVERVIEW,
|
||||
title: 'Overview',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.SALES_DASHBOARD,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.SALES_DETAILS,
|
||||
title: 'Details',
|
||||
position: 1,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.SALES_DASHBOARD,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.CUSTOMER_OVERVIEW,
|
||||
title: 'Overview',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.CUSTOMER_DASHBOARD,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.CUSTOMER_ANALYTICS,
|
||||
title: 'Analytics',
|
||||
position: 1,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.CUSTOMER_DASHBOARD,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.TEAM_OVERVIEW,
|
||||
title: 'Overview',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.TEAM_DASHBOARD,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.TEAM_METRICS,
|
||||
title: 'Metrics',
|
||||
position: 1,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.TEAM_DASHBOARD,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.REVENUE_MAIN,
|
||||
title: 'Revenue',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.REVENUE_ANALYTICS,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.MARKETING_MAIN,
|
||||
title: 'Marketing',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.MARKETING_METRICS,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.SUPPORT_MAIN,
|
||||
title: 'Support',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.SUPPORT_DASHBOARD,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.PRODUCT_MAIN,
|
||||
title: 'Product',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.PRODUCT_USAGE,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.OPERATIONS_MAIN,
|
||||
title: 'Operations',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.OPERATIONS_KPI,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.FINANCE_MAIN,
|
||||
title: 'Finance',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.FINANCE_OVERVIEW,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_TAB_SEED_IDS.EXECUTIVE_MAIN,
|
||||
title: 'Executive',
|
||||
position: 0,
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.EXECUTIVE_SUMMARY,
|
||||
workspaceId,
|
||||
},
|
||||
];
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
export const PAGE_LAYOUT_TAB_SEEDS = {
|
||||
SALES_OVERVIEW: 'SALES_OVERVIEW_TAB',
|
||||
SALES_DETAILS: 'SALES_DETAILS_TAB',
|
||||
CUSTOMER_OVERVIEW: 'CUSTOMER_OVERVIEW_TAB',
|
||||
CUSTOMER_ANALYTICS: 'CUSTOMER_ANALYTICS_TAB',
|
||||
TEAM_OVERVIEW: 'TEAM_OVERVIEW_TAB',
|
||||
TEAM_METRICS: 'TEAM_METRICS_TAB',
|
||||
REVENUE_MAIN: 'REVENUE_MAIN_TAB',
|
||||
MARKETING_MAIN: 'MARKETING_MAIN_TAB',
|
||||
SUPPORT_MAIN: 'SUPPORT_MAIN_TAB',
|
||||
PRODUCT_MAIN: 'PRODUCT_MAIN_TAB',
|
||||
OPERATIONS_MAIN: 'OPERATIONS_MAIN_TAB',
|
||||
FINANCE_MAIN: 'FINANCE_MAIN_TAB',
|
||||
EXECUTIVE_MAIN: 'EXECUTIVE_MAIN_TAB',
|
||||
};
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
export const PAGE_LAYOUT_WIDGET_SEEDS = {
|
||||
SALES_PIPELINE_NUMBER: 'SALES_PIPELINE_NUMBER_WIDGET',
|
||||
SALES_CONVERSION_GAUGE: 'SALES_CONVERSION_GAUGE_WIDGET',
|
||||
SALES_MONTHLY_REVENUE: 'SALES_MONTHLY_REVENUE_WIDGET',
|
||||
SALES_DEALS_BY_STAGE: 'SALES_DEALS_BY_STAGE_WIDGET',
|
||||
SALES_TOP_PERFORMERS: 'SALES_TOP_PERFORMERS_WIDGET',
|
||||
SALES_FORECAST_LINE: 'SALES_FORECAST_LINE_WIDGET',
|
||||
|
||||
CUSTOMER_TOTAL_COUNT: 'CUSTOMER_TOTAL_COUNT_WIDGET',
|
||||
CUSTOMER_ACQUISITION_TREND: 'CUSTOMER_ACQUISITION_TREND_WIDGET',
|
||||
CUSTOMER_SEGMENTS_PIE: 'CUSTOMER_SEGMENTS_PIE_WIDGET',
|
||||
CUSTOMER_SATISFACTION_GAUGE: 'CUSTOMER_SATISFACTION_GAUGE_WIDGET',
|
||||
CUSTOMER_RETENTION_RATE: 'CUSTOMER_RETENTION_RATE_WIDGET',
|
||||
CUSTOMER_LIFETIME_VALUE: 'CUSTOMER_LIFETIME_VALUE_WIDGET',
|
||||
|
||||
TEAM_ACTIVITY_OVERVIEW: 'TEAM_ACTIVITY_OVERVIEW_WIDGET',
|
||||
TEAM_PRODUCTIVITY_METRICS: 'TEAM_PRODUCTIVITY_METRICS_WIDGET',
|
||||
TEAM_GOAL_PROGRESS: 'TEAM_GOAL_PROGRESS_WIDGET',
|
||||
TEAM_MEMBER_LEADERBOARD: 'TEAM_MEMBER_LEADERBOARD_WIDGET',
|
||||
|
||||
REVENUE_TOTAL_NUMBER: 'REVENUE_TOTAL_NUMBER_WIDGET',
|
||||
REVENUE_GROWTH_TREND: 'REVENUE_GROWTH_TREND_WIDGET',
|
||||
REVENUE_BY_PRODUCT: 'REVENUE_BY_PRODUCT_WIDGET',
|
||||
REVENUE_BY_REGION: 'REVENUE_BY_REGION_WIDGET',
|
||||
|
||||
MARKETING_LEADS_GENERATED: 'MARKETING_LEADS_GENERATED_WIDGET',
|
||||
MARKETING_CAMPAIGN_ROI: 'MARKETING_CAMPAIGN_ROI_WIDGET',
|
||||
MARKETING_CHANNEL_PERFORMANCE: 'MARKETING_CHANNEL_PERFORMANCE_WIDGET',
|
||||
MARKETING_CONVERSION_FUNNEL: 'MARKETING_CONVERSION_FUNNEL_WIDGET',
|
||||
|
||||
SUPPORT_TICKET_COUNT: 'SUPPORT_TICKET_COUNT_WIDGET',
|
||||
SUPPORT_RESOLUTION_TIME: 'SUPPORT_RESOLUTION_TIME_WIDGET',
|
||||
SUPPORT_SATISFACTION_SCORE: 'SUPPORT_SATISFACTION_SCORE_WIDGET',
|
||||
SUPPORT_TICKET_BY_PRIORITY: 'SUPPORT_TICKET_BY_PRIORITY_WIDGET',
|
||||
|
||||
PRODUCT_ACTIVE_USERS: 'PRODUCT_ACTIVE_USERS_WIDGET',
|
||||
PRODUCT_FEATURE_ADOPTION: 'PRODUCT_FEATURE_ADOPTION_WIDGET',
|
||||
PRODUCT_USAGE_HEATMAP: 'PRODUCT_USAGE_HEATMAP_WIDGET',
|
||||
PRODUCT_USER_ENGAGEMENT: 'PRODUCT_USER_ENGAGEMENT_WIDGET',
|
||||
|
||||
OPERATIONS_EFFICIENCY_GAUGE: 'OPERATIONS_EFFICIENCY_GAUGE_WIDGET',
|
||||
OPERATIONS_COST_BREAKDOWN: 'OPERATIONS_COST_BREAKDOWN_WIDGET',
|
||||
OPERATIONS_PROCESS_TIME: 'OPERATIONS_PROCESS_TIME_WIDGET',
|
||||
OPERATIONS_ERROR_RATE: 'OPERATIONS_ERROR_RATE_WIDGET',
|
||||
|
||||
FINANCE_CASH_FLOW: 'FINANCE_CASH_FLOW_WIDGET',
|
||||
FINANCE_EXPENSES_PIE: 'FINANCE_EXPENSES_PIE_WIDGET',
|
||||
FINANCE_PROFIT_MARGIN: 'FINANCE_PROFIT_MARGIN_WIDGET',
|
||||
FINANCE_BUDGET_VARIANCE: 'FINANCE_BUDGET_VARIANCE_WIDGET',
|
||||
|
||||
EXECUTIVE_KEY_METRICS: 'EXECUTIVE_KEY_METRICS_WIDGET',
|
||||
EXECUTIVE_COMPANY_HEALTH: 'EXECUTIVE_COMPANY_HEALTH_WIDGET',
|
||||
EXECUTIVE_QUARTERLY_REVIEW: 'EXECUTIVE_QUARTERLY_REVIEW_WIDGET',
|
||||
EXECUTIVE_STRATEGIC_GOALS: 'EXECUTIVE_STRATEGIC_GOALS_WIDGET',
|
||||
};
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import { createHash } from 'crypto';
|
||||
|
||||
export const generateSeedId = (
|
||||
workspaceId: string,
|
||||
seedName: string,
|
||||
): string => {
|
||||
const hash = createHash('sha256')
|
||||
.update(`${workspaceId}-${seedName}`)
|
||||
.digest('hex');
|
||||
|
||||
return [
|
||||
hash.substring(0, 8),
|
||||
hash.substring(8, 12),
|
||||
'4' + hash.substring(13, 16),
|
||||
((parseInt(hash.substring(16, 17), 16) & 0x3) | 0x8).toString(16) +
|
||||
hash.substring(17, 20),
|
||||
hash.substring(20, 32),
|
||||
].join('-');
|
||||
};
|
||||
+12
-23
@@ -1,17 +1,6 @@
|
||||
import { PageLayoutType } from 'src/engine/core-modules/page-layout/enums/page-layout-type.enum';
|
||||
|
||||
export const PAGE_LAYOUT_SEED_IDS = {
|
||||
SALES_DASHBOARD: '20202020-1af3-467c-866d-5b2fdf7851ac',
|
||||
CUSTOMER_DASHBOARD: '20202020-249e-4bee-be65-d3a89b0a2ffb',
|
||||
TEAM_DASHBOARD: '20202020-78dd-41f5-9bbf-6d0fe532ac94',
|
||||
REVENUE_ANALYTICS: '20202020-7d8e-4c0e-bae0-e46ecf3aee6c',
|
||||
MARKETING_METRICS: '20202020-1939-4ffa-8f84-1ca4e29e3e92',
|
||||
SUPPORT_DASHBOARD: '20202020-ffcc-47c5-ae0f-667d9c223a3d',
|
||||
PRODUCT_USAGE: '20202020-a2d4-4c48-bedf-c4f64bd02d3e',
|
||||
OPERATIONS_KPI: '20202020-41c1-4e73-8abc-46b3cca612b3',
|
||||
FINANCE_OVERVIEW: '20202020-553b-4552-bc6f-2805906ee792',
|
||||
EXECUTIVE_SUMMARY: '20202020-0fce-4d5b-a7d8-d5c1b0fa4970',
|
||||
};
|
||||
import { PAGE_LAYOUT_SEEDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-seeds.constant';
|
||||
import { generateSeedId } from 'src/engine/workspace-manager/dev-seeder/core/utils/generate-seed-id.util';
|
||||
|
||||
type PageLayoutSeed = {
|
||||
id: string;
|
||||
@@ -25,70 +14,70 @@ export const getPageLayoutDataSeeds = (
|
||||
workspaceId: string,
|
||||
): PageLayoutSeed[] => [
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.SALES_DASHBOARD,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.SALES_DASHBOARD),
|
||||
name: 'Sales Dashboard Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.CUSTOMER_DASHBOARD,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.CUSTOMER_DASHBOARD),
|
||||
name: 'Customer Dashboard Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.TEAM_DASHBOARD,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.TEAM_DASHBOARD),
|
||||
name: 'Team Dashboard Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.REVENUE_ANALYTICS,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.REVENUE_ANALYTICS),
|
||||
name: 'Revenue Analytics Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.MARKETING_METRICS,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.MARKETING_METRICS),
|
||||
name: 'Marketing Metrics Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.SUPPORT_DASHBOARD,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.SUPPORT_DASHBOARD),
|
||||
name: 'Support Dashboard Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.PRODUCT_USAGE,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.PRODUCT_USAGE),
|
||||
name: 'Product Usage Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.OPERATIONS_KPI,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.OPERATIONS_KPI),
|
||||
name: 'Operations KPI Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.FINANCE_OVERVIEW,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.FINANCE_OVERVIEW),
|
||||
name: 'Finance Overview Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_SEED_IDS.EXECUTIVE_SUMMARY,
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.EXECUTIVE_SUMMARY),
|
||||
name: 'Executive Summary Layout',
|
||||
type: PageLayoutType.DASHBOARD,
|
||||
objectMetadataId: null,
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
import { PAGE_LAYOUT_SEEDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-seeds.constant';
|
||||
import { PAGE_LAYOUT_TAB_SEEDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-tab-seeds.constant';
|
||||
import { generateSeedId } from 'src/engine/workspace-manager/dev-seeder/core/utils/generate-seed-id.util';
|
||||
|
||||
type PageLayoutTabSeed = {
|
||||
id: string;
|
||||
title: string;
|
||||
position: number;
|
||||
pageLayoutId: string;
|
||||
workspaceId: string;
|
||||
};
|
||||
|
||||
export const getPageLayoutTabDataSeeds = (
|
||||
workspaceId: string,
|
||||
): PageLayoutTabSeed[] => [
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.SALES_OVERVIEW),
|
||||
title: 'Overview',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.SALES_DASHBOARD,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.SALES_DETAILS),
|
||||
title: 'Details',
|
||||
position: 1,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.SALES_DASHBOARD,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.CUSTOMER_OVERVIEW),
|
||||
title: 'Overview',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.CUSTOMER_DASHBOARD,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.CUSTOMER_ANALYTICS),
|
||||
title: 'Analytics',
|
||||
position: 1,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.CUSTOMER_DASHBOARD,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.TEAM_OVERVIEW),
|
||||
title: 'Overview',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.TEAM_DASHBOARD),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.TEAM_METRICS),
|
||||
title: 'Metrics',
|
||||
position: 1,
|
||||
pageLayoutId: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.TEAM_DASHBOARD),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.REVENUE_MAIN),
|
||||
title: 'Revenue',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.REVENUE_ANALYTICS,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.MARKETING_MAIN),
|
||||
title: 'Marketing',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.MARKETING_METRICS,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.SUPPORT_MAIN),
|
||||
title: 'Support',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.SUPPORT_DASHBOARD,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.PRODUCT_MAIN),
|
||||
title: 'Product',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.PRODUCT_USAGE),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.OPERATIONS_MAIN),
|
||||
title: 'Operations',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.OPERATIONS_KPI),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.FINANCE_MAIN),
|
||||
title: 'Finance',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.FINANCE_OVERVIEW,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_TAB_SEEDS.EXECUTIVE_MAIN),
|
||||
title: 'Executive',
|
||||
position: 0,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.EXECUTIVE_SUMMARY,
|
||||
),
|
||||
workspaceId,
|
||||
},
|
||||
];
|
||||
+703
@@ -0,0 +1,703 @@
|
||||
import { WidgetType } from 'src/engine/core-modules/page-layout/enums/widget-type.enum';
|
||||
import { PAGE_LAYOUT_TAB_SEEDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-tab-seeds.constant';
|
||||
import { PAGE_LAYOUT_WIDGET_SEEDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-widget-seeds.constant';
|
||||
import { generateSeedId } from 'src/engine/workspace-manager/dev-seeder/core/utils/generate-seed-id.util';
|
||||
|
||||
type PageLayoutWidgetDataSeed = {
|
||||
id: string;
|
||||
pageLayoutTabId: string;
|
||||
title: string;
|
||||
type: WidgetType;
|
||||
gridPosition: {
|
||||
row: number;
|
||||
column: number;
|
||||
rowSpan: number;
|
||||
columnSpan: number;
|
||||
};
|
||||
configuration: Record<string, unknown> | null;
|
||||
objectMetadataId: string | null;
|
||||
};
|
||||
|
||||
export const getPageLayoutWidgetDataSeeds = (
|
||||
workspaceId: string,
|
||||
): PageLayoutWidgetDataSeed[] => [
|
||||
// Sales Overview Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SALES_PIPELINE_NUMBER,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SALES_OVERVIEW,
|
||||
),
|
||||
title: 'Pipeline Value',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SALES_CONVERSION_GAUGE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SALES_OVERVIEW,
|
||||
),
|
||||
title: 'Conversion Rate',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SALES_MONTHLY_REVENUE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SALES_OVERVIEW,
|
||||
),
|
||||
title: 'Monthly Revenue',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 7, rowSpan: 8, columnSpan: 5 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SALES_DEALS_BY_STAGE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SALES_OVERVIEW,
|
||||
),
|
||||
title: 'Deals by Stage',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 4, column: 0, rowSpan: 4, columnSpan: 6 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Sales Details Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SALES_TOP_PERFORMERS,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SALES_DETAILS,
|
||||
),
|
||||
title: 'Top Sales Performers',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 5, columnSpan: 5 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SALES_FORECAST_LINE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SALES_DETAILS,
|
||||
),
|
||||
title: 'Sales Forecast',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 5, rowSpan: 5, columnSpan: 7 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Customer Overview Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.CUSTOMER_TOTAL_COUNT,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.CUSTOMER_OVERVIEW,
|
||||
),
|
||||
title: 'Total Customers',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.CUSTOMER_ACQUISITION_TREND,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.CUSTOMER_OVERVIEW,
|
||||
),
|
||||
title: 'Customer Acquisition',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 6, columnSpan: 5 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.CUSTOMER_SEGMENTS_PIE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.CUSTOMER_OVERVIEW,
|
||||
),
|
||||
title: 'Customer Segments',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 8, rowSpan: 6, columnSpan: 4 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Customer Analytics Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.CUSTOMER_SATISFACTION_GAUGE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.CUSTOMER_ANALYTICS,
|
||||
),
|
||||
title: 'Customer Satisfaction',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.CUSTOMER_RETENTION_RATE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.CUSTOMER_ANALYTICS,
|
||||
),
|
||||
title: 'Retention Rate',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 4, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.CUSTOMER_LIFETIME_VALUE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.CUSTOMER_ANALYTICS,
|
||||
),
|
||||
title: 'Lifetime Value',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 7, rowSpan: 6, columnSpan: 5 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Team Overview Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.TEAM_ACTIVITY_OVERVIEW,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.TEAM_OVERVIEW,
|
||||
),
|
||||
title: 'Team Activity',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 5, columnSpan: 6 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.TEAM_PRODUCTIVITY_METRICS,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.TEAM_OVERVIEW,
|
||||
),
|
||||
title: 'Productivity Metrics',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 6, rowSpan: 5, columnSpan: 6 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Team Metrics Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.TEAM_GOAL_PROGRESS,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.TEAM_METRICS,
|
||||
),
|
||||
title: 'Goal Progress',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 4, columnSpan: 6 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.TEAM_MEMBER_LEADERBOARD,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.TEAM_METRICS,
|
||||
),
|
||||
title: 'Team Leaderboard',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 6, rowSpan: 6, columnSpan: 6 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Revenue Main Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.REVENUE_TOTAL_NUMBER,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.REVENUE_MAIN,
|
||||
),
|
||||
title: 'Total Revenue',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.REVENUE_GROWTH_TREND,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.REVENUE_MAIN,
|
||||
),
|
||||
title: 'Revenue Growth',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 6, columnSpan: 5 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.REVENUE_BY_PRODUCT,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.REVENUE_MAIN,
|
||||
),
|
||||
title: 'Revenue by Product',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 8, rowSpan: 6, columnSpan: 4 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_WIDGET_SEEDS.REVENUE_BY_REGION),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.REVENUE_MAIN,
|
||||
),
|
||||
title: 'Revenue by Region',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 6, column: 0, rowSpan: 4, columnSpan: 12 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Marketing Main Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.MARKETING_LEADS_GENERATED,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.MARKETING_MAIN,
|
||||
),
|
||||
title: 'Leads Generated',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.MARKETING_CAMPAIGN_ROI,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.MARKETING_MAIN,
|
||||
),
|
||||
title: 'Campaign ROI',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.MARKETING_CHANNEL_PERFORMANCE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.MARKETING_MAIN,
|
||||
),
|
||||
title: 'Channel Performance',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 7, rowSpan: 6, columnSpan: 5 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.MARKETING_CONVERSION_FUNNEL,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.MARKETING_MAIN,
|
||||
),
|
||||
title: 'Conversion Funnel',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 4, column: 0, rowSpan: 4, columnSpan: 7 },
|
||||
configuration: { graphType: 'FUNNEL' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Support Main Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SUPPORT_TICKET_COUNT,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SUPPORT_MAIN,
|
||||
),
|
||||
title: 'Open Tickets',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SUPPORT_RESOLUTION_TIME,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SUPPORT_MAIN,
|
||||
),
|
||||
title: 'Avg Resolution Time',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SUPPORT_SATISFACTION_SCORE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SUPPORT_MAIN,
|
||||
),
|
||||
title: 'Satisfaction Score',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 6, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.SUPPORT_TICKET_BY_PRIORITY,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.SUPPORT_MAIN,
|
||||
),
|
||||
title: 'Tickets by Priority',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 2, column: 0, rowSpan: 4, columnSpan: 6 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Product Main Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.PRODUCT_ACTIVE_USERS,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.PRODUCT_MAIN,
|
||||
),
|
||||
title: 'Active Users',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.PRODUCT_FEATURE_ADOPTION,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.PRODUCT_MAIN,
|
||||
),
|
||||
title: 'Feature Adoption',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 6, columnSpan: 5 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.PRODUCT_USAGE_HEATMAP,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.PRODUCT_MAIN,
|
||||
),
|
||||
title: 'Usage Heatmap',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 8, rowSpan: 6, columnSpan: 4 },
|
||||
configuration: { graphType: 'HEATMAP' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.PRODUCT_USER_ENGAGEMENT,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.PRODUCT_MAIN,
|
||||
),
|
||||
title: 'User Engagement',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 6, column: 0, rowSpan: 4, columnSpan: 12 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Operations Main Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.OPERATIONS_EFFICIENCY_GAUGE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.OPERATIONS_MAIN,
|
||||
),
|
||||
title: 'Efficiency Score',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.OPERATIONS_COST_BREAKDOWN,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.OPERATIONS_MAIN,
|
||||
),
|
||||
title: 'Cost Breakdown',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 4, rowSpan: 6, columnSpan: 4 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.OPERATIONS_PROCESS_TIME,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.OPERATIONS_MAIN,
|
||||
),
|
||||
title: 'Process Time',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 8, rowSpan: 6, columnSpan: 4 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.OPERATIONS_ERROR_RATE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.OPERATIONS_MAIN,
|
||||
),
|
||||
title: 'Error Rate',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 4, column: 0, rowSpan: 2, columnSpan: 4 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Finance Main Tab Widgets
|
||||
{
|
||||
id: generateSeedId(workspaceId, PAGE_LAYOUT_WIDGET_SEEDS.FINANCE_CASH_FLOW),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.FINANCE_MAIN,
|
||||
),
|
||||
title: 'Cash Flow',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 6, columnSpan: 6 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.FINANCE_EXPENSES_PIE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.FINANCE_MAIN,
|
||||
),
|
||||
title: 'Expenses Distribution',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 6, rowSpan: 6, columnSpan: 6 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.FINANCE_PROFIT_MARGIN,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.FINANCE_MAIN,
|
||||
),
|
||||
title: 'Profit Margin',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 6, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.FINANCE_BUDGET_VARIANCE,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.FINANCE_MAIN,
|
||||
),
|
||||
title: 'Budget Variance',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 6, column: 3, rowSpan: 4, columnSpan: 9 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
// Executive Main Tab Widgets
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.EXECUTIVE_KEY_METRICS,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.EXECUTIVE_MAIN,
|
||||
),
|
||||
title: 'Key Business Metrics',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 3, columnSpan: 12 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.EXECUTIVE_COMPANY_HEALTH,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.EXECUTIVE_MAIN,
|
||||
),
|
||||
title: 'Company Health Score',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 3, column: 0, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.EXECUTIVE_QUARTERLY_REVIEW,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.EXECUTIVE_MAIN,
|
||||
),
|
||||
title: 'Quarterly Performance',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 3, column: 4, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_WIDGET_SEEDS.EXECUTIVE_STRATEGIC_GOALS,
|
||||
),
|
||||
pageLayoutTabId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_TAB_SEEDS.EXECUTIVE_MAIN,
|
||||
),
|
||||
title: 'Strategic Goals Progress',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 3, column: 8, rowSpan: 8, columnSpan: 4 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
];
|
||||
+2
@@ -5,6 +5,7 @@ import { seedAgents } from 'src/engine/workspace-manager/dev-seeder/core/utils/s
|
||||
import { seedApiKeys } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-api-keys.util';
|
||||
import { seedFeatureFlags } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-feature-flags.util';
|
||||
import { seedPageLayouts } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-page-layouts.util';
|
||||
import { seedPageLayoutTabs } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-page-layout-tabs.util';
|
||||
import { seedPageLayoutWidgets } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-page-layout-widgets.util';
|
||||
import { seedUserWorkspaces } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-user-workspaces.util';
|
||||
import { seedUsers } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-users.util';
|
||||
@@ -52,6 +53,7 @@ export const seedCoreSchema = async ({
|
||||
|
||||
if (shouldSeedPageLayouts) {
|
||||
await seedPageLayouts(dataSource, schemaName, workspaceId);
|
||||
await seedPageLayoutTabs(dataSource, schemaName, workspaceId);
|
||||
await seedPageLayoutWidgets(dataSource, schemaName, workspaceId);
|
||||
}
|
||||
};
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
import { type DataSource } from 'typeorm';
|
||||
|
||||
import { getPageLayoutTabDataSeeds } from 'src/engine/workspace-manager/dev-seeder/core/utils/get-page-layout-tab-data-seeds.util';
|
||||
|
||||
export const seedPageLayoutTabs = async (
|
||||
dataSource: DataSource,
|
||||
schemaName: string,
|
||||
workspaceId: string,
|
||||
) => {
|
||||
const pageLayoutTabs = getPageLayoutTabDataSeeds(workspaceId);
|
||||
|
||||
if (pageLayoutTabs.length > 0) {
|
||||
await dataSource
|
||||
.createQueryBuilder()
|
||||
.insert()
|
||||
.into(`${schemaName}.pageLayoutTab`, [
|
||||
'id',
|
||||
'title',
|
||||
'position',
|
||||
'pageLayoutId',
|
||||
'workspaceId',
|
||||
])
|
||||
.values(pageLayoutTabs)
|
||||
.orIgnore()
|
||||
.execute();
|
||||
}
|
||||
};
|
||||
+9
-7
@@ -1,18 +1,20 @@
|
||||
import { type DataSource } from 'typeorm';
|
||||
|
||||
import { PAGE_LAYOUT_WIDGET_DATA_SEEDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/page-layout-widget-data-seeds.constant';
|
||||
import { getPageLayoutWidgetDataSeeds } from 'src/engine/workspace-manager/dev-seeder/core/utils/get-page-layout-widget-data-seeds.util';
|
||||
|
||||
export const seedPageLayoutWidgets = async (
|
||||
dataSource: DataSource,
|
||||
schemaName: string,
|
||||
workspaceId: string,
|
||||
) => {
|
||||
const pageLayoutWidgets = PAGE_LAYOUT_WIDGET_DATA_SEEDS.map((widget) => ({
|
||||
...widget,
|
||||
workspaceId,
|
||||
gridPosition: widget.gridPosition,
|
||||
configuration: widget.configuration,
|
||||
}));
|
||||
const pageLayoutWidgets = getPageLayoutWidgetDataSeeds(workspaceId).map(
|
||||
(widget) => ({
|
||||
...widget,
|
||||
workspaceId,
|
||||
gridPosition: widget.gridPosition,
|
||||
configuration: widget.configuration,
|
||||
}),
|
||||
);
|
||||
|
||||
if (pageLayoutWidgets.length > 0) {
|
||||
await dataSource
|
||||
|
||||
+1
-20
@@ -1,7 +1,6 @@
|
||||
import { type DataSource } from 'typeorm';
|
||||
|
||||
import { getPageLayoutDataSeeds } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-data-seeds.constant';
|
||||
import { getPageLayoutTabDataSeeds } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-tab-data-seeds.constant';
|
||||
import { getPageLayoutDataSeeds } from 'src/engine/workspace-manager/dev-seeder/core/utils/get-page-layout-data-seeds.util';
|
||||
|
||||
export const seedPageLayouts = async (
|
||||
dataSource: DataSource,
|
||||
@@ -25,22 +24,4 @@ export const seedPageLayouts = async (
|
||||
.orIgnore()
|
||||
.execute();
|
||||
}
|
||||
|
||||
const pageLayoutTabs = getPageLayoutTabDataSeeds(workspaceId);
|
||||
|
||||
if (pageLayoutTabs.length > 0) {
|
||||
await dataSource
|
||||
.createQueryBuilder()
|
||||
.insert()
|
||||
.into(`${schemaName}.pageLayoutTab`, [
|
||||
'id',
|
||||
'title',
|
||||
'position',
|
||||
'pageLayoutId',
|
||||
'workspaceId',
|
||||
])
|
||||
.values(pageLayoutTabs)
|
||||
.orIgnore()
|
||||
.execute();
|
||||
}
|
||||
};
|
||||
|
||||
+36
-12
@@ -1,4 +1,5 @@
|
||||
import { PAGE_LAYOUT_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-data-seeds.constant';
|
||||
import { PAGE_LAYOUT_SEEDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-seeds.constant';
|
||||
import { generateSeedId } from 'src/engine/workspace-manager/dev-seeder/core/utils/generate-seed-id.util';
|
||||
import { WORKSPACE_MEMBER_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/workspace-member-data-seeds.constant';
|
||||
|
||||
type DashboardDataSeed = {
|
||||
@@ -34,11 +35,16 @@ export const DASHBOARD_DATA_SEED_IDS = {
|
||||
EXECUTIVE_SUMMARY: '20202020-d2e3-4304-9c80-b3db67903974',
|
||||
};
|
||||
|
||||
export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
export const getDashboardDataSeeds = (
|
||||
workspaceId: string,
|
||||
): DashboardDataSeed[] => [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.SALES_OVERVIEW,
|
||||
title: 'Sales Overview',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.SALES_DASHBOARD,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.SALES_DASHBOARD,
|
||||
),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.TIM,
|
||||
createdByName: 'Tim Apple',
|
||||
@@ -47,7 +53,10 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.CUSTOMER_INSIGHTS,
|
||||
title: 'Customer Insights',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.CUSTOMER_DASHBOARD,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.CUSTOMER_DASHBOARD,
|
||||
),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.JONY,
|
||||
createdByName: 'Jony Ive',
|
||||
@@ -56,7 +65,7 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.TEAM_PERFORMANCE,
|
||||
title: 'Team Performance',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.TEAM_DASHBOARD,
|
||||
pageLayoutId: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.TEAM_DASHBOARD),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.PHIL,
|
||||
createdByName: 'Phil Schiller',
|
||||
@@ -65,7 +74,10 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.REVENUE_ANALYTICS,
|
||||
title: 'Revenue Analytics',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.REVENUE_ANALYTICS,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.REVENUE_ANALYTICS,
|
||||
),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.TIM,
|
||||
createdByName: 'Tim Apple',
|
||||
@@ -74,7 +86,10 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.MARKETING_METRICS,
|
||||
title: 'Marketing Metrics',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.MARKETING_METRICS,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.MARKETING_METRICS,
|
||||
),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.JONY,
|
||||
createdByName: 'Jony Ive',
|
||||
@@ -83,7 +98,10 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.SUPPORT_DASHBOARD,
|
||||
title: 'Support Dashboard',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.SUPPORT_DASHBOARD,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.SUPPORT_DASHBOARD,
|
||||
),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.PHIL,
|
||||
createdByName: 'Phil Schiller',
|
||||
@@ -92,7 +110,7 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.PRODUCT_USAGE,
|
||||
title: 'Product Usage',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.PRODUCT_USAGE,
|
||||
pageLayoutId: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.PRODUCT_USAGE),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.TIM,
|
||||
createdByName: 'Tim Apple',
|
||||
@@ -101,7 +119,7 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.OPERATIONS_KPI,
|
||||
title: 'Operations KPI',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.OPERATIONS_KPI,
|
||||
pageLayoutId: generateSeedId(workspaceId, PAGE_LAYOUT_SEEDS.OPERATIONS_KPI),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.JONY,
|
||||
createdByName: 'Jony Ive',
|
||||
@@ -110,7 +128,10 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.FINANCE_OVERVIEW,
|
||||
title: 'Finance Overview',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.FINANCE_OVERVIEW,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.FINANCE_OVERVIEW,
|
||||
),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.PHIL,
|
||||
createdByName: 'Phil Schiller',
|
||||
@@ -119,7 +140,10 @@ export const DASHBOARD_DATA_SEEDS: DashboardDataSeed[] = [
|
||||
{
|
||||
id: DASHBOARD_DATA_SEED_IDS.EXECUTIVE_SUMMARY,
|
||||
title: 'Executive Summary',
|
||||
pageLayoutId: PAGE_LAYOUT_SEED_IDS.EXECUTIVE_SUMMARY,
|
||||
pageLayoutId: generateSeedId(
|
||||
workspaceId,
|
||||
PAGE_LAYOUT_SEEDS.EXECUTIVE_SUMMARY,
|
||||
),
|
||||
createdBySource: 'MANUAL',
|
||||
createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.TIM,
|
||||
createdByName: 'Tim Apple',
|
||||
|
||||
-496
@@ -1,496 +0,0 @@
|
||||
import { WidgetType } from 'src/engine/core-modules/page-layout/enums/widget-type.enum';
|
||||
import { PAGE_LAYOUT_TAB_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/page-layout-tab-data-seeds.constant';
|
||||
|
||||
type PageLayoutWidgetDataSeed = {
|
||||
id: string;
|
||||
pageLayoutTabId: string;
|
||||
title: string;
|
||||
type: WidgetType;
|
||||
gridPosition: {
|
||||
row: number;
|
||||
column: number;
|
||||
rowSpan: number;
|
||||
columnSpan: number;
|
||||
};
|
||||
|
||||
configuration: Record<string, unknown> | null;
|
||||
objectMetadataId: string | null;
|
||||
};
|
||||
|
||||
export const PAGE_LAYOUT_WIDGET_DATA_SEED_COLUMNS: (keyof PageLayoutWidgetDataSeed)[] =
|
||||
[
|
||||
'id',
|
||||
'pageLayoutTabId',
|
||||
'title',
|
||||
'type',
|
||||
'gridPosition',
|
||||
'configuration',
|
||||
'objectMetadataId',
|
||||
];
|
||||
|
||||
export const PAGE_LAYOUT_WIDGET_DATA_SEED_IDS = {
|
||||
SALES_PIPELINE_NUMBER: '20202020-1d5d-4381-b42f-f92ad3735717',
|
||||
SALES_CONVERSION_GAUGE: '20202020-6fd4-497f-9d16-8db467756572',
|
||||
SALES_MONTHLY_REVENUE: '20202020-577b-4a4c-ae7c-be57e1d7b253',
|
||||
SALES_DEALS_BY_STAGE: '20202020-08b2-42cb-a7fe-5c561380e679',
|
||||
SALES_TOP_PERFORMERS: '20202020-93ac-4aaf-86f7-0bb38f446211',
|
||||
SALES_FORECAST_LINE: '20202020-3219-4b0e-ad3f-b3de9adb7c55',
|
||||
|
||||
CUSTOMER_TOTAL_COUNT: '20202020-7a14-4b70-80ae-12bb0d36a881',
|
||||
CUSTOMER_ACQUISITION_TREND: '20202020-4ca1-4f7e-8089-4ef61c274675',
|
||||
CUSTOMER_SEGMENTS_PIE: '20202020-3ff4-42fb-881f-38afbee5a503',
|
||||
CUSTOMER_SATISFACTION_GAUGE: '20202020-d82b-410b-8e94-93dfbb29e60b',
|
||||
CUSTOMER_RETENTION_RATE: '20202020-79f8-4136-baf8-e12c1bfa12a2',
|
||||
CUSTOMER_LIFETIME_VALUE: '20202020-e596-4287-a045-62c56a0ce80b',
|
||||
|
||||
TEAM_ACTIVITY_OVERVIEW: '20202020-480b-499b-83d4-2e7816dfcf8c',
|
||||
TEAM_PRODUCTIVITY_METRICS: '20202020-2c02-4eb9-acaf-d10cc196326b',
|
||||
TEAM_GOAL_PROGRESS: '20202020-9fc7-46b9-8a8d-b93e6de9b48a',
|
||||
TEAM_MEMBER_LEADERBOARD: '20202020-0258-48c9-82d6-de11b3093a46',
|
||||
|
||||
REVENUE_TOTAL_NUMBER: '20202020-80e9-4b4d-8f60-2bb7faac11d8',
|
||||
REVENUE_GROWTH_TREND: '20202020-ffcd-48bd-ba03-812562e55c85',
|
||||
REVENUE_BY_PRODUCT: '20202020-943c-4a8f-9975-6b81c58f7a04',
|
||||
REVENUE_BY_REGION: '20202020-8df7-4d44-a239-9745fa7258b5',
|
||||
|
||||
MARKETING_LEADS_GENERATED: '20202020-778d-4bed-afd7-f5204ac2dc80',
|
||||
MARKETING_CAMPAIGN_ROI: '20202020-67a0-4390-bae6-087ba213187a',
|
||||
MARKETING_CHANNEL_PERFORMANCE: '20202020-6b35-4c99-b380-4783e9e2acad',
|
||||
MARKETING_CONVERSION_FUNNEL: '20202020-5722-4acc-b1d5-ae4f3bc72cf9',
|
||||
|
||||
SUPPORT_TICKET_COUNT: '20202020-3b1c-4bb2-88e6-d899965764d6',
|
||||
SUPPORT_RESOLUTION_TIME: '20202020-6afc-436f-b746-1151bfddcaa9',
|
||||
SUPPORT_SATISFACTION_SCORE: '20202020-1e8f-478f-a8c4-c2366bfa7ebd',
|
||||
SUPPORT_TICKET_BY_PRIORITY: '20202020-3efc-4725-a6a6-d3cf6a0a2f75',
|
||||
|
||||
PRODUCT_ACTIVE_USERS: '20202020-db70-403d-ae63-e05094fb59b4',
|
||||
PRODUCT_FEATURE_ADOPTION: '20202020-64b7-4b58-aa7f-59ec7fb227ab',
|
||||
PRODUCT_USAGE_HEATMAP: '20202020-4074-4c7a-880d-244614c618e6',
|
||||
PRODUCT_USER_ENGAGEMENT: '20202020-9b23-4b94-91da-4b813ae3104d',
|
||||
|
||||
OPERATIONS_EFFICIENCY_GAUGE: '20202020-30fa-4ff4-bce2-095e38e7b418',
|
||||
OPERATIONS_COST_BREAKDOWN: '20202020-0ec9-493a-99f9-fef117e8edcb',
|
||||
OPERATIONS_PROCESS_TIME: '20202020-0d3e-4538-80c7-641a0d51a09c',
|
||||
OPERATIONS_ERROR_RATE: '20202020-a061-4815-89cf-4afe36c6d306',
|
||||
|
||||
FINANCE_CASH_FLOW: '20202020-cf55-4e54-9f25-b5aaed168ebe',
|
||||
FINANCE_EXPENSES_PIE: '20202020-1d79-49fd-8cb5-13a1c3249239',
|
||||
FINANCE_PROFIT_MARGIN: '20202020-31fd-488a-a69a-674ebe1f675b',
|
||||
FINANCE_BUDGET_VARIANCE: '20202020-f02d-4861-853a-db77b9b9e543',
|
||||
|
||||
EXECUTIVE_KEY_METRICS: '20202020-bb61-44fd-976b-8b0fc40fb4b4',
|
||||
EXECUTIVE_COMPANY_HEALTH: '20202020-9f8d-4a74-91b1-9ae6646a8c47',
|
||||
EXECUTIVE_QUARTERLY_REVIEW: '20202020-4762-407c-981c-f87911675a3a',
|
||||
EXECUTIVE_STRATEGIC_GOALS: '20202020-ac35-4961-9ca4-12e4ecf8d138',
|
||||
};
|
||||
|
||||
export const PAGE_LAYOUT_WIDGET_DATA_SEEDS: PageLayoutWidgetDataSeed[] = [
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SALES_PIPELINE_NUMBER,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SALES_OVERVIEW,
|
||||
title: 'Pipeline Value',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SALES_CONVERSION_GAUGE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SALES_OVERVIEW,
|
||||
title: 'Conversion Rate',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SALES_MONTHLY_REVENUE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SALES_OVERVIEW,
|
||||
title: 'Monthly Revenue',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 7, rowSpan: 8, columnSpan: 5 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SALES_DEALS_BY_STAGE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SALES_OVERVIEW,
|
||||
title: 'Deals by Stage',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 4, column: 0, rowSpan: 4, columnSpan: 6 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SALES_TOP_PERFORMERS,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SALES_DETAILS,
|
||||
title: 'Top Sales Performers',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 5, columnSpan: 5 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SALES_FORECAST_LINE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SALES_DETAILS,
|
||||
title: 'Sales Forecast',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 5, rowSpan: 12, columnSpan: 7 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.CUSTOMER_TOTAL_COUNT,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.CUSTOMER_OVERVIEW,
|
||||
title: 'Total Customers',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 3, columnSpan: 4 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.CUSTOMER_SATISFACTION_GAUGE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.CUSTOMER_OVERVIEW,
|
||||
title: 'Satisfaction Score',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 4, rowSpan: 3, columnSpan: 3 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.CUSTOMER_SEGMENTS_PIE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.CUSTOMER_OVERVIEW,
|
||||
title: 'Customer Segments',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 7, rowSpan: 5, columnSpan: 5 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.CUSTOMER_ACQUISITION_TREND,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.CUSTOMER_OVERVIEW,
|
||||
title: 'Acquisition Trend',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 3, column: 0, rowSpan: 10, columnSpan: 6 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.CUSTOMER_RETENTION_RATE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.CUSTOMER_ANALYTICS,
|
||||
title: 'Retention Rate',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 8, columnSpan: 5 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.CUSTOMER_LIFETIME_VALUE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.CUSTOMER_ANALYTICS,
|
||||
title: 'Lifetime Value Distribution',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 5, rowSpan: 5, columnSpan: 7 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.TEAM_ACTIVITY_OVERVIEW,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.TEAM_OVERVIEW,
|
||||
title: 'Team Activity',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 4, columnSpan: 6 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.TEAM_GOAL_PROGRESS,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.TEAM_OVERVIEW,
|
||||
title: 'Goal Progress',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 6, rowSpan: 2, columnSpan: 2 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.TEAM_PRODUCTIVITY_METRICS,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.TEAM_METRICS,
|
||||
title: 'Productivity Metrics',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 10, columnSpan: 6 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.TEAM_MEMBER_LEADERBOARD,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.TEAM_METRICS,
|
||||
title: 'Team Leaderboard',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 6, rowSpan: 6, columnSpan: 6 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.REVENUE_TOTAL_NUMBER,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.REVENUE_MAIN,
|
||||
title: 'Total Revenue',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.REVENUE_GROWTH_TREND,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.REVENUE_MAIN,
|
||||
title: 'Revenue Growth',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 12, columnSpan: 7 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.REVENUE_BY_PRODUCT,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.REVENUE_MAIN,
|
||||
title: 'Revenue by Product',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 2, column: 0, rowSpan: 3, columnSpan: 3 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.REVENUE_BY_REGION,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.REVENUE_MAIN,
|
||||
title: 'Revenue by Region',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 10, rowSpan: 4, columnSpan: 2 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.MARKETING_LEADS_GENERATED,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.MARKETING_MAIN,
|
||||
title: 'Leads Generated',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 1, columnSpan: 2 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.MARKETING_CAMPAIGN_ROI,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.MARKETING_MAIN,
|
||||
title: 'Campaign ROI',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 2, rowSpan: 3, columnSpan: 3 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.MARKETING_CHANNEL_PERFORMANCE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.MARKETING_MAIN,
|
||||
title: 'Channel Performance',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 5, rowSpan: 4, columnSpan: 6 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.MARKETING_CONVERSION_FUNNEL,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.MARKETING_MAIN,
|
||||
title: 'Conversion Funnel',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 3, column: 0, rowSpan: 5, columnSpan: 8 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SUPPORT_TICKET_COUNT,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SUPPORT_MAIN,
|
||||
title: 'Open Tickets',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SUPPORT_RESOLUTION_TIME,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SUPPORT_MAIN,
|
||||
title: 'Avg Resolution Time',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 3, columnSpan: 4 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SUPPORT_SATISFACTION_SCORE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SUPPORT_MAIN,
|
||||
title: 'Customer Satisfaction',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 2, column: 0, rowSpan: 3, columnSpan: 3 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.SUPPORT_TICKET_BY_PRIORITY,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.SUPPORT_MAIN,
|
||||
title: 'Tickets by Priority',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 7, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.PRODUCT_ACTIVE_USERS,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.PRODUCT_MAIN,
|
||||
title: 'Active Users',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 3 },
|
||||
configuration: { graphType: 'NUMBER' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.PRODUCT_FEATURE_ADOPTION,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.PRODUCT_MAIN,
|
||||
title: 'Feature Adoption',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 3, rowSpan: 6, columnSpan: 8 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.PRODUCT_USER_ENGAGEMENT,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.PRODUCT_MAIN,
|
||||
title: 'User Engagement',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 2, column: 0, rowSpan: 10, columnSpan: 6 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.PRODUCT_USAGE_HEATMAP,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.PRODUCT_MAIN,
|
||||
title: 'Usage Patterns',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 6, column: 3, rowSpan: 4, columnSpan: 8 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.OPERATIONS_EFFICIENCY_GAUGE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.OPERATIONS_MAIN,
|
||||
title: 'Operational Efficiency',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 2, columnSpan: 2 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.OPERATIONS_COST_BREAKDOWN,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.OPERATIONS_MAIN,
|
||||
title: 'Cost Breakdown',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 2, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.OPERATIONS_PROCESS_TIME,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.OPERATIONS_MAIN,
|
||||
title: 'Process Time Trends',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 6, rowSpan: 10, columnSpan: 6 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.OPERATIONS_ERROR_RATE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.OPERATIONS_MAIN,
|
||||
title: 'Error Rate',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 4, column: 0, rowSpan: 3, columnSpan: 5 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.FINANCE_CASH_FLOW,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.FINANCE_MAIN,
|
||||
title: 'Cash Flow',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 10, columnSpan: 6 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.FINANCE_EXPENSES_PIE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.FINANCE_MAIN,
|
||||
title: 'Expense Categories',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 6, rowSpan: 5, columnSpan: 5 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.FINANCE_PROFIT_MARGIN,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.FINANCE_MAIN,
|
||||
title: 'Profit Margin',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 5, column: 6, rowSpan: 3, columnSpan: 3 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.FINANCE_BUDGET_VARIANCE,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.FINANCE_MAIN,
|
||||
title: 'Budget vs Actual',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 5, column: 9, rowSpan: 4, columnSpan: 3 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.EXECUTIVE_KEY_METRICS,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.EXECUTIVE_MAIN,
|
||||
title: 'Key Business Metrics',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 3, columnSpan: 12 },
|
||||
configuration: { graphType: 'PIE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.EXECUTIVE_COMPANY_HEALTH,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.EXECUTIVE_MAIN,
|
||||
title: 'Company Health Score',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 3, column: 0, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'GAUGE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.EXECUTIVE_QUARTERLY_REVIEW,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.EXECUTIVE_MAIN,
|
||||
title: 'Quarterly Performance',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 3, column: 4, rowSpan: 4, columnSpan: 4 },
|
||||
configuration: { graphType: 'BAR' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
{
|
||||
id: PAGE_LAYOUT_WIDGET_DATA_SEED_IDS.EXECUTIVE_STRATEGIC_GOALS,
|
||||
pageLayoutTabId: PAGE_LAYOUT_TAB_SEED_IDS.EXECUTIVE_MAIN,
|
||||
title: 'Strategic Goals Progress',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 3, column: 8, rowSpan: 8, columnSpan: 4 },
|
||||
configuration: { graphType: 'LINE' },
|
||||
objectMetadataId: null,
|
||||
},
|
||||
];
|
||||
+2
-2
@@ -33,7 +33,7 @@ import {
|
||||
} from 'src/engine/workspace-manager/dev-seeder/data/constants/connected-account-data-seeds.constant';
|
||||
import {
|
||||
DASHBOARD_DATA_SEED_COLUMNS,
|
||||
DASHBOARD_DATA_SEEDS,
|
||||
getDashboardDataSeeds,
|
||||
} from 'src/engine/workspace-manager/dev-seeder/data/constants/dashboard-data-seeds.constant';
|
||||
import {
|
||||
MESSAGE_CHANNEL_DATA_SEED_COLUMNS,
|
||||
@@ -113,7 +113,7 @@ const getRecordSeedsConfigs = (
|
||||
{
|
||||
tableName: 'dashboard',
|
||||
pgColumns: DASHBOARD_DATA_SEED_COLUMNS,
|
||||
recordSeeds: DASHBOARD_DATA_SEEDS,
|
||||
recordSeeds: getDashboardDataSeeds(workspaceId),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
|
||||
Reference in New Issue
Block a user