main
Paul Schneider 9 years ago
commit e84305895e
18 changed files with 142 additions and 28 deletions

@ -1,5 +1,3 @@
namespace Yavsc.ApiControllers namespace Yavsc.ApiControllers
{ {
using Models; using Models;

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

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

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

@ -1,4 +1,4 @@

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

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

@ -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; }
}
}

@ -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; }
}
}

@ -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;
}
}
}

@ -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; }
}
}

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

@ -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; }
}
}

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

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

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

@ -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>

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

Loading…