Fixe la recherche d'un préstataire.

* Makefile: Fixe: ne pas déployer sans hôte de destination
Ajoute: le déployement de tous des sites en prod, avec la cible
  `syncall`

* NpgsqlContentProvider.cs: Renseigne le code APE et la côte à la création du
  profile préstataire

* SkillController.cs:
* FrontOfficeController.cs:
* NpgsqlSkillProvider.cs:
* SimpleBookingQuery.cs:
* AuthentificatedSkillRating.cs: refabrication

* ResultPages.cs:
* Title.aspx:
* YavscHelpers.cs: ajoute une classe css au bloc de liens vers les
  autres pages de resultat

* style.css: mise en forme du code

* style.css: du style

* Booking.aspx:
* FrontOfficeController.cs: Modifie la recherche des prestataire, pour
  qu'un resultat soit donné dès qu'un utilisateur est déclaré
  prestataire.

* PerformerProfile.cs: doc xml

* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: internationalisation

* Profile.cs: Décore la valeur de profile "GoogleRegId"

* SkillEntity.cs: refabrication pour l'instant inutile ...

* SkillManager.cs: présente à l'espace de travail la nouvelle methode
  de recherche d'un préstataire

* SkillProvider.cs: définit la nouvelle methode de recherche d'un
  préstataire

* WorkFlowManager.cs: présente à l'espace de travail une
nouvelle methode de recherche d'un préstataire,
renvoyant toute l'information relative à chaque prestataire listé.

* YavscModel.csproj: refabrication des cotes de compétences
This commit is contained in:
Paul Schneider 2015-11-30 15:16:24 +01:00
commit dbcbf8b318
30 changed files with 373 additions and 155 deletions

View file

@ -1,3 +1,32 @@
2015-11-30 Paul Schneider <paul@pschneider.fr>
* PerformerProfile.cs: doc xml
* SimpleBookingQuery.cs:
* AuthentificatedSkillRating.cs: refabrication
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: internationalisation
* Profile.cs: Décore la valeur de profile "GoogleRegId"
* SkillEntity.cs: refabrication pour l'instant inutile ...
* SkillManager.cs: présente à l'espace de travail la nouvelle
methode de recherche d'un préstataire
* SkillProvider.cs: définit la nouvelle methode de recherche
d'un préstataire
* WorkFlowManager.cs: présente à l'espace de travail une
nouvelle methode de recherche d'un préstataire,
renvoyant toute l'information relative à chaque prestataire
listé.
* YavscModel.csproj: refabrication des cotes de compétences
2015-11-28 Paul Schneider <paul@pschneider.fr>
* SkillManager.cs:

View file

@ -92,16 +92,25 @@ namespace Yavsc.Model.FrontOffice
return yavscCLientProfile;
}
}
/// <summary>
/// Gets or sets the E mail.
/// </summary>
/// <value>The E mail.</value>
public string EMail {
get ;
set;
}
/// <summary>
/// Gets the google reg identifier.
/// </summary>
/// <value>The google reg identifier.</value>
public string GoogleRegId {
get { return YavscClientProfile.GoogleRegId; }
}
/// <summary>
/// Gets the google cal identifier.
/// </summary>
/// <value>The google cal identifier.</value>
public string GoogleCalId {
get { return YavscClientProfile.GoogleCalendar; }
}
@ -125,14 +134,19 @@ namespace Yavsc.Model.FrontOffice
}
}
/// <summary>
/// Gets or sets the MEA code.
/// </summary>
/// <value>The MEA code.</value>
[Required]
public string MEACode { get; set; }
/// <summary>
/// Determines whether this instance has calendar.
/// </summary>
/// <returns><c>true</c> if this instance has calendar; otherwise, <c>false</c>.</returns>
public bool HasCalendar ()
{
return (YavscClientProfile.GoogleCalendar != null);
return !string.IsNullOrWhiteSpace( YavscClientProfile.GoogleCalendar );
}
/// <summary>

View file

