added installation name in monthly and yearly email service
This commit is contained in:
parent
ac034b9983
commit
a1911325ad
|
|
@ -984,7 +984,7 @@ public class Controller : ControllerBase
|
||||||
// Cache miss or forceRegenerate: generate fresh
|
// Cache miss or forceRegenerate: generate fresh
|
||||||
Console.WriteLine($"[GetWeeklyReport] Generating fresh report for installation {installationId}, period {periodStartStr}–{periodEndStr}");
|
Console.WriteLine($"[GetWeeklyReport] Generating fresh report for installation {installationId}, period {periodStartStr}–{periodEndStr}");
|
||||||
var report = await WeeklyReportService.GenerateReportAsync(
|
var report = await WeeklyReportService.GenerateReportAsync(
|
||||||
installationId, installation.InstallationName, lang, weekStartDate);
|
installationId, installation.Name, lang, weekStartDate);
|
||||||
|
|
||||||
// Persist weekly summary and seed AiInsightCache for this language
|
// Persist weekly summary and seed AiInsightCache for this language
|
||||||
ReportAggregationService.SaveWeeklySummary(installationId, report, lang);
|
ReportAggregationService.SaveWeeklySummary(installationId, report, lang);
|
||||||
|
|
@ -1015,7 +1015,7 @@ public class Controller : ControllerBase
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var lang = user.Language ?? "en";
|
var lang = user.Language ?? "en";
|
||||||
var report = await WeeklyReportService.GenerateReportAsync(installationId, installation.InstallationName, lang);
|
var report = await WeeklyReportService.GenerateReportAsync(installationId, installation.Name, lang);
|
||||||
await ReportEmailService.SendReportEmailAsync(report, emailAddress, lang, user.Name);
|
await ReportEmailService.SendReportEmailAsync(report, emailAddress, lang, user.Name);
|
||||||
return Ok(new { message = $"Report sent to {emailAddress}" });
|
return Ok(new { message = $"Report sent to {emailAddress}" });
|
||||||
}
|
}
|
||||||
|
|
@ -1404,7 +1404,7 @@ public class Controller : ControllerBase
|
||||||
{
|
{
|
||||||
var lang = user.Language ?? "en";
|
var lang = user.Language ?? "en";
|
||||||
report.AiInsight = await ReportAggregationService.GetOrGenerateMonthlyInsightAsync(report, lang);
|
report.AiInsight = await ReportAggregationService.GetOrGenerateMonthlyInsightAsync(report, lang);
|
||||||
await ReportEmailService.SendMonthlyReportEmailAsync(report, installation.InstallationName, emailAddress, lang, user.Name);
|
await ReportEmailService.SendMonthlyReportEmailAsync(report, installation.Name, emailAddress, lang, user.Name);
|
||||||
return Ok(new { message = $"Monthly report sent to {emailAddress}" });
|
return Ok(new { message = $"Monthly report sent to {emailAddress}" });
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -1433,7 +1433,7 @@ public class Controller : ControllerBase
|
||||||
{
|
{
|
||||||
var lang = user.Language ?? "en";
|
var lang = user.Language ?? "en";
|
||||||
report.AiInsight = await ReportAggregationService.GetOrGenerateYearlyInsightAsync(report, lang);
|
report.AiInsight = await ReportAggregationService.GetOrGenerateYearlyInsightAsync(report, lang);
|
||||||
await ReportEmailService.SendYearlyReportEmailAsync(report, installation.InstallationName, emailAddress, lang, user.Name);
|
await ReportEmailService.SendYearlyReportEmailAsync(report, installation.Name, emailAddress, lang, user.Name);
|
||||||
return Ok(new { message = $"Yearly report sent to {emailAddress}" });
|
return Ok(new { message = $"Yearly report sent to {emailAddress}" });
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@ public static class ReportEmailService
|
||||||
public static async Task SendReportEmailAsync(WeeklyReportResponse report, string recipientEmail, string language = "en", string customerName = null)
|
public static async Task SendReportEmailAsync(WeeklyReportResponse report, string recipientEmail, string language = "en", string customerName = null)
|
||||||
{
|
{
|
||||||
var strings = GetStrings(language);
|
var strings = GetStrings(language);
|
||||||
var nameSegment = !string.IsNullOrWhiteSpace(customerName) ? $" — {customerName}" : "";
|
var subject = $"{strings.Title} — {report.InstallationName} ({report.PeriodStart} to {report.PeriodEnd})";
|
||||||
var subject = $"{strings.Title} — {report.InstallationName}{nameSegment} ({report.PeriodStart} to {report.PeriodEnd})";
|
|
||||||
var html = BuildHtmlEmail(report, strings, customerName);
|
var html = BuildHtmlEmail(report, strings, customerName);
|
||||||
|
|
||||||
var config = await ReadMailerConfig();
|
var config = await ReadMailerConfig();
|
||||||
|
|
@ -81,7 +80,8 @@ public static class ReportEmailService
|
||||||
string GridIn,
|
string GridIn,
|
||||||
string GridOut,
|
string GridOut,
|
||||||
string BattInOut,
|
string BattInOut,
|
||||||
string Footer
|
string Footer,
|
||||||
|
string FooterLink
|
||||||
);
|
);
|
||||||
|
|
||||||
private static EmailStrings GetStrings(string language) => language switch
|
private static EmailStrings GetStrings(string language) => language switch
|
||||||
|
|
@ -114,7 +114,8 @@ public static class ReportEmailService
|
||||||
GridIn: "Netz Ein",
|
GridIn: "Netz Ein",
|
||||||
GridOut: "Netz Aus",
|
GridOut: "Netz Aus",
|
||||||
BattInOut: "Batt. Laden/Entl.",
|
BattInOut: "Batt. Laden/Entl.",
|
||||||
Footer: "Erstellt von <strong style=\"color:#666\">inesco Energy Monitor</strong>"
|
Footer: "Erstellt von <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
FooterLink: "Detaillierte Berichte ansehen auf monitor.inesco.energy"
|
||||||
),
|
),
|
||||||
"fr" => new EmailStrings(
|
"fr" => new EmailStrings(
|
||||||
Title: "Rapport de performance hebdomadaire",
|
Title: "Rapport de performance hebdomadaire",
|
||||||
|
|
@ -144,7 +145,8 @@ public static class ReportEmailService
|
||||||
GridIn: "Réseau Ent.",
|
GridIn: "Réseau Ent.",
|
||||||
GridOut: "Réseau Sor.",
|
GridOut: "Réseau Sor.",
|
||||||
BattInOut: "Batt. Ch./Déch.",
|
BattInOut: "Batt. Ch./Déch.",
|
||||||
Footer: "Généré par <strong style=\"color:#666\">inesco Energy Monitor</strong>"
|
Footer: "Généré par <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
FooterLink: "Consultez vos rapports détaillés sur monitor.inesco.energy"
|
||||||
),
|
),
|
||||||
"it" => new EmailStrings(
|
"it" => new EmailStrings(
|
||||||
Title: "Rapporto settimanale delle prestazioni",
|
Title: "Rapporto settimanale delle prestazioni",
|
||||||
|
|
@ -174,7 +176,8 @@ public static class ReportEmailService
|
||||||
GridIn: "Rete Ent.",
|
GridIn: "Rete Ent.",
|
||||||
GridOut: "Rete Usc.",
|
GridOut: "Rete Usc.",
|
||||||
BattInOut: "Batt. Car./Sc.",
|
BattInOut: "Batt. Car./Sc.",
|
||||||
Footer: "Generato da <strong style=\"color:#666\">inesco Energy Monitor</strong>"
|
Footer: "Generato da <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
FooterLink: "Visualizza i tuoi report dettagliati su monitor.inesco.energy"
|
||||||
),
|
),
|
||||||
_ => new EmailStrings(
|
_ => new EmailStrings(
|
||||||
Title: "Weekly Performance Report",
|
Title: "Weekly Performance Report",
|
||||||
|
|
@ -204,7 +207,8 @@ public static class ReportEmailService
|
||||||
GridIn: "Grid In",
|
GridIn: "Grid In",
|
||||||
GridOut: "Grid Out",
|
GridOut: "Grid Out",
|
||||||
BattInOut: "Batt. Ch./Dis.",
|
BattInOut: "Batt. Ch./Dis.",
|
||||||
Footer: "Generated by <strong style=\"color:#666\">inesco Energy Monitor</strong>"
|
Footer: "Generated by <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
FooterLink: "View your detailed reports at monitor.inesco.energy"
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -332,7 +336,6 @@ public static class ReportEmailService
|
||||||
<td style=""background:#2c3e50;padding:24px 30px;color:#ffffff"">
|
<td style=""background:#2c3e50;padding:24px 30px;color:#ffffff"">
|
||||||
<div style=""font-size:20px;font-weight:bold"">{s.Title}</div>
|
<div style=""font-size:20px;font-weight:bold"">{s.Title}</div>
|
||||||
<div style=""font-size:14px;margin-top:6px;opacity:0.9"">{r.InstallationName}</div>
|
<div style=""font-size:14px;margin-top:6px;opacity:0.9"">{r.InstallationName}</div>
|
||||||
{(!string.IsNullOrWhiteSpace(customerName) ? $@"<div style=""font-size:13px;margin-top:2px;opacity:0.8"">{customerName}</div>" : "")}
|
|
||||||
<div style=""font-size:13px;margin-top:2px;opacity:0.7"">{r.PeriodStart} — {r.PeriodEnd}</div>
|
<div style=""font-size:13px;margin-top:2px;opacity:0.7"">{r.PeriodStart} — {r.PeriodEnd}</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -398,7 +401,7 @@ public static class ReportEmailService
|
||||||
<tr>
|
<tr>
|
||||||
<td style=""background:#f8f9fa;padding:16px 30px;text-align:center;font-size:12px;color:#999;border-top:1px solid #eee"">
|
<td style=""background:#f8f9fa;padding:16px 30px;text-align:center;font-size:12px;color:#999;border-top:1px solid #eee"">
|
||||||
{s.Footer}
|
{s.Footer}
|
||||||
<div style=""margin-top:10px""><a href=""https://monitor.inesco.ch"" style=""color:#999;text-decoration:underline"">View your reports anytime at monitor.inesco.ch</a></div>
|
<div style=""margin-top:10px""><a href=""https://monitor.inesco.energy"" style=""color:#999;text-decoration:underline"">{s.FooterLink}</a></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
@ -464,8 +467,7 @@ public static class ReportEmailService
|
||||||
var monthNames = language switch { "de" => MonthNamesDe, "fr" => MonthNamesFr, "it" => MonthNamesIt, _ => MonthNamesEn };
|
var monthNames = language switch { "de" => MonthNamesDe, "fr" => MonthNamesFr, "it" => MonthNamesIt, _ => MonthNamesEn };
|
||||||
var monthName = report.Month >= 1 && report.Month <= 12 ? monthNames[report.Month] : report.Month.ToString();
|
var monthName = report.Month >= 1 && report.Month <= 12 ? monthNames[report.Month] : report.Month.ToString();
|
||||||
var s = GetAggregatedStrings(language, "monthly");
|
var s = GetAggregatedStrings(language, "monthly");
|
||||||
var nameSegment = !string.IsNullOrWhiteSpace(customerName) ? $" — {customerName}" : "";
|
var subject = $"{s.Title} — {installationName} ({monthName} {report.Year})";
|
||||||
var subject = $"{s.Title} — {installationName}{nameSegment} ({monthName} {report.Year})";
|
|
||||||
var html = BuildAggregatedHtmlEmail(report.PeriodStart, report.PeriodEnd, installationName,
|
var html = BuildAggregatedHtmlEmail(report.PeriodStart, report.PeriodEnd, installationName,
|
||||||
report.TotalPvProduction, report.TotalConsumption, report.TotalGridImport, report.TotalGridExport,
|
report.TotalPvProduction, report.TotalConsumption, report.TotalGridImport, report.TotalGridExport,
|
||||||
report.TotalBatteryCharged, report.TotalBatteryDischarged, report.TotalEnergySaved, report.TotalSavingsCHF,
|
report.TotalBatteryCharged, report.TotalBatteryDischarged, report.TotalEnergySaved, report.TotalSavingsCHF,
|
||||||
|
|
@ -483,8 +485,7 @@ public static class ReportEmailService
|
||||||
string customerName = null)
|
string customerName = null)
|
||||||
{
|
{
|
||||||
var s = GetAggregatedStrings(language, "yearly");
|
var s = GetAggregatedStrings(language, "yearly");
|
||||||
var nameSegment = !string.IsNullOrWhiteSpace(customerName) ? $" — {customerName}" : "";
|
var subject = $"{s.Title} — {installationName} ({report.Year})";
|
||||||
var subject = $"{s.Title} — {installationName}{nameSegment} ({report.Year})";
|
|
||||||
var html = BuildAggregatedHtmlEmail(report.PeriodStart, report.PeriodEnd, installationName,
|
var html = BuildAggregatedHtmlEmail(report.PeriodStart, report.PeriodEnd, installationName,
|
||||||
report.TotalPvProduction, report.TotalConsumption, report.TotalGridImport, report.TotalGridExport,
|
report.TotalPvProduction, report.TotalConsumption, report.TotalGridImport, report.TotalGridExport,
|
||||||
report.TotalBatteryCharged, report.TotalBatteryDischarged, report.TotalEnergySaved, report.TotalSavingsCHF,
|
report.TotalBatteryCharged, report.TotalBatteryDischarged, report.TotalEnergySaved, report.TotalSavingsCHF,
|
||||||
|
|
@ -525,7 +526,8 @@ public static class ReportEmailService
|
||||||
string GridImport, string GridExport, string BatteryInOut,
|
string GridImport, string GridExport, string BatteryInOut,
|
||||||
string SolarEnergyUsed, string StayedAtHome, string EstMoneySaved,
|
string SolarEnergyUsed, string StayedAtHome, string EstMoneySaved,
|
||||||
string AtRate, string SolarCoverage, string FromSolar,
|
string AtRate, string SolarCoverage, string FromSolar,
|
||||||
string BatteryEff, string OutVsIn, string CountLabel, string Footer
|
string BatteryEff, string OutVsIn, string CountLabel, string Footer,
|
||||||
|
string FooterLink
|
||||||
);
|
);
|
||||||
|
|
||||||
private static AggregatedEmailStrings GetAggregatedStrings(string language, string type) => (language, type) switch
|
private static AggregatedEmailStrings GetAggregatedStrings(string language, string type) => (language, type) switch
|
||||||
|
|
@ -535,49 +537,57 @@ public static class ReportEmailService
|
||||||
"Kennzahl", "Gesamt", "PV-Produktion", "Verbrauch", "Netzbezug", "Netzeinspeisung", "Batterie Laden / Entladen",
|
"Kennzahl", "Gesamt", "PV-Produktion", "Verbrauch", "Netzbezug", "Netzeinspeisung", "Batterie Laden / Entladen",
|
||||||
"Energie gespart", "Solar + Batterie, nicht vom Netz", "Geschätzte Ersparnis", "bei 0.39 CHF/kWh",
|
"Energie gespart", "Solar + Batterie, nicht vom Netz", "Geschätzte Ersparnis", "bei 0.39 CHF/kWh",
|
||||||
"Energieunabhängigkeit", "aus eigenem Solar + Batterie System", "Batterie-Eff.", "Entladung vs. Ladung",
|
"Energieunabhängigkeit", "aus eigenem Solar + Batterie System", "Batterie-Eff.", "Entladung vs. Ladung",
|
||||||
"Tage aggregiert", "Erstellt von <strong style=\"color:#666\">inesco Energy Monitor</strong>"),
|
"Tage aggregiert", "Erstellt von <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
"Detaillierte Berichte ansehen auf monitor.inesco.energy"),
|
||||||
("de", "yearly") => new AggregatedEmailStrings(
|
("de", "yearly") => new AggregatedEmailStrings(
|
||||||
"Jährlicher Leistungsbericht", "Jährliche Erkenntnisse", "Jährliche Zusammenfassung", "Ihre Ersparnisse dieses Jahr",
|
"Jährlicher Leistungsbericht", "Jährliche Erkenntnisse", "Jährliche Zusammenfassung", "Ihre Ersparnisse dieses Jahr",
|
||||||
"Kennzahl", "Gesamt", "PV-Produktion", "Verbrauch", "Netzbezug", "Netzeinspeisung", "Batterie Laden / Entladen",
|
"Kennzahl", "Gesamt", "PV-Produktion", "Verbrauch", "Netzbezug", "Netzeinspeisung", "Batterie Laden / Entladen",
|
||||||
"Energie gespart", "Solar + Batterie, nicht vom Netz", "Geschätzte Ersparnis", "bei 0.39 CHF/kWh",
|
"Energie gespart", "Solar + Batterie, nicht vom Netz", "Geschätzte Ersparnis", "bei 0.39 CHF/kWh",
|
||||||
"Energieunabhängigkeit", "aus eigenem Solar + Batterie System", "Batterie-Eff.", "Entladung vs. Ladung",
|
"Energieunabhängigkeit", "aus eigenem Solar + Batterie System", "Batterie-Eff.", "Entladung vs. Ladung",
|
||||||
"Monate aggregiert", "Erstellt von <strong style=\"color:#666\">inesco Energy Monitor</strong>"),
|
"Monate aggregiert", "Erstellt von <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
"Detaillierte Berichte ansehen auf monitor.inesco.energy"),
|
||||||
("fr", "monthly") => new AggregatedEmailStrings(
|
("fr", "monthly") => new AggregatedEmailStrings(
|
||||||
"Rapport de performance mensuel", "Aperçus du mois", "Résumé du mois", "Vos économies ce mois",
|
"Rapport de performance mensuel", "Aperçus du mois", "Résumé du mois", "Vos économies ce mois",
|
||||||
"Indicateur", "Total", "Production PV", "Consommation", "Import réseau", "Export réseau", "Batterie Charge / Décharge",
|
"Indicateur", "Total", "Production PV", "Consommation", "Import réseau", "Export réseau", "Batterie Charge / Décharge",
|
||||||
"Énergie économisée", "solaire + batterie, non achetée au réseau", "Économies estimées", "à 0.39 CHF/kWh",
|
"Énergie économisée", "solaire + batterie, non achetée au réseau", "Économies estimées", "à 0.39 CHF/kWh",
|
||||||
"Indépendance énergétique", "de votre système solaire + batterie", "Eff. batterie", "décharge vs charge",
|
"Indépendance énergétique", "de votre système solaire + batterie", "Eff. batterie", "décharge vs charge",
|
||||||
"jours agrégés", "Généré par <strong style=\"color:#666\">inesco Energy Monitor</strong>"),
|
"jours agrégés", "Généré par <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
"Consultez vos rapports détaillés sur monitor.inesco.energy"),
|
||||||
("fr", "yearly") => new AggregatedEmailStrings(
|
("fr", "yearly") => new AggregatedEmailStrings(
|
||||||
"Rapport de performance annuel", "Aperçus de l'année", "Résumé de l'année", "Vos économies cette année",
|
"Rapport de performance annuel", "Aperçus de l'année", "Résumé de l'année", "Vos économies cette année",
|
||||||
"Indicateur", "Total", "Production PV", "Consommation", "Import réseau", "Export réseau", "Batterie Charge / Décharge",
|
"Indicateur", "Total", "Production PV", "Consommation", "Import réseau", "Export réseau", "Batterie Charge / Décharge",
|
||||||
"Énergie économisée", "solaire + batterie, non achetée au réseau", "Économies estimées", "à 0.39 CHF/kWh",
|
"Énergie économisée", "solaire + batterie, non achetée au réseau", "Économies estimées", "à 0.39 CHF/kWh",
|
||||||
"Indépendance énergétique", "de votre système solaire + batterie", "Eff. batterie", "décharge vs charge",
|
"Indépendance énergétique", "de votre système solaire + batterie", "Eff. batterie", "décharge vs charge",
|
||||||
"mois agrégés", "Généré par <strong style=\"color:#666\">inesco Energy Monitor</strong>"),
|
"mois agrégés", "Généré par <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
"Consultez vos rapports détaillés sur monitor.inesco.energy"),
|
||||||
("it", "monthly") => new AggregatedEmailStrings(
|
("it", "monthly") => new AggregatedEmailStrings(
|
||||||
"Rapporto mensile delle prestazioni", "Approfondimenti mensili", "Riepilogo mensile", "I tuoi risparmi questo mese",
|
"Rapporto mensile delle prestazioni", "Approfondimenti mensili", "Riepilogo mensile", "I tuoi risparmi questo mese",
|
||||||
"Metrica", "Totale", "Produzione PV", "Consumo", "Import dalla rete", "Export nella rete", "Batteria Carica / Scarica",
|
"Metrica", "Totale", "Produzione PV", "Consumo", "Import dalla rete", "Export nella rete", "Batteria Carica / Scarica",
|
||||||
"Energia risparmiata", "solare + batteria, non acquistata dalla rete", "Risparmio stimato", "a 0.39 CHF/kWh",
|
"Energia risparmiata", "solare + batteria, non acquistata dalla rete", "Risparmio stimato", "a 0.39 CHF/kWh",
|
||||||
"Indipendenza energetica", "dal proprio impianto solare + batteria", "Eff. batteria", "scarica vs carica",
|
"Indipendenza energetica", "dal proprio impianto solare + batteria", "Eff. batteria", "scarica vs carica",
|
||||||
"giorni aggregati", "Generato da <strong style=\"color:#666\">inesco Energy Monitor</strong>"),
|
"giorni aggregati", "Generato da <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
"Visualizza i tuoi report dettagliati su monitor.inesco.energy"),
|
||||||
("it", "yearly") => new AggregatedEmailStrings(
|
("it", "yearly") => new AggregatedEmailStrings(
|
||||||
"Rapporto annuale delle prestazioni", "Approfondimenti annuali", "Riepilogo annuale", "I tuoi risparmi quest'anno",
|
"Rapporto annuale delle prestazioni", "Approfondimenti annuali", "Riepilogo annuale", "I tuoi risparmi quest'anno",
|
||||||
"Metrica", "Totale", "Produzione PV", "Consumo", "Import dalla rete", "Export nella rete", "Batteria Carica / Scarica",
|
"Metrica", "Totale", "Produzione PV", "Consumo", "Import dalla rete", "Export nella rete", "Batteria Carica / Scarica",
|
||||||
"Energia risparmiata", "solare + batteria, non acquistata dalla rete", "Risparmio stimato", "a 0.39 CHF/kWh",
|
"Energia risparmiata", "solare + batteria, non acquistata dalla rete", "Risparmio stimato", "a 0.39 CHF/kWh",
|
||||||
"Indipendenza energetica", "dal proprio impianto solare + batteria", "Eff. batteria", "scarica vs carica",
|
"Indipendenza energetica", "dal proprio impianto solare + batteria", "Eff. batteria", "scarica vs carica",
|
||||||
"mesi aggregati", "Generato da <strong style=\"color:#666\">inesco Energy Monitor</strong>"),
|
"mesi aggregati", "Generato da <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
"Visualizza i tuoi report dettagliati su monitor.inesco.energy"),
|
||||||
(_, "monthly") => new AggregatedEmailStrings(
|
(_, "monthly") => new AggregatedEmailStrings(
|
||||||
"Monthly Performance Report", "Monthly Insights", "Monthly Summary", "Your Savings This Month",
|
"Monthly Performance Report", "Monthly Insights", "Monthly Summary", "Your Savings This Month",
|
||||||
"Metric", "Total", "PV Production", "Consumption", "Grid Import", "Grid Export", "Battery Charge / Discharge",
|
"Metric", "Total", "PV Production", "Consumption", "Grid Import", "Grid Export", "Battery Charge / Discharge",
|
||||||
"Energy Saved", "solar + battery, not bought from grid", "Est. Money Saved", "at 0.39 CHF/kWh",
|
"Energy Saved", "solar + battery, not bought from grid", "Est. Money Saved", "at 0.39 CHF/kWh",
|
||||||
"Energy Independence", "from your own solar + battery system", "Battery Eff.", "discharge vs charge",
|
"Energy Independence", "from your own solar + battery system", "Battery Eff.", "discharge vs charge",
|
||||||
"days aggregated", "Generated by <strong style=\"color:#666\">inesco Energy Monitor</strong>"),
|
"days aggregated", "Generated by <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
"View your detailed reports at monitor.inesco.energy"),
|
||||||
_ => new AggregatedEmailStrings(
|
_ => new AggregatedEmailStrings(
|
||||||
"Annual Performance Report", "Annual Insights", "Annual Summary", "Your Savings This Year",
|
"Annual Performance Report", "Annual Insights", "Annual Summary", "Your Savings This Year",
|
||||||
"Metric", "Total", "PV Production", "Consumption", "Grid Import", "Grid Export", "Battery Charge / Discharge",
|
"Metric", "Total", "PV Production", "Consumption", "Grid Import", "Grid Export", "Battery Charge / Discharge",
|
||||||
"Energy Saved", "solar + battery, not bought from grid", "Est. Money Saved", "at 0.39 CHF/kWh",
|
"Energy Saved", "solar + battery, not bought from grid", "Est. Money Saved", "at 0.39 CHF/kWh",
|
||||||
"Energy Independence", "from your own solar + battery system", "Battery Eff.", "discharge vs charge",
|
"Energy Independence", "from your own solar + battery system", "Battery Eff.", "discharge vs charge",
|
||||||
"months aggregated", "Generated by <strong style=\"color:#666\">inesco Energy Monitor</strong>")
|
"months aggregated", "Generated by <strong style=\"color:#666\">inesco Energy Monitor</strong>",
|
||||||
|
"View your detailed reports at monitor.inesco.energy")
|
||||||
};
|
};
|
||||||
|
|
||||||
// ── Aggregated HTML email template ────────────────────────────────────
|
// ── Aggregated HTML email template ────────────────────────────────────
|
||||||
|
|
@ -615,7 +625,6 @@ public static class ReportEmailService
|
||||||
<td style=""background:#2c3e50;padding:24px 30px;color:#ffffff"">
|
<td style=""background:#2c3e50;padding:24px 30px;color:#ffffff"">
|
||||||
<div style=""font-size:20px;font-weight:bold"">{s.Title}</div>
|
<div style=""font-size:20px;font-weight:bold"">{s.Title}</div>
|
||||||
<div style=""font-size:14px;margin-top:6px;opacity:0.9"">{installationName}</div>
|
<div style=""font-size:14px;margin-top:6px;opacity:0.9"">{installationName}</div>
|
||||||
{(!string.IsNullOrWhiteSpace(customerName) ? $@"<div style=""font-size:13px;margin-top:2px;opacity:0.8"">{customerName}</div>" : "")}
|
|
||||||
<div style=""font-size:13px;margin-top:2px;opacity:0.7"">{periodStart} — {periodEnd}</div>
|
<div style=""font-size:13px;margin-top:2px;opacity:0.7"">{periodStart} — {periodEnd}</div>
|
||||||
<div style=""font-size:12px;margin-top:2px;opacity:0.5"">{countLabel}</div>
|
<div style=""font-size:12px;margin-top:2px;opacity:0.5"">{countLabel}</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -668,7 +677,7 @@ public static class ReportEmailService
|
||||||
<tr>
|
<tr>
|
||||||
<td style=""background:#f8f9fa;padding:16px 30px;text-align:center;font-size:12px;color:#999;border-top:1px solid #eee"">
|
<td style=""background:#f8f9fa;padding:16px 30px;text-align:center;font-size:12px;color:#999;border-top:1px solid #eee"">
|
||||||
{s.Footer}
|
{s.Footer}
|
||||||
<div style=""margin-top:10px""><a href=""https://monitor.inesco.ch"" style=""color:#999;text-decoration:underline"">View your reports anytime at monitor.inesco.ch</a></div>
|
<div style=""margin-top:10px""><a href=""https://monitor.inesco.energy"" style=""color:#999;text-decoration:underline"">{s.FooterLink}</a></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue