Compare commits
2 Commits
ddde70f8f1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f1bc1b53a5 | |||
| bdf54ef5ae |
@@ -14,22 +14,20 @@
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="betreff" HelpText="Gib einen Betreff ein" ResourceKey="Betreff">Betreff: </Label>
|
||||
<div class="col-sm-9">
|
||||
<input id="betreff" class="form-control" @bind="@_betreff" required />
|
||||
<input id="betreff" class="form-control" @bind="@_adminModules.Name" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="Body" HelpText="Enter a body" ResourceKey="Body">Body: </Label>
|
||||
<RichTextEditor id="content" class="form-control" Content="@_richText" @ref="@RichTextEditorHtml" required />
|
||||
<RichTextEditor id="content" class="form-control" Content="@_adminModules.Content" @ref="@RichTextEditorHtml" required />
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-success" @onclick="Save">@Localizer["Save"]</button>
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||
<br /><br />
|
||||
<ReportComponent ReportableEntity="@AdminModules" RenderModeBoundary="@RenderModeBoundary" />
|
||||
<br /><br />
|
||||
@if (PageState.Action == "Edit")
|
||||
{
|
||||
<AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon"></AuditInfo>
|
||||
<AuditInfo CreatedBy="@_adminModules.CreatedBy" CreatedOn="@_adminModules.CreatedOn" ModifiedBy="@_adminModules.ModifiedBy" ModifiedOn="@_adminModules.ModifiedOn"></AuditInfo>
|
||||
}
|
||||
</form>
|
||||
|
||||
@@ -50,14 +48,7 @@
|
||||
private bool validated = false;
|
||||
|
||||
private int _id;
|
||||
private string _betreff;
|
||||
private string _richText;
|
||||
private string _createdby;
|
||||
private DateTime _createdon;
|
||||
private string _modifiedby;
|
||||
private DateTime _modifiedon;
|
||||
|
||||
private AdminModules AdminModules;
|
||||
private AdminModules _adminModules;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@@ -69,13 +60,7 @@
|
||||
AdminModules AdminModules = await AdminModulesService.GetAdminModulesAsync(_id, ModuleState.ModuleId);
|
||||
if (AdminModules != null)
|
||||
{
|
||||
_betreff = AdminModules.Name;
|
||||
_richText = AdminModules.Content;
|
||||
_createdby = AdminModules.CreatedBy;
|
||||
_createdon = AdminModules.CreatedOn;
|
||||
_modifiedby = AdminModules.ModifiedBy;
|
||||
_modifiedon = AdminModules.ModifiedOn;
|
||||
this.AdminModules = AdminModules;
|
||||
_adminModules = AdminModules;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,7 +87,6 @@
|
||||
{
|
||||
AdminModules AdminModules = new AdminModules();
|
||||
AdminModules.ModuleId = ModuleState.ModuleId;
|
||||
AdminModules.Name = _betreff;
|
||||
AdminModules.Content = content;
|
||||
AdminModules = await AdminModulesService.AddAdminModulesAsync(AdminModules);
|
||||
await logger.LogInformation("AdminModules Added {AdminModules}", AdminModules);
|
||||
@@ -110,7 +94,6 @@
|
||||
else
|
||||
{
|
||||
AdminModules AdminModules = await AdminModulesService.GetAdminModulesAsync(_id, ModuleState.ModuleId);
|
||||
AdminModules.Name = _betreff;
|
||||
AdminModules.Content = content;
|
||||
await AdminModulesService.UpdateAdminModulesAsync(AdminModules);
|
||||
await logger.LogInformation("AdminModules Updated {AdminModules}", AdminModules);
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
@inject IAdminModulesService AdminModulesService
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IStringLocalizer<Index> Localizer
|
||||
@inject IReportingHandler ReportingHandler;
|
||||
|
||||
@if (_AdminModuless == null)
|
||||
{
|
||||
@@ -25,13 +24,11 @@ else
|
||||
<th style="width: 1px;"> </th>
|
||||
<th style="width: 1px;"> </th>
|
||||
<th style="width: 1px;"> </th>
|
||||
<th style="width: 1px;"> </th>
|
||||
<th>@Localizer["Name"]</th>
|
||||
</Header>
|
||||
<Row>
|
||||
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.AdminModulesId.ToString())" ResourceKey="Edit" /></td>
|
||||
<td><ActionDialog Header="Delete AdminModules" Message="Are You Sure You Wish To Delete This AdminModules?" Action="Delete" Security="SecurityAccessLevel.Edit" Class="btn btn-danger" OnClick="@(() => Delete(context))" ResourceKey="Delete" Id="@("Delete-"+context.AdminModulesId)" /></td>
|
||||
<td><ActionDialog Header="Report AdminModules" Message="Are You Sure You Wish To Report This AdminModules?" Action="Report" Security="SecurityAccessLevel.Edit" Class="btn btn-danger" OnClick="@(() => Report(context))" ResourceKey="Report" Id="@("Report-"+context.AdminModulesId)" /></td>
|
||||
<td><ActionLink Action="Send" Parameters="@($"id=" + context.AdminModulesId.ToString())" ResourceKey="Send" /></td>
|
||||
<td>@context.Name</td>
|
||||
</Row>
|
||||
@@ -82,19 +79,4 @@ else
|
||||
AddModuleMessage(Localizer["Message.DeleteError"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task Report(AdminModules AdminModules)
|
||||
{
|
||||
try
|
||||
{
|
||||
ReportingHandler.Report(AdminModules, "Reported by User");
|
||||
await logger.LogInformation("AdminModules Reported {AdminModules}", AdminModules);
|
||||
StateHasChanged();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await logger.LogError(ex, "Error Reportign AdminModules {AdminModules} {Error}", AdminModules, ex.Message);
|
||||
AddModuleMessage(Localizer["Message.DeleteError"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,9 @@ namespace SZUAbsolventenverein.Module.AdminMassMailing
|
||||
{
|
||||
Name = "AdminMassMailing",
|
||||
Description = "Mass Mailing Tool",
|
||||
Version = "1.0.7",
|
||||
Version = "1.0.8",
|
||||
ServerManagerType = "SZUAbsolventenverein.Module.AdminModules.Manager.AdminModulesManager, SZUAbsolventenverein.Module.AdminModules.Server.Oqtane",
|
||||
ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,1.0.5,1.0.6,1.0.7",
|
||||
ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,1.0.5,1.0.6,1.0.7,1.0.8",
|
||||
Dependencies = "SZUAbsolventenverein.Module.AdminModules.Shared.Oqtane",
|
||||
PackageName = "SZUAbsolventenverein.Module.AdminMassMailing"
|
||||
};
|
||||
|
||||
@@ -9,9 +9,9 @@ namespace SZUAbsolventenverein.Module.AdminSettings
|
||||
{
|
||||
Name = "Admin - Settings",
|
||||
Description = "Einstellungen in Oqtane",
|
||||
Version = "1.0.0",
|
||||
Version = "1.0.8",
|
||||
ServerManagerType = "SZUAbsolventenverein.Module.AdminModules.Manager.AdminModulesManager, SZUAbsolventenverein.Module.AdminModules.Server.Oqtane",
|
||||
ReleaseVersions = "1.0.0",
|
||||
ReleaseVersions = "1.0.8",
|
||||
Dependencies = "SZUAbsolventenverein.Module.AdminModules.Shared.Oqtane",
|
||||
PackageName = "SZUAbsolventenverein.Module.AdminSettings"
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ else
|
||||
<td>@context.CreatedBy</td>
|
||||
<td>@context.CreatedOn</td>
|
||||
<td>@context.ModuleId</td>
|
||||
<td>@context.ReportingID</td>
|
||||
<td>@context.EntityId</td>
|
||||
<td>@context.Note</td>
|
||||
<td>@context.Reason</td>
|
||||
</Row>
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace SZUAbsolventenverein.Module.ReportSystem
|
||||
{
|
||||
Name = "ReportSystem",
|
||||
Description = "Handle Systemwide Reporting",
|
||||
Version = "1.0.0",
|
||||
Version = "1.0.8",
|
||||
ServerManagerType =
|
||||
"SZUAbsolventenverein.Module.ReportSystem.Manager.ReportSystemManager, SZUAbsolventenverein.Module.AdminModules.Server.Oqtane",
|
||||
ReleaseVersions = "1.0.0",
|
||||
ReleaseVersions = "1.0.8",
|
||||
Dependencies = "SZUAbsolventenverein.Module.ReportSystem.Shared.Oqtane",
|
||||
PackageName = "SZUAbsolventenverein.Module.ReportSystem",
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>$projectname$</id>
|
||||
<version>1.0.6</version>
|
||||
<version>1.0.8</version>
|
||||
<authors>SZUAbsolventenverein</authors>
|
||||
<owners>SZUAbsolventenverein</owners>
|
||||
<title>AdminModules</title>
|
||||
@@ -17,7 +17,7 @@
|
||||
<summary></summary>
|
||||
<packageTypes>
|
||||
<packageType name="Dependency" />
|
||||
<packageType name="Oqtane.Framework" version="6.2.0" />
|
||||
<packageType name="Oqtane.Framework" version="10.0.3" />
|
||||
</packageTypes>
|
||||
</metadata>
|
||||
<files>
|
||||
|
||||
Reference in New Issue
Block a user