Files
Fuchs_Intranet/Fuchs/Views/Shared/_Layout.cshtml
T
Stefan 49e3ed2673 Add unit tests for Fuchs_DataService and related components
- Introduced comprehensive unit tests for the Fuchs_DataService library, covering DATEV header formatting, CSV/XML generation, and FdsMfrClient construction.
- Implemented tests for FdsMfr.UpdateNeed parsing and FdsShared utility helpers, ensuring correct functionality and stability.
- Added tests for FdsConfig and FdsMfrClient to validate configuration resolution and client construction.

Document decisions on backend-authoritative invoice and reminder handling

- Created ADR 0008 to clarify that all invoice types and reminder stages are backend-authoritative during drafting and previewing.
- Established that all calculations and settings must be processed server-side, ensuring consistency between online editor and PDF outputs.

Define irreversible mutations for set-price modes in invoices

- Documented ADR 0009 to specify that the "Set mit Preis" and "Nur Set mit Preis" operations are irreversible mutations affecting service request blocks.
- Clarified that these operations are not display toggles but actual data changes, ensuring clear expectations for invoice handling.

Transition MFR ERP sync to in-process execution within the web app

- Created ADR 0010 to outline the migration of Fuchs_DataService from a standalone service to an in-process library within the Fuchs web application.
- Updated configuration and logging management to be handled by the host application, streamlining the sync process.

Add publish profile and periodic hosted service for job scheduling

- Introduced a publish profile for deployment to a specified folder.
- Implemented PeriodicHostedService to manage multiple independent jobs, including the MFR ERP sync, with configurable execution intervals.

Add dotnet-tools.json for EF Core CLI tools

- Included dotnet-tools.json to manage the version of dotnet-ef for Entity Framework Core migrations and commands.
2026-07-16 13:34:23 +02:00

137 lines
5.2 KiB
Plaintext

@using System.Security.Claims
@using Microsoft.Data.SqlClient
@using Newtonsoft.Json
@inject IConfiguration Configuration
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostEnvironment
@{
bool isAuth = User.Identity?.IsAuthenticated ?? false;
var authinfo = new Dictionary<string, object>();
if (isAuth)
{
authinfo["useraccount_id"] = User.FindFirstValue("fuchs:useraccount_id") ?? "";
authinfo["email"] = User.FindFirstValue("fuchs:email") ?? "";
authinfo["authorization"] = User.FindFirstValue("fuchs:authorization") ?? "0";
}
authinfo["requestedaccount"] = "";
authinfo["accountrequired"] = false;
string appName = ViewData["AppName"] as string ?? "Fuchs Intranet";
string fullName = ViewData["FullName"] as string ?? "";
string pageTitle = ViewData["Title"] as string ?? "Intranet";
// When the deployment is flagged as a test/staging instance (Fuchs:IsTestDeployment = true),
// a distinctive green background is injected below so a test instance is never mistaken for
// production. Defaults to false (production) in appsettings.json.
bool isTestDeployment = Configuration.GetValue<bool>("Fuchs:IsTestDeployment");
string? debugDbTarget = null;
if (HostEnvironment.IsDevelopment())
{
var connectionString = Configuration.GetConnectionString("fuchs_fds_ConnectionString");
if (!string.IsNullOrWhiteSpace(connectionString))
{
var builder = new SqlConnectionStringBuilder(connectionString);
debugDbTarget = $"{builder.DataSource} / {builder.InitialCatalog}";
}
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@if (!string.IsNullOrWhiteSpace(debugDbTarget))
{
<meta name="fuchs-debug-database" content="@debugDbTarget" />
}
<title>@pageTitle</title>
<script src="~/web/tools.js" asp-append-version="true"></script>
@if (isAuth)
{
<script src="~/lib/tinymce/tinymce.min.js"></script>
<link rel="stylesheet" href="~/web/fis.min.css" asp-append-version="true" />
<script src="~/web/fis.min.js" asp-append-version="true"></script>
}
else
{
<link rel="stylesheet" href="~/web/fisb.min.css" asp-append-version="true" />
<script src="~/web/fisb.min.js" asp-append-version="true"></script>
}
@await RenderSectionAsync("CustomHeader", required: false)
@if (isTestDeployment)
{
<style>
body, html, body > header > nav, body > main > #topbar > nav {
background-color: #13a143 !important;
}
</style>
}
<script type="text/javascript">
$ocms.auth = @Html.Raw(JsonConvert.SerializeObject(authinfo));
</script>
</head>
<body class="ldng">
<div id="bgimg"></div>
@if (isAuth)
{
<div class="pgb inactive">
<div class="pgb-progress">
<div class="inner"></div>
</div>
</div>
<header>
<nav id="mainmenu">
<div class="nav-header">
<div id="logo">&nbsp;</div>
<button id="mmmb" class="nav-btn" data-toggle="vis" data-target="#mainmenu">
<span class="glyphicon glyphicon-menu-hamburger"></span>
</button>
<div id="brand" class="brand">@appName</div>
<div id="activemodule" class="activemodule">Übersicht</div>
</div>
<ul class="nav-right">
<li class="dropdown">
<a class="dds dropdown-toggle" role="button" aria-expanded="false">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
<span class="caret dd"></span>
</a>
<ul id="vm_menu_auth" class="dropdown-menu right" role="menu">
<li class="dropdown submenu">
<a class="dds dropdown-toggle" role="button" aria-expanded="false">
@fullName<span class="caret dd"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a onclick="$ocms.logout.call(this);">abmelden</a></li>
<li><a onclick="$fis.resetPass.call(this);">Passwort ändern</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
@await RenderSectionAsync("BodyHeader", required: false)
</header>
<main>
<div id="topbar"></div>
<div id="listframe"></div>
<div id="contentframe">
@RenderBody()
</div>
</main>
<footer>
<div id="notification_frame"></div>
@await RenderSectionAsync("BodyFooter", required: false)
</footer>
}
else
{
@await Html.PartialAsync("~/Views/Partials/vpart__ocms_login.cshtml")
@RenderBody()
}
<div class="timer"></div>
</body>
</html>