From 6abe005b1229c5e862603f03fe3d633bbd157045 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 31 Oct 2016 10:26:03 +0100 Subject: [PATCH 01/15] refabrique avant merge --- .../BookAStar/Model/ClientProviderInfo.cs | 1 + .../Model/Messaging/BookQueryProviderInfo.cs | 16 ++++++++++ Yavsc/Model/Messaging/ClientProviderInfo.cs | 29 +++++++------------ Yavsc/tasks.todo | 2 +- 4 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 Yavsc/Model/Messaging/BookQueryProviderInfo.cs diff --git a/BookAStar/BookAStar/Model/ClientProviderInfo.cs b/BookAStar/BookAStar/Model/ClientProviderInfo.cs index 07a04dc0..7badf372 100644 --- a/BookAStar/BookAStar/Model/ClientProviderInfo.cs +++ b/BookAStar/BookAStar/Model/ClientProviderInfo.cs @@ -10,6 +10,7 @@ namespace BookAStar.Model public string UserName { get; set; } public string Avatar { get; set; } + public string UserId { get; set; } public int Rate { get; set; } public string EMail { get; set; } diff --git a/Yavsc/Model/Messaging/BookQueryProviderInfo.cs b/Yavsc/Model/Messaging/BookQueryProviderInfo.cs new file mode 100644 index 00000000..61997ee0 --- /dev/null +++ b/Yavsc/Model/Messaging/BookQueryProviderInfo.cs @@ -0,0 +1,16 @@ +using System; + +namespace Yavsc.Model +{ + + public class BookQueryProviderInfo + { + public ClientProviderInfo Client { get; set; } + public Location Location { get; set; } + + public long Id { get; set; } + + public DateTime EventDate { get; set; } + public decimal? Previsional { get; set; } + } +} diff --git a/Yavsc/Model/Messaging/ClientProviderInfo.cs b/Yavsc/Model/Messaging/ClientProviderInfo.cs index f1524266..c2bce7c8 100644 --- a/Yavsc/Model/Messaging/ClientProviderInfo.cs +++ b/Yavsc/Model/Messaging/ClientProviderInfo.cs @@ -1,21 +1,14 @@ -using System; namespace Yavsc.Model { - -public class BookQueryProviderInfo {  - public ClientProviderInfo Client { get; set; } - public Location Location { get; set; } - - public long Id { get; set; } - - public DateTime EventDate { get ; set; } - public decimal? Previsional { get; set; } - } - public class ClientProviderInfo {  - public string UserName { get; set; } - public string UserId { get; set; } - public int Rate { get; set; } - } - -} \ No newline at end of file + public class ClientProviderInfo + { + public string UserName { get; set; } + public string Avatar { get; set; } + public string UserId { get; set; } + public int Rate { get; set; } + public string EMail { get; set; } + public string Phone { get; set; } + public Location BillingAddress { get; set; } + } +} diff --git a/Yavsc/tasks.todo b/Yavsc/tasks.todo index f384b3de..13562d23 100644 --- a/Yavsc/tasks.todo +++ b/Yavsc/tasks.todo @@ -11,7 +11,7 @@ Da road to the hell ✔ Rendu html du format Markdown-av (+audio&video) @done (October 6th 2016, 14:32) ✔ Rendu Android, via WebKit WebView @done (October 6th 2016, 14:32) ✔ Salon public @done (September 28th 2016, 17:58) - ☐ Saisie et soumission basique du devis + ✔ Saisie et soumission basique du devis @done (October 30th 2016, 21:50) ☐ Devis au formats TeX et Pdf en ligne à accès restreint ☐ Signature de contrat ✔ Chat privé (coté serveur) @done (October 13th 2016, 16:27) From b75c5c78396c598a03aae4118528ad4750e891f7 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Tue, 1 Nov 2016 23:21:03 +0100 Subject: [PATCH 02/15] only anonymous need an user name --- Yavsc/Controllers/HomeController.cs | 3 +- Yavsc/Views/Home/Chat.cshtml | 62 ++++++++++++++++++++++++++--- 2 files changed, 59 insertions(+), 6 deletions(-) diff --git a/Yavsc/Controllers/HomeController.cs b/Yavsc/Controllers/HomeController.cs index 7563992a..1bd7e4e2 100644 --- a/Yavsc/Controllers/HomeController.cs +++ b/Yavsc/Controllers/HomeController.cs @@ -51,10 +51,11 @@ namespace Yavsc.Controllers public ActionResult Chat() { if (User.Identity.IsAuthenticated) { + ViewBag.IsAuthenticated=true; string uid = User.GetUserId(); ViewBag.Contacts = DbContext.Contacts.Where(c=>c.OwnerId == uid) ; - } + } else ViewBag.IsAuthenticated=false; return View(); } diff --git a/Yavsc/Views/Home/Chat.cshtml b/Yavsc/Views/Home/Chat.cshtml index 01e237aa..7451cc07 100644 --- a/Yavsc/Views/Home/Chat.cshtml +++ b/Yavsc/Views/Home/Chat.cshtml @@ -9,9 +9,8 @@ font-family: monospace; } .notif { - color: black; + color: grey; font-family: monospace; - font-style: italic; } .pv { color: black; @@ -33,9 +32,14 @@ } } + + + + @section scripts { @@ -46,6 +50,10 @@ } diff --git a/Yavsc/tasks.todo b/Yavsc/tasks.todo index 13562d23..2a88f715 100644 --- a/Yavsc/tasks.todo +++ b/Yavsc/tasks.todo @@ -17,11 +17,15 @@ Da road to the hell ✔ Chat privé (coté serveur) @done (October 13th 2016, 16:27) ✔ Accès mobile au salon public @done (October 13th 2016, 16:27) ☐ Accès Web au chat privé - ☐ Accès mobile au chat privé + ✔ Accès mobile au chat privé @done (November 3rd 2016, 11:15) ## Jalon 2 ☐ Quota fs utilisateur + ☐ Droit au message privé, spécifié par le destinataire + et/ou par accréditation administrative, à un utilisateur spécifié, ou + à un cercle ou à un groupe, de manière temporaire ou définitive, par une plage de temps spécifié + ou par la validité d'une demande de devis ou une intervention en cours ou récente ou à venir ☐ Sécurisation des formulaires (à base de clés anti-forge, limitation en taille de chaines de caratères) ☐ web @@ -30,15 +34,24 @@ Da road to the hell ☐ Paiement client d'un approvisionnement pour une demande de prestation définie ☐ Login Twitter ☐ Notifications et Twits de blogs, d'entées d'artiste, de success stories - ☐ Restrictions d'accès au chat privé ☐ Monétarisations ☐ Support multi-lanque de l'app mobile ☐ Paiement client du reste de la prestation ## Jalon 3 - ☐ Saisie du devis sur commande générique - ☐ Saisie d'un devis à destination d'un invité [email] + ☐ Saisie du devis sur commande générique: les commandes sont des projets utilisateur associés + à une liste de formulaire de prise de commande auprès de services que le producteur peut spécialiser, + par l'ajout de groupes de champs de saisie complètement définis : + ☐ Chaque champ possède: + ☐ Un label + ☐ Un type pour la valeur + ☐ Un type de controle + ☐ Une liste de validateurs + ☐ Une invitation à la saisie + + ☐ Chaque champ apparait dans un groupe de champ possèdant un titre + ☐ Saisie d'un devis à destination d'un invité (envoi par email, contact local) ☐ Paiement d'Arrhes ## Jalon 4 From 583adaa09b8b8132feec91f353663651947f8e3f Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 3 Nov 2016 15:27:06 +0100 Subject: [PATCH 07/15] Fixe l'affichage du devis --- Yavsc/Controllers/EstimateController.cs | 1 + Yavsc/Views/Estimate/Details.cshtml | 15 +++++++++-- Yavsc/Views/Shared/BillingLine.cshtml | 33 +++++++++++++++++++++++++ Yavsc/tasks.todo | 2 +- 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 Yavsc/Views/Shared/BillingLine.cshtml diff --git a/Yavsc/Controllers/EstimateController.cs b/Yavsc/Controllers/EstimateController.cs index f9e9f454..a3374f8d 100644 --- a/Yavsc/Controllers/EstimateController.cs +++ b/Yavsc/Controllers/EstimateController.cs @@ -50,6 +50,7 @@ namespace Yavsc.Controllers .Include(e => e.Query) .Include(e => e.Query.PerformerProfile) .Include(e => e.Query.PerformerProfile.Performer) + .Include(e=> e.Bill) .Where( e=>e.OwnerId == uid || e.ClientId == uid ) diff --git a/Yavsc/Views/Estimate/Details.cshtml b/Yavsc/Views/Estimate/Details.cshtml index 384dab3b..cc3d783f 100644 --- a/Yavsc/Views/Estimate/Details.cshtml +++ b/Yavsc/Views/Estimate/Details.cshtml @@ -10,23 +10,34 @@

Estimate


