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:
parent
439759cb16
commit
fe97f14831
29 changed files with 319 additions and 77 deletions
|
|
@ -14,6 +14,7 @@ using Yavsc.Model.RolesAndMembers;
|
|||
using Yavsc.Model.WorkFlow;
|
||||
using System.IO;
|
||||
using Yavsc.Model.FrontOffice.Catalog;
|
||||
using Yavsc.Model.Skill;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
|
|
@ -108,7 +109,6 @@ namespace Yavsc.ApiControllers
|
|||
if (!prcli.IsBillable)
|
||||
throw new TemplateException ("NotBillable:" + e.Client);
|
||||
|
||||
|
||||
tmpe.Session.Add ("from", prpro);
|
||||
tmpe.Session.Add ("to", prcli);
|
||||
tmpe.Session.Add ("efrom", Membership.GetUser (e.Responsible).Email);
|
||||
|
|
@ -176,6 +176,16 @@ namespace Yavsc.ApiControllers
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rates the skill, this is a client action to profile its needs.
|
||||
/// </summary>
|
||||
/// <param name="rate">Skill rating.</param>
|
||||
[Authorize()]
|
||||
public void RateSkill (SkillRating rate) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace Yavsc.ApiControllers
|
|||
/// </summary>
|
||||
/// <param name="s">the Skill objet.</param>
|
||||
[ValidateAjaxAttribute,Authorize(Roles="Profiler")]
|
||||
public long DeclareSkill (Skill s) {
|
||||
public long DeclareSkill (SkillEntity s) {
|
||||
if (ModelState.IsValid) {
|
||||
SkillManager.DeclareSkill (s);
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ namespace Yavsc.ApiControllers
|
|||
/// </summary>
|
||||
/// <returns>The skill identifier.</returns>
|
||||
/// <param name="pattern">Pattern.</param>
|
||||
public Skill [] FindSkill (string pattern){
|
||||
public SkillEntity [] FindSkill (string pattern){
|
||||
return SkillManager.FindSkill(pattern);
|
||||
}
|
||||
|
||||
|
|
|
|||
5
web/App_Code/Sql/MEA.sql
Normal file
5
web/App_Code/Sql/MEA.sql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
ALTER TABLE profiledata ADD COLUMN meacode character varying(256);
|
||||
COMMENT ON COLUMN profiledata.meacode IS 'Code d''activité principale éxercée.';
|
||||
|
||||
|
||||
|
|
@ -1,3 +1,31 @@
|
|||
2015-11-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* 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`.
|
||||
|
||||
* FrontOfficeController.cs: definit l'interface de cotation
|
||||
des compétences attendues
|
||||
|
||||
* Skills.aspx:
|
||||
* SkillController.cs:
|
||||
* UserSkills.aspx: refactorisation (-Skill+SkillEntity)
|
||||
|
||||
* 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.
|
||||
|
||||
* EavyBooking.aspx: Implémente la reservation lourde
|
||||
|
||||
2015-11-22 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* BasketController.cs:
|
||||
|
|
|
|||
56
web/Views/FrontOffice/Booking.aspx
Normal file
56
web/Views/FrontOffice/Booking.aspx
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<%@ Page Title="Booking" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<SimpleBookingQuery>" %>
|
||||
<asp:Content ContentPlaceHolderID="head" ID="headContent" runat="server">
|
||||
<link rel="stylesheet" type="text/css" href="/App_Themes/jquery.timepicker.css" />
|
||||
<script type="text/javascript" src="/Scripts/globalize/globalize.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/jquery.mousewheel.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/globalize/cultures/globalize.culture.fr.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/datepicker-fr.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/datepicker-en-GB.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/jquery.timepicker.min.js"></script>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<% using ( Html.BeginForm("Booking") ) { %>
|
||||
|
||||
<fieldset>
|
||||
<legend>Préferences musicales</legend>
|
||||
<%= Html.LabelFor(model=>model.Needs) %>:
|
||||
<ul>
|
||||
<% foreach (var need in Model.Needs) { %>
|
||||
<li><%= need.Name %> <%= Html.Partial("RateSkillControl",need)%></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<%= Html.ValidationMessageFor(model=>model.Needs) %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Date de l'événement</legend>
|
||||
Intervention souhaitée le
|
||||
<input type="text" id="PreferedDate" name="PreferedDate" class="start date" value="<%=Model.PreferedDate.ToString("yyyy/MM/dd")%>">
|
||||
<%= Html.ValidationMessageFor( model=>model.PreferedDate ) %>
|
||||
</fieldset>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('[data-type="rate-site-skill"]').rate({target: 'FrontOffice/RateSkill'});
|
||||
var tpconfig = {
|
||||
'timeFormat': 'H:i',
|
||||
'showDuration': true,
|
||||
'disableTimeRanges': [
|
||||
['17:01pm', '24:01pm'],
|
||||
['0am', '9am']
|
||||
]};
|
||||
$.datepicker.setDefaults($.datepicker.regional[ "fr" ] );
|
||||
var dpconfig = {
|
||||
'format': 'yy/mm/dd',
|
||||
'autoclose': true } ;
|
||||
|
||||
// $('#PreferedHour').timepicker(tpconfig);
|
||||
$('#PreferedDate').datepicker(dpconfig);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<input type="submit">
|
||||
<% } %>
|
||||
</asp:Content>
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%@ Page Title="Booking" Language="C#" Inherits="System.Web.Mvc.ViewPage<BookQuery>" MasterPageFile="~/Models/App.master" %>
|
||||
<%@ Page Title="Booking" Language="C#" Inherits="System.Web.Mvc.ViewPage<BookingQuery>" MasterPageFile="~/Models/App.master" %>
|
||||
<asp:Content ContentPlaceHolderID="head" ID="headContent" runat="server">
|
||||
<link rel="stylesheet" type="text/css" href="/App_Themes/jquery.timepicker.css" />
|
||||
<script type="text/javascript" src="/Scripts/globalize/globalize.js"></script>
|
||||
|
|
@ -32,13 +32,9 @@ et le
|
|||
</div>
|
||||
<fieldset>
|
||||
<legend>Intervenant</legend>
|
||||
<%= Html.LabelFor(model=>model.Role) %>:
|
||||
<%= Html.TextBoxFor(model=>model.Role) %>
|
||||
<%= Html.ValidationMessageFor(model=>model.Role) %>
|
||||
<br>
|
||||
<%= Html.LabelFor(model=>model.Person) %>:
|
||||
<%= Html.TextBoxFor(model=>model.Person) %>
|
||||
<%= Html.ValidationMessageFor(model=>model.Person) %>
|
||||
<%= Html.LabelFor(model=>model.Roles) %>:
|
||||
<%= Html.TextBoxFor(model=>model.Roles) %>
|
||||
<%= Html.ValidationMessageFor(model=>model.Roles) %>
|
||||
</fieldset>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%@ Page Title="Skills" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Skill>>" %>
|
||||
<%@ Page Title="Skills" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<SkillEntity>>" %>
|
||||
|
||||
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
|
||||
<script src="<%=Url.Content("~/Scripts/yavsc.skills.js")%>"></script>
|
||||
|
|
@ -10,8 +10,6 @@
|
|||
</asp:Content>
|
||||
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
|
||||
|
||||
<aside class="control">
|
||||
<form method="post" action="DeclareSkill">
|
||||
<fieldset>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,14 @@
|
|||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
|
||||
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PerformerProfile>" %>
|
||||
<img src="<%=Url.AvatarUrl(HttpContext.Current.User.Identity.Name)%>" alt="avatar" class="iconsmall" />
|
||||
<%=Html.Encode(Model.UserName)%> <%= Html.Partial("RateControl",Model) %>
|
||||
<ul>
|
||||
<% foreach (var skill in Model.Skills) { %>
|
||||
<li>
|
||||
<%=Html.Encode(skill.SkillName)%> <%= Html.Partial("RateControl",skill) %>
|
||||
<%=Html.Encode(skill.Comment)%>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<% if (Model.HasCalendar()) { %>
|
||||
<i class="fa fa-check">Calendrier Google Disponible</i>
|
||||
<% } %>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<div id="Err_skillId" class="field-validation-error"></div>
|
||||
<h2>
|
||||
<select id="SkillId" >
|
||||
<% foreach (var skill in (Skill[]) ViewData["SiteSkills"]) {
|
||||
<% foreach (var skill in (SkillEntity[]) ViewData["SiteSkills"]) {
|
||||
if (Model.HasSkill(skill.Id)) {%>
|
||||
<option value="<%=skill.Id%>" disabled>
|
||||
<%=skill.Name%></option>
|
||||
|
|
@ -52,5 +52,4 @@ if (Model.HasSkill(skill.Id)) {%>
|
|||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
|
||||
</asp:Content>
|
||||
|
|
|
|||
|
|
@ -98,31 +98,25 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
|||
<roleManager enabled="true" defaultProvider="NpgsqlRoleProvider">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="NpgsqlRoleProvider" connectionStringName="yavsc"
|
||||
applicationName="/" type="Npgsql.Web.NpgsqlRoleProvider, NpgsqlMRPProviders"
|
||||
autogenerateschema="false" />
|
||||
<add name="NpgsqlRoleProvider" connectionStringName="yavsc" applicationName="/" type="Npgsql.Web.NpgsqlRoleProvider, NpgsqlMRPProviders" autogenerateschema="false" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
<userNameManager defaultProvider="NpsqlUserNameProvider">
|
||||
<providers>
|
||||
<add name="NpsqlUserNameProvider" connectionStringName="yavsc"
|
||||
applicationName="/" type="Npgsql.Web.RolesAndMembers.NpgsqlUserNameProvider, NpgsqlMRPProviders"
|
||||
autogenerateschema="false">
|
||||
<add name="NpsqlUserNameProvider" connectionStringName="yavsc" applicationName="/" type="Npgsql.Web.RolesAndMembers.NpgsqlUserNameProvider, NpgsqlMRPProviders" autogenerateschema="false">
|
||||
</add>
|
||||
</providers>
|
||||
</userNameManager>
|
||||
<workflow defaultProvider="ITProvider">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="ITProvider" type="Yavsc.ITCPNpgsqlProvider, ITContentProvider" applicationName="/"
|
||||
connectionStringName="yavsc" />
|
||||
<add name="ITProvider" type="Yavsc.ITCPNpgsqlProvider, ITContentProvider" applicationName="/" connectionStringName="yavsc" />
|
||||
</providers>
|
||||
</workflow>
|
||||
<profile defaultProvider="NpgsqlProfileProvider">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="NpgsqlProfileProvider" type="Npgsql.Web.NpgsqlProfileProvider, NpgsqlMRPProviders"
|
||||
connectionStringName="yavsc" applicationName="/" description="ProfileProvider for yavsc" />
|
||||
<add name="NpgsqlProfileProvider" type="Npgsql.Web.NpgsqlProfileProvider, NpgsqlMRPProviders" connectionStringName="yavsc" applicationName="/" description="ProfileProvider for yavsc" />
|
||||
</providers>
|
||||
<properties>
|
||||
<add name="Name" />
|
||||
|
|
@ -145,7 +139,8 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
|||
<add name="gtoken" />
|
||||
<add name="grefreshtoken" />
|
||||
<add name="gtokentype" />
|
||||
<add name="gtokenexpir" type="System.DateTime" defaultValue="2008-05-01 7:34:42Z" />
|
||||
<add name="MEACode" />
|
||||
<add name="gtokenexpir" type="System.DateTime" defaultValue="2008-01-01 1:00:00Z" />
|
||||
<add name="gcalapi" type="System.Boolean" defaultValue="false" />
|
||||
<add name="gcalid" />
|
||||
<add name="gregid" />
|
||||
|
|
@ -216,6 +211,11 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
|||
be allowed in shared hosting environments. -->
|
||||
<!--<servicePointManager checkCertificateRevocationList="true"/>-->
|
||||
</settings>
|
||||
<mailSettings>
|
||||
<smtp deliveryMethod="network" from="paulschneider@free.fr">
|
||||
<network host="[YOUR_SMTP_HOST]" port="25" defaultCredentials="false" />
|
||||
</smtp>
|
||||
</mailSettings>
|
||||
</system.net>
|
||||
<uri>
|
||||
<!-- The uri section is necessary to turn on .NET 3.5 support for IDN (international domain names),
|
||||
|
|
@ -225,8 +225,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
|||
<iriParsing enabled="true" />
|
||||
</uri>
|
||||
<authentication mode="Forms">
|
||||
<forms loginUrl="~/Account/Login" timeout="30" name=".ASPXFORM$" path="/"
|
||||
requireSSL="false" slidingExpiration="true" defaultUrl="Index.aspx" enableCrossAppRedirects="false" />
|
||||
<forms loginUrl="~/Account/Login" timeout="30" name=".ASPXFORM$" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="Index.aspx" enableCrossAppRedirects="false" />
|
||||
</authentication>
|
||||
<!-- PayPal SDK settings -->
|
||||
<paypal>
|
||||
|
|
|
|||
|
|
@ -451,7 +451,6 @@
|
|||
<Content Include="App_Themes\images\ui-icons_ffffff_256x240.png" />
|
||||
<Content Include="Views\Google\Auth.aspx" />
|
||||
<Content Include="Views\Google\ChooseCalendar.aspx" />
|
||||
<Content Include="Views\Google\Book.aspx" />
|
||||
<Content Include="Views\Google\ChooseADate.aspx" />
|
||||
<Content Include="Views\Google\OtherWebException.aspx" />
|
||||
<Content Include="Models\AppAdmin.master" />
|
||||
|
|
@ -508,6 +507,8 @@
|
|||
<Content Include="Views\Account\RestrictedArea.aspx" />
|
||||
<Content Include="Web.TotemProd.config" />
|
||||
<Content Include="Web.TotemPre.config" />
|
||||
<Content Include="Views\FrontOffice\Booking.aspx" />
|
||||
<Content Include="Views\FrontOffice\EavyBooking.aspx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
|
@ -539,6 +540,7 @@
|
|||
<None Include="App_Code\Sql\Skills.sql" />
|
||||
<None Include="WebDeploy.targets" />
|
||||
<None Include="WebTasks.dll" />
|
||||
<None Include="App_Code\Sql\MEA.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NpgsqlMRPProviders\NpgsqlMRPProviders.csproj">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue