This commit is contained in:
2017-05-30 23:42:04 +02:00
parent 30e3e52e8c
commit cde5d56bba
10 changed files with 28 additions and 24 deletions

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace Yavsc.Billing
{
public interface IBillable {
string Description { get; set; }
string GetDescription ();
List<IBillItem> GetBillItems();
long Id { get; set; }

View File

@ -14,8 +14,10 @@ namespace Yavsc.Models.Billing
public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery, IIdentified<long>
{
public string GetInvoiceId() { return GetType().Name + "/" + Id; }
public abstract long Id { get; set; }
public abstract string Description { get; set; }
public abstract string GetDescription ();
[Required()]
public bool Consent { get; set; }

View File

@ -13,13 +13,13 @@ namespace Yavsc.Models.Haircut
{
// Bill description
public override string Description
public override string GetDescription()
{
get;
set;
var type = Startup.GlobalLocalizer[this.GetType().Name];
var gender = Startup.GlobalLocalizer[this.Prestation.Gender.ToString()];
return $"{type} ({gender})";
}
= "Prestation en coiffure à domicile";
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
override public long Id { get; set; }

View File

@ -24,13 +24,11 @@ namespace Yavsc.Models.Haircut
public class HairMultiCutQuery : NominativeServiceCommand
{
// Bill description
public override string Description
// Bill description
public override string GetDescription()
{
get;
set;
} = "Prestation en coiffure à domicile [commande groupée]";
return "Prestation en coiffure à domicile [commande groupée]";
}
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
override public long Id { get; set; }

View File

@ -42,12 +42,10 @@ namespace Yavsc.Models.Workflow
[Display(Name="GiveAnExplicitReason")]
public string Reason { get; set; }
public override string Description
public override string GetDescription ()
{
get;
set;
} = "Rendez-vous";
return "Rendez-vous";
}
public RdvQuery()
{

View File

@ -243,7 +243,7 @@
<data name="Google error"><value>Erreur Google : {0}</value></data>
<data name="Google registration id"><value>Identifiant d'enregistrement Google</value></data>
<data name="HalfLong"><value>mi-long</value></data>
<data name="HaircutRdvQuery"><value>Demande de préstation en coiffure à domicile</value></data>
<data name="HairCutQuery"><value>Demande de préstation en coiffure à domicile</value></data>
<data name="Hide source"><value>Cacher le texte source de l'article</value></data>
<data name="Home"><value>Accueil</value></data>
<data name="Hide"><value>Cacher</value></data>

View File

@ -10,17 +10,17 @@ namespace Yavsc
/// <returns></returns>
public string Mode { get; set; }
/// <summary>
///
/// Client Id using the REST API
/// </summary>
public string ClientId { get; set; }
/// <summary>
/// For sandbox only?
/// Client Secret using the REST API
/// </summary>
/// <returns></returns>
public string ClientSecret { get; set; }
/// <summary>
/// Your application id ...
/// Application Id using the REST API
/// </summary>
/// <returns></returns>
public string ApplicationId { get; set; }

View File

@ -38,6 +38,8 @@ namespace Yavsc
public string Street { get; set; }
public string PostalCode { get; set; }
public string CountryCode { get; set; }
public string HomeViewName { get; set; }
/// <summary>
/// Specifies the directory where should be
/// generated pdf files using pandoc

View File

@ -27,6 +27,7 @@ namespace Yavsc
{
using System.Net;
using Formatters;
using Microsoft.Extensions.Localization;
using Models;
using PayPal.Manager;
using Services;
@ -38,6 +39,7 @@ namespace Yavsc
public static string AvatarsDirName { private set; get; }
public static string Authority { get; private set; }
public static string Temp { get; set; }
public static string HomeViewName { get; set; } = "Home";
public static SiteSettings SiteSetup { get; private set; }
public static PayPalSettings PayPalSettings { get; private set; }
@ -233,7 +235,7 @@ namespace Yavsc
});
}
public static IStringLocalizer GlobalLocalizer { get; private set; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env,
IOptions<SiteSettings> siteSettings,
@ -242,8 +244,10 @@ namespace Yavsc
RoleManager<IdentityRole> roleManager,
IAuthorizationService authorizationService,
IOptions<PayPalSettings> payPalSettings,
IStringLocalizer<Yavsc.Resources.YavscLocalisation> localizer,
ILoggerFactory loggerFactory)
{
GlobalLocalizer = localizer;
SiteSetup = siteSettings.Value;
Authority = siteSettings.Value.Authority;
Startup.UserFilesDirName = new DirectoryInfo(siteSettings.Value.UserFiles.Blog).FullName;

View File

@ -1 +1 @@
+function(t,e){t.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 e.Map(document.getElementById(this.options.mapId),{zoom:16,center:{lat:48.862854,lng:2.2056466}});var o=this;this.element.rules("add",{remote:{url:"https://maps.googleapis.com/maps/api/geocode/json",type:"get",data:{sensor:!1,address:function(){return o.element.val()}},dataType:"json",dataFilter:function(e){t("#"+o.options.locComboId).html("");var a=JSON.parse(e);return a.results.forEach(function(e){e.formatted_address!==o.element.val()&&t("<li>"+e.formatted_address+"</li>").data("geoloc",e).click(function(){o.chooseLoc("user",e)}).css("cursor","pointer").appendTo(t("#"+o.options.locComboId))}),"OK"===a.status&&1==a.results.length?!0:!1},error:function(){return!1}}})},chooseLoc:function(o,a){"user"===o&&this.element.val(a.formatted_address);var n=a.geometry.location,s=new Number(n.lat),i=new Number(n.lng);return t(document.getElementById(this.options.latId)).val(s.toLocaleString("en")),t(document.getElementById(this.options.longId)).val(i.toLocaleString("en")),this.gmap.setCenter(n),this.marker&&this.marker.setMap(null),this.marker=new e.Marker({map:this.gmap,draggable:!0,animation:e.Animation.DROP,position:n}),e.event.addListener(this.marker,"dragend",function(){var e=this.marker.getPosition();t("#"+this.options.latId).val(e.lat),t("#"+this.options.longId).val(e.lng)}),this.element.valid(),t("#"+this.options.addrValidationId).empty(),t("#"+this.options.formValidId).empty(),t("#"+this.options.locComboId).empty(),this}})}(jQuery,google.maps);
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t,e){t.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 e.Map(document.getElementById(this.options.mapId),{zoom:16,center:{lat:48.862854,lng:2.2056466}});var o=this;this.element.rules("add",{remote:{url:"https://maps.googleapis.com/maps/api/geocode/json",type:"get",data:{sensor:!1,address:function(){return o.element.val()}},dataType:"json",dataFilter:function(e){t("#"+o.options.locComboId).html("");var a=JSON.parse(e);return a.results.forEach(function(e){e.formatted_address!==o.element.val()&&t("<li>"+e.formatted_address+"</li>").data("geoloc",e).click(function(){o.chooseLoc("user",e)}).css("cursor","pointer").appendTo(t("#"+o.options.locComboId))}),"OK"===a.status&&1==a.results.length?!0:!1},error:function(){return!1}}})},chooseLoc:function(o,a){"user"===o&&this.element.val(a.formatted_address);var n=a.geometry.location,r=new Number(n.lat),i=new Number(n.lng);return t(document.getElementById(this.options.latId)).val(r.toLocaleString("en")),t(document.getElementById(this.options.longId)).val(i.toLocaleString("en")),this.gmap.setCenter(n),this.marker&&this.marker.setMap(null),this.marker=new e.Marker({map:this.gmap,draggable:!0,animation:e.Animation.DROP,position:n}),e.event.addListener(this.marker,"dragend",function(){var e=this.marker.getPosition();t("#"+this.options.latId).val(e.lat),t("#"+this.options.longId).val(e.lng)}),this.element.valid(),t("#"+this.options.addrValidationId).empty(),t("#"+this.options.formValidId).empty(),t("#"+this.options.locComboId).empty(),this}})}(jQuery,google.maps);