+
+ @Html.DisplayNameFor(model => model.Title) +
+
+ @Html.DisplayFor(model => model.Title) +
+
@Html.DisplayNameFor(model => model.Description)
@Html.DisplayFor(model => model.Description)
+
@Html.DisplayNameFor(model => model.Status)
@Html.DisplayFor(model => model.Status)
+
- @Html.DisplayNameFor(model => model.Title) + @Html.DisplayNameFor(model => model.Bill)
- @Html.DisplayFor(model => model.Title) + @foreach (var cl in Model.Bill) { + @await Html.PartialAsync("BillingLine", cl); + }
diff --git a/Yavsc/Views/Shared/BillingLine.cshtml b/Yavsc/Views/Shared/BillingLine.cshtml new file mode 100644 index 00000000..190e84b2 --- /dev/null +++ b/Yavsc/Views/Shared/BillingLine.cshtml @@ -0,0 +1,33 @@ +@model Yavsc.Models.Billing.CommandLine + + +
+
+ @Html.DisplayNameFor(model => model.Id) +
+
+ @Html.DisplayFor(model => model.Id) +
+ +
+ @Html.DisplayNameFor(model => model.Description) +
+
+ @Html.DisplayFor(model => model.Description) +
+ +
+ @Html.DisplayNameFor(model => model.Count) +
+
+ @Html.DisplayFor(model => model.Count) +
+ +
+ @Html.DisplayNameFor(model => model.UnitaryCost) +
+
+ @Html.DisplayFor(model => model.UnitaryCost) +
+ +
\ No newline at end of file diff --git a/Yavsc/tasks.todo b/Yavsc/tasks.todo index 2a88f715..62bcd68c 100644 --- a/Yavsc/tasks.todo +++ b/Yavsc/tasks.todo @@ -16,7 +16,7 @@ Da road to the hell ☐ Signature de contrat ✔ Chat privé (coté serveur) @done (October 13th 2016, 16:27) ✔ Accès mobile au salon public @done (October 13th 2016, 16:27) - ☐ Accès Web au chat privé + ✔ Accès Web au chat privé @done (November 3rd 2016, 14:57) ✔ Accès mobile au chat privé @done (November 3rd 2016, 11:15) ## Jalon 2 From 828819ca5c5859b6a712c364902f43dbff731a80 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 3 Nov 2016 17:34:19 +0100 Subject: [PATCH 08/15] WIP estimate tex --- Yavsc/Controllers/EstimateController.cs | 5 +- Yavsc/Controllers/FrontOfficeController.cs | 21 +++-- Yavsc/Views/Estimate/Index.cshtml | 18 ++++ Yavsc/Views/FrontOffice/Estimate.tex.cshtml | 51 ++++++------ Yavsc/Views/FrontOffice/tmp.cshtml | 91 +++++++++++++++++++++ 5 files changed, 155 insertions(+), 31 deletions(-) create mode 100644 Yavsc/Views/FrontOffice/tmp.cshtml diff --git a/Yavsc/Controllers/EstimateController.cs b/Yavsc/Controllers/EstimateController.cs index a3374f8d..e142560a 100644 --- a/Yavsc/Controllers/EstimateController.cs +++ b/Yavsc/Controllers/EstimateController.cs @@ -32,7 +32,10 @@ namespace Yavsc.Controllers public IActionResult Index() { var uid = User.GetUserId(); - return View(_context.Estimates.Where( + return View(_context.Estimates.Include(e=>e.Query) + .Include(e=>e.Query.PerformerProfile) + .Include(e=>e.Query.PerformerProfile.Performer) + .Where( e=>e.OwnerId == uid || e.ClientId == uid ).ToList()); } diff --git a/Yavsc/Controllers/FrontOfficeController.cs b/Yavsc/Controllers/FrontOfficeController.cs index 5899e561..0e0ffea8 100644 --- a/Yavsc/Controllers/FrontOfficeController.cs +++ b/Yavsc/Controllers/FrontOfficeController.cs @@ -89,13 +89,22 @@ namespace Yavsc.Controllers } [Produces("text/x-tex"), Authorize, - Route("Release/Estimate-{id}.tex")] - public Estimate Estimate(long id) + Route("estimate-{id}.tex")] + public ViewResult Estimate(long id) { - var estimate = _context.Estimates.Include(x=>x.Query). - Include(x=>x.Query.Client).FirstOrDefault(x=>x.Id==id); - var adc = estimate.Query.Client.UserName; - return estimate; + var estimate = _context.Estimates.Include(x=>x.Query) + .Include(x=>x.Query.Client) + .Include(x=>x.Query.PerformerProfile) + .Include(x=>x.Query.PerformerProfile.OrganizationAddress) + .Include(x=>x.Query.PerformerProfile.Performer) + .Include(e=>e.Bill).FirstOrDefault(x=>x.Id==id); + // var poa = estimate.Query.PerformerProfile.OrganizationAddress; + // var adc = estimate.Query.Client.UserName; + ViewBag.From = estimate.Query.PerformerProfile.Performer; + ViewBag.To = estimate.Query.Client; + Response.ContentType = "text/x-tex"; + // estimate.Query.Client.PostalAddress. + return View("Estimate.tex", estimate); } } } \ No newline at end of file diff --git a/Yavsc/Views/Estimate/Index.cshtml b/Yavsc/Views/Estimate/Index.cshtml index f7ed5930..a05b342a 100644 --- a/Yavsc/Views/Estimate/Index.cshtml +++ b/Yavsc/Views/Estimate/Index.cshtml @@ -20,6 +20,15 @@ @Html.DisplayNameFor(model => model.Title) + + @Html.DisplayNameFor(model => model.Query.Client) + + + @SR["Performer"] + + + @SR["Id"] + @@ -34,6 +43,15 @@ @Html.DisplayFor(modelItem => item.Title) + + @Html.DisplayFor(modelItem => item.Query.Client.UserName) + + + @Html.DisplayFor(modelItem => item.Query.PerformerProfile.Performer.UserName) + + + @Html.DisplayFor(modelItem => item.Id) + Edit | Details | diff --git a/Yavsc/Views/FrontOffice/Estimate.tex.cshtml b/Yavsc/Views/FrontOffice/Estimate.tex.cshtml index 050004b2..ad5d034e 100644 --- a/Yavsc/Views/FrontOffice/Estimate.tex.cshtml +++ b/Yavsc/Views/FrontOffice/Estimate.tex.cshtml @@ -1,5 +1,7 @@ @model Estimate - +@{ + Layout = null; +} \documentclass[french,11pt]{article} \usepackage{babel} \usepackage[T1]{fontenc} @@ -53,14 +55,11 @@ \newcommand{\ListeProduits}{} - - - %%%%%%%%%%%%%%%%%%%%% A MODIFIER DANS LA FACTURE %%%%%%%%%%%%%%%%%%%%% \def\FactureNum {@Model.Id.ToString()} % Numéro de facture \def\FactureAcquittee {non} % Facture acquittée : oui/non -\def\FactureLieu {@Model.Command.Performer.PostalAddress} % Lieu de l'édition de la facture +\def\FactureLieu {@Model.Query.PerformerProfile.OrganizationAddress} % Lieu de l'édition de la facture \def\FactureObjet {Facture : @Model.Title} % Objet du document % Description de la facture \def\FactureDescr { @@ -68,27 +67,33 @@ } % Infos Client -\def\ClientNom{@Model.Command.Client.Name} % Nom du client -\def\ClientAdresse{% % Adresse du client - @if (!string.IsNullOrWhiteSpace(Model.Command.Client.PostalAddress.Address)) { - @string.Split("\n",Model.Command.Client.PostalAddress.Address).Join("\\\\\n") - } - if (!string.IsNullOrWhiteSpace(@Model.Command.Client.PhoneNumber)) { - Téléphone fixe: @Model.Command.Client.PhoneNumber \\ - } +\def\ClientNom{@ViewBag.To.UserName} % Nom du client -if (!string.IsNullOrWhiteSpace(eto)) { - E-mail: @Model.Command.Client.Email } +\def\ClientAdresse{ +% Adresse du client + @if (ViewBag.To.PostalAddress!=null) { + @ViewBag.To.PostalAddress.Address.Replace("\n","\\\\\n") + } + @if (!string.IsNullOrWhiteSpace(ViewBag.To.PhoneNumber)) { + \\ Téléphone fixe: @ViewBag.To.PhoneNumber + } +@if (!string.IsNullOrWhiteSpace(ViewBag.To.Email)) { + \\ E-mail: @ViewBag.To.Email } } % Liste des produits facturés : Désignation, prix -@foreach (CommandLine line in Model.Command.Bill) { -\AjouterService { @line.Article.Name - @line.Comment (Ref:YPR@line.Article.Id) } {@line.Count} {@line.UnitaryCost} -} +@if (Model.Bill!=null) {  + foreach (CommandLine line in Model.Bill) { + +\AjouterService {@line.Description} {@line.Count} {@line.UnitaryCost} + +} } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + \geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em} \setlength{\parindent}{0pt} \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} @@ -99,13 +104,11 @@ if (!string.IsNullOrWhiteSpace(eto)) { \renewcommand{\headrulewidth}{0pt} \cfoot{ - @if (!string.IsNullOrWhiteSpace(from.Name)) { from.Name } - @if (!string.IsNullOrWhiteSpace(from.Address)) { @"-" @from.Address } - @if (!string.IsNullOrWhiteSpace(from.CityAndState)) { @"-" @from.CityAndState } \newline + @if (!string.IsNullOrWhiteSpace(ViewBag.From.UserName)) { @ViewBag.From.UserName } + @if (!string.IsNullOrWhiteSpace(ViewBag.From.PostalAddress)) { - @ViewBag.From.PostalAddress.Address } } \newline \small{ - @if (!string.IsNullOrWhiteSpace(efrom)) { E-mail: efrom } - @if (!string.IsNullOrWhiteSpace(from.Mobile)) { @"-" Téléphone mobile: @from.Mobile } - @if (!string.IsNullOrWhiteSpace(from.Phone)) { @"-" Téléphone fixe: @from.Phone } + @if (!string.IsNullOrWhiteSpace(ViewBag.From.Email)) { E-mail: @ViewBag.From.Email } + @if (!string.IsNullOrWhiteSpace(ViewBag.From.PhoneNumber)) { - Téléphone fixe: @ViewBag.From.PhoneNumber } } } diff --git a/Yavsc/Views/FrontOffice/tmp.cshtml b/Yavsc/Views/FrontOffice/tmp.cshtml new file mode 100644 index 00000000..1b1e9f81 --- /dev/null +++ b/Yavsc/Views/FrontOffice/tmp.cshtml @@ -0,0 +1,91 @@ + + + + +\geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em} +\setlength{\parindent}{0pt} +\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} + +\thispagestyle{fancy} +\pagestyle{fancy} +\setlength{\parindent}{0pt} + +\renewcommand{\headrulewidth}{0pt} +\cfoot{ + @if (!string.IsNullOrWhiteSpace(ViewBag.From.Name)) { @ViewBag.From.Name } + @if (!string.IsNullOrWhiteSpace(ViewBag.From.Address)) { - @ViewBag.From.Address } + @if (!string.IsNullOrWhiteSpace(ViewBag.From.CityAndState)) { - @ViewBag.From.CityAndState } \newline + \small{ + @if (!string.IsNullOrWhiteSpace(ViewBag.From.Email)) { E-mail: @ViewBag.From.Email } + @if (!string.IsNullOrWhiteSpace(ViewBag.From.Mobile)) { - Téléphone mobile: @ViewBag.From.Mobile } + @if (!string.IsNullOrWhiteSpace(ViewBag.From.Phone)) { - Téléphone fixe: @ViewBag.From.Phone } + } +} + +\begin{document} + +% Logo de la société +%\includegraphics{logo.jpg} + +% Nom et adresse de la société + from.Name \\ + from.Address \\ +from.ZipCode from.CityAndState\\ + +Facture n°\FactureNum + + +{\addtolength{\leftskip}{10.5cm} %in ERT + \textbf{\ClientNom} \\ + \ClientAdresse \\ + +} %in ERT + + +\hspace*{10.5cm} +\FactureLieu, le \today + +~\\~\\ + +\textbf{Objet : \FactureObjet \\} + +\textnormal{\FactureDescr} + +~\\ + +\begin{center} + \begin{tabular}{lrrr} + \textbf{Désignation ~~~~~~} & \textbf{Prix unitaire} & \textbf{Quantité} & \textbf{Montant (EUR)} \\ + \hline + \AfficheResultat{} + \end{tabular} +\end{center} + +\begin{flushright} +\textit{Auto entreprise en franchise de TVA}\\ + +\end{flushright} +~\\ + +\ifthenelse{\equal{\FactureAcquittee}{oui}}{ + Facture acquittée. +}{ + + À régler par chèque ou par virement bancaire : + + \begin{center} + \begin{tabular}{|c c c c|} + if (!string.IsNullOrWhiteSpace(from.BankCode) && !string.IsNullOrWhiteSpace(from.WicketCode) + && !string.IsNullOrWhiteSpace(from.AccountNumber) ) { + \hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\ + from.BankCode & from.WicketCode & from.AccountNumber & from.BankedKey \\ + } + if (!string.IsNullOrWhiteSpace(from.IBAN) && !string.IsNullOrWhiteSpace(from.BIC)) { + \hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ from.IBAN } \\ + \hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ from.BIC } + } \\ + \hline + \end{tabular} + \end{center} +} +\end{document} From 4953b7e4c7a64d5878243a0ca09594bc1688d5d5 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 3 Nov 2016 17:44:20 +0100 Subject: [PATCH 09/15] cleaning --- Yavsc/Controllers/FrontOfficeController.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Yavsc/Controllers/FrontOfficeController.cs b/Yavsc/Controllers/FrontOfficeController.cs index 0e0ffea8..68a94843 100644 --- a/Yavsc/Controllers/FrontOfficeController.cs +++ b/Yavsc/Controllers/FrontOfficeController.cs @@ -98,12 +98,9 @@ namespace Yavsc.Controllers .Include(x=>x.Query.PerformerProfile.OrganizationAddress) .Include(x=>x.Query.PerformerProfile.Performer) .Include(e=>e.Bill).FirstOrDefault(x=>x.Id==id); - // var poa = estimate.Query.PerformerProfile.OrganizationAddress; - // var adc = estimate.Query.Client.UserName; ViewBag.From = estimate.Query.PerformerProfile.Performer; ViewBag.To = estimate.Query.Client; Response.ContentType = "text/x-tex"; - // estimate.Query.Client.PostalAddress. return View("Estimate.tex", estimate); } } From c559a51ad460a3cd50f51371cde0685718a6eeb5 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 4 Nov 2016 12:18:15 +0100 Subject: [PATCH 10/15] cleans using clauses --- Yavsc/ApiControllers/AccountController.cs | 18 +++++++----------- Yavsc/ApiControllers/ChatApiController.cs | 2 -- Yavsc/Controllers/FrontOfficeController.cs | 1 - Yavsc/Hubs/ChatHub.cs | 5 ++--- Yavsc/Model/Messaging/ClientProviderInfo.cs | 1 - 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Yavsc/ApiControllers/AccountController.cs b/Yavsc/ApiControllers/AccountController.cs index 9bb41447..dcb3d8b4 100644 --- a/Yavsc/ApiControllers/AccountController.cs +++ b/Yavsc/ApiControllers/AccountController.cs @@ -1,20 +1,16 @@ -using System.Threading.Tasks; -using Microsoft.AspNet.Identity; +using Microsoft.AspNet.Identity; using Microsoft.AspNet.Authorization; -using Yavsc.Models; -using Yavsc.Models.Account; using Microsoft.AspNet.Mvc; -using Yavsc.ViewModels.Account; -using System.Security.Claims; using Microsoft.Extensions.Logging; -using Yavsc.Models.Auth; -using System.Collections.Generic; -using static Yavsc.ChatHub; -using Microsoft.Data.Entity; -using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; namespace Yavsc.WebApi.Controllers { + using Models; + using Models.Account; + using ViewModels.Account; + using Models.Auth; [Authorize,Route("~/api/account")] public class ApiAccountController : Controller diff --git a/Yavsc/ApiControllers/ChatApiController.cs b/Yavsc/ApiControllers/ChatApiController.cs index 36317bf2..9b5f83fb 100644 --- a/Yavsc/ApiControllers/ChatApiController.cs +++ b/Yavsc/ApiControllers/ChatApiController.cs @@ -1,8 +1,6 @@ -using System; using System.Collections.Generic; using System.Linq; -using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Mvc; using Microsoft.Data.Entity; diff --git a/Yavsc/Controllers/FrontOfficeController.cs b/Yavsc/Controllers/FrontOfficeController.cs index 68a94843..218bacb8 100644 --- a/Yavsc/Controllers/FrontOfficeController.cs +++ b/Yavsc/Controllers/FrontOfficeController.cs @@ -7,7 +7,6 @@ using Microsoft.Data.Entity; using Microsoft.Extensions.Logging; using Yavsc.Models.Booking; using Yavsc.Helpers; -using Yavsc.Models.Billing; using System; namespace Yavsc.Controllers diff --git a/Yavsc/Hubs/ChatHub.cs b/Yavsc/Hubs/ChatHub.cs index 4cb49f04..21e2e4b2 100644 --- a/Yavsc/Hubs/ChatHub.cs +++ b/Yavsc/Hubs/ChatHub.cs @@ -18,12 +18,11 @@ // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . -using System.Threading.Tasks; using Microsoft.AspNet.SignalR; +using Microsoft.Data.Entity; +using System.Threading.Tasks; using System.Collections.Generic; using System.Linq; -using System; -using Microsoft.Data.Entity; namespace Yavsc { diff --git a/Yavsc/Model/Messaging/ClientProviderInfo.cs b/Yavsc/Model/Messaging/ClientProviderInfo.cs index bb9807fc..cec01e02 100644 --- a/Yavsc/Model/Messaging/ClientProviderInfo.cs +++ b/Yavsc/Model/Messaging/ClientProviderInfo.cs @@ -1,6 +1,5 @@ using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; namespace Yavsc.Model { public class ClientProviderInfo From 452828040ba62a1f59883475c654d0b7616dc783 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 4 Nov 2016 13:55:48 +0100 Subject: [PATCH 11/15] WIP Estimate --- BookAStar/BookAStar/Interfaces/IEstimate.cs | 1 - .../BookAStar/Model/Workflow/Estimate.cs | 1 - .../ViewModels/EditEstimateViewModel.cs | 15 - .../{ => Workflow}/IAccountBalance.cs | 0 .../{ => Workflow}/IBillingClause.cs | 0 Yavsc/Interfaces/{ => Workflow}/ICircle.cs | 0 Yavsc/Interfaces/{ => Workflow}/IContact.cs | 0 Yavsc/Interfaces/{ => Workflow}/IEstimate.cs | 2 +- Yavsc/Interfaces/{ => Workflow}/IEvent.cs | 0 .../{ => Workflow}/IPerformerSpecified.cs | 0 Yavsc/Interfaces/Workflow/QueryStatus.cs | 20 + ...20161104090806_bankUserProfile.Designer.cs | 834 ++++++++++++++++++ .../20161104090806_bankUserProfile.cs | 302 +++++++ .../ApplicationDbContextModelSnapshot.cs | 31 + Yavsc/Model/Bank/BankIdentity.cs | 63 ++ Yavsc/Model/Billing/Command.cs | 9 - Yavsc/Model/Billing/Estimate.cs | 2 +- Yavsc/Model/Billing/NominatvieCommand.cs | 2 +- Yavsc/Model/Billing/Query.cs | 12 + Yavsc/Model/Identity/ApplicationUser.cs | 4 + Yavsc/ViewModels/WorkFlow/EstimateEdition.cs | 11 + Yavsc/Views/Estimate/Create.cshtml | 7 - Yavsc/Views/Estimate/Delete.cshtml | 6 - Yavsc/Views/Estimate/Details.cshtml | 7 - Yavsc/Views/Estimate/Edit.cshtml | 6 - Yavsc/Views/Estimate/Index.cshtml | 6 - Yavsc/Views/FrontOffice/Estimate.tex.cshtml | 43 +- 27 files changed, 1308 insertions(+), 76 deletions(-) rename Yavsc/Interfaces/{ => Workflow}/IAccountBalance.cs (100%) rename Yavsc/Interfaces/{ => Workflow}/IBillingClause.cs (100%) rename Yavsc/Interfaces/{ => Workflow}/ICircle.cs (100%) rename Yavsc/Interfaces/{ => Workflow}/IContact.cs (100%) rename Yavsc/Interfaces/{ => Workflow}/IEstimate.cs (93%) rename Yavsc/Interfaces/{ => Workflow}/IEvent.cs (100%) rename Yavsc/Interfaces/{ => Workflow}/IPerformerSpecified.cs (100%) create mode 100644 Yavsc/Interfaces/Workflow/QueryStatus.cs create mode 100644 Yavsc/Migrations/20161104090806_bankUserProfile.Designer.cs create mode 100644 Yavsc/Migrations/20161104090806_bankUserProfile.cs create mode 100644 Yavsc/Model/Bank/BankIdentity.cs delete mode 100644 Yavsc/Model/Billing/Command.cs create mode 100644 Yavsc/Model/Billing/Query.cs create mode 100644 Yavsc/ViewModels/WorkFlow/EstimateEdition.cs diff --git a/BookAStar/BookAStar/Interfaces/IEstimate.cs b/BookAStar/BookAStar/Interfaces/IEstimate.cs index 662546cd..6a21f114 100644 --- a/BookAStar/BookAStar/Interfaces/IEstimate.cs +++ b/BookAStar/BookAStar/Interfaces/IEstimate.cs @@ -14,7 +14,6 @@ namespace BookAStar.Model.Interfaces string Description { get; set; } long Id { get; set; } string OwnerId { get; set; } - int? Status { get; set; } string Title { get; set; } } } \ No newline at end of file diff --git a/BookAStar/BookAStar/Model/Workflow/Estimate.cs b/BookAStar/BookAStar/Model/Workflow/Estimate.cs index 277168f7..a2cb664e 100644 --- a/BookAStar/BookAStar/Model/Workflow/Estimate.cs +++ b/BookAStar/BookAStar/Model/Workflow/Estimate.cs @@ -14,7 +14,6 @@ namespace BookAStar.Model.Workflow public string CommandType { get; set; } // Markdown expected public string Description { get; set; } - public int? Status { get; set; } public string Title { get; set; } public IList Bill { get; set; } /// diff --git a/BookAStar/BookAStar/ViewModels/EditEstimateViewModel.cs b/BookAStar/BookAStar/ViewModels/EditEstimateViewModel.cs index d639b78c..cef7746a 100644 --- a/BookAStar/BookAStar/ViewModels/EditEstimateViewModel.cs +++ b/BookAStar/BookAStar/ViewModels/EditEstimateViewModel.cs @@ -81,21 +81,6 @@ namespace BookAStar.ViewModels } } - private int? status; - [JsonIgnore] - public int? Status - { - get - { - return Data.Status; - } - - set - { - SetProperty(ref status, value, "Status"); - Data.Status = status; - } - } private string title; [JsonIgnore] public string Title diff --git a/Yavsc/Interfaces/IAccountBalance.cs b/Yavsc/Interfaces/Workflow/IAccountBalance.cs similarity index 100% rename from Yavsc/Interfaces/IAccountBalance.cs rename to Yavsc/Interfaces/Workflow/IAccountBalance.cs diff --git a/Yavsc/Interfaces/IBillingClause.cs b/Yavsc/Interfaces/Workflow/IBillingClause.cs similarity index 100% rename from Yavsc/Interfaces/IBillingClause.cs rename to Yavsc/Interfaces/Workflow/IBillingClause.cs diff --git a/Yavsc/Interfaces/ICircle.cs b/Yavsc/Interfaces/Workflow/ICircle.cs similarity index 100% rename from Yavsc/Interfaces/ICircle.cs rename to Yavsc/Interfaces/Workflow/ICircle.cs diff --git a/Yavsc/Interfaces/IContact.cs b/Yavsc/Interfaces/Workflow/IContact.cs similarity index 100% rename from Yavsc/Interfaces/IContact.cs rename to Yavsc/Interfaces/Workflow/IContact.cs diff --git a/Yavsc/Interfaces/IEstimate.cs b/Yavsc/Interfaces/Workflow/IEstimate.cs similarity index 93% rename from Yavsc/Interfaces/IEstimate.cs rename to Yavsc/Interfaces/Workflow/IEstimate.cs index 1c833cc6..6e5ced18 100644 --- a/Yavsc/Interfaces/IEstimate.cs +++ b/Yavsc/Interfaces/Workflow/IEstimate.cs @@ -1,6 +1,7 @@ namespace Yavsc.Interfaces { using System.Collections.Generic; + using Yavsc.Interfaces.Workflow; using Yavsc.Models.Billing; public interface IEstimate { @@ -13,7 +14,6 @@ string Description { get; set; } long Id { get; set; } string OwnerId { get; set; } - int? Status { get; set; } string Title { get; set; } } } \ No newline at end of file diff --git a/Yavsc/Interfaces/IEvent.cs b/Yavsc/Interfaces/Workflow/IEvent.cs similarity index 100% rename from Yavsc/Interfaces/IEvent.cs rename to Yavsc/Interfaces/Workflow/IEvent.cs diff --git a/Yavsc/Interfaces/IPerformerSpecified.cs b/Yavsc/Interfaces/Workflow/IPerformerSpecified.cs similarity index 100% rename from Yavsc/Interfaces/IPerformerSpecified.cs rename to Yavsc/Interfaces/Workflow/IPerformerSpecified.cs diff --git a/Yavsc/Interfaces/Workflow/QueryStatus.cs b/Yavsc/Interfaces/Workflow/QueryStatus.cs new file mode 100644 index 00000000..39bbbbe7 --- /dev/null +++ b/Yavsc/Interfaces/Workflow/QueryStatus.cs @@ -0,0 +1,20 @@ +namespace Yavsc.Interfaces.Workflow +{ + /// + /// Status, + /// should be associated to any + /// client user query to a provider user or + /// other external entity. + /// + public enum QueryStatus: int + { + Inserted, + OwnerValidated, + Visited, + Rejected, + Accepted, + InProgress, + Failed, + Success + } +} \ No newline at end of file diff --git a/Yavsc/Migrations/20161104090806_bankUserProfile.Designer.cs b/Yavsc/Migrations/20161104090806_bankUserProfile.Designer.cs new file mode 100644 index 00000000..b548239b --- /dev/null +++ b/Yavsc/Migrations/20161104090806_bankUserProfile.Designer.cs @@ -0,0 +1,834 @@ +using System; +using Microsoft.Data.Entity; +using Microsoft.Data.Entity.Infrastructure; +using Microsoft.Data.Entity.Migrations; +using Yavsc.Models; + +namespace Yavsc.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20161104090806_bankUserProfile")] + partial class bankUserProfile + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("ProductVersion", "7.0.0-rc1-16348"); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b => + { + b.Property("Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Name") + .HasAnnotation("MaxLength", 256); + + b.Property("NormalizedName") + .HasAnnotation("MaxLength", 256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .HasAnnotation("Relational:Name", "RoleNameIndex"); + + b.HasAnnotation("Relational:TableName", "AspNetRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClaimType"); + + b.Property("ClaimValue"); + + b.Property("RoleId") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAnnotation("Relational:TableName", "AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClaimType"); + + b.Property("ClaimValue"); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAnnotation("Relational:TableName", "AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + { + b.Property("LoginProvider"); + + b.Property("ProviderKey"); + + b.Property("ProviderDisplayName"); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasAnnotation("Relational:TableName", "AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + { + b.Property("UserId"); + + b.Property("RoleId"); + + b.HasKey("UserId", "RoleId"); + + b.HasAnnotation("Relational:TableName", "AspNetUserRoles"); + }); + + modelBuilder.Entity("Yavsc.Location", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Address") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("Latitude"); + + b.Property("Longitude"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccountNumber") + .HasAnnotation("MaxLength", 15); + + b.Property("BIC") + .HasAnnotation("MaxLength", 15); + + b.Property("BankCode") + .HasAnnotation("MaxLength", 5); + + b.Property("BankedKey"); + + b.Property("IBAN") + .HasAnnotation("MaxLength", 33); + + b.Property("WicketCode") + .HasAnnotation("MaxLength", 5); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Model.Chat.Connection", b => + { + b.Property("ConnectionId"); + + b.Property("ApplicationUserId"); + + b.Property("Connected"); + + b.Property("UserAgent"); + + b.HasKey("ConnectionId"); + }); + + modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b => + { + b.Property("UserId"); + + b.Property("Avatar"); + + b.Property("BillingAddressId"); + + b.Property("ChatHubConnectionId"); + + b.Property("EMail"); + + b.Property("Phone"); + + b.Property("Rate"); + + b.Property("UserName"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.Property("UserId"); + + b.Property("ContactCredits"); + + b.Property("Credits"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Activity", b => + { + b.Property("Code") + .HasAnnotation("MaxLength", 512); + + b.Property("ActorDenomination"); + + b.Property("Description"); + + b.Property("ModeratorGroupName"); + + b.Property("Name") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("Photo"); + + b.HasKey("Code"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.Property("Id"); + + b.Property("AccessFailedCount"); + + b.Property("Avatar") + .HasAnnotation("MaxLength", 512); + + b.Property("BankInfoId"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("DedicatedGoogleCalendar"); + + b.Property("Email") + .HasAnnotation("MaxLength", 256); + + b.Property("EmailConfirmed"); + + b.Property("FullName") + .HasAnnotation("MaxLength", 512); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("NormalizedEmail") + .HasAnnotation("MaxLength", 256); + + b.Property("NormalizedUserName") + .HasAnnotation("MaxLength", 256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("PostalAddressId"); + + b.Property("SecurityStamp"); + + b.Property("TwoFactorEnabled"); + + b.Property("UserName") + .HasAnnotation("MaxLength", 256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasAnnotation("Relational:Name", "EmailIndex"); + + b.HasIndex("NormalizedUserName") + .HasAnnotation("Relational:Name", "UserNameIndex"); + + b.HasAnnotation("Relational:TableName", "AspNetUsers"); + }); + + modelBuilder.Entity("Yavsc.Models.Auth.Client", b => + { + b.Property("Id"); + + b.Property("Active"); + + b.Property("DisplayName"); + + b.Property("LogoutRedirectUri") + .HasAnnotation("MaxLength", 100); + + b.Property("RedirectUri"); + + b.Property("RefreshTokenLifeTime"); + + b.Property("Secret"); + + b.Property("Type"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b => + { + b.Property("Id"); + + b.Property("ClientId") + .IsRequired() + .HasAnnotation("MaxLength", 50); + + b.Property("ExpiresUtc"); + + b.Property("IssuedUtc"); + + b.Property("ProtectedTicket") + .IsRequired(); + + b.Property("Subject") + .IsRequired() + .HasAnnotation("MaxLength", 50); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BalanceId") + .IsRequired(); + + b.Property("ExecDate"); + + b.Property("Impact"); + + b.Property("Reason") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ArticleId"); + + b.Property("Count"); + + b.Property("Description") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("EstimateId"); + + b.Property("EstimateTemplateId"); + + b.Property("UnitaryCost"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AttachedFilesString"); + + b.Property("AttachedGraphicsString"); + + b.Property("ClientApprouvalDate"); + + b.Property("ClientId") + .IsRequired(); + + b.Property("CommandId"); + + b.Property("CommandType"); + + b.Property("Description"); + + b.Property("LatestValidationDate"); + + b.Property("OwnerId") + .IsRequired(); + + b.Property("Status"); + + b.Property("Title"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("OwnerId") + .IsRequired(); + + b.Property("Title"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b => + { + b.Property("SIREN"); + + b.HasKey("SIREN"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("Content"); + + b.Property("Modified"); + + b.Property("Photo"); + + b.Property("Posted") + .ValueGeneratedOnAdd() + .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + + b.Property("Rate"); + + b.Property("Title"); + + b.Property("Visible"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("CreationDate") + .ValueGeneratedOnAdd() + .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("ValidationDate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Circle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationUserId"); + + b.Property("Name"); + + b.Property("OwnerId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.CircleMember", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CircleId"); + + b.Property("MemberId") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Contact", b => + { + b.Property("OwnerId"); + + b.Property("UserId"); + + b.Property("ApplicationUserId"); + + b.HasKey("OwnerId", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => + { + b.Property("DeviceId"); + + b.Property("DeclarationDate") + .ValueGeneratedOnAdd() + .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + + b.Property("DeviceOwnerId"); + + b.Property("GCMRegistrationId") + .IsRequired(); + + b.Property("Model"); + + b.Property("Platform"); + + b.Property("Version"); + + b.HasKey("DeviceId"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("Discriminator") + .IsRequired(); + + b.Property("Name"); + + b.Property("Public"); + + b.HasKey("Id"); + + b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator"); + + b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Service", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ContextId"); + + b.Property("Description"); + + b.Property("Name"); + + b.Property("Public"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b => + { + b.Property("UserId"); + + b.Property("AccessToken"); + + b.Property("Expiration"); + + b.Property("ExpiresIn"); + + b.Property("RefreshToken"); + + b.Property("TokenType"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.PostTag", b => + { + b.Property("PostId"); + + b.Property("TagId"); + + b.HasKey("PostId", "TagId"); + }); + + modelBuilder.Entity("Yavsc.Models.Skill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name"); + + b.Property("Rate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.Property("PerformerId"); + + b.Property("AcceptGeoLocalization"); + + b.Property("AcceptNotifications"); + + b.Property("AcceptPublicContact"); + + b.Property("Active"); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("MaxDailyCost"); + + b.Property("MinDailyCost"); + + b.Property("OfferId"); + + b.Property("OrganizationAddressId"); + + b.Property("Rate"); + + b.Property("SIREN") + .IsRequired() + .HasAnnotation("MaxLength", 14); + + b.Property("WebSite"); + + b.HasKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Product", b => + { + b.HasBaseType("Yavsc.Models.Market.BaseProduct"); + + b.Property("Depth"); + + b.Property("Height"); + + b.Property("Price"); + + b.Property("Weight"); + + b.Property("Width"); + + b.HasAnnotation("Relational:DiscriminatorValue", "Product"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + .WithMany() + .HasForeignKey("RoleId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + .WithMany() + .HasForeignKey("RoleId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Model.Chat.Connection", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b => + { + b.HasOne("Yavsc.Location") + .WithMany() + .HasForeignKey("BillingAddressId"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithOne() + .HasForeignKey("Yavsc.Models.AccountBalance", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.HasOne("Yavsc.Model.Bank.BankIdentity") + .WithMany() + .HasForeignKey("BankInfoId"); + + b.HasOne("Yavsc.Location") + .WithMany() + .HasForeignKey("PostalAddressId"); + }); + + modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => + { + b.HasOne("Yavsc.Models.AccountBalance") + .WithMany() + .HasForeignKey("BalanceId"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => + { + b.HasOne("Yavsc.Models.Market.BaseProduct") + .WithMany() + .HasForeignKey("ArticleId"); + + b.HasOne("Yavsc.Models.Billing.Estimate") + .WithMany() + .HasForeignKey("EstimateId"); + + b.HasOne("Yavsc.Models.Billing.EstimateTemplate") + .WithMany() + .HasForeignKey("EstimateTemplateId"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => + { + b.HasOne("Yavsc.Models.Booking.BookQuery") + .WithMany() + .HasForeignKey("CommandId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("AuthorId"); + }); + + modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ClientId"); + + b.HasOne("Yavsc.Location") + .WithMany() + .HasForeignKey("LocationId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Circle", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.CircleMember", b => + { + b.HasOne("Yavsc.Models.Circle") + .WithMany() + .HasForeignKey("CircleId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("MemberId"); + }); + + modelBuilder.Entity("Yavsc.Models.Contact", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("DeviceOwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Service", b => + { + b.HasOne("Yavsc.Models.Activity") + .WithMany() + .HasForeignKey("ContextId"); + }); + + modelBuilder.Entity("Yavsc.Models.PostTag", b => + { + b.HasOne("Yavsc.Models.Blog") + .WithMany() + .HasForeignKey("PostId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.HasOne("Yavsc.Models.Activity") + .WithMany() + .HasForeignKey("ActivityCode"); + + b.HasOne("Yavsc.Models.Market.Service") + .WithMany() + .HasForeignKey("OfferId"); + + b.HasOne("Yavsc.Location") + .WithMany() + .HasForeignKey("OrganizationAddressId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("PerformerId"); + }); + } + } +} diff --git a/Yavsc/Migrations/20161104090806_bankUserProfile.cs b/Yavsc/Migrations/20161104090806_bankUserProfile.cs new file mode 100644 index 00000000..53faa0a9 --- /dev/null +++ b/Yavsc/Migrations/20161104090806_bankUserProfile.cs @@ -0,0 +1,302 @@ +using Microsoft.Data.Entity.Migrations; + +namespace Yavsc.Migrations +{ + public partial class bankUserProfile : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance"); + migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact"); + migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine"); + migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery"); + migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); + migrationBuilder.CreateTable( + name: "BankIdentity", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Npgsql:Serial", true), + AccountNumber = table.Column(nullable: true), + BIC = table.Column(nullable: true), + BankCode = table.Column(nullable: true), + BankedKey = table.Column(nullable: false), + IBAN = table.Column(nullable: true), + WicketCode = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_BankIdentity", x => x.Id); + }); + migrationBuilder.AddColumn( + name: "BankInfoId", + table: "AspNetUsers", + nullable: true); + migrationBuilder.AddForeignKey( + name: "FK_IdentityRoleClaim_IdentityRole_RoleId", + table: "AspNetRoleClaims", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserClaim_ApplicationUser_UserId", + table: "AspNetUserClaims", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserLogin_ApplicationUser_UserId", + table: "AspNetUserLogins", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserRole_IdentityRole_RoleId", + table: "AspNetUserRoles", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserRole_ApplicationUser_UserId", + table: "AspNetUserRoles", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_AccountBalance_ApplicationUser_UserId", + table: "AccountBalance", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_ApplicationUser_BankIdentity_BankInfoId", + table: "AspNetUsers", + column: "BankInfoId", + principalTable: "BankIdentity", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BalanceImpact_AccountBalance_BalanceId", + table: "BalanceImpact", + column: "BalanceId", + principalTable: "AccountBalance", + principalColumn: "UserId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CommandLine_Estimate_EstimateId", + table: "CommandLine", + column: "EstimateId", + principalTable: "Estimate", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BookQuery_ApplicationUser_ClientId", + table: "BookQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BookQuery_PerformerProfile_PerformerId", + table: "BookQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_Circle_CircleId", + table: "CircleMember", + column: "CircleId", + principalTable: "Circle", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_ApplicationUser_MemberId", + table: "CircleMember", + column: "MemberId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PostTag_Blog_PostId", + table: "PostTag", + column: "PostId", + principalTable: "Blog", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Activity_ActivityCode", + table: "PerformerProfile", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Location_OrganizationAddressId", + table: "PerformerProfile", + column: "OrganizationAddressId", + principalTable: "Location", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_ApplicationUser_PerformerId", + table: "PerformerProfile", + column: "PerformerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance"); + migrationBuilder.DropForeignKey(name: "FK_ApplicationUser_BankIdentity_BankInfoId", table: "AspNetUsers"); + migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact"); + migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine"); + migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery"); + migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); + migrationBuilder.DropColumn(name: "BankInfoId", table: "AspNetUsers"); + migrationBuilder.DropTable("BankIdentity"); + migrationBuilder.AddForeignKey( + name: "FK_IdentityRoleClaim_IdentityRole_RoleId", + table: "AspNetRoleClaims", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserClaim_ApplicationUser_UserId", + table: "AspNetUserClaims", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserLogin_ApplicationUser_UserId", + table: "AspNetUserLogins", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserRole_IdentityRole_RoleId", + table: "AspNetUserRoles", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserRole_ApplicationUser_UserId", + table: "AspNetUserRoles", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_AccountBalance_ApplicationUser_UserId", + table: "AccountBalance", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BalanceImpact_AccountBalance_BalanceId", + table: "BalanceImpact", + column: "BalanceId", + principalTable: "AccountBalance", + principalColumn: "UserId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CommandLine_Estimate_EstimateId", + table: "CommandLine", + column: "EstimateId", + principalTable: "Estimate", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BookQuery_ApplicationUser_ClientId", + table: "BookQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BookQuery_PerformerProfile_PerformerId", + table: "BookQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_Circle_CircleId", + table: "CircleMember", + column: "CircleId", + principalTable: "Circle", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_ApplicationUser_MemberId", + table: "CircleMember", + column: "MemberId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PostTag_Blog_PostId", + table: "PostTag", + column: "PostId", + principalTable: "Blog", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Activity_ActivityCode", + table: "PerformerProfile", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Location_OrganizationAddressId", + table: "PerformerProfile", + column: "OrganizationAddressId", + principalTable: "Location", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_ApplicationUser_PerformerId", + table: "PerformerProfile", + column: "PerformerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + } + } +} diff --git a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index 0eca2168..dca0444a 100644 --- a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs @@ -113,6 +113,31 @@ namespace Yavsc.Migrations b.HasKey("Id"); }); + modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccountNumber") + .HasAnnotation("MaxLength", 15); + + b.Property("BIC") + .HasAnnotation("MaxLength", 15); + + b.Property("BankCode") + .HasAnnotation("MaxLength", 5); + + b.Property("BankedKey"); + + b.Property("IBAN") + .HasAnnotation("MaxLength", 33); + + b.Property("WicketCode") + .HasAnnotation("MaxLength", 5); + + b.HasKey("Id"); + }); + modelBuilder.Entity("Yavsc.Model.Chat.Connection", b => { b.Property("ConnectionId"); @@ -187,6 +212,8 @@ namespace Yavsc.Migrations b.Property("Avatar") .HasAnnotation("MaxLength", 512); + b.Property("BankInfoId"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken(); @@ -678,6 +705,10 @@ namespace Yavsc.Migrations modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => { + b.HasOne("Yavsc.Model.Bank.BankIdentity") + .WithMany() + .HasForeignKey("BankInfoId"); + b.HasOne("Yavsc.Location") .WithMany() .HasForeignKey("PostalAddressId"); diff --git a/Yavsc/Model/Bank/BankIdentity.cs b/Yavsc/Model/Bank/BankIdentity.cs new file mode 100644 index 00000000..9d58b1b4 --- /dev/null +++ b/Yavsc/Model/Bank/BankIdentity.cs @@ -0,0 +1,63 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Yavsc.Model.Bank +{ + public class BankIdentity + { + [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long Id { get; set; } + + /// + /// Gets or sets the BI. + /// + /// The BI. + [DisplayName("Code BIC")] + [StringLength(15)] + public string BIC { get; set; } + + /// + /// Gets or sets the IBA. + /// + /// The IBA. + [DisplayName("Code IBAN")] + [StringLength(33)] + public string IBAN { get; set; } + + + /// + /// Gets or sets the bank code. + /// + /// The bank code. + [DisplayName("Code Banque")] + [StringLength(5)] + public string BankCode { get; set; } + + /// + /// Gets or sets the wicket code. + /// + /// The wicket code. + [DisplayName("Code Guichet")] + [StringLength(5)] + public string WicketCode { get; set; } + + /// + /// Gets or sets the account number. + /// + /// The account number. + [DisplayName("Numéro de compte")] + [StringLength(15)] + public string AccountNumber { get; set; } + + /// + /// Gets or sets the banked key. + /// + /// The banked key. + [DisplayName("Clé RIB")] + public int BankedKey { get; set; } + + } + + +} \ No newline at end of file diff --git a/Yavsc/Model/Billing/Command.cs b/Yavsc/Model/Billing/Command.cs deleted file mode 100644 index fa9ffb36..00000000 --- a/Yavsc/Model/Billing/Command.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Yavsc.Models.Market; - -namespace Yavsc.Models.Billing -{ - - public class Command

