fixes and renaming
This commit is contained in:
parent
1751145be8
commit
0965caaf40
8 changed files with 29 additions and 28 deletions
|
|
@ -28,7 +28,7 @@ namespace Yavsc.Controllers
|
||||||
return NotFound();
|
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)
|
if (generalSettings == null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
@ -46,7 +46,7 @@ namespace Yavsc.Controllers
|
||||||
// POST: GeneralSettings/Create
|
// POST: GeneralSettings/Create
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Create(GeneralSettings generalSettings)
|
public async Task<IActionResult> Create(MusicLoverSettings generalSettings)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
|
|
@ -65,7 +65,7 @@ namespace Yavsc.Controllers
|
||||||
return NotFound();
|
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)
|
if (generalSettings == null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
@ -76,7 +76,7 @@ namespace Yavsc.Controllers
|
||||||
// POST: GeneralSettings/Edit/5
|
// POST: GeneralSettings/Edit/5
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Edit(GeneralSettings generalSettings)
|
public async Task<IActionResult> Edit(MusicLoverSettings generalSettings)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
|
|
@ -96,7 +96,7 @@ namespace Yavsc.Controllers
|
||||||
return NotFound();
|
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)
|
if (generalSettings == null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
@ -110,7 +110,7 @@ namespace Yavsc.Controllers
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> DeleteConfirmed(string id)
|
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);
|
_context.GeneralSettings.Remove(generalSettings);
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("Index");
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Name" class="col-md-2 control-label">
|
<label asp-for="Name" class="col-md-2 control-label">
|
||||||
Name"]</label>
|
Name</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Name" class="form-control" />
|
<input asp-for="Name" class="form-control" />
|
||||||
<span asp-validation-for="Name" class="text-danger" ></span>
|
<span asp-validation-for="Name" class="text-danger" ></span>
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Parent" class="col-md-2 control-label">
|
<label asp-for="Parent" class="col-md-2 control-label">
|
||||||
Parent"]</label>
|
Parent</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<select asp-for="ParentCode" asp-items=@ViewBag.ParentCode class="form-control" >
|
<select asp-for="ParentCode" asp-items=@ViewBag.ParentCode class="form-control" >
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Description" class="col-md-2 control-label">
|
<label asp-for="Description" class="col-md-2 control-label">
|
||||||
Description"]</label>
|
Description</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Description" class="form-control" />
|
<input asp-for="Description" class="form-control" />
|
||||||
<span asp-validation-for="Description" class="text-danger" ></span>
|
<span asp-validation-for="Description" class="text-danger" ></span>
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Photo" class="col-md-2 control-label">
|
<label asp-for="Photo" class="col-md-2 control-label">
|
||||||
Photo"]
|
Photo
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Photo" class="form-control" />
|
<input asp-for="Photo" class="form-control" />
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="SettingsClassName" class="col-md-2 control-label">
|
<label asp-for="SettingsClassName" class="col-md-2 control-label">
|
||||||
SettingsClass"]
|
SettingsClass
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<select asp-for="SettingsClassName" class="form-control" asp-items="@ViewBag.SettingsClassName">
|
<select asp-for="SettingsClassName" class="form-control" asp-items="@ViewBag.SettingsClassName">
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-offset-2 col-md-10">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -54,13 +54,14 @@
|
||||||
<span asp-validation-for="SettingsClassName" class="text-danger" ></span>
|
<span asp-validation-for="SettingsClassName" class="text-danger" ></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Hidden" class="col-md-2 control-label"></label>
|
<div class="form-check">
|
||||||
<div class="col-md-10">
|
<input class="form-check-input" type="checkbox" asp-for="Hidden" id="Hidden">
|
||||||
<input asp-for="Hidden" class="form-control" />
|
<label class="form-check-label" for="Hidden">
|
||||||
<span asp-validation-for="Hidden" class="text-danger"></span>
|
Hidden activity
|
||||||
</div>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Rate" class="col-md-2 control-label"></label>
|
<label asp-for="Rate" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@model Yavsc.Models.Musical.Profiles.GeneralSettings
|
@model Yavsc.Models.Musical.Profiles.MusicLoverSettings
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = "Delete";
|
ViewBag.Title = "Delete";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@model Yavsc.Models.Musical.Profiles.GeneralSettings
|
@model Yavsc.Models.Musical.Profiles.MusicLoverSettings
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = "Edit";
|
ViewBag.Title = "Edit";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@model Yavsc.Models.Musical.Profiles.GeneralSettings
|
@model Yavsc.Models.Musical.Profiles.MusicLoverSettings
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = "Details";
|
ViewBag.Title = "Details";
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ namespace Yavsc.Models
|
||||||
public DbSet<FormationSettings> FormationSettings { get; set; }
|
public DbSet<FormationSettings> FormationSettings { get; set; }
|
||||||
|
|
||||||
[ActivitySettings]
|
[ActivitySettings]
|
||||||
public DbSet<GeneralSettings> GeneralSettings { get; set; }
|
public DbSet<MusicLoverSettings> GeneralSettings { get; set; }
|
||||||
public DbSet<CoWorking> CoWorking { get; set; }
|
public DbSet<CoWorking> CoWorking { get; set; }
|
||||||
|
|
||||||
private void AddTimestamps(string userId)
|
private void AddTimestamps(string userId)
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.Models.Musical.Profiles
|
namespace Yavsc.Models.Musical.Profiles
|
||||||
{
|
{
|
||||||
public class GeneralSettings : IUserSettings
|
public class MusicLoverSettings : IUserSettings
|
||||||
{
|
{
|
||||||
public virtual List<MusicalPreference> SoundColor { get; set; }
|
public virtual List<MusicalPreference> SoundColor { get; set; }
|
||||||
[Key]
|
[Key]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue