This commit is contained in:
2017-01-17 11:37:26 +01:00
95 changed files with 7874 additions and 840 deletions

View File

@ -53,7 +53,8 @@ namespace Yavsc.Controllers
EventDate = c.EventDate,
Id = c.Id,
Previsional = c.Previsional,
Reason = c.Reason
Reason = c.Reason,
ActivityCode = c.ActivityCode
}).
OrderBy(c=>c.Id).
Take(25);

View File

@ -1,10 +1,9 @@
namespace Yavsc.ApiControllers
{
using Models;
using Models.Booking;
using Models.Booking.Profiles;
public class DjProfileApiController : ProfileApiController<DjPerformerProfile>
public class DjProfileApiController : ProfileApiController<DjSettings>
{
public DjProfileApiController(ApplicationDbContext context) : base(context)
{

View File

@ -28,14 +28,14 @@ namespace Yavsc.Controllers
// GET: api/MusicalPreferencesApi/5
[HttpGet("{id}", Name = "GetMusicalPreference")]
public IActionResult GetMusicalPreference([FromRoute] long id)
public IActionResult GetMusicalPreference([FromRoute] string id)
{
if (!ModelState.IsValid)
{
return HttpBadRequest(ModelState);
}
MusicalPreference musicalPreference = _context.MusicalPreferences.Single(m => m.Id == id);
MusicalPreference musicalPreference = _context.MusicalPreferences.Single(m => m.OwnerProfileId == id);
if (musicalPreference == null)
{
@ -46,15 +46,14 @@ namespace Yavsc.Controllers
}
// PUT: api/MusicalPreferencesApi/5
[HttpPut("{id}")]
public IActionResult PutMusicalPreference(long id, [FromBody] MusicalPreference musicalPreference)
public IActionResult PutMusicalPreference(string id, [FromBody] MusicalPreference musicalPreference)
{
if (!ModelState.IsValid)
{
return HttpBadRequest(ModelState);
}
if (id != musicalPreference.Id)
if (id != musicalPreference.OwnerProfileId)
{
return HttpBadRequest();
}
@ -96,7 +95,7 @@ namespace Yavsc.Controllers
}
catch (DbUpdateException)
{
if (MusicalPreferenceExists(musicalPreference.Id))
if (MusicalPreferenceExists(musicalPreference.OwnerProfileId))
{
return new HttpStatusCodeResult(StatusCodes.Status409Conflict);
}
@ -106,19 +105,19 @@ namespace Yavsc.Controllers
}
}
return CreatedAtRoute("GetMusicalPreference", new { id = musicalPreference.Id }, musicalPreference);
return CreatedAtRoute("GetMusicalPreference", new { id = musicalPreference.OwnerProfileId }, musicalPreference);
}
// DELETE: api/MusicalPreferencesApi/5
[HttpDelete("{id}")]
public IActionResult DeleteMusicalPreference(long id)
public IActionResult DeleteMusicalPreference(string id)
{
if (!ModelState.IsValid)
{
return HttpBadRequest(ModelState);
}
MusicalPreference musicalPreference = _context.MusicalPreferences.Single(m => m.Id == id);
MusicalPreference musicalPreference = _context.MusicalPreferences.Single(m => m.OwnerProfileId == id);
if (musicalPreference == null)
{
return HttpNotFound();
@ -139,9 +138,9 @@ namespace Yavsc.Controllers
base.Dispose(disposing);
}
private bool MusicalPreferenceExists(long id)
private bool MusicalPreferenceExists(string id)
{
return _context.MusicalPreferences.Count(e => e.Id == id) > 0;
return _context.MusicalPreferences.Count(e => e.OwnerProfileId == id) > 0;
}
}
}

View File

@ -42,5 +42,7 @@ namespace Yavsc
private static readonly string[] GoogleScopes = { "openid", "profile", "email" };
public static readonly string[] GoogleCalendarScopes =
{ "openid", "profile", "email", "https://www.googleapis.com/auth/calendar" };
public static readonly string NoneCode = "none";
}
}

View File

@ -5,26 +5,45 @@ using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Data.Entity;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Yavsc.Models;
namespace Yavsc.Controllers
{
[ServiceFilter(typeof(LanguageActionFilter)), Authorize("AdministratorOnly")]
[Authorize("AdministratorOnly")]
public class ActivityController : Controller
{
private ApplicationDbContext _context;
IStringLocalizer<Yavsc.Resources.YavscLocalisation> SR;
ILogger logger;
public ActivityController(ApplicationDbContext context, IStringLocalizer<Yavsc.Resources.YavscLocalisation> SR)
public ActivityController(ApplicationDbContext context,
IStringLocalizer<Yavsc.Resources.YavscLocalisation> SR,
ILoggerFactory loggerFactory)
{
_context = context;
this.SR = SR;
logger=loggerFactory.CreateLogger<ActivityController>();
}
// GET: Activity
public IActionResult Index()
{
return View(_context.Activities.ToList());
SetSettingClasseInfo();
return View(_context.Activities.Include(a=>a.Parent).ToList());
}
private void SetSettingClasseInfo(string currentCode = null)
{
var items = Startup.ProfileTypes.Select(
pt => new SelectListItem
{
Text = SR[pt.Key],
Value = pt.Key,
Selected = currentCode == pt.Key
}).ToList();
items.Add(new SelectListItem { Text = SR[Constants.NoneCode], Value = Constants.NoneCode, Selected = currentCode == null});
ViewBag.SettingsClassName = items;
}
private List<SelectListItem> GetEligibleParent(string code)
@ -34,20 +53,21 @@ namespace Yavsc.Controllers
//
var acts = _context.Activities.Where(
a=> a.Code != code
a => a.Code != code
).Select(a => new SelectListItem
{
Text = a.Name,
Value = a.Code
}).ToList();
acts.Add(new SelectListItem { Text=SR["aucun"], Value=null } );
var nullItem = new SelectListItem { Text = SR[Constants.NoneCode], Value = Constants.NoneCode };
acts.Add(nullItem);
if (code == null) return acts;
var existing = _context.Activities.Include(a => a.Children).FirstOrDefault(a => a.Code == code);
if (existing == null) return acts;
var pi = acts.FirstOrDefault(i=>i.Value==existing.ParentCode);
// Assert(pi!=null)
pi.Selected=true;
RecFilterChild(acts, existing);
var pi = acts.FirstOrDefault(i => i.Value == existing.ParentCode);
if (pi!=null) pi.Selected = true;
else nullItem.Selected = true;
RecFilterChild(acts, existing);
return acts;
}
@ -65,7 +85,7 @@ namespace Yavsc.Controllers
{
if (activity == null) return;
if (activity.Children == null) return;
if (list.Count==0) return;
if (list.Count == 0) return;
foreach (var child in activity.Children)
{
RecFilterChild(list, child);
@ -74,6 +94,9 @@ namespace Yavsc.Controllers
}
}
// GET: Activity/Details/5
public IActionResult Details(string id)
{
@ -94,6 +117,7 @@ namespace Yavsc.Controllers
// GET: Activity/Create
public IActionResult Create()
{
SetSettingClasseInfo();
ViewBag.ParentCode = GetEligibleParent(null);
return View();
}
@ -103,12 +127,18 @@ namespace Yavsc.Controllers
[ValidateAntiForgeryToken]
public IActionResult Create(Activity activity)
{
if (activity.ParentCode==Constants.NoneCode)
activity.ParentCode=null;
if (activity.SettingsClassName==Constants.NoneCode)
activity.SettingsClassName=null;
if (ModelState.IsValid)
{
_context.Activities.Add(activity);
_context.SaveChanges();
return RedirectToAction("Index");
}
SetSettingClasseInfo();
return View(activity);
}
@ -126,6 +156,7 @@ namespace Yavsc.Controllers
return HttpNotFound();
}
ViewBag.ParentCode = GetEligibleParent(id);
SetSettingClasseInfo();
return View(activity);
}
@ -134,6 +165,10 @@ namespace Yavsc.Controllers
[ValidateAntiForgeryToken]
public IActionResult Edit(Activity activity)
{
if (activity.ParentCode==Constants.NoneCode)
activity.ParentCode=null;
if (activity.SettingsClassName==Constants.NoneCode)
activity.SettingsClassName=null;
if (ModelState.IsValid)
{
_context.Update(activity);

View File

@ -0,0 +1,131 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Data.Entity;
using Yavsc.Models;
using Yavsc.Models.Workflow;
namespace Yavsc.Controllers
{
public class CoWorkingController : Controller
{
private ApplicationDbContext _context;
public CoWorkingController(ApplicationDbContext context)
{
_context = context;
}
// GET: CoWorking
public async Task<IActionResult> Index()
{
var applicationDbContext = _context.WorkflowProviders.Include(c => c.Performer).Include(c => c.WorkingFor);
return View(await applicationDbContext.ToListAsync());
}
// GET: CoWorking/Details/5
public async Task<IActionResult> Details(long? id)
{
if (id == null)
{
return HttpNotFound();
}
CoWorking coWorking = await _context.WorkflowProviders.SingleAsync(m => m.Id == id);
if (coWorking == null)
{
return HttpNotFound();
}
return View(coWorking);
}
// GET: CoWorking/Create
public IActionResult Create()
{
ViewBag.PerformerId = _context.Performers.Select( p=> new SelectListItem { Value = p.PerformerId, Text = p.Performer.UserName});
ViewBag.WorkingForId = new SelectList(_context.Users, "Id", "UserName");
return View();
}
// POST: CoWorking/Create
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(CoWorking coWorking)
{
if (ModelState.IsValid)
{
_context.WorkflowProviders.Add(coWorking);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
ViewData["PerformerId"] = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId);
ViewData["WorkingForId"] = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId);
return View(coWorking);
}
// GET: CoWorking/Edit/5
public async Task<IActionResult> Edit(long? id)
{
if (id == null)
{
return HttpNotFound();
}
CoWorking coWorking = await _context.WorkflowProviders.SingleAsync(m => m.Id == id);
if (coWorking == null)
{
return HttpNotFound();
}
ViewData["PerformerId"] = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId);
ViewData["WorkingForId"] = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId);
return View(coWorking);
}
// POST: CoWorking/Edit/5
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(CoWorking coWorking)
{
if (ModelState.IsValid)
{
_context.Update(coWorking);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
ViewData["PerformerId"] = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId);
ViewData["WorkingForId"] = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId);
return View(coWorking);
}
// GET: CoWorking/Delete/5
[ActionName("Delete")]
public async Task<IActionResult> Delete(long? id)
{
if (id == null)
{
return HttpNotFound();
}
CoWorking coWorking = await _context.WorkflowProviders.SingleAsync(m => m.Id == id);
if (coWorking == null)
{
return HttpNotFound();
}
return View(coWorking);
}
// POST: CoWorking/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(long id)
{
CoWorking coWorking = await _context.WorkflowProviders.SingleAsync(m => m.Id == id);
_context.WorkflowProviders.Remove(coWorking);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
}
}

View File

@ -91,28 +91,33 @@ namespace Yavsc.Controllers
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public IActionResult Create(string id)
public IActionResult Create(string id, string activityCode)
{
if (string.IsNullOrWhiteSpace(id))
throw new InvalidOperationException(
"This method needs a performer id"
);
if (string.IsNullOrWhiteSpace(activityCode))
throw new InvalidOperationException(
"This method needs an activity code"
);
var pro = _context.Performers.Include(
x => x.Performer).FirstOrDefault(
x => x.PerformerId == id
);
if (pro == null)
return HttpNotFound();
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == activityCode);
ViewBag.GoogleSettings = _googleSettings;
var userid = User.GetUserId();
var user = _userManager.FindByIdAsync(userid).Result;
return View(new BookQuery(new Location(),DateTime.Now.AddHours(4))
return View(new BookQuery(activityCode,new Location(),DateTime.Now.AddHours(4))
{
PerformerProfile = pro,
PerformerId = pro.PerformerId,
ClientId = userid,
Client = user
Client = user,
ActivityCode = activityCode
});
}
@ -121,6 +126,7 @@ namespace Yavsc.Controllers
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(BookQuery command)
{
var uid = User.GetUserId();
var prid = command.PerformerId;
if (string.IsNullOrWhiteSpace(uid)
@ -177,6 +183,7 @@ namespace Yavsc.Controllers
$"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n{yaev.EventDate}\r\n"
);
}
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
ViewBag.GoogleSettings = _googleSettings;
return View("CommandConfirmation",command);
}

View File