where P:BaseProduct { - } - - } diff --git a/Yavsc/Model/Billing/Estimate.cs b/Yavsc/Model/Billing/Estimate.cs index 9bd59c9b..21dc8216 100644 --- a/Yavsc/Model/Billing/Estimate.cs +++ b/Yavsc/Model/Billing/Estimate.cs @@ -6,6 +6,7 @@ namespace Yavsc.Models.Billing using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using Yavsc.Interfaces; + using Yavsc.Interfaces.Workflow; using Yavsc.Models.Booking; public partial class Estimate : IEstimate { @@ -22,7 +23,6 @@ namespace Yavsc.Models.Billing [ForeignKey("CommandId")] public BookQuery Query { get; set; } public string Description { get; set; } - public int? Status { get; set; } public string Title { get; set; } [InverseProperty("Estimate")] diff --git a/Yavsc/Model/Billing/NominatvieCommand.cs b/Yavsc/Model/Billing/NominatvieCommand.cs index 98d70a04..1f713c4e 100644 --- a/Yavsc/Model/Billing/NominatvieCommand.cs +++ b/Yavsc/Model/Billing/NominatvieCommand.cs @@ -8,7 +8,7 @@ using Yavsc.Models.Workflow; namespace Yavsc.Models.Billing { - public class NominativeServiceCommand : Command { + public class NominativeServiceCommand : Query { public string ClientId { get; set; } diff --git a/Yavsc/Model/Billing/Query.cs b/Yavsc/Model/Billing/Query.cs new file mode 100644 index 00000000..a21ccf63 --- /dev/null +++ b/Yavsc/Model/Billing/Query.cs @@ -0,0 +1,12 @@ +using Yavsc.Interfaces.Workflow; +using Yavsc.Models.Market; + +namespace Yavsc.Models.Billing +{ + + public class Query

where P : BaseProduct + { + QueryStatus Status { get; set; } + } + +} diff --git a/Yavsc/Model/Identity/ApplicationUser.cs b/Yavsc/Model/Identity/ApplicationUser.cs index 60427d52..08336cff 100644 --- a/Yavsc/Model/Identity/ApplicationUser.cs +++ b/Yavsc/Model/Identity/ApplicationUser.cs @@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Yavsc.Models.Identity; using Yavsc.Model.Chat; +using Yavsc.Model.Bank; namespace Yavsc.Models { @@ -81,5 +82,8 @@ namespace Yavsc.Models public override string ToString() { return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString(); } + + public BankIdentity BankInfo { get; set; } + } } diff --git a/Yavsc/ViewModels/WorkFlow/EstimateEdition.cs b/Yavsc/ViewModels/WorkFlow/EstimateEdition.cs new file mode 100644 index 00000000..f25ec028 --- /dev/null +++ b/Yavsc/ViewModels/WorkFlow/EstimateEdition.cs @@ -0,0 +1,11 @@ +using Yavsc.Models.Billing; + +namespace Yavsc.ViewModels.WorkFlow +{ + public class EstimateEdition + { + public Estimate Data { get; set; } + + + } +} \ No newline at end of file diff --git a/Yavsc/Views/Estimate/Create.cshtml b/Yavsc/Views/Estimate/Create.cshtml index 03bbe9d7..1300fb1b 100644 --- a/Yavsc/Views/Estimate/Create.cshtml +++ b/Yavsc/Views/Estimate/Create.cshtml @@ -40,13 +40,6 @@ -

- -
- - -
-
diff --git a/Yavsc/Views/Estimate/Delete.cshtml b/Yavsc/Views/Estimate/Delete.cshtml index 17c57de7..1de650e8 100644 --- a/Yavsc/Views/Estimate/Delete.cshtml +++ b/Yavsc/Views/Estimate/Delete.cshtml @@ -17,12 +17,6 @@
@Html.DisplayFor(model => model.Description)
-
- @Html.DisplayNameFor(model => model.Status) -
-
- @Html.DisplayFor(model => model.Status) -
@Html.DisplayNameFor(model => model.Title)
diff --git a/Yavsc/Views/Estimate/Details.cshtml b/Yavsc/Views/Estimate/Details.cshtml index cc3d783f..3ecb1b8b 100644 --- a/Yavsc/Views/Estimate/Details.cshtml +++ b/Yavsc/Views/Estimate/Details.cshtml @@ -24,13 +24,6 @@ @Html.DisplayFor(model => model.Description) -
- @Html.DisplayNameFor(model => model.Status) -
-
- @Html.DisplayFor(model => model.Status) -
-
@Html.DisplayNameFor(model => model.Bill)
diff --git a/Yavsc/Views/Estimate/Edit.cshtml b/Yavsc/Views/Estimate/Edit.cshtml index 2e14961d..8fc1ce4a 100644 --- a/Yavsc/Views/Estimate/Edit.cshtml +++ b/Yavsc/Views/Estimate/Edit.cshtml @@ -19,12 +19,6 @@
-
- -
- - -
diff --git a/Yavsc/Views/Estimate/Index.cshtml b/Yavsc/Views/Estimate/Index.cshtml index a05b342a..85fdf739 100644 --- a/Yavsc/Views/Estimate/Index.cshtml +++ b/Yavsc/Views/Estimate/Index.cshtml @@ -14,9 +14,6 @@ @Html.DisplayNameFor(model => model.Description) - - @Html.DisplayNameFor(model => model.Status) - @Html.DisplayNameFor(model => model.Title) @@ -37,9 +34,6 @@ @Html.DisplayFor(modelItem => item.Description) - - @Html.DisplayFor(modelItem => item.Status) - @Html.DisplayFor(modelItem => item.Title) diff --git a/Yavsc/Views/FrontOffice/Estimate.tex.cshtml b/Yavsc/Views/FrontOffice/Estimate.tex.cshtml index ad5d034e..69ec0273 100644 --- a/Yavsc/Views/FrontOffice/Estimate.tex.cshtml +++ b/Yavsc/Views/FrontOffice/Estimate.tex.cshtml @@ -1,6 +1,9 @@ @model Estimate @{ Layout = null; + var pro = Model.Query.PerformerProfile; + var from = Model.Query.PerformerProfile.Performer; + var to = Model.Query.Client; } \documentclass[french,11pt]{article} \usepackage{babel} @@ -115,12 +118,14 @@ \begin{document} % Logo de la société -%\includegraphics{logo.jpg} - +@if (from.Avatar != null) { +\includegraphics{@from.Avatar} +} else { +%\includegraphics{logo.png} +} % Nom et adresse de la société - from.Name \\ - from.Address \\ -from.ZipCode from.CityAndState\\ + @from.UserName \\ + @pro.OrganizationAddress.Address Facture n°\FactureNum @@ -160,22 +165,30 @@ Facture n°\FactureNum \ifthenelse{\equal{\FactureAcquittee}{oui}}{ Facture acquittée. }{ - - À régler par chèque ou par virement bancaire : +@{ + var bi = from.BankInfo; + if (bi!=null) { + À régler par chèque ou par virement bancaire : \begin{center} \begin{tabular}{|c c c c|} - if (!string.IsNullOrWhiteSpace(from.BankCode) && !string.IsNullOrWhiteSpace(from.WicketCode) - && !string.IsNullOrWhiteSpace(from.AccountNumber) ) { - \hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\ - from.BankCode & from.WicketCode & from.AccountNumber & from.BankedKey \\ +@if (!string.IsNullOrWhiteSpace(bi.BankCode) && !string.IsNullOrWhiteSpace(bi.WicketCode) + && !string.IsNullOrWhiteSpace(bi.AccountNumber) ) { +\hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\ +@bi.BankCode & @bi.WicketCode & @bi.AccountNumber & @bi.BankedKey \\ + } - if (!string.IsNullOrWhiteSpace(from.IBAN) && !string.IsNullOrWhiteSpace(from.BIC)) { - \hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ from.IBAN } \\ - \hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ from.BIC } + @if (!string.IsNullOrWhiteSpace(@bi.IBAN) && !string.IsNullOrWhiteSpace(@bi.BIC)) { + + \hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ @bi.IBAN } \\ + \hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ @bi.BIC } + } \\ \hline \end{tabular} - \end{center} + \end{center} + } +} + } \end{document} From 8d4eb1a9afc156666d3a01da9070080761270716 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 6 Nov 2016 00:31:23 +0100 Subject: [PATCH 12/15] prepares refactorisation for geocoding --- Yavsc/Views/Command/Create.cshtml | 57 +++++---- Yavsc/Views/Manage/SetActivity.cshtml | 174 +++++++++++++------------- 2 files changed, 118 insertions(+), 113 deletions(-) diff --git a/Yavsc/Views/Command/Create.cshtml b/Yavsc/Views/Command/Create.cshtml index ab6b8392..11f23fb3 100644 --- a/Yavsc/Views/Command/Create.cshtml +++ b/Yavsc/Views/Command/Create.cshtml @@ -27,24 +27,34 @@ - - - - +@model PerformerProfile +@{ ViewData["Title"] = "Setup your performer profile"; } +@section header{ + @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); - - -} - + } + +} @section scripts{ - - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } - } + @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } }

