Réorganisations.

La page de reservation par défaut est maintenant la reservation dite simple.

Fonctionnalités en cours de développement:

1) la reservation dite simple
2) la notification à la reservation
3) l'activité principale exercée
4) l'integration d'un premier thème clair

* MEA.sql: définit la valeur MEA du profile (Main Exerted Activity)
  dans la base de donnée

* Booking.aspx: Imlémente la vue du formulaire de reservation simple,
c'etait avant la reservation classique, sur une période plutôt qu'un
  jour.
La reservation classique est renomée `EavyBooking`.

* SimpleBookingQuery.cs: Implémente une simple commande de
  rendez-vous,
en tant que commande du workflow.

* .gitignore: ignorer les configuration des pré et prod totem.

* SkillEntity.cs:
* SkillManager.cs:
* Skills.aspx:
* SkillProvider.cs:
* SkillController.cs:
* UserSkills.aspx:
* NpgsqlSkillProvider.cs: refactorisation (-Skill+SkillEntity)

* NpgsqlProfileProvider.cs: Fixe un bug introduit avec
  l'implementation des profiles anonymes.

* FrontOfficeController.cs: definit l'interface de cotation des
  compétences attendues

* UserCard.ascx: Imlémente une carte utilisateur.

* Web.config: déclare le code activité principale exercée parmis les
  valeurs du profile authentifié.

* Web.csproj: ajoute les nouveaux formulaire de reservation au projet.

* PerformerProfile.cs: S'assure d'avoir une valeur pour le nom
  d'utilisateur à la création.

* LocalizedText.resx:
* LocalizedText.Designer.cs: "date préférée" en anglais

* LocalizedText.fr.resx:
* LocalizedText.fr.Designer.cs: "date préférée" en français

* Profile.cs: à la creation d'un profile, on doit avoir un nom
  d'utilisateur,
même dans le cas où le profile est anonyme (dans ce cas,
on l'appelle identifiant anonyme).
Sinon, on lève une exception.

* YavscModel.csproj: * refactorisation: le nom `Skill` est celui de
  l'espace,
celui de la classe devient `SkillEntity`.
* Creation de la requête dite simple d'un rendez-vous (pour
  prestation)
à une date donnée (sans heure), concernant simplement une activité.

* EavyBooking.aspx: Implémente la reservation lourde
This commit is contained in:
Paul Schneider 2015-11-23 00:43:57 +01:00
commit fe97f14831
29 changed files with 319 additions and 77 deletions

View file

@ -1,3 +1,36 @@
2015-11-23 Paul Schneider <paul@pschneider.fr>
* SimpleBookingQuery.cs: Implémente une simple commande de
rendez-vous,
en tant que commande du workflow.
* PerformerProfile.cs: S'assure d'avoir une valeur pour le nom
d'utilisateur à la création.
* LocalizedText.resx:
* LocalizedText.Designer.cs: "date préférée" en anglais
* LocalizedText.fr.resx:
* LocalizedText.fr.Designer.cs: "date préférée" en français
* Profile.cs: à la creation d'un profile, on doit avoir un nom
d'utilisateur,
même dans le cas où le profile est anonyme (dans ce cas,
on l'appelle identifiant anonyme).
Sinon, on lève une exception.
* SkillEntity.cs:
* SkillManager.cs:
* SkillProvider.cs: refactorisation (-Skill+SkillEntity)
* YavscModel.csproj: * refactorisation: le nom `Skill` est
celui de l'espace,
celui de la classe devient `SkillEntity`.
* Creation de la requête dite simple d'un rendez-vous (pour
prestation)
à une date donnée (sans heure), concernant simplement une
activité.
2015-11-22 Paul Schneider <paul@pschneider.fr>
* YavscModel.csproj:

View file

