Commit graph yavsc/src/Yavsc.Org/Views/Shared
Author SHA1 Message Date
97d0584292
Estimate validation polish + PDF/TeX generation in Yavsc.Api
- List removal: GetOngoingEstimatesAsProvider filters on
  ProviderValidationDate so a provider's signed estimate leaves their
  list; PostIt refreshes the list on navigation pop-back.
- Title renames: "Devis en attente de signature fournisseur/client"
  on both the provider and client sides (HomePage, VM, tests).
- Move the estimate/bill TeX+PDF generation flow from Yavsc.Org into
  Yavsc.Api (TeXHelpers, PdfGenerationViewModel, BillViewComponent,
  Bill/Estimate templates, _ViewImports). Program.cs wires
  AddControllersWithViews + SiteSettings; FrontOfficeApiController
  injects IRazorViewEngine (cast to IViewEngine) with optional deps
  and exposes estimate.tex/estimate.pdf endpoints keyed by query id.
- PDF generation drives through the Estimate_pdf view (side-effect
  render) and compiles via the system lualatex, fed TeX on stdin (no
  intermediate .tex), PDF to the bills dir, aux artifacts cleaned so
  only the .pdf persists. Resolve the bills dir to an absolute path so
  lualatex's -output-directory and working directory agree regardless
  of the host cwd (fixes "I can't write on file estimate-1.log").
- PostIt: DownloadAsync on the client + GetEstimateTex/PdfAsync;
  Télécharger PDF/TeX buttons on the validation and command-detail
  pages via a StorageProvider save helper.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 03:22:01 +01:00
1455ba5187
Restore tree-structured comments in Blog Details
The $.psc.blogcomment widget (from the removed wwwroot/js/comment.js)
provided reply-to-comment nesting. Rewrite Details.cshtml to drive the
same /api/v1/blogcomments endpoint with ParentId, delegating reply
clicks so they work across the whole nested tree.

Render comment metadata server-side in the Comment view component
template (the widget used to add it client-side) and Include Author so
nested comments get their author instead of relying on the request-scoped
identity map.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 11:21:33 +01:00
67da921bce
Blog Post Id 2026-09-19 21:08:10 +01:00
3bc4142383
refacto site settings
Some checks failed
Dotnet build and test / build (pull_request) Failing after 8m29s
2026-09-17 23:54:36 +01:00
a72b0cba7b ensure the avatar path 2026-09-04 15:08:35 +01:00
ec901e1f10 refacto API prefix + nav.back 2026-08-20 20:50:52 +01:00
3b3635758b org: show full error details in development 2026-07-12 16:07:28 +01:00
afcb6167e6 Localisation 2026-07-12 15:18:07 +01:00
0957efb876 code format 2026-07-12 15:17:41 +01:00
3febd63b06 WIP audiences 2026-07-12 02:42:13 +01:00
Lum
4198e4dcf2 Blog: render user avatar through a null-safe helper
GET /BlogSpot/Details/1 retournait 500 (avec un 500-sur-500 sur
la page d'erreur elle-même) parce que DisplayTemplates
/ApplicationUser.cshtml faisait `var avuri = "/Avatars/" +
Model.UserName + ".s.png"` : avec <Nullable>enable</Nullable>,
Razor émet un null-check implicite sur Model.UserName et lève
NullReferenceException quand l'auteur n'a pas de UserName
posé (donnée héritée, user partiellement initialisé).

- UserDisplayHelpers.AvatarSrc : helper statique pur dans
  Yavsc.Abstract.Identity qui retourne
  YavscConstants.DefaultAvatar pour user null / UserName vide
  ou whitespace, et un path /avatars/<name>.s.png sinon.
- ApplicationUser.cshtml : utilise le helper.
- Tests : 4 cas (null, vide, whitespace, valide) dans
  Yavsc.Org.Tests/NonRegression.

Bonus : le path d'avatar passe de "/Avatars/" (S majuscule,
ne résolvait pas dans le middleware de fichiers statiques) à
YavscConstants.AvatarsPath ("/avatars" minuscule), pour fermer
l'autre trou que centraliser le calcul permettait de fixer
proprement.
2026-07-11 19:41:09 +01:00
135003a913 Identity reloaded 2026-07-05 23:56:10 +01:00
40897f4f83 layouts 2026-07-04 20:09:58 +01:00
8ebb2f49d4 Ui fixes 2026-07-04 19:49:48 +01:00
e526b050ed Add the missing Redirect.cshtml view used by LoadingPage helper
AccountController.Signin (and ExternalController / ConsentController)
return this.LoadingPage("Redirect", model.ReturnUrl) when the OIDC
client is a native one (e.g. PostIt, with a custom-scheme redirect
URI). The LoadingPage extension in Yavsc.Extensions renders
controller.View("Redirect", …), so a /Views/Shared/Redirect.cshtml
must exist.

The file was missing, and the absence surfaced as a 500 on
POST /signin once the login itself succeeded — the user authenticated
fine, Identity.Application signed in, but the response body never
rendered and the POST returned InvalidOperationException
('The view Redirect was not found'). This is what broke the PostIt
flow after the seed/IdentityResource fixes landed.

