un positionnement de paramètre workflow des pros

This commit is contained in:
Paul Schneider 2017-01-13 16:31:40 +01:00
commit 96746fcc0b
322 changed files with 25893 additions and 3844 deletions

View file

@ -0,0 +1,44 @@
@using Yavsc.ViewModels.UserFiles
@model UserDirectoryInfo
<div class="dirinfo">
<strong>@Model.UserName / @Model.SubPath</strong>
<div class="subdirs">
@foreach (string subdir in Model.SubDirectories) {
<a href="@subdir" class="subdir">@subdir</a>
}
</div>
<style>
tr.fileheaders th {
border-bottom: 1px solid #ddd;
font-style: italic;
}
tr.fileinfo td {
padding: 1em;
border-bottom: 1px solid #ddd;
}
tr.fileinfo:nth-child(even) {background-color: #f2f2f2}
tr.fileinfo:hover {background-color: #f5f5f5}
</style>
<table >
<tr class="fileheaders">
<th>Nom
</th>
<th>Taille
</th>
<th>Modification
</th>
</tr>
@foreach (var fileinfo in Model.Files) {
<tr class="fileinfo">
<td class="filename">
<a href="@fileinfo.FileLink(Model.UserName,Model.SubPath)">
@fileinfo.Name
</a></td>
<td class="filesize">@fileinfo.Size</td>
<td class="filemdate">@fileinfo.LastModified</td>
</tr>
}
</table>
</div>

View file

@ -1,5 +1,6 @@
@model Estimate
<div class="estimate">
<a href="~/api/pdfestimate/estimate-@(Model.Id).tex" >Export au format LaTeX</a>
@ -9,3 +10,4 @@
</form>
<a href="~/api/pdfestimate/get/@(Model.Id)" >Télécharger le document généré</a>
</div>

View file

@ -1,4 +1,5 @@
@using Yavsc.Helpers
@using System.IO
@using System.Globalization
@model Estimate
@{
@ -6,11 +7,14 @@
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}
var PostalAddress = to.PostalAddress?.Address.SplitAddressToTeX();
var proaddr = Model.Query.PerformerProfile.OrganizationAddress.Address.SplitAddressToTeX();
var proaddrm = new HtmlString(Model.Query.PerformerProfile.OrganizationAddress.Address);
var isestimate = !ViewBag.AsBill;
var prosign = new FileInfo($"{ViewBag.BillsDir}/estimate-prosign-{Model.Id}.png");
}
\documentclass[french,11pt]{article}
\usepackage{eurosym}
\usepackage{babel}
\usepackage[T1]{fontenc}
@ -32,14 +36,11 @@
\FPeval{\montant}{#2 * #3}
\FPround{\montant}{\montant}{2}
\FPadd{\TotalHT}{\TotalHT}{\montant}
\eaddto\ListeProduits{#1 & \prix & #2 & \montant \cr}
}
\newcommand{\AfficheResultat}{%
\ListeProduits
\FPeval{\TotalTVA}{\TotalHT * \TVA / 100}
\FPadd{\TotalTTC}{\TotalHT}{\TotalTVA}
\FPround{\TotalHT}{\TotalHT}{2}
@ -48,8 +49,6 @@
\global\let\TotalHT\TotalHT
\global\let\TotalTVA\TotalTVA
\global\let\TotalTTC\TotalTTC
\cr
\hline
\textbf{Total} & & & \TotalHT
@ -67,9 +66,9 @@
%%%%%%%%%%%%%%%%%%%%% A MODIFIER DANS LA FACTURE %%%%%%%%%%%%%%%%%%%%%
\def\FactureNum {@Model.Id.ToString()} % Numéro de facture
\def\FactureAcquittee {non} % Facture acquittée : oui/non
\def\FactureLieu {@proaddrn} % Lieu de l'édition de la facture
\def\FactureObjet {Facture : @TeXHelpers.ToTeX(Model.Title)} % Objet du document
\def\FactureAcquittee {@ViewBag.Acquitted?"oui":"non"} % Facture acquittée : oui/non
\def\FactureLieu {@proaddrm} % Lieu de l'édition de la facture
\def\FactureObjet {@(new HtmlString(isestimate?"Devis":"Facture")) : @TeXHelpers.ToTeX(Model.Title)} % Objet du document
% Description de la facture
\def\FactureDescr {
@TeXHelpers.ToTeX(Model.Description)
@ -80,10 +79,9 @@
\def\ClientAdresse{
% Adresse du client
@if (!string.IsNullOrWhiteSpace(PostalAddress)) {
<text> @TeXHelpers.ToTeX(PostalAddress)\\</text> }
@if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) {<text>
@TeXHelpers.ToTeX(to.PhoneNumber)<text>\\</text>
@PostalAddress
@if (PostalAddress!=null) {<text>@PostalAddress</text>}
@if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) {<text>@TeXHelpers.ToTeX(to.PhoneNumber)<text>\\</text>
</text>}
E-mail: @TeXHelpers.ToTeX(to.Email)
}
@ -106,7 +104,7 @@
\setlength{\parindent}{0pt}
\renewcommand{\headrulewidth}{0pt}
\cfoot{ @TeXHelpers.ToTeX(from.UserName) @if (!string.IsNullOrWhiteSpace(proaddrm)) { <text> - @TeXHelpers.ToTeX(proaddrm) </text> } \newline
\cfoot{ @TeXHelpers.ToTeX(from.UserName) @if (proaddrm!=null) { <text> - @proaddrm </text> } \newline
\small{ E-mail: @TeXHelpers.ToTeX(from.Email) @if (!string.IsNullOrWhiteSpace(from.PhoneNumber)) { <text> - Téléphone fixe: @TeXHelpers.ToTeX(from.PhoneNumber) </text> }
}
}
@ -115,7 +113,7 @@
% Logo de la société
@if (from.Avatar != null) {
<text>\includegraphics{@from.Avatar}
<text>\includegraphics[height=60pt]{@(ViewBag.AvatarsDir)/@(from.UserName).png}
</text>
} else {
<text>%\includegraphics{logo.png}
@ -123,9 +121,9 @@
}
% Nom et adresse de la société
@TeXHelpers.ToTeX(from.UserName) \\
@TeXHelpers.ToTeX(proaddrn)
@proaddr
Facture n°\FactureNum
@(isestimate?"Devis":"Facture") n°\FactureNum
{\addtolength{\leftskip}{10.5cm} %in ERT
@ -159,11 +157,12 @@ Facture n°\FactureNum
\end{flushright}
~\\
@if (!isestimate) {
<text>
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
Facture acquittée.
}{
@{
}{ </text>
var bi = from.BankInfo;
if (bi!=null) {
<text>À régler par chèque ou par virement bancaire :
@ -188,5 +187,21 @@ Facture n°\FactureNum
}
}
@if (!(Model.ProviderValidationDate==null)) {
<text>
\begin{flushright}
@(new HtmlString(isestimate?"Devis validé":"Facture validée")) le @TeXHelpers.ToTeX(Model.ProviderValidationDate.ToString("dddd dd MMMM yyyy",
CultureInfo.CreateSpecificCulture("fr-FR")))
\end{flushright}
@if (prosign.Exists) {
<text>
\begin{center}
\hspace{263pt}
\includegraphics[height=60pt]{@(ViewBag.BillsDir)/estimate-prosign-@(Model.Id).png}
\end{center}
</text>
}
</text>
}
\end{document}

View file

@ -1,5 +0,0 @@
@model UserDirectoryInfo
@{
var files = User.GetUserFiles();
}

View file

@ -0,0 +1,4 @@
@model Activity
<div class="activity">
<b title="@Model.Description" style="cursor:alias;">@Html.DisplayFor(m=>m.Name)</b>
</div>

View file

@ -1,10 +1,13 @@
@model PerformerProfile
<div class="performer @(Model.Active?"active":"inactive")">
@if (Model.Performer != null) {
<img src="~/Avatars/@(Model.Performer.UserName).xs.png" alt="avatar">
@Model.Performer?.UserName
<ul>
<li>@Model.Performer.UserName (rating: @Model.Rate%)</li>
<li> @SR["Rating"]: @Model.Rate % </li>
@if (Model.MinDailyCost != null) {
<li>@SR["MinDailyCost"]: @Model.MinDailyCost&euro;</li>
}
@ -14,11 +17,12 @@
@if (Model.WebSite!=null) {
<li>@SR["WebSite"]: @Model.WebSite</li>
}
@if (Model.DoesBlog) {
@if (Model.Performer.Posts!=null) {
<li> <a asp-controller="Blogspot" asp-action="UserPosts"
asp-route-id="@Model.Performer.UserName">@SR["His blog"]</a>
</li>
}
@if (Model.Performer != null) {
@if (!string.IsNullOrEmpty(
Model.Performer.DedicatedGoogleCalendar))
{
@ -30,8 +34,8 @@
<li> @SR["Uses the mobile application, and receives push notifications"]
</li>
}
}
</ul>
<button id="btnAddUser">Ajouter aux contacts</button>
}
</div>

View file

@ -21,13 +21,12 @@
<environment names="Staging,Production,yavsc,yavscpre,booking,lua">
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"
asp-fallback-src="~/bower_components/jquery/dist/jquery.min.js"
asp-fallback-test="window.jQuery">
asp-fallback-test="window.jQuery" >
</script>
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/bootstrap.min.js"
asp-fallback-src="~/bower_components/bootstrap/dist/js/bootstrap.min.js"
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
</script>
<script src="~/js/site.min.js" asp-append-version="true"></script>
</environment>
@RenderSection("header", required: false)
</head>
@ -46,11 +45,10 @@
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a asp-controller="Home" asp-action="Index" class="navbar-link">@SR["Home"]</a></li>
<li><a asp-controller="Blogspot" asp-action="Index" class="navbar-link">@SR["Blogs"]</a></li>
<li><a asp-controller="Home" asp-action="About" class="navbar-link">@SR["About"] @SiteSettings.Value.Title</a> </li>
<li><a asp-controller="Home" asp-action="Chat" class="navbar-link">@SR["Chat"]</a></li>
<li><a asp-controller="Home" asp-action="Contact" class="navbar-link">@SR["Contact"]</a></li>
<li><a asp-controller="Home" asp-action="About" class="navbar-link">@SR["About"] @SiteSettings.Value.Title</a> </li>
</ul>
@await Html.PartialAsync("_LoginPartial")
</div>
@ -61,8 +59,35 @@
</main>
<hr />
<footer>
<p>Yavsc - Copyright &copy; 2016 Paul Schneider</p>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '552433071604577',
xfbml : true,
version : 'v2.5'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/fr_FR/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div
class="fb-like"
data-share="true"
data-width="450"
data-show-faces="true">
</div>
<p>Yavsc - Copyright &copy; 2016 - 2017 Paul Schneider</p>
</footer>
@RenderSection("scripts", required: false)
</body>
</html>