Compare commits
2 Commits
595bbf3f25
...
refactor/w
| Author | SHA1 | Date | |
|---|---|---|---|
| 0cf603fc79 | |||
| e3d2225a44 |
@@ -1,9 +1,6 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.MessagingService.Application.Common.Dto;
|
||||
using DigitalData.MessagingService.Application.Common.Interfaces;
|
||||
using DigitalData.MessagingService.Application.EmailSending.Commands;
|
||||
using DigitalData.MessagingService.Client;
|
||||
using DigitalData.MessagingService.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services.Notification;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@using EnvelopeGenerator.Domain.Resources
|
||||
@using EnvelopeGenerator.Server.Client.Components.Sender.ReceiverSuggestionFilter
|
||||
@using EnvelopeGenerator.Server.Client.Services
|
||||
@using MudBlazor
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.Extensions.Localization
|
||||
@inject IStringLocalizer<Model> ModelLocalizer
|
||||
@@ -27,28 +28,23 @@
|
||||
<div class="sender-create-wizard"
|
||||
tabindex="0"
|
||||
@onkeydown="OnWizardKeyDownAsync">
|
||||
<div class="sender-create-wizard__progress">
|
||||
<div class="sender-create-wizard__progress-track"></div>
|
||||
<MudPaper Class="sender-create-wizard__stepper-shell" Elevation="0">
|
||||
<MudStepper Vertical="true"
|
||||
NonLinear="false"
|
||||
ShowResetButton="false"
|
||||
ActiveIndex="@_currentStep"
|
||||
Class="sender-create-wizard__stepper">
|
||||
<ChildContent>
|
||||
@for (var step = 0; step < TotalSteps; step++)
|
||||
{
|
||||
var isActive = step == _currentStep;
|
||||
var isDone = step < _currentStep;
|
||||
<div class="sender-create-wizard__step @(isActive ? "sender-create-wizard__step--active" : string.Empty) @(isDone ? "sender-create-wizard__step--done" : string.Empty)">
|
||||
<span class="sender-create-wizard__step-index">@(step + 1)</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
var stepIndex = step;
|
||||
|
||||
<div class="sender-create-wizard__meta">
|
||||
<div class="sender-create-wizard__title">@CurrentStepTitle</div>
|
||||
<div class="sender-create-wizard__description">@CurrentStepDescription</div>
|
||||
</div>
|
||||
<MudStep Title="@GetStepTitle(stepIndex)">
|
||||
<div class="sender-create-wizard__stepper-description">@GetStepDescription(stepIndex)</div>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(_validationMessage))
|
||||
@if (stepIndex == _currentStep)
|
||||
{
|
||||
<div class="sender-create-wizard__validation">@_validationMessage</div>
|
||||
}
|
||||
|
||||
<div class="sender-create-wizard__step-content">
|
||||
@if (_currentStep == 0)
|
||||
{
|
||||
<div class="sender-create-wizard__form-grid">
|
||||
@@ -78,7 +74,7 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (_currentStep == 1)
|
||||
else if (_currentStep == 3)
|
||||
{
|
||||
<div class="sender-create-wizard__form-grid">
|
||||
<div class="sender-create-wizard__field sender-create-wizard__field--full">
|
||||
@@ -192,7 +188,7 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (_currentStep == 3)
|
||||
else if (_currentStep == 1)
|
||||
{
|
||||
<div class="sender-create-wizard__suggestions">
|
||||
<div class="sender-create-wizard__suggestions-title">@L("SenderWizard_RecentReceivers", "Zuletzt verwendete Empfänger")</div>
|
||||
@@ -355,6 +351,19 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</MudStep>
|
||||
}
|
||||
</ChildContent>
|
||||
</MudStepper>
|
||||
</MudPaper>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(_validationMessage))
|
||||
{
|
||||
<div class="sender-create-wizard__validation">@_validationMessage</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</BodyContentTemplate>
|
||||
<FooterContentTemplate>
|
||||
<div class="sender-create-wizard__footer">
|
||||
@@ -456,7 +465,7 @@
|
||||
|
||||
private bool IsFirstStep => _currentStep <= 0;
|
||||
private bool IsLastStep => _currentStep >= TotalSteps - 1;
|
||||
private bool CanSkipCurrentStep => _currentStep == 1;
|
||||
private bool CanSkipCurrentStep => _currentStep == 3;
|
||||
|
||||
private IReadOnlyList<RecentReceiverSuggestionDto> FilteredRecentSuggestions =>
|
||||
BuildFilteredRecentSuggestions();
|
||||
@@ -465,22 +474,26 @@
|
||||
? $"data:application/pdf;base64,{Convert.ToBase64String(_documentBytes)}"
|
||||
: null;
|
||||
|
||||
private string CurrentStepTitle => _currentStep switch
|
||||
private string CurrentStepTitle => GetStepTitle(_currentStep);
|
||||
|
||||
private string CurrentStepDescription => GetStepDescription(_currentStep);
|
||||
|
||||
private string GetStepTitle(int step) => step switch
|
||||
{
|
||||
0 => L("SenderWizard_Step_Basics", "Grunddaten"),
|
||||
1 => L("SenderWizard_Step_Message", "Nachricht und Optionen"),
|
||||
1 => L("SenderWizard_Step_Receivers", "Empfänger"),
|
||||
2 => L("SenderEditor_EnvelopeSettings", "Envelope-Einstellungen"),
|
||||
3 => L("SenderWizard_Step_Receivers", "Empfänger"),
|
||||
3 => L("SenderWizard_Step_Message", "Nachricht und Optionen"),
|
||||
4 => L("SenderWizard_Step_Document", "Dokument"),
|
||||
_ => L("SenderWizard_Step_Basics", "Grunddaten")
|
||||
};
|
||||
|
||||
private string CurrentStepDescription => _currentStep switch
|
||||
private string GetStepDescription(int step) => step switch
|
||||
{
|
||||
0 => L("SenderWizard_Step_Basics_Desc", "Starten Sie mit den Pflichtangaben für den Umschlag."),
|
||||
1 => L("SenderWizard_Step_Message_Desc", "Fügen Sie optionale Nachricht und Einstellungen hinzu."),
|
||||
1 => L("SenderWizard_Step_Receivers_Desc", "Definieren Sie die Empfänger für den Signaturprozess."),
|
||||
2 => L("SenderWizard_Step_Settings_Desc", "Konfigurieren Sie Sicherheits-, Erinnerungs- und Ablaufoptionen."),
|
||||
3 => L("SenderWizard_Step_Receivers_Desc", "Definieren Sie die Empfänger für den Signaturprozess."),
|
||||
3 => L("SenderWizard_Step_Message_Desc", "Fügen Sie optionale Nachricht und Einstellungen hinzu."),
|
||||
4 => L("SenderWizard_Step_Document_Desc", "Laden Sie das Dokument hoch und platzieren Sie Signaturfelder."),
|
||||
_ => L("SenderWizard_Step_Basics_Desc", "Starten Sie mit den Pflichtangaben für den Umschlag.")
|
||||
};
|
||||
@@ -703,7 +716,7 @@
|
||||
{
|
||||
_currentStep++;
|
||||
|
||||
if (_currentStep == 3)
|
||||
if (_currentStep == 1)
|
||||
await EnsureRecentSuggestionsLoadedAsync();
|
||||
}
|
||||
}
|
||||
@@ -797,10 +810,10 @@
|
||||
if (!string.Equals(args.Key, "Enter", StringComparison.OrdinalIgnoreCase))
|
||||
return;
|
||||
|
||||
if (_currentStep == 1)
|
||||
if (_currentStep == 3)
|
||||
return;
|
||||
|
||||
if (_currentStep == 3 && (!string.IsNullOrWhiteSpace(_receiverName) || !string.IsNullOrWhiteSpace(_receiverEmail)))
|
||||
if (_currentStep == 1 && (!string.IsNullOrWhiteSpace(_receiverName) || !string.IsNullOrWhiteSpace(_receiverEmail)))
|
||||
{
|
||||
await AddReceiver();
|
||||
return;
|
||||
@@ -894,7 +907,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_currentStep == 3)
|
||||
if (_currentStep == 1)
|
||||
{
|
||||
if (_receivers.Count == 0)
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MudBlazor" Version="8.0.0" />
|
||||
<PackageReference Include="DevExpress.Blazor.PdfViewer" Version="25.2.3" />
|
||||
<PackageReference Include="DevExpress.Blazor.Reporting.JSBasedControls" Version="25.2.3" />
|
||||
<PackageReference Include="DevExpress.Blazor.Reporting.Viewer" Version="25.2.3" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using EnvelopeGenerator.Server.Client.Services;
|
||||
using EnvelopeGenerator.Server.Client.Options;
|
||||
using MudBlazor.Services;
|
||||
using DevExpress.Blazor.Reporting;
|
||||
using DevExpress.XtraReports.Web.Extensions;
|
||||
using DevExpress.DataAccess.Web;
|
||||
@@ -16,6 +17,7 @@ CultureInfo.DefaultThreadCurrentCulture = cultureInfo;
|
||||
CultureInfo.DefaultThreadCurrentUICulture = cultureInfo;
|
||||
|
||||
builder.Services.AddLocalization();
|
||||
builder.Services.AddMudServices();
|
||||
|
||||
// Named HttpClient for API calls (both for services and DevExpress components)
|
||||
builder.Services.AddHttpClient("EnvelopeGenerator.Server", client =>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flag-icons@7.2.3/css/flag-icons.min.css" />
|
||||
<link rel="stylesheet" href="css/app.css" />
|
||||
<link rel="stylesheet" href="css/envelope-viewer.css" />
|
||||
<link rel="stylesheet" href="_content/MudBlazor/MudBlazor.min.css" />
|
||||
<link rel="stylesheet" href="EnvelopeGenerator.Server.styles.css" />
|
||||
<HeadOutlet />
|
||||
<!-- Apply saved theme immediately on page load — before WASM boots.
|
||||
@@ -37,6 +38,7 @@
|
||||
<script src="js/receiver-signature.js?v=9"></script>
|
||||
<script src="js/signflow-theme.js"></script>
|
||||
<script src="js/envelope-editor.js"></script>
|
||||
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
</body>
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.22" />
|
||||
<PackageReference Include="MudBlazor" Version="8.0.0" />
|
||||
<PackageReference Include="DevExpress.Blazor" Version="25.2.3" />
|
||||
<PackageReference Include="DevExpress.Blazor.PdfViewer" Version="25.2.3" />
|
||||
<PackageReference Include="DevExpress.Blazor.Reporting.Viewer" Version="25.2.3" />
|
||||
|
||||
@@ -32,6 +32,7 @@ using NLog;
|
||||
using NLog.Web;
|
||||
using Scalar.AspNetCore;
|
||||
using System.Globalization;
|
||||
using MudBlazor.Services;
|
||||
|
||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||
logger.Info("EnvelopeGenerator.Server logging initialized!");
|
||||
@@ -60,6 +61,7 @@ try
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents()
|
||||
.AddInteractiveWebAssemblyComponents();
|
||||
builder.Services.AddMudServices();
|
||||
|
||||
// Add API Controllers
|
||||
builder.Services.AddControllers()
|
||||
|
||||
@@ -1116,57 +1116,71 @@
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.sender-create-wizard__progress {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
.sender-create-wizard__stepper-shell {
|
||||
border: 1px solid rgba(126, 34, 206, 0.12);
|
||||
border-radius: 10px;
|
||||
background: rgba(126, 34, 206, 0.04);
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.sender-create-wizard__progress-track {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
height: 2px;
|
||||
transform: translateY(-50%);
|
||||
background: rgba(126, 34, 206, 0.18);
|
||||
z-index: 0;
|
||||
.sender-create-wizard__stepper {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sender-create-wizard__step {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.sender-create-wizard__stepper .mud-step {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.sender-create-wizard__step-index {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 999px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.78rem;
|
||||
.sender-create-wizard__stepper .mud-stepper-actions,
|
||||
.sender-create-wizard__stepper .mud-stepper-action {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.sender-create-wizard__stepper .mud-step-label {
|
||||
color: #1f2937;
|
||||
font-size: 0.86rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sender-create-wizard__stepper .mud-step-content {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.sender-create-wizard__stepper .mud-stepper-vertical .mud-stepper-step {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.sender-create-wizard__stepper .mud-step-icon {
|
||||
color: #64748b;
|
||||
background: #f8fafc;
|
||||
border: 1px solid rgba(126, 34, 206, 0.25);
|
||||
}
|
||||
|
||||
.sender-create-wizard__step--active .sender-create-wizard__step-index {
|
||||
.sender-create-wizard__stepper .mud-step-completed .mud-step-icon,
|
||||
.sender-create-wizard__stepper .mud-step-current .mud-step-icon {
|
||||
color: #ffffff;
|
||||
background: linear-gradient(135deg, #7e22ce 0%, #2a5298 100%);
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.sender-create-wizard__stepper .mud-step-current .mud-step-icon {
|
||||
background: linear-gradient(135deg, #7e22ce 0%, #2a5298 100%);
|
||||
box-shadow: 0 0 0 3px rgba(126, 34, 206, 0.15);
|
||||
}
|
||||
|
||||
.sender-create-wizard__step--done .sender-create-wizard__step-index {
|
||||
color: #ffffff;
|
||||
.sender-create-wizard__stepper .mud-step-completed .mud-step-icon {
|
||||
background: #2a5298;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.sender-create-wizard__stepper-description {
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.35;
|
||||
color: #64748b;
|
||||
margin-top: 0.2rem;
|
||||
padding-right: 0.35rem;
|
||||
}
|
||||
|
||||
.sender-create-wizard__step-content {
|
||||
margin-top: 0.7rem;
|
||||
}
|
||||
|
||||
.sender-create-wizard__meta {
|
||||
|
||||
Reference in New Issue
Block a user