- Engine: Add ppa_revenue_cr, mcp_revenue_cr, tariff, units to PnLRow - Engine: Split PPA vs MCP revenue in P&L computation - Web: Collapsible rows for PPA/MCP Revenue and Opex - Web: Highlighted rows (Total Revenue, EBITDA, EBIT, PBT, PAT) - Web: Units above Tariff in breakdown, bg-blue-50 highlight - Fix sticky column z-index for horizontal scroll - CLAUDE.md: Add project documentation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
42 lines
No EOL
1.2 KiB
TypeScript
42 lines
No EOL
1.2 KiB
TypeScript
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
|
|
declare global {
|
|
interface Window {
|
|
AgentaBug?: boolean;
|
|
}
|
|
}
|
|
|
|
export default function FeedbackButton() {
|
|
useEffect(() => {
|
|
if (typeof window === "undefined") return;
|
|
if (window.AgentaBug || document.getElementById("feedback-btn-fixed")) return;
|
|
|
|
const btn = document.createElement("button");
|
|
btn.id = "feedback-btn-fixed";
|
|
btn.innerHTML = "💬";
|
|
btn.title = "Click to leave feedback";
|
|
btn.style.cssText =
|
|
"position: fixed; bottom: 20px; right: 20px; width: 48px; height: 48px; border-radius: 50%; background: #2563eb; color: white; border: none; cursor: pointer; font-size: 22px; z-index: 99999; box-shadow: 0 4px 12px rgba(0,0,0,0.2);";
|
|
|
|
btn.onmouseenter = () => {
|
|
btn.style.transform = "scale(1.1)";
|
|
};
|
|
btn.onmouseleave = () => {
|
|
btn.style.transform = "scale(1)";
|
|
};
|
|
|
|
btn.onclick = () => {
|
|
const note = prompt("What would you like to change or improve?");
|
|
if (note) {
|
|
alert("Thank you! Your feedback: " + note + "\n\n(This is a placeholder - proper feedback tool coming soon)");
|
|
}
|
|
};
|
|
|
|
document.body.appendChild(btn);
|
|
window.AgentaBug = true;
|
|
}, []);
|
|
|
|
return null;
|
|
} |