Merge branch 'vnext' of https://github.com/pazof/yavsc into vnext

* 'vnext' of https://github.com/pazof/yavsc: (38 commits)
fixe le premier démarrage
Corrige le mot de passe perdu d'un utilisateur au nom contenant des
espaces
traductions
fixe la reccupération du mot de passe
refabrique:
MEP index blogs
Specialized the book query notification
Updated the Licence validity
cleaned up log warnings
label event date
cleans the code
Adds support for SIREN exceptions to validation from the external
provider
layout
trads
refactoring
refactoring
Google maps: a map
image
implements an AccessDenied page
A better layout
...

# Conflicts:
#	Yavsc.Api/project.lock.json
#	Yavsc.Client/Yavsc.Client.csproj
#	Yavsc.Client/packages.config
#	sendmsg/Program.cs
This commit is contained in:
Paul Schneider 2016-07-30 22:51:19 +02:00
commit e3a73e8146
190 changed files with 6664 additions and 763 deletions

View file

@ -0,0 +1,40 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
namespace Yavsc.Models
{
public class Activity
{
[StringLength(512),Required,Key]
public string Code {get; set;}
/// <summary>
///
/// </summary>
/// <returns></returns>
[StringLength(512),Required()]
public string Name {get; set;}
public string Description {get; set;}
/// <summary>
/// Name to associate to a performer in this activity domain
/// </summary>
/// <returns></returns>
public string ActorDenomination {get; set;}
public string Photo {get; set;}
[InverseProperty("Context")]
public List<Service> Services { get; set; }
/// <summary>
/// Moderation settings
/// </summary>
/// <returns></returns>
string ModeratorGroupName { get; set; }
}
}

View file

@ -0,0 +1,8 @@
namespace Yavsc.Models
{
public interface IRequisition
{
bool Eval();
}
}

View file

@ -0,0 +1,62 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
namespace Yavsc.Models.Workflow
{
public class PerformerProfile {
[Key]
public string PerformerId { get; set; }
[ForeignKey("PerformerId"),Display(Name="Performer")]
public virtual ApplicationUser Performer { get; set; }
[Display(Name="Activity"),Required]
public string ActivityCode { get; set; }
public Service Offer { get; set; }
[Required,StringLength(14),Display(Name="SIREN"),
RegularExpression(@"^[0-9]{9,14}$", ErrorMessage = "Only numbers are allowed here")]
public string SIREN { get; set; }
public long OrganizationAddressId { get; set; }
[Required,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")]
public virtual Location OrganizationAddress { get; set; }
[ForeignKey("ActivityCode"),Display(Name="Activity")]
public virtual Activity Activity { get; set; }
[Display(Name="Accept notifications on client query")]
public bool AcceptNotifications { get; set; }
[Display(Name="Accept notifications from non-VIP users")]
public bool AcceptPublicContact { get; set; }
[Display(Name="Allow my geo-localization, nearby my clients")]
public bool AcceptGeoLocalization { get; set; }
[Display(Name="Web site")]
public string WebSite { get; set; }
[Display(Name="Active")]
public bool Active { get; set; }
[Display(Name="Maximal Daily Cost (euro/day)")]
public int? MaxDailyCost { get; set; }
[Display(Name="Minimal Daily Cost (euro/day)")]
public int? MinDailyCost { get; set; }
[Display(Name="Rate from clients")]
public int Rate { get; set; }
[NotMapped]
public bool DoesBlog { get {
return Performer?.Posts != null ? Performer.Posts.Count > 0 : false;
} }
}
}

View file

@ -0,0 +1,9 @@
using System.Threading.Tasks;
namespace Yavsc.Models
{
public abstract class Action<TResult,TInput>
{
public abstract Task<TResult> GetTask(TInput data);
}
}

View file

@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace Yavsc.Models
{
public class Conjonction : List<IRequisition>, IRequisition
{
public bool Eval()
{
foreach (var req in this)
if (!req.Eval())
return false;
return true;
}
}
}

View file

@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace Yavsc.Models
{
public class Disjonction : List<IRequisition>, IRequisition
{
public bool Eval()
{
foreach (var req in this)
if (req.Eval())
return true;
return false;
}
}
}

View file

@ -0,0 +1,12 @@
namespace Yavsc.Models
{
public class ConstInputValue : NamedRequisition
{
public bool Value { get; set; }
public override bool Eval()
{
return Value;
}
}
}

View file

@ -0,0 +1,9 @@
namespace Yavsc.Models
{
public abstract class NamedRequisition : IRequisition
{
public string Name { get; set; }
public abstract bool Eval();
}
}

View file

@ -0,0 +1,16 @@
namespace Yavsc.Models
{
public class Negation<Exp> : IRequisition where Exp : IRequisition
{
Exp _expression;
public Negation(Exp expression)
{
_expression = expression;
}
public bool Eval()
{
return !_expression.Eval();
}
}
}

View file

@ -0,0 +1,34 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models
{
/// <summary>
/// An abstract, identified rule
/// </summary>
public class Rule<TResult,TInput>
{
[Key]
public string Id { get; set; }
/// <summary>
/// Left part for this rule, a conjonction.
/// All of these requisitions must be true
/// in order to begin any related process.
/// </summary>
/// <returns></returns>
public Conjonction Left { get; set; }
/// <summary>
/// Right part of this rule, a disjonction.
/// That is, only one of these post requisitions
/// has to be true in order for this rule
/// to expose a success.
/// </summary>
/// <returns></returns>
public Disjonction Right { get; set; }
public string Description { get; set; }
public Action<TResult,TInput> Execution { get; set; }
}
}

View file

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class Projet
{
[Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[ForeignKeyAttribute("AspNetUsers.Id")]
public string ManagerId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
}

View file

@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models {
public class Skill {
public string Name { get; set; }
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
/// <summary>
/// indice de recherche de cette capacité
/// rendu par le système.
/// Valide entre 0 et 100,
/// Il démarre à 0.
/// </summary>
public int Rate { get; set; }
}
}

View file

@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class UserSkills
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[ForeignKeyAttribute("AspNetUsers.Id")]
public string UserId { get; set; }
[ForeignKeyAttribute("Skill.Id")]
public long SkillId { get; set; }
public string Comment { get; set; }
public int Rate { get; set; }
}
}

View file

@ -0,0 +1,10 @@
namespace Yavsc.Models
{
public partial class hr
{
public string userid { get; set; }
public string comment { get; set; }
public decimal rate { get; set; }
}
}

View file

@ -0,0 +1,9 @@
namespace Yavsc.Models
{
public partial class taskdeps
{
public long taskId { get; set; }
public long deptask { get; set; }
}
}

View file

@ -0,0 +1,14 @@
using System;
namespace Yavsc.Models
{
public partial class tasks
{
public long id { get; set; }
public DateTime endd { get; set; }
public string name { get; set; }
public long prid { get; set; }
public DateTime start { get; set; }
public string tdesc { get; set; }
}
}

View file

@ -0,0 +1,10 @@
namespace Yavsc.Models
{
public partial class wrfiles
{
public long _id { get; set; }
public string name { get; set; }
public long? wrid { get; set; }
}
}