Create new Web Project

This commit is contained in:
Jonathan Jenne
2023-11-08 08:59:25 +01:00
parent d0a4249eb7
commit 2e148de18e
765 changed files with 173 additions and 12962 deletions

View File

@@ -1,39 +1,9 @@
@page "/"
@using EnvelopeGenerator.Common;
@using EnvelopeGenerator.Web.Services;
@inject EnvelopeService Envelope;
<PageTitle>Index</PageTitle>
<ul>
@foreach (var envelope in envelopes)
{
<li><a href="/EnvelopeKey/@getEnvelopeKey(envelope)">@envelope.Title</a></li>
}
</ul>
<h1>Hello, world!</h1>
@code {
public List<Envelope> envelopes = new();
Welcome to your new app.
// List envelopes delivered to j.jenne@digitaldata.works
public int receiverId = 11;
string? getReceiverSignature(Envelope envelope)
{
var receiver = envelope.Receivers.Where(r => r.Id == receiverId).SingleOrDefault();
return receiver?.Signature;
}
string getEnvelopeKey(Envelope envelope)
{
return Helpers.EncodeEnvelopeReceiverId(envelope.Uuid, getReceiverSignature(envelope));
}
protected override void OnInitialized()
{
// Test
envelopes = Envelope.LoadEnvelopes(receiverId);
}
}
<SurveyPrompt Title="How is Blazor working for you?" />