Updated admin page to be more streamlined and added the beginning of the blogging features
This commit is contained in:
@@ -50,6 +50,11 @@
|
||||
<MudDivider DividerType="DividerType.Middle"></MudDivider>
|
||||
<MudTextField For="@(() => Model.Description)" Lines=8 Placeholder="Description" T="string" Class="pl-4 pr-4" @bind-Value=Model.Description @bind-Value:after=OnInputsChanged></MudTextField>
|
||||
|
||||
<MudText Typo="Typo.h6" Color="Color.Primary" Class="pt-4 pb-0">Item Quantity</MudText>
|
||||
<MudDivider DividerType="DividerType.Middle"></MudDivider>
|
||||
<MudNumericField Min="0" @bind-Value=Model.Quantity></MudNumericField>
|
||||
|
||||
|
||||
<MudText Typo="Typo.h6" Color="Color.Primary" Class="pt-4 pb-0">Storage Location</MudText>
|
||||
<MudDivider DividerType="DividerType.Middle"></MudDivider>
|
||||
<MudAutocomplete For="@(() => Model.StorageLocation)" T="string" Label="Storage Location" Class="pt-0 mt-0 pl-2 pr-2" @bind-Value=Model.StorageLocation @bind-Value:after=OnInputsChanged SearchFunc="Helpers.SearchStorageLocation" CoerceValue=true></MudAutocomplete>
|
||||
|
||||
@@ -40,6 +40,8 @@ public class ArtifactEntryValidationModel
|
||||
|
||||
public bool IsPublicallyVisible { get; set; } = true;
|
||||
|
||||
public int Quantity { get; set; }
|
||||
|
||||
public ArtifactEntry ToArtifactEntry(ArtifactGrouping? parent = null)
|
||||
{
|
||||
List<ArtifactEntryTag> tags = new();
|
||||
@@ -74,6 +76,7 @@ public class ArtifactEntryValidationModel
|
||||
Title = Title,
|
||||
ArtifactGrouping = parent,
|
||||
RelatedTo = RelatedArtifacts,
|
||||
Quantity = Quantity
|
||||
};
|
||||
|
||||
List<ListedName> listedNames = new();
|
||||
|
||||
@@ -72,8 +72,8 @@ public class ArtifactGroupingValidationModel : IValidatableObject
|
||||
defects.AddRange(entry.Defects.Select(defect => defect.Description));
|
||||
}
|
||||
|
||||
var validationModel = new ArtifactEntryValidationModel()
|
||||
{
|
||||
var validationModel = new ArtifactEntryValidationModel()
|
||||
{
|
||||
Id = entry.Id,
|
||||
Title = entry.Title,
|
||||
StorageLocation = entry.StorageLocation.Location,
|
||||
@@ -89,6 +89,7 @@ public class ArtifactGroupingValidationModel : IValidatableObject
|
||||
RelatedArtifacts = entry.RelatedTo,
|
||||
Tags = entry?.Tags?.Select(tag => tag.Name).ToList(),
|
||||
Type = entry?.Type.Name,
|
||||
Quantity = entry.Quantity
|
||||
};
|
||||
|
||||
entries.Add(validationModel);
|
||||
|
||||
Reference in New Issue
Block a user