@ -29,12 +29,12 @@ using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace Yavsc.Model.Skill
namespace Yavsc.Model.FrontOffice
{
/// <summary>
/// Performer profile.
/// </summary>
public class PerformerProfile: IRating, IIdentified
public class PerformerProfile: UserNameBase, IRating, IIdentified
{
/// <summary>
/// Initializes a new instance of the <see cref="Yavsc.Model.Skill.PerformerProfile"/> class.
@ -44,12 +44,9 @@ namespace Yavsc.Model.Skill
}
/// <summary>
/// Gets or sets the name of the user.
/// Gets or sets the identifier.
/// </summary>
/// <value>The name of the user.</value>
[Localizable(true), Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")
,Display(ResourceType=typeof(LocalizedText),Name="User_name"),RegularExpression("([a-z]|[A-Z]|[0-9] )+")]
public string UserName { get; set; }
/// <value>The identifier.</value>
public long Id { get; set; }
/// <summary>
/// Gets or sets the skills.
@ -57,7 +54,7 @@ namespace Yavsc.Model.Skill
/// <value>The skills.</value>
public virtual IEnumerable<UserSkill> Skills { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="Yavsc.FrontOffice.PerformerProfile"/> class.
/// Initializes a new instance of the <see cref="Yavsc.Model.Skill.PerformerProfile"/> class.
/// </summary>
/// <param name="username">Username.</param>
public PerformerProfile(string username)
@ -76,13 +73,16 @@ namespace Yavsc.Model.Skill
private Profile yavscCLientProfile = null;
/// <summary>
/// Gets the yavsc C lient profile.
/// Gets the yavsc Client profile.
/// </summary>
/// <value>The yavsc C lient profile.</value>
public Profile YavscCLientProfile
/// <value>The yavsc Client profile.</value>
public Profile YavscClientProfile
{
get {
if (yavscCLientProfile == null)
if (UserName == null)
throw new Exception ("UserName not set");
else
yavscCLientProfile = new Profile (
ProfileBase.Create (UserName));
return yavscCLientProfile;
@ -105,6 +105,21 @@ namespace Yavsc.Model.Skill
{
return Skills.Any (x => x.SkillId == skillId);
}
/// <summary>
/// Gets the avatar.
/// </summary>
/// <value>The avatar.</value>
public string Avatar {
get {
return YavscClientProfile.avatar;
}
}
public bool HasCalendar ()
{
return (YavscClientProfile.GoogleCalendar != null);
}
}
}

View file

@ -0,0 +1,47 @@
//
// SimpleBookingQuery.cs
//
// 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/>.
using System;
using System.ComponentModel.DataAnnotations;
using Yavsc.Model.Skill;
namespace Yavsc.Model.FrontOffice
{
public class SimpleBookingQuery: Command
{
public SimpleBookingQuery ()
{
}
/// <summary>
/// Gets or sets the prefered date.
/// </summary>
/// <value>The prefered date.</value>
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy/MM/dd}", ApplyFormatInEditMode = true)]
[Display(ResourceType=typeof(LocalizedText),Name="PreferedDate")]
public DateTime PreferedDate { get; set; }
public string Activity { get; set; }
public SkillEntity[] Needs { get; set; }
}
}

View file

@ -298,9 +298,9 @@ namespace Yavsc.Model {
}
}
public static string Register {
public static string PreferedDate {
get {
return ResourceManager.GetString("Register", resourceCulture);
return ResourceManager.GetString("PreferedDate", resourceCulture);
}
}
@ -364,6 +364,12 @@ namespace Yavsc.Model {
}
}
public static string Register {
get {
return ResourceManager.GetString("Register", resourceCulture);
}
}
public static string Logout {
get {
return ResourceManager.GetString("Logout", resourceCulture);

View file

@ -286,9 +286,9 @@ namespace Yavsc.Model {
}
}
public static string Register {
public static string PreferedDate {
get {
return ResourceManager.GetString("Register", resourceCulture);
return ResourceManager.GetString("PreferedDate", resourceCulture);
}
}
@ -346,6 +346,12 @@ namespace Yavsc.Model {
}
}
public static string Register {
get {
return ResourceManager.GetString("Register", resourceCulture);
}
}
public static string Logout {
get {
return ResourceManager.GetString("Logout", resourceCulture);

View file

@ -70,6 +70,7 @@
<data name="Online"><value>En ligne</value></data>
<data name="Pdf_version"><value>Version Pdf</value></data>
<data name="Person"><value>Personne</value></data>
<data name="PreferedDate"><value>Date souhaitée</value></data>
<data name="Preview"><value>Prévisualiser</value><comment>Prévisualiser le document</comment></data>
<data name="Profile_edition"><value>Édition du profile</value></data>
<data name="Product_reference"><value>Référence produit</value></data>

View file

@ -73,6 +73,7 @@
<data name="Offline"><value>Offline</value></data>
<data name="Pdf_version"><value>Pdf version</value></data>
<data name="Person"><value>Person</value></data>
<data name="PreferedDate"><value>Prefered date</value></data>
<data name="Preview"><value>Preview</value><comment>comment on preview</comment></data>
<data name="Private_circle"><value>Private circle</value></data>
<data name="Profile_edition"><value>Profile edition</value></data>

View file

@ -249,8 +249,10 @@ namespace Yavsc.Model.RolesAndMembers
public Profile (ProfileBase profile)
{
if (profile == null) throw new Exception ("No profile");
userName = profile.UserName;
if (profile.UserName == null) throw new Exception ("UserName not set");
UITheme = (string) profile.GetPropertyValue ("UITheme");
userName = profile.UserName;
if (profile.IsAnonymous) return;
BlogVisible = (bool) profile.GetPropertyValue ("BlogVisible");
BlogTitle = (string) profile.GetPropertyValue ("BlogTitle");
avatar = (string) profile.GetPropertyValue ("Avatar");

View file

@ -30,7 +30,7 @@ namespace Yavsc.Model.Skill
/// <summary>
/// Skill.
/// </summary>
public class Skill : IRating {
public class SkillEntity : IRating {
/// <summary>
/// Gets or sets the identifier.

View file

@ -22,6 +22,7 @@ using System;
using System.Configuration;
using System.Reflection;
using System.Configuration.Provider;
using Yavsc.Model.FrontOffice;
namespace Yavsc.Model.Skill
{
@ -49,7 +50,7 @@ namespace Yavsc.Model.Skill
/// Create or modifies the specified skill.
/// </summary>
/// <param name="skill">the skill.</param>
public static long DeclareSkill(Skill skill) {
public static long DeclareSkill(SkillEntity skill) {
Provider.Declare(skill);
return skill.Id;
}
@ -85,7 +86,7 @@ namespace Yavsc.Model.Skill
/// </summary>
/// <returns>The skill identifier.</returns>
/// <param name="pattern">Pattern.</param>
public static Skill [] FindSkill(string pattern){
public static SkillEntity [] FindSkill(string pattern){
return Provider.FindSkill(pattern);
}

View file

@ -20,6 +20,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Configuration.Provider;
using Yavsc.Model.FrontOffice;
namespace Yavsc.Model.Skill
{
@ -32,7 +33,7 @@ namespace Yavsc.Model.Skill
/// Declare the specified skill.
/// </summary>
/// <param name="skill">Skill.</param>
public abstract long Declare(Skill skill) ;
public abstract long Declare(SkillEntity skill) ;
/// <summary>
/// Declare the specified user skill.
@ -57,7 +58,7 @@ namespace Yavsc.Model.Skill
/// </summary>
/// <returns>The skill identifier.</returns>
/// <param name="pattern">Pattern.</param>
public abstract Skill [] FindSkill(string pattern);
public abstract SkillEntity [] FindSkill(string pattern);
/// <summary>
/// Gets the user skills.

View file

@ -188,7 +188,6 @@
<Compile Include="Skill\SkillProvider.cs" />
<Compile Include="Skill\SkillManager.cs" />
<Compile Include="Manager.cs" />
<Compile Include="Skill\Skill.cs" />
<Compile Include="Skill\UserSkill.cs" />
<Compile Include="Skill\UserSkillComment.cs" />
<Compile Include="Skill\UserSkillDeclaration.cs" />
@ -198,8 +197,10 @@
<Compile Include="IIdentified.cs" />
<Compile Include="IRating.cs" />
<Compile Include="IAuthorized.cs" />
<Compile Include="Skill\PerformerProfile.cs" />
<Compile Include="FileSystem\UserFileSystemManager.cs" />
<Compile Include="FrontOffice\PerformerProfile.cs" />
<Compile Include="FrontOffice\SimpleBookingQuery.cs" />
<Compile Include="Skill\SkillEntity.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>