Updated several C# controllers to use the new
`DigitalData.Core.Abstraction.Application.DTO` namespace
and removed references to `DigitalData.Core.DTO`. Added
`[Obsolete("Use MediatR")]` attributes to indicate a shift
towards MediatR for request handling. Improved error
handling and code organization in key methods. Updated
Razor view files to reflect namespace changes for
consistency across the application.
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
@using EnvelopeGenerator.CommonServices;
|
|
@using EnvelopeGenerator.Domain;
|
|
@using static EnvelopeGenerator.Domain.Constants;
|
|
@{
|
|
ViewData["Title"] = "Debug";
|
|
}
|
|
|
|
@functions {
|
|
string encodeEnvelopeKey(Envelope envelope)
|
|
{
|
|
var receiver = envelope.Receivers.First();
|
|
return Helpers.EncodeEnvelopeReceiverId(envelope.Uuid, receiver.Signature);
|
|
}
|
|
|
|
IEnumerable<IGrouping<EnvelopeStatus, Envelope>> groupEnvelopes(List<Envelope> envelopes)
|
|
{
|
|
return envelopes.GroupBy(item => item.Status).OrderBy(item => (int)item.Key);
|
|
}
|
|
}
|
|
|
|
<div class="container">
|
|
<section>
|
|
@foreach (IGrouping<EnvelopeStatus, Envelope> group in groupEnvelopes((List<Envelope>)@Model))
|
|
{
|
|
<section>
|
|
<h2>@group.Key.ToString() @group.Count()</h2>
|
|
|
|
<details>
|
|
<summary>Show envelopes</summary>
|
|
@foreach (Envelope envelope in @group)
|
|
{
|
|
<section>
|
|
<article class="envelope">
|
|
<strong><a href="/EnvelopeKey/@encodeEnvelopeKey(envelope)">@envelope.Title</a></strong>
|
|
<div><strong>Ersteller</strong> @envelope.User.Email.TrySanitize(_sanitizer)</div>
|
|
<div><strong>Datum</strong> @envelope.AddedWhen</div>
|
|
</article>
|
|
</section>
|
|
|
|
}
|
|
</details>
|
|
|
|
<hr />
|
|
</section>
|
|
}
|
|
</section>
|
|
</div> |