@ -32,8 +32,9 @@ namespace Yavsc.Model.FrontOffice
public class SimpleBookingQuery: Command
{
/// <summary>
/// Initializes a new instance of the <see cref="Yavsc.Model.FrontOffice.SimpleBookingQuery"/> class.
/// Gets or sets the MEA code.
/// </summary>
/// <value>The MEA code.</value>
[Required(ErrorMessageResourceName="MEACode",ErrorMessageResourceType=typeof(LocalizedText))]
public string MEACode {
get;
@ -52,8 +53,8 @@ namespace Yavsc.Model.FrontOffice
/// Gets or sets the needs.
/// </summary>
/// <value>The needs.</value>
[Display(ResourceType=typeof(LocalizedText),Name="Needs")]
public string[] Needs { get; set; }
[Display(ResourceType=typeof(LocalizedText),Name="Need")]
public string Need { get; set; }
}

View file

@ -142,9 +142,9 @@ namespace Yavsc.Model {
}
}
public static string My_Estimates {
public static string AnIMessageHasbeenSent {
get {
return ResourceManager.GetString("My_Estimates", resourceCulture);
return ResourceManager.GetString("AnIMessageHasbeenSent", resourceCulture);
}
}
@ -190,6 +190,12 @@ namespace Yavsc.Model {
}
}
public static string Performers {
get {
return ResourceManager.GetString("Performers", resourceCulture);
}
}
public static string Members {
get {
return ResourceManager.GetString("Members", resourceCulture);
@ -388,6 +394,18 @@ namespace Yavsc.Model {
}
}
public static string Need {
get {
return ResourceManager.GetString("Need", resourceCulture);
}
}
public static string YourNeed {
get {
return ResourceManager.GetString("YourNeed", resourceCulture);
}
}
public static string Location {
get {
return ResourceManager.GetString("Location", resourceCulture);
@ -490,9 +508,9 @@ namespace Yavsc.Model {
}
}
public static string YourNeed {
public static string Non_existent_user {
get {
return ResourceManager.GetString("YourNeed", resourceCulture);
return ResourceManager.GetString("Non_existent_user", resourceCulture);
}
}
@ -622,6 +640,12 @@ namespace Yavsc.Model {
}
}
public static string NoSkillforthisactivity {
get {
return ResourceManager.GetString("NoSkillforthisactivity", resourceCulture);
}
}
public static string Hide_source {
get {
return ResourceManager.GetString("Hide_source", resourceCulture);
@ -712,21 +736,15 @@ namespace Yavsc.Model {
}
}
public static string AnIMessageHasbeenSent {
get {
return ResourceManager.GetString("AnIMessageHasbeenSent", resourceCulture);
}
}
public static string Profile_edition {
get {
return ResourceManager.GetString("Profile_edition", resourceCulture);
}
}
public static string Non_existent_user {
public static string My_Estimates {
get {
return ResourceManager.GetString("Non_existent_user", resourceCulture);
return ResourceManager.GetString("My_Estimates", resourceCulture);
}
}

View file

@ -184,6 +184,12 @@ namespace Yavsc.Model {
}
}
public static string Performers {
get {
return ResourceManager.GetString("Performers", resourceCulture);
}
}
public static string Members {
get {
return ResourceManager.GetString("Members", resourceCulture);
@ -382,9 +388,15 @@ namespace Yavsc.Model {
}
}
public static string My_Estimates {
public static string Need {
get {
return ResourceManager.GetString("My_Estimates", resourceCulture);
return ResourceManager.GetString("Need", resourceCulture);
}
}
public static string YourNeed {
get {
return ResourceManager.GetString("YourNeed", resourceCulture);
}
}
@ -484,9 +496,9 @@ namespace Yavsc.Model {
}
}
public static string YourNeed {
public static string My_Estimates {
get {
return ResourceManager.GetString("YourNeed", resourceCulture);
return ResourceManager.GetString("My_Estimates", resourceCulture);
}
}
@ -610,6 +622,12 @@ namespace Yavsc.Model {
}
}
public static string NoSkillforthisactivity {
get {
return ResourceManager.GetString("NoSkillforthisactivity", resourceCulture);
}
}
public static string Hide_source {
get {
return ResourceManager.GetString("Hide_source", resourceCulture);

View file

@ -71,9 +71,11 @@
<data name="Modify"><value>Modifier</value></data>
<data name="My_Estimates"><value>Mes estimations</value></data>
<data name="Name"><value>Nom</value></data>
<data name="Needs"><value>Besoin</value></data>
<data name="Needs"><value>Besoins</value></data>
<data name="Need"><value>Besoin</value></data>
<data name="New_Tag"><value>Nouveau Tag</value></data>
<data name="no_content"><value>pas de contenu</value></data>
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité</value></data>
<data name="none"><value>aucun(e)</value></data>
<data name="Non_existent_user"><value>Non existent user</value></data>
<data name="Not Approuved"><value>Non approuvé</value></data>
@ -82,6 +84,7 @@
<data name="Online"><value>En ligne</value></data>
<data name="Pdf_version"><value>Version Pdf</value></data>
<data name="PerformanceDate"><value>Date de la prestation</value></data>
<data name="Performers"><value>Perstataires</value></data>
<data name="Person"><value>Personne</value></data>
<data name="Photo"><value>Photo</value></data>
<data name="PhotoUpdated"><value>Photo mise à jour</value></data>

View file

@ -76,8 +76,10 @@
<data name="Modify"><value>Modify</value></data>
<data name="My_Estimates"><value>My estimates</value></data>
<data name="Needs"><value>Needs</value></data>
<data name="Need"><value>Need</value></data>
<data name="New_Tag"><value>New Tag</value></data>
<data name="no_content"><value>no content</value></data>
<data name="NoSkillforthisactivity"><value>No skill was informed by any performer for this activity</value></data>
<data name="none"><value>none</value></data>
<data name="Non_existent_user"><value>Non existent user</value></data>
<data name="Not_Approuved"><value>Not Approuved</value></data>
@ -86,6 +88,7 @@
<data name="Offline"><value>Offline</value></data>
<data name="Pdf_version"><value>Pdf version</value></data>
<data name="PerformanceDate"><value>Performance Date</value></data>
<data name="Performers"><value>Performers</value></data>
<data name="Person"><value>Person</value></data>
<data name="Photo"><value>Photo</value></data>
<data name="PhotoUpdated"><value>Photo updated</value></data>

View file

@ -169,8 +169,15 @@ namespace Yavsc.Model.RolesAndMembers
/// <value>The google calendar.</value>
[Display(Name="Google_calendar",ResourceType=typeof(LocalizedText))]
public string GoogleCalendar { get; set; }
/// <summary>
/// Gets or sets the google registration identifier.
/// </summary>
/// <value>The google reg identifier.</value>
[Display(Name="Google_registration_id",ResourceType=typeof(LocalizedText))]
public string GoogleRegId { get; set; }
public string GoogleRegId {
get; set;
}
/// <summary>
/// Gets a value indicating whether this instance has bank account.

View file

@ -22,22 +22,12 @@ using System;
namespace Yavsc.Model.Skill
{
/// <summary>
/// Skill rating.
/// </summary>
public class SkillRating : IRating, IAuthorized
public class AuthentificatedSkillRating : SkillRating, IAuthorized
{
/// <summary>
/// Gets or sets the skill identifier.
/// </summary>
/// <value>The skill identifier.</value>
public long Id { get;set ; }
/// <summary>
/// Gets or sets the rate.
/// </summary>
/// <value>The rate.</value>
public int Rate { get; set; }
/// <summary>
/// Gets or sets the author.

View file

@ -24,18 +24,21 @@ using System.Configuration;
using System.Reflection;
using System.Configuration.Provider;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
namespace Yavsc.Model.Skill
{
/// <summary>
/// Skill.
/// </summary>
[DataContract]
public class SkillEntity : IRating {
/// <summary>
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>
[DataMember]
public long Id { get; set; }
/// <summary>
@ -43,6 +46,7 @@ namespace Yavsc.Model.Skill
/// </summary>
/// <value>The MEA code.</value>
[Required(ErrorMessageResourceName="MEACode",ErrorMessageResourceType=typeof(LocalizedText))]
[DataMember]
public string MEACode { get; set; }
/// <summary>
@ -50,12 +54,14 @@ namespace Yavsc.Model.Skill
/// </summary>
/// <value>The name.</value>
[Required(ErrorMessage = "Please, specify a skill name")]
[DataMember]
public string Name { get; set; }
/// <summary>
/// Gets or sets the rate.
/// </summary>
/// <value>The rate.</value>
[DataMember]
public int Rate { get; set; }
}

View file

@ -77,7 +77,7 @@ namespace Yavsc.Model.Skill
/// </summary>
/// <param name="username">Username.</param>
/// <param name="skill">Skill.</param>
public static void RateSkill(string username, SkillRating skill) {
public static void RateSkill(string username, AuthentificatedSkillRating skill) {
DefaultProvider.Rate(skill);
}
@ -86,6 +86,7 @@ namespace Yavsc.Model.Skill
/// </summary>
/// <returns>The skill identifier.</returns>
/// <param name="pattern">Pattern.</param>
/// <param name="MEACode">code APE.</param>
public static SkillEntity [] FindSkill(string pattern, string MEACode=null){
return DefaultProvider.FindSkill(pattern, MEACode);
}
@ -94,9 +95,10 @@ namespace Yavsc.Model.Skill
/// Finds the performer.
/// </summary>
/// <returns>The performer.</returns>
/// <param name="skillIds">Skill identifiers.</param>
public static string [] FindPerformer(long [] skillIds) {
return DefaultProvider.FindPerformer(skillIds);
/// <param name="MEACode">MEA Code.</param>
/// <param name="skills">skills.</param>
public static string [] FindPerformer(string MEACode, SkillRating [] skills) {
return DefaultProvider.FindPerformer(MEACode, skills);
}
/// <summary>
/// Deletes the skill.

View file

@ -51,13 +51,14 @@ namespace Yavsc.Model.Skill
/// Rate the specified skill.
/// </summary>
/// <param name="skill">Skill.</param>
public abstract void Rate(SkillRating skill) ;
public abstract void Rate(AuthentificatedSkillRating skill) ;
/// <summary>
/// Finds the skill identifier.
/// </summary>
/// <returns>The skill identifier.</returns>
/// <param name="pattern">Pattern.</param>
/// <param name="MEACode">MEA code.</param>
public abstract SkillEntity [] FindSkill(string pattern, string MEACode);
/// <summary>
@ -71,8 +72,9 @@ namespace Yavsc.Model.Skill
/// Finds the performer.
/// </summary>
/// <returns>The performer.</returns>
/// <param name="skillIds">Skill identifiers.</param>
public abstract string [] FindPerformer(long []skillIds);
/// <param name="MEACode">MEA code.</param>
/// <param name="need">Need.</param>
public abstract string [] FindPerformer(string MEACode, SkillRating [] need);
/// <summary>
/// Deletes the skill.

View file

@ -6,6 +6,8 @@ using Yavsc.Model.FrontOffice;
using System.Configuration.Provider;
using Yavsc.Model.FrontOffice.Catalog;
using System.Collections.Generic;
using Yavsc.Model.Skill;
using System.Linq;
namespace Yavsc.Model.WorkFlow
{
@ -17,15 +19,6 @@ namespace Yavsc.Model.WorkFlow
/// </summary>
public static class WorkFlowManager
{
/// <summary>
/// Finds the performer.
/// </summary>
/// <returns>The performer.</returns>
/// <param name="MEACode">MEA code.</param>
public static PerformerProfile [] FindPerformer(string MEACode)
{
return DefaultProvider.FindPerformer (MEACode);
}
/// <summary>
/// Finds the activity.
@ -44,6 +37,21 @@ namespace Yavsc.Model.WorkFlow
return activities.ToArray();
}
/// <summary>
/// Finds the performer.
/// </summary>
/// <returns>The performer.</returns>
/// <param name="MEACode">MEA code.</param>
/// <param name="skills">Skills.</param>
public static PerformerProfile [] FindPerformer (string MEACode, SkillRating[] skills)
{
string[] usernames = SkillManager.FindPerformer (MEACode, skills);
List<PerformerProfile> result = new List<PerformerProfile> ();
foreach (string user in usernames)
result.Add (SkillManager.GetUserSkills (user));
return result.ToArray ();
}
/// <summary>
/// Gets the activity.
/// </summary>
@ -168,7 +176,11 @@ namespace Yavsc.Model.WorkFlow
return defaultProvider;
}
}
/// <summary>
/// Drops the writting tag.
/// </summary>
/// <param name="wrid">Wrid.</param>
/// <param name="tag">Tag.</param>
public static void DropWrittingTag (long wrid, string tag)
{
throw new NotImplementedException ();
@ -250,7 +262,12 @@ namespace Yavsc.Model.WorkFlow
{
return DefaultProvider.GetCommands (username);
}
/// <summary>
/// Registers the activity.
/// </summary>
/// <param name="activityName">Activity name.</param>
/// <param name="meacode">Meacode.</param>
/// <param name="comment">Comment.</param>
public static void RegisterActivity (string activityName, string meacode, string comment)
{
DefaultProvider.RegisterActivity (activityName, meacode, comment);

View file

@ -206,7 +206,6 @@
<Compile Include="RolesAndMembers\UserRole.cs" />
<Compile Include="RolesAndMembers\UserNameBase.cs" />
<Compile Include="Calendar\BookingQuery.cs" />
<Compile Include="Skill\SkillRating.cs" />
<Compile Include="Skill\SkillProvider.cs" />
<Compile Include="Skill\SkillManager.cs" />
<Compile Include="Skill\UserSkill.cs" />
@ -240,6 +239,8 @@
<Compile Include="Google\Api\Messaging\Notification.cs" />
<Compile Include="SimpleJsonPostMethod.cs" />
<Compile Include="FrontOffice\PerformerAvailability.cs" />
<Compile Include="Skill\AuthentificatedSkillRating.cs" />
<Compile Include="Skill\SkillRating.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>