fixes and renaming

This commit is contained in:
Paul Schneider 2026-06-30 23:32:05 +01:00
commit 0965caaf40
8 changed files with 29 additions and 28 deletions

View file

@ -28,7 +28,7 @@ namespace Yavsc.Controllers
return NotFound();
}
GeneralSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id);
MusicLoverSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id);
if (generalSettings == null)
{
return NotFound();
@ -46,7 +46,7 @@ namespace Yavsc.Controllers
// POST: GeneralSettings/Create
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(GeneralSettings generalSettings)
public async Task<IActionResult> Create(MusicLoverSettings generalSettings)
{
if (ModelState.IsValid)
{
@ -65,7 +65,7 @@ namespace Yavsc.Controllers
return NotFound();
}
GeneralSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id);
MusicLoverSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id);
if (generalSettings == null)
{
return NotFound();
@ -76,7 +76,7 @@ namespace Yavsc.Controllers
// POST: GeneralSettings/Edit/5
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(GeneralSettings generalSettings)
public async Task<IActionResult> Edit(MusicLoverSettings generalSettings)
{
if (ModelState.IsValid)
{
@ -96,7 +96,7 @@ namespace Yavsc.Controllers
return NotFound();
}
GeneralSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id);
MusicLoverSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id);
if (generalSettings == null)
{
return NotFound();
@ -110,7 +110,7 @@ namespace Yavsc.Controllers
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(string id)
{
GeneralSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id);
MusicLoverSettings generalSettings = await _context.GeneralSettings.SingleAsync(m => m.UserId == id);
_context.GeneralSettings.Remove(generalSettings);
await _context.SaveChangesAsync();
return RedirectToAction("Index");

View file

@ -20,7 +20,7 @@
</div>
<div class="form-group">
<label asp-for="Name" class="col-md-2 control-label">
Name"]</label>
Name</label>
<div class="col-md-10">
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger" ></span>
@ -28,7 +28,7 @@
</div>
<div class="form-group">
<label asp-for="Parent" class="col-md-2 control-label">
Parent"]</label>
Parent</label>
<div class="col-md-10">
<select asp-for="ParentCode" asp-items=@ViewBag.ParentCode class="form-control" >
</select>
@ -37,7 +37,7 @@
</div>
<div class="form-group">
<label asp-for="Description" class="col-md-2 control-label">
Description"]</label>
Description</label>
<div class="col-md-10">
<input asp-for="Description" class="form-control" />
<span asp-validation-for="Description" class="text-danger" ></span>
@ -45,7 +45,7 @@
</div>
<div class="form-group">
<label asp-for="Photo" class="col-md-2 control-label">
Photo"]
Photo
</label>
<div class="col-md-10">
<input asp-for="Photo" class="form-control" />
@ -54,7 +54,7 @@
</div>
<div class="form-group">
<label asp-for="SettingsClassName" class="col-md-2 control-label">
SettingsClass"]
SettingsClass
</label>
<div class="col-md-10">
<select asp-for="SettingsClassName" class="form-control" asp-items="@ViewBag.SettingsClassName">
@ -67,7 +67,7 @@
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create"]" class="btn btn-default" />
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>

View file

@ -54,13 +54,14 @@
<span asp-validation-for="SettingsClassName" class="text-danger" ></span>
</div>
</div>
<div class="form-group">
<label asp-for="Hidden" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Hidden" class="form-control" />
<span asp-validation-for="Hidden" class="text-danger"></span>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" asp-for="Hidden" id="Hidden">
<label class="form-check-label" for="Hidden">
Hidden activity
</label>
</div>
<div class="form-group">
<label asp-for="Rate" class="col-md-2 control-label"></label>
<div class="col-md-10">

View file

@ -1,4 +1,4 @@
@model Yavsc.Models.Musical.Profiles.GeneralSettings
@model Yavsc.Models.Musical.Profiles.MusicLoverSettings
@{
ViewBag.Title = "Delete";

View file

@ -1,4 +1,4 @@
@model Yavsc.Models.Musical.Profiles.GeneralSettings
@model Yavsc.Models.Musical.Profiles.MusicLoverSettings
@{
ViewBag.Title = "Edit";

View file

@ -1,4 +1,4 @@
@model Yavsc.Models.Musical.Profiles.GeneralSettings
@model Yavsc.Models.Musical.Profiles.MusicLoverSettings
@{
ViewBag.Title = "Details";

View file

@ -279,7 +279,7 @@ namespace Yavsc.Models
public DbSet<FormationSettings> FormationSettings { get; set; }
[ActivitySettings]
public DbSet<GeneralSettings> GeneralSettings { get; set; }
public DbSet<MusicLoverSettings> GeneralSettings { get; set; }
public DbSet<CoWorking> CoWorking { get; set; }
private void AddTimestamps(string userId)

View file

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Musical.Profiles
{
public class GeneralSettings : IUserSettings
public class MusicLoverSettings : IUserSettings
{
public virtual List<MusicalPreference> SoundColor { get; set; }
[Key]