The view is the standard IdentityServer quickstart loading page: a
meta-refresh that redirects the embedded browser to the OIDC
client's callback URI (postit://callback). Localizer strings are
used so the page is translatable like the rest of the auth UI.
2026-06-26 00:21:58 +01:00
5bf0480906 arbitrage 2026-06-20 20:21:15 +01:00
df431e40af nav: highlight active dropdown toggle in _LoginPartial
Add ActivePageAny(ViewContext, IEnumerable<string>) so a dropdown
toggle gets the active class + aria-current="page" whenever any of
its children is the current route. Apply it to the Plateforme,
Administration, and account menu toggles.
2026-06-20 20:17:36 +01:00
1addc3039b nav: highlight active route in _LoginPartial dropdowns
Apply PageHelpers.ActivePage to all 13 <a class="dropdown-item">
entries across the Plateforme, Administration, and account
dropdown menus so users see which section they're in. The
Logout entry matches Account/Logout specifically to avoid
colliding with the Register/Signin entries on the same Account
controller.
2026-06-20 20:07:13 +01:00
325cb339fd nav: highlight active page with active class and aria-current
Add PageHelpers.ActivePage extension and apply it to top-level nav
items and the Account/Register + Account/Signin items in _LoginPartial,
so the current route gets the active class and aria-current="page"
for accessibility.
2026-06-20 19:48:20 +01:00
197f9f90bb a banner 2026-06-19 13:46:17 +01:00
c1f4d19975 fices the UI 2026-06-15 02:55:22 +01:00
7550cb8eec WIP : Js and css cleanup 2026-06-14 15:47:28 +01:00
417abcfb71 refac: load jQuery + Bootstrap as global scripts in _Layout
JQuery, jQuery UI, Bootstrap, jquery-validation and
jquery-validation-unobtrusive are now loaded as separate
<script> tags by _Layout.cshtml, BEFORE the core bundle.

Why: esbuild IIFE bundles do not expose jQuery ($ and jQuery)
on window — UMD-style modules bundled in IIFE format are wrapped
in a closure. The application code (site.js, md-helpers.js,
yavsc-remote-fs.js, etc.) consumes window.$ / window.jQuery, so
it broke at runtime. Loading these scripts as global <script> tags
restores the expected global exposure.

This commit only touches the layout. Future commits will remove
the corresponding imports from each bundle's entry (chat, dropzone,
datetime, timepicker) and let them rely on window.$ being already
defined by the layout.

Tested: dotnet test 11/11 green. The new global scripts are
served by ASP.NET static files (HTTP 200 verified). Server
restart by developer required to pick up the new layout.
2026-06-14 15:16:16 +01:00
952d263b9f refac: separate front assets into esbuild bundles
Sort ~50 Mo de libs tierces hors du repo et regroupe le code
front en 6 bundles thématiques + 2 assets statiques.

Bundles produits par esbuild :
- core.bundle.min.js   : jQuery + jQuery UI + Bootstrap 4 + validation
                          + tout le code applicatif 'core'
                          (site, signout, signin, input-lib, md-helpers,
                          audiovideoinput, parallax, google.geocode,
                          google-geoloc). Chargé par _Layout.cshtml.
- chat.bundle.min.js   : core subset (sans Bootstrap) + chat.js + comment.js
                          (SignalR client chargé séparément, voir plus bas)
- dropzone.bundle.min.js : jQuery + dropzone + yavsc-remote-fs
- datetime.bundle.min.js : jQuery + jQuery UI + eonasdan datetimepicker
                          + jquery-timepicker
- timepicker.bundle.min.js : jQuery + jQuery UI + jquery-timepicker
- quill.bundle.min.js  : Quill rich text editor

Assets statiques (non bundlés, copiés depuis node_modules) :
- signalr.min.js       : client SignalR 2.x (legacy server)
- moment-with-locales.min.js : moment + 137 locales (require dynamique
                               non résolvable statiquement par esbuild)

CSS vendor copiées comme assets statiques vers wwwroot/css/ :
bootstrap.min.css, jquery-ui.min.css, dropzone.min.css,
dropzone-basic.min.css, bootstrap-datetimepicker.min.css,
jquery.timepicker.css

Exception gitignore : jonthornton-Datepair/jquery.datepair.min.js
n'est pas sur npm, conservé comme asset statique sous
wwwroot/lib/jonthornton-Datepair/ (téléchargé depuis upstream).

Vues Razor mises à jour (15 fichiers) pour pointer vers les bundles
et les CSS vendor. Suppression de la majorité de wwwroot/lib/ (1300+
fichiers). Suppression des jquery*.js, quill.js, showdown.js,
to-markdown.js, jquery.signalR-2.2.1.js, dropzone.js et de leurs
.min.js associés.

'jquery-datepair' et 'jquery-ui-map' non publiés sur npm :
- jquery-ui-map n'est utilisé nulle part dans le repo (vérifié),
  la dépendance est purement historique.
- datepair reste en static sous wwwroot/lib/jonthornton-Datepair/.
2026-06-14 14:11:33 +01:00
bba719c8c1 doc : Architecute 2026-06-12 12:34:30 +01:00
164bd928aa logo + oidc client PostIt 2026-06-10 11:10:15 +01:00
1054deaebf Fixes the contact page 2026-06-04 19:18:28 +01:00
20713eef64 pitit refact 2026-06-04 12:13:37 +01:00
e24208e77b refact 2026-05-30 19:34:22 +01:00
Paul Schneider
be7df3d054 APi Scopes 2026-03-16 23:16:12 +00:00
Paul Schneider
e042e34bf7 refact and login 2026-03-09 02:07:42 +00:00
Paul Schneider
40e8e08690 reorg 2026-02-28 21:17:54 +00:00