une commande de coupe de cheveux
This commit is contained in:
@ -8,7 +8,8 @@ namespace Yavsc
|
|||||||
CompanyClaimType = "https://schemas.pschneider.fr/identity/claims/Company",
|
CompanyClaimType = "https://schemas.pschneider.fr/identity/claims/Company",
|
||||||
UserNameRegExp = @"^[a-zA-Z][a-zA-Z0-9 ]*$",
|
UserNameRegExp = @"^[a-zA-Z][a-zA-Z0-9 ]*$",
|
||||||
AuthorizePath = "~/authorize",
|
AuthorizePath = "~/authorize",
|
||||||
TokenPath = "~/token", LoginPath = "~/signin",
|
TokenPath = "~/token",
|
||||||
|
LoginPath = "~/signin",
|
||||||
LogoutPath = "~/signout", UserInfoPath = "~/api/me",
|
LogoutPath = "~/signout", UserInfoPath = "~/api/me",
|
||||||
ApplicationAuthenticationSheme = "ServerCookie",
|
ApplicationAuthenticationSheme = "ServerCookie",
|
||||||
ExternalAuthenticationSheme= "ExternalCookie",
|
ExternalAuthenticationSheme= "ExternalCookie",
|
||||||
|
@ -21,6 +21,7 @@ namespace Yavsc.Controllers
|
|||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Yavsc.Extensions;
|
using Yavsc.Extensions;
|
||||||
using Yavsc.Models.Haircut;
|
using Yavsc.Models.Haircut;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
public class HairCutCommandController : CommandController
|
public class HairCutCommandController : CommandController
|
||||||
{
|
{
|
||||||
@ -40,10 +41,10 @@ namespace Yavsc.Controllers
|
|||||||
|
|
||||||
[HttpPost, Authorize]
|
[HttpPost, Authorize]
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> CreateHairCutQuery(HairCutQuery command)
|
public async Task<IActionResult> CreateHairCutQuery(HairCutQuery model)
|
||||||
{
|
{
|
||||||
var uid = User.GetUserId();
|
var uid = User.GetUserId();
|
||||||
var prid = command.PerformerId;
|
var prid = model.PerformerId;
|
||||||
if (string.IsNullOrWhiteSpace(uid)
|
if (string.IsNullOrWhiteSpace(uid)
|
||||||
|| string.IsNullOrWhiteSpace(prid))
|
|| string.IsNullOrWhiteSpace(prid))
|
||||||
throw new InvalidOperationException(
|
throw new InvalidOperationException(
|
||||||
@ -53,39 +54,43 @@ namespace Yavsc.Controllers
|
|||||||
u => u.Performer
|
u => u.Performer
|
||||||
).Include(u => u.Performer.Devices)
|
).Include(u => u.Performer.Devices)
|
||||||
.FirstOrDefault(
|
.FirstOrDefault(
|
||||||
x => x.PerformerId == command.PerformerId
|
x => x.PerformerId == model.PerformerId
|
||||||
);
|
);
|
||||||
var user = await _userManager.FindByIdAsync(uid);
|
model.PerformerProfile = pro;
|
||||||
command.Client = user;
|
|
||||||
command.ClientId = uid;
|
|
||||||
command.PerformerProfile = pro;
|
|
||||||
// FIXME Why!!
|
// FIXME Why!!
|
||||||
// ModelState.ClearValidationState("PerformerProfile.Avatar");
|
// ModelState.ClearValidationState("PerformerProfile.Avatar");
|
||||||
// ModelState.ClearValidationState("Client.Avatar");
|
// ModelState.ClearValidationState("Client.Avatar");
|
||||||
// ModelState.ClearValidationState("ClientId");
|
// ModelState.ClearValidationState("ClientId");
|
||||||
ModelState.MarkFieldSkipped("ClientId");
|
|
||||||
|
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
var existingLocation = _context.Locations.FirstOrDefault( x=>x.Address == command.Location.Address
|
if (model.Location!=null) {
|
||||||
&& x.Longitude == command.Location.Longitude && x.Latitude == command.Location.Latitude );
|
var existingLocation = await _context.Locations.FirstOrDefaultAsync( x=>x.Address == model.Location.Address
|
||||||
|
&& x.Longitude == model.Location.Longitude && x.Latitude == model.Location.Latitude );
|
||||||
|
|
||||||
if (existingLocation!=null) {
|
if (existingLocation!=null) {
|
||||||
command.Location=existingLocation;
|
model.Location=existingLocation;
|
||||||
}
|
}
|
||||||
else _context.Attach<Location>(command.Location);
|
else _context.Attach<Location>(model.Location);
|
||||||
|
}
|
||||||
|
var existingPrestation = await _context.HairPrestation.FirstOrDefaultAsync( x=> model.PrestationId == x.Id );
|
||||||
|
|
||||||
_context.HairCutQueries.Add(command, GraphBehavior.IncludeDependents);
|
if (existingPrestation!=null) {
|
||||||
_context.SaveChanges(User.GetUserId());
|
model.Prestation = existingPrestation;
|
||||||
|
}
|
||||||
|
else _context.Attach<HairPrestation>(model.Prestation);
|
||||||
|
|
||||||
var yaev = command.CreateEvent(_localizer);
|
_context.HairCutQueries.Add(model);
|
||||||
|
await _context.SaveChangesAsync(User.GetUserId());
|
||||||
|
var brusherProfile = await _context.BrusherProfile.SingleAsync(p=>p.UserId == pro.PerformerId);
|
||||||
|
var yaev = model.CreateEvent(_localizer);
|
||||||
MessageWithPayloadResponse grep = null;
|
MessageWithPayloadResponse grep = null;
|
||||||
|
|
||||||
if (pro.AcceptPublicContact)
|
if (pro.AcceptPublicContact)
|
||||||
{
|
{
|
||||||
if (pro.AcceptNotifications) {
|
if (pro.AcceptNotifications) {
|
||||||
if (pro.Performer.Devices.Count > 0) {
|
if (pro.Performer.Devices.Count > 0) {
|
||||||
var regids = command.PerformerProfile.Performer
|
var regids = model.PerformerProfile.Performer
|
||||||
.Devices.Select(d => d.GCMRegistrationId);
|
.Devices.Select(d => d.GCMRegistrationId);
|
||||||
grep = await _GCMSender.NotifyHairCutQueryAsync(_googleSettings,regids,yaev);
|
grep = await _GCMSender.NotifyHairCutQueryAsync(_googleSettings,regids,yaev);
|
||||||
}
|
}
|
||||||
@ -94,12 +99,12 @@ namespace Yavsc.Controllers
|
|||||||
// if (grep==null || grep.success<=0 || grep.failure>0)
|
// if (grep==null || grep.success<=0 || grep.failure>0)
|
||||||
ViewBag.GooglePayload=grep;
|
ViewBag.GooglePayload=grep;
|
||||||
if (grep!=null)
|
if (grep!=null)
|
||||||
_logger.LogWarning($"Performer: {command.PerformerProfile.Performer.UserName} success: {grep.success} failure: {grep.failure}");
|
_logger.LogWarning($"Performer: {model.PerformerProfile.Performer.UserName} success: {grep.success} failure: {grep.failure}");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _emailSender.SendEmailAsync(
|
await _emailSender.SendEmailAsync(
|
||||||
_siteSettings, _smtpSettings,
|
_siteSettings, _smtpSettings,
|
||||||
command.PerformerProfile.Performer.Email,
|
model.PerformerProfile.Performer.Email,
|
||||||
yaev.Topic+" "+yaev.Sender,
|
yaev.Topic+" "+yaev.Sender,
|
||||||
$"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n{yaev.EventDate}\r\n"
|
$"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n{yaev.EventDate}\r\n"
|
||||||
);
|
);
|
||||||
@ -107,16 +112,19 @@ namespace Yavsc.Controllers
|
|||||||
else {
|
else {
|
||||||
// TODO if (AcceptProContact) try & find a bookmaker to send him this query
|
// TODO if (AcceptProContact) try & find a bookmaker to send him this query
|
||||||
}
|
}
|
||||||
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
|
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == model.ActivityCode);
|
||||||
ViewBag.GoogleSettings = _googleSettings;
|
ViewBag.GoogleSettings = _googleSettings;
|
||||||
return View("CommandConfirmation",command);
|
var addition = model.Prestation.Addition(brusherProfile);
|
||||||
|
ViewBag.Addition = addition.ToString("C",CultureInfo.CurrentUICulture);
|
||||||
|
return View("CommandConfirmation",model);
|
||||||
}
|
}
|
||||||
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
|
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == model.ActivityCode);
|
||||||
ViewBag.GoogleSettings = _googleSettings;
|
ViewBag.GoogleSettings = _googleSettings;
|
||||||
return View(command);
|
SetViewData(model.ActivityCode,model.PerformerId,model.Prestation);
|
||||||
|
return View("HairCut",model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult HairCut(string performerId, string activityCode)
|
public async Task<ActionResult> HairCut(string performerId, string activityCode)
|
||||||
{
|
{
|
||||||
HairPrestation pPrestation=null;
|
HairPrestation pPrestation=null;
|
||||||
var prestaJson = HttpContext.Session.GetString("HairCutPresta") ;
|
var prestaJson = HttpContext.Session.GetString("HairCutPresta") ;
|
||||||
@ -125,6 +133,26 @@ namespace Yavsc.Controllers
|
|||||||
}
|
}
|
||||||
else pPrestation = new HairPrestation {};
|
else pPrestation = new HairPrestation {};
|
||||||
|
|
||||||
|
var uid = User.GetUserId();
|
||||||
|
var user = await _userManager.FindByIdAsync(uid);
|
||||||
|
|
||||||
|
SetViewData(activityCode,performerId,pPrestation);
|
||||||
|
|
||||||
|
var perfer = _context.Performers.Include(
|
||||||
|
p=>p.Performer
|
||||||
|
).Single(p=>p.PerformerId == performerId);
|
||||||
|
var result = new HairCutQuery {
|
||||||
|
PerformerProfile = perfer,
|
||||||
|
PerformerId = perfer.PerformerId,
|
||||||
|
ClientId = uid,
|
||||||
|
Prestation = pPrestation,
|
||||||
|
Client = user
|
||||||
|
};
|
||||||
|
|
||||||
|
return View(result);
|
||||||
|
}
|
||||||
|
private void SetViewData (string activityCode, string performerId, HairPrestation pPrestation )
|
||||||
|
{
|
||||||
ViewBag.HairTaints = _context.HairTaint.Include(t=>t.Color);
|
ViewBag.HairTaints = _context.HairTaint.Include(t=>t.Color);
|
||||||
ViewBag.HairTechnos = EnumExtensions.GetSelectList(typeof(HairTechnos),_localizer);
|
ViewBag.HairTechnos = EnumExtensions.GetSelectList(typeof(HairTechnos),_localizer);
|
||||||
ViewBag.HairLength = EnumExtensions.GetSelectList(typeof(HairLength),_localizer);
|
ViewBag.HairLength = EnumExtensions.GetSelectList(typeof(HairLength),_localizer);
|
||||||
@ -135,16 +163,6 @@ namespace Yavsc.Controllers
|
|||||||
|| pPrestation.Tech == HairTechnos.Mech ) ? "":"hidden";
|
|| pPrestation.Tech == HairTechnos.Mech ) ? "":"hidden";
|
||||||
ViewBag.TechClass = ( pPrestation.Gender == HairCutGenders.Women ) ? "":"hidden";
|
ViewBag.TechClass = ( pPrestation.Gender == HairCutGenders.Women ) ? "":"hidden";
|
||||||
ViewData["PerfPrefs"] = _context.BrusherProfile.Single(p=>p.UserId == performerId);
|
ViewData["PerfPrefs"] = _context.BrusherProfile.Single(p=>p.UserId == performerId);
|
||||||
var perfer = _context.Performers.Include(
|
|
||||||
p=>p.Performer
|
|
||||||
).Single(p=>p.PerformerId == performerId);
|
|
||||||
var result = new HairCutQuery {
|
|
||||||
PerformerProfile = perfer,
|
|
||||||
PerformerId = perfer.PerformerId,
|
|
||||||
ClientId = User.GetUserId(),
|
|
||||||
Prestation = pPrestation
|
|
||||||
};
|
|
||||||
return View(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, Authorize]
|
[HttpPost, Authorize]
|
||||||
@ -219,7 +237,7 @@ namespace Yavsc.Controllers
|
|||||||
}
|
}
|
||||||
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
|
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
|
||||||
ViewBag.GoogleSettings = _googleSettings;
|
ViewBag.GoogleSettings = _googleSettings;
|
||||||
return View(command);
|
return View("HairCut",command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ namespace Yavsc.Controllers
|
|||||||
|
|
||||||
public HairPrestationsController(ApplicationDbContext context)
|
public HairPrestationsController(ApplicationDbContext context)
|
||||||
{
|
{
|
||||||
_context = context;
|
_context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: HairPrestations
|
// GET: HairPrestations
|
||||||
|
@ -25,6 +25,7 @@ namespace Yavsc.Controllers
|
|||||||
using Models.Relationship;
|
using Models.Relationship;
|
||||||
using PayPal.PayPalAPIInterfaceService;
|
using PayPal.PayPalAPIInterfaceService;
|
||||||
using PayPal.PayPalAPIInterfaceService.Model;
|
using PayPal.PayPalAPIInterfaceService.Model;
|
||||||
|
using Yavsc.Models.Bank;
|
||||||
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public class ManageController : Controller
|
public class ManageController : Controller
|
||||||
@ -88,6 +89,8 @@ namespace Yavsc.Controllers
|
|||||||
: message == ManageMessageId.SetActivitySuccess ? _SR["Your activity was set."]
|
: message == ManageMessageId.SetActivitySuccess ? _SR["Your activity was set."]
|
||||||
: message == ManageMessageId.AvatarUpdateSuccess ? _SR["Your avatar was updated."]
|
: message == ManageMessageId.AvatarUpdateSuccess ? _SR["Your avatar was updated."]
|
||||||
: message == ManageMessageId.IdentityUpdateSuccess ? _SR["Your identity was updated."]
|
: message == ManageMessageId.IdentityUpdateSuccess ? _SR["Your identity was updated."]
|
||||||
|
: message == ManageMessageId.SetBankInfoSuccess ? _SR["Vos informations bancaires ont bien été enregistrées."]
|
||||||
|
: message == ManageMessageId.SetAddressSuccess ? _SR["Votre adresse a bien été enregistrée."]
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
var user = await GetCurrentUserAsync();
|
var user = await GetCurrentUserAsync();
|
||||||
@ -265,7 +268,7 @@ namespace Yavsc.Controllers
|
|||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet, Authorize]
|
[HttpGet]
|
||||||
public async Task<IActionResult> SetGoogleCalendar(string returnUrl)
|
public async Task<IActionResult> SetGoogleCalendar(string returnUrl)
|
||||||
{
|
{
|
||||||
var credential = await _userManager.GetCredentialForGoogleApiAsync(
|
var credential = await _userManager.GetCredentialForGoogleApiAsync(
|
||||||
@ -290,8 +293,7 @@ namespace Yavsc.Controllers
|
|||||||
return View(new SetGoogleCalendarViewModel { ReturnUrl = returnUrl });
|
return View(new SetGoogleCalendarViewModel { ReturnUrl = returnUrl });
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, ValidateAntiForgeryToken,
|
[HttpPost, ValidateAntiForgeryToken]
|
||||||
Authorize]
|
|
||||||
public async Task<IActionResult> SetGoogleCalendar(SetGoogleCalendarViewModel model)
|
public async Task<IActionResult> SetGoogleCalendar(SetGoogleCalendarViewModel model)
|
||||||
{
|
{
|
||||||
var user = _dbContext.Users.FirstOrDefault(u => u.Id == User.GetUserId());
|
var user = _dbContext.Users.FirstOrDefault(u => u.Id == User.GetUserId());
|
||||||
@ -302,16 +304,41 @@ namespace Yavsc.Controllers
|
|||||||
else return Redirect(model.ReturnUrl);
|
else return Redirect(model.ReturnUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet,Authorize]
|
[HttpGet]
|
||||||
public async Task<IActionResult> AddBankInfo()
|
public async Task<IActionResult> AddBankInfo()
|
||||||
{
|
{
|
||||||
var user = await _userManager.FindByIdAsync(User.GetUserId());
|
var uid = User.GetUserId();
|
||||||
|
var user = await _dbContext.Users.Include(u=>u.BankInfo).SingleAsync(u=>u.Id==uid);
|
||||||
|
|
||||||
return View(new AddBankInfoViewModel(
|
return View(user.BankInfo);
|
||||||
user.BankInfo));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet,Authorize]
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> AddBankInfo (BankIdentity model)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
// TODO PostBankInfoRequirement & auth
|
||||||
|
var uid = User.GetUserId();
|
||||||
|
var user = _dbContext.Users.Include(u=>u.BankInfo)
|
||||||
|
.Single(u=>u.Id == uid);
|
||||||
|
|
||||||
|
if (user.BankInfo != null)
|
||||||
|
{
|
||||||
|
model.Id = user.BankInfo.Id;
|
||||||
|
_dbContext.Entry(user.BankInfo).State = EntityState.Detached;
|
||||||
|
_dbContext.Update(model);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
user.BankInfo = model;
|
||||||
|
_dbContext.Update(user);
|
||||||
|
}
|
||||||
|
await _dbContext.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
return RedirectToAction(nameof(Index), new { Message = ManageMessageId.SetBankInfoSuccess });
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
public async Task<IActionResult> SetFullName()
|
public async Task<IActionResult> SetFullName()
|
||||||
{
|
{
|
||||||
var user = await _userManager.FindByIdAsync(User.GetUserId());
|
var user = await _userManager.FindByIdAsync(User.GetUserId());
|
||||||
@ -483,13 +510,13 @@ namespace Yavsc.Controllers
|
|||||||
return RedirectToAction(nameof(ManageLogins), new { Message = message });
|
return RedirectToAction(nameof(ManageLogins), new { Message = message });
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet, Authorize]
|
[HttpGet]
|
||||||
public IActionResult SetAvatar()
|
public IActionResult SetAvatar()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet, Authorize]
|
[HttpGet]
|
||||||
public IActionResult SetActivity()
|
public IActionResult SetActivity()
|
||||||
{
|
{
|
||||||
var user = GetCurrentUserAsync().Result;
|
var user = GetCurrentUserAsync().Result;
|
||||||
@ -520,7 +547,6 @@ namespace Yavsc.Controllers
|
|||||||
|
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Authorize]
|
|
||||||
public async Task<IActionResult> SetActivity(PerformerProfile model)
|
public async Task<IActionResult> SetActivity(PerformerProfile model)
|
||||||
{
|
{
|
||||||
var user = GetCurrentUserAsync().Result;
|
var user = GetCurrentUserAsync().Result;
|
||||||
@ -588,7 +614,7 @@ namespace Yavsc.Controllers
|
|||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, Authorize]
|
[HttpPost]
|
||||||
public async Task<IActionResult> UnsetActivity()
|
public async Task<IActionResult> UnsetActivity()
|
||||||
{
|
{
|
||||||
var user = GetCurrentUserAsync().Result;
|
var user = GetCurrentUserAsync().Result;
|
||||||
@ -784,6 +810,9 @@ namespace Yavsc.Controllers
|
|||||||
UnsetActivitySuccess,
|
UnsetActivitySuccess,
|
||||||
AvatarUpdateSuccess,
|
AvatarUpdateSuccess,
|
||||||
IdentityUpdateSuccess,
|
IdentityUpdateSuccess,
|
||||||
|
SetBankInfoSuccess,
|
||||||
|
|
||||||
|
SetAddressSuccess,
|
||||||
Error
|
Error
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -794,5 +823,36 @@ namespace Yavsc.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
public async Task <IActionResult> SetAddress()
|
||||||
|
{
|
||||||
|
var uid = User.GetUserId();
|
||||||
|
var user = await _dbContext.Users.Include(u=>u.PostalAddress).SingleAsync(u=>u.Id==uid);
|
||||||
|
ViewBag.GoogleSettings = _googleSettings;
|
||||||
|
return View(user.PostalAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task <IActionResult> SetAddress(Location model)
|
||||||
|
{
|
||||||
|
if (ModelState.IsValid) {
|
||||||
|
var uid = User.GetUserId();
|
||||||
|
|
||||||
|
var user = _dbContext.Users.Include(u=>u.PostalAddress).Single(u=>u.Id==uid);
|
||||||
|
|
||||||
|
var existingLocation = _dbContext.Locations.FirstOrDefault( x=>x.Address == model.Address
|
||||||
|
&& x.Longitude == model.Longitude && x.Latitude == model.Latitude );
|
||||||
|
|
||||||
|
if (existingLocation!=null) {
|
||||||
|
user.PostalAddressId = existingLocation.Id;
|
||||||
|
} else _dbContext.Attach<Location>(model);
|
||||||
|
user.PostalAddress = model;
|
||||||
|
await _dbContext.SaveChangesAsync();
|
||||||
|
return RedirectToAction(nameof(Index), new { Message = ManageMessageId.SetAddressSuccess });
|
||||||
|
}
|
||||||
|
ViewBag.GoogleSettings = _googleSettings;
|
||||||
|
return View(model);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
18
Yavsc/Helpers/BankInfoHelpers.cs
Normal file
18
Yavsc/Helpers/BankInfoHelpers.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
namespace Yavsc.Helpers
|
||||||
|
{
|
||||||
|
using Models.Bank;
|
||||||
|
public static class BankInfoHelpers
|
||||||
|
{
|
||||||
|
public static bool IsValid(this BankIdentity info) {
|
||||||
|
return ByIbanBIC(info) || ByAccountNumber(info) ;
|
||||||
|
}
|
||||||
|
public static bool ByIbanBIC(this BankIdentity info) {
|
||||||
|
return (info.BIC != null && info.IBAN != null) ;
|
||||||
|
}
|
||||||
|
public static bool ByAccountNumber(this BankIdentity info){
|
||||||
|
|
||||||
|
return (info.BankCode != null && info.WicketCode != null && info.AccountNumber != null && info.BankedKey >0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -12,7 +12,7 @@ namespace Yavsc.Helpers
|
|||||||
IStringLocalizer SR)
|
IStringLocalizer SR)
|
||||||
{
|
{
|
||||||
var yaev = new RdvQueryEvent
|
var yaev = new RdvQueryEvent
|
||||||
{
|
{
|
||||||
Sender = query.ClientId,
|
Sender = query.ClientId,
|
||||||
Message = string.Format(SR["RdvToPerf"],
|
Message = string.Format(SR["RdvToPerf"],
|
||||||
query.Client.UserName,
|
query.Client.UserName,
|
||||||
@ -21,8 +21,8 @@ namespace Yavsc.Helpers
|
|||||||
query.ActivityCode)+
|
query.ActivityCode)+
|
||||||
"\n"+query.Reason,
|
"\n"+query.Reason,
|
||||||
Client = new ClientProviderInfo {
|
Client = new ClientProviderInfo {
|
||||||
UserName = query.Client.UserName ,
|
UserName = query.Client.UserName ,
|
||||||
UserId = query.ClientId,
|
UserId = query.ClientId,
|
||||||
Avatar = query.Client.Avatar } ,
|
Avatar = query.Client.Avatar } ,
|
||||||
Previsional = query.Previsional,
|
Previsional = query.Previsional,
|
||||||
EventDate = query.EventDate,
|
EventDate = query.EventDate,
|
||||||
@ -37,22 +37,22 @@ namespace Yavsc.Helpers
|
|||||||
IStringLocalizer SR)
|
IStringLocalizer SR)
|
||||||
{
|
{
|
||||||
var yaev = new HairCutQueryEvent
|
var yaev = new HairCutQueryEvent
|
||||||
{
|
{
|
||||||
Sender = query.ClientId,
|
Sender = query.ClientId,
|
||||||
Message = string.Format(SR["RdvToPerf"],
|
Message = string.Format(SR["RdvToPerf"],
|
||||||
query.Client.UserName,
|
query.Client.UserName,
|
||||||
query.EventDate.ToString("dddd dd/MM/yyyy à HH:mm"),
|
query.EventDate?.ToString("dddd dd/MM/yyyy à HH:mm")??"[pas de date spécifiée]",
|
||||||
query.Location.Address,
|
query.Location?.Address??"[pas de lieu spécifié]",
|
||||||
query.ActivityCode),
|
query.ActivityCode),
|
||||||
Client = new ClientProviderInfo {
|
Client = new ClientProviderInfo {
|
||||||
UserName = query.Client.UserName ,
|
UserName = query.Client.UserName ,
|
||||||
UserId = query.ClientId,
|
UserId = query.ClientId,
|
||||||
Avatar = query.Client.Avatar } ,
|
Avatar = query.Client.Avatar } ,
|
||||||
Previsional = query.Previsional,
|
Previsional = query.Previsional,
|
||||||
EventDate = query.EventDate,
|
EventDate = query.EventDate,
|
||||||
Location = query.Location,
|
Location = query.Location,
|
||||||
Id = query.Id,
|
Id = query.Id,
|
||||||
Reason = "Coupe particulier",
|
Reason = "Coupe pour un particulier",
|
||||||
ActivityCode = query.ActivityCode
|
ActivityCode = query.ActivityCode
|
||||||
};
|
};
|
||||||
return yaev;
|
return yaev;
|
||||||
@ -62,7 +62,7 @@ namespace Yavsc.Helpers
|
|||||||
IStringLocalizer SR)
|
IStringLocalizer SR)
|
||||||
{
|
{
|
||||||
var yaev = new HairCutQueryEvent
|
var yaev = new HairCutQueryEvent
|
||||||
{
|
{
|
||||||
Sender = query.ClientId,
|
Sender = query.ClientId,
|
||||||
Message = string.Format(SR["RdvToPerf"],
|
Message = string.Format(SR["RdvToPerf"],
|
||||||
query.Client.UserName,
|
query.Client.UserName,
|
||||||
@ -70,8 +70,8 @@ namespace Yavsc.Helpers
|
|||||||
query.Location.Address,
|
query.Location.Address,
|
||||||
query.ActivityCode),
|
query.ActivityCode),
|
||||||
Client = new ClientProviderInfo {
|
Client = new ClientProviderInfo {
|
||||||
UserName = query.Client.UserName ,
|
UserName = query.Client.UserName ,
|
||||||
UserId = query.ClientId,
|
UserId = query.ClientId,
|
||||||
Avatar = query.Client.Avatar } ,
|
Avatar = query.Client.Avatar } ,
|
||||||
Previsional = query.Previsional,
|
Previsional = query.Previsional,
|
||||||
EventDate = query.EventDate,
|
EventDate = query.EventDate,
|
||||||
|
130
Yavsc/Helpers/HaircutHelpers.cs
Normal file
130
Yavsc/Helpers/HaircutHelpers.cs
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
using Yavsc.Models.Haircut;
|
||||||
|
|
||||||
|
namespace Yavsc.Helpers
|
||||||
|
{
|
||||||
|
public static class HaircutHelpers
|
||||||
|
{
|
||||||
|
public static decimal Addition (this HairPrestation p, BrusherProfile profile)
|
||||||
|
{
|
||||||
|
decimal sub=0;
|
||||||
|
// Le shampoing
|
||||||
|
sub += p.Shampoo ? profile.ShampooPrice:0;
|
||||||
|
|
||||||
|
// la coupe
|
||||||
|
sub += p.Cut ? p.Gender == HairCutGenders.Women ?
|
||||||
|
p.Length == HairLength.Long ? profile.WomenLongCutPrice :
|
||||||
|
p.Length == HairLength.HalfLong ? profile.WomenHalfCutPrice :
|
||||||
|
profile.WomenShortCutPrice : p.Gender == HairCutGenders.Man ?
|
||||||
|
profile.ManCutPrice : profile.KidCutPrice : 0;
|
||||||
|
|
||||||
|
// Les techniques
|
||||||
|
switch (p.Tech) {
|
||||||
|
case HairTechnos.Color:
|
||||||
|
bool multicolor = p.Taints.Count>1;
|
||||||
|
switch (p.Length) {
|
||||||
|
case HairLength.Long:
|
||||||
|
sub += sub += multicolor? profile.LongMultiColorPrice : profile.LongColorPrice;
|
||||||
|
break;
|
||||||
|
case HairLength.HalfLong: sub += multicolor? profile.HalfMultiColorPrice : profile.HalfColorPrice;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sub += multicolor? profile.ShortMultiColorPrice : profile.ShortColorPrice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HairTechnos.Balayage:
|
||||||
|
switch (p.Length) {
|
||||||
|
case HairLength.Long:
|
||||||
|
sub += profile.LongBalayagePrice;
|
||||||
|
break;
|
||||||
|
case HairLength.HalfLong: sub += profile.HalfBalayagePrice;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sub += profile.ShortBalayagePrice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HairTechnos.Defris:
|
||||||
|
switch (p.Length) {
|
||||||
|
case HairLength.Long:
|
||||||
|
sub += profile.LongDefrisPrice;
|
||||||
|
break;
|
||||||
|
case HairLength.HalfLong: sub += profile.HalfDefrisPrice;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sub += profile.ShortDefrisPrice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HairTechnos.Mech:
|
||||||
|
switch (p.Length) {
|
||||||
|
case HairLength.Long:
|
||||||
|
sub += profile.LongMechPrice;
|
||||||
|
break;
|
||||||
|
case HairLength.HalfLong: sub += profile.HalfMechPrice;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sub += profile.ShortMechPrice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HairTechnos.Permanent:
|
||||||
|
switch (p.Length) {
|
||||||
|
case HairLength.Long:
|
||||||
|
sub += profile.LongPermanentPrice;
|
||||||
|
break;
|
||||||
|
case HairLength.HalfLong: sub += profile.HalfPermanentPrice;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sub += profile.ShortPermanentPrice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Les coiffages
|
||||||
|
switch (p.Dressing) {
|
||||||
|
case HairDressings.Brushing:
|
||||||
|
switch (p.Gender) {
|
||||||
|
case HairCutGenders.Women:
|
||||||
|
switch (p.Length) {
|
||||||
|
case HairLength.Long:
|
||||||
|
sub += profile.LongBrushingPrice;
|
||||||
|
break;
|
||||||
|
case HairLength.HalfLong: sub += profile.HalfBrushingPrice;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sub += profile.ShortBrushingPrice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HairCutGenders.Man:
|
||||||
|
sub += profile.ManBrushPrice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HairDressings.Coiffage:
|
||||||
|
// est offert
|
||||||
|
break;
|
||||||
|
case HairDressings.Folding:
|
||||||
|
switch (p.Length) {
|
||||||
|
case HairLength.Long:
|
||||||
|
sub += profile.LongFoldingPrice;
|
||||||
|
break;
|
||||||
|
case HairLength.HalfLong: sub += profile.HalfFoldingPrice;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sub += profile.ShortFoldingPrice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// les soins
|
||||||
|
sub += p.Cares ? profile.CarePrice:0;
|
||||||
|
return sub;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.Data.Entity;
|
using Microsoft.Data.Entity;
|
||||||
using Microsoft.Data.Entity.Infrastructure;
|
using Microsoft.Data.Entity.Infrastructure;
|
||||||
using Microsoft.Data.Entity.Metadata;
|
|
||||||
using Microsoft.Data.Entity.Migrations;
|
using Microsoft.Data.Entity.Migrations;
|
||||||
using Yavsc.Models;
|
using Yavsc.Models;
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.Data.Entity.Migrations;
|
using Microsoft.Data.Entity.Migrations;
|
||||||
|
|
||||||
namespace Yavsc.Migrations
|
namespace Yavsc.Migrations
|
||||||
|
1406
Yavsc/Migrations/20170331214327_rdvqueryAndNoLocationNorDate.Designer.cs
generated
Normal file
1406
Yavsc/Migrations/20170331214327_rdvqueryAndNoLocationNorDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
608
Yavsc/Migrations/20170331214327_rdvqueryAndNoLocationNorDate.cs
Normal file
608
Yavsc/Migrations/20170331214327_rdvqueryAndNoLocationNorDate.cs
Normal file
@ -0,0 +1,608 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
namespace Yavsc.Migrations
|
||||||
|
{
|
||||||
|
public partial class rdvqueryAndNoLocationNorDate : 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_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||||
|
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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
|
||||||
|
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_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||||
|
migrationBuilder.AlterColumn<long>(
|
||||||
|
name: "LocationId",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
nullable: true);
|
||||||
|
migrationBuilder.AlterColumn<DateTime>(
|
||||||
|
name: "EventDate",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
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_BlackListed_ApplicationUser_OwnerId",
|
||||||
|
table: "BlackListed",
|
||||||
|
column: "OwnerId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
|
||||||
|
table: "CircleAuthorizationToBlogPost",
|
||||||
|
column: "BlogPostId",
|
||||||
|
principalTable: "Blog",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||||
|
table: "CircleAuthorizationToBlogPost",
|
||||||
|
column: "CircleId",
|
||||||
|
principalTable: "Circle",
|
||||||
|
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_Connection_ApplicationUser_ApplicationUserId",
|
||||||
|
table: "Connection",
|
||||||
|
column: "ApplicationUserId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairCutQuery_Activity_ActivityCode",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairCutQuery_ApplicationUser_ClientId",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
column: "PerformerId",
|
||||||
|
principalTable: "PerformerProfile",
|
||||||
|
principalColumn: "PerformerId",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairCutQuery_HairPrestation_PrestationId",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
column: "PrestationId",
|
||||||
|
principalTable: "HairPrestation",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
|
||||||
|
table: "HairMultiCutQuery",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
|
||||||
|
table: "HairMultiCutQuery",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
|
||||||
|
table: "HairMultiCutQuery",
|
||||||
|
column: "PerformerId",
|
||||||
|
principalTable: "PerformerProfile",
|
||||||
|
principalColumn: "PerformerId",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairTaint_Color_ColorId",
|
||||||
|
table: "HairTaint",
|
||||||
|
column: "ColorId",
|
||||||
|
principalTable: "Color",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_DimissClicked_Notification_NotificationId",
|
||||||
|
table: "DimissClicked",
|
||||||
|
column: "NotificationId",
|
||||||
|
principalTable: "Notification",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_DimissClicked_ApplicationUser_UserId",
|
||||||
|
table: "DimissClicked",
|
||||||
|
column: "UserId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
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_CommandForm_Activity_ActivityCode",
|
||||||
|
table: "CommandForm",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
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_RdvQuery_Activity_ActivityCode",
|
||||||
|
table: "RdvQuery",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RdvQuery_ApplicationUser_ClientId",
|
||||||
|
table: "RdvQuery",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RdvQuery_PerformerProfile_PerformerId",
|
||||||
|
table: "RdvQuery",
|
||||||
|
column: "PerformerId",
|
||||||
|
principalTable: "PerformerProfile",
|
||||||
|
principalColumn: "PerformerId",
|
||||||
|
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_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
|
||||||
|
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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
|
||||||
|
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_CommandForm_Activity_ActivityCode", table: "CommandForm");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||||
|
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||||
|
migrationBuilder.AlterColumn<long>(
|
||||||
|
name: "LocationId",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
nullable: false);
|
||||||
|
migrationBuilder.AlterColumn<DateTime>(
|
||||||
|
name: "EventDate",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
nullable: 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_BlackListed_ApplicationUser_OwnerId",
|
||||||
|
table: "BlackListed",
|
||||||
|
column: "OwnerId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
|
||||||
|
table: "CircleAuthorizationToBlogPost",
|
||||||
|
column: "BlogPostId",
|
||||||
|
principalTable: "Blog",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
|
||||||
|
table: "CircleAuthorizationToBlogPost",
|
||||||
|
column: "CircleId",
|
||||||
|
principalTable: "Circle",
|
||||||
|
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_Connection_ApplicationUser_ApplicationUserId",
|
||||||
|
table: "Connection",
|
||||||
|
column: "ApplicationUserId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairCutQuery_Activity_ActivityCode",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairCutQuery_ApplicationUser_ClientId",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
column: "PerformerId",
|
||||||
|
principalTable: "PerformerProfile",
|
||||||
|
principalColumn: "PerformerId",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairCutQuery_HairPrestation_PrestationId",
|
||||||
|
table: "HairCutQuery",
|
||||||
|
column: "PrestationId",
|
||||||
|
principalTable: "HairPrestation",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
|
||||||
|
table: "HairMultiCutQuery",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
|
||||||
|
table: "HairMultiCutQuery",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
|
||||||
|
table: "HairMultiCutQuery",
|
||||||
|
column: "PerformerId",
|
||||||
|
principalTable: "PerformerProfile",
|
||||||
|
principalColumn: "PerformerId",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_HairTaint_Color_ColorId",
|
||||||
|
table: "HairTaint",
|
||||||
|
column: "ColorId",
|
||||||
|
principalTable: "Color",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_DimissClicked_Notification_NotificationId",
|
||||||
|
table: "DimissClicked",
|
||||||
|
column: "NotificationId",
|
||||||
|
principalTable: "Notification",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_DimissClicked_ApplicationUser_UserId",
|
||||||
|
table: "DimissClicked",
|
||||||
|
column: "UserId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
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_CommandForm_Activity_ActivityCode",
|
||||||
|
table: "CommandForm",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
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_RdvQuery_Activity_ActivityCode",
|
||||||
|
table: "RdvQuery",
|
||||||
|
column: "ActivityCode",
|
||||||
|
principalTable: "Activity",
|
||||||
|
principalColumn: "Code",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RdvQuery_ApplicationUser_ClientId",
|
||||||
|
table: "RdvQuery",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_RdvQuery_PerformerProfile_PerformerId",
|
||||||
|
table: "RdvQuery",
|
||||||
|
column: "PerformerId",
|
||||||
|
principalTable: "PerformerProfile",
|
||||||
|
principalColumn: "PerformerId",
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.Data.Entity;
|
using Microsoft.Data.Entity;
|
||||||
using Microsoft.Data.Entity.Infrastructure;
|
using Microsoft.Data.Entity.Infrastructure;
|
||||||
using Microsoft.Data.Entity.Metadata;
|
|
||||||
using Microsoft.Data.Entity.Migrations;
|
|
||||||
using Yavsc.Models;
|
using Yavsc.Models;
|
||||||
|
|
||||||
namespace Yavsc.Migrations
|
namespace Yavsc.Migrations
|
||||||
@ -536,9 +534,9 @@ namespace Yavsc.Migrations
|
|||||||
|
|
||||||
b.Property<DateTime>("DateModified");
|
b.Property<DateTime>("DateModified");
|
||||||
|
|
||||||
b.Property<DateTime>("EventDate");
|
b.Property<DateTime?>("EventDate");
|
||||||
|
|
||||||
b.Property<long>("LocationId");
|
b.Property<long?>("LocationId");
|
||||||
|
|
||||||
b.Property<string>("PerformerId")
|
b.Property<string>("PerformerId")
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
@ -27,6 +27,7 @@ namespace Yavsc.Models
|
|||||||
using Workflow.Profiles;
|
using Workflow.Profiles;
|
||||||
using Drawing;
|
using Drawing;
|
||||||
using Yavsc.Attributes;
|
using Yavsc.Attributes;
|
||||||
|
using Yavsc.Models.Bank;
|
||||||
|
|
||||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||||
{
|
{
|
||||||
@ -47,12 +48,12 @@ namespace Yavsc.Models
|
|||||||
builder.Entity<CircleAuthorizationToBlogPost>().HasKey(a=> new { a.CircleId, a.BlogPostId});
|
builder.Entity<CircleAuthorizationToBlogPost>().HasKey(a=> new { a.CircleId, a.BlogPostId});
|
||||||
builder.Entity<CircleMember>().HasKey(c=> new { MemberId = c.MemberId, CircleId = c.CircleId });
|
builder.Entity<CircleMember>().HasKey(c=> new { MemberId = c.MemberId, CircleId = c.CircleId });
|
||||||
builder.Entity<DimissClicked>().HasKey(c=>new { uid = c.UserId, notid = c.NotificationId});
|
builder.Entity<DimissClicked>().HasKey(c=>new { uid = c.UserId, notid = c.NotificationId});
|
||||||
|
|
||||||
foreach (var et in builder.Model.GetEntityTypes()) {
|
foreach (var et in builder.Model.GetEntityTypes()) {
|
||||||
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
|
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
|
||||||
et.FindProperty("DateCreated").IsReadOnlyAfterSave = true;
|
et.FindProperty("DateCreated").IsReadOnlyAfterSave = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public DbSet<TSettings> GetDbSet<TSettings>() where TSettings : class, ISpecializationSettings
|
public DbSet<TSettings> GetDbSet<TSettings>() where TSettings : class, ISpecializationSettings
|
||||||
|
|
||||||
@ -75,7 +76,7 @@ namespace Yavsc.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DbSet<Client> Applications { get; set; }
|
public DbSet<Client> Applications { get; set; }
|
||||||
|
|
||||||
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Activities referenced on this site
|
/// Activities referenced on this site
|
||||||
@ -115,6 +116,7 @@ namespace Yavsc.Models
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public DbSet<RdvQuery> RdvQueries { get; set; }
|
public DbSet<RdvQuery> RdvQueries { get; set; }
|
||||||
public DbSet<HairCutQuery> HairCutQueries { get; set; }
|
public DbSet<HairCutQuery> HairCutQueries { get; set; }
|
||||||
|
public DbSet<HairPrestation> HairPrestation { get; set; }
|
||||||
public DbSet<HairMultiCutQuery> HairMultiCutQueries { get; set; }
|
public DbSet<HairMultiCutQuery> HairMultiCutQueries { get; set; }
|
||||||
public DbSet<PerformerProfile> Performers { get; set; }
|
public DbSet<PerformerProfile> Performers { get; set; }
|
||||||
public DbSet<Estimate> Estimates { get; set; }
|
public DbSet<Estimate> Estimates { get; set; }
|
||||||
@ -128,7 +130,7 @@ namespace Yavsc.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>tokens</returns>
|
/// <returns>tokens</returns>
|
||||||
public DbSet<OAuth2Tokens> Tokens { get; set; }
|
public DbSet<OAuth2Tokens> Tokens { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// References all declared external GCM devices
|
/// References all declared external GCM devices
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -237,24 +239,24 @@ namespace Yavsc.Models
|
|||||||
|
|
||||||
public DbSet<Instrument> Instrument { get; set; }
|
public DbSet<Instrument> Instrument { get; set; }
|
||||||
|
|
||||||
[ActivitySettings]
|
[ActivitySettings]
|
||||||
public DbSet<DjSettings> DjSettings { get; set; }
|
public DbSet<DjSettings> DjSettings { get; set; }
|
||||||
|
|
||||||
[ActivitySettings]
|
[ActivitySettings]
|
||||||
public DbSet<Instrumentation> Instrumentation { get; set; }
|
public DbSet<Instrumentation> Instrumentation { get; set; }
|
||||||
|
|
||||||
[ActivitySettings]
|
[ActivitySettings]
|
||||||
public DbSet<FormationSettings> FormationSettings { get; set; }
|
public DbSet<FormationSettings> FormationSettings { get; set; }
|
||||||
|
|
||||||
[ActivitySettings]
|
[ActivitySettings]
|
||||||
public DbSet<GeneralSettings> GeneralSettings { get; set; }
|
public DbSet<GeneralSettings> GeneralSettings { get; set; }
|
||||||
public DbSet<CoWorking> WorkflowProviders { get; set; }
|
public DbSet<CoWorking> WorkflowProviders { get; set; }
|
||||||
|
|
||||||
private void AddTimestamps(string currentUsername)
|
private void AddTimestamps(string currentUsername)
|
||||||
{
|
{
|
||||||
var entities =
|
var entities =
|
||||||
ChangeTracker.Entries()
|
ChangeTracker.Entries()
|
||||||
.Where(x => x.Entity.GetType().GetInterface("IBaseTrackedEntity")!=null
|
.Where(x => x.Entity.GetType().GetInterface("IBaseTrackedEntity")!=null
|
||||||
&& (x.State == EntityState.Added || x.State == EntityState.Modified));
|
&& (x.State == EntityState.Added || x.State == EntityState.Modified));
|
||||||
|
|
||||||
|
|
||||||
@ -279,7 +281,7 @@ namespace Yavsc.Models
|
|||||||
AddTimestamps(userId);
|
AddTimestamps(userId);
|
||||||
return await base.SaveChangesAsync();
|
return await base.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DbSet<Circle> Circle { get; set; }
|
public DbSet<Circle> Circle { get; set; }
|
||||||
|
|
||||||
public DbSet<CircleAuthorizationToBlogPost> BlogACL { get; set; }
|
public DbSet<CircleAuthorizationToBlogPost> BlogACL { get; set; }
|
||||||
@ -298,11 +300,10 @@ namespace Yavsc.Models
|
|||||||
|
|
||||||
public DbSet<DimissClicked> DimissClicked { get; set; }
|
public DbSet<DimissClicked> DimissClicked { get; set; }
|
||||||
|
|
||||||
public DbSet<HairPrestation> HairPrestation { get; set; }
|
|
||||||
|
|
||||||
[ActivitySettings]
|
[ActivitySettings]
|
||||||
public DbSet<BrusherProfile> BrusherProfile { get; set; }
|
public DbSet<BrusherProfile> BrusherProfile { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public DbSet<BankIdentity> BankIdentity { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,20 +16,20 @@ namespace Yavsc.Models.Haircut
|
|||||||
[Required]
|
[Required]
|
||||||
public long PrestationId { get; set; }
|
public long PrestationId { get; set; }
|
||||||
|
|
||||||
[ForeignKey("PrestationId")]
|
[ForeignKey("PrestationId"),Required]
|
||||||
public virtual HairPrestation Prestation { get; set; }
|
public virtual HairPrestation Prestation { get; set; }
|
||||||
|
|
||||||
[Required][ForeignKey("LocationId")]
|
[ForeignKey("LocationId")]
|
||||||
|
|
||||||
public Location Location { get; set; }
|
public virtual Location Location { get; set; }
|
||||||
|
|
||||||
public DateTime EventDate
|
public DateTime? EventDate
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long LocationId
|
public long? LocationId
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Yavsc.Models.Billing;
|
using Yavsc.Models.Billing;
|
||||||
@ -6,11 +7,27 @@ using Yavsc.Models.Relationship;
|
|||||||
|
|
||||||
namespace Yavsc.Models.Haircut
|
namespace Yavsc.Models.Haircut
|
||||||
{
|
{
|
||||||
|
public class HairPrestationCollectionItem {
|
||||||
|
|
||||||
|
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public long Id { get; set; }
|
||||||
|
public long PrestationId { get; set; }
|
||||||
|
[ForeignKeyAttribute("PrestationId")]
|
||||||
|
public virtual HairPrestation Prestation { get; set; }
|
||||||
|
|
||||||
|
public long QueryId { get; set; }
|
||||||
|
|
||||||
|
[ForeignKeyAttribute("QueryId")]
|
||||||
|
public virtual HairMultiCutQuery Query { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class HairMultiCutQuery : NominativeServiceCommand
|
public class HairMultiCutQuery : NominativeServiceCommand
|
||||||
{
|
{
|
||||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
HairPrestation [] Prestations { get; set; }
|
|
||||||
|
[InversePropertyAttribute("Query")]
|
||||||
|
public virtual List<HairPrestationCollectionItem> Prestations { get; set; }
|
||||||
|
|
||||||
public Location Location { get; set; }
|
public Location Location { get; set; }
|
||||||
|
|
||||||
@ -20,4 +37,4 @@ namespace Yavsc.Models.Haircut
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,9 @@ namespace Yavsc.Models
|
|||||||
/// Billing postal address
|
/// Billing postal address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[ForeignKeyAttribute("PostalAddressId")]
|
||||||
public virtual Location PostalAddress { get; set; }
|
public virtual Location PostalAddress { get; set; }
|
||||||
|
public long? PostalAddressId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// User's Google calendar
|
/// User's Google calendar
|
||||||
@ -92,7 +94,7 @@ namespace Yavsc.Models
|
|||||||
public long DiskQuota { get; set; } = 512*1024*1024;
|
public long DiskQuota { get; set; } = 512*1024*1024;
|
||||||
public long DiskUsage { get; set; } = 0;
|
public long DiskUsage { get; set; } = 0;
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore][InverseProperty("Owner")]
|
||||||
public virtual List<BlackListed> BlackList { get; set; }
|
public virtual List<BlackListed> BlackList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,12 +12,12 @@ namespace Yavsc.Models
|
|||||||
|
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
public DateTime EventDate { get; set; }
|
public DateTime? EventDate { get; set; }
|
||||||
public decimal? Previsional { get; set; }
|
public decimal? Previsional { get; set; }
|
||||||
|
|
||||||
public string Reason { get; set; }
|
public string Reason { get; set; }
|
||||||
|
|
||||||
public string ActivityCode { get; set; }
|
public string ActivityCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ using System;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Web.Optimization;
|
using System.Web.Optimization;
|
||||||
using Microsoft.AspNet.Authentication;
|
using Microsoft.AspNet.Authentication;
|
||||||
using Microsoft.AspNet.Authorization;
|
using Microsoft.AspNet.Authorization;
|
||||||
@ -309,8 +308,6 @@ namespace Yavsc
|
|||||||
options.AutomaticAuthentication = false;
|
options.AutomaticAuthentication = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ConfigureOAuthApp(app, SiteSetup);
|
ConfigureOAuthApp(app, SiteSetup);
|
||||||
ConfigureFileServerApp(app, SiteSetup, env, authorizationService);
|
ConfigureFileServerApp(app, SiteSetup, env, authorizationService);
|
||||||
ConfigureWebSocketsApp(app, SiteSetup, env);
|
ConfigureWebSocketsApp(app, SiteSetup, env);
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
namespace Yavsc.ViewModels.Manage
|
|
||||||
{
|
|
||||||
using Models.Bank;
|
|
||||||
public class AddBankInfoViewModel
|
|
||||||
{
|
|
||||||
public BankIdentity Data{get; private set; }
|
|
||||||
public AddBankInfoViewModel(BankIdentity data)
|
|
||||||
{
|
|
||||||
this.Data = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsValid { get {
|
|
||||||
return ByIbanBIC || ByAccountNumber ;
|
|
||||||
}}
|
|
||||||
public bool ByIbanBIC { get {
|
|
||||||
return (Data.BIC != null && Data.IBAN != null) ;
|
|
||||||
}}
|
|
||||||
public bool ByAccountNumber {
|
|
||||||
get {
|
|
||||||
return (Data.BankCode != null && Data.WicketCode != null && Data.AccountNumber != null && Data.BankedKey >0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,7 +3,15 @@
|
|||||||
@{
|
@{
|
||||||
ViewBag.Title = SR["Administration"];
|
ViewBag.Title = SR["Administration"];
|
||||||
}
|
}
|
||||||
|
@section ctxmenu {
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a asp-controller="Activity" asp-action="Index" class="navbar-link">Activités</a></li>
|
||||||
|
<li><a asp-controller="CommandForms" asp-action="Index" class="navbar-link">Formulaires</a></li>
|
||||||
|
<li><a asp-controller="Notifications" asp-action="Index" class="navbar-link">Notifications</a></li>
|
||||||
|
<li><a asp-controller="SIRENExceptions" asp-action="Index" class="navbar-link">Excéptions au numéro de SIREN</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
}
|
||||||
<h2>@ViewBag.Title</h2>
|
<h2>@ViewBag.Title</h2>
|
||||||
<p>
|
<p>
|
||||||
Rôles :
|
Rôles :
|
||||||
@ -19,4 +27,5 @@ Nombre d'administrateurs :
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Vous êtes administrateur: @(Model.YouAreAdmin?"Oui":"Non")
|
Vous êtes administrateur: @(Model.YouAreAdmin?"Oui":"Non")
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Title)
|
@Html.DisplayNameFor(model => model.Title)
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Context)
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.ActionName)
|
@Html.DisplayNameFor(model => model.ActionName)
|
||||||
</th>
|
</th>
|
||||||
@ -21,10 +24,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@foreach (var item in Model) {
|
@foreach (var item in Model) {
|
||||||
<tr>
|
<tr class="@(item.Context.Hidden?"disabled":null)">
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Title)
|
@Html.DisplayFor(modelItem => item.Title)
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Context)
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.ActionName)
|
@Html.DisplayFor(modelItem => item.ActionName)
|
||||||
</td>
|
</td>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<a asp-controller="HairCutCommand" asp-action="HairCut"
|
<a asp-controller="HairCutCommand" asp-action="HairCut"
|
||||||
asp-route-activityCode="@ViewBag.Activity.Code"
|
asp-route-activityCode="@ViewBag.Activity.Code"
|
||||||
asp-route-performerId="@profile.Performer.Id"
|
asp-route-performerId="@profile.Performer.Id"
|
||||||
class="btn btn-link">
|
class="btn btn-success">
|
||||||
@SR["Proposer un rendez-vous à"] @profile.Performer.UserName
|
@SR["Proposer un rendez-vous à"] @profile.Performer.UserName
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -3,16 +3,16 @@
|
|||||||
var tarifs =
|
var tarifs =
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
cut: [ @Model.WomenLongCutPrice, @Model.WomenHalfCutPrice, @Model.WomenShortCutPrice ],
|
cut: [ @Model.WomenHalfCutPrice, @Model.WomenShortCutPrice, @Model.WomenLongCutPrice ],
|
||||||
tech: [
|
tech: [
|
||||||
[@Model.LongColorPrice, @Model.HalfColorPrice, @Model.ShortColorPrice],
|
[@Model.HalfColorPrice, @Model.ShortColorPrice, @Model.LongColorPrice],
|
||||||
[@Model.LongPermanentPrice, @Model.HalfPermanentPrice, @Model.ShortPermanentPrice],
|
[@Model.HalfPermanentPrice, @Model.ShortPermanentPrice, @Model.LongPermanentPrice],
|
||||||
[@Model.LongDefrisPrice, @Model.HalfDefrisPrice, @Model.ShortDefrisPrice],
|
[@Model.HalfDefrisPrice, @Model.ShortDefrisPrice, @Model.LongDefrisPrice],
|
||||||
[@Model.LongMechPrice, @Model.HalfMechPrice, @Model.ShortMechPrice],
|
[@Model.HalfMechPrice, @Model.ShortMechPrice, @Model.LongMechPrice],
|
||||||
[@Model.LongBalayagePrice, @Model.HalfBalayagePrice, @Model.ShortBalayagePrice],
|
[@Model.HalfBalayagePrice, @Model.ShortBalayagePrice, @Model.LongBalayagePrice],
|
||||||
],
|
],
|
||||||
brush: [@Model.LongBrushingPrice, @Model.HalfBrushingPrice, @Model.ShortBrushingPrice],
|
brush: [@Model.HalfBrushingPrice, @Model.ShortBrushingPrice, @Model.LongBrushingPrice],
|
||||||
multicolor: [@Model.LongMultiColorPrice, @Model.HalfMultiColorPrice, @Model.ShortMultiColorPrice],
|
multicolor: [@Model.HalfMultiColorPrice, @Model.ShortMultiColorPrice, @Model.LongMultiColorPrice],
|
||||||
shampoo: @Model.ShampooPrice,
|
shampoo: @Model.ShampooPrice,
|
||||||
care: @Model.CarePrice
|
care: @Model.CarePrice
|
||||||
},
|
},
|
||||||
|
@ -6,11 +6,40 @@
|
|||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
<h4>@SR["Your book query"]</h4>
|
<h4>@SR["Your book query"]</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<label for="EventDate">@SR["Event date"]</label>: @Html.DisplayFor(m => m.EventDate)
|
<ul>
|
||||||
<br/>
|
<li>
|
||||||
|
Votre star de la coiffure:
|
||||||
|
@Html.DisplayFor(m=>m.PerformerProfile)
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
@Html.DisplayFor(m=>m.Prestation)
|
||||||
|
<p>
|
||||||
|
Addition minimale
|
||||||
|
(Compter des frais supplémentaires
|
||||||
|
en cas de longs déplacements,
|
||||||
|
ou des majorations en cas de weekend et jour férie)
|
||||||
|
<span class="price"> @ViewBag.Addition </span></p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
@if (Model.EventDate == null) {
|
||||||
|
<p>Pas de date convenue ...</p>
|
||||||
|
} else {
|
||||||
|
<label for="EventDate">
|
||||||
|
@SR["Event date"]</label>
|
||||||
|
@Html.DisplayFor(m => m.EventDate)
|
||||||
|
}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
<label for="Location">@SR["Location"]</label>: @Html.DisplayFor(m => m.Location)
|
@if (Model.Location == null) {
|
||||||
<br/>
|
<p>Pas de lieu convenu ...</p>
|
||||||
|
} else {
|
||||||
|
<label for="Location">@SR["Location"]</label>
|
||||||
|
@Html.DisplayFor(m => m.Location)
|
||||||
|
|
||||||
|
}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
@if (ViewBag.GooglePayload !=null)
|
@if (ViewBag.GooglePayload !=null)
|
||||||
{
|
{
|
||||||
@ -20,10 +49,10 @@
|
|||||||
else {
|
else {
|
||||||
if (ViewBag.GooglePayload.failure>0)
|
if (ViewBag.GooglePayload.failure>0)
|
||||||
{
|
{
|
||||||
<h4>@SR["GCM Notification sending failed"]</h4>
|
<div class="error">@SR["GCM Notification sending failed"]</div>
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
<!-- email sent -->
|
<div class="error">@SR["E-mail sent"]</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,10 +127,10 @@
|
|||||||
|
|
||||||
@Html.DisplayFor(m=>m.PerformerProfile)
|
@Html.DisplayFor(m=>m.PerformerProfile)
|
||||||
|
|
||||||
<form asp-controller="HairCutCommand" asp-action="HairCut" id="form">
|
<form asp-controller="HairCutCommand" asp-action="CreateHairCutQuery" id="form">
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
<hr />
|
<hr />
|
||||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Prestation.Gender" class="col-md-2 control-label"></label>
|
<label asp-for="Prestation.Gender" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
@ -210,8 +210,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<span>Total: <span id="Total" class="total"></span>
|
<span>Total: <span id="Total" class="total"></span>
|
||||||
</span>
|
</span>
|
||||||
<input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName, sans préciser ni lieu ni date (pour prendre rendez-vous la prise de contact)"/>
|
<input asp-for="ClientId" type="hidden" />
|
||||||
<input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName"/>
|
<input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName, sans préciser ni lieu ni date (pour prendre rendez-vous la prise de contact)"/>
|
||||||
|
<input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="performerId" value="@Model.PerformerProfile.PerformerId" />
|
<input type="hidden" name="performerId" value="@Model.PerformerProfile.PerformerId" />
|
||||||
|
@ -66,24 +66,12 @@
|
|||||||
@if (!ViewBag.IsFromSecureProx) {
|
@if (!ViewBag.IsFromSecureProx) {
|
||||||
<div class="alert alert-warning alert-dismissable">
|
<div class="alert alert-warning alert-dismissable">
|
||||||
<markdown>
|
<markdown>
|
||||||
# Alerte, alerte!
|
## Connexion non chiffrée ##
|
||||||
|
|
||||||
Votre connexion n'est **pas** sécurisée.
|
Un accés plus sécurisé est disponible, mais le certificat qui le chiffre n'est pas certifié
|
||||||
|
|
||||||
Un accés sécurisé est disponible, mais le certificat qui le chiffre n'est pas certifié
|
|
||||||
comme il se devrait ...
|
comme il se devrait ...
|
||||||
|
|
||||||
Pour l'utiliser, vous devrez ajouter une exception pour lui, et continuer votre navigation,
|
|
||||||
malgré ce défaut de sécurité (ce sera toujours mieux que sans chiffrement).
|
|
||||||
|
|
||||||
---------------
|
|
||||||
Ainsi va la vie ...
|
|
||||||
</markdown>
|
</markdown>
|
||||||
|
<a data-dismiss="alert" class="btn close ">J'ai compris, et je continue avec cette connexion.</a>
|
||||||
<p>
|
<a href="@ViewBag.SecureHomeUrl" class="btn alert-link" >Accès sécurisé</a>
|
||||||
<a data-dismiss="alert" class="btn close ">J'ai compris, et je continue avec cette connexion.</a>
|
</div>
|
||||||
|
|
||||||
<a href="@ViewBag.SecureHomeUrl" class="btn close" >Lien vers le site sécurisé</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@model Yavsc.ViewModels.Manage.AddBankInfoViewModel
|
@model Yavsc.Models.Bank.BankIdentity
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = SR["Fill in your Bank Info"];
|
ViewData["Title"] = SR["Fill in your Bank Info"];
|
||||||
}
|
}
|
||||||
@ -12,43 +12,43 @@
|
|||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Data.BIC" class="col-md-2 control-label"></label>
|
<label asp-for="BIC" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Data.BIC" class="form-control" />
|
<input asp-for="BIC" class="form-control" />
|
||||||
<span asp-validation-for="Data.BIC" class="text-danger"></span>
|
<span asp-validation-for="BIC" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<label asp-for="Data.IBAN" class="col-md-2 control-label"></label>
|
<label asp-for="IBAN" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Data.IBAN" class="form-control" />
|
<input asp-for="IBAN" class="form-control" />
|
||||||
<span asp-validation-for="Data.IBAN" class="text-danger"></span>
|
<span asp-validation-for="IBAN" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
<label asp-for="Data.AccountNumber" class="col-md-2 control-label"></label>
|
<label asp-for="AccountNumber" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Data.AccountNumber" class="form-control" />
|
<input asp-for="AccountNumber" class="form-control" />
|
||||||
<span asp-validation-for="Data.AccountNumber" class="text-danger"></span>
|
<span asp-validation-for="AccountNumber" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label asp-for="Data.BankCode" class="col-md-2 control-label"></label>
|
<label asp-for="BankCode" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Data.BankCode" class="form-control" />
|
<input asp-for="BankCode" class="form-control" />
|
||||||
<span asp-validation-for="Data.BankCode" class="text-danger"></span>
|
<span asp-validation-for="BankCode" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label asp-for="Data.WicketCode" class="col-md-2 control-label"></label>
|
<label asp-for="WicketCode" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Data.WicketCode" class="form-control" />
|
<input asp-for="WicketCode" class="form-control" />
|
||||||
<span asp-validation-for="Data.WicketCode" class="text-danger"></span>
|
<span asp-validation-for="WicketCode" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label asp-for="Data.BankedKey" class="col-md-2 control-label"></label>
|
<label asp-for="BankedKey" class="col-md-2 control-label"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input asp-for="Data.BankedKey" class="form-control" />
|
<input asp-for="BankedKey" class="form-control" />
|
||||||
<span asp-validation-for="Data.BankedKey" class="text-danger"></span>
|
<span asp-validation-for="BankedKey" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
@model PerformerProfile
|
@model PerformerProfile
|
||||||
@{ ViewData["Title"] = SR["Your performer profile"]; }
|
@{ ViewData["Title"] = SR["Your performer profile"]; }
|
||||||
@section header{
|
@section header {
|
||||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
|
|
||||||
}
|
|
||||||
<style>
|
<style>
|
||||||
#map {
|
#map {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -11,7 +8,8 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
}
|
}
|
||||||
@section scripts{
|
@section scripts {
|
||||||
|
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
var config = {
|
var config = {
|
||||||
@ -206,4 +204,8 @@
|
|||||||
<form asp-controller="Manage" asp-action="UnsetActivity" method="post" class="form-horizontal" role="form">
|
<form asp-controller="Manage" asp-action="UnsetActivity" method="post" class="form-horizontal" role="form">
|
||||||
@Html.Hidden("PerfomerId")
|
@Html.Hidden("PerfomerId")
|
||||||
<button type="submit" class="btn btn-default">@SR["UnsetActivity"]</button>
|
<button type="submit" class="btn btn-default">@SR["UnsetActivity"]</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||||
|
|
||||||
|
|
||||||
|
50
Yavsc/Views/Manage/SetAddress.cshtml
Normal file
50
Yavsc/Views/Manage/SetAddress.cshtml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
@model Location
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#map {
|
||||||
|
width: 100%;
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<form asp-action="SetAddress">
|
||||||
|
<div asp-validation-summary="ValidationSummary.All" class="text-danger" id="ValidationSummary"></div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<label asp-for="Address" class="col-md-2 control-label">@SR["Address"]</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<input asp-for="Address" class="form-control" type="text" />
|
||||||
|
|
||||||
|
<span id="AddressError" asp-validation-for="Address" class="text-danger"></span>
|
||||||
|
<ul id="LocationCombo" >
|
||||||
|
</ul>
|
||||||
|
<div id="map"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="submit" class="btn btn-success" value="Enregistrer" />
|
||||||
|
|
||||||
|
@Html.HiddenFor(model=>model.Latitude)
|
||||||
|
@Html.HiddenFor(model=>model.Longitude)
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||||
|
|
||||||
|
@section scripts {
|
||||||
|
|
||||||
|
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
|
||||||
|
<script src="~/js/google-geoloc.js" asp-append-version="true"></script>
|
||||||
|
<script >
|
||||||
|
$(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"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#Address").googlegeocode()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<a href="https://twitter.com/intent/tweet?screen_name=TwitterDev"
|
||||||
|
class="twitter-mention-button" data-show-count="false">Tweet to @TwitterDev</a>
|
||||||
|
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
|
@ -45,14 +45,7 @@
|
|||||||
@RenderSection("header", required: false)
|
@RenderSection("header", required: false)
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@if (ViewData ["Notify"] != null) {
|
|
||||||
foreach (Notification n in ViewData ["Notify"] as IEnumerable<Notification>) {
|
|
||||||
<div class="alert alert-info alert-dismissable">
|
|
||||||
<h1>@n.title</h1>@n.body
|
|
||||||
<a class="close" data-dismiss="alert" aria-label="close" onclick="notifClick(@n.Id)">@((n.click_action==null)?SR["Fermer"]:SR[n.click_action])</a>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
|
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
@ -71,11 +64,25 @@
|
|||||||
<li><a asp-controller="Home" asp-action="Chat" class="navbar-link">@SR["Chat"]</a></li>
|
<li><a asp-controller="Home" asp-action="Chat" class="navbar-link">@SR["Chat"]</a></li>
|
||||||
<li><a asp-controller="Home" asp-action="Contact" class="navbar-link">@SR["Contact"]</a></li>
|
<li><a asp-controller="Home" asp-action="Contact" class="navbar-link">@SR["Contact"]</a></li>
|
||||||
<li><a asp-controller="Home" asp-action="About" class="navbar-link">@SR["About"] @SiteSettings.Value.Title</a> </li>
|
<li><a asp-controller="Home" asp-action="About" class="navbar-link">@SR["About"] @SiteSettings.Value.Title</a> </li>
|
||||||
|
@if (User.IsInRole(Constants.AdminGroupName)) {
|
||||||
|
<li><a asp-controller="Administration" asp-action="Index" class="navbar-link">Administration</a> </li>
|
||||||
|
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
@RenderSection("ctxmenu", required: false)
|
||||||
@await Html.PartialAsync("_LoginPartial")
|
@await Html.PartialAsync("_LoginPartial")
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@if (ViewData ["Notify"] != null) {
|
||||||
|
foreach (Notification n in ViewData ["Notify"] as IEnumerable<Notification>) {
|
||||||
|
<div class="alert alert-info alert-dismissable">
|
||||||
|
<h2 markdown="@n.title"></h2>
|
||||||
|
<a class="close" data-dismiss="alert" aria-label="close" onclick="notifClick(@n.Id)">@((n.click_action==null)?SR["Fermer"]:SR[n.click_action])</a>
|
||||||
|
<markdown>@n.body</markdown>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
@RenderSection("subbanner", required: false)
|
@RenderSection("subbanner", required: false)
|
||||||
<main class="container body-content" role="main">
|
<main class="container body-content" role="main">
|
||||||
@RenderBody()
|
@RenderBody()
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
||||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||||
</environment>
|
</environment>
|
||||||
<script src="~/js/jquery-ui.js" ></script>
|
|
||||||
<script src="~/lib/jquery-validation/additional-methods.js" charset="UTF-8"></script>
|
<script src="~/lib/jquery-validation/additional-methods.js" charset="UTF-8"></script>
|
||||||
<environment names="Staging,Production,yavsc,yavscpre,zicmoove,lua">
|
<environment names="Staging,Production,yavsc,yavscpre,zicmoove,lua">
|
||||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js"
|
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js"
|
||||||
|
4
Yavsc/wwwroot/css/main/bootstrap.css
vendored
4
Yavsc/wwwroot/css/main/bootstrap.css
vendored
@ -5091,8 +5091,8 @@ a.thumbnail.active {
|
|||||||
.alert-dismissable .close,
|
.alert-dismissable .close,
|
||||||
.alert-dismissible .close {
|
.alert-dismissible .close {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -2px;
|
top: 0;
|
||||||
right: -21px;
|
right: 0;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
.alert-success {
|
.alert-success {
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
/* Wrapping element */
|
/* Wrapping element */
|
||||||
/* Set some basic padding to keep content from hitting the edges */
|
/* Set some basic padding to keep content from hitting the edges */
|
||||||
|
|
||||||
|
.performer {
|
||||||
|
padding-left: 1em;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-image: url('/images/greenstar.svg');
|
||||||
|
}
|
||||||
|
.performer ul {
|
||||||
|
margin-left: 2.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.smalltofhol { max-height: 3em; max-width: 3em; float:left; margin:.5em; }
|
.smalltofhol { max-height: 3em; max-width: 3em; float:left; margin:.5em; }
|
||||||
.price {
|
.price {
|
||||||
@ -218,7 +226,9 @@ footer {
|
|||||||
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
|
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
|
||||||
font-stretch: condensed;
|
font-stretch: condensed;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
color: #444;
|
color: #ff8;
|
||||||
|
padding: .1em;
|
||||||
|
border-radius: .5em;
|
||||||
background-color: #210912;
|
background-color: #210912;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
423
Yavsc/wwwroot/images/greenstar.svg
Normal file
423
Yavsc/wwwroot/images/greenstar.svg
Normal file
@ -0,0 +1,423 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:ns1="http://sozi.baierouge.fr"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
id="svg2"
|
||||||
|
sodipodi:docname="New document 1"
|
||||||
|
viewBox="0 0 744.09 1052.4"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.2 r9819"
|
||||||
|
>
|
||||||
|
<defs
|
||||||
|
id="defs4"
|
||||||
|
>
|
||||||
|
<filter
|
||||||
|
id="filter3962"
|
||||||
|
inkscape:collect="always"
|
||||||
|
>
|
||||||
|
<feGaussianBlur
|
||||||
|
id="feGaussianBlur3964"
|
||||||
|
stdDeviation="14.937759"
|
||||||
|
inkscape:collect="always"
|
||||||
|
/>
|
||||||
|
</filter
|
||||||
|
>
|
||||||
|
<filter
|
||||||
|
id="filter3962-5"
|
||||||
|
color-interpolation-filters="sRGB"
|
||||||
|
inkscape:collect="always"
|
||||||
|
>
|
||||||
|
<feGaussianBlur
|
||||||
|
id="feGaussianBlur3964-1"
|
||||||
|
stdDeviation="14.937759"
|
||||||
|
inkscape:collect="always"
|
||||||
|
/>
|
||||||
|
</filter
|
||||||
|
>
|
||||||
|
<filter
|
||||||
|
id="filter3962-5-1"
|
||||||
|
color-interpolation-filters="sRGB"
|
||||||
|
inkscape:collect="always"
|
||||||
|
>
|
||||||
|
<feGaussianBlur
|
||||||
|
id="feGaussianBlur3964-1-1"
|
||||||
|
stdDeviation="14.937759"
|
||||||
|
inkscape:collect="always"
|
||||||
|
/>
|
||||||
|
</filter
|
||||||
|
>
|
||||||
|
</defs
|
||||||
|
>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
bordercolor="#666666"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-y="-4"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
inkscape:window-height="719"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:zoom="4.9055355"
|
||||||
|
inkscape:window-x="-4"
|
||||||
|
showgrid="false"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
inkscape:cx="426.89648"
|
||||||
|
inkscape:cy="580.44685"
|
||||||
|
inkscape:window-width="1024"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
/>
|
||||||
|
<g
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="Layer"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
id="path2985-5"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.68159;filter:url(#filter3962);stroke:#000000;stroke-linecap:round;fill:#222b00"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="308.78299"
|
||||||
|
sodipodi:r2="33.812248"
|
||||||
|
sodipodi:arg1="-0.68052122"
|
||||||
|
sodipodi:arg2="0.10487694"
|
||||||
|
transform="translate(216.85 -7.2305)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="469.50504"
|
||||||
|
sodipodi:cx="168.57143"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m408.57 275.22-206.37 197.82 160.66 236.47-197.83-206.38-236.46 160.66 206.37-197.82-160.65-236.46 197.82 206.37z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2985-5-7"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.68159;filter:url(#filter3962-5);stroke:#000000;stroke-linecap:round;fill:#677821"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="308.78299"
|
||||||
|
sodipodi:r2="33.812248"
|
||||||
|
sodipodi:arg1="-0.68052122"
|
||||||
|
sodipodi:arg2="0.10487694"
|
||||||
|
transform="matrix(.85789 .51384 -.51384 .85789 490.03 -43.074)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="469.50504"
|
||||||
|
sodipodi:cx="168.57143"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m408.57 275.22-206.37 197.82 160.66 236.47-197.83-206.38-236.46 160.66 206.37-197.82-160.65-236.46 197.82 206.37z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2985-5-7-5"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.68159;filter:url(#filter3962-5-1);stroke:#000000;stroke-linecap:round;fill:#89a02c"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="308.78299"
|
||||||
|
sodipodi:r2="33.812248"
|
||||||
|
sodipodi:arg1="-0.68052122"
|
||||||
|
sodipodi:arg2="0.10487694"
|
||||||
|
transform="matrix(.48272 .87577 -.87577 .48272 725.86 74.714)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="469.50504"
|
||||||
|
sodipodi:cx="168.57143"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m408.57 275.22-206.37 197.82 160.66 236.47-197.83-206.38-236.46 160.66 206.37-197.82-160.65-236.46 197.82 206.37z"
|
||||||
|
/>
|
||||||
|
</g
|
||||||
|
>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
id="path2985"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#222b00"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="308.78299"
|
||||||
|
sodipodi:r2="33.812248"
|
||||||
|
sodipodi:arg1="-0.68052122"
|
||||||
|
sodipodi:arg2="0.10487694"
|
||||||
|
transform="translate(221.93 -7.6428)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="469.50504"
|
||||||
|
sodipodi:cx="168.57143"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m408.57 275.22-206.37 197.82 160.66 236.47-197.83-206.38-236.46 160.66 206.37-197.82-160.65-236.46 197.82 206.37z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2989"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#445500"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="237.67583"
|
||||||
|
sodipodi:r2="26.025894"
|
||||||
|
sodipodi:arg1="1.7398976"
|
||||||
|
sodipodi:arg2="2.5252957"
|
||||||
|
transform="translate(233.59 -14.246)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="160"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m120 709.51 18.762-219.24-213.05-55.043 219.24 18.762 55.043-213.05-18.762 219.24 213.05 55.043-219.24-18.762z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#668000"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="translate(233.56 -12.676)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993-1"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#88aa00"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="matrix(.75245 -.42879 .42879 .75245 70.116 173.02)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993-1-7"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#aad400"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="matrix(.35360 -.53777 .53777 .35360 83.289 380.3)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993-1-7-4"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#ccff00"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="matrix(.022335 -.44239 .44239 .022335 182.03 522)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993-1-7-4-0"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#ddff55"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
inkscape:transform-center-x="74.779817"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
inkscape:transform-center-y="25.019476"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="matrix(-.15559 -.23697 .23697 -.15559 309.65 572.97)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993-1-7-4-8"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#e5ff80"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="matrix(-.031858 -.15423 .15423 -.031858 328.27 501.07)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993-1-7-4-8-8"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#e5ff80"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="matrix(-.086843 -.049011 .049011 -.086843 387.55 510.35)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993-1-7-4-8-8-2"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#eeffaa"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="matrix(-.051379 .023697 -.023697 -.051379 416.52 481.6)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
id="path2993-1-7-4-8-8-2-4"
|
||||||
|
style="stroke-linejoin:round;fill-opacity:.98039;stroke:#000000;stroke-linecap:round;fill:#f6ffd5"
|
||||||
|
sodipodi:type="star"
|
||||||
|
sodipodi:sides="4"
|
||||||
|
sodipodi:r1="159.23285"
|
||||||
|
sodipodi:r2="17.43626"
|
||||||
|
sodipodi:arg1="1.4085975"
|
||||||
|
sodipodi:arg2="2.1939957"
|
||||||
|
transform="matrix(-.0075125 .017226 -.017226 -.0075125 406.72 461.92)"
|
||||||
|
inkscape:randomized="0"
|
||||||
|
sodipodi:cy="475.21933"
|
||||||
|
sodipodi:cx="162.85715"
|
||||||
|
inkscape:rounded="-3.469447e-018"
|
||||||
|
inkscape:flatsided="false"
|
||||||
|
d="m188.57 632.36-35.89-142.98-146.97 11.55 142.99-35.89-11.56-146.96 35.89 142.98 146.97-11.55-142.98 35.89z"
|
||||||
|
/>
|
||||||
|
</g
|
||||||
|
>
|
||||||
|
<metadata
|
||||||
|
>
|
||||||
|
<rdf:RDF
|
||||||
|
>
|
||||||
|
<cc:Work
|
||||||
|
>
|
||||||
|
<dc:format
|
||||||
|
>image/svg+xml</dc:format
|
||||||
|
>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
||||||
|
/>
|
||||||
|
<cc:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/publicdomain/"
|
||||||
|
/>
|
||||||
|
<dc:publisher
|
||||||
|
>
|
||||||
|
<cc:Agent
|
||||||
|
rdf:about="http://openclipart.org/"
|
||||||
|
>
|
||||||
|
<dc:title
|
||||||
|
>Openclipart</dc:title
|
||||||
|
>
|
||||||
|
</cc:Agent
|
||||||
|
>
|
||||||
|
</dc:publisher
|
||||||
|
>
|
||||||
|
<dc:title
|
||||||
|
>Green Star</dc:title
|
||||||
|
>
|
||||||
|
<dc:date
|
||||||
|
>2012-05-28T15:51:10</dc:date
|
||||||
|
>
|
||||||
|
<dc:description
|
||||||
|
>Many four pointed stars on top of each other.</dc:description
|
||||||
|
>
|
||||||
|
<dc:source
|
||||||
|
>https://openclipart.org/detail/170275/green-star-by-mairor</dc:source
|
||||||
|
>
|
||||||
|
<dc:creator
|
||||||
|
>
|
||||||
|
<cc:Agent
|
||||||
|
>
|
||||||
|
<dc:title
|
||||||
|
>mairor</dc:title
|
||||||
|
>
|
||||||
|
</cc:Agent
|
||||||
|
>
|
||||||
|
</dc:creator
|
||||||
|
>
|
||||||
|
<dc:subject
|
||||||
|
>
|
||||||
|
<rdf:Bag
|
||||||
|
>
|
||||||
|
<rdf:li
|
||||||
|
>colours</rdf:li
|
||||||
|
>
|
||||||
|
<rdf:li
|
||||||
|
>green</rdf:li
|
||||||
|
>
|
||||||
|
<rdf:li
|
||||||
|
>shades</rdf:li
|
||||||
|
>
|
||||||
|
<rdf:li
|
||||||
|
>star</rdf:li
|
||||||
|
>
|
||||||
|
</rdf:Bag
|
||||||
|
>
|
||||||
|
</dc:subject
|
||||||
|
>
|
||||||
|
</cc:Work
|
||||||
|
>
|
||||||
|
<cc:License
|
||||||
|
rdf:about="http://creativecommons.org/licenses/publicdomain/"
|
||||||
|
>
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Reproduction"
|
||||||
|
/>
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Distribution"
|
||||||
|
/>
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#DerivativeWorks"
|
||||||
|
/>
|
||||||
|
</cc:License
|
||||||
|
>
|
||||||
|
</rdf:RDF
|
||||||
|
>
|
||||||
|
</metadata
|
||||||
|
>
|
||||||
|
</svg
|
||||||
|
>
|
After Width: | Height: | Size: 14 KiB |
88
Yavsc/wwwroot/js/google-geoloc.js
Normal file
88
Yavsc/wwwroot/js/google-geoloc.js
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
+(function($,maps){
|
||||||
|
$.widget("psc.googlegeocode" , {
|
||||||
|
options: {
|
||||||
|
mapId: 'map',
|
||||||
|
longId: 'Longitude',
|
||||||
|
latId: 'Latitude',
|
||||||
|
addrValidationId: 'AddressError',
|
||||||
|
formValidId: 'ValidationSummary',
|
||||||
|
locComboId: 'LocationCombo'
|
||||||
|
},
|
||||||
|
marker: null,
|
||||||
|
gmap: null,
|
||||||
|
|
||||||
|
_create: function() {
|
||||||
|
this.element.addClass("googlegeocode");
|
||||||
|
this.gmap = new maps.Map(document.getElementById(this.options.mapId), {
|
||||||
|
zoom: 16,
|
||||||
|
center: { lat: 48.862854, lng: 2.2056466 }
|
||||||
|
});
|
||||||
|
var _this =this;
|
||||||
|
this.element.rules("add",
|
||||||
|
{
|
||||||
|
remote: {
|
||||||
|
url: 'https://maps.googleapis.com/maps/api/geocode/json',
|
||||||
|
type: 'get',
|
||||||
|
data: {
|
||||||
|
sensor: false,
|
||||||
|
address: function () { return _this.element.val() }
|
||||||
|
},
|
||||||
|
dataType: 'json',
|
||||||
|
dataFilter: function(datastr) {
|
||||||
|
$('#'+_this.options.locComboId).html("");
|
||||||
|
var data = JSON.parse(datastr);
|
||||||
|
data.results.forEach(function(item) {
|
||||||
|
if (item.formatted_address !== _this.element.val()) {
|
||||||
|
$('<li>'+item.formatted_address+'</li>')
|
||||||
|
.data("geoloc",item)
|
||||||
|
.click(function() { _this.chooseLoc('user',item) })
|
||||||
|
.css('cursor','pointer')
|
||||||
|
.appendTo($('#'+_this.options.locComboId));}
|
||||||
|
else { }
|
||||||
|
});
|
||||||
|
if ((data.status === 'OK') && (data.results.length == 1))
|
||||||
|
{
|
||||||
|
// _this.chooseLoc('google',data.results[0]);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
error: function()
|
||||||
|
{
|
||||||
|
// xhr, textStatus, errorThrown console.log('ajax loading error ... '+textStatus+' ... '+ errorThrown);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})},
|
||||||
|
chooseLoc: function(sender,loc) {
|
||||||
|
if (sender === 'user') this.element.val(loc.formatted_address);
|
||||||
|
var pos = loc.geometry.location;
|
||||||
|
var lat = new Number(pos.lat);
|
||||||
|
var lng = new Number(pos.lng);
|
||||||
|
$(document.getElementById(this.options.latId)).val(lat.toLocaleString('en'));
|
||||||
|
$(document.getElementById(this.options.longId)).val(lng.toLocaleString('en'));
|
||||||
|
this.gmap.setCenter(pos);
|
||||||
|
if (this.marker) {
|
||||||
|
this.marker.setMap(null);
|
||||||
|
}
|
||||||
|
this.marker = new maps.Marker({
|
||||||
|
map: this.gmap,
|
||||||
|
draggable: true,
|
||||||
|
animation: maps.Animation.DROP,
|
||||||
|
position: pos
|
||||||
|
});
|
||||||
|
maps.event.addListener(this.marker, 'dragend', function() {
|
||||||
|
// TODO reverse geo code
|
||||||
|
var pos = this.marker.getPosition();
|
||||||
|
$('#'+this.options.latId).val(pos.lat);
|
||||||
|
$('#'+this.options.longId).val(pos.lng);
|
||||||
|
});
|
||||||
|
this.element.valid();
|
||||||
|
$('#'+this.options.addrValidationId).empty();
|
||||||
|
$('#'+this.options.formValidId).empty();
|
||||||
|
$('#'+this.options.locComboId).empty();
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})(jQuery,google.maps)
|
97
Yavsc/wwwroot/js/parallax.js
Normal file
97
Yavsc/wwwroot/js/parallax.js
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
//
|
||||||
|
// parralax.js
|
||||||
|
//
|
||||||
|
// Author:
|
||||||
|
// Paul Schneider <paul@pschneider.fr>
|
||||||
|
//
|
||||||
|
// Copyright (c) 2015 GNU GPL
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function($){
|
||||||
|
var $window = $(window);
|
||||||
|
var $stwidth = $(window).width();
|
||||||
|
var $stheight = $(window).height();
|
||||||
|
|
||||||
|
var onPos = function (bgobj,ax,ay) {
|
||||||
|
var speed = bgobj.data('speed');
|
||||||
|
var dx=($window.scrollLeft()+ax-$stwidth/2)/speed;
|
||||||
|
var dy=($window.scrollTop()+ay-$stheight/2)/speed;
|
||||||
|
var xPos = bgobj.attr('orgbgpx') - Math.round( dx );
|
||||||
|
var yPos = bgobj.attr('orgbgpy') - Math.round( dy );
|
||||||
|
// Put together our final background position
|
||||||
|
var coords = '' + xPos + bgobj.attr('orgbgpxu') + yPos + bgobj.attr('orgbgpyu');
|
||||||
|
// Move the background
|
||||||
|
bgobj.css({ backgroundPosition: coords });
|
||||||
|
};
|
||||||
|
var tiltLR=0;
|
||||||
|
var titleFB=0;
|
||||||
|
|
||||||
|
$('[data-type="background"]').each(function(){
|
||||||
|
var $bgobj = $(this); // assigning the object
|
||||||
|
// get the initial background position, assumes a "X% Yem" ?
|
||||||
|
var orgpos = $bgobj.css('backgroundPosition');
|
||||||
|
var bgpos = orgpos.split(" ");
|
||||||
|
|
||||||
|
var bgposx = bgpos[0];
|
||||||
|
var bgposy = bgpos[1];
|
||||||
|
if (/%$/.test(bgposx)){
|
||||||
|
bgposx = bgposx.substr(0,bgposx.length-1);
|
||||||
|
$bgobj.attr('orgbgpxu','% ');
|
||||||
|
}
|
||||||
|
else if (/em$/.test(bgposx)){
|
||||||
|
bgposx = bgposx.substr(0,bgposx.length-2);
|
||||||
|
$bgobj.attr('orgbgpxu','em ');
|
||||||
|
}
|
||||||
|
else if (/px$/.test(bgposx)){
|
||||||
|
bgposx = bgposx.substr(0,bgposx.length-2);
|
||||||
|
$bgobj.attr('orgbgpxu','px ');
|
||||||
|
}
|
||||||
|
else { $bgobj.attr('orgbgpxu','px '); }
|
||||||
|
|
||||||
|
if (/%$/.test(bgposy)){
|
||||||
|
bgposy = bgposy.substr(0,bgposy.length-1);
|
||||||
|
$bgobj.attr('orgbgpyu','% ');
|
||||||
|
}
|
||||||
|
else if (/em$/.test(bgposy)){
|
||||||
|
bgposy = bgposy.substr(0,bgposy.length-2);
|
||||||
|
$bgobj.attr('orgbgpyu','em ');
|
||||||
|
}
|
||||||
|
else if (/px$/.test(bgposy)){
|
||||||
|
bgposy = bgposy.substr(0,bgposy.length-2);
|
||||||
|
$bgobj.attr('orgbgpyu','px ');
|
||||||
|
}
|
||||||
|
else { $bgobj.attr('orgbgpyu','px '); }
|
||||||
|
$bgobj.attr('orgbgpx',parseInt(bgposx));
|
||||||
|
$bgobj.attr('orgbgpy',parseInt(bgposy));
|
||||||
|
|
||||||
|
$(window).scroll(function() {
|
||||||
|
onPos($bgobj,tiltLR,titleFB);
|
||||||
|
});
|
||||||
|
if (window.DeviceOrientationEvent) {
|
||||||
|
if ($stwidth>320 && $stheight>320) {
|
||||||
|
window.addEventListener('deviceorientation', function(event) {
|
||||||
|
tiltLR = $stwidth*Math.sin(event.gamma*Math.PI/180);
|
||||||
|
titleFB = $stheight*Math.sin(event.beta*Math.PI/90);
|
||||||
|
onPos($bgobj,tiltLR,titleFB);
|
||||||
|
},false); }
|
||||||
|
$(window).mousemove(function(e) {
|
||||||
|
tiltLR = e.pageX;
|
||||||
|
titleFB = e.pageY;
|
||||||
|
onPos($bgobj,e.pageX,e.pageY);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}(jQuery));
|
@ -5,6 +5,6 @@ namespace YavscLib.HairCut
|
|||||||
long Id { get; set; }
|
long Id { get; set; }
|
||||||
long PrestationId { get; set; }
|
long PrestationId { get; set; }
|
||||||
|
|
||||||
long LocationId { get; set; }
|
long? LocationId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user