This commit is contained in:
2017-01-15 20:19:27 +01:00
18 changed files with 142 additions and 28 deletions

View File

@ -1,5 +1,3 @@
namespace Yavsc.ApiControllers
{
using Models;
@ -12,4 +10,4 @@ namespace Yavsc.ApiControllers
}
}
}
}

View File

@ -46,7 +46,6 @@ namespace Yavsc.Controllers
}
// PUT: api/MusicalPreferencesApi/5
[HttpPut("{id}")]
public IActionResult PutMusicalPreference(string id, [FromBody] MusicalPreference musicalPreference)
{
if (!ModelState.IsValid)

View File

@ -94,6 +94,9 @@ namespace Yavsc.Controllers
}
}
// GET: Activity/Details/5
public IActionResult Details(string id)
{

View File

@ -49,7 +49,6 @@ namespace Yavsc.Controllers
ViewBag.HasConfigurableSettings = (userActivity.Does.SettingsClassName != null);
if (ViewBag.HasConfigurableSettings)
ViewBag.SettingsClassControllerName = Startup.ProfileTypes[userActivity.Does.SettingsClassName].Name;
return View(userActivity);
}

View File

@ -1,4 +1,4 @@

using System;
using System.Linq;
using System.Threading.Tasks;

View File

@ -17,9 +17,6 @@ namespace Yavsc.Models.Booking
[Required]
public long TendencyId {get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking
{
public class DjPerformerProfile : SpecializationSettings
{
public string SoundCloudId { get; set; }
[InverseProperty("OwnerProfile")]
public virtual List<MusicalPreference> SoundColor { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking.Profiles
{
public class FormationPerformerProfile
{
[InverseProperty("WorkingFor")]
public virtual List<CoWorking> CoWorking { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking
{
public class MusicianPerformerProfile : PerformerProfile
{
[InverseProperty("Profile")]
public virtual List<InstrumentRating> Instrumentation {
get; set;
}
}
}

View File

@ -0,0 +1,12 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking.Profiles
{
public class StarPerformerProfile : PerformerProfile
{
[InverseProperty("OwnerProfile")]
public virtual List<MusicalPreference> SoundColor { get; set; }
}
}

View File

@ -53,7 +53,6 @@ namespace Yavsc.Models
/// </summary>
[Range(0,100)]
public int Rate { get; set; }
[DisplayAttribute(Name="SettingsClass")]
public string SettingsClassName { get; set; }
}

View File

@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Workflow
{
public abstract class SpecializationSettings
{
[Key]
public long UserActivityId { get; set; }
[ForeignKey("UserActivityId")]
public virtual UserActivity Context { get; set; }
}
}

View File

@ -19,6 +19,5 @@ namespace Yavsc.Models.Workflow
[Range(0,100)]
public int Weight { get; set; }
}
}

View File

@ -61,6 +61,9 @@
</text>
}
</td>
<td>
@Html.DisplayFor(modelItem => item.Children)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Code">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Code">Details</a> |

View File

@ -17,6 +17,7 @@
<label asp-for="DoesCode" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="DoesCode" asp-items=@ViewBag.DoesCode class ="form-control"></select>
<span asp-validation-for="DoesCode" class="text-danger" />
</div>
</div>

View File

@ -27,4 +27,4 @@
<div>
<a asp-action="Index">Back to List</a>
</div>
</div>

View File

@ -0,0 +1,42 @@
@model PerformerProfile
<div class="performer @(Model.Active?"active":"inactive")">
@if (Model.Performer != null) {
@if (Model.Performer.Avatar != null) {
<img src="~/Avatars/@Model.Performer.Avatar" alt="avatar">
}
@Model.Performer.UserName
<ul>
<li> @SR["Rating"]: @Model.Rate % </li>
@if (Model.MinDailyCost != null) {
<li>@SR["MinDailyCost"]: @Model.MinDailyCost&euro;</li>
}
@if (Model.MinDailyCost != null) {
<li>@SR["MaxDailyCost"]: @Model.MaxDailyCost&euro;</li>
}
@if (Model.WebSite!=null) {
<li>@SR["WebSite"]: @Model.WebSite</li>
}
@if (Model.DoesBlog) {
<li> <a asp-controller="Blogspot" asp-action="UserPosts"
asp-route-id="@Model.Performer.UserName">@SR["His blog"]</a>
</li>
}
@if (!string.IsNullOrEmpty(
Model.Performer.DedicatedGoogleCalendar))
{
<li> @SR["Exposes his Google calendar!"]
</li>
}
@if (Model.Performer.Devices?.Count>0)
{
<li> @SR["Uses the mobile application, and receives push notifications"]
</li>
}
</ul>
}
</div>

View File

@ -199,12 +199,12 @@
"Zlib.Portable.Signed": "1.11.0"
},
"compile": {
"lib/net45/Google.Apis.dll": {},
"lib/net45/Google.Apis.PlatformServices.dll": {}
"lib/net45/Google.Apis.PlatformServices.dll": {},
"lib/net45/Google.Apis.dll": {}
},
"runtime": {
"lib/net45/Google.Apis.dll": {},
"lib/net45/Google.Apis.PlatformServices.dll": {}
"lib/net45/Google.Apis.PlatformServices.dll": {},
"lib/net45/Google.Apis.dll": {}
}
},
"Google.Apis.Core/1.11.1": {
@ -2823,7 +2823,7 @@
}
}
},
"DNX,Version=v4.5.1/debian.8-x86": {
"DNX,Version=v4.5.1/win7-x86": {
"Antlr/3.4.1.9004": {
"type": "package",
"compile": {
@ -3020,12 +3020,12 @@
"Zlib.Portable.Signed": "1.11.0"
},
"compile": {
"lib/net45/Google.Apis.dll": {},
"lib/net45/Google.Apis.PlatformServices.dll": {}
"lib/net45/Google.Apis.PlatformServices.dll": {},
"lib/net45/Google.Apis.dll": {}
},
"runtime": {
"lib/net45/Google.Apis.dll": {},
"lib/net45/Google.Apis.PlatformServices.dll": {}
"lib/net45/Google.Apis.PlatformServices.dll": {},
"lib/net45/Google.Apis.dll": {}
}
},
"Google.Apis.Core/1.11.1": {
@ -4125,6 +4125,9 @@
},
"runtime": {
"lib/dnx451/Microsoft.AspNet.Server.Kestrel.dll": {}
},
"native": {
"runtimes/win7-x86/native/libuv.dll": {}
}
},
"Microsoft.AspNet.Server.WebListener/1.0.0-rc1-final": {
@ -5644,7 +5647,7 @@
}
}
},
"DNX,Version=v4.5.1/debian.8-x64": {
"DNX,Version=v4.5.1/win7-x64": {
"Antlr/3.4.1.9004": {
"type": "package",
"compile": {
@ -5841,12 +5844,12 @@
"Zlib.Portable.Signed": "1.11.0"
},
"compile": {
"lib/net45/Google.Apis.dll": {},
"lib/net45/Google.Apis.PlatformServices.dll": {}
"lib/net45/Google.Apis.PlatformServices.dll": {},
"lib/net45/Google.Apis.dll": {}
},
"runtime": {
"lib/net45/Google.Apis.dll": {},
"lib/net45/Google.Apis.PlatformServices.dll": {}
"lib/net45/Google.Apis.PlatformServices.dll": {},
"lib/net45/Google.Apis.dll": {}
}
},
"Google.Apis.Core/1.11.1": {
@ -6946,6 +6949,9 @@
},
"runtime": {
"lib/dnx451/Microsoft.AspNet.Server.Kestrel.dll": {}
},
"native": {
"runtimes/win7-x64/native/libuv.dll": {}
}
},
"Microsoft.AspNet.Server.WebListener/1.0.0-rc1-final": {
@ -8735,7 +8741,7 @@
},
"MarkdownDeep-av.NET/1.5.4": {
"type": "package",
"sha512": "89nafNRqR3hqKU0rQzHb+BGpoxjImo7pfOQj8vNALB3MloBye0jqMv9eqpKP+QIDLtMS8gHf7uP1kAIkhsOg+Q==",
"sha512": "vefP0tYO2IGOw0iuZt5mtTuu+IFaqjMaoo+GLk4nyhHibfYGFr4glG8JxvxIpHialgwtmeK4F+9HUiKnBXIhbA==",
"files": [
"lib/dnxcore50/MarkdownDeep.dll",
"lib/MonoAndroid10/MarkdownDeep.dll",
@ -10984,7 +10990,7 @@
"System.Reflection.Metadata/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "a8VsRm/B0Ik1o5FumSMWmpwbG7cvIIajAYhzTTy9VB9XItByJDQHGZkQTIAdsvVJ6MI5O3uH/lb0izgQDlDIWA==",
"sha512": "RLIE4sSt2zngMLuqM6YmxBH99mTumtT4DNZE4+msfEaInUP5iCLQT+BHPl+2cjSAP1pdALyAjLB8RtCB+WGGWQ==",
"files": [
"lib/dotnet5.2/System.Reflection.Metadata.dll",
"lib/dotnet5.2/System.Reflection.Metadata.xml",