@ -4,11 +4,11 @@ using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Data.Entity;
using Yavsc.Models;
using Yavsc.Models.Workflow;
namespace Yavsc.Controllers
{
using Models;
using Models.Workflow;
[Authorize]
public class DoController : Controller
{
@ -26,24 +26,29 @@ namespace Yavsc.Controllers
if (id == null)
id = User.GetUserId();
var applicationDbContext = _context.UserActivities.Include(u => u.Does).Include(u => u.User).Where(u=> u.UserId == id);
return View(applicationDbContext.ToList());
var userActivities = _context.UserActivities.Include(u => u.Does)
.Include(u => u.User).Where(u=> u.UserId == id)
.OrderByDescending(u => u.Weight);
return View(userActivities.ToList());
}
// GET: Do/Details/5
public IActionResult Details(long? id)
public IActionResult Details(string id, string activityCode)
{
if (id == null)
if (id == null || activityCode == null)
{
return HttpNotFound();
}
UserActivity userActivity = _context.UserActivities.Single(m => m.Id == id);
UserActivity userActivity = _context.UserActivities.Include(m=>m.Does)
.Include(m=>m.User).Single(m => m.DoesCode == activityCode && m.UserId == id);
if (userActivity == null)
{
return HttpNotFound();
}
ViewBag.HasConfigurableSettings = (userActivity.Does.SettingsClassName != null);
if (ViewBag.HasConfigurableSettings)
ViewBag.SettingsClassControllerName = Startup.ProfileTypes[userActivity.Does.SettingsClassName].Name;
return View(userActivity);
}
@ -53,10 +58,11 @@ namespace Yavsc.Controllers
{
if (userId==null)
userId = User.GetUserId();
var model = new UserActivity { UserId = userId };
ViewBag.DoesCode = new SelectList(_context.Activities, "Code", "Name");
//ViewData["UserId"] = userId;
ViewBag.UserId = new SelectList(_context.Performers.Include(p=>p.Performer), "PerformerId", "Performer", userId);
return View();
return View(model);
}
// POST: Do/Create
@ -82,14 +88,18 @@ namespace Yavsc.Controllers
// GET: Do/Edit/5
[Authorize]
public IActionResult Edit(long? id)
public IActionResult Edit(string id, string activityCode)
{
if (id == null)
{
return HttpNotFound();
}
UserActivity userActivity = _context.UserActivities.Single(m => m.Id == id);
UserActivity userActivity = _context.UserActivities.Include(
u=>u.Does
).Include(
u=>u.User
).Single(m => m.DoesCode == activityCode && m.UserId == id);
if (userActivity == null)
{
return HttpNotFound();
@ -120,14 +130,14 @@ namespace Yavsc.Controllers
// GET: Do/Delete/5
[ActionName("Delete"),Authorize]
public IActionResult Delete(long? id)
public IActionResult Delete(string id, string activityCode)
{
if (id == null)
{
return HttpNotFound();
}
UserActivity userActivity = _context.UserActivities.Single(m => m.Id == id);
UserActivity userActivity = _context.UserActivities.Single(m => m.UserId == id && m.DoesCode == activityCode);
if (userActivity == null)
{
@ -142,9 +152,9 @@ namespace Yavsc.Controllers
// POST: Do/Delete/5
[HttpPost, ActionName("Delete"),Authorize]
[ValidateAntiForgeryToken]
public IActionResult DeleteConfirmed(long id)
public IActionResult DeleteConfirmed(string id, string activityCode)
{
UserActivity userActivity = _context.UserActivities.Single(m => m.Id == id);
UserActivity userActivity = _context.UserActivities.Single(m => m.UserId == id && m.DoesCode == activityCode);
if (!User.IsInRole("Administrator"))
if (User.GetUserId() != userActivity.UserId) {
ModelState.AddModelError("User","You're not admin.");

View File

@ -101,11 +101,13 @@ namespace Yavsc.Controllers
_context.Estimates
.Add(estimate);
_context.SaveChanges();
var query = _context.BookQueries.FirstOrDefault(
q=>q.Id == estimate.CommandId
);
var perfomerProfile = _context.Performers
.Include(
perpr => perpr.Performer).FirstOrDefault(
x=>x.PerformerId == estimate.Query.PerformerId
x=>x.PerformerId == query.PerformerId
);
var command = _context.BookQueries.FirstOrDefault(
cmd => cmd.Id == estimate.CommandId

View File

@ -8,6 +8,8 @@ using Microsoft.Extensions.Logging;
using Yavsc.Models.Booking;
using Yavsc.Helpers;
using System;
using Yavsc.ViewModels.FrontOffice;
using System.Security.Claims;
namespace Yavsc.Controllers
{
@ -27,10 +29,20 @@ namespace Yavsc.Controllers
}
public ActionResult Index()
{
var latestPosts = _context.Blogspot.Where(
x => x.Visible == true
).OrderBy(x => x.Modified).Take(25).ToArray();
return View(latestPosts);
var uid = User.GetUserId();
var now = DateTime.Now;
var model = new FrontOfficeIndexViewModel{
EstimateToProduceCount = _context.Commands.Where(c => c.PerformerId == uid && c.EventDate > now
&& c.ValidationDate == null && !_context.Estimates.Any(e=>(e.CommandId == c.Id && e.ProviderValidationDate != null))).Count(),
EstimateToSignAsProCount = _context.Commands.Where(c => ( c.PerformerId == uid && c.EventDate > now
&& c.ValidationDate == null && _context.Estimates.Any(e=>(e.CommandId == c.Id && e.ProviderValidationDate != null)))).Count(),
EstimateToSignAsCliCount = _context.Estimates.Where(e=>e.ClientId == uid && e.ClientValidationDate == null) .Count(),
BillToSignAsProCount = 0,
BillToSignAsCliCount = 0,
NewPayementsCount = 0
};
return View(model);
}
[Route("Book/{id?}"), HttpGet]
@ -108,5 +120,30 @@ namespace Yavsc.Controllers
throw new Exception("No data");
return View("Estimate.pdf",estimate);
}
[Authorize]
public IActionResult EstimateProValidation()
{
throw new NotImplementedException();
}
[Authorize]
public IActionResult EstimateClientValidation()
{
throw new NotImplementedException();
}
[Authorize]
public IActionResult BillValidation()
{
throw new NotImplementedException();
}
[Authorize]
public IActionResult BillAcquitment()
{
throw new NotImplementedException();
}
}
}

View File

@ -30,7 +30,7 @@ namespace Yavsc.Controllers
public IActionResult Index()
{
return View();
return View(DbContext.Activities);
}
public IActionResult About()

View File

@ -0,0 +1,149 @@
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Data.Entity;
using Yavsc.Models;
using Yavsc.Models.Booking.Profiles;
namespace Yavsc.Controllers
{
[Authorize]
public class InstrumentationController : Controller
{
private ApplicationDbContext _context;
public InstrumentationController(ApplicationDbContext context)
{
_context = context;
}
// GET: Instrumentation
public async Task<IActionResult> Index()
{
return View(await _context.Instrumentation.ToListAsync());
}
// GET: Instrumentation/Details/5
public async Task<IActionResult> Details(string id)
{
if (id == null)
{
return HttpNotFound();
}
Instrumentation musicianSettings = await _context.Instrumentation.SingleAsync(m => m.UserId == id);
if (musicianSettings == null)
{
return HttpNotFound();
}
return View(musicianSettings);
}
// GET: Instrumentation/Create
public IActionResult Create()
{
var uid = User.GetUserId();
var owned = _context.Instrumentation.Include(i=>i.Tool).Where(i=>i.UserId==uid).Select(i=>i.InstrumentId);
var ownedArray = owned.ToArray();
ViewBag.YetAvailableInstruments = _context.Instrument.Select(k=>new SelectListItem
{ Text = k.Name, Value = k.Id.ToString(), Disabled = ownedArray.Contains(k.Id) });
return View(new Instrumentation { UserId = uid });
}
// POST: Instrumentation/Create
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(Instrumentation model)
{
var uid = User.GetUserId();
if (ModelState.IsValid)
{
if (model.UserId != uid) if (!User.IsInRole(Constants.AdminGroupName))
return new ChallengeResult();
_context.Instrumentation.Add(model);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
return View(model);
}
// GET: Instrumentation/Edit/5
public async Task<IActionResult> Edit(string id)
{
var uid = User.GetUserId();
if (id == null)
{
return HttpNotFound();
}
if (id != uid) if (!User.IsInRole(Constants.AdminGroupName))
return new ChallengeResult();
Instrumentation musicianSettings = await _context.Instrumentation.SingleAsync(m => m.UserId == id);
if (musicianSettings == null)
{
return HttpNotFound();
}
return View(musicianSettings);
}
// POST: Instrumentation/Edit/5
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(Instrumentation musicianSettings)
{
var uid = User.GetUserId();
if (musicianSettings.UserId != uid) if (!User.IsInRole(Constants.AdminGroupName))
return new ChallengeResult();
if (ModelState.IsValid)
{
_context.Update(musicianSettings);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
return View(musicianSettings);
}
// GET: Instrumentation/Delete/5
[ActionName("Delete")]
public async Task<IActionResult> Delete(string id)
{
if (id == null)
{
return HttpNotFound();
}
Instrumentation musicianSettings = await _context.Instrumentation.SingleAsync(m => m.UserId == id);
if (musicianSettings == null)
{
return HttpNotFound();
}
var uid = User.GetUserId();
if (musicianSettings.UserId != uid) if (!User.IsInRole(Constants.AdminGroupName))
return new ChallengeResult();
return View(musicianSettings);
}
// POST: Instrumentation/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(string id)
{
Instrumentation musicianSettings = await _context.Instrumentation.SingleAsync(m => m.UserId == id);
var uid = User.GetUserId();
if (musicianSettings.UserId != uid) if (!User.IsInRole(Constants.AdminGroupName))
return new ChallengeResult();
_context.Instrumentation.Remove(musicianSettings);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
}
}

View File

@ -505,6 +505,7 @@ namespace Yavsc.Controllers
return View(new PerformerProfile
{
PerformerId = user.Id,
Performer = user,
OrganizationAddress = new Location()
});
}
@ -562,7 +563,7 @@ namespace Yavsc.Controllers
_dbContext.Update(model);
}
else _dbContext.Performers.Add(model);
_dbContext.SaveChanges();
// Give this user the Performer role
if (!User.IsInRole("Performer"))
await _userManager.AddToRoleAsync(user, "Performer");

View File

@ -46,10 +46,10 @@ namespace Yavsc
}
if (culture != null) {
#if DNX451
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
// System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
#else
CultureInfo.CurrentCulture = new CultureInfo(culture);
// CultureInfo.CurrentCulture = new CultureInfo(culture);
CultureInfo.CurrentUICulture = new CultureInfo(culture);
#endif
}

View File

@ -19,7 +19,8 @@ namespace Yavsc.Helpers
EventDate = query.EventDate,
Location = query.Location,
Id = query.Id,
Reason = query.Reason
Reason = query.Reason,
ActivityCode = query.ActivityCode
};
return yaev;
}

View File

@ -0,0 +1,15 @@
using Yavsc.Models;
using YavscLib;
namespace Yavsc.Helpers
{
public static class WorkflowHelpers
{
public static ISpecializationSettings CreateSettings (this Activity activity) {
if (activity.SettingsClassName==null) return null;
var ctor = Startup.ProfileTypes[activity.SettingsClassName].GetConstructor(System.Type.EmptyTypes);
if (ctor==null) return null;
return (ISpecializationSettings) ctor.Invoke(null);
}
}
}

View File

@ -193,6 +193,7 @@ namespace Yavsc.Migrations
table: "GoogleCloudMobileDeclaration",
nullable: false,
defaultValue: "");
migrationBuilder.Sql("delete from \"GoogleCloudMobileDeclaration\"");
migrationBuilder.AddColumn<string>(
name: "Name",
table: "GoogleCloudMobileDeclaration",

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,487 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class SettingsClassName : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_MusicalPreference_PerformerProfile_OwnerProfileId", table: "MusicalPreference");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Service_OfferId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropPrimaryKey(name: "PK_UserActivity", table: "UserActivity");
migrationBuilder.DropPrimaryKey(name: "PK_MusicalPreference", table: "MusicalPreference");
migrationBuilder.DropColumn(name: "Id", table: "UserActivity");
migrationBuilder.DropColumn(name: "OfferId", table: "PerformerProfile");
migrationBuilder.DropColumn(name: "Id", table: "MusicalPreference");
migrationBuilder.DropColumn(name: "Name", table: "MusicalPreference");
migrationBuilder.CreateTable(
name: "MusicianSettings",
columns: table => new
{
UserId = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MusicianSettings", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "DjSettings",
columns: table => new
{
UserId = table.Column<string>(nullable: false),
SoundCloudId = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_DjSettings", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "FormationSettings",
columns: table => new
{
UserId = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FormationSettings", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "GeneralSettings",
columns: table => new
{
UserId = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GeneralSettings", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "CoWorking",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
FormationSettingsUserId = table.Column<string>(nullable: true),
PerformerId = table.Column<string>(nullable: true),
WorkingForId = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CoWorking", x => x.Id);
table.ForeignKey(
name: "FK_CoWorking_FormationSettings_FormationSettingsUserId",
column: x => x.FormationSettingsUserId,
principalTable: "FormationSettings",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_CoWorking_PerformerProfile_PerformerId",
column: x => x.PerformerId,
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_CoWorking_ApplicationUser_WorkingForId",
column: x => x.WorkingForId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.AddPrimaryKey(
name: "PK_UserActivity",
table: "UserActivity",
columns: new[] { "DoesCode", "UserId" });
migrationBuilder.AlterColumn<string>(
name: "OwnerProfileId",
table: "MusicalPreference",
nullable: false);
migrationBuilder.AddColumn<string>(
name: "DjSettingsUserId",
table: "MusicalPreference",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "GeneralSettingsUserId",
table: "MusicalPreference",
nullable: true);
migrationBuilder.AddColumn<long>(
name: "TendencyId",
table: "MusicalPreference",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddPrimaryKey(
name: "PK_MusicalPreference",
table: "MusicalPreference",
column: "OwnerProfileId");
migrationBuilder.AddColumn<string>(
name: "SettingsClassName",
table: "Activity",
nullable: true);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_MusicalPreference_DjSettings_DjSettingsUserId",
table: "MusicalPreference",
column: "DjSettingsUserId",
principalTable: "DjSettings",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_MusicalPreference_GeneralSettings_GeneralSettingsUserId",
table: "MusicalPreference",
column: "GeneralSettingsUserId",
principalTable: "GeneralSettings",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_MusicalPreference_DjSettings_DjSettingsUserId", table: "MusicalPreference");
migrationBuilder.DropForeignKey(name: "FK_MusicalPreference_GeneralSettings_GeneralSettingsUserId", table: "MusicalPreference");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropPrimaryKey(name: "PK_UserActivity", table: "UserActivity");
migrationBuilder.DropPrimaryKey(name: "PK_MusicalPreference", table: "MusicalPreference");
migrationBuilder.DropColumn(name: "DjSettingsUserId", table: "MusicalPreference");
migrationBuilder.DropColumn(name: "GeneralSettingsUserId", table: "MusicalPreference");
migrationBuilder.DropColumn(name: "TendencyId", table: "MusicalPreference");
migrationBuilder.DropColumn(name: "SettingsClassName", table: "Activity");
migrationBuilder.DropTable("MusicianSettings");
migrationBuilder.DropTable("DjSettings");
migrationBuilder.DropTable("GeneralSettings");
migrationBuilder.DropTable("CoWorking");
migrationBuilder.DropTable("FormationSettings");
migrationBuilder.AddColumn<long>(
name: "Id",
table: "UserActivity",
nullable: false,
defaultValue: 0L)
.Annotation("Npgsql:Serial", true);
migrationBuilder.AddPrimaryKey(
name: "PK_UserActivity",
table: "UserActivity",
column: "Id");
migrationBuilder.AddColumn<long>(
name: "OfferId",
table: "PerformerProfile",
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "OwnerProfileId",
table: "MusicalPreference",
nullable: true);
migrationBuilder.AddColumn<long>(
name: "Id",
table: "MusicalPreference",
nullable: false,
defaultValue: 0L)
.Annotation("Npgsql:Serial", true);
migrationBuilder.AddColumn<string>(
name: "Name",
table: "MusicalPreference",
nullable: false,
defaultValue: "");
migrationBuilder.AddPrimaryKey(
name: "PK_MusicalPreference",
table: "MusicalPreference",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_MusicalPreference_PerformerProfile_OwnerProfileId",
table: "MusicalPreference",
column: "OwnerProfileId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Service_OfferId",
table: "PerformerProfile",
column: "OfferId",
principalTable: "Service",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,354 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class instrumentationReloaded : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropTable("MusicianSettings");
migrationBuilder.CreateTable(
name: "Instrumentation",
columns: table => new
{
InstrumentId = table.Column<long>(nullable: false),
UserId = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Instrumentation", x => new { x.InstrumentId, x.UserId });
table.ForeignKey(
name: "FK_Instrumentation_Instrument_InstrumentId",
column: x => x.InstrumentId,
principalTable: "Instrument",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Instrumentation_PerformerProfile_UserId",
column: x => x.UserId,
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropTable("Instrumentation");
migrationBuilder.CreateTable(
name: "MusicianSettings",
columns: table => new
{
UserId = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MusicianSettings", x => x.UserId);
});
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,351 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
// Note: deletes all existing book query
public partial class bookQueryActivityCode : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.Sql("delete from \"BookQuery\"");
migrationBuilder.AddColumn<string>(
name: "ActivityCode",
table: "BookQuery",
nullable: false,
defaultValue: "");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_Activity_ActivityCode",
table: "BookQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Instrumentation_Instrument_InstrumentId",
table: "Instrumentation",
column: "InstrumentId",
principalTable: "Instrument",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Activity_ActivityCode", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "ActivityCode", table: "BookQuery");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Instrumentation_Instrument_InstrumentId",
table: "Instrumentation",
column: "InstrumentId",
principalTable: "Instrument",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,365 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class refactPrproAllowGeo : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Activity_ActivityCode", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "AcceptGeoLocalization", table: "PerformerProfile");
migrationBuilder.AddColumn<bool>(
name: "UseGeoLocalizationToReduceDistanceWithClients",
table: "PerformerProfile",
nullable: false,
defaultValue: false);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_Activity_ActivityCode",
table: "BookQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Instrumentation_Instrument_InstrumentId",
table: "Instrumentation",
column: "InstrumentId",
principalTable: "Instrument",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_Activity_ActivityCode", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "UseGeoLocalizationToReduceDistanceWithClients", table: "PerformerProfile");
migrationBuilder.AddColumn<bool>(
name: "AcceptGeoLocalization",
table: "PerformerProfile",
nullable: false,
defaultValue: false);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_Activity_ActivityCode",
table: "BookQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Instrumentation_Instrument_InstrumentId",
table: "Instrumentation",
column: "InstrumentId",
principalTable: "Instrument",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
}
}
}

View File

@ -1,6 +1,8 @@
using System;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using Yavsc.Models;
namespace Yavsc.Migrations
@ -111,31 +113,6 @@ namespace Yavsc.Migrations
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("AccountNumber")
.HasAnnotation("MaxLength", 15);
b.Property<string>("BIC")
.HasAnnotation("MaxLength", 15);
b.Property<string>("BankCode")
.HasAnnotation("MaxLength", 5);
b.Property<int>("BankedKey");
b.Property<string>("IBAN")
.HasAnnotation("MaxLength", 33);
b.Property<string>("WicketCode")
.HasAnnotation("MaxLength", 5);
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
{
b.Property<long>("Id")
@ -181,6 +158,8 @@ namespace Yavsc.Migrations
b.Property<int>("Rate");
b.Property<string>("SettingsClassName");
b.HasKey("Code");
});
@ -310,6 +289,31 @@ namespace Yavsc.Migrations
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Bank.BankIdentity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("AccountNumber")
.HasAnnotation("MaxLength", 15);
b.Property<string>("BIC")
.HasAnnotation("MaxLength", 15);
b.Property<string>("BankCode")
.HasAnnotation("MaxLength", 5);
b.Property<int>("BankedKey");
b.Property<string>("IBAN")
.HasAnnotation("MaxLength", 33);
b.Property<string>("WicketCode")
.HasAnnotation("MaxLength", 5);
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
{
b.Property<long>("Id")
@ -415,6 +419,9 @@ namespace Yavsc.Migrations
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ActivityCode")
.IsRequired();
b.Property<string>("ClientId")
.IsRequired();
@ -454,18 +461,17 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasAnnotation("MaxLength", 255);
b.Property<string>("OwnerProfileId");
b.Property<string>("DjSettingsUserId");
b.Property<string>("GeneralSettingsUserId");
b.Property<int>("Rate");
b.HasKey("Id");
b.Property<long>("TendencyId");
b.HasKey("OwnerProfileId");
});
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
@ -480,6 +486,38 @@ namespace Yavsc.Migrations
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.DjSettings", b =>
{
b.Property<string>("UserId");
b.Property<string>("SoundCloudId");
b.HasKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.FormationSettings", b =>
{
b.Property<string>("UserId");
b.HasKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.GeneralSettings", b =>
{
b.Property<string>("UserId");
b.HasKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.Instrumentation", b =>
{
b.Property<long>("InstrumentId");
b.Property<string>("UserId");
b.HasKey("InstrumentId", "UserId");
});
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
{
b.Property<string>("ConnectionId");
@ -666,12 +704,24 @@ namespace Yavsc.Migrations
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("FormationSettingsUserId");
b.Property<string>("PerformerId");
b.Property<string>("WorkingForId");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
{
b.Property<string>("PerformerId");
b.Property<bool>("AcceptGeoLocalization");
b.Property<bool>("AcceptNotifications");
b.Property<bool>("AcceptPublicContact");
@ -682,8 +732,6 @@ namespace Yavsc.Migrations
b.Property<int?>("MinDailyCost");
b.Property<long?>("OfferId");
b.Property<long>("OrganizationAddressId");
b.Property<int>("Rate");
@ -692,6 +740,8 @@ namespace Yavsc.Migrations
.IsRequired()
.HasAnnotation("MaxLength", 14);
b.Property<bool>("UseGeoLocalizationToReduceDistanceWithClients");
b.Property<string>("WebSite");
b.HasKey("PerformerId");
@ -699,18 +749,13 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("DoesCode");
b.Property<string>("DoesCode")
.IsRequired();
b.Property<string>("UserId")
.IsRequired();
b.Property<string>("UserId");
b.Property<int>("Weight");
b.HasKey("Id");
b.HasKey("DoesCode", "UserId");
});
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
@ -785,7 +830,7 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
{
b.HasOne("Yavsc.Model.Bank.BankIdentity")
b.HasOne("Yavsc.Models.Bank.BankIdentity")
.WithMany()
.HasForeignKey("BankInfoId");
@ -818,9 +863,17 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("ClientId");
b.HasOne("Yavsc.Models.Booking.BookQuery")
.WithMany()
.HasForeignKey("CommandId");
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
.WithMany()
.HasForeignKey("OwnerId");
});
modelBuilder.Entity("Yavsc.Models.Blog", b =>
@ -832,6 +885,10 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
{
b.HasOne("Yavsc.Models.Activity")
.WithMany()
.HasForeignKey("ActivityCode");
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("ClientId");
@ -851,9 +908,24 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
{
b.HasOne("Yavsc.Models.Booking.Profiles.DjSettings")
.WithMany()
.HasForeignKey("DjSettingsUserId");
b.HasOne("Yavsc.Models.Booking.Profiles.GeneralSettings")
.WithMany()
.HasForeignKey("GeneralSettingsUserId");
});
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.Instrumentation", b =>
{
b.HasOne("Yavsc.Models.Booking.Instrument")
.WithMany()
.HasForeignKey("InstrumentId");
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
.WithMany()
.HasForeignKey("OwnerProfileId");
.HasForeignKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
@ -916,12 +988,23 @@ namespace Yavsc.Migrations
.HasForeignKey("PostId");
});
modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b =>
{
b.HasOne("Yavsc.Models.Booking.Profiles.FormationSettings")
.WithMany()
.HasForeignKey("FormationSettingsUserId");
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
.WithMany()
.HasForeignKey("PerformerId");
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("WorkingForId");
});
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
{
b.HasOne("Yavsc.Models.Market.Service")
.WithMany()
.HasForeignKey("OfferId");
b.HasOne("Yavsc.Location")
.WithMany()
.HasForeignKey("OrganizationAddressId");

View File

@ -1,207 +1,214 @@

using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Authentication.OAuth;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Yavsc.Models.Relationship;
namespace Yavsc.Models
{
using Auth;
using Billing;
using Booking;
using OAuth;
using Workflow;
using Identity;
using Market;
using Chat;
using Messaging;
using Access;
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
// Customize the ASP.NET Identity model and override the defaults if needed.
// For example, you can rename the ASP.NET Identity table names and more.
// Add your customizations after calling base.OnModelCreating(builder);
builder.Entity<Contact>().HasKey(x => new { x.OwnerId, x.UserId });
builder.Entity<BookQuery>().Property(x=>x.CreationDate).HasDefaultValueSql("LOCALTIMESTAMP");
builder.Entity<Blog>().Property(x=>x.Posted).HasDefaultValueSql("LOCALTIMESTAMP");
builder.Entity<GoogleCloudMobileDeclaration>().Property(x=>x.DeclarationDate).HasDefaultValueSql("LOCALTIMESTAMP");
builder.Entity<PostTag>().HasKey(x=>new { x.PostId, x.TagId});
builder.Entity<ApplicationUser>().HasMany<Connection>( c=>c.Connections );
builder.Entity<UserActivity>().HasKey(u=> new { u.DoesCode, u.UserId});
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql(Startup.ConnectionString);
}
public DbSet<Client> Applications { get; set; }
public DbSet<RefreshToken> RefreshTokens { get; set; }
/// <summary>
/// Activities referenced on this site
/// </summary>
/// <returns></returns>
public DbSet<Activity> Activities { get; set; }
public DbSet<UserActivity> UserActivities { get; set; }
/// <summary>
/// Users posts
/// </summary>
/// <returns></returns>
public DbSet<Blog> Blogspot { get; set; }
/// <summary>
/// Skills propulsed by this site
/// </summary>
/// <returns></returns>
public DbSet<Skill> SiteSkills { get; set; }
/// <summary>
/// Circle members
/// </summary>
/// <returns></returns>
public DbSet<CircleMember> CircleMembers { get; set; }
/// <summary>
/// Commands, from an user, to a performer
/// (A performer is an user who's actived a main activity
/// on his profile).
/// </summary>
/// <returns></returns>
public DbSet<BookQuery> Commands { get; set; }
/// <summary>
/// Special commands, talking about
/// a given place and date.
/// </summary>
/// <returns></returns>
public DbSet<BookQuery> BookQueries { get; set; }
public DbSet<PerformerProfile> Performers { get; set; }
public DbSet<Estimate> Estimates { get; set; }
public DbSet<AccountBalance> BankStatus { get; set; }
public DbSet<BalanceImpact> BankBook { get; set; }
public DbSet<Location> Map { get; set; }
/// <summary>
/// Google Calendar offline
/// open auth tokens
/// </summary>
/// <returns>tokens</returns>
public DbSet<OAuth2Tokens> Tokens { get; set; }
/// <summary>
/// References all declared external GCM devices
/// </summary>
/// <returns></returns>
public DbSet<GoogleCloudMobileDeclaration> GCMDevices { get; set; }
public DbSet<Service> Services { get; set; }
public DbSet<Product> Products { get; set; }
public Task ClearTokensAsync()
{
Tokens.RemoveRange(this.Tokens);
SaveChanges();
return Task.FromResult(0);
}
public Task DeleteTokensAsync(string email)
{
if (string.IsNullOrEmpty(email))
{
throw new ArgumentException("email MUST have a value");
}
var item = this.Tokens.FirstOrDefault(x => x.UserId == email);
if (item != null)
{
Tokens.Remove(item);
SaveChanges();
}
return Task.FromResult(0);
}
public Task<OAuth2Tokens> GetTokensAsync(string googleUserId)
{
if (string.IsNullOrEmpty(googleUserId))
{
throw new ArgumentException("email MUST have a value");
}
using (var context = new ApplicationDbContext())
{
var item = this.Tokens.FirstOrDefault(x => x.UserId == googleUserId);
return Task.FromResult(item);
}
}
public Task StoreTokenAsync(string googleUserId, OAuthTokenResponse value)
{
if (string.IsNullOrEmpty(googleUserId))
{
throw new ArgumentException("googleUserId MUST have a value");
}
var item = this.Tokens.SingleOrDefaultAsync(x => x.UserId == googleUserId).Result;
if (item == null)
{
Tokens.Add(new OAuth2Tokens
{
TokenType = "Bearer", // FIXME why value.TokenType would be null?
AccessToken = value.AccessToken,
RefreshToken = value.RefreshToken,
Expiration = DateTime.Now.AddSeconds(int.Parse(value.ExpiresIn)),
UserId = googleUserId
});
}
else
{
item.AccessToken = value.AccessToken;
item.Expiration = DateTime.Now.AddMinutes(int.Parse(value.ExpiresIn));
if (value.RefreshToken != null)
item.RefreshToken = value.RefreshToken;
Tokens.Update(item);
}
SaveChanges();
return Task.FromResult(0);
}
Client FindApplication(string clientId)
{
return Applications.FirstOrDefault(
app=>app.Id == clientId);
}
public DbSet<ExceptionSIREN> ExceptionsSIREN { get; set; }
public DbSet<Location> Locations { get; set; }
public DbSet<Tag> Tags { get; set; }
public DbSet<PostTag> TagsDomain { get; set; }
public DbSet<EstimateTemplate> EstimateTemplates { get; set; }
public DbSet<Contact> Contacts { get; set; }
public DbSet<ClientProviderInfo> ClientProviderInfo { get; set; }
public DbSet<Connection> Connections { get; set; }
public DbSet<BlackListed> BlackListed { get; set; }
public DbSet<MusicalPreference> MusicalPreferences { get; set; }
public DbSet<MusicalTendency> MusicalTendency { get; set; }
public DbSet<LocationType> LocationType { get; set; }
public DbSet<Instrument> Instrument { get; set; }
}
}
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Authentication.OAuth;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Yavsc.Models.Relationship;
namespace Yavsc.Models
{
using Auth;
using Billing;
using Booking;
using OAuth;
using Workflow;
using Identity;
using Market;
using Chat;
using Messaging;
using Access;
using Yavsc.Models.Booking.Profiles;
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
// Customize the ASP.NET Identity model and override the defaults if needed.
// For example, you can rename the ASP.NET Identity table names and more.
// Add your customizations after calling base.OnModelCreating(builder);
builder.Entity<Contact>().HasKey(x => new { x.OwnerId, x.UserId });
builder.Entity<BookQuery>().Property(x=>x.CreationDate).HasDefaultValueSql("LOCALTIMESTAMP");
builder.Entity<Blog>().Property(x=>x.Posted).HasDefaultValueSql("LOCALTIMESTAMP");
builder.Entity<GoogleCloudMobileDeclaration>().Property(x=>x.DeclarationDate).HasDefaultValueSql("LOCALTIMESTAMP");
builder.Entity<PostTag>().HasKey(x=>new { x.PostId, x.TagId});
builder.Entity<ApplicationUser>().HasMany<Connection>( c=>c.Connections );
builder.Entity<UserActivity>().HasKey(u=> new { u.DoesCode, u.UserId});
builder.Entity<Instrumentation>().HasKey(u=> new { u.InstrumentId, u.UserId});
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql(Startup.ConnectionString);
}
public DbSet<Client> Applications { get; set; }
public DbSet<RefreshToken> RefreshTokens { get; set; }
/// <summary>
/// Activities referenced on this site
/// </summary>
/// <returns></returns>
public DbSet<Activity> Activities { get; set; }
public DbSet<UserActivity> UserActivities { get; set; }
/// <summary>
/// Users posts
/// </summary>
/// <returns></returns>
public DbSet<Blog> Blogspot { get; set; }
/// <summary>
/// Skills propulsed by this site
/// </summary>
/// <returns></returns>
public DbSet<Skill> SiteSkills { get; set; }
/// <summary>
/// Circle members
/// </summary>
/// <returns></returns>
public DbSet<CircleMember> CircleMembers { get; set; }
/// <summary>
/// Commands, from an user, to a performer
/// (A performer is an user who's actived a main activity
/// on his profile).
/// </summary>
/// <returns></returns>
public DbSet<BookQuery> Commands { get; set; }
/// <summary>
/// Special commands, talking about
/// a given place and date.
/// </summary>
/// <returns></returns>
public DbSet<BookQuery> BookQueries { get; set; }
public DbSet<PerformerProfile> Performers { get; set; }
public DbSet<Estimate> Estimates { get; set; }
public DbSet<AccountBalance> BankStatus { get; set; }
public DbSet<BalanceImpact> BankBook { get; set; }
public DbSet<Location> Map { get; set; }
/// <summary>
/// Google Calendar offline
/// open auth tokens
/// </summary>
/// <returns>tokens</returns>
public DbSet<OAuth2Tokens> Tokens { get; set; }
/// <summary>
/// References all declared external GCM devices
/// </summary>
/// <returns></returns>
public DbSet<GoogleCloudMobileDeclaration> GCMDevices { get; set; }
public DbSet<Service> Services { get; set; }
public DbSet<Product> Products { get; set; }
public Task ClearTokensAsync()
{
Tokens.RemoveRange(this.Tokens);
SaveChanges();
return Task.FromResult(0);
}
public Task DeleteTokensAsync(string email)
{
if (string.IsNullOrEmpty(email))
{
throw new ArgumentException("email MUST have a value");
}
var item = this.Tokens.FirstOrDefault(x => x.UserId == email);
if (item != null)
{
Tokens.Remove(item);
SaveChanges();
}
return Task.FromResult(0);
}
public Task<OAuth2Tokens> GetTokensAsync(string googleUserId)
{
if (string.IsNullOrEmpty(googleUserId))
{
throw new ArgumentException("email MUST have a value");
}
using (var context = new ApplicationDbContext())
{
var item = this.Tokens.FirstOrDefault(x => x.UserId == googleUserId);
return Task.FromResult(item);
}
}
public Task StoreTokenAsync(string googleUserId, OAuthTokenResponse value)
{
if (string.IsNullOrEmpty(googleUserId))
{
throw new ArgumentException("googleUserId MUST have a value");
}
var item = this.Tokens.SingleOrDefaultAsync(x => x.UserId == googleUserId).Result;
if (item == null)
{
Tokens.Add(new OAuth2Tokens
{
TokenType = "Bearer", // FIXME why value.TokenType would be null?
AccessToken = value.AccessToken,
RefreshToken = value.RefreshToken,
Expiration = DateTime.Now.AddSeconds(int.Parse(value.ExpiresIn)),
UserId = googleUserId
});
}
else
{
item.AccessToken = value.AccessToken;
item.Expiration = DateTime.Now.AddMinutes(int.Parse(value.ExpiresIn));
if (value.RefreshToken != null)
item.RefreshToken = value.RefreshToken;
Tokens.Update(item);
}
SaveChanges();
return Task.FromResult(0);
}
Client FindApplication(string clientId)
{
return Applications.FirstOrDefault(
app=>app.Id == clientId);
}
public DbSet<ExceptionSIREN> ExceptionsSIREN { get; set; }
public DbSet<Location> Locations { get; set; }
public DbSet<Tag> Tags { get; set; }
public DbSet<PostTag> TagsDomain { get; set; }
public DbSet<EstimateTemplate> EstimateTemplates { get; set; }
public DbSet<Contact> Contacts { get; set; }
public DbSet<ClientProviderInfo> ClientProviderInfo { get; set; }
public DbSet<Connection> Connections { get; set; }
public DbSet<BlackListed> BlackListed { get; set; }
public DbSet<MusicalPreference> MusicalPreferences { get; set; }
public DbSet<MusicalTendency> MusicalTendency { get; set; }
public DbSet<LocationType> LocationType { get; set; }
public DbSet<Instrument> Instrument { get; set; }
public DbSet<DjSettings> DjSettings { get; set; }
public DbSet<Instrumentation> Instrumentation { get; set; }
public DbSet<FormationSettings> FormationSettings { get; set; }
public DbSet<GeneralSettings> GeneralSettings { get; set; }
public DbSet<CoWorking> WorkflowProviders { get; set; }
}
}

View File

@ -2,7 +2,7 @@ using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Model.Bank
namespace Yavsc.Models.Bank
{
public class BankIdentity
{

View File

@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Yavsc.Models.Billing;
using Yavsc.Models.Relationship;
@ -10,37 +11,49 @@ namespace Yavsc.Models.Booking
/// Query, for a date, with a given perfomer, at this given place.
/// </summary>
public class BookQuery : NominativeServiceCommand<RendezVous> {
/// <summary>
/// The command identifier
/// </summary>
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id {get; set; }
public class BookQuery : NominativeServiceCommand<RendezVous>
{
/// <summary>
/// The command identifier
/// </summary>
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Display(Name="Event date")]
public DateTime EventDate{
[Display(Name = "Event date")]
public DateTime EventDate
{
get;
set;
}
public Location Location {
}
public Location Location
{
get;
set;
}
public LocationType LocationType {
set;
}
public LocationType LocationType
{
set;
get;
}
public string Reason { get; set; }
public string Reason { get; set; }
public BookQuery()
{
}
public BookQuery(Location eventLocation, DateTime eventDate)
{
Location = eventLocation;
EventDate = eventDate;
}
public BookQuery(string activityCode, Location eventLocation, DateTime eventDate)
{
Location = eventLocation;
EventDate = eventDate;
ActivityCode = activityCode;
}
[Required]
public string ActivityCode { get; set; }
[ForeignKey("ActivityCode"),JsonIgnore]
public virtual Activity Context  { get; set ; }
}
}

View File

@ -1,17 +1,22 @@
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Booking {
namespace Yavsc.Models.Booking
{
public class MusicalPreference : MusicalTendency {
public class MusicalPreference {
[Key]
public string OwnerProfileId
{
get; set;
}
public string OwnerProfileId { get; set; }
[ForeignKey("OwnerProfileId")]
public virtual PerformerProfile OwnerProfile { get; set; }
public int Rate { get; set; }
[Required]
public long TendencyId {get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using YavscLib;
namespace Yavsc.Models.Booking.Profiles
{
public class DjSettings : ISpecializationSettings
{
public string SoundCloudId { get; set; }
public virtual List<MusicalPreference> SoundColor { get; set; }
[Key]
public string UserId
{
get; set;
}
}
}

View File

@ -0,0 +1,18 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Booking.Profiles
{
using Models.Workflow;
using YavscLib;
public class FormationSettings : ISpecializationSettings
{
public virtual List<CoWorking> CoWorking { get; set; }
[Key]
public string UserId
{
get; set;
}
}
}

View File

@ -0,0 +1,16 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using YavscLib;
namespace Yavsc.Models.Booking.Profiles
{
public class GeneralSettings : ISpecializationSettings
{
public virtual List<MusicalPreference> SoundColor { get; set; }
[Key]
public string UserId
{
get; set;
}
}
}

View File

@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
using YavscLib;
namespace Yavsc.Models.Booking.Profiles
{
public class Instrumentation : ISpecializationSettings
{
public string UserId
{
get; set;
}
[ForeignKeyAttribute("UserId")]
public virtual PerformerProfile User { get; set; }
public long InstrumentId { get; set; }
[ForeignKeyAttribute("InstrumentId")]
public virtual Instrument Tool { get; set; }
}
}

View File

@ -1,9 +1,9 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Model.Forms.Validation;
namespace Yavsc.Model.Forms
namespace Yavsc.Models.Forms
{
using Validation;
public abstract class Field
{
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Yavsc.Model.Forms
namespace Yavsc.Models.Forms
{
public class FieldSet
{

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Model.Forms.Validation
namespace Yavsc.Models.Forms.Validation
{
public class Method
{

View File

@ -1,4 +1,4 @@
namespace Yavsc.Model.Forms.Validation
namespace Yavsc.Models.Forms.Validation
{
public class Required : Method
{

View File

@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Identity;
using Yavsc.Models.Chat;
using Yavsc.Model.Bank;
using Yavsc.Models.Bank;
using Yavsc.Models.Access;
namespace Yavsc.Models

View File

@ -15,6 +15,8 @@ namespace Yavsc.Model
public decimal? Previsional { get; set; }
public string Reason { get; set; }
public string ActivityCode { get; set; }
}
}

View File

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

View File

@ -31,8 +31,8 @@ namespace Yavsc.Models.Workflow
[Display(Name="Accept notifications from non-VIP users")]
public bool AcceptPublicContact { get; set; }
[Display(Name="Allow my geo-localization, nearby my clients")]
public bool AcceptGeoLocalization { get; set; }
[Display(Name="Use my geo-localization, and give me clients near by me")]
public bool UseGeoLocalizationToReduceDistanceWithClients { get; set; }
[Display(Name="Web site")]
public string WebSite { get; set; }
@ -51,7 +51,7 @@ namespace Yavsc.Models.Workflow
[NotMapped]
public bool DoesBlog { get {
return Performer?.Posts != null ? Performer.Posts.Count > 0 : false;
return Performer?.Posts?.Count > 0 ;
} }
}

View File

@ -5,9 +5,6 @@ namespace Yavsc.Models.Workflow
{
public class UserActivity
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required]
public string UserId { get; set; }

View File

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Address"><value>Adresse</value></data>
</root>

View File

@ -230,6 +230,8 @@
<data name="Name"><value>Name</value></data>
<data name="Needs"><value>Needs</value></data>
<data name="Need"><value>Need</value></data>
<data name="nouvel instrument"><value>new instrument</value></data>
<data name="UserName"><value>New display name</value></data>
<data name="New user name"><value>New display name</value></data>
<data name="New Tag"><value>New Tag</value></data>
@ -321,6 +323,10 @@
<data name="XHasBeenNotified"><value>{0} has been notified of your query, you should be fast contacted</value></data>
<data name="Xshouldbeavailable"><value>regarding his calendar,
{0} should be available for this booking</value></data>
<data name="Yavsc.Models.Booking.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Booking.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Booking.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Booking.Profiles.GeneralSettings"><value>Paramètres généraux: une couleur musicale</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>You need to be authenticated in order to
contact a performer</value></data>
<data name="younotadmin"><value>You're not administrator</value></data>

View File

@ -121,7 +121,10 @@
<data name="About BookAStar"><value>À propos de BookAStar</value></data>
<data name="About Message"><value>Bienvenue chez vos stars.</value></data>
<data name="access denied"><value>Accès refusé</value></data>
<data name="AcceptNotifications"><value>Accepter la notification d'une demande de rendez-vous</value></data>
<data name="AcceptPublicContact"><value>Accepter les prises de contact de la part de particuliers</value></data>
<data name="AccountBalance"><value>Balance du compte</value></data>
<data name="ActivateMyProSettings"><value>Activer mon profile professionnel</value></data>
<data name="Activity"><value>Activité</value></data>
<data name="Activities"><value>Activités</value></data>
<data name="additionally"><value>de plus</value></data>
@ -203,6 +206,13 @@
<data name="entries"><value>entrées</value></data>
<data name="Estimate"><value>Estimer</value></data>
<data name="Estimate_not_found"><value>Devis non trouvé</value></data>
<data name="EstimateToProduce"><value>Demandes de Devis en souffrance</value></data>
<data name="EstimateToSignAsPro"><value>Devis à valider</value></data>
<data name="EstimateToSignAsCli"><value>Devis à accèpter ou refuser</value></data>
<data name="BillToSignAsPro"><value>Factures à produire</value></data>
<data name="BillToSignAsCli"><value>Factures à honnorer</value></data>
<data name="PayementsDone"><value>Paiements effectués</value></data>
<data name="EstimationMessageToClient"><value>{0} a validé un devis pour vous : {1}\nAu total : {2} €
Il attend maintenant votre signature.</value></data>
<data name="EstimateWanted"><value>Demande de devis</value></data>
@ -250,10 +260,13 @@
<data name="Manage your account"><value>Gérez votre inscription</value></data>
<data name="ManagedSiteSkills"><value>Compétences gérée sur ce site</value></data>
<data name="MaxDate"><value>Date maximale du rendez-vous</value></data>
<data name="MaxDailyCost"><value>Coût maximal journalier</value></data>
<data name="MEACode"><value>Code d'Activité Principalement Exercée</value></data>
<data name="Members"><value>Membres</value></data>
<data name="Message sent"><value>Votre message a été envoyé</value></data>
<data name="MinDate"><value>Date minimale du rendez-vous</value></data>
<data name="MinDailyCost"><value>Coût minimal journalier</value></data>
MinDailyCost
<data name="Modified"><value>Modifié</value></data>
<data name="Modify"><value>Modifier</value></data>
<data name="Modify settings"><value>Modifier les paramètres</value></data>
@ -267,13 +280,13 @@
<data name="NewPasswordMessageSent"><value>Un e-mail vient de vous être envoyé, il contient le lien à suivre
pour pouvoir mettre à jour votre mot de passe.</value></data>
<data name="No"><value>Non</value></data>
<data name="No calendar for this user"><value>Le préstataire n'a pas de calendrier associé.</value></data>
<data name="no content"><value>pas de contenu</value></data>
<data name="No deposit"><value>Aucune arrhes n'a été prévue</value></data>
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité.</value></data>
<data name="none"><value>aucun</value></data>
<data name="Non existent user"><value>Non existent user</value></data>
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité.</value></data>
<data name="Not Approuved"><value>Non approuvé</value></data>
<data name="No calendar for this user"><value>Le préstataire n'a pas de calendrier associé.</value></data>
<data name="Offline"><value>Hors ligne</value></data>
<data name="Online"><value>En ligne</value></data>
<data name="OnlyAuthorizedMayContact"><value>Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier.</value></data>
@ -319,13 +332,17 @@
<data name="Reset password confirmation"><value>Confirmation de ré-initialiser du mot de passe</value></data>
<data name="role created"><value>Rôle créé</value></data>
<data name="RoleName"><value>Nom du rôle </value></data>
<data name="Save these settings"><value>Save these settings</value></data>
<data name="Save these settings"><value>Enregistrer ces paramètres</value></data>
<data name="Search"><value>Chercher</value></data>
<data name="Set"><value>Positioner</value></data>
<data name="Select a Google calendar"><value>Selectioner un calendrier Google</value></data>
<data name="Send"><value>Envoyer</value></data>
<data name="Send a private message"><value>Envoyer un message privé</value></data>
<data name="Send a public message"><value>Envoyer un message publique</value></data>
<data name="Set"><value>Positioner</value></data>
<data name="SettingsClass"><value>Classe du paramétrage</value></data>
<data name="Your performer profile"><value>Votre profile professionel</value></data>
<data name="Setup below your activity parameters"><value>Positionnez ci-après vos les paramêtre de votre activité</value></data>
<data name="SiteSkills"><value>Talents/Compétences/Spécialités gérés sur ce site</value></data>
<data name="Skill"><value>Compétence</value></data>
<data name="Skills"><value>Talents/Compétences/Spécialités</value></data>
@ -354,6 +371,7 @@
<data name="Unregister"><value>Se désinscrire</value></data>
<data name="Use a local account to log in"><value>Utiliser un compte local pour se connecter</value></data>
<data name="Use another service to log in"><value>Utiliser un autre service pour se connecter</value></data>
<data name="UseGeoLocalizationToReduceDistanceWithClients"><value>Utiliser ma position pour avoir des clients plus proches</value></data>
<data name="User List"><value>Liste des utilisateurs</value><comment></comment></data>
<data name="UserName"><value>Nom d'utilisateur</value></data>
<data name="UsersInRole"><value>Liste des utilisateurs assumant le rôle "{0}"</value></data>
@ -362,10 +380,15 @@
<data name="View_source"><value>Voir le texte source de l'article</value></data>
<data name="was_added_to_the_role"><value>a été ajouté au rôle</value></data>
<data name="was_added_to_the_empty_role"><value>Il n'y avait pas d'utilisateur dans le rôle "{1}". Vous ({0}) avez été ajouté au rôle "{1}".</value></data>
<data name="WebSite"><value>Site Web</value><comment></comment></data>
<data name="Welcome"><value>Bienvenue</value><comment></comment></data>
<data name="XHasBeenNotified"><value>{0} à été notifié de votre demande, vous devriez être contacté rapidement</value></data>
<data name="Xshouldbeavailable"><value>Au vu de son calendrier,
{0} devrait être disponible pour ce rendez-vous</value></data>
<data name="Yavsc.Models.Booking.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Booking.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Booking.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Booking.Profiles.GeneralSettings"><value>Paramètres généraux: une couleur musicale</value></data>
<data name="Yes"><value>Oui</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>Vous devez vous authentifier pour pouvoir demander un devis
à un préstataire.</value></data>
@ -382,5 +405,5 @@
<data name="Your profile"><value>Votre profile</value></data>
<data name="YourMessageHasBeenSent"><value>Votre messge a été envoyé</value></data>
<data name="Tell more, below, about your query"><value>Dites en plus, ci àprès, à propos de cet évennement</value></data>
<data name="UnsetActivity"><value>Supprimer mon profile professionel</value></data>
</root>

View File

@ -0,0 +1,399 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About"><value>À propos de </value></data>
<data name="About BookAStar"><value>À propos de BookAStar</value></data>
<data name="About Message"><value>Bienvenue chez vos stars.</value></data>
<data name="access denied"><value>Accès refusé</value></data>
<data name="AccountBalance"><value>Balance du compte</value></data>
<data name="Activity"><value>Activité</value></data>
<data name="Activities"><value>Activités</value></data>
<data name="additionally"><value>de plus</value></data>
<data name="Address"><value>Adresse</value></data>
<data name="Allow my geolocatisation, nearby the clients"><value>Autoriser ma geolocatisation, auprès de mes clients</value></data>
<data name="AnIMessageHasbeenSent"><value>Un message instantané a été envoyé à {0},
lui présentant votre demande. Vous devriez être contacté très rapidement.</value></data>
<data name="aprestation"><value>une prestation</value></data>
<data name="AskForAnEstimate"><value>Demander un devis</value></data>
<data name="AttachedFiles"><value>Fichiers attachées</value></data>
<data name="AuthenticatedOnly"><value>Seuls les utilisateurs authentifiés peuvent accèder à cette information.</value></data>
<data name="Author"><value>Auteur</value></data>
<data name="available"><value>disponible</value></data>
<data name="Back to List"><value>Retour à la liste</value></data>
<data name="Basket"><value>Panier</value></data>
<data name="Bill edition"><value>Édition d'un article</value></data>
<data name="Bill removal"><value>Suppression d'un article</value></data>
<data name="BillAccessControl"><value>Contrôle d'accès à l'article</value></data>
<data name="BillCreated"><value>Article créé</value></data>
<data name="BillSourceCode"><value>Code source de l'article</value></data>
<data name="BillUpdated"><value>Article mis à jour</value></data>
<data name="Blog post edition"><value>Édition d'un article</value></data>
<data name="body"><value>corps de texte</value></data>
<data name="Book AStar"><value>Proposez un rendez-vous à votre artiste</value></data>
<data name="Book IT"><value>Proposez un rendez-vous à votre prestataire de services du numérique</value></data>
<data name="BookingTitleArtiste"><value>Reserver les services d'un artiste</value></data>
<data name="BookingTitle6829C"><value>Reserver les services d'un éditeur de logiciel</value></data>
<data name="Calendar"><value>Calendrier</value></data>
<data name="Catalog"><value>Catalogue</value></data>
<data name="Change"><value>Changer</value></data>
<data name="Change user name form"><value>Formulaire de changement de pseudonyme (avatar, le nom publique de ce compte utilisateur ici)</value></data>
<data name="Change your account settings"><value>Modifiez les paramètres de votre compte</value></data>
<data name="Connect using"><value>Se connecter en utilisant</value></data>
<data name="Choose below your main activity"><value>Choisissez ci-après votre activité principale</value></data>
<data name="ChooseADescription"><value>S'il vous plait, choisissez une description.</value></data>
<data name="ChooseATitle"><value>S'il vous plait, choisissez un titre.</value></data>
<data name="ChooseADateInTheFutur"><value>S'il vous plait, choisissez une date dans le futur.</value></data>
<data name="ChooseAnEventDate"><value>S'il vous plait, choisissez une date pour cette prestation.</value></data>
<data name="Ciffer"><value>Chiffre</value></data>
<data name="Circles"><value>Cercles</value></data>
<data name="Click action"><value>Action sur click</value></data>
<data name="Click here to log in"><value>Cliquez ici pour vous identifier</value></data>
<data name="Command confirmation"><value>Confirmation de commande</value></data>
<data name="Comment"><value>Commentaire</value></data>
<data name="Consultant"><value>Consultant</value></data>
<data name="ContactAPerformer"><value>Contactez un préstataire</value></data>
<data name="Content"><value>Contenu</value></data>
<data name="Count"><value>Nombre</value></data>
<data name="CouldNotConvertVToDouble"><value>La convertion de '{0}' en 'double' a été impossible.</value></data>
<data name="Create"><value>Créer</value></data>
<data name="Create a new article"><value>Créer un nouvel article</value></data>
<data name="Create a new account"><value>Créer un nouveau compte</value></data>
<data name="Credits"><value>Crédits</value></data>
<data name="Date search"><value>Demande de rendez-vous</value></data>
<data name="DB"><value>Base de données</value></data>
<data name="Details"><value>Détails</value></data>
<data name="Delete"><value>Supprimer</value></data>
<data name="Deposit"><value>Arrhes</value></data>
<data name="Description"><value>Description</value></data>
<data name="DoAnEstimate"><value>Faire un devis</value></data>
<data name="DoComment"><value>Commenter</value></data>
<data name="DoNotPublishMyActivity"><value>Ne pas publier mon activité</value></data>
<data name="DoSpecifyCircles"><value>S'il vous plait, spécifiez ceux de vos cercles à qui est destiné ce contenu</value></data>
<data name="DocTemplateException"><value>Une erreur est survenue à la génération de votre document</value></data>
<data name="DisplayName"><value>Nom affiché</value></data>
<data name="Disable"><value>Désactiver</value></data>
<data name="Disabled"><value>Désactivé</value></data>
<data name="DoPost"><value>Poster</value></data>
<data name="DoTag"><value>Tagger</value></data>
<data name="Edit"><value>Éditer</value></data>
<data name="Edited"><value>Edité</value></data>
<data name="EditRelatedSkills"><value>Editer les compétences associées</value></data>
<data name="Enabled"><value>Activé</value></data>
<data name="Enable"><value>Activer</value></data>
<data name="EndDate"><value>Date de fin</value></data>
<data name="EndHour"><value>Heure de fin</value></data>
<data name="email"><value>e-mail</value></data>
<data name="Enter your email."><value>Saisissez votre email.</value></data>
<data name="entries"><value>entrées</value></data>
<data name="Estimate"><value>Estimer</value></data>
<data name="Estimate_not_found"><value>Devis non trouvé</value></data>
<data name="EstimateToProduce"><value>Demandes de Devis en souffrance</value></data>
<data name="EstimateToSignAsPro"><value>Devis à valider</value></data>
<data name="EstimateToSignAsCli"><value>Devis à accèpter ou refuser</value></data>
<data name="BillToSignAsPro"><value>Factures à produire</value></data>
<data name="BillToSignAsCli"><value>Factures à honnorer</value></data>
<data name="PayementsDone"><value>Paiements effectués</value></data>
<data name="EstimationMessageToClient"><value>{0} a validé un devis pour vous : {1}\nAu total : {2} €
Il attend maintenant votre signature.</value></data>
<data name="EstimateWanted"><value>Demande de devis</value></data>
<data name="Event date"><value>Date de l'évennement</value></data>
<data name="EventWebPage"><value>Page web de l'événement</value></data>
<data name="ExistantDB"><value>Base de données éxistante</value></data>
<data name="External Logins"><value>Inscriptions externes</value></data>
<data name="FillInAFutureDate"><value>Veuillez, s'il vous plait, utiliser une date future.</value></data>
<data name="Fill in your Bank Info"><value>Saisir vos coordonées bancaires</value></data>
<data name="Fill in your book query"><value>Saisissez votre demande de rendez-vous</value></data>
<data name="Forbidden"><value>Contenu à accès restreint</value></data>
<data name="Forgot your password?"><value>Mot de passe perdu?</value></data>
<data name="Forgot Password Confirmation."><value>Confirmation mot de passe perdu.</value></data>
<data name="from"><value>provenant de</value></data>
<data name="Full name"><value>Nom complet</value></data>
<data name="GCM Notification sending failed"><value>L'envoi du message push a échoué</value></data>
<data name="GCM Notifications sent"><value>Message push envoyé</value></data>
<data name="GiveAnExplicitReason"><value>Dites en plus, ci àprès, à propos de cet évennement</value></data>
<data name="GoogleDidntGeoLocalized"><value>Google n'a pas pu identifier ce lieu</value></data>
<data name="Google calendar"><value>Agenda Google</value></data>
<data name="Google error"><value>Erreur Google : {0}</value></data>
<data name="Google registration id"><value>Identifiant d'enregistrement Google</value></data>
<data name="Hide source"><value>Cacher le texte source de l'article</value></data>
<data name="Home"><value>Accueil</value></data>
<data name="Hide"><value>Cacher</value></data>
<data name="hidden"><value>caché</value></data>
<data name="I understood"><value>J'ai compris</value></data>
<data name="Icon"><value>Icône</value></data>
<data name="Icons made by"><value>Les icônes fabriqués par</value></data>
<data name="Identity"><value>Identité</value></data>
<data name="ImgLocator"><value>URI de l'image</value></data>
<data name="ImportException"><value>Exception à l'import</value></data>
<data name="InternalServerError"><value>Erreur serveur interne</value></data>
<data name="Invalid company number"><value>Numéro de SIREN invalide</value></data>
<data name="is asking you for a date"><value>vous demande un rendez-vous</value></data>
<data name="is licensed_by"><value>sont sous licence</value></data>
<data name="Item added to basket"><value>Article ajouté au panier.</value></data>
<data name="Location"><value>Lieu</value></data>
<data name="Login"><value>Connection</value></data>
<data name="Log in"><value>Se connecter</value></data>
<data name="Logout"><value>Déconnection</value></data>
<data name="MainActivity"><value>Activité principale</value></data>
<data name="Manage"><value>Gérer</value></data>
<data name="Manage your account"><value>Gérez votre inscription</value></data>
<data name="ManagedSiteSkills"><value>Compétences gérée sur ce site</value></data>
<data name="MaxDate"><value>Date maximale du rendez-vous</value></data>
<data name="MEACode"><value>Code d'Activité Principalement Exercée</value></data>
<data name="Members"><value>Membres</value></data>
<data name="Message sent"><value>Votre message a été envoyé</value></data>
<data name="MinDate"><value>Date minimale du rendez-vous</value></data>
<data name="Modified"><value>Modifié</value></data>
<data name="Modify"><value>Modifier</value></data>
<data name="Modify settings"><value>Modifier les paramètres</value></data>
<data name="My Estimates"><value>Mes estimations</value></data>
<data name="Name"><value>Nom</value></data>
<data name="Needs"><value>Besoins</value></data>
<data name="Need"><value>Besoin</value></data>
<data name="New user name"><value>Nouveau nom d'utilisateur (avatar)</value></data>
<data name="New Tag"><value>Nouveau Tag</value></data>
<data name="NewPasswordMessageSent"><value>Un e-mail vient de vous être envoyé, il contient le lien à suivre
pour pouvoir mettre à jour votre mot de passe.</value></data>
<data name="No"><value>Non</value></data>
<data name="no content"><value>pas de contenu</value></data>
<data name="No deposit"><value>Aucune arrhes n'a été prévue</value></data>
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité.</value></data>
<data name="none"><value>aucun</value></data>
<data name="Non existent user"><value>Non existent user</value></data>
<data name="Not Approuved"><value>Non approuvé</value></data>
<data name="No calendar for this user"><value>Le préstataire n'a pas de calendrier associé.</value></data>
<data name="Offline"><value>Hors ligne</value></data>
<data name="Online"><value>En ligne</value></data>
<data name="OnlyAuthorizedMayContact"><value>Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier.</value></data>
<data name="Password"><value>Mot de passe</value></data>
<data name="Pdf version"><value>Version Pdf</value></data>
<data name="PerformanceDate"><value>Date de la prestation</value></data>
<data name="PerformancePlace"><value>Lieu de la pestation</value></data>
<data name="Performers"><value>Perstataires</value></data>
<data name="Performer"><value>Préstataire</value></data>
<data name="Person"><value>Personne</value></data>
<data name="Photo"><value>Photo</value></data>
<data name="PhotoUpdated"><value>Photo mise à jour</value></data>
<data name="Please"><value>S'il vous plait</value></data>
<data name="PleaseCheckYourEmail"><value>S'il vous plait, veuillez verifier votre boite au lettres, pour pouvoir ré-initialiser votre mot de passe.</value></data>
<data name="PleaseConfirmYourNewPassword"><value>S'il vous plait, veuillez confirmer votre nouveau mot de passe.</value></data>
<data name="PleaseFillInABody"><value>S'il vous plait, saisissez un corps de message</value></data>
<data name="PleaseFillInAReason"><value>S'il vous plait, saisissez une réson, un sujet pour votre message</value></data>
<data name="Please reset your password by following this link:"><value>Veuillez s'il vous plait utiliser le lien suivant pour ré-initialiser votre mot de passe:</value></data>
<data name="Posted"><value>Posté</value></data>
<data name="PreferedDate"><value>Date souhaitée</value></data>
<data name="PresationLocation"><value>Lieu de la présation: {0}.\n</value></data>
<data name="Preview"><value>Prévisualiser</value><comment>Prévisualiser le document</comment></data>
<data name="Profile edition"><value>Édition du profile</value></data>
<data name="Product reference"><value>Référence produit</value></data>
<data name="prestation"><value>prestation</value></data>
<data name="Professional settings"><value>Paramètres professionels</value></data>
<data name="ProviderId"><value>Identifiant du fournisseur</value></data>
<data name="ProviderName"><value>Nom du fournisseur</value></data>
<data name="Rate"><value>Cote</value></data>
<data name="ReadMore"><value>Lire la suite ...</value></data>
<data name="reason"><value>raison</value></data>
<data name="Register"><value>S'inscrire</value></data>
<data name="Register as a new user"><value>S'inscrire comme nouvel utilisateur</value></data>
<data name="RegistrationUnexpectedError"><value>Une erreur inattendue s'est produite:
"{0}".
Veuillez pardonner la gêne occasionnée</value></data>
<data name="Remember me"><value>Se souvenir du mot de passe</value></data>
<data name="Remove"><value>Supprimer</value></data>
<data name="Remove my professional profile"><value>Supprimer mon profile professionnel</value></data>
<data name="Role"><value>Rôle</value></data>
<data name="Reset Password"><value>Ré-initialiser votre mot de passe</value></data>
<data name="Reset password confirmation"><value>Confirmation de ré-initialiser du mot de passe</value></data>
<data name="role created"><value>Rôle créé</value></data>
<data name="RoleName"><value>Nom du rôle </value></data>
<data name="Save these settings"><value>Save these settings</value></data>
<data name="Search"><value>Chercher</value></data>
<data name="Select a Google calendar"><value>Selectioner un calendrier Google</value></data>
<data name="Send"><value>Envoyer</value></data>
<data name="Send a private message"><value>Envoyer un message privé</value></data>
<data name="Send a public message"><value>Envoyer un message publique</value></data>
<data name="Set"><value>Positioner</value></data>
<data name="SettingsClass"><value>Classe du paramétrage</value></data>
<data name="SiteSkills"><value>Talents/Compétences/Spécialités gérés sur ce site</value></data>
<data name="Skill"><value>Compétence</value></data>
<data name="Skills"><value>Talents/Compétences/Spécialités</value></data>
<data name="SomeoneAskingYouForAnEstimate"><value>{0} désirerait un devis concernant {1}</value></data>
<data name="Sound"><value>Son</value></data>
<data name="SpecifyLatitude"><value>Specify a latitude</value></data>
<data name="SpecifyLongitude"><value>Specify a longitude</value></data>
<data name="SpecifyPlace"><value>S'il vous plait, veuillez spécifier un lieu.</value></data>
<data name="Specifyavalidlatitude"><value>Please, specify a valid latitude.</value></data>
<data name="StartDate"><value>Date de début</value></data>
<data name="StartDateAfterEndDate"><value>La date de fin doit être postérieure à la date de début.</value></data>
<data name="StartHour"><value>Heure de début</value></data>
<data name="Submit"><value>Soumettre</value></data>
<data name="SubmitChanges"><value>Envoyer les modifications</value></data>
<data name="Tag"><value>Tag</value></data>
<data name="Tag name"><value>Nom du tag</value></data>
<data name="Tex version"><value>Version LaTeX</value></data>
<data name="ThisSiteUsesCookies"><value>Ce site utilise les cookies</value></data>
<data name="ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailableThis"><value>Selon son calendier Google, ce perstataire est disponbile ce</value></data>
<data name="ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailableThis"><value>Selon son calendier Google, ce perstataire pourrait ne pas être disponible ce</value></data>
<data name="ThisPerformerDoesntGiveAccessToHisCalendar"><value>Ce prestataire n'a pas mis de calendrier à disposition.</value></data>
<data name="Title"><value>Titre</value></data>
<data name="to"><value>à</value></data>
<data name="TwoFactorAuthentication"><value>Double identification</value></data>
<data name="UserActivity"><value>Activité Utilisateur</value></data>
<data name="Unitary_cost"><value>Coût unitaire</value></data>
<data name="Unregister"><value>Se désinscrire</value></data>
<data name="Use a local account to log in"><value>Utiliser un compte local pour se connecter</value></data>
<data name="Use another service to log in"><value>Utiliser un autre service pour se connecter</value></data>
<data name="User List"><value>Liste des utilisateurs</value><comment></comment></data>
<data name="UserName"><value>Nom d'utilisateur</value></data>
<data name="UsersInRole"><value>Liste des utilisateurs assumant le rôle "{0}"</value></data>
<data name="UserSkills"><value>Talents/compétences/spécialités utilisateur</value></data>
<data name="UserNotInThisRole"><value>Le rôle demandé n'est pas assumé par ce préstataire</value></data>
<data name="View_source"><value>Voir le texte source de l'article</value></data>
<data name="was_added_to_the_role"><value>a été ajouté au rôle</value></data>
<data name="was_added_to_the_empty_role"><value>Il n'y avait pas d'utilisateur dans le rôle "{1}". Vous ({0}) avez été ajouté au rôle "{1}".</value></data>
<data name="Welcome"><value>Bienvenue</value><comment></comment></data>
<data name="XHasBeenNotified"><value>{0} à été notifié de votre demande, vous devriez être contacté rapidement</value></data>
<data name="Xshouldbeavailable"><value>Au vu de son calendrier,
{0} devrait être disponible pour ce rendez-vous</value></data>
<data name="Yavsc.Models.Booking.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Booking.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Booking.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Booking.Profiles.GeneralSettings"><value>Paramètres généraux: une couleur musicale</value></data>
<data name="Yes"><value>Oui</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>Vous devez vous authentifier pour pouvoir demander un devis
à un préstataire.</value></data>
<data name="younotadmin"><value>Vous n'êtes pas administrateur</value></data>
<data name="Your book query"><value>Votre demande de rendez-vous</value></data>
<data name="Your password has been reset."><value>Votre mote de passe a été mis à jour.</value></data>
<data name="YourEstimates"><value>Vos Devis</value></data>
<data name="YourMEACode"><value>Votre activité</value></data>
<data name="YourNeed"><value>Votre besoin</value></data>
<data name="yourquerytransmitted"><value>Votre demande a été transmise</value></data>
<data name="YourSkills"><value>Vos talents, vos spécialités, le domaine de vos activités</value></data>
<data name="Your posts"><value>Vos publications</value></data>
<data name="Your profile"><value>Votre profile</value></data>
<data name="YourMessageHasBeenSent"><value>Votre messge a été envoyé</value></data>
<data name="Tell more, below, about your query"><value>Dites en plus, ci àprès, à propos de cet évennement</value></data>
</root>

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNet.Builder;
namespace Yavsc
{
public partial class Startup
{
/// <summary>
/// Lists Available user profile classes.
/// </summary>
public static Dictionary<string,Type> ProfileTypes = new Dictionary<string,Type>() ;
private void ConfigureWorkflow(IApplicationBuilder app, SiteSettings settings)
{
System.AppDomain.CurrentDomain.ResourceResolve += OnYavscResourceResolve;
foreach (var a in System.AppDomain.CurrentDomain.GetAssemblies()) {
foreach (var c in a.GetTypes()) {
if (c.IsClass && !c.IsAbstract &&
c.GetInterface("ISpecializationSettings")!=null) {
ProfileTypes.Add(c.FullName,c);
}
}
}
}
public static System.Reflection.Assembly OnYavscResourceResolve (object sender, ResolveEventArgs ev)
{
return AppDomain.CurrentDomain.GetAssemblies()[0];
}
}
}

View File

@ -235,6 +235,8 @@ namespace Yavsc
ILoggerFactory loggerFactory)
{
SiteSetup = siteSettings.Value;
Authority = siteSettings.Value.Authority;
Audience = siteSettings.Value.Audience;
Startup.UserFilesDirName = new DirectoryInfo(siteSettings.Value.UserFiles.Blog).FullName;
Startup.UserBillsDirName = new DirectoryInfo(siteSettings.Value.UserFiles.Bills).FullName;
Startup.Temp = siteSettings.Value.TempDir;
@ -328,13 +330,12 @@ namespace Yavsc
options.AutomaticAuthentication = false;
});
Authority = siteSettings.Value.Authority;
Audience = siteSettings.Value.Audience;
ConfigureOAuthApp(app, siteSettings.Value);
ConfigureFileServerApp(app, siteSettings.Value, env, authorizationService);
ConfigureWebSocketsApp(app, siteSettings.Value, env);
ConfigureOAuthApp(app, SiteSetup);
ConfigureFileServerApp(app, SiteSetup, env, authorizationService);
ConfigureWebSocketsApp(app, SiteSetup, env);
ConfigureWorkflow(app, SiteSetup);
app.UseRequestLocalization(localizationOptions.Value, (RequestCulture) new RequestCulture((string)"en"));
app.UseMvc(routes =>

View File

@ -0,0 +1,13 @@
namespace Yavsc.ViewModels.FrontOffice
{
public class FrontOfficeIndexViewModel
{
public int EstimateToProduceCount { get; set; }
public int EstimateToSignAsProCount { get; set; }
public int EstimateToSignAsCliCount { get; set; }
public int BillToSignAsProCount { get; set; }
public int BillToSignAsCliCount { get; set; }
public int NewPayementsCount { get; set; }
}
}

View File

@ -1,6 +1,6 @@
namespace Yavsc.ViewModels.Manage
{
using Model.Bank;
using Models.Bank;
public class AddBankInfoViewModel
{
public BankIdentity Data{get; private set; }

View File

@ -3,7 +3,7 @@ using Microsoft.AspNet.Identity;
namespace Yavsc.ViewModels.Manage
{
using Model.Bank;
using Models.Bank;
using Models;
using Models.Workflow;
public class IndexViewModel

View File

@ -12,21 +12,23 @@
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Code" class="col-md-2 control-label"></label>
<label asp-for="Code" class="col-md-2 control-label">@SR["Code"]</label>
<div class="col-md-10">
<input asp-for="Code" class="form-control" />
<span asp-validation-for="Code" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Name" class="col-md-2 control-label"></label>
<label asp-for="Name" class="col-md-2 control-label">
@SR["Name"]</label>
<div class="col-md-10">
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Parent" class="col-md-2 control-label"></label>
<label asp-for="Parent" class="col-md-2 control-label">
@SR["Parent"]</label>
<div class="col-md-10">
<select asp-for="ParentCode" asp-items=@ViewBag.ParentCode class="form-control" >
</select>
@ -34,19 +36,35 @@
</div>
</div>
<div class="form-group">
<label asp-for="Description" class="col-md-2 control-label"></label>
<label asp-for="Description" class="col-md-2 control-label">
@SR["Description"]</label>
<div class="col-md-10">
<input asp-for="Description" class="form-control" />
<span asp-validation-for="Description" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Photo" class="col-md-2 control-label"></label>
<label asp-for="Photo" class="col-md-2 control-label">
@SR["Photo"]
</label>
<div class="col-md-10">
<input asp-for="Photo" class="form-control" />
<span asp-validation-for="Photo" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="SettingsClassName" class="col-md-2 control-label">
@SR["SettingsClass"]
</label>
<div class="col-md-10">
<select asp-for="SettingsClassName" class="form-control" asp-items="@ViewBag.SettingsClassName">
</select>
<span asp-validation-for="SettingsClassName" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />

View File

@ -47,6 +47,16 @@
</span>
</div>
</div>
<div class="form-group">
<label asp-for="SettingsClassName" class="col-md-2 control-label">
@SR["SettingsClass"]
</label>
<div class="col-md-10">
<select asp-for="SettingsClassName" class="form-control" asp-items="@ViewBag.SettingsClassName">
</select>
<span asp-validation-for="SettingsClassName" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />

View File

@ -15,7 +15,7 @@
@Html.DisplayNameFor(model => model.Code)
</th>
<th>
@Html.DisplayNameFor(model => model.Name)
@SR["Name"]
</th>
<th>
@ -25,9 +25,11 @@
@Html.DisplayNameFor(model => model.Photo)
</th>
<th>
@Html.DisplayNameFor(model => model.Children)
@Html.DisplayNameFor(model => model.Parent)
</th>
<th>
@SR["SettingsClass"]
</th>
<th></th>
</tr>
@foreach (var item in Model) {
@ -41,8 +43,23 @@
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>@if (item.Photo!=null) {
<img src="@item.Photo" style="max-height: 4em;" />
}
</td>
<td>
@Html.DisplayFor(modelItem => item.Photo)
@if (item.Parent!=null) {
<text>
@Html.DisplayFor(modelItem => item.Parent)
</text>
}
</td>
<td>
@if (item.SettingsClassName!=null) {
<text>
@SR[item.SettingsClassName]
</text>
}
</td>
<td>
@Html.DisplayFor(modelItem => item.Children)

View File

@ -0,0 +1,42 @@
@model Yavsc.Models.Workflow.CoWorking
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<form asp-action="Create">
<div class="form-horizontal">
<h4>CoWorking</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="PerformerId" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="PerformerId" class ="form-control" asp-items=@ViewBag.PerformerId></select>
</div>
</div>
<div class="form-group">
<label asp-for="WorkingForId" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="WorkingForId" class ="form-control" asp-items=@ViewBag.WorkingForId></select>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
}

View File

@ -0,0 +1,22 @@
@model Yavsc.Models.Workflow.CoWorking
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>CoWorking</h4>
<hr />
<dl class="dl-horizontal">
</dl>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</div>
</form>
</div>

View File

@ -0,0 +1,18 @@
@model Yavsc.Models.Workflow.CoWorking
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>CoWorking</h4>
<hr />
<dl class="dl-horizontal">
</dl>
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</p>

View File

@ -0,0 +1,45 @@
@model Yavsc.Models.Workflow.CoWorking
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<form asp-action="Edit">
<div class="form-horizontal">
<h4>CoWorking</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="PerformerId" class="control-label col-md-2">PerformerId</label>
<div class="col-md-10">
<select asp-for="PerformerId" class="form-control" />
<span asp-validation-for="PerformerId" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="WorkingForId" class="control-label col-md-2">WorkingForId</label>
<div class="col-md-10">
<select asp-for="WorkingForId" class="form-control" />
<span asp-validation-for="WorkingForId" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
}

View File

@ -0,0 +1,26 @@
@model IEnumerable<Yavsc.Models.Workflow.CoWorking>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<tr>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</table>

View File

@ -1,7 +1,7 @@
@model BookQuery
@using Yavsc.Models.Google.Messaging
@{
ViewData["Title"] = SR["Command confirmation"]+" "+SR[Model.PerformerProfile.ActivityCode];
ViewData["Title"] = SR["Command confirmation"]+" "+ViewBag.Activity.Name;
}
<h2>@ViewData["Title"]</h2>
<div class="form-horizontal">

View File

@ -1,15 +1,11 @@
@model BookQuery
@{
ViewData["Title"] = SR["Book "+Model.PerformerProfile.ActivityCode];
}
@section header{
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
@model BookQuery
@{ ViewData["Title"] = SR["Book "+ViewBag.Activity.Code]; }
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
@section header {
<style>
#map {
width: 100%;
@ -22,99 +18,98 @@
text-decoration: underline;
}
</style>
}
}
@section scripts{
<script>
$(document).ready(function(){
var config = {
mapId: 'map',
addrId: 'Location_Address',
longId: 'Location_Longitude',
latId: 'Location_Latitude',
addrValidationId: 'valloc',
formValidId: 'valsum',
locComboId: 'loccomb'
};
$(document).ready(function () {
$.validator.setDefaults({
messages: {
remote: "Ce lieu n'est pas identifié par les services de géo-localisation Google",
required: "Veuillez renseigner ce champ"
}
});
var gmap = new google.maps.Map(document.getElementById(config.mapId), {
zoom: 16,
center: { lat: 48.862854, lng: 2.2056466 }
});
var marker;
function chooseLoc(sender,loc) {
if (sender === 'user') $('#'+config.addrId).val(loc.formatted_address);
var pos = loc.geometry.location;
var lat = new Number(pos.lat);
var lng = new Number(pos.lng);
$('#'+config.latId).val(lat.toLocaleString('en'));
$('#'+config.longId).val(lng.toLocaleString('en'));
gmap.setCenter(pos);
if (marker) { 
marker.setMap(null);
}
marker = new google.maps.Marker({
map: gmap,
draggable: true,
animation: google.maps.Animation.DROP,
position: pos
});
google.maps.event.addListener(marker, 'dragend', function() {
// TODO reverse geo code
var pos = marker.getPosition();
$('#'+config.latId).val(pos.lat);
$('#'+config.longId).val(pos.lng);
var config = {
mapId: 'map',
addrId: 'Location_Address',
longId: 'Location_Longitude',
latId: 'Location_Latitude',
addrValidationId: 'valloc',
formValidId: 'valsum',
locComboId: 'loccomb'
};
$.validator.setDefaults({
messages: {
remote: "Ce lieu n'est pas identifié par les services de géo-localisation Google",
required: "Veuillez renseigner ce champ"
}
});
$('#'+config.addrId).valid();
$('#'+config.addrValidationId).empty();
$('#'+config.formValidId).empty();
return true;
}
$('#EventDate').datepicker({language:'fr'});
var gmap = new google.maps.Map(document.getElementById(config.mapId), {
zoom: 16,
center: { lat: 48.862854, lng: 2.2056466 }
});
var marker;
function chooseLoc(sender, loc) {
if (sender === 'user') $('#' + config.addrId).val(loc.formatted_address);
var pos = loc.geometry.location;
var lat = new Number(pos.lat);
var lng = new Number(pos.lng);
$('#' + config.latId).val(lat.toLocaleString('en'));
$('#' + config.longId).val(lng.toLocaleString('en'));
gmap.setCenter(pos);
if (marker) {
marker.setMap(null);
}
marker = new google.maps.Marker({
map: gmap,
draggable: true,
animation: google.maps.Animation.DROP,
position: pos
});
google.maps.event.addListener(marker, 'dragend', function () {
// TODO reverse geo code
var pos = marker.getPosition();
$('#' + config.latId).val(pos.lat);
$('#' + config.longId).val(pos.lng);
});
$('#' + config.addrId).valid();
$('#' + config.addrValidationId).empty();
$('#' + config.formValidId).empty();
return true;
}
$('#'+config.addrId).rules("add",
{
remote: {
url: 'https://maps.googleapis.com/maps/api/geocode/json',
type: 'get',
data: {
sensor: false,
address: function () { return $('#'+config.addrId).val() }
},
dataType: 'json',
dataFilter: function(datastr,type) {
$('#'+config.locComboId).html("");
var data = JSON.parse(datastr);
data.results.forEach(function(element) {
if (element.formatted_address !== $('#'+config.addrId).val()) {
$('<li>'+element.formatted_address+'</li>')
.data("geoloc",element)
.click(function() { chooseLoc('user',$(this).data("geoloc")) })
.appendTo($('#'+config.locComboId));}
else { }
});
if ((data.status === 'OK') && (data.results.length == 1))
{
chooseLoc('google',data.results[0]);
return true;
}
return false;
},
error: function(xhr, textStatus, errorThrown)
{
console.log('ajax loading error ... '+textStatus+' ... '+ errorThrown);
return false;
$('#EventDate').datepicker({ language: 'fr' });
$('#' + config.addrId).rules("add",
{
remote: {
url: 'https://maps.googleapis.com/maps/api/geocode/json',
type: 'get',
data: {
sensor: false,
address: function () {  return $('#' + config.addrId).val() }
},
dataType: 'json',
dataFilter: function (datastr, type) {
$('#' + config.locComboId).html("");
var data = JSON.parse(datastr);
data.results.forEach(function (element) {
if (element.formatted_address !== $('#' + config.addrId).val()) {
$('<li>' + element.formatted_address + '</li>')
.data("geoloc", element)
.click(function () { chooseLoc('user', $(this).data("geoloc")) })
.appendTo($('#' + config.locComboId));
}
else { }
});
if ((data.status === 'OK') && (data.results.length == 1)) {
chooseLoc('google', data.results[0]);
return true;
}
return false;
},
error: function (xhr, textStatus, errorThrown) {
console.log('ajax loading error ... ' + textStatus + ' ... ' + errorThrown);
return false;
}
}
}
});
});
});
</script>
}
<h2>@ViewData["Title"]</h2>
@ -122,78 +117,84 @@ $(document).ready(function(){
<div class="form-horizontal">
<h4>@SR["Fill in your book query"]</h4>
<hr />
<div asp-validation-summary="ValidationSummary.All" class="text-danger" id="valsum"></div>
<div asp-validation-summary="ValidationSummary.All" class="text-danger" id="valsum"></div>
<div class="form-group" has-feedback>
<fieldset>
<legend><label for="EventDate" class="col-md-2 control-label" >
@SR["Event date"]
</label></legend>
<div class="col-md-10">
<div class="container">
<div class="row">
<div class='col-sm-6'>
<div class='input-group date' id='datetimepicker2'>
<input class="form-control" name="EventDate"/>
<span class="input-group-addon">
<fieldset>
<legend>Votre évennement</legend>
<label for="EventDate" class="col-md-2 control-label">
@SR["Event date"]
</label>
<div class="col-md-10">
<div class="container">
<div class="row">
<div class='col-sm-6'>
<div class='input-group date' id='datetimepicker2'>
<input class="form-control" name="EventDate" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</span>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker2').datetimepicker({
locale: 'fr',
format: "YYYY/MM/DD hh:mm"
});
});
</script>
<span asp-validation-for="EventDate" class="text-danger">
</span>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker2').datetimepicker({
locale: 'fr',
format : "YYYY/MM/DD hh:mm"
});
});
</script>
<span asp-validation-for="EventDate" class="text-danger" >
</span>
</div>
</div>
</div>
</fieldset>
</div>
<div class="form-group" has-feedback>
<fieldset>
<legend><label for="Location_Address" class="col-md-2 control-label">
<label for="Location_Address" class="col-md-2 control-label">
@SR["Location"]
</label>
</legend>
<div class="col-md-10">
<input asp-for="Location.Address" type="text" name="Location.Address" id="Location_Address"
class="form-control" data-val-required=@SR["SpecifyPlace"]
data-val-remote=@SR["GoogleDidntGeoLocalized"]>
<span asp-validation-for="Location.Address" class="text-danger" id="valloc" ></span>
<ul id="loccomb" >
</ul>
<div id="map"></div>
</div>
@Html.HiddenFor(model=>model.Location.Latitude)
@Html.HiddenFor(model=>model.Location.Longitude)
</fieldset>
<div class="col-md-10">
<div class="container">
<div class="row">
<div class='col-sm-6'>
<div >
<input asp-for="Location.Address" type="text" name="Location.Address" id="Location_Address" class="form-control" data-val-required=@SR[
"SpecifyPlace"] data-val-remote=@SR[ "GoogleDidntGeoLocalized"]>
<span asp-validation-for="Location.Address" class="text-danger" id="valloc"></span>
<ul id="loccomb">
</ul>
<div id="map"></div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="@SR["Create"]" class="btn btn-default" />
</div>
</div>
@Html.HiddenFor(model=>model.Client.Id)
@Html.HiddenFor(model=>model.PerformerId)
</div>
<div class="form-group" has-feedback>
<fieldset>
<legend>
<label for="Reason" class="col-md-2 control-label">
</div>
</div>
</div>
<label for="Reason" class="col-md-2 control-label">
@SR["GiveAnExplicitReason"]
</label>
</legend>
<textarea rows="15" asp-for="Reason" type="text" name="Reason" id="Reason" maxlength="4096"
style="width:100%"></textarea>
<span asp-validation-for="Reason" class="text-danger"></span>
</fieldset>
<div class="col-md-10">
<div class="container">
<div class="row">
<div class='col-sm-6'>
<div id='reason1'>
<textarea rows="15" asp-for="Reason" type="text" name="Reason" id="Reason" maxlength="4096" class="form-control"></textarea>
<span asp-validation-for="Reason" class="text-danger"></span> @Html.HiddenFor(model=>model.Location.Latitude) @Html.HiddenFor(model=>model.Location.Longitude)
</div>
</div>
</div>
</div>
</div>
</fieldset>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="@SR[" Create "]" class="btn btn-default" />
</div>
</div>
@Html.HiddenFor(model=>model.Client.Id) @Html.HiddenFor(model=>model.PerformerId) @Html.HiddenFor(model=>model.ActivityCode)
</div>
</form>
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }

View File

@ -9,49 +9,7 @@
<div>
<h4>Command</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.EventDate)
</dt>
<dd>
@Html.DisplayFor(model => model.EventDate)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Client)
</dt>
<dd>
@Html.DisplayFor(model => model.Client.UserName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Location.Address)
</dt>
<dd>
@Html.DisplayFor(model => model.Location.Address)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PerformerProfile)
</dt>
<dd>
@Html.DisplayFor(model => model.PerformerProfile.Performer.UserName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ValidationDate)
</dt>
<dd>
@if (Model.ValidationDate==null) {
@SR["NotValidated"]
}
else {
@Html.DisplayFor(model => model.ValidationDate)
}
</dd>
</dl>
@Html.DisplayFor(m=>m)
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |

View File

@ -12,30 +12,21 @@
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<!-- <div class="form-group">
<label asp-for="UserId" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="UserId" asp-items=@ViewBag.UserId class ="form-control"></select>
</div>
</div> -->
<div class="form-group">
<label asp-for="UserId" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="UserId" asp-items=@ViewBag.UserId class ="form-control"></select>
</div>
</div>
<input type="hidden" asp-for="UserId" />
<div class="form-group">
<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>
<div class="form-group">
<label asp-for="Weight" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Weight" class ="form-control" />
<span asp-validation-for="Weight" class="text-danger" />
</div>
</div>
<div class="form-group">

View File

@ -11,16 +11,31 @@
<h4>UserActivity</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="DoesCode" class="col-md-2 control-label"></label>
<!-- <div class="form-group">
<label asp-for="UserId" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="DoesCode" class ="form-control"></select>
<select asp-for="UserId" asp-items=@ViewBag.UserId class ="form-control"></select>
</div>
</div>
</div> -->
<div class="form-group">
<label asp-for="UserId" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="UserId" class ="form-control"></select>
<select asp-for="UserId" asp-items=@ViewBag.UserId class ="form-control"></select>
</div>
</div>
<div class="form-group">
<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>
</div>
</div>
<div class="form-group">
<label asp-for="Weight" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Weight" class ="form-control" />
</div>
</div>
<div class="form-group">

View File

@ -14,6 +14,8 @@
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="UserId" />
<input type="hidden" asp-for="DoesCode" />
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>

View File

@ -1,18 +1,26 @@
@model Yavsc.Models.Workflow.UserActivity
@{
ViewData["Title"] = "Details";
ViewData["Title"] = SR["Details"];
}
<h2>Details</h2>
<h2>@ViewData["Title"]</h2>
<div>
<h4>UserActivity</h4>
<h4>Détails de votre activité @Model.DoesCode</h4>
<hr />
<dl class="dl-horizontal">
<dt>@SR["Activity"]</dt>
<dd> @Html.DisplayFor(m=>m.Does)
@if (ViewBag.HasConfigurableSettings) {
<a asp-controller="@ViewBag.SettingsClassControllerName" asp-action="Index" >
[@SR["Manage"] @SR[Model.Does.SettingsClassName]]
</a>
}
</dd>
</dl>
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Edit" asp-route-id="@Model.UserId" asp-route-activityCode="@Model.DoesCode">Edit</a> |
<a asp-action="Index">Back to List</a>
</p>

View File

@ -1,8 +1,5 @@
@model Yavsc.Models.Workflow.UserActivity
@{
ViewData["Title"] = "Edit";
}
@model Yavsc.Models.Workflow.UserActivity
@{ ViewData["Title"] = "Edit"; }
<h2>Edit</h2>
@ -10,19 +7,14 @@
<div class="form-horizontal">
<h4>UserActivity</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="DoesCode" class="control-label col-md-2">DoesCode</label>
<div class="col-md-10">
<select asp-for="DoesCode" class="form-control" />
<span asp-validation-for="DoesCode" class="text-danger" />
</div>
<input type="hidden" asp-for="UserId" />
<input type="hidden" asp-for="DoesCode" />
<div class="text-danger"> @Html.ValidationSummary()
</div>
<div class="form-group">
<label asp-for="Weight" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Weight" class ="form-control"></select>
<input asp-for="Weight" class="form-control"></input>
</div>
</div>
<div class="form-group">
@ -36,4 +28,3 @@
<div>
<a asp-action="Index">Back to List</a>
</div>

View File

@ -12,17 +12,19 @@
<table class="table">
<tr>
<th>@SR["Activity"]</th>
<th>@SR["Rate"]</th>
<th>@SR["Weight"]</th>
</tr>
@foreach (var item in Model) {
<tr>
<td> @item.Does.Name
</td>
<td> @item.Weight
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
<a asp-action="Edit" asp-route-id="@item.UserId" asp-route-activityCode="@item.DoesCode">Edit</a> |
<a asp-action="Details" asp-route-id="@item.UserId" asp-route-activityCode="@item.DoesCode">Details</a> |
<a asp-action="Delete" asp-route-id="@item.UserId" asp-route-activityCode="@item.DoesCode">Delete</a>
</td>
</tr>
}

View File

@ -0,0 +1,23 @@
@model Yavsc.Models.Booking.MusicianSettings
@{
ViewBag.YetAvailableInstruments = _context.Instrument.Where(i=> !_context.MusicianSettings.Any(s=>s.UserId==id && s.Instrumentation.Any(j=>j.Id == i.Id)))
.Select(k=>new SelectListItem { Text = k.Name });
}
<ul>
@foreach (var instrument in Model.Instrumentation)
{
<li>@instrument.Name
<a asp-action="RemoveInstrument" asp-controller="Instrumentation" asp-action-id="Model.UserId" asp-action-name="@instrument.Name" />
</li>
}
</ul>
<form asp-action="AddInstrument" asp-controller="Instrumentation" asp-action-id="Model.UserId" >
<select name="Name" value="" placeholder="Séléctionnez votre instrument" asp-items=@ViewBag.YetAvailableInstruments>
</select>
</form>

View File

@ -27,7 +27,7 @@
<div class="col-md-10">
<select name="CommandId" id="CommandId">
@foreach (var query in ViewBag.Queries) {
<option value="@query.Id" data-clientid="@query.ClientId">@query.GetDescription()</option>
<option value="@query.Id" data-clientid="@query.ClientId">@Html.DisplayFor(m=> query)</option>
}
</select>
<span asp-validation-for="ClientId" class="text-danger" />

View File

@ -9,35 +9,9 @@
<div>
<h4>Estimate</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Title)
</dt>
<dd>
@Html.DisplayFor(model => model.Title)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Description)
</dt>
<dd>
@Html.DisplayFor(model => model.Description)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Bill)
</dt>
<dd>
@foreach (var cl in Model.Bill) {
@await Html.PartialAsync("BillingLine", cl);
}
</dd>
</dl>
</div>
@Html.DisplayNameFor(model => model)
<p>
<a asp-action="Edit" asp-route-id="@Model.Id">@SR["Edit"]</a> |
<a asp-action="Index">@SR["Back to List"]</a>
</p>
<div>
@await Component.InvokeAsync("Estimate",Model.Id)
</div>

View File

@ -10,6 +10,7 @@
await Html.RenderPartialAsync("PerformerProfile", profile) ;
<form action="~/Command/Create" >
<input type="hidden" name="id" value="@profile.PerformerId" />
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
<input type="submit" value="@SR["Book "+ViewBag.Activity.Code]"/>
</form>
}

View File

@ -1,7 +1,38 @@
@model Yavsc.ViewModels.FrontOffice.FrontOfficeIndexViewModel
@{
ViewData["Title"] = "Front office";
}
<h2>Index</h2>
<dl class="dl-horizontal">
<dt>@SR["EstimateToProduce"]
</dt>
<dd>@Html.DisplayFor(m=>m.EstimateToProduceCount)
</dd>
<dt>@SR["EstimateToSignAsPro"]
</dt>
<dd>@Html.DisplayFor(m=>m.EstimateToSignAsProCount)
</dd>
<dt>@SR["EstimateToSignAsCli"]
</dt>
<dd>@Html.DisplayFor(m=>m.EstimateToSignAsCliCount)
</dd>
<dt>@SR["BillToSignAsPro"]
</dt>
<dd>@Html.DisplayFor(m=>m.BillToSignAsProCount)
</dd>
<dt>@SR["BillToSignAsCli"]
</dt>
<dd>@Html.DisplayFor(m=>m.BillToSignAsCliCount)
</dd>
<dt>@SR["PayementsDone"]
</dt>
<dd>@Html.DisplayFor(m=>m.NewPayementsCount)
</dd>
</dl>

View File

@ -4,61 +4,39 @@
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000">
<ol class="carousel-indicators">
@{
int i=0;
foreach (var act in Model) {
if (i==0) {
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
} else {
<li data-target="#myCarousel" data-slide-to="@i"></li>
}
i++;
}
}
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="~/images/booking/groupe_b2.jpg" alt="ASP.NET" class="img-responsive" />
<div class="carousel-inner" role="listbox">
@{
i=0;
foreach (var act in Model) {
string cls = (i==0) ? "item active":"item";
<div class="@cls">
<img src="@act.Photo" alt="@act.Name" class="img-responsive" />
<div class="carousel-caption">
<p><em>@act.Name</em><br/>
@act.Description </p>
<p>
Invitez un groupe musical à animer votre événement </p>
<p>
<a class="btn btn-default" asp-controller="FrontOffice" asp-action="Book" asp-route-id="IT">
En savoir plus
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/booking/concert_b2.jpg" alt="Visual Studio" class="img-responsive" />
<div class="carousel-caption">
<p>
Organisez un concert. </p>
<p>
<a class="btn btn-default" asp-controller="FrontOffice" asp-action="Book" asp-route-id="IT">
En savoir plus
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/booking/dj_b2.jpg" alt="Package Management" class="img-responsive" />
<div class="carousel-caption">
<p> Offrez-vous un anniversaire, un mariage Hip Hop </p>
<p>
<a class="btn btn-default" asp-controller="FrontOffice" asp-action="Book" asp-route-id="IT">
En savoir plus
</a>
</p>
</div>
</div>
<div class="item">
<img src="~/images/booking/mike_b2.jpg" alt="Microsoft Azure" class="img-responsive" />
<div class="carousel-caption">
<p>
Invitez votre chanteur à la fête </p>
<p>
<a class="btn btn-default" asp-controller="FrontOffice" asp-route-id="Book" >
<a class="btn btn-default" asp-controller="FrontOffice" asp-action="Book" asp-route-id="@act.Code">
En savoir plus
</a>
</p>
</div>
</div>
i++; }
}
</div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>

View File

@ -0,0 +1,40 @@
@model Yavsc.Models.Booking.Profiles.Instrumentation
@{
ViewBag.SettingLabel = SR["Yavsc.Models.Booking.Profiles.Instrumentation"];
ViewData["Title"] = SR[ViewBag.SettingLabel] + "[" +SR["Set"] + "]" ;
}
<h2>@ViewData["Title"]</h2>
<form asp-action="Create">
<div class="form-horizontal">
<h4></h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input asp-for="UserId" type="hidden">
<div class="form-group">
<div class="col-md-10">
@System.Globalization.CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(SR["nouvel instrument"])
<select asp-for="InstrumentId" asp-items=@ViewBag.YetAvailableInstruments>
</select>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
<script src="~/lib/jquery-validation/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
}

View File

@ -0,0 +1,24 @@
@model Yavsc.Models.Booking.Profiles.Instrumentation
@{
ViewBag.SettingLabel = SR["Yavsc.Models.Booking.Profiles.Instrumentation"];
ViewData["Title"] = SR[ViewBag.SettingLabel] + "[" +SR["Delete"] + "]" ;
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>MusicianSettings</h4>
<hr />
<dl class="dl-horizontal">
</dl>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</div>
</form>
</div>

View File

@ -0,0 +1,24 @@
@model Yavsc.Models.Booking.Profiles.Instrumentation
@{
ViewBag.SettingLabel = SR["Yavsc.Models.Booking.Profiles.Instrumentation"];
ViewData["Title"] = SR[ViewBag.SettingLabel] + "[" +SR["Details"] + "]" ;
}
@{
bool existingInstrument = Model.
}
<h2>Details</h2>
<div>
<h4>MusicianSettings</h4>
<hr />
<dl class="dl-horizontal">
<dt>Instruments</dt>
<dd>@Html.DisplayFor(m=>m.Instrumentation)</dd>
</dl>
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.UserId">Edit</a> |
<a asp-action="Index">Back to List</a>
</p>

View File

@ -0,0 +1,30 @@
@model Yavsc.Models.Booking.Profiles.Instrumentation
@{
ViewBag.SettingLabel = SR["Yavsc.Models.Booking.Profiles.Instrumentation"];
ViewData["Title"] = SR[ViewBag.SettingLabel] + "[" +SR["Edit"] + "]" ;
}
<h2>Edit</h2>
<form asp-action="Edit">
<div class="form-horizontal">
<h4>MusicianSettings</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="UserId" />
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
<script src="~/lib/jquery-validation/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
}

View File

@ -0,0 +1,28 @@
@model IEnumerable<Yavsc.Models.Booking.Profiles.Instrumentation>
@{
ViewBag.SettingLabel = SR["Yavsc.Models.Booking.Profiles.Instrumentation"];
ViewData["Title"] = SR[ViewBag.SettingLabel] + "[" +SR["Index"] + "]" ;
}
<h2>Index</h2>
<p>
<a asp-action="Create">@SR["Vous jouez d'un autre instrument'"]</a>
</p>
<table class="table">
<tr>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
<a asp-action="Edit" asp-route-id="@item.UserId">Edit</a> |
<a asp-action="Details" asp-route-id="@item.UserId">Details</a> |
<a asp-action="Delete" asp-route-id="@item.UserId">Delete</a>
</td>
</tr>
}
</table>

View File

@ -1,5 +1,5 @@
@model PerformerProfile
@{ ViewData["Title"] = "Setup your performer profile"; }
@{ ViewData["Title"] = SR["Your performer profile"]; }
@section header{
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial");
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
@ -103,17 +103,19 @@
});
</script>
}
<h2>@ViewData["Title"].</h2>
<h2>@ViewData["Title"]</h2>
@Html.DisplayFor(model => model)
<form id="FrmSetAct" asp-controller="Manage" asp-action="SetActivity" method="post" class="form-horizontal" role="form">
<h4>@SR["Choose below your main activity"]:</h4>
<h4>@SR["Setup below your activity parameters"]:</h4>
<hr />
<div asp-validation-summary="ValidationSummary.All" class="text-danger" id="valsum"></div>
<div class="form-group">
<label asp-for="AcceptNotifications" class="col-md-2 control-label"></label>
<label asp-for="AcceptNotifications" class="col-md-2 control-label">
@SR["AcceptNotifications"]
</label>
<div class="col-md-10">
<input asp-for="AcceptNotifications" class="form-control" />
<span asp-validation-for="AcceptNotifications" class="text-danger"></span>
@ -121,7 +123,7 @@
</div>
<div class="form-group">
<label asp-for="AcceptPublicContact" class="col-md-2 control-label"></label>
<label asp-for="AcceptPublicContact" class="col-md-2 control-label">@SR["AcceptPublicContact"]</label>
<div class="col-md-10">
<input asp-for="AcceptPublicContact" class="form-control" />
@ -130,16 +132,18 @@
</div>
<div class="form-group">
<label asp-for="AcceptGeoLocalization" class="col-md-2 control-label"></label>
<label asp-for="UseGeoLocalizationToReduceDistanceWithClients" class="col-md-2 control-label">
@SR["UseGeoLocalizationToReduceDistanceWithClients"]
</label>
<div class="col-md-10">
<input asp-for="AcceptGeoLocalization" class="form-control" />
<input asp-for="UseGeoLocalizationToReduceDistanceWithClients" class="form-control" />
<span asp-validation-for="AcceptGeoLocalization" class="text-danger"></span>
<span asp-validation-for="UseGeoLocalizationToReduceDistanceWithClients" class="text-danger"></span>
</div>
</div>
<div class="form-group">
<label asp-for="WebSite" class="col-md-2 control-label"></label>
<label asp-for="WebSite" class="col-md-2 control-label">@SR["WebSite"]</label>
<div class="col-md-10">
<input asp-for="WebSite" class="form-control" />
@ -148,7 +152,7 @@
</div>
<div class="form-group">
<label asp-for="MinDailyCost" class="col-md-2 control-label"></label>
<label asp-for="MinDailyCost" class="col-md-2 control-label">@SR["MinDailyCost"]</label>
<div class="col-md-10">
<input asp-for="MinDailyCost" class="form-control" />
@ -157,7 +161,7 @@
</div>
<div class="form-group">
<label asp-for="MaxDailyCost" class="col-md-2 control-label"></label>
<label asp-for="MaxDailyCost" class="col-md-2 control-label">@SR["MaxDailyCost"]</label>
<div class="col-md-10">
<input asp-for="MaxDailyCost" class="form-control" />
@ -166,7 +170,7 @@
</div>
<div class="form-group">
<label asp-for="Active" class="col-md-2 control-label"></label>
<label asp-for="Active" class="col-md-2 control-label">@SR["ActivateMyProSettings"]</label>
<div class="col-md-10">
<input asp-for="Active" class="form-control" />
@ -175,7 +179,7 @@
</div>
<div class="form-group">
<label asp-for="SIREN" class="col-md-2 control-label"></label>
<label asp-for="SIREN" class="col-md-2 control-label">@SR["SIREN"]</label>
<div class="col-md-10">
<input asp-for="SIREN" class="form-control" />
@ -184,7 +188,7 @@
</div>
<div class="form-group">
<label asp-for="OrganizationAddress.Address" class="col-md-2 control-label"></label>
<label asp-for="OrganizationAddress.Address" class="col-md-2 control-label">@SR["Address"]</label>
<div class="col-md-10">
<input asp-for="OrganizationAddress.Address" class="form-control" type="text" />
@ -195,11 +199,11 @@
</div>
</div>
@Html.Hidden("OrganizationAddress.Latitude") @Html.Hidden("OrganizationAddress.Longitude") @Html.Hidden("PerformerId")
<button type="submit" class="btn btn-default">Save these settings</button>
<button type="submit" class="btn btn-default">@SR["Save these settings"]</button>
</form>
<form asp-controller="Manage" asp-action="UnsetActivity" method="post" class="form-horizontal" role="form">
@Html.Hidden("PerfomerId")
<button type="submit" class="btn btn-default">Remove my professional profile</button>
<button type="submit" class="btn btn-default">@SR["UnsetActivity"]</button>
</form>

View File

@ -0,0 +1,4 @@
@model Activity
<div class="activity">
<b title="@Model.Description" style="cursor:alias;">@Html.DisplayFor(m=>m.Name)</b>
</div>

View File

@ -0,0 +1,45 @@
@model BookQuery
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.EventDate)
</dt>
<dd>
@Html.DisplayFor(model => model.EventDate)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Client)
</dt>
<dd>
@Html.DisplayFor(model => model.Client.UserName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Location.Address)
</dt>
<dd>
@Html.DisplayFor(model => model.Location.Address)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PerformerProfile)
</dt>
<dd>
@Html.DisplayFor(model => model.PerformerProfile.Performer.UserName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ValidationDate)
</dt>
<dd>
@if (Model.ValidationDate==null) {
@SR["NotValidated"]
}
else {
@Html.DisplayFor(model => model.ValidationDate)
}
</dd>
</dl>

View File

@ -0,0 +1,27 @@
@model Estimate
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Title)
</dt>
<dd>
@Html.DisplayFor(model => model.Title)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Description)
</dt>
<dd>
@Html.DisplayFor(model => model.Description)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Bill)
</dt>
<dd>
@foreach (var cl in Model.Bill) {
@await Html.PartialAsync("BillingLine", cl);
}
</dd>
</dl>
</div>
@await Component.InvokeAsync("Estimate",Model.Id)