@ViewData["Title"].

@@ -116,23 +110,23 @@ var gmap = new google.maps.Map(document.getElementById('map'), {

@SR["Choose below your main activity"]:


-
+
-
-
-
+
+
-
-
+
+
@@ -140,8 +134,8 @@ var gmap = new google.maps.Map(document.getElementById('map'), {
-
-
+
+
@@ -149,8 +143,8 @@ var gmap = new google.maps.Map(document.getElementById('map'), {
-
-
+
+
@@ -158,8 +152,8 @@ var gmap = new google.maps.Map(document.getElementById('map'), {
-
-
+
+
@@ -167,8 +161,8 @@ var gmap = new google.maps.Map(document.getElementById('map'), {
-
-
+
+
@@ -176,38 +170,38 @@ var gmap = new google.maps.Map(document.getElementById('map'), {
-
-
+
+
- +
-
-
+
+
- +
-
-
+
+
+
    +
-
- @Html.Hidden("OrganizationAddress.Latitude") - @Html.Hidden("OrganizationAddress.Longitude") - @Html.Hidden("PerformerId") +
+ @Html.Hidden("OrganizationAddress.Latitude") @Html.Hidden("OrganizationAddress.Longitude") @Html.Hidden("PerformerId") @@ -215,4 +209,4 @@ var gmap = new google.maps.Map(document.getElementById('map'), {
@Html.Hidden("PerfomerId") -
+ \ No newline at end of file From 51b4ee2286198d4f3012491ac83bab95ff348a59 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 6 Nov 2016 02:03:36 +0100 Subject: [PATCH 13/15] estimate to LaTeX --- Yavsc/Controllers/FrontOfficeController.cs | 20 +- Yavsc/Controllers/ManageController.cs | 18 +- Yavsc/Helpers/TeXHelpers.cs | 15 + Yavsc/Interfaces/Workflow/IEstimate.cs | 1 - Yavsc/Migrations/20161010102616_recontact.cs | 2 - ...143022_estimateClientApprouval.Designer.cs | 1 - .../20161020143022_estimateClientApprouval.cs | 1 - .../20161020212947_userAddress.Designer.cs | 1 - .../Migrations/20161020212947_userAddress.cs | 3 +- .../20161021153306_estimateLines.Designer.cs | 1 - .../20161021153306_estimateLines.cs | 3 +- .../20161101234703_chatConnection.Designer.cs | 1 - .../20161101234703_chatConnection.cs | 3 +- .../20161102132129_fixCxOwner.Designer.cs | 1 - Yavsc/Migrations/20161102132129_fixCxOwner.cs | 3 +- .../20161102133253_fix2CxOwner.Designer.cs | 1 - .../Migrations/20161102133253_fix2CxOwner.cs | 3 +- ...61104164949_dropEstimateStatus.Designer.cs | 833 ++++++++++++++++++ .../20161104164949_dropEstimateStatus.cs | 278 ++++++ .../ApplicationDbContextModelSnapshot.cs | 2 - Yavsc/Model/Billing/Estimate.cs | 17 +- .../Yavsc.Resources.YavscLocalisation.fr.resx | 1 + .../ViewModels/Manage/AddBankInfoViewModel.cs | 24 + Yavsc/ViewModels/Manage/IndexViewModel.cs | 3 + Yavsc/Views/Estimate/Details.cshtml | 8 +- Yavsc/Views/FrontOffice/Estimate.tex.cshtml | 33 +- Yavsc/Views/FrontOffice/tmp.cshtml | 91 -- Yavsc/Views/Manage/AddBankInfo.cshtml | 65 ++ Yavsc/Views/Manage/Index.cshtml | 9 +- 29 files changed, 1294 insertions(+), 148 deletions(-) create mode 100644 Yavsc/Helpers/TeXHelpers.cs create mode 100644 Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs create mode 100644 Yavsc/Migrations/20161104164949_dropEstimateStatus.cs create mode 100644 Yavsc/ViewModels/Manage/AddBankInfoViewModel.cs delete mode 100644 Yavsc/Views/FrontOffice/tmp.cshtml create mode 100644 Yavsc/Views/Manage/AddBankInfo.cshtml diff --git a/Yavsc/Controllers/FrontOfficeController.cs b/Yavsc/Controllers/FrontOfficeController.cs index 218bacb8..a7b8fb8c 100644 --- a/Yavsc/Controllers/FrontOfficeController.cs +++ b/Yavsc/Controllers/FrontOfficeController.cs @@ -87,9 +87,8 @@ namespace Yavsc.Controllers )); } - [Produces("text/x-tex"), Authorize, - Route("estimate-{id}.tex")] - public ViewResult Estimate(long id) + [Produces("text/x-tex"), Authorize, Route("estimate-{id}.tex")] + public ViewResult EstimateTex(long id) { var estimate = _context.Estimates.Include(x=>x.Query) .Include(x=>x.Query.Client) @@ -97,10 +96,21 @@ namespace Yavsc.Controllers .Include(x=>x.Query.PerformerProfile.OrganizationAddress) .Include(x=>x.Query.PerformerProfile.Performer) .Include(e=>e.Bill).FirstOrDefault(x=>x.Id==id); - ViewBag.From = estimate.Query.PerformerProfile.Performer; - ViewBag.To = estimate.Query.Client; Response.ContentType = "text/x-tex"; return View("Estimate.tex", estimate); } + + + [Produces("application/x-pdf"), Authorize, Route("estimate-{id}.pdf")] + public ViewResult EstimatePdf(long id) + { + var estimate = _context.Estimates.Include(x=>x.Query) + .Include(x=>x.Query.Client) + .Include(x=>x.Query.PerformerProfile) + .Include(x=>x.Query.PerformerProfile.OrganizationAddress) + .Include(x=>x.Query.PerformerProfile.Performer) + .Include(e=>e.Bill).FirstOrDefault(x=>x.Id==id); + return View("Estimate.pdf", estimate); + } } } \ No newline at end of file diff --git a/Yavsc/Controllers/ManageController.cs b/Yavsc/Controllers/ManageController.cs index d9fe2630..a954e3cb 100644 --- a/Yavsc/Controllers/ManageController.cs +++ b/Yavsc/Controllers/ManageController.cs @@ -105,7 +105,8 @@ namespace Yavsc.Controllers Roles = await _userManager.GetRolesAsync(user), PostalAddress = user.PostalAddress?.Address, FullName = user.FullName, - Avatar = user.Avatar + Avatar = user.Avatar, + BankInfo = user.BankInfo }; if (_dbContext.Performers.Any(x => x.PerformerId == user.Id)) { @@ -296,6 +297,21 @@ namespace Yavsc.Controllers else return Redirect(model.ReturnUrl); } + [HttpGet,Authorize] + public async Task AddBankInfo() + { + var user = await _userManager.FindByIdAsync(User.GetUserId()); + + return View(new AddBankInfoViewModel( + user.BankInfo)); + } + + [HttpGet,Authorize] + public async Task SetFullName() + { + var user = await _userManager.FindByIdAsync(User.GetUserId()); + return View(user.FullName); + } // // POST: /Manage/ChangePassword [HttpPost] diff --git a/Yavsc/Helpers/TeXHelpers.cs b/Yavsc/Helpers/TeXHelpers.cs new file mode 100644 index 00000000..2157520a --- /dev/null +++ b/Yavsc/Helpers/TeXHelpers.cs @@ -0,0 +1,15 @@ +using System.Linq; + +namespace Yavsc.Helpers +{ + public static class TeXHelpers + { + public static string NewLinesWith(this string target, string separator) + { + var items = target.Split(new char[] {'\n'}).Where( + s=> !string.IsNullOrWhiteSpace(s) ) ; + + return string.Join(separator, items); + } + } +} \ No newline at end of file diff --git a/Yavsc/Interfaces/Workflow/IEstimate.cs b/Yavsc/Interfaces/Workflow/IEstimate.cs index 6e5ced18..82a10833 100644 --- a/Yavsc/Interfaces/Workflow/IEstimate.cs +++ b/Yavsc/Interfaces/Workflow/IEstimate.cs @@ -1,7 +1,6 @@ namespace Yavsc.Interfaces { using System.Collections.Generic; - using Yavsc.Interfaces.Workflow; using Yavsc.Models.Billing; public interface IEstimate { diff --git a/Yavsc/Migrations/20161010102616_recontact.cs b/Yavsc/Migrations/20161010102616_recontact.cs index 64749937..6cd94920 100644 --- a/Yavsc/Migrations/20161010102616_recontact.cs +++ b/Yavsc/Migrations/20161010102616_recontact.cs @@ -1,5 +1,3 @@ -using System; -using System.Collections.Generic; using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/20161020143022_estimateClientApprouval.Designer.cs b/Yavsc/Migrations/20161020143022_estimateClientApprouval.Designer.cs index f37b13ca..027d1c0b 100644 --- a/Yavsc/Migrations/20161020143022_estimateClientApprouval.Designer.cs +++ b/Yavsc/Migrations/20161020143022_estimateClientApprouval.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20161020143022_estimateClientApprouval.cs b/Yavsc/Migrations/20161020143022_estimateClientApprouval.cs index d72d7778..0f8a62ad 100644 --- a/Yavsc/Migrations/20161020143022_estimateClientApprouval.cs +++ b/Yavsc/Migrations/20161020143022_estimateClientApprouval.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/20161020212947_userAddress.Designer.cs b/Yavsc/Migrations/20161020212947_userAddress.Designer.cs index af31f4b6..08865733 100644 --- a/Yavsc/Migrations/20161020212947_userAddress.Designer.cs +++ b/Yavsc/Migrations/20161020212947_userAddress.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20161020212947_userAddress.cs b/Yavsc/Migrations/20161020212947_userAddress.cs index 66feda9e..9305ad21 100644 --- a/Yavsc/Migrations/20161020212947_userAddress.cs +++ b/Yavsc/Migrations/20161020212947_userAddress.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; + using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/20161021153306_estimateLines.Designer.cs b/Yavsc/Migrations/20161021153306_estimateLines.Designer.cs index ca84e3ae..5eab2c3a 100644 --- a/Yavsc/Migrations/20161021153306_estimateLines.Designer.cs +++ b/Yavsc/Migrations/20161021153306_estimateLines.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20161021153306_estimateLines.cs b/Yavsc/Migrations/20161021153306_estimateLines.cs index d2d1ed67..85e5b151 100644 --- a/Yavsc/Migrations/20161021153306_estimateLines.cs +++ b/Yavsc/Migrations/20161021153306_estimateLines.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; + using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/20161101234703_chatConnection.Designer.cs b/Yavsc/Migrations/20161101234703_chatConnection.Designer.cs index ba38ecd3..1a4be8e8 100644 --- a/Yavsc/Migrations/20161101234703_chatConnection.Designer.cs +++ b/Yavsc/Migrations/20161101234703_chatConnection.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20161101234703_chatConnection.cs b/Yavsc/Migrations/20161101234703_chatConnection.cs index 21d91356..8e76f3a4 100644 --- a/Yavsc/Migrations/20161101234703_chatConnection.cs +++ b/Yavsc/Migrations/20161101234703_chatConnection.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; + using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/20161102132129_fixCxOwner.Designer.cs b/Yavsc/Migrations/20161102132129_fixCxOwner.Designer.cs index 09904ca2..fa762772 100644 --- a/Yavsc/Migrations/20161102132129_fixCxOwner.Designer.cs +++ b/Yavsc/Migrations/20161102132129_fixCxOwner.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20161102132129_fixCxOwner.cs b/Yavsc/Migrations/20161102132129_fixCxOwner.cs index 41a50039..b482299d 100644 --- a/Yavsc/Migrations/20161102132129_fixCxOwner.cs +++ b/Yavsc/Migrations/20161102132129_fixCxOwner.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; + using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/20161102133253_fix2CxOwner.Designer.cs b/Yavsc/Migrations/20161102133253_fix2CxOwner.Designer.cs index 677cb754..050a1a82 100644 --- a/Yavsc/Migrations/20161102133253_fix2CxOwner.Designer.cs +++ b/Yavsc/Migrations/20161102133253_fix2CxOwner.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20161102133253_fix2CxOwner.cs b/Yavsc/Migrations/20161102133253_fix2CxOwner.cs index 6b4b4c50..4f7673b1 100644 --- a/Yavsc/Migrations/20161102133253_fix2CxOwner.cs +++ b/Yavsc/Migrations/20161102133253_fix2CxOwner.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; + using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs b/Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs new file mode 100644 index 00000000..efbe04ab --- /dev/null +++ b/Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs @@ -0,0 +1,833 @@ +using System; +using Microsoft.Data.Entity; +using Microsoft.Data.Entity.Infrastructure; +using Microsoft.Data.Entity.Metadata; +using Microsoft.Data.Entity.Migrations; +using Yavsc.Models; + +namespace Yavsc.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20161104164949_dropEstimateStatus")] + partial class dropEstimateStatus + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("ProductVersion", "7.0.0-rc1-16348"); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b => + { + b.Property("Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Name") + .HasAnnotation("MaxLength", 256); + + b.Property("NormalizedName") + .HasAnnotation("MaxLength", 256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .HasAnnotation("Relational:Name", "RoleNameIndex"); + + b.HasAnnotation("Relational:TableName", "AspNetRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClaimType"); + + b.Property("ClaimValue"); + + b.Property("RoleId") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAnnotation("Relational:TableName", "AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClaimType"); + + b.Property("ClaimValue"); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAnnotation("Relational:TableName", "AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + { + b.Property("LoginProvider"); + + b.Property("ProviderKey"); + + b.Property("ProviderDisplayName"); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasAnnotation("Relational:TableName", "AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + { + b.Property("UserId"); + + b.Property("RoleId"); + + b.HasKey("UserId", "RoleId"); + + b.HasAnnotation("Relational:TableName", "AspNetUserRoles"); + }); + + modelBuilder.Entity("Yavsc.Location", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Address") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("Latitude"); + + b.Property("Longitude"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccountNumber") + .HasAnnotation("MaxLength", 15); + + b.Property("BIC") + .HasAnnotation("MaxLength", 15); + + b.Property("BankCode") + .HasAnnotation("MaxLength", 5); + + b.Property("BankedKey"); + + b.Property("IBAN") + .HasAnnotation("MaxLength", 33); + + b.Property("WicketCode") + .HasAnnotation("MaxLength", 5); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Model.Chat.Connection", b => + { + b.Property("ConnectionId"); + + b.Property("ApplicationUserId"); + + b.Property("Connected"); + + b.Property("UserAgent"); + + b.HasKey("ConnectionId"); + }); + + modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b => + { + b.Property("UserId"); + + b.Property("Avatar"); + + b.Property("BillingAddressId"); + + b.Property("ChatHubConnectionId"); + + b.Property("EMail"); + + b.Property("Phone"); + + b.Property("Rate"); + + b.Property("UserName"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.Property("UserId"); + + b.Property("ContactCredits"); + + b.Property("Credits"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Activity", b => + { + b.Property("Code") + .HasAnnotation("MaxLength", 512); + + b.Property("ActorDenomination"); + + b.Property("Description"); + + b.Property("ModeratorGroupName"); + + b.Property("Name") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("Photo"); + + b.HasKey("Code"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.Property("Id"); + + b.Property("AccessFailedCount"); + + b.Property("Avatar") + .HasAnnotation("MaxLength", 512); + + b.Property("BankInfoId"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("DedicatedGoogleCalendar"); + + b.Property("Email") + .HasAnnotation("MaxLength", 256); + + b.Property("EmailConfirmed"); + + b.Property("FullName") + .HasAnnotation("MaxLength", 512); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("NormalizedEmail") + .HasAnnotation("MaxLength", 256); + + b.Property("NormalizedUserName") + .HasAnnotation("MaxLength", 256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("PostalAddressId"); + + b.Property("SecurityStamp"); + + b.Property("TwoFactorEnabled"); + + b.Property("UserName") + .HasAnnotation("MaxLength", 256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasAnnotation("Relational:Name", "EmailIndex"); + + b.HasIndex("NormalizedUserName") + .HasAnnotation("Relational:Name", "UserNameIndex"); + + b.HasAnnotation("Relational:TableName", "AspNetUsers"); + }); + + modelBuilder.Entity("Yavsc.Models.Auth.Client", b => + { + b.Property("Id"); + + b.Property("Active"); + + b.Property("DisplayName"); + + b.Property("LogoutRedirectUri") + .HasAnnotation("MaxLength", 100); + + b.Property("RedirectUri"); + + b.Property("RefreshTokenLifeTime"); + + b.Property("Secret"); + + b.Property("Type"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b => + { + b.Property("Id"); + + b.Property("ClientId") + .IsRequired() + .HasAnnotation("MaxLength", 50); + + b.Property("ExpiresUtc"); + + b.Property("IssuedUtc"); + + b.Property("ProtectedTicket") + .IsRequired(); + + b.Property("Subject") + .IsRequired() + .HasAnnotation("MaxLength", 50); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BalanceId") + .IsRequired(); + + b.Property("ExecDate"); + + b.Property("Impact"); + + b.Property("Reason") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ArticleId"); + + b.Property("Count"); + + b.Property("Description") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("EstimateId"); + + b.Property("EstimateTemplateId"); + + b.Property("UnitaryCost"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AttachedFilesString"); + + b.Property("AttachedGraphicsString"); + + b.Property("ClientApprouvalDate"); + + b.Property("ClientId") + .IsRequired(); + + b.Property("CommandId"); + + b.Property("CommandType"); + + b.Property("Description"); + + b.Property("LatestValidationDate"); + + b.Property("OwnerId") + .IsRequired(); + + b.Property("Title"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("OwnerId") + .IsRequired(); + + b.Property("Title"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b => + { + b.Property("SIREN"); + + b.HasKey("SIREN"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("Content"); + + b.Property("Modified"); + + b.Property("Photo"); + + b.Property("Posted") + .ValueGeneratedOnAdd() + .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + + b.Property("Rate"); + + b.Property("Title"); + + b.Property("Visible"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("CreationDate") + .ValueGeneratedOnAdd() + .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("ValidationDate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Circle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationUserId"); + + b.Property("Name"); + + b.Property("OwnerId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.CircleMember", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CircleId"); + + b.Property("MemberId") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Contact", b => + { + b.Property("OwnerId"); + + b.Property("UserId"); + + b.Property("ApplicationUserId"); + + b.HasKey("OwnerId", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => + { + b.Property("DeviceId"); + + b.Property("DeclarationDate") + .ValueGeneratedOnAdd() + .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + + b.Property("DeviceOwnerId"); + + b.Property("GCMRegistrationId") + .IsRequired(); + + b.Property("Model"); + + b.Property("Platform"); + + b.Property("Version"); + + b.HasKey("DeviceId"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("Discriminator") + .IsRequired(); + + b.Property("Name"); + + b.Property("Public"); + + b.HasKey("Id"); + + b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator"); + + b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Service", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ContextId"); + + b.Property("Description"); + + b.Property("Name"); + + b.Property("Public"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b => + { + b.Property("UserId"); + + b.Property("AccessToken"); + + b.Property("Expiration"); + + b.Property("ExpiresIn"); + + b.Property("RefreshToken"); + + b.Property("TokenType"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.PostTag", b => + { + b.Property("PostId"); + + b.Property("TagId"); + + b.HasKey("PostId", "TagId"); + }); + + modelBuilder.Entity("Yavsc.Models.Skill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name"); + + b.Property("Rate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.Property("PerformerId"); + + b.Property("AcceptGeoLocalization"); + + b.Property("AcceptNotifications"); + + b.Property("AcceptPublicContact"); + + b.Property("Active"); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("MaxDailyCost"); + + b.Property("MinDailyCost"); + + b.Property("OfferId"); + + b.Property("OrganizationAddressId"); + + b.Property("Rate"); + + b.Property("SIREN") + .IsRequired() + .HasAnnotation("MaxLength", 14); + + b.Property("WebSite"); + + b.HasKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Product", b => + { + b.HasBaseType("Yavsc.Models.Market.BaseProduct"); + + b.Property("Depth"); + + b.Property("Height"); + + b.Property("Price"); + + b.Property("Weight"); + + b.Property("Width"); + + b.HasAnnotation("Relational:DiscriminatorValue", "Product"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + .WithMany() + .HasForeignKey("RoleId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + .WithMany() + .HasForeignKey("RoleId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Model.Chat.Connection", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b => + { + b.HasOne("Yavsc.Location") + .WithMany() + .HasForeignKey("BillingAddressId"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithOne() + .HasForeignKey("Yavsc.Models.AccountBalance", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.HasOne("Yavsc.Model.Bank.BankIdentity") + .WithMany() + .HasForeignKey("BankInfoId"); + + b.HasOne("Yavsc.Location") + .WithMany() + .HasForeignKey("PostalAddressId"); + }); + + modelBuilder.Entity("Yavsc.Models.BalanceImpact", b => + { + b.HasOne("Yavsc.Models.AccountBalance") + .WithMany() + .HasForeignKey("BalanceId"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b => + { + b.HasOne("Yavsc.Models.Market.BaseProduct") + .WithMany() + .HasForeignKey("ArticleId"); + + b.HasOne("Yavsc.Models.Billing.Estimate") + .WithMany() + .HasForeignKey("EstimateId"); + + b.HasOne("Yavsc.Models.Billing.EstimateTemplate") + .WithMany() + .HasForeignKey("EstimateTemplateId"); + }); + + modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b => + { + b.HasOne("Yavsc.Models.Booking.BookQuery") + .WithMany() + .HasForeignKey("CommandId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("AuthorId"); + }); + + modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ClientId"); + + b.HasOne("Yavsc.Location") + .WithMany() + .HasForeignKey("LocationId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Circle", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.CircleMember", b => + { + b.HasOne("Yavsc.Models.Circle") + .WithMany() + .HasForeignKey("CircleId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("MemberId"); + }); + + modelBuilder.Entity("Yavsc.Models.Contact", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("DeviceOwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Service", b => + { + b.HasOne("Yavsc.Models.Activity") + .WithMany() + .HasForeignKey("ContextId"); + }); + + modelBuilder.Entity("Yavsc.Models.PostTag", b => + { + b.HasOne("Yavsc.Models.Blog") + .WithMany() + .HasForeignKey("PostId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.HasOne("Yavsc.Models.Activity") + .WithMany() + .HasForeignKey("ActivityCode"); + + b.HasOne("Yavsc.Models.Market.Service") + .WithMany() + .HasForeignKey("OfferId"); + + b.HasOne("Yavsc.Location") + .WithMany() + .HasForeignKey("OrganizationAddressId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("PerformerId"); + }); + } + } +} diff --git a/Yavsc/Migrations/20161104164949_dropEstimateStatus.cs b/Yavsc/Migrations/20161104164949_dropEstimateStatus.cs new file mode 100644 index 00000000..7c6ae53c --- /dev/null +++ b/Yavsc/Migrations/20161104164949_dropEstimateStatus.cs @@ -0,0 +1,278 @@ +using System; +using System.Collections.Generic; +using Microsoft.Data.Entity.Migrations; + +namespace Yavsc.Migrations +{ + public partial class dropEstimateStatus : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance"); + migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact"); + migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine"); + migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery"); + migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); + migrationBuilder.DropColumn(name: "Status", table: "Estimate"); + migrationBuilder.AddForeignKey( + name: "FK_IdentityRoleClaim_IdentityRole_RoleId", + table: "AspNetRoleClaims", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserClaim_ApplicationUser_UserId", + table: "AspNetUserClaims", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserLogin_ApplicationUser_UserId", + table: "AspNetUserLogins", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserRole_IdentityRole_RoleId", + table: "AspNetUserRoles", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserRole_ApplicationUser_UserId", + table: "AspNetUserRoles", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_AccountBalance_ApplicationUser_UserId", + table: "AccountBalance", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BalanceImpact_AccountBalance_BalanceId", + table: "BalanceImpact", + column: "BalanceId", + principalTable: "AccountBalance", + principalColumn: "UserId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CommandLine_Estimate_EstimateId", + table: "CommandLine", + column: "EstimateId", + principalTable: "Estimate", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BookQuery_ApplicationUser_ClientId", + table: "BookQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BookQuery_PerformerProfile_PerformerId", + table: "BookQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_Circle_CircleId", + table: "CircleMember", + column: "CircleId", + principalTable: "Circle", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_ApplicationUser_MemberId", + table: "CircleMember", + column: "MemberId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PostTag_Blog_PostId", + table: "PostTag", + column: "PostId", + principalTable: "Blog", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Activity_ActivityCode", + table: "PerformerProfile", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Location_OrganizationAddressId", + table: "PerformerProfile", + column: "OrganizationAddressId", + principalTable: "Location", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_ApplicationUser_PerformerId", + table: "PerformerProfile", + column: "PerformerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance"); + migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact"); + migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine"); + migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery"); + migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); + migrationBuilder.AddColumn( + name: "Status", + table: "Estimate", + nullable: true); + migrationBuilder.AddForeignKey( + name: "FK_IdentityRoleClaim_IdentityRole_RoleId", + table: "AspNetRoleClaims", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserClaim_ApplicationUser_UserId", + table: "AspNetUserClaims", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserLogin_ApplicationUser_UserId", + table: "AspNetUserLogins", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserRole_IdentityRole_RoleId", + table: "AspNetUserRoles", + column: "RoleId", + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_IdentityUserRole_ApplicationUser_UserId", + table: "AspNetUserRoles", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_AccountBalance_ApplicationUser_UserId", + table: "AccountBalance", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BalanceImpact_AccountBalance_BalanceId", + table: "BalanceImpact", + column: "BalanceId", + principalTable: "AccountBalance", + principalColumn: "UserId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CommandLine_Estimate_EstimateId", + table: "CommandLine", + column: "EstimateId", + principalTable: "Estimate", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BookQuery_ApplicationUser_ClientId", + table: "BookQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BookQuery_PerformerProfile_PerformerId", + table: "BookQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_Circle_CircleId", + table: "CircleMember", + column: "CircleId", + principalTable: "Circle", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CircleMember_ApplicationUser_MemberId", + table: "CircleMember", + column: "MemberId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PostTag_Blog_PostId", + table: "PostTag", + column: "PostId", + principalTable: "Blog", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Activity_ActivityCode", + table: "PerformerProfile", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_Location_OrganizationAddressId", + table: "PerformerProfile", + column: "OrganizationAddressId", + principalTable: "Location", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PerformerProfile_ApplicationUser_PerformerId", + table: "PerformerProfile", + column: "PerformerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + } + } +} diff --git a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index dca0444a..e76b8d63 100644 --- a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs @@ -372,8 +372,6 @@ namespace Yavsc.Migrations b.Property("OwnerId") .IsRequired(); - b.Property("Status"); - b.Property("Title"); b.HasKey("Id"); diff --git a/Yavsc/Model/Billing/Estimate.cs b/Yavsc/Model/Billing/Estimate.cs index 21dc8216..67405153 100644 --- a/Yavsc/Model/Billing/Estimate.cs +++ b/Yavsc/Model/Billing/Estimate.cs @@ -1,13 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; + namespace Yavsc.Models.Billing { - using System; - using System.Collections.Generic; - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - using System.Linq; - using Yavsc.Interfaces; - using Yavsc.Interfaces.Workflow; - using Yavsc.Models.Booking; + using Interfaces; + using Models.Booking; public partial class Estimate : IEstimate { [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] diff --git a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx index 1f297824..ba0b5098 100644 --- a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx +++ b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx @@ -209,6 +209,7 @@ Base de données éxistante Inscriptions externes Veuillez, s'il vous plait, utiliser une date future. + Saisir vos coordonées bancaires Saisissez votre demande de rendez-vous Contenu à accès restreint Mot de passe perdu? diff --git a/Yavsc/ViewModels/Manage/AddBankInfoViewModel.cs b/Yavsc/ViewModels/Manage/AddBankInfoViewModel.cs new file mode 100644 index 00000000..7969a518 --- /dev/null +++ b/Yavsc/ViewModels/Manage/AddBankInfoViewModel.cs @@ -0,0 +1,24 @@ +namespace Yavsc.ViewModels.Manage +{ + using Model.Bank; + public class AddBankInfoViewModel + { + public BankIdentity Data{get; private set; } + public AddBankInfoViewModel(BankIdentity data) + { + this.Data = data; + } + + public bool IsValid { get { + return ByIbanBIC || ByAccountNumber ; + }} + public bool ByIbanBIC { get {  + return (Data.BIC != null && Data.IBAN != null) ; + }} + public bool ByAccountNumber {  + get {  + return (Data.BankCode != null && Data.WicketCode != null && Data.AccountNumber != null && Data.BankedKey >0); + } + } + } +} \ No newline at end of file diff --git a/Yavsc/ViewModels/Manage/IndexViewModel.cs b/Yavsc/ViewModels/Manage/IndexViewModel.cs index df4c142c..7067598c 100644 --- a/Yavsc/ViewModels/Manage/IndexViewModel.cs +++ b/Yavsc/ViewModels/Manage/IndexViewModel.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Microsoft.AspNet.Identity; +using Yavsc.Model.Bank; using Yavsc.Models; namespace Yavsc.ViewModels.Manage @@ -35,5 +36,7 @@ namespace Yavsc.ViewModels.Manage public string FullName { get; set; } public string PostalAddress { get; set; } + + public BankIdentity BankInfo { get; set; } } } diff --git a/Yavsc/Views/Estimate/Details.cshtml b/Yavsc/Views/Estimate/Details.cshtml index 3ecb1b8b..ae367964 100644 --- a/Yavsc/Views/Estimate/Details.cshtml +++ b/Yavsc/Views/Estimate/Details.cshtml @@ -35,6 +35,10 @@

- Edit | - Back to List + @SR["Edit"] | + @SR["Back to List"] | + @{ var filenametex = $"estimate-{Model.Id}.tex" ; + var filenamepdf = $"estimate-{Model.Id}.pdf" ;} + Export au format LaTeX + Export au format LaTeX

diff --git a/Yavsc/Views/FrontOffice/Estimate.tex.cshtml b/Yavsc/Views/FrontOffice/Estimate.tex.cshtml index 69ec0273..9633eba9 100644 --- a/Yavsc/Views/FrontOffice/Estimate.tex.cshtml +++ b/Yavsc/Views/FrontOffice/Estimate.tex.cshtml @@ -1,9 +1,14 @@ @model Estimate +@using Yavsc.Helpers @{ Layout = null; var pro = Model.Query.PerformerProfile; var from = Model.Query.PerformerProfile.Performer; var to = Model.Query.Client; + var PostalAddress = (to.PostalAddress!=null) ? to.PostalAddress.Address.Replace("\n","\\\\\n") : null ; + var proaddr = Model.Query?.PerformerProfile.OrganizationAddress.Address; + var proaddrn = (proaddr!=null) ? proaddr.NewLinesWith("\\\\\n") : null ; + var proaddrm = (proaddr!=null) ? proaddr.NewLinesWith(" - ") : null ; } \documentclass[french,11pt]{article} \usepackage{babel} @@ -62,7 +67,7 @@ \def\FactureNum {@Model.Id.ToString()} % Numéro de facture \def\FactureAcquittee {non} % Facture acquittée : oui/non -\def\FactureLieu {@Model.Query.PerformerProfile.OrganizationAddress} % Lieu de l'édition de la facture +\def\FactureLieu {@proaddrn} % Lieu de l'édition de la facture \def\FactureObjet {Facture : @Model.Title} % Objet du document % Description de la facture \def\FactureDescr { @@ -70,18 +75,16 @@ } % Infos Client -\def\ClientNom{@ViewBag.To.UserName} % Nom du client +\def\ClientNom{@to.UserName} % Nom du client \def\ClientAdresse{ % Adresse du client - @if (ViewBag.To.PostalAddress!=null) { - @ViewBag.To.PostalAddress.Address.Replace("\n","\\\\\n") - } - @if (!string.IsNullOrWhiteSpace(ViewBag.To.PhoneNumber)) { - \\ Téléphone fixe: @ViewBag.To.PhoneNumber +@if (!string.IsNullOrWhiteSpace(PostalAddress)) { + @PostalAddress\\ } + @if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) { + @to.PhoneNumber \\ } -@if (!string.IsNullOrWhiteSpace(ViewBag.To.Email)) { - \\ E-mail: @ViewBag.To.Email } + E-mail: @to.Email } % Liste des produits facturés : Désignation, prix @@ -106,12 +109,10 @@ \setlength{\parindent}{0pt} \renewcommand{\headrulewidth}{0pt} -\cfoot{ - @if (!string.IsNullOrWhiteSpace(ViewBag.From.UserName)) { @ViewBag.From.UserName } - @if (!string.IsNullOrWhiteSpace(ViewBag.From.PostalAddress)) { - @ViewBag.From.PostalAddress.Address } } \newline - \small{ - @if (!string.IsNullOrWhiteSpace(ViewBag.From.Email)) { E-mail: @ViewBag.From.Email } - @if (!string.IsNullOrWhiteSpace(ViewBag.From.PhoneNumber)) { - Téléphone fixe: @ViewBag.From.PhoneNumber } +\cfoot{ @if (!string.IsNullOrWhiteSpace(from.UserName)) { @from.UserName } + @if (!string.IsNullOrWhiteSpace(proaddrm)) { - @proaddrm } \newline + \small{ E-mail: @from.Email + @if (!string.IsNullOrWhiteSpace(from.PhoneNumber)) { - Téléphone fixe: @from.PhoneNumber } } } @@ -125,7 +126,7 @@ } % Nom et adresse de la société @from.UserName \\ - @pro.OrganizationAddress.Address + @proaddrn Facture n°\FactureNum diff --git a/Yavsc/Views/FrontOffice/tmp.cshtml b/Yavsc/Views/FrontOffice/tmp.cshtml deleted file mode 100644 index 1b1e9f81..00000000 --- a/Yavsc/Views/FrontOffice/tmp.cshtml +++ /dev/null @@ -1,91 +0,0 @@ - - - - -\geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em} -\setlength{\parindent}{0pt} -\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} - -\thispagestyle{fancy} -\pagestyle{fancy} -\setlength{\parindent}{0pt} - -\renewcommand{\headrulewidth}{0pt} -\cfoot{ - @if (!string.IsNullOrWhiteSpace(ViewBag.From.Name)) { @ViewBag.From.Name } - @if (!string.IsNullOrWhiteSpace(ViewBag.From.Address)) { - @ViewBag.From.Address } - @if (!string.IsNullOrWhiteSpace(ViewBag.From.CityAndState)) { - @ViewBag.From.CityAndState } \newline - \small{ - @if (!string.IsNullOrWhiteSpace(ViewBag.From.Email)) { E-mail: @ViewBag.From.Email } - @if (!string.IsNullOrWhiteSpace(ViewBag.From.Mobile)) { - Téléphone mobile: @ViewBag.From.Mobile } - @if (!string.IsNullOrWhiteSpace(ViewBag.From.Phone)) { - Téléphone fixe: @ViewBag.From.Phone } - } -} - -\begin{document} - -% Logo de la société -%\includegraphics{logo.jpg} - -% Nom et adresse de la société - from.Name \\ - from.Address \\ -from.ZipCode from.CityAndState\\ - -Facture n°\FactureNum - - -{\addtolength{\leftskip}{10.5cm} %in ERT - \textbf{\ClientNom} \\ - \ClientAdresse \\ - -} %in ERT - - -\hspace*{10.5cm} -\FactureLieu, le \today - -~\\~\\ - -\textbf{Objet : \FactureObjet \\} - -\textnormal{\FactureDescr} - -~\\ - -\begin{center} - \begin{tabular}{lrrr} - \textbf{Désignation ~~~~~~} & \textbf{Prix unitaire} & \textbf{Quantité} & \textbf{Montant (EUR)} \\ - \hline - \AfficheResultat{} - \end{tabular} -\end{center} - -\begin{flushright} -\textit{Auto entreprise en franchise de TVA}\\ - -\end{flushright} -~\\ - -\ifthenelse{\equal{\FactureAcquittee}{oui}}{ - Facture acquittée. -}{ - - À régler par chèque ou par virement bancaire : - - \begin{center} - \begin{tabular}{|c c c c|} - if (!string.IsNullOrWhiteSpace(from.BankCode) && !string.IsNullOrWhiteSpace(from.WicketCode) - && !string.IsNullOrWhiteSpace(from.AccountNumber) ) { - \hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\ - from.BankCode & from.WicketCode & from.AccountNumber & from.BankedKey \\ - } - if (!string.IsNullOrWhiteSpace(from.IBAN) && !string.IsNullOrWhiteSpace(from.BIC)) { - \hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ from.IBAN } \\ - \hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ from.BIC } - } \\ - \hline - \end{tabular} - \end{center} -} -\end{document} diff --git a/Yavsc/Views/Manage/AddBankInfo.cshtml b/Yavsc/Views/Manage/AddBankInfo.cshtml new file mode 100644 index 00000000..47351abb --- /dev/null +++ b/Yavsc/Views/Manage/AddBankInfo.cshtml @@ -0,0 +1,65 @@ +@model Yavsc.ViewModels.Manage.AddBankInfoViewModel +@{ + ViewData["Title"] = SR["Fill in your Bank Info"]; +} + +

@ViewData["Title"].

+
+

Vous pouvez valider vos coordonnée bancaire ci après.

+ +
+
+ +
+
+ +
+ + +
+ +
+ + +
+
+
+
+
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+
+
+
+ +
+
+
+ +@section Scripts { + @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } +} diff --git a/Yavsc/Views/Manage/Index.cshtml b/Yavsc/Views/Manage/Index.cshtml index a3f42a7a..60fdbd61 100755 --- a/Yavsc/Views/Manage/Index.cshtml +++ b/Yavsc/Views/Manage/Index.cshtml @@ -28,12 +28,11 @@ else {@SR["Create"]}] +
@SR["External Logins"]:
@Model.Logins.Count [@SR["Manage"]]
- -
@SR["Full name"]:
@Model.FullName [@SR[@Model.Activity==null?"Set":"Modify settings"]]
- + +
@SR["Bank info"]:
+
@Html.DisplayFor(m => m.BankInfo) [@SR[@Model.BankInfo==null?"Set":"Modify"]]
+
@SR["YourPosts"]:
@Model.PostsCounter [ Date: Sun, 6 Nov 2016 02:10:23 +0100 Subject: [PATCH 14/15] cleans code --- Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs | 1 - Yavsc/Migrations/20161104164949_dropEstimateStatus.cs | 3 +-- Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs b/Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs index efbe04ab..70d2008c 100644 --- a/Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs +++ b/Yavsc/Migrations/20161104164949_dropEstimateStatus.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20161104164949_dropEstimateStatus.cs b/Yavsc/Migrations/20161104164949_dropEstimateStatus.cs index 7c6ae53c..d61b3379 100644 --- a/Yavsc/Migrations/20161104164949_dropEstimateStatus.cs +++ b/Yavsc/Migrations/20161104164949_dropEstimateStatus.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; + using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index e76b8d63..2fbfe465 100644 --- a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,8 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; -using Microsoft.Data.Entity.Migrations; using Yavsc.Models; namespace Yavsc.Migrations From 7844467ed09892d21d7fe47adba9f2695caf32bf Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 6 Nov 2016 14:07:57 +0100 Subject: [PATCH 15/15] updated --- Yavsc/tasks.todo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yavsc/tasks.todo b/Yavsc/tasks.todo index 62bcd68c..7c2a501d 100644 --- a/Yavsc/tasks.todo +++ b/Yavsc/tasks.todo @@ -12,7 +12,7 @@ Da road to the hell ✔ Rendu Android, via WebKit WebView @done (October 6th 2016, 14:32) ✔ Salon public @done (September 28th 2016, 17:58) ✔ Saisie et soumission basique du devis @done (October 30th 2016, 21:50) - ☐ Devis au formats TeX et Pdf en ligne à accès restreint + ✔ Devis au formats TeX et Pdf en ligne à accès restreint @done (November 6th 2016, 2:10) ☐ Signature de contrat ✔ Chat privé (coté serveur) @done (October 13th 2016, 16:27) ✔ Accès mobile au salon public @done (October 13th 2016, 16:27)