Init
This commit is contained in:
86
Server/Components/Pages/InvoicePage.razor
Normal file
86
Server/Components/Pages/InvoicePage.razor
Normal file
@@ -0,0 +1,86 @@
|
||||
@page "/edit/{InvoiceId}"
|
||||
@using Server.Model
|
||||
@rendermode InteractiveServer
|
||||
|
||||
|
||||
<PageTitle>Home</PageTitle>
|
||||
|
||||
|
||||
|
||||
<h1>@Invoice.InvoiceId</h1>
|
||||
|
||||
<button type="button" class="btn btn-primary" @onclick="SaveInvoiceAsync">Speichern</button>
|
||||
<button type="button" class="btn btn-info" @onclick="GenerateInvoiceAsync">Generieren</button>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(AlertMessage))
|
||||
{
|
||||
<div class="alert alert-danger mt-3">
|
||||
@AlertMessage
|
||||
</div>
|
||||
}
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check form-switch">
|
||||
<InputCheckbox @bind-Value="@Invoice.DeletionAllowed" class="form-check-input" id="deletionallowedcheck"></InputCheckbox>
|
||||
<label class="form-check-label" for="deletionallowedcheck">Löschen erlaubt</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Datum</label>
|
||||
<InputDate class="form-control" @bind-Value="@Invoice.IssueDate"></InputDate>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" >Rechnungsnummer</label>
|
||||
<InputText class="form-control" @bind-Value="@Invoice.InvoiceId" disabled></InputText>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Kommentar</label>
|
||||
<InputTextArea class="form-control" @bind-Value="@Invoice.Comment"></InputTextArea>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary" @onclick="CreateItemAsync">Neuer Artikel</button>
|
||||
|
||||
@foreach (var item in Invoice.Items)
|
||||
{
|
||||
<hr />
|
||||
|
||||
<div class="card" style="width: 100%; max-width: 1000px;">
|
||||
<div class="card-body">
|
||||
<div class="row pt-1">
|
||||
<div class="col-xl">
|
||||
<label class="form-label mb-0">Name</label>
|
||||
<InputText class="form-control" @bind-Value="@item.Name"></InputText>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<label class="form-label mb-0">Menge</label>
|
||||
<InputNumber TValue="double" class="form-control" @bind-Value="@item.Quantity"></InputNumber>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<label class="form-label mb-0">Price (Netto)</label>
|
||||
<InputNumber TValue="double" class="form-control" @bind-Value="@item.PriceNetto"></InputNumber>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<label class="form-label mb-0">Tax Type</label>
|
||||
<InputSelect @bind-Value="@item.TaxType" class="form-select">
|
||||
@foreach (var taxType in Enum.GetValues(typeof(TaxType)))
|
||||
{
|
||||
<option value="@taxType">@taxType</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-1 mt-2">
|
||||
<label class="form-label mb-0">Description</label>
|
||||
<InputText class="form-control" @bind-Value="@item.Description"></InputText>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user