View File

@ -0,0 +1,41 @@
@model PerformerProfile
<div class="performer @(Model.Active?"active":"inactive")">
<img src="~/Avatars/@(Model.Performer?.UserName).xs.png" 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.Performer != null) {
@if (Model.Performer.Posts!=null) {
<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

@ -5,3 +5,4 @@ dnx gen controller -outDir ApiControllers -api -dc ApplicationDbContext -m "$1"
# dnx gen controller -outDir Controllers -dc ApplicationDbContext -udl -m {model} -name {name}Controller
# dnx gen controller -outDir Controllers -dc ApplicationDbContext -udl -m Yavsc.Models.Booking.MusicianSettings -name InstrumentationController -async -scripts

View File

@ -18,6 +18,9 @@
"resource": [
"Resources/**/*.resx"
],
"namedResource": {
"Localisation": "Resources/Yavsc.Resources.YavscLocalisation.resx"
},
"configurations": {
"Debug": {
"compilationOptions": {
@ -143,7 +146,7 @@
"postpack": "echo after packing",
"prerestore": "echo before restoring packages",
"postrestore": "echo after restoring packages",
"prepublish": "gulp min",
"prepublish": "echo before publishing",
"postpublish": "echo \" . ./contrib/postPublish.sh # to push in prod.\""
},
"embed": "Views/**/*.cshtml",

View File

@ -1456,18 +1456,21 @@ dd {
margin-left: 0;
}
@media (min-width: 768px) {
.dl-horizontal dt {
float: left;
width: 160px;
width: 45%;
overflow: hidden;
clear: left;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 2em;
}
.dl-horizontal dd {
margin-left: 180px;
margin-left: 10%;
}
}
abbr[title],
abbr[data-original-title] {
@ -6455,7 +6458,6 @@ button.close {
margin: 1px;
text-indent: -999px;
cursor: pointer;
background-color: #000 \9;
background-color: rgba(0, 0, 0, 0);
border: 1px solid #fff;
border-radius: 10px;

View File

@ -77,3 +77,7 @@ footer {
font-style: italic;
font-size: smaller;
}
.activity {
border-style: groove none none groove;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,7 @@
namespace YavscLib
{
public interface ISpecializationSettings
{
string UserId { get ; set ; }
}
}