refactoring
This commit is contained in:
@ -12,7 +12,7 @@ namespace Yavsc.Controllers
|
|||||||
using System;
|
using System;
|
||||||
using Yavsc.Models.Messaging;
|
using Yavsc.Models.Messaging;
|
||||||
using Yavsc.Models;
|
using Yavsc.Models;
|
||||||
using Yavsc.Models.Booking;
|
using Yavsc.Models.Workflow;
|
||||||
|
|
||||||
[Produces("application/json")]
|
[Produces("application/json")]
|
||||||
[Route("api/bookquery"), Authorize(Roles = "Performer,Administrator")]
|
[Route("api/bookquery"), Authorize(Roles = "Performer,Administrator")]
|
||||||
|
@ -9,15 +9,15 @@ using Microsoft.Data.Entity;
|
|||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.OptionsModel;
|
using Microsoft.Extensions.OptionsModel;
|
||||||
using Yavsc.Helpers;
|
|
||||||
using Yavsc.Models;
|
|
||||||
using Yavsc.Models.Booking;
|
|
||||||
using Yavsc.Models.Google.Messaging;
|
|
||||||
using Yavsc.Services;
|
|
||||||
|
|
||||||
namespace Yavsc.Controllers
|
namespace Yavsc.Controllers
|
||||||
{
|
{
|
||||||
|
using Helpers;
|
||||||
|
using Models;
|
||||||
|
using Models.Google.Messaging;
|
||||||
using Models.Relationship;
|
using Models.Relationship;
|
||||||
|
using Models.Workflow;
|
||||||
|
using Services;
|
||||||
|
|
||||||
[ServiceFilter(typeof(LanguageActionFilter))]
|
[ServiceFilter(typeof(LanguageActionFilter))]
|
||||||
public class CommandController : Controller
|
public class CommandController : Controller
|
||||||
@ -185,7 +185,7 @@ namespace Yavsc.Controllers
|
|||||||
await _emailSender.SendEmailAsync(
|
await _emailSender.SendEmailAsync(
|
||||||
_siteSettings, _smtpSettings,
|
_siteSettings, _smtpSettings,
|
||||||
command.PerformerProfile.Performer.Email,
|
command.PerformerProfile.Performer.Email,
|
||||||
yaev.Topic+" "+yaev.Client.UserName,
|
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"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -9,14 +9,14 @@ using Microsoft.AspNet.Http;
|
|||||||
using Microsoft.AspNet.Mvc;
|
using Microsoft.AspNet.Mvc;
|
||||||
using Microsoft.Data.Entity;
|
using Microsoft.Data.Entity;
|
||||||
using Microsoft.Extensions.OptionsModel;
|
using Microsoft.Extensions.OptionsModel;
|
||||||
using Yavsc.Helpers;
|
|
||||||
using Yavsc.Models;
|
|
||||||
using Yavsc.Models.Billing;
|
|
||||||
using Yavsc.Models.Booking;
|
|
||||||
using Yavsc.ViewModels;
|
|
||||||
|
|
||||||
namespace Yavsc.Controllers
|
namespace Yavsc.Controllers
|
||||||
{
|
{
|
||||||
|
using Helpers;
|
||||||
|
using Models;
|
||||||
|
using Models.Billing;
|
||||||
|
using Models.Workflow;
|
||||||
|
using ViewModels;
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public class EstimateController : Controller
|
public class EstimateController : Controller
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ namespace Yavsc.Controllers
|
|||||||
{
|
{
|
||||||
using Helpers;
|
using Helpers;
|
||||||
using Models;
|
using Models;
|
||||||
using Models.Booking;
|
using Models.Workflow;
|
||||||
using ViewModels.FrontOffice;
|
using ViewModels.FrontOffice;
|
||||||
public class FrontOfficeController : Controller
|
public class FrontOfficeController : Controller
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
using Yavsc.Models.Booking;
|
|
||||||
using Yavsc.Models.Messaging;
|
|
||||||
|
|
||||||
namespace Yavsc.Helpers
|
namespace Yavsc.Helpers
|
||||||
{
|
{
|
||||||
|
using Models.Workflow;
|
||||||
|
using Models.Messaging;
|
||||||
public static class EventHelpers
|
public static class EventHelpers
|
||||||
{
|
{
|
||||||
public static BookQueryEvent CreateEvent(this BookQuery query,
|
public static BookQueryEvent CreateEvent(this BookQuery query,
|
||||||
|
@ -10,8 +10,8 @@ using System.Threading;
|
|||||||
|
|
||||||
namespace Yavsc.Models
|
namespace Yavsc.Models
|
||||||
{
|
{
|
||||||
using Relationship;
|
using Relationship;
|
||||||
using Forms;
|
using Forms;
|
||||||
using YavscLib;
|
using YavscLib;
|
||||||
using Auth;
|
using Auth;
|
||||||
using Billing;
|
using Billing;
|
||||||
@ -24,6 +24,7 @@ namespace Yavsc.Models
|
|||||||
using Messaging;
|
using Messaging;
|
||||||
using Access;
|
using Access;
|
||||||
using Booking.Profiles;
|
using Booking.Profiles;
|
||||||
|
using Yavsc.Models.Workflow.Profiles;
|
||||||
|
|
||||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||||
{
|
{
|
||||||
|
@ -8,8 +8,7 @@ using System.Linq;
|
|||||||
namespace Yavsc.Models.Billing
|
namespace Yavsc.Models.Billing
|
||||||
{
|
{
|
||||||
using Interfaces;
|
using Interfaces;
|
||||||
using Models.Booking;
|
using Models.Workflow;
|
||||||
using Yavsc.Models.Workflow;
|
|
||||||
|
|
||||||
public partial class Estimate : IEstimate
|
public partial class Estimate : IEstimate
|
||||||
{
|
{
|
||||||
|
@ -20,11 +20,11 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
using Yavsc.Models.Booking;
|
|
||||||
using Yavsc.Models.Messaging;
|
|
||||||
|
|
||||||
namespace Yavsc.Models.Calendar
|
namespace Yavsc.Models.Calendar
|
||||||
{
|
{
|
||||||
|
using Models.Workflow;
|
||||||
|
using Models.Messaging;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// I calendar manager.
|
/// I calendar manager.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -3,12 +3,11 @@ using System.ComponentModel.DataAnnotations;
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Yavsc.Models.Booking
|
namespace Yavsc.Models.Workflow
|
||||||
{
|
{
|
||||||
using YavscLib;
|
using YavscLib;
|
||||||
using Yavsc.Models.Billing;
|
using Yavsc.Models.Billing;
|
||||||
using Yavsc.Models.Relationship;
|
using Yavsc.Models.Relationship;
|
||||||
using Yavsc.Models.Workflow;
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query, for a date, with a given perfomer, at this given place.
|
/// Query, for a date, with a given perfomer, at this given place.
|
||||||
/// </summary>
|
/// </summary>
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Yavsc.Models.Booking.Profiles
|
namespace Yavsc.Models.Workflow.Profiles
|
||||||
{
|
{
|
||||||
using Models.Workflow;
|
using Models.Workflow;
|
||||||
using YavscLib;
|
using YavscLib;
|
@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Yavsc.Models.Market;
|
using Yavsc.Models.Market;
|
||||||
|
|
||||||
namespace Yavsc.Models.Booking
|
namespace Yavsc.Models.Workflow
|
||||||
{
|
{
|
||||||
using Models.Relationship;
|
using Models.Relationship;
|
||||||
/// <summary>
|
/// <summary>
|
9
Yavsc/Models/haircut/HairCutGenders.cs
Normal file
9
Yavsc/Models/haircut/HairCutGenders.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace Yavsc.Models.haircut
|
||||||
|
{
|
||||||
|
public enum HairCutGenders : int
|
||||||
|
{
|
||||||
|
Kid = 1,
|
||||||
|
Man,
|
||||||
|
Women
|
||||||
|
}
|
||||||
|
}
|
31
Yavsc/Models/haircut/HairCutQueryEvent.cs
Normal file
31
Yavsc/Models/haircut/HairCutQueryEvent.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
namespace Yavsc.Models.Messaging
|
||||||
|
{
|
||||||
|
public class HairCutQueryEvent : BookQueryProviderInfo, IEvent
|
||||||
|
{
|
||||||
|
public HairCutQueryEvent()
|
||||||
|
{
|
||||||
|
Topic = "HairCutQuery";
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Message
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Sender
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Topic
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
Yavsc/Models/haircut/HairDressings.cs
Normal file
7
Yavsc/Models/haircut/HairDressings.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace Yavsc.Models.haircut
|
||||||
|
{
|
||||||
|
public enum HairDressings {
|
||||||
|
Brushing,
|
||||||
|
Folding
|
||||||
|
}
|
||||||
|
}
|
9
Yavsc/Models/haircut/HairLength.cs
Normal file
9
Yavsc/Models/haircut/HairLength.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace Yavsc.Models.haircut
|
||||||
|
{
|
||||||
|
public enum HairLength : int
|
||||||
|
{
|
||||||
|
Short = 1,
|
||||||
|
HalfLong,
|
||||||
|
Long
|
||||||
|
}
|
||||||
|
}
|
22
Yavsc/Models/haircut/HairPrestation.cs
Normal file
22
Yavsc/Models/haircut/HairPrestation.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Yavsc.Models.haircut
|
||||||
|
{
|
||||||
|
public class HairPrestation
|
||||||
|
{
|
||||||
|
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public long Id { get; set;}
|
||||||
|
|
||||||
|
public HairLength Length { get; set; }
|
||||||
|
public HairCutGenders Gender { get; set; }
|
||||||
|
public bool Cut { get; set; }
|
||||||
|
|
||||||
|
public HairDressings Dressing { get; set; }
|
||||||
|
public HairTechnos Tech { get; set; }
|
||||||
|
public bool Shampoo { get; set; }
|
||||||
|
public HairTaint[] Taints { get; set; }
|
||||||
|
public bool Cares { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
16
Yavsc/Models/haircut/HairTaint.cs
Normal file
16
Yavsc/Models/haircut/HairTaint.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
namespace Yavsc.Models.haircut
|
||||||
|
{
|
||||||
|
public class HairTaint
|
||||||
|
{
|
||||||
|
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public long Id { get; set;}
|
||||||
|
|
||||||
|
public long Name { get; set; }
|
||||||
|
|
||||||
|
public Color Color {get; set;}
|
||||||
|
}
|
||||||
|
}
|
13
Yavsc/Models/haircut/HairTechnos.cs
Normal file
13
Yavsc/Models/haircut/HairTechnos.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
namespace Yavsc.Models.haircut
|
||||||
|
{
|
||||||
|
|
||||||
|
public enum HairTechnos
|
||||||
|
{
|
||||||
|
Color,
|
||||||
|
Permanent,
|
||||||
|
Defris,
|
||||||
|
Mech,
|
||||||
|
Balayage,
|
||||||
|
TyAndDie
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,7 @@ using Microsoft.AspNet.Authorization;
|
|||||||
|
|
||||||
namespace Yavsc.ViewModels.Auth.Handlers
|
namespace Yavsc.ViewModels.Auth.Handlers
|
||||||
{
|
{
|
||||||
using Models.Booking;
|
using Models.Workflow;
|
||||||
public class CommandEditHandler : AuthorizationHandler<EditRequirement, BookQuery>
|
public class CommandEditHandler : AuthorizationHandler<EditRequirement, BookQuery>
|
||||||
{
|
{
|
||||||
protected override void Handle(AuthorizationContext context, EditRequirement requirement, BookQuery resource)
|
protected override void Handle(AuthorizationContext context, EditRequirement requirement, BookQuery resource)
|
||||||
|
@ -3,7 +3,7 @@ using Microsoft.AspNet.Authorization;
|
|||||||
|
|
||||||
namespace Yavsc.ViewModels.Auth.Handlers
|
namespace Yavsc.ViewModels.Auth.Handlers
|
||||||
{
|
{
|
||||||
using Models.Booking;
|
using Models.Workflow;
|
||||||
public class CommandViewHandler : AuthorizationHandler<ViewRequirement, BookQuery>
|
public class CommandViewHandler : AuthorizationHandler<ViewRequirement, BookQuery>
|
||||||
{
|
{
|
||||||
protected override void Handle(AuthorizationContext context, ViewRequirement requirement, BookQuery resource)
|
protected override void Handle(AuthorizationContext context, ViewRequirement requirement, BookQuery resource)
|
||||||
|
4
Yavsc/wwwroot/css/site.min.css
vendored
4
Yavsc/wwwroot/css/site.min.css
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user