DeliveryConfirmation: Add user editable Text

This commit is contained in:
2023-10-16 18:24:17 +02:00
parent d4dd84394b
commit f0751499ea
6 changed files with 27 additions and 3 deletions

View File

@ -29,7 +29,7 @@
<th colspan="2">Gradation</th>
<th colspan="2">Flächenbindung</th>
<th>Gewicht</th>
<th>Davon<br/>abwerten</th>
<th>Davon<br/>abzuwerten</th>
</tr>
<tr>
<th>[°Oe]</th>
@ -90,5 +90,9 @@
</tbody>
</table>
<!-- TODO add Gesamtlieferung tabelle -->
<!-- TODO add Freitext -->
<div class="text" style="margin-top: 2em;">
@if (Model.Text != null) {
<p class="comment" style="white-space: pre-wrap; break-inside: avoid;">@Model.Text</p>
}
</div>
</main>

View File

@ -9,12 +9,14 @@ namespace Elwig.Documents {
public int Year;
public IEnumerable<DeliveryPart> Deliveries;
public string? Text = App.Client.TextDeliveryConfirmation;
public DeliveryConfirmation(AppDbContext ctx, int year, Member m) :
base($"Anlieferungsbestätigung {year} {((IAddress?)m.BillingAddress ?? m).Name}", m) {
Year = year;
ShowDateAndLocation = true;
UseBillingAddress = true;
IncludeSender = true;
// FIXME footer in merged documents
//DocumentId = $"Anl.-Best. {Year}/{m.MgNr}";
Deliveries = ctx.DeliveryParts.FromSqlRaw($"""

View File

@ -134,7 +134,7 @@
}
</main>
@for (int i = 0; i < 2; i++) {
<div class="@(i == 0 ? "hidden" : "bottom")">
<div class="text @(i == 0 ? "hidden" : "bottom")">
@if (Model.Text != null) {
<p class="comment">@Model.Text</p>
}