-- Migration: Add Action Menu entries for Forecaster pages
-- Date: 2025-11-20
-- Description: Implements Action Menu pattern for Product Configs, Generate, Pro Forma, Sensitivity, and Variance pages

-- =====================================================
-- 1. Product Configs (index.php) - 3 action buttons
-- =====================================================
INSERT INTO page_actions (page_identifier, action_name, icon, action_type, action_target, display_order, group_name, is_active) VALUES
('product_forecast_index', 'Command Center', 'fas fa-tachometer-alt', 'link', 'product-forecast/command-center', 10, 'actions', 1),
('product_forecast_index', 'Generate', 'fas fa-calculator', 'link', 'product-forecast/generate', 20, 'actions', 1),
('product_forecast_index', 'Pro Forma', 'fas fa-chart-line', 'link', 'product-forecast/proforma', 30, 'actions', 1),
('product_forecast_index', 'Back', 'bi bi-arrow-left', 'link', 'assumptions', 40, 'navigation', 1);

-- =====================================================
-- 2. Generate Projections - 3 action buttons
-- =====================================================
INSERT INTO page_actions (page_identifier, action_name, icon, action_type, action_target, display_order, group_name, is_active) VALUES
('product_forecast_generate', 'Command Center', 'fas fa-tachometer-alt', 'link', 'product-forecast/command-center', 10, 'actions', 1),
('product_forecast_generate', 'Configure', 'fas fa-cog', 'link', 'product-forecast', 20, 'actions', 1),
('product_forecast_generate', 'Pro Forma', 'fas fa-chart-line', 'link', 'product-forecast/proforma', 30, 'actions', 1),
('product_forecast_generate', 'Back', 'bi bi-arrow-left', 'link', 'product-forecast', 40, 'navigation', 1);

-- =====================================================
-- 3. Pro Forma Statements - 5 action buttons
-- =====================================================
INSERT INTO page_actions (page_identifier, action_name, icon, action_type, action_target, display_order, group_name, is_active) VALUES
('product_forecast_proforma', 'Configure', 'fas fa-cog', 'link', 'product-forecast', 10, 'actions', 1),
('product_forecast_proforma', 'Variance', 'fas fa-chart-bar', 'link', 'product-forecast/variance?set_id={set_id}&start_date={start_date}&end_date={end_date}', 20, 'actions', 1),
('product_forecast_proforma', 'Export Excel', 'fas fa-file-excel', 'link', 'product-forecast/export-excel?set_id={set_id}&start_date={start_date}&end_date={end_date}&period_type={period_type}', 30, 'actions', 1),
('product_forecast_proforma', 'Sensitivity', 'fas fa-sliders-h', 'link', 'product-forecast/sensitivity?set_id={set_id}', 40, 'actions', 1),
('product_forecast_proforma', 'Compare', 'fas fa-exchange-alt', 'link', 'product-forecast/compare', 50, 'actions', 1),
('product_forecast_proforma', 'Back', 'bi bi-arrow-left', 'link', 'assumptions', 60, 'navigation', 1);

-- =====================================================
-- 4. Sensitivity Analysis - 4 action buttons
-- NOTE: Best/Base/Worst Case buttons stay inline in form
-- =====================================================
INSERT INTO page_actions (page_identifier, action_name, icon, action_type, action_target, display_order, group_name, is_active) VALUES
('product_forecast_sensitivity', 'Command Center', 'fas fa-tachometer-alt', 'link', 'product-forecast/command-center?set_id={set_id}', 10, 'actions', 1),
('product_forecast_sensitivity', 'Pro Forma', 'fas fa-chart-line', 'link', 'product-forecast/proforma?set_id={set_id}', 20, 'actions', 1),
('product_forecast_sensitivity', 'Variance', 'fas fa-chart-bar', 'link', 'product-forecast/variance?set_id={set_id}', 30, 'actions', 1),
('product_forecast_sensitivity', 'Back', 'bi bi-arrow-left', 'link', 'assumptions', 40, 'navigation', 1);

-- =====================================================
-- 5. Variance Tracking - 3 action buttons
-- =====================================================
INSERT INTO page_actions (page_identifier, action_name, icon, action_type, action_target, display_order, group_name, is_active) VALUES
('product_forecast_variance', 'Command Center', 'fas fa-tachometer-alt', 'link', 'product-forecast/command-center?set_id={set_id}', 10, 'actions', 1),
('product_forecast_variance', 'Pro Forma', 'fas fa-chart-line', 'link', 'product-forecast/proforma?set_id={set_id}', 20, 'actions', 1),
('product_forecast_variance', 'Sensitivity', 'fas fa-sliders-h', 'link', 'product-forecast/sensitivity?set_id={set_id}', 30, 'actions', 1),
('product_forecast_variance', 'Back', 'bi bi-arrow-left', 'link', 'assumptions', 40, 'navigation', 1);
